Академический Документы
Профессиональный Документы
Культура Документы
use Bio::AlignIO;
$inputfilename = "testaln.fasta";
$in = Bio::AlignIO->new(-file => $inputfilename ,
-format => 'fasta');
$out = Bio::AlignIO->new(-file => ">out.aln.pfam" ,
-format => 'pfam');
use Bio::SeqIO;
3. Bio::DB::GenBank
Use Bio::DB::GenBank
get_seq_by_id(‘ROA1_HUMAN’);
get_string_by_gi($gi1,$gi2);
use Bio::SeqIO;
use Bio::DB::GenBank;
my $gb=Bio::DB::GenBank-> new();
my $out= Bio::SeqIO-> new (-file=> ‘filename’
-format=>’GenBank’);
My $seqio=$gb-> get_Stream_by_gi([‘AAYS4435’,’AA48440’])
While(my $seq=$seqIO->next_seq())
{
$out->write_seq($seq);
}
4. Bio::Annotation::AnnotationFactory
package Bio::Annotation::AnnotationFactory;
use strict;
=head
Title : new
Usage : my $obj = Bio::Annotation::AnnotationFactory->new();
Function: Builds a new Bio::Annotation::AnnotationFactory object
Returns : Bio::Annotation::AnnotationFactory
Args : -type => string, name of a L<Bio::AnnotationI> derived class.
=cut
5. Bio::Ontology::Term
package Bio::Ontology::Term;
use strict;
use Bio::Ontology::Ontology;
use Bio::Ontology::OntologyStore;
use Bio::Annotation::DBLink;
use Data::Dumper;
=head new
Title : new
Usage : $term = Bio::Ontology::Term->new(
-identifier => "16847",
-name => "1-aminocyclopropane-1-carboxylate synthase",
-definition => "Catalysis of ...",
-is_obsolete => 0,
-comment => "" );
Function: Creates a new Bio::Ontology::Term.
Returns : A new Bio::Ontology::Term object.
Args : -identifier => the identifier of this term [scalar]
-name => the name of this term [scalar]
-definition => the definition of this term [scalar]
-ontology => the ontology this term lives in
(a Bio::Ontology::OntologyI object)
-version => version information [scalar]
-is_obsolete => the obsoleteness of this term [0 or 1]
-comment => a comment [scalar]
-dblinks => Bio::Annotation::DBLink objects
[reference to array]
-references => Bio::Annotation::Reference objects
[reference to array]
See L<Bio::Ontology::OntologyI>, L<Bio::Annotation::Reference>,
L<Bio::Annotation::DBLink>.
=cut
6. Bio::Taxonomy::Factory
package Bio::Taxonomy::FactoryI;
use strict;
=head2 fetch
Title: fetch
Usage: my $taxonomy = $factory->fetch(-taxon_id => 9605);
my $taxonomy = $factory->fetch(-common_name => 'mammals');
Fuctnion: Fetch taxonomy by taxon_id, common name or scientific name.
Returns: an instance of Bio::Taxonomy
Args: -taxon_id => NCBI taxonomy ID
-common_name => comon name, such as 'human', 'mammals'
-scientifc_name => specitic name, such as 'sapiens', 'Mammalia'
=cut
7. Bio::Annotation::DBLink
package Bio::Annotation::DBLink;
use strict;
my $self = $class->SUPER::new(@args);
my ($database,$primary_id,$optional_id,$comment,$tag,$type,$ns,$auth,$v,$url) =
$self->_rearrange([qw(DATABASE
PRIMARY_ID
OPTIONAL_ID
COMMENT
TAGNAME
TYPE
NAMESPACE
AUTHORITY
VERSION
URL
)], @args);
return $self;
}
1;
8. Bio::Map::CytoMap
package Bio::Map::CytoMap;
use vars qw($MAPCOUNT);
use strict;
use base qw(Bio::Map::SimpleMap);
BEGIN { $MAPCOUNT = 1; }
sub new {
my ($class, @args) = @_;
my $self = $class->SUPER::new(@args);
$self->{'_uid'} = $MAPCOUNT++;
my ($uid) = $self->_rearrange([qw(UID)], @args);
defined $uid && $self->unique_id($uid);
return $self;
}
sub type {
return 'cyto';
}
sub length {
return 0;
}
1;