my $kmer=Kmer->new("file.fastq.gz",{kmerCounter=>"jellyfish",numcpus=>4});
my $kmerHash=$kmer->count();
my $countOfCounts=$kmer->histogram();
=head1 DESCRIPTION
A module for helping with kmer analysis. The basic methods help count kmers and can produce a count of counts. Currently this module only supports fastq format. Although this module can count kmers with pure perl, it is recommended to give the option for a different kmer counter such as Jellyfish.
=head1 AUTHOR
Author: Lee Katz <lkatz@cdc.gov>
=cut
=pod
=head1 METHODS
=item new
=over
Create a new instance of the kmer counter. One object per file.
Applicable arguments:
Argument Default Description
kmercounter perl What kmer counter software to use.
Choices: Perl, Jellyfish.
kmerlength 21 Kmer length
numcpus 1 This module uses perl
multithreading with pure perl or
can supply this option to other
software like jellyfish.
gt 1 If the count of kmers is fewer
than this, ignore the kmer. This
might help speed analysis if you
do not care about low-count kmers.
Examples:
my $kmer=Kmer->new("file.fastq.gz",{kmerCounter=>"jellyfish",numcpus=>4});
=back
=cut
subnew{
my($class,$seqfile,$settings)=@_;
die"ERROR: need a sequence file"if(!$seqfile);
die"ERROR: could not locate the sequence file"if(!-e $seqfile);