Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
4a9b9a8d
Commit
4a9b9a8d
authored
May 06, 2010
by
Ian Longden
Browse files
LRGSlice fixes
parent
5bd6ce87
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
32 additions
and
29 deletions
+32
-29
modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm
+6
-5
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+4
-4
modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm
+1
-1
modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm
+1
-1
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+1
-1
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+5
-5
modules/Bio/EnsEMBL/Exon.pm
modules/Bio/EnsEMBL/Exon.pm
+3
-1
modules/Bio/EnsEMBL/FeaturePair.pm
modules/Bio/EnsEMBL/FeaturePair.pm
+1
-1
modules/Bio/EnsEMBL/Gene.pm
modules/Bio/EnsEMBL/Gene.pm
+1
-1
modules/Bio/EnsEMBL/MappedSlice.pm
modules/Bio/EnsEMBL/MappedSlice.pm
+1
-1
modules/Bio/EnsEMBL/MappedSliceContainer.pm
modules/Bio/EnsEMBL/MappedSliceContainer.pm
+4
-4
modules/Bio/EnsEMBL/PredictionExon.pm
modules/Bio/EnsEMBL/PredictionExon.pm
+1
-1
modules/Bio/EnsEMBL/PredictionTranscript.pm
modules/Bio/EnsEMBL/PredictionTranscript.pm
+1
-1
modules/Bio/EnsEMBL/SeqFeature.pm
modules/Bio/EnsEMBL/SeqFeature.pm
+2
-2
No files found.
modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm
View file @
4a9b9a8d
...
...
@@ -366,13 +366,14 @@ sub _remap {
Status: Stable
=cut
use
Data::
Dumper
;
#
use Data::Dumper;
sub
store
{
my
$self
=
shift
;
my
$asx
=
shift
;
my
$asx2
=
shift
;
if
(
!
$asx
->
isa
('
Bio::EnsEMBL::AssemblyExceptionFeature
')){
throw
("
$asx
is not a Ensembl assemlby exception -- not stored
");
}
...
...
@@ -389,7 +390,7 @@ sub store{
if
(
$asx
->
type
!~
/PAR|HAP/
){
throw
("
Only types of assembly exception features valid are PAR and HAP
");
}
if
(
!
$asx
->
alternate_slice
->
isa
('
Bio::EnsEMBL::Slice
')){
if
(
!
(
$asx
->
alternate_slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$asx
->
alternate_slice
->
isa
('
Bio::EnsEMBL::
LRG
Slice
'))
)
{
throw
("
Alternate slice should be a Bio::EnsEMBL::Slice
");
}
#now check the other Assembly exception feature, the one pointing to the REF
...
...
@@ -403,8 +404,8 @@ sub store{
if
(
$asx2
->
type
!~
/HAP REF|PAR REF/
){
throw
("
$asx2
should have type of assembly exception features HAP REF or PAR REF
");
}
if
(
!
$asx
->
alternate_slice
->
isa
('
Bio::EnsEMBL::Slice
')){
throw
("
Alternate slice should be a Bio::EnsEMBL::Slice
");
if
(
!
(
$asx
2
->
alternate_slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$asx2
->
alternate_slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
){
throw
("
Alternate slice should be a Bio::EnsEMBL::Slice
");
}
#finally check that both features are pointing to each other slice
if
(
$asx
->
slice
!=
$asx2
->
alternate_slice
||
$asx
->
alternate_slice
!=
$asx2
->
slice
){
...
...
@@ -487,7 +488,7 @@ sub _pre_store {
my
$slice_adaptor
=
$db
->
get_SliceAdaptor
();
my
$slice
=
$feature
->
slice
();
if
(
!
ref
(
$slice
)
||
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
('
Feature must be attached to Slice to be stored.
');
}
...
...
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
View file @
4a9b9a8d
...
...
@@ -218,7 +218,7 @@ sub fetch_all_by_Slice_constraint {
my
@result
=
();
if
(
!
ref
(
$slice
)
||
(
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
&&
!
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
')))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
')))
{
throw
("
Bio::EnsEMBL::Slice argument expected.
");
}
...
...
@@ -581,7 +581,7 @@ sub _pre_store {
my
$slice_adaptor
=
$db
->
get_SliceAdaptor
();
my
$slice
=
$feature
->
slice
();
if
(
!
ref
(
$slice
)
||
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
('
Feature must be attached to Slice to be stored.
');
}
...
...
@@ -642,7 +642,7 @@ sub _pre_store_userdata {
my
$slice
=
$feature
->
slice
();
my
$slice_adaptor
=
$slice
->
adaptor
;
if
(
!
ref
(
$slice
)
||
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
('
Feature must be attached to Slice to be stored.
');
}
...
...
@@ -927,7 +927,7 @@ sub remove {
sub
remove_by_Slice
{
my
(
$self
,
$slice
)
=
@_
;
if
(
!
$slice
||
!
ref
(
$slice
)
||
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
$slice
||
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
Slice argument is required
");
}
...
...
modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm
View file @
4a9b9a8d
...
...
@@ -125,7 +125,7 @@ sub store{
}
my
$slice
=
$feat
->
slice
();
if
(
!
defined
(
$slice
)
||
!
$slice
->
isa
("
Bio::EnsEMBL::Slice
"))
{
if
(
!
defined
(
$slice
)
||
!
(
$slice
->
isa
("
Bio::EnsEMBL::Slice
")
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
A slice must be attached to the features to be stored.
");
}
...
...
modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm
View file @
4a9b9a8d
...
...
@@ -436,7 +436,7 @@ sub store {
}
my
$slice
=
$rf
->
slice
();
if
(
!
ref
(
$slice
)
||
!
$slice
->
isa
("
Bio::EnsEMBL::Slice
"))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
("
Bio::EnsEMBL::Slice
")
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
RepeatFeature cannot be stored without an associated slice.
");
}
...
...
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
View file @
4a9b9a8d
...
...
@@ -139,7 +139,7 @@ sub new {
sub
fetch_by_Slice_start_end_strand
{
my
(
$self
,
$slice
,
$start
,
$end
,
$strand
)
=
@_
;
if
(
!
ref
(
$slice
)
||
!
$slice
->
isa
("
Bio::EnsEMBL::Slice
"))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
("
Bio::EnsEMBL::Slice
")
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
Slice argument is required.
");
}
...
...
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
4a9b9a8d
...
...
@@ -559,7 +559,7 @@ sub get_seq_region_id {
my
$self
=
shift
;
my
$slice
=
shift
;
if
(
!
$slice
||
!
ref
(
$slice
)
||
(
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
&&
!
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
')))
{
if
(
!
$slice
||
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
')))
{
throw
('
Slice argument is required
');
}
...
...
@@ -1073,7 +1073,7 @@ sub fetch_by_Feature{
}
my
$slice
=
$feature
->
slice
();
if
(
!
$slice
||
(
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
&&
!
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
')
))
{
if
(
!
$slice
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
')
))
{
throw
('
Feature must be attached to a valid slice.
');
}
...
...
@@ -1361,7 +1361,7 @@ sub store {
# Get all of the sanity checks out of the way before storing anything
#
if
(
!
ref
(
$slice
)
||
!
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
ref
(
$slice
)
||
!
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
('
Slice argument is required
');
}
...
...
@@ -1467,10 +1467,10 @@ sub store_assembly{
# Get all of the sanity checks out of the way before storing anything
#
if
(
!
ref
(
$asm_slice
)
||
!
$asm_slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
ref
(
$asm_slice
)
||
!
(
$asm_slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$asm_slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
('
Assembled Slice argument is required
');
}
if
(
!
ref
(
$cmp_slice
)
||
!
$cmp_slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
if
(
!
ref
(
$cmp_slice
)
||
!
(
$cmp_slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$cmp_slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
('
Assembled Slice argument is required
');
}
...
...
modules/Bio/EnsEMBL/Exon.pm
View file @
4a9b9a8d
...
...
@@ -837,7 +837,9 @@ sub transform {
my
$self
=
shift
;
# catch for old style transform calls
if
(
!
@
_
||
(
ref
$_
[
0
]
&&
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)))
{
if
(
!
@
_
||
(
ref
$_
[
0
]
&&
(
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)
or
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::LRGSlice
"
))
))
{
deprecate
('
Calling transform without a coord system name is deprecated.
');
return
$self
->
_deprecated_transform
(
@
_
);
}
...
...
modules/Bio/EnsEMBL/FeaturePair.pm
View file @
4a9b9a8d
...
...
@@ -302,7 +302,7 @@ sub hslice {
if
(
@
_
)
{
my
$sl
=
shift
;
if
(
defined
(
$sl
)
&&
(
!
ref
(
$sl
)
||
!
$sl
->
isa
('
Bio::EnsEMBL::Slice
')))
{
if
(
defined
(
$sl
)
&&
(
!
ref
(
$sl
)
||
!
(
$sl
->
isa
('
Bio::EnsEMBL::Slice
')
or
$sl
->
isa
('
Bio::EnsEMBL::Slice
'))
))
{
throw
('
slice argument must be a Bio::EnsEMBL::Slice
');
}
...
...
modules/Bio/EnsEMBL/Gene.pm
View file @
4a9b9a8d
...
...
@@ -925,7 +925,7 @@ sub transform {
my
$self
=
shift
;
# catch for old style transform calls
if
(
!
@
_
||
(
ref
$_
[
0
]
&&
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)))
{
if
(
!
@
_
||
(
ref
$_
[
0
]
&&
(
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)
or
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::LRGSlice
"
))
))
{
deprecate
('
Calling transform without a coord system name is deprecated.
');
return
$self
->
_deprecated_transform
(
@
_
);
}
...
...
modules/Bio/EnsEMBL/MappedSlice.pm
View file @
4a9b9a8d
...
...
@@ -211,7 +211,7 @@ sub add_Slice_Mapper_pair {
my
$mapper
=
shift
;
# argument check
unless
(
$slice
and
ref
(
$slice
)
and
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
unless
(
$slice
and
ref
(
$slice
)
and
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
You must provide a slice.
");
}
...
...
modules/Bio/EnsEMBL/MappedSliceContainer.pm
View file @
4a9b9a8d
...
...
@@ -154,7 +154,7 @@ sub new {
# argument check
unless
(
$ref_slice
and
ref
(
$ref_slice
)
and
$ref_slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
(
$ref_slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$ref_slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
You must provide a reference slice.
");
}
...
...
@@ -184,7 +184,7 @@ sub _create_container_slice {
# argument check
unless
(
$ref_slice
and
ref
(
$ref_slice
)
and
$ref_slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
(
$ref_slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$ref_slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
You must provide a reference slice.
");
}
...
...
@@ -483,7 +483,7 @@ sub ref_slice {
if
(
@
_
)
{
my
$slice
=
shift
;
unless
(
ref
(
$slice
)
and
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
unless
(
ref
(
$slice
)
and
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
Need a Bio::EnsEMBL::Slice.
");
}
...
...
@@ -517,7 +517,7 @@ sub container_slice {
if
(
@
_
)
{
my
$slice
=
shift
;
unless
(
ref
(
$slice
)
and
$slice
->
isa
('
Bio::EnsEMBL::Slice
'))
{
unless
(
ref
(
$slice
)
and
(
$slice
->
isa
('
Bio::EnsEMBL::Slice
')
or
$slice
->
isa
('
Bio::EnsEMBL::LRGSlice
'))
)
{
throw
("
Need a Bio::EnsEMBL::Slice.
");
}
...
...
modules/Bio/EnsEMBL/PredictionExon.pm
View file @
4a9b9a8d
...
...
@@ -185,7 +185,7 @@ sub transform {
my
$self
=
shift
;
# catch for old style transform calls
if
(
!
@
_
||
(
ref
$_
[
0
]
&&
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)))
{
if
(
!
@
_
||
(
ref
$_
[
0
]
&&
(
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)
or
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::LRGSlice
"
))
))
{
throw
(
"
transform needs coordinate systems details now,
"
.
"
please use transfer
"
);
}
...
...
modules/Bio/EnsEMBL/PredictionTranscript.pm
View file @
4a9b9a8d
...
...
@@ -409,7 +409,7 @@ sub transform {
my
$self
=
shift
;
# catch for old style transform calls
if
(
ref
$_
[
0
]
&&
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
))
{
if
(
ref
$_
[
0
]
&&
(
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::Slice
"
)
or
$_
[
0
]
->
isa
(
"
Bio::EnsEMBL::LRGSlice
"
))
)
{
throw
("
transform needs coordinate systems details now,
"
.
"
please use transfer
");
}
...
...
modules/Bio/EnsEMBL/SeqFeature.pm
View file @
4a9b9a8d
...
...
@@ -999,7 +999,7 @@ sub transform {
# transform to slice coords from raw contig coords
return
$self
->
_transform_to_Slice
(
$slice
);
}
elsif
(
$self
->
contig
->
isa
(
"
Bio::EnsEMBL::Slice
"
))
{
elsif
(
$self
->
contig
->
isa
(
"
Bio::EnsEMBL::Slice
"
)
or
$self
->
contig
->
isa
(
"
Bio::EnsEMBL::LRGSlice
"
))
{
# transform to slice coords from other slice coords
return
$self
->
_transform_between_Slices
(
$slice
);
...
...
@@ -1088,7 +1088,7 @@ sub _transform_between_Slices {
my
$from_slice
=
$self
->
contig
;
$self
->
throw
("
New contig [
$to_slice
] is not a Bio::EnsEMBL::Slice
")
unless
$to_slice
->
isa
("
Bio::EnsEMBL::Slice
");
unless
(
$to_slice
->
isa
("
Bio::EnsEMBL::Slice
")
or
$to_slice
->
isa
("
Bio::EnsEMBL::LRGSlice
")
)
;
if
((
my
$c1
=
$from_slice
->
chr_name
)
ne
(
my
$c2
=
$to_slice
->
chr_name
))
{
$self
->
warn
("
Can't transform between chromosomes:
$c1
and
$c2
");
...
...
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