Question: SPAdes v3.14 unable to find files despite correct file path
0
gravatar for robert.murphy
26 days ago by
robert.murphy10 wrote:

I am trying to assembly a metagenome with spades but it is unable to locate the files:

== Error ==  file not found: /home/lamma/ABR/Meta_Spades_J/1_data/Each_sample/pilot/Green_Baln_Mnat-unmap_1.fastq: (left reads, library number: 1, library type: paired-end)

Yet this is the correct filepath as shown with:

less /home/lamma/ABR/Meta_Spades_J/1_data/Each_sample/pilot/Green_Baln_Mnat-unmap_1.fastq
@V300027027L1C001R0191219904
AAGAATTGAGATTAACCGTGAGTATTTCAGAGGGATCTTTCCGCAAGTGCAATATCGTAACTCTTACGGTGAATTAAGAGAACGTGATTACACTTCACTA
+
CGGGEEEEEGGAGGEEDBGGGBGEEEEEFEFEFGFEEEEFGEGEFFGFBEGEEEGFEBEFBDEEGEGGFEEFEBG=FEDEFFEEFF:FEFGEGGGEEGGE
@V300027027L1C001R0191221388
GTTTTTGCGCTTTCTTGGCTCAGAGTGCTCGTTGCTGACCCGGCGGGCTGTGCAAGGACGTTGAACGGGACGGCCGTGCCAATGGTTAAAAGCGAAACGA
+
FFFFFFGFFFFFFFBFFDFFFFC>FEFFFF=FCFFFFFFFFCFFDFEF?EEFB=DEFDCFBEG9FCBF94FFF=FGDGEF?EBFF?FCFF0FCF>FFFCB
@V300027027L1C001R0191221767
AAGCGGTGTCATGTTCATCGGCTCGAGCGTCGCAAGCTCAGCAAGCGCCGCAGAAGGTTCTGTCTCTTCAAAAAGCGAGAGCTGCTCTTTTTCCTTTGAG

Any help would be great!

EDIT: Commands used are as below:

metaspades.py -1 $fwd -2 $rvs -o $outdir

#variable values
 echo $fwd 
/home/lamma/ABR/Meta_Spades_J/1_data/Each_sample/pilot/Green_Baln_Mnat-unmap_1.fastq
echo $rvs 
/home/lamma/ABR/Meta_Spades_J/1_data/Each_sample/pilot/Green_Baln_Mnat-unmap_2.fastq 
echo $outdir
/home/lamma/ABR/Meta_Spades_J/1_data/Each_sample/pilot/spades-output/Green_Baln_Mnat-unmap

#Version check
metaspades.py -v
SPAdes genome assembler v3.14.0 [metaSPAdes mode]
assembly • 112 views
ADD COMMENTlink modified 26 days ago • written 26 days ago by robert.murphy10
1

Is all of this inside a shell script? If so, could you try to execute it from the command line and see if it works? Sometimes variables within shell scripts require special handling.

ADD REPLYlink written 26 days ago by Macspider3.2k

Tried in command line and it runs correctly. I seems to remember having this error another time with spades but can't remember the cause

ADD REPLYlink modified 26 days ago • written 26 days ago by robert.murphy10

Try putting the variables within curly brackets (e.g. ${rvs})

ADD REPLYlink written 26 days ago by Macspider3.2k

using just {} gives the same error metaspades.py -1 ${fwd} -2 ${rvs} -o ${outdir}

ADD REPLYlink written 26 days ago by robert.murphy10

Otherwise you can also wrap variables in double quotes (e.g. "${rvs}") so that the interpreter is forced to analyze them and render them as text.

ADD REPLYlink written 26 days ago by Macspider3.2k

Tried in command line and it runs correctly.

That means the shell you are currently in understands those variables and is able to find the files.

Are you submitting this as a job under a job scheduler? If that is the case the job likely is running on a node that does not have the particular file path available.

ADD REPLYlink written 26 days ago by genomax91k

I am slurm so yes. How can I ensure the node has the file path? If the node does not then how come echo $fwd prints the expected output to the stdout

ADD REPLYlink written 22 days ago by robert.murphy10

The variable has that value so it gets printed but it does not mean the path can be found on the actual node the job ran on (if that storage is not mounted on that node). You will need to check on this with your local sys admins.

ADD REPLYlink written 22 days ago by genomax91k

Share the command you are using.

ADD REPLYlink written 26 days ago by Arup Ghosh2.7k

I have added the commands

ADD REPLYlink modified 26 days ago • written 26 days ago by robert.murphy10

Using metaspades v3.14 right now myself. Can you edit your question posting the spades command as well?

ADD REPLYlink written 26 days ago by Macspider3.2k

I have added the commands

ADD REPLYlink written 26 days ago by robert.murphy10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1455 users visited in the last hour