Add filtermutectcalls to filter mtdna variant calls#820
Add filtermutectcalls to filter mtdna variant calls#820MatthieuBeukers wants to merge 1 commit intomainfrom
Conversation
| tmp_index | ||
| fix_vcf | ||
| index | ||
| cleanup |
There was a problem hiding this comment.
in line with the cleanup PR #819, change this to:
trap 'rc=$?; cleanup; exit $rc' EXIT INT TERM
and move this line to the very top of the main function.
| filtermutect_args+=("-R" "!{reference}") | ||
| filtermutect_args+=("-V" "!{vcf}") | ||
| filtermutect_args+=("-O" "!{vcfOut}") | ||
| filtermutect_args+=("-O" "!{tmpVcfName}.tmp.vcf.gz") |
There was a problem hiding this comment.
just add a tempfile name here instead of the nextflow variable
| shell: | ||
| refSeqPath = params[meta.project.assembly].reference.fasta | ||
| reference = refSeqPath.substring(0, refSeqPath.lastIndexOf('.')) | ||
| tmpVcfName = "${meta.project.id}_${meta.sample.family_id}_${meta.sample.individual_id}_chrm_snv" |
There was a problem hiding this comment.
remove, see previous comment on filtermutect2_mito.sh
|
|
||
| # Work around for issue described here: https://github.com/broadinstitute/gatk/issues/6857 | ||
| fix_vcf () { | ||
| gunzip -c "!{tmpVcfName}.tmp.vcf.gz" | sed 's|##INFO=<ID=AS_FilterStatus,Number=A,Type=String,Description="Filter status for each allele, as assessed by ApplyVQSR. Note that the VCF filter field will reflect the most lenient/sensitive status across all alleles.">|##INFO=<ID=AS_FilterStatus,Number=.,Type=String,Description="Filter status for each allele, as assessed by ApplyVQSR. Note that the VCF filter field will reflect the most lenient/sensitive status across all alleles.">|' > "!{tmpVcfName}.filtered.vcf" |
There was a problem hiding this comment.
these added INFO fields need to be added to the annotations in the documentation. (and any other added INFO and FORMAT if any)
| ch_mtdnasnv_gatk_unfiltered | ||
| | map { meta, vcf -> [meta, vcf.data, vcf.index, vcf.stats] } | ||
| | filtermutect2_mito | ||
| | map { meta, vcfOut, vcfOutIndex, vcfOutStats -> [meta, [data: vcfOut, index: vcfOutIndex, stats: vcfOutStats]] } |
There was a problem hiding this comment.
Update the workflow diagram in the docs
| mv "!{tmpVcfName}.tmp.vcf.gz.filteringStats.tsv" "!{vcfOut}.filteringStats.tsv" | ||
| rm "!{tmpVcfName}.tmp.vcf.gz" | ||
| rm "!{tmpVcfName}.tmp.vcf.gz.csi" | ||
| rm "!{tmpVcfName}.tmp.vcf.gz.tbi" |
There was a problem hiding this comment.
add "-f" to supress error logs for cases that these files do not exist. Might happen due to the changes in the next comment, "trap-based cleanup"
Before submitting this PR, please make sure:
bash test/test.shand verified that all tests passRun tests: