Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Batch Command Help

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Adjuvant

Adjuvant
  • Member
  • 1 posts
  • Joined 29-October 12
  • OS:none specified
  • Country: Country Flag
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, 29 October 2012 - 02:32 PM.



How to remove advertisement from MSFN

#2
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
  • Joined 13-January 06
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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users