-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from genepi/features/parallelize-variant-calling
Features/parallelize variant calling
- Loading branch information
Showing
5 changed files
with
44 additions
and
11 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 |
---|---|---|
@@ -1,36 +1,36 @@ | ||
process CALL_VARIANTS_MUTSERVE { | ||
|
||
publishDir "${params.outdir}/mutserve", mode: "copy" | ||
//publishDir "${params.outdir}/mutserve", mode: "copy" | ||
|
||
input: | ||
path bamFiles | ||
path bam_file | ||
path ref_fasta | ||
val(contig) | ||
|
||
output: | ||
path "${params.project}.txt", emit: variants_ch | ||
path "${params.project}_raw.txt", emit: variants_raw_ch | ||
path "${bam_file.simpleName}.txt", emit: variants_ch | ||
path "${bam_file.simpleName}_raw.txt", emit: variants_raw_ch | ||
|
||
script: | ||
def avail_mem = 1024 | ||
if (!task.memory) { | ||
log.info 'Available memory not known - defaulting to 1GB. Specify process memory requirements to change this.' | ||
//log.info 'Available memory not known - defaulting to 1GB. Specify process memory requirements to change this.' | ||
} else { | ||
avail_mem = (task.memory.mega*0.8).intValue() | ||
} | ||
|
||
""" | ||
java -Xmx${avail_mem}M -jar /opt/mutserve/mutserve.jar \ | ||
call \ | ||
--output ${params.project}.vcf \ | ||
--write-raw --reference ${ref_fasta} \ | ||
--output ${bam_file.simpleName}.txt \ | ||
--write-raw \ | ||
--reference ${ref_fasta} \ | ||
--level ${params.mutserve_detection_limit} \ | ||
--deletions \ | ||
--baseQ ${params.mutserve_baseQ} \ | ||
--mapQ ${params.mutserve_mapQ} \ | ||
--alignQ ${params.mutserve_alignQ} \ | ||
--contig-name ${contig} \ | ||
--threads ${task.cpus} \ | ||
--no-ansi \$PWD | ||
""" | ||
} |
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,27 @@ | ||
process MERGE_VARIANTS_MUTSERVE { | ||
|
||
publishDir "${params.outdir}/variant_calling", mode: "copy" | ||
|
||
input: | ||
path variants | ||
path variants_raw | ||
|
||
output: | ||
path "${params.project}.txt.gz" | ||
path "${params.project}_raw.txt.gz" | ||
""" | ||
java -jar /opt/genomic-utils.jar csv-concat \ | ||
--separator '\t' \ | ||
--output-sep '\t' \ | ||
--gz \ | ||
--output ${params.project}.txt.gz \ | ||
${variants} | ||
java -jar /opt/genomic-utils.jar csv-concat \ | ||
--separator '\t' \ | ||
--output-sep '\t' \ | ||
--gz \ | ||
--output ${params.project}_raw.txt.gz \ | ||
${variants_raw} | ||
""" | ||
} |
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