| Summary | Package variables | Synopsis | Description | General documentation | Methods |
Treefam::TreeHandle
use Treefam::DBConnection;
my $dbc = new Treefam::DBConnection ();
my $trh = $dbc->get_TreeHandle();
my $tree = $trh->get_by_id('TF300011','FULL');
Enables retrieval of Treefam tree objects.
| get_by_ac | Description | Code |
| get_by_family | Description | Code |
| get_by_gene | Description | Code |
| get_by_id | Description | Code |
| new | Description | Code |
| get_by_ac | code | next | Top |
Arg: Treefam family database ID Description: A synonym for get_by_id. Returntype: Treefam::Tree object |
| get_by_family | code | prev | next | Top |
Arg1: Treefam::Family object or Treefam family database ID Arg2: type of tree: FULL,SEED or CLEAN Description: Gets tree for given family and type Returntype: Treefam::Tree object |
| get_by_gene | code | prev | next | Top |
Arg1: Treefam::Gene object
Arg2: type of tree: FULL, SEED or CLEAN
Description: Gets tree of selected type containing given gene.
Returntype: Treefam::Tree object or undef if gene doesn't exist in
Treefam or is not in the type of tree requested |
| get_by_id | code | prev | next | Top |
Arg1: Treefam family database ID Arg2: type of tree: FULL,SEED or CLEAN Description: Gets tree with given Treefam database ID and type Returntype: Treefam::Tree object |
| new | code | prev | next | Top |
Arg: Treefam::DBConnection Description: Creates a new tree object handle Returntype: Treefam::TreeHandle |
| get_by_ac | description | prev | next | Top |
my ($self,$familyID,$type) = @_; return $self->get_by_id($familyID,$type);}
| get_by_family | description | prev | next | Top |
my ($self,$family,$type) = @_; my $familyID = ref($family) ? $family->ID() : $family; return $self->get_by_id($familyID,$type);}
| get_by_gene | description | prev | next | Top |
my ($self,$gene,$type) = @_; my $dbc = $self->{'DBConnection'}; my $famh = $dbc->get_FamilyHandle(); my $geneID = ref $gene ? $gene->ID(): $gene; my $family = $famh->get_by_gene($geneID); unless ($family) { return undef; } my $familyID = $family->ID(); my $tree = $self->get_by_id($familyID,$type); my ($node) = $tree->get_nodes_by_tag_value(-G=>$geneID) if $tree; if ($node) { return $tree; } return undef;}
| get_by_id | description | prev | next | Top |
my ($self,$familyID,$type) = @_; my $dbc = $self->{'DBConnection'}; my $dbh = $dbc->{'database_handle'}; my $query = qq( SELECT tree FROM trees WHERE AC= ? AND type= ?); my $sth= $dbh->prepare ($query); $sth->execute($familyID,$type); my ($nhx) = $sth->fetchrow_array(); if ($nhx) { return new Treefam::Tree($dbc,$familyID,$type,$nhx); } return undef;}
| new | description | prev | next | Top |
my $class = shift; my $self = {}; $self->{'DBConnection'} = shift; weaken($self->{'DBConnection'}); bless ($self, $class); return $self;}
| CONTACT | Top |