Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
ef55b4e4
Commit
ef55b4e4
authored
23 years ago
by
Web Admin
Browse files
Options
Downloads
Patches
Plain Diff
Added "partially specified band" call
parent
45781b93
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm
+24
-25
24 additions, 25 deletions
modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm
with
24 additions
and
25 deletions
modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm
+
24
−
25
View file @
ef55b4e4
...
...
@@ -163,15 +163,13 @@ sub fetch_by_chromosome_name{
$self
->
throw
("
Need both chromosome and name
")
unless
defined
$name
;
my
$sth
=
$self
->
prepare
("
SELECT chr_start,
chr_end,
stain
FROM karyotype
WHERE chr_name = '
$chr
'
AND band = '
$name
'
");
my
$sth
=
$self
->
prepare
(
"
select chr_start, chr_end, stain
from karyotype
where chr_name = ? and band = ?
"
);
$sth
->
execute
(
$chr
,
$name
);
$sth
->
execute
;
my
(
$chr_start
,
$chr_end
,
$stain
)
=
$sth
->
fetchrow_array
;
return
undef
unless
defined
$chr_start
;
...
...
@@ -192,35 +190,36 @@ sub fetch_by_chromosome_name{
Usage : $band_obj = $kary_adp->fetch_by_chromosome_name('chr1','q23.1');
Function: Retrieves a KaryotypeBand obj by its chromosome ('chrN' notation)
and its band name (e.g. 'q23.1'). { can also use a non-fully declared band:
e.g. q23
e.g. q23
, q23.3
Example :
Returns : A KaryotypeBand object DOES NOT RETURN STAIN INFORMATION!!!!!
Args : Chromosome id (chrN notation) and band name
Returns : A KaryotypeBand object BUT DOES NOT RETURN STAIN INFORMATION!!!!!
: (as we can not get this from the information we retrieve)
Args : Chromosome id (chrN notation) and (partial?) band name
=cut
sub
fetch_by_chromosome_name_virtual
{
sub
fetch_by_chromosome_name_virtual
{
my
(
$self
,
$chr
,
$name
)
=
@_
;
$self
->
throw
("
Need both chromosome and name
")
unless
defined
$name
;
my
$sth
;
$sth
=
$self
->
prepare
(
"
SELECT chr_start,
chr_end
FROM
karyotype
WHERE chr_name = '
$chr
'
AND band = '
$name
'
"
);
$sth
->
execute
;
my
(
$chr_start
,
$chr_end
)
=
$sth
->
fetchrow_array
;
$sth
=
$self
->
prepare
(
"
select chr_start,
chr_end
from
karyotype
where chr_name = ? and band = ?
"
);
$sth
->
execute
(
$chr
,
$name
)
;
my
(
$chr_start
,
$chr_end
)
=
$sth
->
fetchrow_array
;
unless
(
$chr_start
)
{
$sth
=
$self
->
prepare
(
"
SELECT min(chr_start),
max(chr_end)
FROM
karyotype
WHERE chr_name = '
$chr
'
AND band like '
$name
.
\
%'
"
);
$sth
=
$self
->
prepare
(
"
select min(chr_start),
max(chr_end)
from
karyotype
where chr_name = '
$chr
' and band like '
$name
\
%'
"
);
$sth
->
execute
;
(
$chr_start
,
$chr_end
)
=
$sth
->
fetchrow_array
;
(
$chr_start
,
$chr_end
)
=
$sth
->
fetchrow_array
;
}
return
undef
unless
defined
$chr_start
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment