Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Sign in to follow this  
Followers 0
Adjuvant

Batch Command Help

2 posts in this topic

Hi Guys,

I would like to run fastq-dump software (it changes format of DNA sequencing data) and repeat it (when the last process is complete) until all the .sra files in a directory are reformatted to fastq.

I have downloaded a study and the sra files are organize in a series of folders: SRP*\SRS*\SRX*\SRR*\SRA*.sra

I can easily put all the sra files into one folder (if needed) but I can't make fastq-dump do anything more than one-at-time conversion.

For example, currently I am using for the file SRRXXXXX1.sra in the same folder as the fastq-dump app:

fastq-dump --split-files --gzip SRRXXXXX1.sra

I get SRRXXXX1.fastq.gzip but SRRXXXXX2.sra is left alone.

Please help me with batching the conversion!

I wish I could run: fastq-dump --split-files --gzip *.sra

or fastq-dump --split-files --gzip SRP*\SRS*\SRX*\SRR*\SRA*.sra

but it doesn't appear fastq-dump supports *.sra

I am inept at batching files. I just need simple code to run fastq-dump --split-files --gzip SRXXXXX1.sra

and repeat for every single .sra file when the last file is completed (can't do at the same time, it's 200G of data).

This is for windows 7 64 bit.

Thanks!!!

Edited by Adjuvant
0

Share this post


Link to post
Share on other sites

I'd use find from linux to get all absolute path name of *.sra files. You can find a native win32 port there and the download link is there.

The find.exe would be stored in "c:\batch" for example.

The files to process would be stored in the folder "C:\SEQ"

Then the batch would be pretty easy:


c:\batch\find.exe c:\SEQ -type f -iname *.sra > %temp%\SEQ_files_to_process.lst
for /f "delims=" %%i in (%temp%\SEQ_files_to_process.lst) do (fastq-dump --split-files --gzip %%i)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.