Skip to content

Commit

Permalink
Fixed bug to properly detect empty mafs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil committed Jul 13, 2023
1 parent 13b4060 commit bd38a85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cwl/fillout_maf2vcf.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ requirements:
vcf_sorted_gz="${ return inputs.sample_id + '.sorted.vcf.gz' }"
sample_id="${ return inputs.sample_id }"
# convert maf to vcf
num_lines="\$(wc -l < \${input_maf})"
more_than_five="\$(( \${num_lines} > 5))"
if [ "\${more_than_five}" == "1" ]
num_lines="\$(grep -v '^[#]' \${input_maf} | wc -l)"
more_than_one="\$(( \${num_lines} > 1))"
if [ "\${more_than_one}" == "1" ]
then
maf2vcf.pl --output-dir . --input-maf "\${input_maf}" --output-vcf "\${vcf}" --ref-fasta "\${fasta}"
else
Expand Down

0 comments on commit bd38a85

Please sign in to comment.