-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add markdup spark process to BWA-MEM2 workflow for testing * Allow for enabling/disabling use of Spark * Typo fix * Update changelog and readme * Removing indexing process, config update, readme update * Reverse Spark enabling option and update spark temp dir * Serialize the MarkDuplicatesSpark process * Add inline comments for completion signa * Update number of CPUs for markduplicatessparkt to 16 * Remove commented code, update formatting * Update completion signal name in HISAT aligner workflow * Update README to include MarkDuplicatesSpark * Update complete_signal comment * Move inline doc to module-level documentation
- Loading branch information
1 parent
17e600f
commit 958826b
Showing
13 changed files
with
137 additions
and
66 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
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
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
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
This file was deleted.
Oops, something went wrong.
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,63 @@ | ||
/* | ||
Nextflow module for marking duplicates using Spark. | ||
The containerOptions specifying user 'nobody' allow for Spark to be run without root access. | ||
The beforeScript command allows the user 'nobody' to create the output files into the working directory. | ||
Input: | ||
completion_signal: output bam from previous markduplicatesspark process to ensure | ||
only one spark process runs at a time | ||
*/ | ||
process run_MarkDuplicatesSpark_GATK { | ||
container params.docker_image_gatk | ||
containerOptions "--volume ${params.temp_dir}:/temp_dir --volume ${params.spark_temp_dir}:/spark_temp_dir -u nobody" | ||
|
||
publishDir path: "${bam_output_dir}", | ||
pattern: "*.bam{,.bai}", | ||
mode: 'copy' | ||
|
||
publishDir path: "${bam_output_dir}", | ||
pattern: "*.metrics", | ||
enabled: params.save_intermediate_files, | ||
mode: 'copy' | ||
|
||
publishDir path: "${params.log_output_dir}/${task.process.replace(':', '/')}", | ||
pattern: ".command.*", | ||
mode: "copy", | ||
saveAs: { "log${file(it).getName()}" } | ||
|
||
input: | ||
val(completion_signal) | ||
path(input_bams) | ||
val(bam_output_dir) | ||
|
||
// after marking duplicates, bams will be merged by library so the library name is not needed | ||
// just the sample name (global variable), do not pass it as a val | ||
output: | ||
path bam_output_filename, emit: bam | ||
path "*.bai", emit: bam_index | ||
path "${params.sample_name}.mark_dup.metrics" | ||
path(".command.*") | ||
|
||
beforeScript 'chmod 777 `pwd`' | ||
|
||
shell: | ||
bam_output_filename = "${params.bam_output_filename}" | ||
''' | ||
set -euo pipefail | ||
# add gatk option prefix, '--input' to each input bam | ||
declare -r INPUT=$(echo '!{input_bams}' | sed -e 's/ / --input /g' | sed '1s/^/--input /') | ||
gatk --java-options "-Djava.io.tmpdir=/temp_dir" \ | ||
MarkDuplicatesSpark \ | ||
--read-validation-stringency LENIENT \ | ||
$INPUT \ | ||
--output !{bam_output_filename} \ | ||
--metrics-file !{params.sample_name}.mark_dup.metrics \ | ||
--program-name MarkDuplicatesSpark \ | ||
--create-output-bam-index \ | ||
--conf 'spark.executor.cores=${task.cpus}' \ | ||
--conf 'spark.local.dir=/spark_temp_dir' \ | ||
--tmp-dir /temp_dir | ||
''' | ||
} |
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