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
14066c44
Commit
14066c44
authored
13 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
look for assembled and component overlaps
parent
75297b92
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
misc-scripts/assembly/find_overlaps.pl
+19
-9
19 additions, 9 deletions
misc-scripts/assembly/find_overlaps.pl
with
19 additions
and
9 deletions
misc-scripts/assembly/find_overlaps.pl
+
19
−
9
View file @
14066c44
...
...
@@ -104,11 +104,13 @@ my $sql = qq(
GROUP BY asm_name, asm_version, cmp_name, cmp_version
)
;
my
$sth
=
$dbh
->
prepare
(
$sql
);
$sth
->
execute
;
my
$fmt1
=
"
%6s %6s %10s %10s %10s %10s %3s
\n
";
my
$fmt1
=
"
%6s %6s %10s %10s %10s %10s %3s %3s %3s
\n
";
foreach
my
$type
(
qw(asm cmp)
){
my
$sth
=
$dbh
->
prepare
(
$sql
);
$sth
->
execute
;
while
(
my
(
$asm_name
,
$asm_version
,
$cmp_name
,
$cmp_version
)
=
$sth
->
fetchrow_array
)
{
...
...
@@ -138,7 +140,8 @@ while (my ($asm_name, $asm_version, $cmp_name, $cmp_version) =
$cmp_version
=
'
NULL
';
}
$sql1
.=
'
ORDER BY a.asm_seq_region_id, a.asm_start, a.asm_end
';
$sql1
.=
"
ORDER BY a.
"
.
$type
.
"
_seq_region_id, a.
"
.
$type
.
"
_start ASC, a.
"
.
$type
.
"
_end
";
$support
->
log_stamped
("
$asm_name
.
$asm_version
$cmp_name
.
$cmp_version
\n
");
...
...
@@ -147,14 +150,22 @@ while (my ($asm_name, $asm_version, $cmp_name, $cmp_version) =
# do an initial fetch
my
$last
=
$sth1
->
fetchrow_hashref
;
# foreach my $key (qw(asm_seq_region_id asm_sr_name cmp_seq_region_id cmp_sr_name asm_start asm_end cmp_start cmp_end ori)){
# print $key." = ".$last->{$key}."\t";
# }
# print "\n";
my
$i
=
0
;
while
(
$last
and
(
my
$r
=
$sth1
->
fetchrow_hashref
))
{
# foreach my $key (qw(asm_seq_region_id asm_sr_name cmp_seq_region_id cmp_sr_name asm_start asm_end cmp_start cmp_end ori)){
# print $key." = ".$r->{$key}."\t";
# }
# print "\n";
# look for overlaps with last segment
if
(
$last
->
{
'
asm
_seq_region_id
'}
==
$r
->
{
'
asm
_seq_region_id
'}
and
$last
->
{
'
asm
_end
'}
>=
$r
->
{
'
asm
_start
'})
{
if
(
$last
->
{
$type
.
'
_seq_region_id
'}
==
$r
->
{
$type
.
'
_seq_region_id
'}
and
$last
->
{
$type
.
'
_end
'}
>=
$r
->
{
$type
.
'
_start
'})
{
$i
++
;
...
...
@@ -175,9 +186,8 @@ while (my ($asm_name, $asm_version, $cmp_name, $cmp_version) =
$support
->
log
("
\n
Found
$i
overlaps.
\n\n
",
1
);
}
$sth
->
finish
;
}
# finish logfile
$support
->
finish_log
;
...
...
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