Error in GSNAP - unable to find genome in directory
2
0
Entering edit mode
8.4 years ago
graeme.thorn ▴ 100

I'm trying to use GSNAP (from the GMAP tools suite) to map some short reads to a genome (to remove some contamination later in the script), and I'm hitting on an error:

GSNAP version 2013-03-31 called with args: gsnap -D /<directory>/local-resources/ -d PhiX.fa --gunzip -B 4 -O -A sam -m 0.05 -t 24 control/Undetermined.fq.gz
Neither novel splicing (-N) nor known splicing (-s) turned on => assume reads are DNA-Seq (genomic)
Unable to find genome PhiX.fa in directory /<directory>/local-resources/.
Make sure you have typed the genome correctly, or use the -D flag
(or the -F flag for cmetindex or atoiindex) to specify a directory.
For example, '-D .' specifies this directory.

Now the /<directory>/local-resources/ does have the PhiX.fa genome in, but it appears that GSNAP cannot find it, despite looking in the correct directory. Switching out the -D to -D ., as suggested, and moving the reference FASTA file to the working directory does not change the error message.

Is this a bug with GSNAP? It's not my analysis script, so I'm trying to build it for my present situation.

It seems odd that it can't find the file even when it's in the working directory - GSNAP doesn't fail when used anywhere else in the script.

I will try an updated version of GSNAP (with updated flags), but I would prefer consistency of analysis through the script.

gmap gsnap • 4.4k views
ADD COMMENT
0
Entering edit mode

I have updated to the latest version of GSNAP (2015-11-20) and still I'm getting the errors. I have compared this with other places where I invoke GSNAP, but apart from the order of the flags, it's identical (and without errors).

ADD REPLY
0
Entering edit mode

Did you build an index for Phix.fa?

ADD REPLY
0
Entering edit mode

I'm not aware that I needed to build one - the FASTA file is very short, but if that's what it's looking for (and can't find) then that would explain the errors that I'm getting

ADD REPLY
1
Entering edit mode
8.3 years ago
graeme.thorn ▴ 100

Folloiwng on from h.mon's comment up there (thanks), it did need to build an index using gmap-build (I'm not entirely sure why a c. 5500 base FASTA file needed one, but there you go).

ADD COMMENT
1
Entering edit mode
8.3 years ago
arnstrm ★ 1.8k

You need to build index for your genome before running gmap/gsnap. Use the following command to build index:

gmap_build -d NAME -D PATH/to/build_dir genome.fasta

then use the NAME as reference to map.

ADD COMMENT

Login before adding your answer.

Traffic: 2673 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