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
d3b94415
Commit
d3b94415
authored
12 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
Getting rid of a script which still refers to the contig table
parent
39b2a967
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
modules/t/info_testdb.pl
+0
-164
0 additions, 164 deletions
modules/t/info_testdb.pl
with
0 additions
and
164 deletions
modules/t/info_testdb.pl
deleted
100644 → 0
+
0
−
164
View file @
39b2a967
#
# print some information about the example genome
#
use
strict
;
use
Getopt::
Long
;
use
Bio::EnsEMBL::Test::
MultiTestDB
;
if
(
!
@ARGV
)
{
print
<<HELP
This script produces infos about the testgenome MultiTestDB.
Options are: -gene
-transcript
-exon
-translation
-analysis
-assembly
-contig
HELP
;
exit
;
}
my
(
$print_gene
,
$print_transcript
,
$print_exon
,
$print_translation
,
$print_assembly
,
$print_contig
,
$print_analysis
);
GetOptions
(
'
gene
'
=>
\
$print_gene
,
'
transcript
'
=>
\
$print_transcript
,
'
exon
'
=>
\
$print_exon
,
'
translation
'
=>
\
$print_translation
,
'
analysis
'
=>
\
$print_analysis
,
'
assembly
'
=>
\
$print_assembly
,
'
contig
'
=>
\
$print_contig
);
my
$sth
;
my
$multi
=
Bio::EnsEMBL::Test::
MultiTestDB
->
new
();
my
$db
=
$multi
->
get_DBAdaptor
(
"
core
"
);
if
(
$print_assembly
)
{
my
(
$chr
,
$chr_start
,
$chr_end
);
my
(
$contig_id
,
$contig_name
,
$id
,
$name
);
$sth
=
$db
->
prepare
(
"
select chr.name, min( a.chr_start ), max( a.chr_end )
from contig c, assembly a, chromosome chr
where c.contig_id = a.contig_id
and chr.chromosome_id = a.chromosome_id
group by a.chromosome_id
"
);
$sth
->
execute
();
$sth
->
bind_columns
(
\
$chr
,
\
$chr_start
,
\
$chr_end
);
print
"
DNA in the assembly
\n
";
while
(
$sth
->
fetch
()
)
{
print
"
Chr:
$chr
Start:
$chr_start
End:
$chr_end
\n
";
my
$slice
=
$db
->
get_SliceAdaptor
()
->
fetch_by_chr_start_end
(
$chr
,
$chr_start
,
$chr_end
);
my
$tiles
=
$slice
->
get_tiling_path
();
for
my
$tile
(
@$tiles
)
{
print
"
";
print
join
(
"
",
"
Contig:
",
$tile
->
component_Seq
->
dbID
,
"
Start:
",
$tile
->
component_start
,
"
End:
",
$tile
->
component_end
,
"
SliceStart:
",
$tile
->
assembled_start
,
"
SliceEnd:
",
$tile
->
assembled_end
(),
"
Ori:
",
$tile
->
component_ori
()
);
print
"
\n
";
}
}
}
my
(
$contig_id
,
$contig_name
,
$id
,
$name
);
if
(
$print_contig
)
{
print
"
Contig ids and names
\n
";
$sth
=
$db
->
prepare
(
"
select contig_id, name from contig
"
);
$sth
->
execute
();
$sth
->
bind_columns
(
\
$contig_id
,
\
$contig_name
);
while
(
$sth
->
fetch
()
)
{
print
"
Contig_id:
$contig_id
Name:
$contig_name
\n
";
}
}
if
(
$print_gene
)
{
print
"
Gene ids and names
\n
";
$sth
=
$db
->
prepare
(
"
select gene_id, stable_id from gene
"
);
$sth
->
execute
();
$sth
->
bind_columns
(
\
$id
,
\
$name
);
while
(
$sth
->
fetch
()
)
{
print
"
dbID:
$id
Name:
$name
\n
";
}
}
if
(
$print_transcript
)
{
print
"
Transcript ids and names.
\n
";
$sth
=
$db
->
prepare
(
"
select transcript_id, stable_id from transcript
"
);
$sth
->
execute
();
$sth
->
bind_columns
(
\
$id
,
\
$name
);
while
(
$sth
->
fetch
()
)
{
print
"
dbID:
$id
Name:
$name
\n
";
}
}
if
(
$print_translation
)
{
print
"
Translations ids and names
\n
";
$sth
=
$db
->
prepare
(
"
select translation_id, stable_id from translation
"
);
$sth
->
execute
();
$sth
->
bind_columns
(
\
$id
,
\
$name
);
while
(
$sth
->
fetch
()
)
{
print
"
dbID:
$id
Name:
$name
\n
";
}
}
if
(
$print_exon
)
{
print
"
Exon information
\n
";
$sth
=
$db
->
prepare
(
"
select et.transcript_id, e.exon_id,
e.contig_id, e.contig_start, e.contig_end, e.contig_strand
from exon e, exon_transcript et
where e.exon_id = et.exon_id
order by et.transcript_id, et.rank, e.sticky_rank
"
);
$sth
->
execute
();
my
(
$tr_id
,
$exon_id
,
$contig_start
,
$contig_end
,
$contig_strand
,
$contig_id
,
$stable_id
);
$sth
->
bind_columns
(
\
$tr_id
,
\
$exon_id
,
\
$stable_id
,
\
$contig_id
,
\
$contig_start
,
\
$contig_end
,
\
$contig_strand
);
while
(
$sth
->
fetch
()
)
{
print
"
";
print
join
(
"
",
"
Transcript id
$tr_id
",
"
exon_id
$exon_id
",
$stable_id
,
"
contig
$contig_id
",
"
start
$contig_start
",
"
end
$contig_end
",
"
strand
$contig_strand
"
);
print
"
\n
";
}
}
if
(
$print_analysis
)
{
print
"
Analysis ids and names
\n
";
$sth
=
$db
->
prepare
(
"
select * from analysis
"
);
$sth
->
execute
();
while
(
my
$hr
=
$sth
->
fetchrow_hashref
()
)
{
print
"
",
join
(
"
\n
",
%$hr
),"
\n
";
print
"
---------
\n\n
";
}
}
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