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

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

parents 1a455271 18890859
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,8 @@ that users understand how the changes affect the new version.
version 1.1.0-dev
---------------------------
+ Use the biowdl-input-converter container for JsonToYaml, to reduce the amount of containers needed.
+ Add biowdl-input-converter and remove SampleConfigToSampleReadgroupLists which it replaces.
+ GATK.GenotypeGVCFs: Increased memoryMultiplier from 2.0 to 3.0
+ Minimap2: Add -k option to minimap2 mapping
+ Added bwakit task
......
version 1.0
# Copyright (c) 2018 Leiden University Medical Center
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
task InputConverter {
input {
File samplesheet
String outputFile = "samplesheet.json"
# File checking only works when:
# 1. Paths are absolute
# 2. When containers have the directory with the files mounted.
# Therefore this functionality does not work well with cromwell.
Boolean skipFileCheck=true
Boolean checkFileMd5sums=false
Boolean old=false
String dockerImage = "quay.io/biocontainers/biowdl-input-converter:0.1.0--py_0"
}
command <<<
biowdl-input-converter \
-o ~{outputFile} \
~{true="--skip-file-check" false="" skipFileCheck} \
~{true="--check-file-md5sums" false="" checkFileMd5sums} \
~{true="--old" false="" old} \
~{samplesheet}
>>>
output {
File json = outputFile
}
runtime {
docker: dockerImage
}
}
......@@ -134,47 +134,6 @@ task MapMd5 {
}
}
task SampleConfigToSampleReadgroupLists {
input {
File yaml
String outputJson = "samples.json"
String dockerImage = "biowdl/pyyaml:3.13-py37-slim"
}
command <<<
set -e
mkdir -p $(dirname ~{outputJson})
python <<CODE
import json
import yaml
with open("~{yaml}", "r") as input_yaml:
sample_config = yaml.load(input_yaml)
sample_rg_lists = []
for sample in sample_config["samples"]:
new_sample = {"readgroups": [], "id": sample['id']}
for library in sample["libraries"]:
for readgroup in library["readgroups"]:
new_readgroup = {'lib_id': library['id'], 'id': readgroup['id']}
# Having a nested "reads" struct does not make any sense.
new_readgroup.update(readgroup["reads"])
new_sample['readgroups'].append(new_readgroup)
sample_rg_lists.append(new_sample)
sample_mod_config = {"samples": sample_rg_lists}
with open("~{outputJson}", "w") as output_json:
json.dump(sample_mod_config, output_json)
CODE
>>>
output {
File json = outputJson
}
runtime {
docker: dockerImage
}
}
task StringArrayMd5 {
input {
......@@ -202,7 +161,8 @@ task YamlToJson {
input {
File yaml
String outputJson = basename(yaml, "\.ya?ml$") + ".json"
String dockerImage = "biowdl/pyyaml:3.13-py37-slim"
# biowdl-input-converter has python and pyyaml.
String dockerImage = "quay.io/biocontainers/biowdl-input-converter:0.1.0--py_0"
}
command {
set -e
......
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