GenomiqueENS / toulligQC

A post sequencing QC tool for Oxford Nanopore sequencers
Other
82 stars 7 forks source link

docker run cannot open files #2

Closed emdyess closed 5 years ago

emdyess commented 6 years ago

Hi,

I am having a problem running toulligQC. It can't seem to find the files it needs even though I am using absolute paths and I allow read/write permissions for everything. I am using docker since I couldn't get the standard install to work. I am on Ubuntu 16.04.

I pulled the image as in the instructions, and I also tried building it with docker build. I get the same error either way. I tried with my own data and with the test data that is downloaded.

If I modify the config file and run the test data:

sudo docker run genomicpariscentre/toulligqc -c /tools/toulligQC/test_data/config.txt -n /tools/toulligQC/test_data/091817_test -b

Traceback (most recent call last):
  File "/usr/local/bin/toulligqc", line 11, in <module>
    load_entry_point('toulligqc===-0.1a1-', 'console_scripts', 'toulligqc')()
  File "/usr/local/lib/python3.5/dist-packages/toulligqc-_0.1a1_-py3.5.egg/toulligqc/toulligqc.py", line 228, in main
    parse_args(config_dictionary)
  File "/usr/local/lib/python3.5/dist-packages/toulligqc-_0.1a1_-py3.5.egg/toulligqc/toulligqc.py", line 87, in parse_args
    config_dictionary.load(conf_file)
  File "/usr/local/lib/python3.5/dist-packages/toulligqc-_0.1a1_-py3.5.egg/toulligqc/toulligqc_conf.py", line 78, in load
    with open(conf_path, 'r') as config_file:
FileNotFoundError: [Errno 2] No such file or directory: '/tools/toulligQC/test_data/config.txt'

Running without the config file but with the individual files and the built docker image:

sudo docker run 8b035f9a408a -n test_individual_files -f /tools/toulligQC/test_data/dnacpc14_20170328_FNFAF04250_MN17734_mux_scan_1D_validation_test1_45344_ch282_read40_strand.fast5 -a /tools/toulligQC/test_data/sequencing_summary/sequencing_summary.txt -q /tools/toulligQC/test_data/fastq/20170328_FAF04250/20170328_FAF04250_barcode01.fastq -o /tools/toulligQC/test_data -s /tools/toulligQC/test_data/samplesheet.csv -b

Traceback (most recent call last):
  File "/usr/local/bin/toulligqc", line 11, in <module>
    load_entry_point('toulligqc===-0.1a1-', 'console_scripts', 'toulligqc')()
  File "/usr/local/lib/python3.5/dist-packages/toulligqc-_0.1a1_-py3.5.egg/toulligqc/toulligqc.py", line 237, in main
    barcode_selection = get_barcode(sample_sheet_file)
  File "/usr/local/lib/python3.5/dist-packages/toulligqc-_0.1a1_-py3.5.egg/toulligqc/toulligqc.py", line 174, in get_barcode
    with open(barcode_file) as csvfile:
FileNotFoundError: [Errno 2] No such file or directory: '/tools/toulligQC/test_data/samplesheet.csv

` Any help would be great. Thanks!

jourdren commented 6 years ago

Hi emdyess,

You did not mount your local directories in the Docker container using the -v option. So ToulligQC could not access to your data. With the following command you will be able to launch Toullig on your data:

$ sudo docker --rm \
            -v /tools/toulligQC/test_data:/tools/toulligQC/test_data \
            -u $(id -u):$(id -g) \
            run genomicpariscentre/toulligqc:latest \
                  -n test_individual_files \
                  -f /tools/toulligQC/test_data/dnacpc14_20170328_FNFAF04250_MN17734_mux_scan_1D_validation_test1_45344_ch282_read40_strand.fast5 \
                  -a /tools/toulligQC/test_data/sequencing_summary/sequencing_summary.txt \
                  -q /tools/toulligQC/test_data/fastq/20170328_FAF04250/20170328_FAF04250_barcode01.fastq \
                  -o /tools/toulligQC/test_data \
                  -s /tools/toulligQC/test_data/samplesheet.csv \
                  -b

Laurent.

PS: To use the latest version of ToulligQC execute the following command to retrieve latest ToulligQC Docker image:

$ sudo docker fetch genomicpariscentre/toulligqc:latest