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

Merge pull request #133 from biowdl/BIOWDL-302

Simplify cutadapt.
parents 2bb092c9 5badadc6
No related branches found
No related tags found
No related merge requests found
language: java
# We use conda to install cromwell.
language: python
python:
- 3.6
before_install:
# Install conda
- export MINICONDA=${HOME}/miniconda
- export PATH=${MINICONDA}/bin:${PATH}
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -f -p ${MINICONDA}
- conda config --set always_yes yes
- conda config --add channels defaults
- conda config --add channels bioconda
- conda config --add channels conda-forge
install:
- conda install cromwell
script:
- set -e
- export CROMWELL_VERSION=35
- wget https://github.com/broadinstitute/cromwell/releases/download/$CROMWELL_VERSION/womtool-$CROMWELL_VERSION.jar
- for F in `find -name "*.wdl"`; do echo $F; java -jar womtool-*.jar validate $F; done
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git submodule foreach --recursive git checkout $TRAVIS_BRANCH && git submodule foreach --recursive git pull; fi'
- "git diff --exit-code || (echo ERROR: Git changes detected. Please update submodules && exit 1)"
- set -e
- for FILE in $(find -name "*.wdl"); do echo $FILE; womtool validate $FILE; done
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git submodule foreach git checkout develop && git submodule foreach git pull; fi'
- "git diff --exit-code || (echo ERROR: Git changes detected. Please update submodules && exit 1)"
......@@ -11,6 +11,7 @@ that users understand how the changes affect the new version.
version 1.0.0-dev
---------------------------
+ Cutadapt: simplify interface
+ Bigger memory multiplier in mutect to take in account bigger vmem usage
+ Cutadapt: Remove default adapter
+ Fastqsplitter: use version 1.1.
......
......@@ -7,15 +7,12 @@ task Cutadapt {
String read1output = "cut_r1.fq.gz"
String? read2output
String? format
Array[String]+? adapter
Array[String]+? front
Array[String]+? anywhere
Array[String]+? adapterRead2
Array[String]+? frontRead2
Array[String]+? anywhereRead2
Array[String]+? adapterBoth
# contaminations = anywhereBoth
Array[String]+? contaminations
Array[String] adapter = []
Array[String] front = []
Array[String] anywhere = []
Array[String] adapterRead2 = []
Array[String] frontRead2 = []
Array[String] anywhereRead2 = []
Boolean? interleaved
String? pairFilter
Float? errorRate
......@@ -73,25 +70,7 @@ task Cutadapt {
then "mkdir -p $(dirname " + realRead2output + ")"
else ""
# FIXME: This crappy overengineering can be removed once cromwell can handle subworkflow inputs correctly.
# Some WDL magic here to set both adapters with one setting.
# If then else's are needed to keep the variable optional and undefined
Array[String]+? adapterForward = if (defined(adapter) || defined(adapterBoth))
then select_first([adapter, adapterBoth])
else adapter
# Check if read2 is defined before applying adapters.
Array[String]+? adapterReverse = if (defined(read2) && (defined(adapterRead2) || defined(adapterBoth)))
then select_first([adapterRead2, adapterBoth])
else adapterRead2
# Same for contaminations
Array[String]+? anywhereForward = if (defined(anywhere) || defined(contaminations))
then select_first([anywhere, contaminations])
else anywhere
Array[String]+? anywhereReverse = if (defined(read2) && (defined(anywhereRead2) || defined(contaminations)))
then select_first([anywhereRead2, contaminations])
else anywhereRead2
# FIXME: Use prefix() function for adapter, adapterRead2, etc.
command {
set -e
~{"mkdir -p $(dirname " + read1output + ")"}
......@@ -99,12 +78,12 @@ task Cutadapt {
cutadapt \
~{"--cores=" + cores} \
~{true="-Z" false="" Z} \
~{true="-a" false="" defined(adapterForward)} ~{sep=" -a " adapterForward} \
~{true="-A" false="" defined(adapterReverse)} ~{sep=" -A " adapterReverse} \
~{true="-g" false="" defined(front)} ~{sep=" -g " front} \
~{true="-G" false="" defined(frontRead2)} ~{sep=" -G " frontRead2} \
~{true="-b" false="" defined(anywhereForward)} ~{sep=" -b " anywhereForward} \
~{true="-B" false="" defined(anywhereReverse)} ~{sep=" -B " anywhereReverse} \
~{true="-a" false="" length(adapter) > 0} ~{sep=" -a " adapter} \
~{true="-A" false="" length(adapterRead2) > 0} ~{sep=" -A " adapterRead2} \
~{true="-g" false="" length(front) > 0} ~{sep=" -g " front} \
~{true="-G" false="" length(frontRead2) > 0} ~{sep=" -G " frontRead2} \
~{true="-b" false="" length(anywhere) > 0} ~{sep=" -b " anywhere} \
~{true="-B" false="" length(anywhereRead2) > 0} ~{sep=" -B " anywhereRead2} \
--output ~{read1output} ~{if defined(read2) then "-p " + realRead2output else ""} \
~{"--to-short-output " + tooShortOutputPath} \
~{"--to-short-paired-output " + tooShortPairedOutputPath} \
......
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