in reply to Deconvolutinng FastQ files
Try this. It should take around 40 minutes for 34GB:
#! perl -sw use strict; my %outFHs = map { open my $fh, '>', "$_.fastQ" or die $!; $_ => $fh; } qw[ TTGT GGTT ACCT ]; until( eof() ) { my @lines = map scalar <>, 1 .. 4; my $barcode = substr $lines[1], 0, 9; my $tag = substr $barcode, 3, 4; print { $outFHs{ $tag } } @lines; } __END__ usage: thisScript theBigfile.fastQ ## outputs to TTGT.fastQ GGTT.fastQ ACCT.fastQ
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Deconvolutinng FastQ files
by snakebites (Initiate) on Aug 07, 2012 at 14:02 UTC | |
by BrowserUk (Patriarch) on Aug 07, 2012 at 14:24 UTC | |
by snakebites (Initiate) on Aug 07, 2012 at 14:49 UTC | |
by BrowserUk (Patriarch) on Aug 07, 2012 at 15:01 UTC | |
by snakebites (Initiate) on Aug 08, 2012 at 02:45 UTC |