Question: How can I change the default path to which SRA files are downloaded?
9
gravatar for Cacau
4.9 years ago by
Cacau480
Canada
Cacau480 wrote:

By default, SRA files will be download to ~/ncbi/ncbi_public/sra by using sratoolkit from ncbi

However, there is limited space. So I want to change the path.

Is there a way to download SRA files using sratoolkit (fastq-dump) or can I download the SRA files directly without parsing converting it into fastq files?

rna-seq • 15k views
ADD COMMENTlink modified 3.6 years ago by caritogandini40 • written 4.9 years ago by Cacau480
9
gravatar for piet
4.9 years ago by
piet1.8k
planet earth
piet1.8k wrote:

Yes, one of the shortcomings of sratoolkit is, that it stores huge temporary files in your home directory, which may have limited space and my be mounted via NFS.

The official way for changing several settings is to use 'vdb-config'. This program simply creates a config file named '$HOME/.ncbi/user-settings.mkfg'. But its much easier to create and edit this file with a text editor or on the command line.

The following will change the cache directory to '/tmp':

echo '/repository/user/main/public/root = "/tmp"' > $HOME/.ncbi/user-settings.mkfg
ADD COMMENTlink modified 4.9 years ago • written 4.9 years ago by piet1.8k
8
gravatar for sunhanice
4.9 years ago by
sunhanice220
United States
sunhanice220 wrote:

I always downloaded SRA files directly using wget, and then converted them to fastq.tar.gz locally with fastq-dump.

The file address for SRA file is like this format:

/sra/sra-instant/reads/ByRun/sra/{SRR|ERR|DRR}/<first 6 characters of accession>/<accession>/<accession>.sra

For example:

ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR119/SRR1192353/SRR1192353.sra

ADD COMMENTlink written 4.9 years ago by sunhanice220

This is simple! Thanks!

ADD REPLYlink written 4.4 years ago by Cacau480

This is super easy, but you still have to extract the FASTQ files from the SRA file using fastq-dump. So it might be just easier to just use fastq-dump, changing the default save directory, according to piet's post.

[UPDATE] Funny enough, just because I posted this, I changed the configuration as by piet's post (which it has worked for me in the past), but now files are still being saved to my home directory for no reason.. gah... downloading SRA files and extracting fastq locally using fastq-dump will probably be the way to move forward.

ADD REPLYlink modified 18 months ago • written 18 months ago by rodd100

Unfortunately, NCBI recommends against directly downloading files as of 2019. Basically, prefetch everything.

ADD REPLYlink written 3 months ago by mmfansler350
4
gravatar for caritogandini
3.6 years ago by
caritogandini40 wrote:

Check out this!

https://github.com/ncbi/sra-tools/wiki/Toolkit-Configuration

ADD COMMENTlink written 3.6 years ago by caritogandini40
1
gravatar for Tao
4.4 years ago by
Tao380
Tao380 wrote:

You will find the anwser here: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=dbgap_use and here: http://www.ncbi.nlm.nih.gov/books/NBK36439/#Download.Download_Procedure

ADD COMMENTlink written 4.4 years ago by Tao380

So complicated! Thanks!

ADD REPLYlink written 4.4 years ago by Cacau480
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: 720 users visited in the last hour