Skip to content

Commit

Permalink
Filter mutect2 variants
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Mar 7, 2024
1 parent 7a2d21c commit e6e2ae5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
9 changes: 7 additions & 2 deletions modules/local/mutect2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,23 @@ process MUTECT2 {
-R ${reference} \
--min-reads-per-strand 2 \
-V raw.vcf.gz \
--tmp-dir \$PWD \
--tmp-dir . \
-O ${bam_file.baseName}.vcf.gz
bcftools norm \
-m-any \
-f ${reference} \
-o ${bam_file.baseName}.norm.vcf.gz -Oz \
${bam_file.baseName}.vcf.gz
bcftools view \
-i 'FORMAT/AF>=${params.detection_limit}' \
-o ${bam_file.baseName}.vcf.gz -Oz \
${bam_file.baseName}.norm.vcf.gz
mv ${bam_file.baseName}.norm.vcf.gz ${bam_file.baseName}.vcf.gz
tabix -f ${bam_file.baseName}.vcf.gz
rm ${bam_file.baseName}.norm.vcf.gz
rm raw.vcf.gz
"""
}
18 changes: 9 additions & 9 deletions tests/mitocalling.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"Runs with single BAM file and mutect2": {
"content": [
"variants.annotated.txt:md5,2df787e5b0067dc97f410c2aaf280285"
"variants.annotated.txt:md5,68e69c74076a094f90fcd148d24c107a"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.2"
},
"timestamp": "2024-03-03T13:36:56.200643224"
"timestamp": "2024-03-07T22:54:43.41727058"
},
"Runs with 6 samples provided as testdata with mutect2": {
"content": [
"variants.annotated.txt:md5,60f38bd59aaa986644d1df365ae62948",
"variants.annotated.txt:md5,41d22ff665a2621d1eca7b9e07741368",
{
"tasksFailed": 0,
"tasksCount": 28,
Expand All @@ -20,9 +20,9 @@
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "22.10.4"
"nextflow": "23.04.2"
},
"timestamp": "2024-03-04T13:37:55.902842"
"timestamp": "2024-03-07T23:01:31.253552492"
},
"Runs with single BAM file and mutserve": {
"content": [
Expand All @@ -32,7 +32,7 @@
"nf-test": "0.8.4",
"nextflow": "23.04.2"
},
"timestamp": "2024-03-03T13:53:38.360857477"
"timestamp": "2024-03-07T22:53:04.753352089"
},
"Runs with BAM file including different header contigs": {
"content": [
Expand Down Expand Up @@ -70,9 +70,9 @@
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "22.10.4"
"nextflow": "23.04.2"
},
"timestamp": "2024-03-04T13:39:42.589344"
"timestamp": "2024-03-07T23:06:50.681516749"
},
"Runs with 6 samples provided as testdata with mutserve": {
"content": [
Expand All @@ -87,6 +87,6 @@
"nf-test": "0.8.4",
"nextflow": "23.04.2"
},
"timestamp": "2024-03-03T14:00:27.656567299"
"timestamp": "2024-03-07T22:57:49.179958661"
}
}

0 comments on commit e6e2ae5

Please sign in to comment.