From 13e51acda7ad4f96aa620c0d87dc47f549a20de2 Mon Sep 17 00:00:00 2001 From: Kieron Taylor <ktaylor@ebi.ac.uk> Date: Fri, 15 Jun 2012 13:38:14 +0000 Subject: [PATCH] Missed the multiple mapping behaviour. Moved code inside the loop. --- .../xref_projection/project_display_xrefs.pl | 43 +++++++++++-------- .../xref_projection/submit_projections.pl | 3 ++ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/misc-scripts/xref_projection/project_display_xrefs.pl b/misc-scripts/xref_projection/project_display_xrefs.pl index 5a9251e298..03cfb19eaf 100644 --- a/misc-scripts/xref_projection/project_display_xrefs.pl +++ b/misc-scripts/xref_projection/project_display_xrefs.pl @@ -173,30 +173,15 @@ if ($compara) { } -# Determine if source and target species are both mammals or not: class Mammalia in meta -# table, meaning full GO projection is allowable -# Platypus is not treated as a mammal here, but "is_therian" doesn't mean anything. - -my $from_mammal = is_mammal($from_species); -my $to_mammal = is_mammal($to_species); -my %forbidden_terms; - -if ($from_mammal && !$to_mammal) { - # Determine GO terms that are not applicable for the present non-mammalian species. - # Consult ontology for list of descendent terms. - # Using a temporary list of general forbidden terms. Presently consists of four GO terms - # recommended by GOA. e.g. "walks on legs" should not be projected to fish - %forbidden_terms = get_ontology_terms('GO:0032501','GO:0007610','GO:0048856','GO:0051704'); - - # The forbidden_terms list is used in unwanted_go_term(); -} - -####### my $from_ga = Bio::EnsEMBL::Registry->get_adaptor($from_species, 'core', 'Gene'); my %projections_by_evidence_type; my %projections_by_source; +my %forbidden_terms; + +my $from_mammal; +my $to_mammal; foreach my $local_to_species (@to_multi) { @@ -205,6 +190,26 @@ foreach my $local_to_species (@to_multi) { die("Can't get gene adaptor for $to_species - check database connection details; make sure meta table contains the correct species alias\n") if (!$to_ga); my $to_dbea = Bio::EnsEMBL::Registry->get_adaptor($to_species, 'core', 'DBEntry'); + + # Determine if source and target species are both mammals or not: class Mammalia in meta + # table, meaning full GO projection is allowable + # Platypus is not treated as a mammal here, but "is_therian" doesn't mean anything. + + $from_mammal = is_mammal($from_species); + $to_mammal = is_mammal($to_species); + + if ($from_mammal && !$to_mammal) { + # Determine GO terms that are not applicable for the present non-mammalian species. + # Consult ontology for list of descendent terms. + # Using a temporary list of general forbidden terms. Presently consists of four GO terms + # recommended by GOA. e.g. "walks on legs" should not be projected to fish + %forbidden_terms = get_ontology_terms('GO:0032501','GO:0007610','GO:0048856','GO:0051704'); + + # The forbidden_terms list is used in unwanted_go_term(); + } + + ####### + write_to_projection_db($to_ga->dbc(), $release, $from_species, $from_ga->dbc(), $to_species) unless ($no_database); backup($to_ga) if (!$no_backup); diff --git a/misc-scripts/xref_projection/submit_projections.pl b/misc-scripts/xref_projection/submit_projections.pl index b3718b7b87..2ef7d93dc9 100644 --- a/misc-scripts/xref_projection/submit_projections.pl +++ b/misc-scripts/xref_projection/submit_projections.pl @@ -233,6 +233,9 @@ $go_terms{'xenopus'} = [qw(zebrafish)]; # order to run projections in, just in case they are order-sensitive. my @execution_order = ( 'human', 'mouse', 'rat', 'zebrafish'); +# except of course order is irrelevant to the job queue. Consider provisional for when +# someone desires jobs that wait for others to finish. + # ---------------------------------------- # Display names -- GitLab