Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 35 lines (29 sloc) 645 Bytes
#!/usr/bin/perl -w
#translate a fasta file to read format
use lib "perllib";
use strict;
use Getopt::Long;
use DNA;
use ReadUtil;
my ($HELP, $VERBOSE, $FASTAFILE);
GetOptions(
"help" => \$HELP,
"fasta=s" => \$FASTAFILE,
);
help() if (($HELP) or (! defined $FASTAFILE));
my $outfile = $FASTAFILE;
$outfile =~ s/fas$/read/;
print "Reading $FASTAFILE\nOutput to $outfile\n";
open OUT, ">$outfile";
my $reads = readFastaFile($FASTAFILE);
foreach my $rd (@$reads) {
print OUT "$rd->{st} $rd->{seq}\n";
}
close OUT;
sub help {
print <<END;
usage: $0 -f file.fas [ -h -v -o]
reads from file.fas, outputs to file.read
END
exit;
}
Something went wrong with that request. Please try again.