BD2KGenomics / cgl-docker-lib

21 stars 20 forks source link

rnaseq-cgl container does not recognize input #189

Closed Jeltje closed 7 years ago

Jeltje commented 8 years ago

Testing quay.io/ucsc_cgl/rnaseq-cgl-pipeline:2.0.8--1.9.1--513d7eff782c6cffcfb0332ec80dcfa0e6e5a93d on Docker version 1.9.1

My workdir contains all necessary input files

docker run \
    -v $(pwd):$(pwd) \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/ucsc_cgl/rnaseq-cgl-pipeline:2.0.8--1.9.1--513d7eff782c6cffcfb0332ec80dcfa0e6e5a93d \
    --star starIndex_hg38_no_alt.tar.gz \
    --kallisto kallisto_hg38.idx \
    --rsem rsem_ref_hg38_no_alt.tar.gz \
    --samples C021_0006_T_WES.tar

First off, note that the readme at https://github.com/BD2KGenomics/cgl-docker-lib/tree/master/rnaseq-cgl-pipeline is incorrect: the program needs the --rsem, --kallisto, and --star flags to run (the readme says the files should be found automatically in the workdir)

Error:

INFO:root:
Sample given as relative path, assuming sample is in work directory: /mnt/data/cgl_testinput
Traceback (most recent call last):
  File "/opt/rnaseq-pipeline/wrapper.py", line 179, in <module>
    main()
  File "/opt/rnaseq-pipeline/wrapper.py", line 170, in main
    "e.g. '/full/path/to/sample1.tar'. You provided %s", str(args.samples))
  File "/usr/local/lib/python2.7/dist-packages/bd2k/util/exceptions.py", line 81, in require
    raise RequirementError( message)
bd2k.util.exceptions.RequirementError: Sample inputs must point to a file's full path, e.g. '/full/path/to/sample1.tar'. You provided [u'/mnt/data/cgl_testinput/C021_0006_T_WES.tar']

And yes, /mnt/data/cgl_testinput/C021_0006_T_WES.tar is exactly where that file is located.

I tried with a full path instead, but get the same error. What's going on?

hannes-ucsc commented 8 years ago

This looks indeed weird. @jvivian, can you quickly triage this? I feel this should be assigned to @JakeNarkizian.

jvivian commented 8 years ago

@Jeltje @hannes-ucsc The error message prints args.samples for some stupid reason, but what the line is testing is:

require(all(x.startswith('/') for x in [args.star, args.kallisto, args.rsem])

So rewrite your command like:

docker run \
    -v $(pwd):$(pwd) \
    -v /var/run/docker.sock:/var/run/docker.sock \
    quay.io/ucsc_cgl/rnaseq-cgl-pipeline:2.0.8--1.9.1--513d7eff782c6cffcfb0332ec80dcfa0e6e5a93d \
    --star $(pwd)/starIndex_hg38_no_alt.tar.gz \
    --kallisto $(pwd)/kallisto_hg38.idx \
    --rsem $(pwd)/rsem_ref_hg38_no_alt.tar.gz \
    --samples $(pwd)/C021_0006_T_WES.tar
jvivian commented 8 years ago

I'll close this ticket in a PR wrt documentation and the error message.

Jeltje commented 8 years ago

Thanks! While you're at it, also have a look at this statement in the documentation: docker pull quay.io/ucsc_cgl/rnaseq-cgl-pipeline:<supported docker version>--2.0.8

I tried this:

>docker pull quay.io/ucsc_cgl/rnaseq-cgl-pipeline:1.9.1--2.0.8
Pulling repository quay.io/ucsc_cgl/rnaseq-cgl-pipeline
Tag 1.9.1--2.0.8 not found in repository quay.io/ucsc_cgl/rnaseq-cgl-pipeline

I know the image is actually called rnaseq-cgl-pipeline:2.0.8--1.9.1--513d7eff782c6cffcfb0332ec80dcfa0e6e5a93d so I figured the versions were in the wrong order:

> docker pull quay.io/ucsc_cgl/rnaseq-cgl-pipeline:2.0.8--1.9.1
Pulling repository quay.io/ucsc_cgl/rnaseq-cgl-pipeline
Tag 2.0.8--1.9.1 not found in repository quay.io/ucsc_cgl/rnaseq-cgl-pipeline

So it doesn't autocomplete.

Jeltje commented 8 years ago

Also, once you docker pull a specific version, you must call it by its full name. If you do docker run quay.io/ucsc_cgl/rnaseq-cgl-pipeline it will start downloading quay.io/ucsc_cgl/rnaseq-cgl-pipeline:latest

hannes-ucsc commented 8 years ago

it will start downloading quay.io/ucsc_cgl/rnaseq-cgl-pipeline:latest

@jvivian, didn't we agree that there shouldn't be a latest tag for these pipeline containers?