Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
156c9d33
Commit
156c9d33
authored
Jun 04, 2010
by
Andreas Kusalananda Kähäri
Browse files
Quick makeover, since I just had a look at the SplicingEventAdaptor.
parent
385f415d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
56 deletions
+56
-56
modules/Bio/EnsEMBL/SplicingEvent.pm
modules/Bio/EnsEMBL/SplicingEvent.pm
+56
-56
No files found.
modules/Bio/EnsEMBL/SplicingEvent.pm
View file @
156c9d33
=head1 LICENSE
Copyright (c) 1999-2010 The European Bioinformatics Institute and
...
...
@@ -24,13 +25,12 @@ Bio::EnsEMBL::SlicingEvent - Object representing an alternative splicing event
=head1 SYNOPSIS
my $ase = Bio::EnsEMBL::SplicingEvent->new(
-START => 123,
-END => 1045,
-STRAND => 1,
-GENE_ID => $gene->dbID,
-SLICE => $slice
);
my $ase =
Bio::EnsEMBL::SplicingEvent->new( -START => 123,
-END => 1045,
-STRAND => 1,
-GENE_ID => $gene->dbID,
-SLICE => $slice );
# set some additional attributes
$ase->name('ENSG00000000003-CNE-3');
...
...
@@ -56,94 +56,94 @@ use Bio::EnsEMBL::Utils::Exception qw(throw warning deprecate);
use
vars
qw(@ISA)
;
@ISA
=
qw(Bio::EnsEMBL::Feature)
;
## Add to gene get_all_splicing_events
sub
gene_id
{
my
(
$self
,
$value
)
=
@_
;
sub
gene_id
{
my
$self
=
shift
;
$self
->
{'
gene_id
'}
=
shift
if
(
@
_
);
if
(
defined
$self
->
{'
gene_id
'})
{
return
$self
->
{'
gene_id
'};
if
(
defined
(
$value
)
)
{
$self
->
{'
gene_id
'}
=
$value
;
}
return
undef
;
return
$self
->
{'
gene_id
'}
;
}
sub
name
{
my
$self
=
shift
;
$self
->
{'
name
'}
=
shift
if
(
@
_
);
sub
name
{
my
(
$self
,
$value
)
=
@_
;
if
(
defined
$self
->
{'
name
'}
)
{
return
$self
->
{'
name
'};
if
(
defined
(
$value
)
)
{
$self
->
{'
name
'}
=
$value
;
}
return
undef
;
return
$self
->
{'
name
'}
;
}
sub
type
{
my
$self
=
shift
;
$self
->
{'
type
'}
=
shift
if
(
@
_
);
sub
type
{
my
(
$self
,
$value
)
=
@_
;
if
(
defined
$self
->
{'
type
'}
)
{
return
$self
->
{'
type
'};
if
(
defined
(
$value
)
)
{
$self
->
{'
type
'}
=
$value
;
}
return
undef
;
return
$self
->
{'
type
'}
;
}
sub
add_Feature
{
my
(
$self
,
$feat
)
=
@_
;
sub
add_Feature
{
my
(
$self
,
$feat
ure
)
=
@_
;
if
(
!
ref
$feat
||
!
$feat
->
isa
("
Bio::EnsEMBL::SplicingEventFeature
")
)
{
throw
("
$feat
is not a Bio::EnsEMBL::SplicingEventFeature!
");
}
if
(
!
ref
(
$feature
)
||
!
$feature
->
isa
("
Bio::EnsEMBL::SplicingEventFeature
")
)
{
throw
("
$feature
is not a Bio::EnsEMBL::SplicingEventFeature!
");
}
$self
->
{'
_feature_array
'}
||=
[]
;
push
(
@
{
$self
->
{'
_feature_array
'}},
$feat
);
}
$self
->
{'
_feature_array
'}
||=
[]
;
push
(
@
{
$self
->
{'
_feature_array
'}
},
$feature
);
}
sub
get_all_Features
{
my
$self
=
shift
;
my
(
$self
)
=
@_
;
if
(
!
exists
$self
->
{'
_feature_array
'}
)
{
if
(
defined
$self
->
adaptor
()
)
{
my
$fta
=
$self
->
adaptor
()
->
db
()
->
get_SplicingEventFeatureAdaptor
();
my
$features
=
$fta
->
fetch_all_by_SplicingEvent
(
$self
);
if
(
!
exists
(
$self
->
{'
_feature_array
'}
)
)
{
if
(
defined
(
$self
->
adaptor
()
)
)
{
my
$fta
=
$self
->
adaptor
()
->
db
()
->
get_SplicingEventFeatureAdaptor
();
my
$features
=
$fta
->
fetch_all_by_SplicingEvent
(
$self
);
$self
->
{'
_feature_array
'}
=
$features
;
}
}
return
$self
->
{'
_feature_array
'};
}
sub
add_Pair
{
my
(
$self
,
$feat
)
=
@_
;
sub
add_Pair
{
my
(
$self
,
$feat
ure
)
=
@_
;
if
(
!
ref
$feat
||
!
$feat
->
isa
("
Bio::EnsEMBL::SplicingEventPair
")
)
{
throw
("
$feat
is not a Bio::EnsEMBL::SplicingEventPair!
");
}
if
(
!
ref
(
$feature
)
||
!
$feature
->
isa
("
Bio::EnsEMBL::SplicingEventPair
")
)
{
throw
("
$feature
is not a Bio::EnsEMBL::SplicingEventPair!
");
}
$self
->
{'
_pair_array
'}
||=
[]
;
push
(
@
{
$self
->
{'
_pair_array
'}},
$feat
);
}
$self
->
{'
_pair_array
'}
||=
[]
;
push
(
@
{
$self
->
{'
_pair_array
'}
},
$feature
);
}
sub
get_all_Pairs
{
my
$self
=
shift
;
my
(
$self
)
=
@_
;
if
(
!
exists
$self
->
{'
_pair_array
'}
)
{
if
(
defined
$self
->
adaptor
()
)
{
my
$pa
=
$self
->
adaptor
()
->
db
()
->
get_SplicingTranscriptPairAdaptor
();
my
$pairs
=
$pa
->
fetch_all_by_SplicingEvent
(
$self
);
if
(
!
exists
(
$self
->
{'
_pair_array
'}
)
)
{
if
(
defined
(
$self
->
adaptor
()
)
)
{
my
$pa
=
$self
->
adaptor
()
->
db
()
->
get_SplicingTranscriptPairAdaptor
();
my
$pairs
=
$pa
->
fetch_all_by_SplicingEvent
(
$self
);
$self
->
{'
_pair_array
'}
=
$pairs
;
}
}
return
$self
->
{'
_pair_array
'};
}
1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment