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
01bb2f1c
Commit
01bb2f1c
authored
22 years ago
by
Michele Clamp
Browse files
Options
Downloads
Patches
Plain Diff
Even if no chromosome exists in the database an empty one is returned.
Now returns null
parent
4f3123af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/DBSQL/ChromosomeAdaptor.pm
+4
-3
4 additions, 3 deletions
modules/Bio/EnsEMBL/DBSQL/ChromosomeAdaptor.pm
with
4 additions
and
3 deletions
modules/Bio/EnsEMBL/DBSQL/ChromosomeAdaptor.pm
+
4
−
3
View file @
01bb2f1c
...
...
@@ -140,7 +140,7 @@ sub fetch_by_dbID {
sub
fetch_by_chr_name
{
my
(
$self
,
$chr_name
)
=
@_
;
my
$chr
=
()
;
my
$chr
=
undef
;
unless
(
defined
$chr_name
)
{
$self
->
throw
("
Chromosome name argument required
\n
");
...
...
@@ -164,6 +164,8 @@ sub fetch_by_chr_name{
my
(
$dbID
,
$known_genes
,
$unknown_genes
,
$snps
,
$length
);
$sth
->
bind_columns
(
\
$dbID
,
\
$known_genes
,
\
$unknown_genes
,
\
$snps
,
\
$length
);
if
(
$sth
->
rows
>
0
)
{
$sth
->
fetch
();
$chr
=
new
Bio::EnsEMBL::
Chromosome
(
-
adaptor
=>
$self
,
...
...
@@ -176,9 +178,8 @@ sub fetch_by_chr_name{
$self
->
{'
_chr_cache
'}
->
{
$dbID
}
=
$chr
;
$self
->
{'
_chr_name_cache
'}
->
{
$chr_name
}
=
$chr
;
}
}
return
$chr
;
}
...
...
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