Mercurial > repos > edward-kirton > roche454_toolsuite
comparison roche454/sff_to_fastq_converter.pl @ 0:f036c7107601
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author | edward-kirton |
---|---|
date | Tue, 07 Jun 2011 17:50:32 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f036c7107601 |
---|---|
1 #!/usr/bin/env perl | |
2 | |
3 use warnings; | |
4 use strict; | |
5 use Getopt::Long; | |
6 use File::Basename; | |
7 | |
8 # VALIDATE INPUT | |
9 die("Expected 3 args") unless @ARGV == 3; | |
10 my ($sff, $extra_files_path, $fastq) = @ARGV; | |
11 | |
12 # DEFINE PATHS | |
13 mkdir($extra_files_path) unless -d $extra_files_path; | |
14 my $base = basename($sff); | |
15 my $fasta = "$extra_files_path/$base.fasta"; | |
16 my $qual = "$extra_files_path/$base.qual"; | |
17 | |
18 # GENERATE FASTA, QUAL, FASTQ | |
19 my $outf; | |
20 my $out; | |
21 eval { $out=`sffinfo -seq $sff > $fasta` }; | |
22 die("ERROR: $out") if $@; | |
23 print $out; | |
24 eval { $out=`sffinfo -qual $sff > $qual` }; | |
25 die("ERROR: $out") if $@; | |
26 print $out; | |
27 eval { $out=`fasta_qual_to_fastq $fasta $qual $fastq` }; | |
28 die("ERROR: $out") if $@; | |
29 print $out; | |
30 unlink($fasta, $qual); | |
31 exit 0; |