Unverified Commit 2d04addf authored by Cedrick Agaser's avatar Cedrick Agaser Committed by GitHub
Browse files

Merge pull request #272 from biowdl/UmiTools_addTmpDir

Umi tools add tmp dir
parents 2b158fa8 051ac6aa
......@@ -10,6 +10,7 @@ that users understand how the changes affect the new version.
version 5.0.0-dev
---------------------------
+ UMI-tools (dedup): Add tempdir
+ Update BCFTOOLS view: add options for filtering (include, exclude, excludeUncalled).
+ Duphold: add duphold.wdl.
+ Add new wdl file prepareShiny.wdl for creating input files for shiny app.
......
......@@ -78,6 +78,8 @@ task Dedup {
File inputBam
File inputBamIndex
String outputBamPath
String tmpDir = "./umiToolsDedupTmpDir"
Boolean paired = true
String? umiSeparator
......@@ -85,27 +87,25 @@ task Dedup {
String memory = "25G"
Int timeMinutes = 30 + ceil(size(inputBam, "G") * 30)
# Use a multi-package-container which includes umi_tools (0.5.5) and samtools (1.9).
String dockerImage = "quay.io/biocontainers/mulled-v2-509311a44630c01d9cb7d2ac5727725f51ea43af:6089936aca6219b5bb5f54210ac5eb456c7503f2-0"
String dockerImage = "quay.io/biocontainers/umi_tools:1.1.1--py38h0213d0e_1"
}
String outputBamIndex = sub(outputBamPath, "\.bam$", ".bai")
command {
set -e
mkdir -p "$(dirname ~{outputBamPath})"
mkdir -p "$(dirname ~{outputBamPath})" "~{tmpDir}"
umi_tools dedup \
--stdin ~{inputBam} \
--stdout ~{outputBamPath} \
--stdin=~{inputBam} \
--stdout=~{outputBamPath} \
~{"--output-stats " + statsPrefix} \
~{"--umi-separator=" + umiSeparator} \
~{true="--paired" false="" paired}
samtools index ~{outputBamPath} ~{outputBamIndex}
~{true="--paired" false="" paired} \
--temp-dir=~{tmpDir}
}
output {
File deduppedBam = outputBamPath
File deduppedBamIndex = outputBamIndex
File? editDistance = "~{statsPrefix}_edit_distance.tsv"
File? umiStats = "~{statsPrefix}_per_umi.tsv"
File? positionStats = "~{statsPrefix}_per_umi_per_position.tsv"
......@@ -122,6 +122,7 @@ task Dedup {
inputBam: {description: "The input BAM file.", categrory: "required"}
inputBamIndex: {description: "The index for the ipnut BAM file.", cateogry: "required"}
outputBamPath: {description: "The location to write the output BAM file to.", category: "required"}
tmpDir: {description: "Temporary directory.", category: "advanced"}
paired: {description: "Whether or not the data is paired.", category: "common"}
umiSeparator: {description: "Seperator used for UMIs in the read names.", category: "advanced"}
statsPrefix: {description: "The prefix for the stats files.", category: "advanced"}
......@@ -131,7 +132,6 @@ task Dedup {
# outputs
deduppedBam: {description: "Deduplicated BAM file."}
deduppedBamIndex: {description: "Index of the deduplicated BAM file."}
editDistance: {description: "Report of the (binned) average edit distance between the UMIs at each position."}
umiStats: {description: "UMI-level summary statistics."}
positionStats: {description: "The counts for unique combinations of UMI and position."}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment