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
9617411d
Commit
9617411d
authored
23 years ago
by
Michele Clamp
Browse files
Options
Downloads
Patches
Plain Diff
New file
parent
80886be7
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
scripts/load_compara
+109
-0
109 additions, 0 deletions
scripts/load_compara
with
109 additions
and
0 deletions
scripts/load_compara
0 → 100755
+
109
−
0
View file @
9617411d
#!/usr/local/bin/perl
use
strict
;
use
Bio::EnsEMBL::DBSQL::
DBAdaptor
;
use
Bio::EnsEMBL::
FeaturePair
;
use
Getopt::
Long
;
my
$host
=
'
ecs1d
';
my
$dbname1
=
'
homo_sapiens_core_130
',
my
$dbname2
=
'
mus_musculus_core_1_3
',
my
$dbuser
=
'
ensadmin
';
my
$pass
=
'
ensembl
';
my
$infile
;
$|
=
1
;
&GetOptions
(
'
host:s
'
=>
\
$host
,
'
dbuser:s
'
=>
\
$dbuser
,
'
dbname1:s
'
=>
\
$dbname1
,
'
dbname2:s
'
=>
\
$dbname2
,
'
pass:s
'
=>
\
$pass
,
'
infile:s
'
=>
\
$infile
,
);
print
STDERR
"
Time in dumpgff
"
.
time
.
"
\n
";
my
$humandb
=
new
Bio::EnsEMBL::DBSQL::
DBAdaptor
(
-
host
=>
$host
,
-
user
=>
$dbuser
,
-
dbname
=>
$dbname1
,
-
pass
=>
$pass
,
-
perlonlyfeatures
=>
0
);
my
$mousedb
=
new
Bio::EnsEMBL::DBSQL::
DBAdaptor
(
-
host
=>
$host
,
-
user
=>
$dbuser
,
-
dbname
=>
$dbname2
,
-
pass
=>
$pass
,
-
perlonlyfeatures
=>
0
);
print
STDERR
"
Time after db
"
.
time
.
"
\n
";
open
(
IN
,"
<
$infile
")
||
die
"
Can't open [
$infile
]
";
my
%contig
;
open
(
MUS
,"
>mouse_human.sql
");
open
(
HUM
,"
>human_mouse.sql
");
while
(
<
IN
>
)
{
eval
{
chomp
;
my
@f
=
split
('
',
$_
);
my
$h_contig
=
$f
[
0
];
my
$h_start
=
$f
[
1
];
my
$h_end
=
$f
[
2
];
my
$hstrand
=
$f
[
3
];
my
$m_contig
=
$f
[
4
];
my
$m_start
=
$f
[
5
];
my
$m_end
=
$f
[
6
];
my
$m_ori
=
$f
[
7
];
# print STDERR "$h_contig:$h_start:$h_end:$m_contig:$m_start\n";
if
(
!
defined
(
$contig
{
$h_contig
}))
{
my
$tmp
=
$humandb
->
get_Contig
(
$h_contig
);
$contig
{
$h_contig
}
=
$tmp
;
}
if
(
!
defined
(
$contig
{
$m_contig
}))
{
my
$tmp
=
$mousedb
->
get_Contig
(
$m_contig
);
$contig
{
$m_contig
}
=
$tmp
;
}
my
$hcontigid
=
$contig
{
$h_contig
}
->
internal_id
;
my
$mcontigid
=
$contig
{
$m_contig
}
->
internal_id
;
#my $h_rawori = get_orientation($contig{$h_contig},$humandb);
#my $m_rawori = get_orientation($contig{$m_contig},$mousedb);
print
HUM
"
\\
N
\t
$hcontigid
\t
$h_start
\t
$h_end
\t
100
\t
$m_ori
\t
1
\t
exonerate
\t
$m_start
\t
$m_end
\t
$m_contig
\t
NULL
\t
0
\t
0
\t
0
\n
";
print
MUS
"
\\
N
\t
$mcontigid
\t
$m_start
\t
$m_end
\t
100
\t
$m_ori
\t
1
\t
exonerate
\t
$h_start
\t
$h_end
\t
$h_contig
\t
NULL
\t
0
\t
0
\t
0
\n
";
};
if
(
$@
)
{
print
STDERR
"
Couldn't parse
$_
\n
[$@]
\n
";
}
}
sub
get_orientation
{
my
(
$contig
,
$db
)
=
@_
;
my
$query
=
"
select raw_ori from static_golden_path where raw_id =
"
.
$contig
->
internal_id
;
my
$sth
=
$db
->
prepare
(
$query
);
my
$res
=
$sth
->
execute
;
my
$ref
=
$sth
->
fetchrow_hashref
;
return
$ref
->
{
raw_ori
};
}
close
(
IN
);
close
(
HUM
);
close
(
MUS
);
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