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
faebf5ff
Commit
faebf5ff
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
removed very old script
parent
e20cb5fe
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/mouse_reads/features_from_cigar.pl
+0
-80
0 additions, 80 deletions
misc-scripts/mouse_reads/features_from_cigar.pl
with
0 additions
and
80 deletions
misc-scripts/mouse_reads/features_from_cigar.pl
deleted
100644 → 0
+
0
−
80
View file @
e20cb5fe
# This script takes as argument the name of a gzipped cigar file,
# which contains exonerate result from mouse traces to human dna
# you have to provide an empty ensembl database with just contig table
# filled
# lots of empty diskspace
# change db deatils below !!
use
DBI
;
# only use with local host!
my
$file
=
shift
;
my
$dsn
=
"
DBI:mysql:database=mouse_jun_hum_apr_arne;host=localhost
";
my
$dbh
=
DBI
->
connect
(
$dsn
,'
root
');
my
$tmpfile
=
"
/scratch1/ensembl/arne/mouse_features.txt
";
open
(
EXONERATE
,
"
gzip -dc
$file
|
"
)
or
die
(
"
cant open exonerate cigar line file
"
);
open
(
TMP
,
"
>
$tmpfile
"
)
or
die
("
cant open tmpfile
$tmpfile
");
# print join( "\t", contig, seq_start, seq_end, score, strand, analysis, "exonerate_gapped", hstart, hend, hid )
$sth
=
$dbh
->
prepare
(
"
select internal_id, id from contig
"
);
my
(
$internal
,
$external
);
$sth
->
execute
();
$sth
->
bind_columns
(
\
$internal
,
\
$external
);
while
(
$sth
->
fetch
()
)
{
$contigHash
{
$external
}
=
$internal
;
}
my
$count
=
0
;
while
(
<
EXONERATE
>
)
{
chomp
;
split
;
(
$hid
)
=
$_
[
2
]
=~
/(.*)-[0-9]*$/
;
$hstart
=
$_
[
3
]
+
1
;
$hend
=
$_
[
4
];
$strand
=
(
$_
[
5
]
eq
'
-
')
?
-
1
:
1
;
$contig
=
$contigHash
{
$_
[
6
]};
$seq_start
=
$_
[
7
]
+
1
;
$seq_end
=
$_
[
8
];
$score
=
$_
[
10
];
$analysis
=
1
;
print
TMP
(
join
(
"
\t
",(
$contig
,
$seq_start
,
$seq_end
,
$score
,
$strand
,
$analysis
,
"
exonerate_gapped
",
$hstart
,
$hend
,
$hid
)),
"
\n
"
);
$count
++
;
if
(
$count
%
100000
==
0
)
{
print
STDERR
"
.
";
# exit;
}
}
$dbh
->
do
(
"
load data infile '
$tmpfile
' into table feature( contig, seq_start, seq_end, score, strand, analysis, name, hstart, hend, hid )
"
);
$dbh
->
do
(
"
insert into analysis( id, db, db_version, program, program_version, gff_source, gff_feature) values( 1,
\"
exonerate_gapped
\"
,
\"\"
,
\"
exonerate
\"
,
\"
1
\"
,
\"
exonerate_gapped
\"
,
\"
similarity
\"
)
"
);
$dbh
->
disconnect
();
exit
;
# algorithm
# build contig internal hash
# read cigar lines from gzip -dc pipe
# print feature lines into tmpfile
# issue load data infile command .
# fill in one row in analysis table..
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