FASTX-Reader
view release on metacpan or search on metacpan
lib/FASTX/Reader.pm view on Meta::CPAN
our @ISA = qw(Exporter);
#ABSTRACT: A simple module to parse FASTA and FASTQ files, supporting compressed files and paired-ends.
use constant GZIP_SIGNATURE => pack('C3', 0x1f, 0x8b, 0x08);
sub new {
# Instantiate object
my $class = shift @_;
my $self = bless {} => $class;
my $args = {};
# Named parameters: undefined $_[0] will read STDIN!
if (defined $_[0] and substr($_[0], 0, 1) eq '-') {
my %data = @_;
# Try parsing
for my $i (keys %data) {
if ($i =~ /^-(file|filename)/i) {
$args->{filename} = $data{$i};
} elsif ($i =~ /^-(loadseqs)/i) {
( run in 0.667 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )