Skip to content
Snippets Groups Projects
Commit f90bcb31 authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Separate out protein_id xrefs into additional fields.

parent d6591ba0
No related branches found
No related tags found
No related merge requests found
......@@ -140,13 +140,18 @@ sub content {
p ("</dates>");
}
# xrefs
# xrefs - deal with protein_ids separately, as additional fields
my @protein_ids;
p ("<cross_references>");
foreach my $xref (@{$gene->get_all_DBLinks()}) {
p ("<ref dbname=\"" . $xref->dbname() ."\" dbkey=\"" . $xref->display_id() . "\"/>");
if ($xref->dbname() !~ /protein_id/) {
p ("<ref dbname=\"" . $xref->dbname() ."\" dbkey=\"" . $xref->display_id() . "\"/>");
} else {
push @protein_ids, $xref->display_id();
}
}
p ("</cross_references>");
......@@ -163,6 +168,10 @@ sub content {
}
foreach my $protein_id (@protein_ids) {
p ("<field name=\"protein_id\">" . $protein_id . "</field>");
}
p ("</additional_fields>");
# close tag
......
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