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
0f9ae074
Commit
0f9ae074
authored
Jul 13, 2004
by
Web Admin
Browse files
addeded feature strand attribute on SliceAdaptor
parent
1575a404
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+2
-2
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+3
-1
modules/Bio/EnsEMBL/MiscFeature.pm
modules/Bio/EnsEMBL/MiscFeature.pm
+8
-1
No files found.
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
View file @
0f9ae074
...
...
@@ -41,8 +41,8 @@ use Bio::EnsEMBL::Utils::Cache;
@ISA
=
qw(Bio::EnsEMBL::DBSQL::BaseAdaptor)
;
our
$SEQ_CHUNK_PWR
=
18
;
# 2^18 = approx. 250KB
our
$SEQ_CACHE_SZ
=
5
;
our
$SEQ_CHUNK_PWR
=
22
;
# 2^18 = approx. 250KB
our
$SEQ_CACHE_SZ
=
10
;
our
$SEQ_CACHE_MAX
=
(
2
**
$SEQ_CHUNK_PWR
)
*
$SEQ_CACHE_SZ
;
...
...
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
0f9ae074
...
...
@@ -925,7 +925,7 @@ sub fetch_by_Feature{
$size
=
int
(
(
$
1
-
100
)
/200 * ($fend-$fstart+1) ) if( $size =~/
([
\
d
+\.
]
+
)
%/
);
#return a new slice covering the region of the feature
return
Bio::EnsEMBL::
Slice
->
new
my
$S
=
Bio::EnsEMBL::
Slice
->
new
(
-
seq_region_name
=>
$slice
->
seq_region_name
,
-
seq_region_length
=>
$slice
->
seq_region_length
,
-
coord_system
=>
$slice
->
coord_system
,
...
...
@@ -933,6 +933,8 @@ sub fetch_by_Feature{
-
end
=>
$fend
+
$size
,
-
strand
=>
1
,
-
adaptor
=>
$self
);
$S
->
{'
_raw_feature_strand
'}
=
$feature
->
strand
*
$slice_strand
if
$feature
->
can
('
strand
');
return
$S
;
}
...
...
modules/Bio/EnsEMBL/MiscFeature.pm
View file @
0f9ae074
...
...
@@ -240,10 +240,16 @@ sub get_all_attribute_values {
my
@results
=
map
{
uc
(
$_
->
code
()
)
eq
uc
(
$code
)
?
$_
->
value
:
()
}
@
{
$self
->
{'
attributes
'}};
return
\
@results
;
}
sub
get_scalar_attribute
{
my
$self
=
shift
;
my
$code
=
shift
;
my
@results
=
grep
{
uc
(
$_
->
code
()
)
eq
uc
(
$code
)}
@
{
$self
->
{'
attributes
'}};
my
@results
;
if
(
$code
eq
'
name
'
)
{
@results
=
grep
{
uc
(
$_
->
code
()
)
eq
'
NAME
'
||
uc
(
$_
->
code
()
)
eq
'
NON_REF
'
}
@
{
$self
->
{'
attributes
'}};
}
else
{
@results
=
grep
{
uc
(
$_
->
code
()
)
eq
uc
(
$code
)}
@
{
$self
->
{'
attributes
'}};
}
return
@results
?
$results
[
0
]
->
value
()
:
'';
}
...
...
@@ -263,6 +269,7 @@ sub get_scalar_attribute {
sub
display_id
{
my
$self
=
shift
;
my
(
$attrib
)
=
@
{
$self
->
get_all_Attributes
('
name
')};
(
$attrib
)
=
@
{
$self
->
get_all_Attributes
('
non_ref
')}
if
(
!
$attrib
);
(
$attrib
)
=
@
{
$self
->
get_all_Attributes
('
synonym
')}
if
(
!
$attrib
);
if
(
defined
$attrib
)
{
return
$attrib
->
value
();
...
...
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