Skip to content
Snippets Groups Projects
Unverified Commit a56d2f18 authored by Ruben Vorderman's avatar Ruben Vorderman Committed by GitHub
Browse files

Merge pull request #295 from biowdl/BIOWDL-576

Add sample position in array task, update parameter_meta for macs2.
parents 933e473d 019cbb96
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,11 @@ 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
......
......@@ -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"}
}
}
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