Bio::ViennaNGS::Fasta - Moose wrapper for Bio::DB::Fasta
use Bio::ViennaNGS::Fasta; my $f = Bio::ViennaNGS::Fasta->new(fasta => "data/foo.fa", ); # get all FASTA IDs my @ids = $f->fastaids; # get a reference to a hash of Bio::PrimarySeq::Fasta objects whose # keys are the Fasta IDs seen in the input file my $ps = $f->primaryseqH; # get the strand-specific genomic sequence for a certain Fasta ID my $id = "chr1"; my $start = 287; my $end = 1289; my $strand = "+"; my $seq = $f->stranded_subsequence($id,$start,$end,$strand);
- fasta (required)
Upcon object construction, this attribute expects an input fasta file, which is transparently coerced into a Bio::DB::Fasta object and hitherto available via the
- fastaids (auto-computed)
Arrary reference to the Fasta IDs found in the input file
- primaryseqH (auto-computed)
Hash reference to Bio::PrimarySeq::Fasta objects whose keys are the Fasta IDs found in the input file
Title : stranded_subsequence
$idis the Fasta ID to retrieve sequence data from,
$endare (1-based) start and end coordinates of the requested interval, where
$startmust be <=
$strandis 1 or -1 for [+] or [-] strand, respectively.
Returns : A string.
Title : has_sequid
Function : Checks whether the current object contains Fasta ID
$idif the Fasta ID to check for.
Returns : 1 if ID
$idwas found, 0 else.
Michael T. Wolfinger, <email@example.com>
Copyright (C) 2014-2017 by Michael T. Wolfinger
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.