Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
WebCvs | Raw content |
$vdb = Bio::EnsEMBL::Variation::DBSQL::DBAdaptor->new(...);
$db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...);
$va = $vdb->get_VariationAdaptor(); $vaa = $vdb->get_VariationAnnotationAdaptor(); # Get a VariationAnotation by its internal identifier $va = $vaa->fetch_by_dbID(45); # fetch all annotation for a particular variation $v = $va->fetch_by_name('rs56'); foreach $va (@{$vaa->fetch_all_by_Variation($v)}) { print $va->phenotype_name(), $va->phenotype_description(), $va->source_name(), $va->study_type(), $va->local_stable_id(),"\n"; }
_columns | No description | Code |
_default_where_clause | No description | Code |
_objs_from_sth | No description | Code |
_tables | No description | Code |
fetch_all_by_Variation | Description | Code |
fetch_all_by_pheonotype_description_source_name | No description | Code |
fetch_all_by_pheonotype_name_source_name | No description | Code |
fetch_all_by_Variation | code | next | Top |
Arg [1] : Bio::EnsEMBL:Variation::Variation $var |
_columns | description | prev | next | Top |
return qw( va.variation_annotation_id va.variation_id p.name p.description s.name va.study va.study_type va.local_stable_id va.associated_gene va.associated_variant_risk_allele va.variation_names va.risk_allele_freq_in_controls va.p_value );}
_default_where_clause | description | prev | next | Top |
my $self = shift; return 'va.phenotype_id = p.phenotype_id AND va.source_id = s.source_id';}
_objs_from_sth | description | prev | next | Top |
my ($self, $sth) = @_; my @features; my ($variation_annotation_id,$var_id,$phenotype_name,$phenotype_description,$source_name,$study,$study_type,$local_stable_id,$associated_gene,$associated_variant_risk_allele,$variation_names,$risk_allele_freq_in_controls,$p_value); $sth->bind_columns(\$variation_annotation_id,\$var_id,\$phenotype_name,\$phenotype_description,\$source_name,\$study,\$study_type,\$local_stable_id,\$associated_gene,\$associated_variant_risk_allele,\$variation_names,\$risk_allele_freq_in_controls,\$ p_value); while($sth->fetch()) { push @features, $self->_create_feature_fast('Bio::EnsEMBL::Variation::VariationAnnotation', {'dbID' => $variation_annotation_id, '_variation_id' => $var_id, 'phenotype_name' => $phenotype_name, 'phenotype_description' => $phenotype_description, 'source_name' => $source_name, 'study' => $study, 'study_type' => $study_type, 'local_stable_id' => $local_stable_id, 'associated_gene' => $associated_gene, 'associated_variant_risk_allele' => $associated_variant_risk_allele, 'variation_names' => $variation_names, 'risk_allele_freq_in_controls' => $risk_allele_freq_in_controls, 'p_value' => $p_value, 'adaptor' => $self, }); } return\@ features; } 1;}
_tables | description | prev | next | Top |
return (['variation_annotation', 'va'], [ 'phenotype', 'p'], [ 'source', 's']);}
fetch_all_by_Variation | description | prev | next | Top |
my $self = shift; my $var = shift; if(!ref($var) || !$var->isa('Bio::EnsEMBL::Variation::Variation')) { throw('Bio::EnsEMBL::Variation::Variation arg expected'); } if(!defined($var->dbID())) { throw("Variation arg must have defined dbID"); } return $self->generic_fetch("va.variation_id = ".$var->dbID());}
fetch_all_by_pheonotype_description_source_name | description | prev | next | Top |
my $self = shift; my $phenotype_description = shift; my $source_name = shift; throw('phenotype_description argument expected') if(!defined($phenotype_description)); my $extra_sql = qq( AND p.phenotype_description like '%?%' ); if (defined $source_name ) { $extra_sql .= qq( AND s.name = ?); } return $self->generic_fetch("$extra_sql"); } # method used by superclass to construct SQL}
fetch_all_by_pheonotype_name_source_name | description | prev | next | Top |
my $self = shift; my $phenotype_name = shift; my $source_name = shift; throw('phenotype_name argument expected') if(!defined($phenotype_name)); my $extra_sql = " AND p.phenotype_name = ? "; if (defined $source_name ) { $extra_sql .= qq( AND s.name = ?); } return $self->generic_fetch("$extra_sql");}
AUTHOR - Yuan Chen | Top |
CONTACT | Top |
fetch_all_by_phenotype_source_name | Top |
Arg [1] : string $phenotype_name
Arg [2] : string $source_name (optional)
Example : $vaa = $va_adaptor->fetch_by_phenotype_source_name('BD','EGA');
Description: Retrieves a variation annotation object via its phenotype/source name
Returntype : list of ref of Bio::EnsEMBL::Variation::VariationAnnotation
Exceptions : throw if phenotype name argument is not defined
Caller : general
Status : At Risk
fetch_all_by_phenotype_description_source_name | Top |
Arg [1] : string $phenotype_description
Arg [2] : string $source_name (optional)
Example : $vaa = $va_adaptor->fetch_by_phenotype_description_source_name('diabetes','EGA');
Description: Retrieves a variation annotation object via its phenotype description/source name
Returntype : list of ref of Bio::EnsEMBL::Variation::VariationAnnotation
Exceptions : throw if phenotype name argument is not defined
Caller : general
Status : At Risk