MSFN Forum: Batch Command Help - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Batch Command Help Rate Topic: -----

#1 User is offline   Adjuvant 

  • Group: Members
  • Posts: 1
  • Joined: 29-October 12
  • OS:none specified
  • Country: Country Flag

Posted 29 October 2012 - 02:29 PM

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!!!

This post has been edited by Adjuvant: 29 October 2012 - 02:32 PM



#2 User is offline   allen2 

  • Not really Newbie
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,734
  • Joined: 13-January 06

Posted 29 October 2012 - 10:36 PM

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)



Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy