SPAdes v3.14 unable to find files despite correct file path
0
0
Entering edit mode
4.2 years ago

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 • 2.5k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Share the command you are using.

ADD REPLY
0
Entering edit mode

I have added the commands

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

I have added the commands

ADD REPLY
0
Entering edit mode

I have the same problem. Strange, but I tried to put the library in the same directory with spades and it worked...

ADD REPLY

Login before adding your answer.

Traffic: 1805 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6