Comments (8)
What about https://quay.io/repository/biocontainers/transrate-tools?tab=tags ?
from workflow-is-cwl.
Thank you for your valuable help @mr-c.
We finally managed to create a new Docker image with a fixed PATH to transrate binary and with a complete help documentation on how to run the docker container on local data. See: https://hub.docker.com/r/arnaudmeng/transrate/
However, we still have issue to run the docker container inside CWL. It seems that it is due to the Transrate program that needs to create a new directory where to ouput results.
Runnning the Docker image outside CWL works fine:
docker run -v /home/vagrant/vagrant_sync:/mnt -i -t arnaudmeng/transrate:1.0.3 /bin/bash -c "transrate --assembly=/mnt/Trinity_Assembled_Transcripts_sub.fasta --left=/mnt/A1_left_sub.fq --right=/mnt/A1_right_sub.fq"
[ INFO] 2018-08-28 09:36:32 : Loading assembly: /mnt/Trinity_Assembled_Transcripts_sub.fasta
[ INFO] 2018-08-28 09:36:32 : Analysing assembly: /mnt/Trinity_Assembled_Transcripts_sub.fasta
[ INFO] 2018-08-28 09:36:32 : Results will be saved in /usr/bin/transrate_results/Trinity_Assembled_Transcripts_sub
[ INFO] 2018-08-28 09:36:32 : Calculating contig metrics...
[ INFO] 2018-08-28 09:36:32 : Contig metrics:
[ INFO] 2018-08-28 09:36:32 : -----------------------------------
[ INFO] 2018-08-28 09:36:32 : n seqs 10
[ INFO] 2018-08-28 09:36:32 : smallest 223
[ INFO] 2018-08-28 09:36:32 : largest 3838
[ INFO] 2018-08-28 09:36:32 : n bases 12153
[ INFO] 2018-08-28 09:36:32 : mean len 1215.3
[ INFO] 2018-08-28 09:36:32 : n under 200 0
[ INFO] 2018-08-28 09:36:32 : n over 1k 4
[ INFO] 2018-08-28 09:36:32 : n over 10k 0
[ INFO] 2018-08-28 09:36:32 : n with orf 2
[ INFO] 2018-08-28 09:36:32 : mean orf percent 33.99
[ INFO] 2018-08-28 09:36:32 : n90 416
[ INFO] 2018-08-28 09:36:32 : n70 1122
[ INFO] 2018-08-28 09:36:32 : n50 3838
[ INFO] 2018-08-28 09:36:32 : n30 3838
[ INFO] 2018-08-28 09:36:32 : n10 3838
[ INFO] 2018-08-28 09:36:32 : gc 0.44
[ INFO] 2018-08-28 09:36:32 : bases n 0
[ INFO] 2018-08-28 09:36:32 : proportion n 0.0
[ INFO] 2018-08-28 09:36:32 : Contig metrics done in 0 seconds
[ INFO] 2018-08-28 09:36:32 : Calculating read diagnostics...
[ INFO] 2018-08-28 09:36:34 : Read mapping metrics:
[ INFO] 2018-08-28 09:36:34 : -----------------------------------
[ INFO] 2018-08-28 09:36:34 : fragments 1000
[ INFO] 2018-08-28 09:36:34 : fragments mapped 11
[ INFO] 2018-08-28 09:36:34 : p fragments mapped 0.01
[ INFO] 2018-08-28 09:36:34 : good mappings 10
[ INFO] 2018-08-28 09:36:34 : p good mapping 0.01
[ INFO] 2018-08-28 09:36:34 : bad mappings 1
[ INFO] 2018-08-28 09:36:34 : potential bridges 0
[ INFO] 2018-08-28 09:36:34 : bases uncovered 10658
[ INFO] 2018-08-28 09:36:34 : p bases uncovered 0.88
[ INFO] 2018-08-28 09:36:34 : contigs uncovbase 10
[ INFO] 2018-08-28 09:36:34 : p contigs uncovbase 1.0
[ INFO] 2018-08-28 09:36:34 : contigs uncovered 10
[ INFO] 2018-08-28 09:36:34 : p contigs uncovered 1.0
[ INFO] 2018-08-28 09:36:34 : contigs lowcovered 10
[ INFO] 2018-08-28 09:36:34 : p contigs lowcovered 1.0
[ INFO] 2018-08-28 09:36:34 : contigs segmented 0
[ INFO] 2018-08-28 09:36:34 : p contigs segmented 0.0
[ INFO] 2018-08-28 09:36:34 : Read metrics done in 2 seconds
[ INFO] 2018-08-28 09:36:34 : No reference provided, skipping comparative diagnostics
[ INFO] 2018-08-28 09:36:34 : TRANSRATE ASSEMBLY SCORE 0.0002
[ INFO] 2018-08-28 09:36:34 : -----------------------------------
[ INFO] 2018-08-28 09:36:34 : TRANSRATE OPTIMAL SCORE 0.0056
[ INFO] 2018-08-28 09:36:34 : TRANSRATE OPTIMAL CUTOFF 0.01
[ INFO] 2018-08-28 09:36:34 : good contigs 10
[ INFO] 2018-08-28 09:36:34 : p good contigs 1.0
[ INFO] 2018-08-28 09:36:34 : Writing contig metrics for each contig to /usr/bin/transrate_results/Trinity_Assembled_Transcripts_sub/contigs.csv
[ INFO] 2018-08-28 09:36:34 : Writing analysis results to assemblies.csv
But using the CWL tool that we defined:
cwl-runner Transrate-V1.0.2.cwl Transrate-V1.0.2.test.job.yaml
/home/vagrant/miniconda3/bin/cwl-runner 1.0.20180820141117
Resolved 'Transrate-V1.0.2.cwl' to 'file:///home/vagrant/vagrant_sync/Transrate-V1.0.2.cwl'
[job Transrate-V1.0.2.cwl] /tmp/tmpil71sp_k$ docker \
run \
-i \
--volume=/tmp/tmpil71sp_k:/var/spool/cwl:rw \
--volume=/tmp/tmpzef4jcbx:/tmp:rw \
--volume=/home/vagrant/vagrant_sync/Trinity_Assembled_Transcripts_sub.fasta:/var/lib/cwl/stg97c08c51-4b3e-4412-959d-6dc51c921ad8/Trinity_Assembled_Transcripts_sub.fasta:ro \
--volume=/home/vagrant/vagrant_sync/A1_left_sub.fq:/var/lib/cwl/stg8c860e12-8ff9-4be9-9966-c95824459c34/A1_left_sub.fq:ro \
--volume=/home/vagrant/vagrant_sync/A1_right_sub.fq:/var/lib/cwl/stg9a2be9e8-c48e-4ecb-b2e7-d04c58fadc9a/A1_right_sub.fq:ro \
--workdir=/var/spool/cwl \
--read-only=true \
--user=1000:1000 \
--rm \
--env=TMPDIR=/tmp \
--env=HOME=/var/spool/cwl \
arnaudmeng/transrate:1.0.3 \
transrate \
--output=/home/vagrant/vagrant_sync/ \
--assembly= \
/var/lib/cwl/stg97c08c51-4b3e-4412-959d-6dc51c921ad8/Trinity_Assembled_Transcripts_sub.fasta \
--left= \
/var/lib/cwl/stg8c860e12-8ff9-4be9-9966-c95824459c34/A1_left_sub.fq \
--right= \
/var/lib/cwl/stg9a2be9e8-c48e-4ecb-b2e7-d04c58fadc9a/A1_right_sub.fq \
--threads=4
/usr/bin/transrate-1.0.3-linux-x86_64/lib/app/lib/transrate/cmdline.rb:463:in `block in common_directory_path': undefined method `split' for nil:NilClass (NoMethodError)
from /usr/bin/transrate-1.0.3-linux-x86_64/lib/app/lib/transrate/cmdline.rb:463:in `map'
from /usr/bin/transrate-1.0.3-linux-x86_64/lib/app/lib/transrate/cmdline.rb:463:in `common_directory_path'
from /usr/bin/transrate-1.0.3-linux-x86_64/lib/app/lib/transrate/cmdline.rb:451:in `assembly_result_paths'
from /usr/bin/transrate-1.0.3-linux-x86_64/lib/app/lib/transrate/cmdline.rb:25:in `run'
from /usr/bin/transrate-1.0.3-linux-x86_64/lib/app/bin/transrate:23:in `<main>'
[job Transrate-V1.0.2.cwl] completed permanentFail
{
"evaluation_dir": {
"location": "file:///home/vagrant/vagrant_sync/tmpil71sp_k",
"basename": "tmpil71sp_k",
"class": "Directory",
"listing": [],
"path": "/home/vagrant/vagrant_sync/tmpil71sp_k"
}
}
Final process status is permanentFail
We need to fix it in order to complete the tool definition for Transrate. Transrate is supposed to create an output directory for which we define a ouput directory path (here --output=/home/vagrant/vagrant_sync/
). The default output path is located where Transrate is installed which is a behaviour that we want to avoid.
So here, is there a way to map/match the output path for Docker container : CWL : local host ?
from workflow-is-cwl.
@arnaudmeng /home/vagrant/vagrant_sync/
is a path outside the container, but you're passing it to a tool inside the container.
I'd move https://github.com/mscheremetjew/workflow-is-cwl/blob/3bd402dbcb73c5e3b6d9c210e8c2b66e527f87ee/tools/Transrate/Transrate-V1.0.2.cwl#L41 into the arguments
section and set the value to $(runtime.outdir)
from workflow-is-cwl.
Likewise in this CWL description and the others,
- id: n_threads
type: int?
inputBinding:
position: 4
prefix: '--threads='
separate: false
should become
arguments:
- prefix: --threads=
valueFrom: $(runtime.cores)
separate: false
from workflow-is-cwl.
@mr-c Good spot. Thanks for the advise.
from workflow-is-cwl.
@arnaudmeng Many Thanks for the new Docker image. Just tested it and it works fine.
from workflow-is-cwl.
CWL tools description of Transrate update, new Docker container added and successfully tested in Rabix Composer.
from workflow-is-cwl.
Works now. Many Thanks @mr-c and @arnaudmeng
from workflow-is-cwl.
Related Issues (15)
- BUSCO: Docker container doesn't write any results onto the local file system! HOT 3
- InterProScan: Still don;t have a working version of a container HOT 1
- BUSCO: Backslash char is not supported in FASTA header - Add FASTA header cleaning step HOT 1
- Select, test and review Trimmomatic container HOT 3
- Test and review Trinity container
- FastQC: Create Docker container for version 0.11.7 HOT 2
- Validating the complete assembly workflow HOT 2
- cwlexec: InterProScan5 result file is not mapped to the output binding
- Trinity: Add test inputs and expected outputs HOT 4
- Trinity: Set up integration test
- Trimmomatic: Add test inputs and expected outputs HOT 1
- Trimmomatic: Added Docker requirement and test the container HOT 1
- Transrate: Command line tool version with local installation is not working using cwl-runner HOT 1
- Transrate: Add test inputs and expected outputs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workflow-is-cwl.