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
366fca53
Commit
366fca53
authored
6 years ago
by
Thibaut Hourlier
Browse files
Options
Downloads
Patches
Plain Diff
Removed stable id check in loop. Added comments
parent
a8b6934d
No related branches found
No related tags found
4 merge requests
!331
Use seq_region_start and seq_region_end when updating gene coordinate…
,
!342
Feature/schema update 96
,
!342
Feature/schema update 96
,
!331
Use seq_region_start and seq_region_end when updating gene coordinate…
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/t/gene.t
+8
-5
8 additions, 5 deletions
modules/t/gene.t
with
8 additions
and
5 deletions
modules/t/gene.t
+
8
−
5
View file @
366fca53
...
...
@@ -474,15 +474,18 @@ cmp_ok($new_gene->start(), '==', 30735607, 'Updated gene start');
cmp_ok
(
$new_gene
->
end
(),
'
==
',
30815178
,
'
Updated gene end
');
# test update_coords method when working on sub Slice
my
$update_slice
=
$db
->
get_SliceAdaptor
()
->
fetch_by_region
('
chromosome
',
'
20
',
30730000
,
30815178
);
# to avoid setting the start and end relative to a sub Slice
# correct coords: 30735607 - 30815178
# wrong coords: 1 - 79572
my
$update_slice
=
$db
->
get_SliceAdaptor
()
->
fetch_by_gene_stable_id
('
ENSG00000171456
');
# Make sure that the slice of the gene is a sub Slice
my
$update_genes
=
$update_slice
->
get_all_Genes
();
cmp_ok
(
scalar
(
@$update_genes
),
'
>=
',
1
,
'
Check the region has at least one gene
');
# Update the coordinates of the gene in the database
foreach
my
$gene_to_update
(
@$update_genes
)
{
if
(
$gene_to_update
->
stable_id
()
eq
'
ENSG00000171456
')
{
$ga
->
update_coords
(
$gene_to_update
);
}
$ga
->
update_coords
(
$gene_to_update
);
}
# Fetch the gene again to check the coordinates
my
$updated_gene
=
$ga
->
fetch_by_stable_id
("
ENSG00000171456
");
cmp_ok
(
$updated_gene
->
start
(),
'
==
',
30735607
,
'
Updated gene start
');
cmp_ok
(
$updated_gene
->
end
(),
'
==
',
30815178
,
'
Updated gene end
');
...
...
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