SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Efficient way to split FASTQ files based on Illumina indexes in the ID TompaB Bioinformatics 7 04-09-2015 04:01 PM
How to split fastq into small fastq based on barcode? peterrjp Illumina/Solexa 6 12-30-2013 06:25 PM
Split Large FASTQ file in small FASTQ files with user defined number of reads Windows deepbiomed Bioinformatics 3 04-04-2013 07:14 AM
Split fastq files for tophat analysis Bobbieshaban Bioinformatics 2 03-12-2013 06:44 AM
Split fastq into smaller files lorendarith Bioinformatics 10 12-13-2012 04:28 AM

Reply
 
Thread Tools
Old 01-23-2018, 12:56 PM   #1
lac302
Member
 
Location: DE

Join Date: Dec 2012
Posts: 64
Default need to deinterleave/split all fastq files within a directory

I've been using this script in the link below for several years when I need to split PE reads into separate R1 and R2 files.

https://gist.github.com/nathanhaigh/3521724

Does anyone know of a way to do the same thing recursively to a whole folder? I have 200 RNAseq samples that all need to be split.
lac302 is offline   Reply With Quote
Old 01-23-2018, 08:14 PM   #2
neavemj
Member
 
Location: MA, USA

Join Date: Feb 2014
Posts: 57
Default

Maybe you could loop over each of the interleaved files and run the script? Something like:

Code:
for j in *fastq; do deinterleave_fastq.sh $j *options; done
If you could tell me your directory structure and the command for how you normally run the program, I could be more specific.

Cheers,

Matt.
neavemj is offline   Reply With Quote
Old 01-24-2018, 09:20 AM   #3
lac302
Member
 
Location: DE

Join Date: Dec 2012
Posts: 64
Default

Quote:
Originally Posted by neavemj View Post
Maybe you could loop over each of the interleaved files and run the script? Something like:

Code:
for j in *fastq; do deinterleave_fastq.sh $j *options; done
If you could tell me your directory structure and the command for how you normally run the program, I could be more specific.

Cheers,

Matt.
Code:
deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
The directory structure is just a folder of interleaved fastq files *0001reads.fq, *0002reads.fq, etc.
lac302 is offline   Reply With Quote
Old 01-24-2018, 01:12 PM   #4
neavemj
Member
 
Location: MA, USA

Join Date: Feb 2014
Posts: 57
Default

Hi lac302,

Well, you could do something like this:

Code:
for j in *reads.fq; do deinterleave_fastq.sh < $j $(basename $j .fq).F.fq $(basename $j .fq).R.fq [compress]; done
It's still a bit tricky to tell without seeing the full file name, or understanding completely how the program works, but I think this should do the job.

Best,

Matt.
neavemj is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 05:40 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO