This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SRAToolKits Trouble

Hi there, I am trying to download SRR data using the SRAToolKit following this instruction manual https://ftp.ncbi.nlm.nih.gov/pub/factsheets/HowTo_LocalSRABlast_StepByStep.pdf. The problem I run into is that I had to change the directory so I could find it and I created it called "NCBI SRA." I am at the step of creating a txt file named "srr_rna_list.txt," containing the SRA's. I have pasted 4 SRA's in a notepad file and I have no idea where to put this text file so that prefetch can find it? Any suggestions?

Thanks

hoffmavl@DESKTOP-447P0M5:~/NCBI SRA$ prefetch --option-file srr_rna_list.txt
2021-03-24T16:33:50 prefetch.2.11.0 int: file not found while opening manager within virtual file system module - VFSManagerOpenFileRead() failed
Usage:
  prefetch [options] <SRA accession> [...]
  Download SRA files and their dependencies

  prefetch [options] --cart <kart file>
  Download cart file

  prefetch [options] <URL> --output-file <FILE>
  Download URL to FILE

  prefetch [options] <URL> [...] --output-directory <DIRECTORY>
  Download URL or URL-s to DIRECTORY

  prefetch [options] <SRA file> [...]
  Check SRA file for missed dependencies and download them
general

Did you make the srr_rna_list.txt file on PC? Make sure there are no extraneous characters in that file. Save it in a location where you can specify the path to it in your command. Running the file through dos2unix may help fix line endings.

I did make the file on a PC. I'm using an Ubuntu bash shell (The app from the windows store).

I'll try and figure out how to install/use dos2unix, thanks!

For me to specify the path is it something like this? $ prefetch (Path)? --option-file srr_rna_list.txt

You just need to make sure that the location where you save the file to is accessible on ubuntu side. It may be just simple to install an editor called nano (if it is not there) on ubuntu side and make the file in the same directory where you are working. Then you will know it is right there and prefetch can find it when used with ./srr_rna_list.txt.

1 answer

Here is a worked-out example:

cat ids

prints:

SRR1553425
SRR1553499

fetch the ids via

cat ids | xargs  prefetch 

I am not sure what the format of the --options-file should be, the documentation on what that is and what it does is scant at best.

I also get an error if I try to use:

prefetch --option-file ids

even though according to the tutorial you follow it should work, and evidently the SRR numbers are correct.

Log in to answer this question.