Skip to content
Snippets Groups Projects
Commit 005f2dee authored by ChuangKee Ong's avatar ChuangKee Ong
Browse files

To use infor from provider meta key to update annotation source

parent 6a32827f
No related branches found
No related tags found
2 merge requests!104To use dbprimary_acc instead of display_id;Fix GO source duplication,!104To use dbprimary_acc instead of display_id;Fix GO source duplication
......@@ -76,8 +76,8 @@ my $DUMP_HANDLERS =
'GENBANK' => \&dump_genbank };
my @COMMENTS =
('This sequence was annotated by the Ensembl system. Please visit ' .
'the Ensembl web site, http://www.ensembl.org/ or http://www.ensemblgenomes.org/ for more information.',
('This sequence was annotated by ###SOURCE###. Please visit ' .
'the Ensembl or EnsemblGenomes web site, http://www.ensembl.org/ or http://www.ensemblgenomes.org/ for more information.',
'All feature locations are relative to the first (5\') base ' .
'of the sequence in this file. The sequence presented is '.
......@@ -473,11 +473,22 @@ sub dump_embl {
$self->print( $FH, "XX\n" );
#References (we are not dumping refereneces)
#Database References (we are not dumping these)
#Get annotation source
my ($provider_name) = @{$meta_container->list_value_by_key('provider.name')};
my ($provider_url) = @{$meta_container->list_value_by_key('provider.url')};
my $annotation_source = q{};
if($provider_name) {
$annotation_source .= $provider_name;
$annotation_source .= sprintf(q{(%s)}, $provider_url) if $provider_url;
}
else { $annotation_source .= 'Ensembl'; }
#comments
foreach my $comment (@COMMENTS) {
$comment =~ s/\#\#\#SOURCE\#\#\#/$annotation_source/;
$self->write($FH, $EMBL_HEADER, 'CC', $comment);
$self->print( $FH, "XX\n" );
}
......@@ -656,8 +667,20 @@ sub dump_genbank {
#refereneces
#Get annotation source
my ($provider_name) = @{$meta_container->list_value_by_key('provider.name')};
my ($provider_url) = @{$meta_container->list_value_by_key('provider.url')};
my $annotation_source = q{};
if($provider_name) {
$annotation_source .= $provider_name;
$annotation_source .= sprintf(q{(%s)}, $provider_url) if $provider_url;
}
else { $annotation_source .= 'Ensembl'; }
#comments
foreach my $comment (@COMMENTS) {
$comment =~ s/\#\#\#SOURCE\#\#\#/$annotation_source/;
$self->write($FH, $GENBANK_HEADER, 'COMMENT', $comment);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment