Skip to content

Commit

Permalink
fixed the C.elegans part
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Paulini committed Oct 25, 2019
1 parent d5ccb28 commit c714544
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions scripts/ONTOLOGY/make_phenotype_GAF.pl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
my $tace = $wormbase->tace;
my $log = Log_files->make_build_log($wormbase);
my $date = &get_GAF_date();
my $taxid = $wormbase->ncbi_tax_id;
my $full_name = $wormbase->full_name;

$acedbpath = $wormbase->autoace unless $acedbpath;
Expand All @@ -48,10 +47,16 @@
my ($count, $it);
my $gene_info = {};

foreach my $species('Caenorhabidtis elegans','Caenorhabditis briggsae','Pristionchus pacificus'){
foreach my $species('Caenorhabditis elegans','Caenorhabditis briggsae','Pristionchus pacificus'){
$gene_info = {%$gene_info , %{&get_gene_info( $acedbpath, $wormbase, $species)}};
}

my %sp2tax = (
'Caenorhabditis elegans' => 6239,
'Caenorhabditis briggsae' => 6238,
'Pristionchus pacificus' => 54126,
);

$log->write_to( "Got name information for " . scalar(keys %$gene_info) . " genes\n");

open(my $out, ">$outfile") or $log->log_and_die("cannot open $outfile : $!\n");
Expand All @@ -66,7 +71,6 @@
while (my $obj=$it->next) {
next unless $obj->isObject();
next unless $obj->Species;
# next unless $obj->Species->name eq $full_name;

my (@affected_genes, %pheno);

Expand Down Expand Up @@ -127,7 +131,7 @@
$with_from,
"P",
$gene_info->{$g}->{sequence_name},
$taxid,
$sp2tax{$gene_info->{$g}->{species}},
$date);
$count++;
}
Expand All @@ -148,7 +152,7 @@
$with_from,
"P",
$gene_info->{$g}->{sequence_name},
$taxid,
$sp2tax{$gene_info->{$g}->{species}},
$date);
$count++;
}
Expand All @@ -168,7 +172,7 @@
"",
"P",
$gene_info->{$g}->{sequence_name},
$taxid,
$sp2tax{$gene_info->{$g}->{species}},
$date);
$count++;
}
Expand All @@ -184,7 +188,6 @@
while (my $obj = $it->next) {
next unless $obj->isObject();
next unless $obj->Species;
# next unless $obj->Species->name eq $full_name;

my (@affected_genes, %pheno);

Expand All @@ -197,12 +200,11 @@
}
}

#
# For RNAi, there should always be at most one paper as the source.
# If more than one paper is attached, use the first one.
# If no papers are attached, use the WB RNAi id as the primary source,
# with the WBPerson id as the WITH/FROM
#

my ($ref, $with_from);

my (@ref) = $obj->Reference;
Expand Down Expand Up @@ -231,7 +233,7 @@
$with_from,
"P",
$gene_info->{$g}->{sequence_name},
$taxid,
$sp2tax{$gene_info->{$g}->{species}},
$date );
$count++;
}
Expand All @@ -248,7 +250,7 @@
$with_from,
"P",
$gene_info->{$g}->{sequence_name},
$taxid,
$sp2tax{$gene_info->{$g}->{species}},
$date );
$count++;
}
Expand Down

0 comments on commit c714544

Please sign in to comment.