Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
219dfe13
Commit
219dfe13
authored
Jun 26, 2015
by
Magali Ruffier
Browse files
add more fields for GFF3 format
parent
c1eba9c1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
4 deletions
+47
-4
modules/Bio/EnsEMBL/Exon.pm
modules/Bio/EnsEMBL/Exon.pm
+1
-0
modules/Bio/EnsEMBL/Feature.pm
modules/Bio/EnsEMBL/Feature.pm
+3
-1
modules/Bio/EnsEMBL/Gene.pm
modules/Bio/EnsEMBL/Gene.pm
+1
-0
modules/Bio/EnsEMBL/Transcript.pm
modules/Bio/EnsEMBL/Transcript.pm
+35
-0
modules/Bio/EnsEMBL/Translation.pm
modules/Bio/EnsEMBL/Translation.pm
+4
-1
modules/Bio/EnsEMBL/Utils/IO/GFFSerializer.pm
modules/Bio/EnsEMBL/Utils/IO/GFFSerializer.pm
+3
-2
No files found.
modules/Bio/EnsEMBL/Exon.pm
View file @
219dfe13
...
...
@@ -1595,6 +1595,7 @@ sub summary_as_hash {
$summary_ref
->
{'
constitutive
'}
=
$self
->
is_constitutive
;
$summary_ref
->
{'
ensembl_phase
'}
=
$self
->
phase
;
$summary_ref
->
{'
ensembl_end_phase
'}
=
$self
->
end_phase
;
$summary_ref
->
{'
exon_id
'}
=
$summary_ref
->
{'
id
'};
return
$summary_ref
;
}
...
...
modules/Bio/EnsEMBL/Feature.pm
View file @
219dfe13
...
...
@@ -1470,7 +1470,9 @@ sub get_nearest_Gene {
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
id
'}
=
$self
->
display_id
;
my
$id
=
$self
->
display_id
;
if
(
$self
->
version
())
{
$id
.=
"
.
"
.
$self
->
version
();
}
$summary
{'
id
'}
=
$id
;
$summary
{'
version
'}
=
$self
->
version
()
if
$self
->
version
();
$summary
{'
start
'}
=
$self
->
seq_region_start
;
$summary
{'
end
'}
=
$self
->
seq_region_end
;
...
...
modules/Bio/EnsEMBL/Gene.pm
View file @
219dfe13
...
...
@@ -1482,6 +1482,7 @@ sub summary_as_hash {
$summary_ref
->
{'
Name
'}
=
$self
->
external_name
if
$self
->
external_name
;
$summary_ref
->
{'
logic_name
'}
=
$self
->
analysis
->
logic_name
();
$summary_ref
->
{'
source
'}
=
$self
->
source
();
$summary_ref
->
{'
gene_id
'}
=
$summary_ref
->
{'
id
'};
return
$summary_ref
;
}
...
...
modules/Bio/EnsEMBL/Transcript.pm
View file @
219dfe13
...
...
@@ -3051,9 +3051,44 @@ sub summary_as_hash {
my
$parent_gene
=
$self
->
get_Gene
();
$summary_ref
->
{'
Parent
'}
=
$parent_gene
->
stable_id
;
$summary_ref
->
{'
source
'}
=
$parent_gene
->
source
();
$summary_ref
->
{'
transcript_id
'}
=
$summary_ref
->
{'
id
'};
$summary_ref
->
{'
havana_transcript
'}
=
$self
->
havana_transcript
->
display_id
()
if
$self
->
havana_transcript
();
$summary_ref
->
{'
ccdsid
'}
=
$self
->
ccds
->
display_id
()
if
$self
->
ccds
();
return
$summary_ref
;
}
=head2 havana_transcript
Example : $havana_transcript = $transcript->havana_transcript();
Description : Locates the corresponding havana transcript
Returns : Bio::EnsEMBL::DBEntry
=cut
sub
havana_transcript
{
my
$self
=
shift
;
my
@otts
=
@
{
$self
->
get_all_DBEntries
('
OTTT
')
};
my
$ott
;
$ott
=
$otts
[
0
]
if
scalar
(
@otts
)
>
0
;
return
$ott
;
}
=head2 ccds
Example : $ccds = $transcript->ccds();
Description : Locates the corresponding ccds xref
Returns : Bio::EnsEMBL::DBEntry
=cut
sub
ccds
{
my
$self
=
shift
;
my
@ccds
=
@
{
$self
->
get_all_DBEntries
('
CCDS
')
};
my
$ccds
;
$ccds
=
$ccds
[
0
]
if
scalar
(
@ccds
)
>
0
;
return
$ccds
;
}
=head2 get_Gene
Example : $gene = $transcript->get_Gene;
...
...
modules/Bio/EnsEMBL/Translation.pm
View file @
219dfe13
...
...
@@ -1233,7 +1233,10 @@ sub get_all_DAS_Features{
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
id
'}
=
$self
->
display_id
;
my
$id
=
$self
->
display_id
;
if
(
$self
->
version
)
{
$id
.=
"
.
"
.
$self
->
version
;
}
$summary
{'
id
'}
=
$id
;
$summary
{'
protein_id
'}
=
$id
;
$summary
{'
genomic_start
'}
=
$self
->
genomic_start
;
$summary
{'
genomic_end
'}
=
$self
->
genomic_end
;
$summary
{'
length
'}
=
$self
->
length
;
...
...
modules/Bio/EnsEMBL/Utils/IO/GFFSerializer.pm
View file @
219dfe13
...
...
@@ -205,9 +205,8 @@ sub print_feature {
my
@ordered_values
=
@summary
{
@ordered_keys
};
while
(
my
$key
=
shift
@ordered_keys
)
{
my
$value
=
shift
@ordered_values
;
delete
$summary
{
$key
};
if
(
$value
&&
$value
ne
'')
{
if
(
$key
eq
'
id
'
)
{
if
(
$key
=~
/
id
/
)
{
if
(
$feature
->
isa
('
Bio::EnsEMBL::Transcript
'))
{
$value
=
'
transcript:
'
.
$value
;
}
elsif
(
$feature
->
isa
('
Bio::EnsEMBL::Gene
'))
{
...
...
@@ -217,6 +216,8 @@ sub print_feature {
}
else
{
$value
=
$so_term
.
'
:
'
.
$value
;
}
}
else
{
delete
$summary
{
$key
};
}
if
(
$key
eq
'
Parent
')
{
if
(
$feature
->
isa
('
Bio::EnsEMBL::Transcript
'))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment