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
598f5b73
Commit
598f5b73
authored
23 years ago
by
humpub
Browse files
Options
Downloads
Patches
Plain Diff
lace acedb fix
parent
d93b31f4
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/Bio/EnsEMBL/DB/ContigI.pm
+20
-15
20 additions, 15 deletions
modules/Bio/EnsEMBL/DB/ContigI.pm
with
20 additions
and
15 deletions
modules/Bio/EnsEMBL/DB/ContigI.pm
+
20
−
15
View file @
598f5b73
...
...
@@ -601,7 +601,7 @@ sub get_AnnSeq {
Usage : $contig->write_acedb(\*FILEHANDLE);
$contig->write_acedb(\*FILEHANDLE, $ace_seq_name, $type, $supp_evid, $revcom, $url_obj);
Function: Dumps exons, transcript and gene objects of a contig in acedb format
Returns :
Returns :
number of genes dumped
Args : \*FILEHANDLE: file handle where the file is going to be written
$ace_seq_name: name of the aceDB-clone name
$type: type of gene in the ensEMBL database (default is 'ensembl')
...
...
@@ -612,7 +612,8 @@ sub get_AnnSeq {
sub
write_acedb
{
my
(
$self
,
$fh
,
$seqname
,
$type
,
$supp_evid
,
$revcom
,
$url_ob
)
=
@_
;
my
$nexons
=
0
;
my
$contig_id
=
$self
->
id
();
$type
||=
'
ensembl
';
...
...
@@ -621,17 +622,18 @@ sub write_acedb {
# get all genes
my
@genes
=
$self
->
get_Genes_by_Type
(
$type
,
$supp_evid
);
my
@genes
=
$self
->
get_Genes_by_Type
(
$type
);
# exit if the clone has no genes
unless
(
@genes
)
{
print
STDERR
"
'
$seqname
' has no genes
\n
";
return
;
return
$nexons
;
}
GENE:
foreach
my
$gene
(
@genes
){
my
$gene_id
=
$gene
->
id
;
my
$gene_id
=
$gene
->
stable_id
;
$gene_id
=
$gene
->
dbID
unless
$gene_id
;
# get all the transcripts of this gene.
my
@trans_in_gene
=
$gene
->
each_Transcript
;
...
...
@@ -644,21 +646,23 @@ sub write_acedb {
# for each transcript
TRANSCRIPT:
foreach
my
$trans
(
@trans_in_gene
)
{
my
$trans_id
=
$trans
->
id
;
foreach
my
$trans
(
@trans_in_gene
)
{
my
$trans_id
=
$trans
->
stable_id
;
$trans_id
=
$trans
->
dbID
unless
$trans_id
;
my
$description
=
$trans
->
description
;
# get all exons of this transcript
my
@exons
=
$trans
->
each
_Exon
;
my
@exons
=
$trans
->
get_all
_Exon
s
;
# get transcript exons which belong to the contig
my
@exons_in_contig
;
foreach
my
$exon
(
@exons
)
{
if
(
$exon
->
contig_id
eq
$contig_id
)
{
push
(
@exons_in_contig
,
$exon
);
}
}
foreach
my
$exon
(
@exons
)
{
if
(
$exon
->
contig_id
eq
$contig_id
)
{
push
(
@exons_in_contig
,
$exon
);
$nexons
++
;
}
}
if
(
@exons_in_contig
)
{
my
$tstart
;
...
...
@@ -667,7 +671,7 @@ sub write_acedb {
my
$ace_tend
;
my
$tstrand
=
$exons_in_contig
[
0
]
->
strand
;
# check the strand and get the coordinates
# check the strand and get the coordinates
if
(
$tstrand
==
1
)
{
$tstart
=
$exons_in_contig
[
0
]
->
start
;
$tend
=
$exons_in_contig
[
$#exons_in_contig
]
->
end
;
...
...
@@ -726,6 +730,7 @@ sub write_acedb {
}
}
}
return
$nexons
;
}
...
...
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