Skip to content

Commit a994afe

Browse files
committed
The artifact masking step should not rename the output files.
1 parent 59f6526 commit a994afe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

main.nf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ process artifact_mask_vcfs {
162162
input:
163163
set file(svfile), val(uuid), val(dir) from ch_vcfs
164164
output:
165-
set file('*_artifact_masked.vcf'), val(uuid), val(dir) into ch_artifact_masked_vcfs
165+
set file(svfile), val(uuid), val(dir) into ch_artifact_masked_vcfs
166166

167167
tag "$uuid $svfile"
168168

@@ -173,7 +173,11 @@ process artifact_mask_vcfs {
173173
MASK_FILE=\${BNAME}_artifact_masked.vcf
174174
MASK_DIR=$params.mask_dirs.masks_artifacts
175175
176+
# We don't want to change the filename in this process so we copy the
177+
# infile and remove the symbolic link. And then recreate the file at the
178+
# end.
176179
cp $svfile workfile
180+
rm $svfile # It's a link, should be ok :)
177181
for mask in \$MASK_DIR/*; do
178182
if [ ! -f "\$mask" ]; then
179183
break
@@ -183,7 +187,7 @@ process artifact_mask_vcfs {
183187
> tempfile
184188
mv tempfile workfile
185189
done
186-
mv workfile \$MASK_FILE
190+
mv workfile $svfile
187191
"""
188192
}
189193

0 commit comments

Comments
 (0)