-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This should make the transition to a deployed pipeline more obvious to an observer
- Loading branch information
1 parent
3f6792e
commit cd9fbd7
Showing
7 changed files
with
215 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Generate statistics with bcftools stats | ||
*/ | ||
process BCFTOOLS_STATS { | ||
|
||
container 'community.wave.seqera.io/library/bcftools:1.20--a7f1d9cdda56cc93' | ||
conda "bioconda::bcftools=1.20" | ||
|
||
input: | ||
path vcf_file | ||
|
||
output: | ||
path "${vcf_file}.stats", emit: stats | ||
|
||
script: | ||
""" | ||
bcftools stats ${vcf_file} > ${vcf_file}.stats | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
/* | ||
* Call variants with GATK HaplotypeCaller | ||
*/ | ||
process GATK_HAPLOTYPECALLER { | ||
|
||
container "community.wave.seqera.io/library/gatk4:4.5.0.0--730ee8817e436867" | ||
conda "bioconda::gatk4=4.5.0.0" | ||
|
||
publishDir '${params.outdir}', mode: 'symlink' | ||
|
||
input: | ||
tuple path(input_bam), path(input_bam_index) | ||
path ref_fasta | ||
path ref_index | ||
path ref_dict | ||
path interval_list | ||
|
||
output: | ||
path "${input_bam}.g.vcf" , emit: vcf | ||
path "${input_bam}.g.vcf.idx" , emit: idx | ||
|
||
script: | ||
""" | ||
gatk HaplotypeCaller \ | ||
-R ${ref_fasta} \ | ||
-I ${input_bam} \ | ||
-O ${input_bam}.g.vcf \ | ||
-L ${interval_list} \ | ||
-ERC GVCF | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Combine GVCFs into GenomicsDB datastore and run joint genotyping to produce cohort-level calls | ||
*/ | ||
process GATK_JOINTGENOTYPING { | ||
|
||
container "community.wave.seqera.io/library/gatk4:4.5.0.0--730ee8817e436867" | ||
conda "bioconda::gatk4=4.5.0.0" | ||
|
||
publishDir '${params.outdir}', mode: 'symlink' | ||
|
||
input: | ||
path all_gvcfs | ||
path all_idxs | ||
path interval_list | ||
val cohort_name | ||
path ref_fasta | ||
path ref_index | ||
path ref_dict | ||
|
||
output: | ||
path "${cohort_name}.joint.vcf" , emit: vcf | ||
path "${cohort_name}.joint.vcf.idx", emit: idx | ||
|
||
script: | ||
def gvcfs_line = all_gvcfs.collect { gvcf -> "-V ${gvcf}" }.join(' ') | ||
""" | ||
gatk GenomicsDBImport \ | ||
${gvcfs_line} \ | ||
-L ${interval_list} \ | ||
--genomicsdb-workspace-path ${cohort_name}_gdb | ||
gatk GenotypeGVCFs \ | ||
-R ${ref_fasta} \ | ||
-V gendb://${cohort_name}_gdb \ | ||
-L ${interval_list} \ | ||
-O ${cohort_name}.joint.vcf | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Generate MultiQC report | ||
*/ | ||
process MULTIQC { | ||
|
||
container 'community.wave.seqera.io/library/multiqc:1.24.1--789bc3917c8666da' | ||
conda "bioconda::multiqc=1.24.1" | ||
|
||
publishDir "$params.outdir", mode: 'copy' | ||
|
||
input: | ||
path input_files | ||
val cohort_name | ||
|
||
output: | ||
path "${cohort_name}_multiqc_report.html", emit: report | ||
|
||
script: | ||
""" | ||
multiqc \\ | ||
--force \\ | ||
-o . \\ | ||
-n ${cohort_name}_multiqc_report.html \\ | ||
--clean-up \\ | ||
${input_files} | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Generate BAM index file | ||
*/ | ||
process SAMTOOLS_INDEX { | ||
|
||
container 'community.wave.seqera.io/library/samtools:1.20--b5dfbd93de237464' | ||
conda "bioconda::samtools=1.20" | ||
|
||
publishDir '${params.outdir}', mode: 'symlink' | ||
|
||
input: | ||
path input_bam | ||
|
||
output: | ||
tuple path(input_bam), path("${input_bam}.bai"), emit: bam_bai | ||
|
||
script: | ||
""" | ||
samtools index '$input_bam' | ||
""" | ||
} |
Oops, something went wrong.