Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/EnsEMBL/Variation/StructuralVariation.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1f6dce3d34e0 |
---|---|
1 =head1 LICENSE | |
2 | |
3 Copyright (c) 1999-2012 The European Bioinformatics Institute and | |
4 Genome Research Limited. All rights reserved. | |
5 | |
6 This software is distributed under a modified Apache license. | |
7 For license details, please see | |
8 | |
9 http://www.ensembl.org/info/about/code_licence.html | |
10 | |
11 =head1 CONTACT | |
12 | |
13 Please email comments or questions to the public Ensembl | |
14 developers list at <dev@ensembl.org>. | |
15 | |
16 Questions may also be sent to the Ensembl help desk at | |
17 <helpdesk@ensembl.org>. | |
18 | |
19 =cut | |
20 | |
21 # Ensembl module for Bio::EnsEMBL::Variation::StructuralVariation | |
22 # | |
23 # Copyright (c) 2004 Ensembl | |
24 # | |
25 | |
26 | |
27 =head1 NAME | |
28 | |
29 Bio::EnsEMBL::Variation::StructuralVariation - Ensembl representation of a structural variation. | |
30 | |
31 =head1 SYNOPSIS | |
32 | |
33 # Structural variation representing a CNV | |
34 $sv = Bio::EnsEMBL::Variation::StructuralVariation->new | |
35 (-variation_name => 'esv25480', | |
36 -class_so_term => 'structural_variant', | |
37 -source => 'DGVa', | |
38 -source_description => 'Database of Genomic Variants Archive', | |
39 -study_name => 'estd20', | |
40 -study_description => 'Conrad 2009 "Origins and functional impact of copy number variation in the human genome." PMID:19812545 [remapped from build NCBI36]', | |
41 -study_url => 'ftp://ftp.ebi.ac.uk/pub/databases/dgva/estd20_Conrad_et_al_2009', | |
42 -external_reference => 'pubmed/19812545'); | |
43 | |
44 ... | |
45 | |
46 print $sv->name(), ":", $sv->var_class(); | |
47 | |
48 =head1 DESCRIPTION | |
49 | |
50 This is a class representing a structural variation from the | |
51 ensembl-variation database. A structural variant may have a copy number variation, a tandem duplication, | |
52 an inversion of the sequence or others structural variations. | |
53 | |
54 The position of a StructuralVariation object on the Genome is represented | |
55 by the <Bio::EnsEMBL::Variation::StructuralVariationFeature> class. | |
56 | |
57 =head1 METHODS | |
58 | |
59 =cut | |
60 | |
61 use strict; | |
62 use warnings; | |
63 | |
64 package Bio::EnsEMBL::Variation::StructuralVariation; | |
65 | |
66 use Bio::EnsEMBL::Variation::BaseStructuralVariation; | |
67 | |
68 our @ISA = ('Bio::EnsEMBL::Variation::BaseStructuralVariation'); | |
69 | |
70 | |
71 sub new { | |
72 my $caller = shift; | |
73 my $class = ref($caller) || $caller; | |
74 | |
75 my $self = Bio::EnsEMBL::Variation::BaseStructuralVariation->new(@_); | |
76 return(bless($self, $class)); | |
77 } | |
78 | |
79 =head2 get_all_SupportingStructuralVariants | |
80 | |
81 Example : $sv->get_all_SupportingStructuralVariants(); | |
82 Description : Retrieves all SupportingStructuralVariation associated with this structural variation. | |
83 Return empty list if there are none. | |
84 Returntype : reference to list of Bio::EnsEMBL::Variation::SupportingStructuralVariation objects | |
85 Exceptions : None | |
86 Caller : general | |
87 Status : At Risk | |
88 | |
89 =cut | |
90 | |
91 sub get_all_SupportingStructuralVariants { | |
92 my $self = shift; | |
93 | |
94 if (defined ($self->{'adaptor'})){ | |
95 my $ssv_adaptor = $self->{'adaptor'}->db()->get_SupportingStructuralVariationAdaptor(); | |
96 return $ssv_adaptor->fetch_all_by_StructuralVariation($self); | |
97 } | |
98 warn("No variation database attached"); | |
99 return []; | |
100 } | |
101 | |
102 | |
103 =head2 summary_as_hash | |
104 | |
105 Example : $sv_summary = $sv->summary_as_hash(); | |
106 Description : Retrieves a textual summary of this StructuralVariation object. | |
107 Returns : hashref of descriptive strings | |
108 | |
109 =cut | |
110 | |
111 sub summary_as_hash { | |
112 my $self = shift; | |
113 my %summary; | |
114 $summary{'display_id'} = $self->display_id; | |
115 $summary{'study_name'} = $self->study_name; | |
116 $summary{'study_description'} = $self->study_description; | |
117 $summary{'class'} = $self->var_class; | |
118 return \%summary; | |
119 | |
120 } | |
121 | |
122 1; |