# Common subroutines to find the species from the #
# string (filename) and the gene from the gene header #
# #
+# Written by Justin Elser #
+# Updated 9/2/10 for new species #
###########################################################
sub find_species {
my $temp = $_[0];
- if ($temp =~ /Arabidopsis/) {
- $temp = "Ath";
- }elsif ($temp =~ /brachypodium/) {
- $temp = "Brachy";
+ if ($temp =~ /Arabidopsis\_lyrata/) {
+ $temp = "Arabidopsis_lyrata";
+ }elsif ($temp =~ /Arabidopsis\_thaliana/) {
+ $temp = "Arabidopsis_thaliana";
+ }elsif ($temp =~ /Batrachochytrium/) {
+ $temp = "Batrachochytrium_distachyon";
+ }elsif ($temp =~ /Brachypodium/) {
+ $temp = "Brachypodium_distachyon";
}elsif ($temp =~ /elegans/) {
- $temp = "C_elegans";
+ $temp = "Caenorhabditis_elegans";
+ }elsif ($temp =~ /Carica\_papaya/) {
+ $temp = "Carica_papaya";
}elsif ($temp =~ /Chlamy/) {
- $temp = "Chlamy";
+ $temp = "Chlamydomonas_reinhardtii";
+ }elsif ($temp =~ /Cucumis\_sativus/) {
+ $temp = "Cucumis_sativus";
}elsif ($temp =~ /Danio/) {
- $temp = "Danio";
- }elsif ($temp =~ /E\_coli/) {
- $temp = "E_coli";
+ $temp = "Danio_rerio";
+ }elsif ($temp =~ /Drosophila/) {
+ $temp = "Drosophila_melanogaster";
+ }elsif ($temp =~ /Ectocarpus/) {
+ $temp = "Ectocarpus_siliculosus";
+ }elsif ($temp =~ /Escherichia\_coli/) {
+ $temp = "Escherichia_coli";
}elsif ($temp =~ /Fragaria/) {
- $temp = "Fragaria";
+ $temp = "Fragaria_vesca";
}elsif ($temp =~ /Glycine/) {
- $temp = "Glycine";
+ $temp = "Glycine_max";
}elsif ($temp =~ /Homo\_sapiens/) {
- $temp = "Human";
- }elsif ($temp =~ /Maize/) {
- $temp = "Maize";
- }elsif ($temp =~ /musculus/) {
- $temp = "Mouse";
- }elsif ($temp =~ /neurospora/) {
- $temp = "Neurospora";
+ $temp = "Homo_sapiens";
+ }elsif ($temp =~ /Laccaria/) {
+ $temp = "Laccaria_bicolor";
+ }elsif ($temp =~ /Magnaporthe/) {
+ $temp = "Magnaporthe_grissa";
+ }elsif ($temp =~ /Manihot/) {
+ $temp = "Manihot_esculenta";
+ }elsif ($temp =~ /Medicago/) {
+ $temp = "Medicago_truncatula";
+ }elsif ($temp =~ /Mimulus/) {
+ $temp = "Mimulus_guttatus";
+ }elsif ($temp =~ /Mus\_musculus/) {
+ $temp = "Mus_musculus";
+ }elsif ($temp =~ /Neurospora/) {
+ $temp = "Neurospora_crassa";
+ }elsif ($temp =~ /Nostoc/) {
+ $temp = "Nostoc_punctiforme";
}elsif ($temp =~ /Oryza\_sativa/) {
$temp = "Oryza_sativa";
- }elsif ($temp =~ /Cpapaya/) {
- $temp = "Carica_papaya";
+ }elsif ($temp =~ /Pediculus/) {
+ $temp = "Pediculus_humanus";
}elsif ($temp =~ /Physcomit/) {
- $temp = "Physcomitrella";
+ $temp = "Physcomitrella_patens";
}elsif ($temp =~ /Populus/) {
- $temp = "Poplar";
- }elsif ($temp =~ /Ppersica/) {
- $temp = "P_persica";
+ $temp = "Populus_trichocarpa";
+ }elsif ($temp =~ /Prunus/) {
+ $temp = "Prunus_persica";
+ }elsif ($temp =~ /Rattus/) {
+ $temp = "Rattus_norvegicus";
+ }elsif ($temp =~ /Rhizopus/) {
+ $temp = "Rhizopus_oryzae";
+ }elsif ($temp =~ /Ricinus/) {
+ $temp = "Ricinus_communis";
}elsif ($temp =~ /cerevisiae/) {
- $temp = "Sacc_cerevisiae";
+ $temp = "Saccharomyces_cerevisiae";
}elsif ($temp =~ /pombe/) {
- $temp = "Schizo_pombe";
+ $temp = "Schizosaccharomyces_pombe";
}elsif ($temp =~ /Selaginella/) {
- $temp = "Selaginella";
+ $temp = "Selaginella_moellendorffii";
}elsif ($temp =~ /Sorghum/) {
- $temp = "Sorghum";
+ $temp = "Sorghum_bicolor";
}elsif ($temp =~ /Synechocystis/) {
- $temp = "Synechocystis";
+ $temp = "Synechocystis_pcc6803";
+ }elsif ($temp =~ /Trichodesmium/) {
+ $temp = "Trichodesmium_erythraeum";
}elsif ($temp =~ /Vitis\_vinifera/) {
- $temp = "Vitis";
+ $temp = "Vitis_vinifera";
+ }elsif ($temp =~ /Zea\_mays/) {
+ $temp = "Zea_mays";
}else {
- die "Error: Species can not be found from file name!";
+ die "Error: Species can not be found from file name $temp!";
}
return $temp;
}
my ($name,$gene_id,$chrom_id,$id) = split(/\|/,$gene_header);
$gene = $gene_id; #???
}else {
- die "Error: Gene id can not be found!";
+ die "Error: Gene id can not be found for species $species!";
}
return $gene;
}