Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to run HaplotypeCaller without dbsnp #182

Merged
merged 1 commit into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Piellorieppe is one of the main massif in the Sarek National Park.
- [#176](https://github.com/nf-core/sarek/pull/176) - Add empty `custom` genome in `genomes.config` to allow genomes that are not in `AWS iGenomes`
- [#179](https://github.com/nf-core/sarek/pull/179) - Add `FreeBayes` germline variant calling
- [#180](https://github.com/nf-core/sarek/pull/180) - Now saving Mapped Bams (and creating TSV) in minimal setting
- [#182](https://github.com/nf-core/sarek/pull/182) - Add possibility to run `HaplotypeCaller` without `dbsnp` so it can be used to actually generate vcfs to build a set of known sites (cf [gatkforums](https://gatkforums.broadinstitute.org/gatk/discussion/1247/what-should-i-use-as-known-variants-sites-for-running-tool-x))

### Changed - [2.6dev]

Expand Down
8 changes: 5 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ process IndexBamFile {

tag {idPatient + "-" + idSample}

publishDir "${params.outdir}/Preprocessing/${idSample}/Mapped/${it}", mode: params.publish_dir_mode
publishDir "${params.outdir}/Preprocessing/${idSample}/Mapped", mode: params.publish_dir_mode

input:
set idPatient, idSample, file(bam) from bam_mapped_merged_to_index
Expand Down Expand Up @@ -1819,13 +1819,14 @@ process HaplotypeCaller {

script:
intervalsOptions = params.no_intervals ? "" : "-L ${intervalBed}"
dbsnpOptions = params.dbsnp ? "--D ${dbsnp}" : ""
"""
gatk --java-options "-Xmx${task.memory.toGiga()}g -Xms6000m -XX:GCTimeLimit=50 -XX:GCHeapFreeLimit=10" \
HaplotypeCaller \
-R ${fasta} \
-I ${bam} \
${intervalsOptions} \
-D ${dbsnp} \
${dbsnpOptions} \
-O ${intervalBed.baseName}_${idSample}.g.vcf \
-ERC GVCF
"""
Expand Down Expand Up @@ -1857,6 +1858,7 @@ process GenotypeGVCFs {
script:
// Using -L is important for speed and we have to index the interval files also
intervalsOptions = params.no_intervals ? "" : "-L ${intervalBed}"
dbsnpOptions = params.dbsnp ? "--D ${dbsnp}" : ""
"""
gatk --java-options -Xmx${task.memory.toGiga()}g \
IndexFeatureFile \
Expand All @@ -1866,7 +1868,7 @@ process GenotypeGVCFs {
GenotypeGVCFs \
-R ${fasta} \
${intervalsOptions} \
-D ${dbsnp} \
${dbsnpOptions} \
-V ${gvcf} \
-O ${intervalBed.baseName}_${idSample}.vcf
"""
Expand Down