Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
ensembl-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Jira
Jira
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ensembl-gh-mirror
ensembl-test
Commits
26dafa5a
Unverified
Commit
26dafa5a
authored
Jul 09, 2019
by
Marek Szuba
Committed by
GitHub
Jul 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38 from JAlvarezJarreta/master
Fixed bug when core dbs don't have contigs
parents
adcdaf7c
0d0374dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
scripts/clone_core_database.pl
scripts/clone_core_database.pl
+9
-19
No files found.
scripts/clone_core_database.pl
View file @
26dafa5a
...
...
@@ -215,9 +215,6 @@ sub copy_globals {
# Starts the copy across of Slices
sub
copy_regions
{
my
(
$self
,
$from
,
$to
,
$regions
,
$is_dna
)
=
@_
;
my
$coord_sql
=
"
select name, coord_system_id from coord_system
";
my
$coord_systems
=
$to
->
dbc
->
sql_helper
()
->
execute_into_hash
(
-
SQL
=>
$coord_sql
);
my
$slice_adaptor
=
$from
->
get_adaptor
("
Slice
");
my
$seq_region_names
;
...
...
@@ -229,7 +226,7 @@ sub copy_regions {
my
(
$name
,
$start
,
$end
,
$coord_system
,
$version
)
=
@
{
$region
};
my
$strand
=
undef
;
$coord_system
||=
'
toplevel
';
#Make the assumption that the core API is OK
and that the 3 levels of assembly are chromosome, supercontig and contig
#Make the assumption that the core API is OK
#Also only get those slices which are unique
my
$slice
=
$slice_adaptor
->
fetch_by_region
(
$coord_system
,
$name
,
$start
,
$end
,
$strand
,
$version
);
if
(
!
$slice
)
{
...
...
@@ -237,22 +234,15 @@ sub copy_regions {
next
;
}
push
(
@toplevel_slices
,
$slice
);
my
$supercontigs
;
#May not always have supercontigs
if
(
$coord_systems
->
{'
supercontig
'}
)
{
$supercontigs
=
$slice
->
project
('
supercontig
');
foreach
my
$supercontig
(
@$supercontigs
)
{
my
$supercontig_slice
=
$supercontig
->
[
2
];
$seq_region_id_list
{
$supercontig_slice
->
get_seq_region_id
}
=
1
;
}
}
#Assume always have contigs
my
$contigs
=
$slice
->
project
('
contig
');
foreach
my
$contig
(
@$contigs
)
{
my
$contig_slice
=
$contig
->
[
2
];
$seq_region_id_list
{
$contig_slice
->
get_seq_region_id
}
=
1
;
#'sequence_level' can be different than 'contig' (e.g. 'primary_assembly')
my
$fragments
=
$slice
->
project
('
seqlevel
');
if
(
scalar
@$fragments
==
0
)
{
die
"
No assemblies projected from 'seqlevel' to '
$coord_system
'
";
}
foreach
my
$frag
(
@$fragments
)
{
my
$frag_slice
=
$frag
->
[
2
];
$seq_region_id_list
{
$frag_slice
->
get_seq_region_id
}
=
1
;
}
}
...
...
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