diff --git a/misc-scripts/xref_projection/project_display_xrefs.pl b/misc-scripts/xref_projection/project_display_xrefs.pl index 5a9251e298bcfa2ce4b670c88b4cb28dc0e21f91..03cfb19eaf44bedc384e2a9fcabfc1cb10966487 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 b3718b7b871bda83609a0075e241eb8ea1bf8332..2ef7d93dc9083ba99a8d3cc8cd2aea8be363a632 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