3
$\begingroup$

I'm using the following script to detect strandedness of my paired end RNA-seq data.

#!/usr/bin/env bash

cd ~/Desktop/fastq

for infile in *_1.fastq
do
   base=$(basename ${infile} _1.fastq)

    docker run quay.io/biocontainers/guessmylt:0.2.5--py_0 GUESSmyLT \
    --reads ${infile} ${base}_2.fastq

done

But when I run it, it keeps giving the error:

Building DAG of jobs... File path //SRR3475890_1.fastq contains double
'/'. This is likely unintended. It can also lead to inconsistent
results of the file-matching approach used by Snakemake. File path
//SRR3475890_2.fastq contains double '/'. This is likely unintended.
It can also lead to inconsistent results of the file-matching approach
used by Snakemake. MissingInputException in line 46 of
/usr/local/lib/python3.6/site-packages/GUESSmyLT/subsample: Missing
input files for rule subsample_fastq: //SRR3475890_2.fastq
//SRR3475890_1.fastq

Why is it appending double '/' to the fastq file's path? Nowhere in my script did I mention any path.

I apologize for the very vague title, English is not my first language, so I did not know how else to phrase it.

$\endgroup$
0

1 Answer 1

4
$\begingroup$

The issue here is that the current working directory inside the container is /. You can see this with:

docker run --rm quay.io/biocontainers/guessmylt:0.2.5--py_0 python \
    -c 'import os; print(os.getcwd())'

When GUESSmyLT tries to get the absolute path of it's arguments (--reads, --reference, --output, etc), it actually appends a trailing slash to the current working directory1, hence the double slash in the returned file names.

To pass the files into the container and ensure that the results are available when it exits, you'll need a volume mount anyway. For example:

docker run --rm -v "${PWD}:/working" quay.io/biocontainers/guessmylt:0.2.5--py_0 GUESSmyLT \
    --reads "/working/${base}_1.fastq" "/working/${base}_2.fastq" \
    --reference "/working/reference.fa" \
    --annotation "/working/annotation.gtf" \
    --output "/working"
$\endgroup$
2
  • 1
    $\begingroup$ Ah of course, thanks. The citation to the GitHub Python code is cool. $\endgroup$
    – M__
    Dec 12, 2022 at 15:17
  • 1
    $\begingroup$ Thank you @Steve for taking the time to give such a thorough reply. It works now! $\endgroup$
    – pubsurfted
    Dec 13, 2022 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.