FASTX::Reader

CPAN Kwalitee Version Tests Travis Build Status

An OOP Perl module to parse FASTA and FASTQ files

This is a package built using Heng Li's readfq() subroutine (link).

For updated documentation, please visit Meta::CPAN.

Installation

With CPAN minus:

cpanm FASTX::Reader

If you don't have CPAN minus, you can install it with:

cpan App::cpanminus

Short synopsis

use FASTX::Reader;
my $filepath = '/path/to/assembly.fastq';
die "Input file not found: $filepath\n" unless (-e "$filepath");
my $fasta_reader = FASTX::Reader->new({ filename => "$filepath" });
 
while (my $seq = $fasta_reader->getRead() ) {
  print $seq->{name}, "\t", $seq->{seq}, "\t", $seq->{qual}, "\n";
}

Contributors