Skip to content
Snippets Groups Projects
Commit 73932097 authored by Cats's avatar Cats
Browse files

Merge remote-tracking branch 'origin/develop' into sage

parents 89a0324a a56d2f18
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,18 @@ Newest changes should be on top.
This document is user facing. Please word the changes in such a way
that users understand how the changes affect the new version.
-->
version 5.1.0-dev
---------------------------
+ Update parameter_meta for macs2
+ Add sample position in array task.
version 5.0.2
---------------------------
+ bumped ScatterRegions container to 1.0.0
version 5.0.1
---------------------------
+ Smoove: enable genotyping
+ add runtime memory to number of tasks.
version 5.0.0
......
......@@ -55,7 +55,7 @@ task Annotate {
Boolean compressed = basename(outputPath) != basename(outputPath, ".gz")
command {
set -e
set -e
mkdir -p "$(dirname ~{outputPath})"
bcftools annotate \
-o ~{outputPath} \
......@@ -209,7 +209,7 @@ task Sort {
File outputVcf = outputPath
File? outputVcfIndex = outputPath + ".tbi"
}
runtime {
memory: memory
time_minutes: timeMinutes
......
......@@ -86,7 +86,7 @@ task ScatterRegions {
String memory = "256M"
Int timeMinutes = 2
String dockerImage = "quay.io/biocontainers/chunked-scatter:0.2.0--py_0"
String dockerImage = "quay.io/biocontainers/chunked-scatter:1.0.0--py_0"
}
String finalSize = if defined(scatterSize) then "~{scatterSize}" else "~{scatterSizeMillions}000000"
......
......@@ -148,6 +148,44 @@ task CreateLink {
}
}
task GetSamplePositionInArray {
input {
Array[String] sampleIds
String sample
# python:3.7-slim's sha256 digest. This image is based on debian buster.
String dockerImage = "python@sha256:e0f6a4df17d5707637fa3557ab266f44dddc46ebfc82b0f1dbe725103961da4e"
}
command <<<
python <<CODE
samples = ['~{sep="','" sampleIds}']
print(samples.index('~{sample}'))
CODE
>>>
output {
Int position = read_int(stdout())
}
runtime {
# 4 gigs of memory to be able to build the docker image in singularity.
memory: "4G"
docker: dockerImage
timeMinutes: 5
}
parameter_meta {
# inputs
sampleIds: {description: "A list of sample ids.", category: "required"}
sample: {description: "The sample for which the position is wanted.", category: "required"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
# outputs
position: {description: ""}
}
}
task MapMd5 {
input {
Map[String,String] map
......
......@@ -24,13 +24,12 @@ task PeakCalling {
input {
Array[File]+ inputBams
Array[File]+ inputBamsIndex
Array[File]+? controlBams
Array[File]+? controlBamsIndex
String outDir
Array[File] controlBams
Array[File] controlBamsIndex
String outDir = "macs2"
String sampleName
Boolean nomodel = false
Int threads = 1
Int timeMinutes = 600 # Default to 10 hours
String memory = "8G"
String dockerImage = "quay.io/biocontainers/macs2:2.1.2--py27r351_0"
}
......@@ -39,7 +38,7 @@ task PeakCalling {
set -e
macs2 callpeak \
--treatment ~{sep = ' ' inputBams} \
~{true="--control" false="" defined(controlBams)} ~{sep = ' ' controlBams} \
~{true="--control" false="" length(controlBams) > 0} ~{sep = ' ' controlBams} \
--outdir ~{outDir} \
--name ~{sampleName} \
~{true='--nomodel' false='' nomodel}
......@@ -50,8 +49,22 @@ task PeakCalling {
}
runtime {
cpu: threads
cpu: 1
memory: memory
docker: dockerImage
time_minutes: timeMinutes
}
parameter_meta {
inputBams: {description: "The BAM files on which to perform peak calling.", category: "required"}
inputBamsIndex: {description: "The indexes for the input BAM files.", category: "required"}
controlBams: {description: "Control BAM files for the input bam files.", category: "common"}
controlBamsIndex: {description: "The indexes for the control BAM files.", category: "common"}
sampleName: {description: "Name of the sample to be analysed", category: "required"}
outDir: {description: "All output files will be written in this directory.", category: "advanced"}
nomodel: {description: "Whether or not to build the shifting model.", category: "advanced"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
}
}
......@@ -41,11 +41,13 @@ task Call {
--outdir ~{outputDir} \
--name ~{sample} \
--fasta ~{referenceFasta} \
--removepr \
--genotype \
~{bamFile}
}
output {
File smooveVcf = outputDir + "/" + sample + "-smoove.vcf.gz"
File smooveVcf = outputDir + "/" + sample + "-smoove.genotyped.vcf.gz"
}
runtime {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment