'Gene Type',
'Chromosome',
'Has Phenotype'
- ],
- Gene_Synonym_Repeater => [
- 'Gene Synonym'
- ],
- Ontological_Reference_Repeater => [
- 'Ontology',
- 'Term ID',
- 'Aspect',
- 'Evidence Code',
- 'Evidence'
]
};
foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}})
{
- # TODO: gather PMID's for separate REf Publication page creation (avoid dupes)
+
+ # TODO: gather PMID's for separate Ref Publication page creation (avoid dupes)
- $writer->startTag("Template",Name=>"Ontological_Reference_Repeater");
+ $writer->startTag("Template",Name=>"$ontology_info{$curr_ontology_type}{name} Reference Repeater");
$writer->dataElement("Field", $ontology_info{$curr_ontology_type}{"name"}, Name=>"Ontology");
$writer->dataElement("Field", $ont_term, Name=>"Term ID");
$writer->dataElement("Field", $annotations{$annotation}{"Ontological References"}{$ont_term}{"Aspect"}, Name=>"Aspect");
$writer->dataElement("Field", "Annotation:$annot_title_count", Name=>"Annotation Page");
$writer->endTag("Template");
- # TODO: make further use of template map here to create provenance for SIO's
-
- foreach (@{@$template_field_map{"Annotation"}})
+ # items on the Annotation page
+ foreach (@{@$template_field_map{"Annotation"}})
+ {
+ $writer->startTag("Template",Name=>"Provenance_Repeater");
+ $writer->dataElement("Field", $_, Name=>"Source Field or Object");
+ $writer->dataElement("Field", "Annotations", Name=>"Source Category");
+ $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
+ $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
+ $writer->endTag("Template");
+ }
+
+ # items on the Gene Synonyms subpage
+ if (scalar keys (%{$annotations{$annotation}{'Gene Synonyms'}}) > 0)
+ {
+ foreach my $synonym (keys %{$annotations{$annotation}{'Gene Synonyms'}})
+ {
+ $writer->startTag("Template",Name=>"Provenance_Repeater");
+ $writer->dataElement("Field", $synonym, Name=>"Source Field or Object");
+ $writer->dataElement("Field", "Gene Synonyms", Name=>"Source Category");
+ $writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
+ $writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
+ $writer->endTag("Template");
+ }
+ }
+
+ # items on the Ontologies subpage
+ if (scalar keys (%{$annotations{$annotation}{"Ontological References"}}) > 0)
+ {
+ my $ont_count = 0;
+ foreach my $ont_term (keys %{$annotations{$annotation}{"Ontological References"}})
{
+ $ont_count++;
+
$writer->startTag("Template",Name=>"Provenance_Repeater");
- $writer->dataElement("Field", $_, Name=>"Source Field");
- $writer->dataElement("Field", "Annotation", Name=>"Source Template");
+ $writer->dataElement("Field", "Ontologies#$ont_count", Name=>"Source Field or Object");
+ $writer->dataElement("Field", "Ontological References", Name=>"Source Category");
$writer->dataElement("Field", $annotations{$annotation}{"Accession ID"}, Name=>"Source Accession ID");
$writer->dataElement("Field", "Source:$SOURCE_TITLE_SEED", Name=>"Source");
$writer->endTag("Template");
}
+ }
+
+
$writer->endTag("Page");
$annot_title_count++;