FASTX-Reader

 view release on metacpan or  search on metacpan

lib/FASTX/Reader.pm  view on Meta::CPAN

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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.424 second using v1.01-cache-2.11-cpan-49f99fa48dc )