Skip to content

Commit

Permalink
Added parsing mask bed file
Browse files Browse the repository at this point in the history
  • Loading branch information
svarona committed Dec 10, 2020
1 parent 582aa92 commit 98656b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1389,12 +1389,17 @@ process VARSCAN2_CONSENSUS {
-bga \\
-ibam ${bam[0]} \\
-g $fasta \\
| awk '\$4 < $params.min_coverage' | bedtools merge > ${prefix}.mask.bed
| awk '\$4 < $params.min_coverage' > ${prefix}.lowcov.bed
parse_mask_bed.py ${vcf[0]} ${prefix}.lowcov.bed ${prefix}.lowcov.fix.bed
bedtools merge -i ${prefix}.lowcov.fix.bed > ${prefix}.mask.bed
bedtools maskfasta \\
-fi $fasta \\
-bed ${prefix}.mask.bed \\
-fo ${index_base}.ref.masked.fa
cat ${index_base}.ref.masked.fa | bcftools consensus ${vcf[0]} > ${prefix}.consensus.masked.fa
header=\$(head -n 1 ${prefix}.consensus.masked.fa | sed 's/>//g')
Expand Down

0 comments on commit 98656b4

Please sign in to comment.