[Bio] / FigKernelPackages / Assignments.pm Repository:
ViewVC logotype

View of /FigKernelPackages/Assignments.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (download) (as text) (annotate)
Thu Dec 22 00:52:43 2005 UTC (14 years, 1 month ago) by overbeek
Branch: MAIN
Changes since 1.5: +1 -0 lines
minor fix to auto_assign

#
# Copyright (c) 2003-2006 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
#
# This file is part of the SEED Toolkit.
# 
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License. 
#
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.
#

package Assignments;

use Carp;
use Data::Dumper;
use FIG;
use SameFunc;

sub default_parms {

    my $x = <<END
genome	198214.1	4	Shigella flexneri 2a str. 301
genome	198215.1	4	Shigella flexneri 2a str. 2457T
genome	216598.1	4	Shigella dysenteriae M131649
genome	216599.1	4	Shigella sonnei 53G
genome	630.2	4	Yersinia enterocolitica 8081
genome	633.2	4	Yersinia pseudotuberculosis (Livermore)
genome	187410.1	4	Yersinia pestis KIM
genome	214092.1	4	Yersinia pestis CO92
genome	229193.1	4	Yersinia pestis biovar Medievalis str. 91001
genome	273123.1	4	Yersinia pseudotuberculosis IP 32953
genome	594.1	4	Salmonella enterica subsp. enterica serovar Gallinarum
genome	99287.1	4	Salmonella typhimurium LT2
genome	119912.1	4	Salmonella enterica serovar Choleraesuis SC-B67
genome	209261.1	4	Salmonella enterica subsp. enterica serovar Typhi Ty2
genome	220341.1	4	Salmonella enterica subsp. enterica serovar Typhi str. CT18
genome	83333.1	4	Escherichia coli K12
genome	83334.1	4	Escherichia coli O157:H7
genome	155864.1	4	Escherichia coli O157:H7 EDL933
genome	199310.1	4	Escherichia coli CFT073
genome	216592.1	4	Escherichia coli 042
genome	216593.1	4	Escherichia coli E2348/69
genome	192222.1	4	Campylobacter jejuni subsp. jejuni NCTC 11168
genome	224308.1	2	Bacillus subtilis subsp. subtilis str. 168
external	sp	4
external	uni	1.3
external	kegg	1
subsystems	trusted	8
2-isocapryloyl-3R-hydroxymethyl-gamma-butyrolactone_and_other_bacterial_morphogens	master:OlgaV
ABC_transporter_alkylphosphonate_(TC_3.A.1.9.1)	master:MattC
ABC_transporter_arabinose_(TC_3.A.1.2.2)	master:MattC
ABC_transporter_branched-chain_amino_acid_(TC_3.A.1.4.1)	master:MattC
ABC_transporter_dipeptide_(TC_3.A.1.5.2)	master:MattC
ABC_transporter_ferric_enterobactin_(TC_3.A.1.14.2)	master:MattC
ABC_transporter_ferrichrome_(TC_3.A.1.14.3)	master:MattC
ABC_transporter_galactose_(TC_3.A.1.2.3)	master:MattC
ABC_transporter_glutamate_aspartate_(TC_3.A.1.3.4)	master:MattC
ABC_transporter_glutamine_(TC_3.A.1.3.2)	master:MattC
ABC_transporter_glycerol_(TC_3.A.1.1.3)	master:MattC
ABC_transporter_heme_(TC3.A.1.107.1)	master:MattC
ABC_transporter_histidine_lysine_arginine_ornithine_(TC_3.A.1.3.1)	master:MattC
ABC_transporter_iron(III)_dicitrate_(TC_3.A.1.14.1)	master:MattC
ABC_transporter_L-proline_glycine_betaine_(TC_3.A.1.12.1)	master:MattC
ABC_transporter_macrolide	master:MattC
ABC_transporter_maltose	master:MattC
ABC_transporter_molybdenum_(TC_3.A.1.8.1)	master:MattC
ABC_transporter_nickel_(TC_3.A.1.5.3)	master:MattC
ABC_transporter_oligopeptide_(TC_3.A.1.5.1)	master:MattC
ABC_transporter_peptide_(TC_3.A.1.5.5)	master:MattC
ABC_transporter_phosphate_(TC_3.A.1.7.1)	master:MattC
ABC_transporter_polyamine_putrescine_spermidine_(TC_3.A.1.11.1)	master:MattC
ABC_transporter_putrescine_(TC_3.A.1.11.2)	master:MattC
ABC_transporter_ribose_(TC_3.A.1.2.1)	master:MattC
ABC_transporter_tungstate_(TC_3.A.1.6.2)	master:gjo
Accessory_Gene_Regulator	master:jcassat
Acetogenesis_from_Pyruvate	master:LienC_UCSD
Alanine_Biosynthesis	master:Straw
Alkaloid_biosynthesis_from_L-lysine	master:OlgaV
Alkaloid_biosynthesis_from_putrescine	master:OlgaV
Alkaloid_biosynthesis_from_tyrosine	master:OlgaV
Alkanesulfonate_assimilation	master:OlgaV
Alkanesulfonates_Utilization	master:RobE
Allantoin_degradation	master:MattC
Ammonia_assimilation	master:EdF
Anaerobic_benzoate_metabolism	master:MatthewH_UFL
Anaerobic_respiratory_reductases	master:OlgaV
Anthocyanin_biosynthesis	master:OlgaV
Anthracycline_biosynthesis	master:OlgaV
Apigenin_derivatives	master:OlgaV
Archaeal_Flagellum	master:RickS
Arginine_Biosynthesis	RickS
Arginine_Putrescine_and_4-aminobutyrate_degradation	master:MattC
Aromatic_Amin_Catabolism	master:OlgaV
Aromatic_amino_acid_degradation	master:OlgaV
Asp-Glu-tRNA(Asn-Gln)_transamidation	master:gjo
Auxin_biosynthesis	master:OlgaV
Auxin_degradation	master:OlgaV
Bacterial_Apoptosis	master:KaitlynH
Bacterial_Cell_Division	master:RickS
Bacterial_Chemotaxis	master:RickS
Bacterial_motility:Gliding	master:OlgaV
Benzoate_catabolism	master:changhaobi-ufl
Benzoate_degradation	master:OlgaV
Betaine_biosynthesis	master:MattC
Biflavanoid_biosynthesis	master:OlgaV
Bilin_Biosynthesis	master:OlgaZ
Biotin_biosynthesis	master:rodionov
Biphenyl_Degradation	master:OlgaV
Bis-_and_Tris-Indole_alkaloids	master:OlgaV
Branched-Chain_Amino_Acid_Biosynthesis	master:RossO
Bsub-Spore-Coat	master:RickS
Butyrate_and_Butanol_Acetone_fermentation	master:SouravB_UCSD
Caffeic_acid_derivatives	master:OlgaV
Calvin-Benson_cycle	master:SvetaG
Cannabinoid_biosynthesis	master:OlgaV
Capsular_heptose_biosynthesis	master:OlgaZ
Capsular_polysaccharide_biosynthesis_in_Staphylococcus	master:JenZ
Capsular_surface_virulence_antigen_loci	master:JenZ
Carbon_monoxide_dehydrogenases	master:rodionov
Carboxysome	master:MalgorzataG_UFL
carnitine_metabolism	master:MattC
Carotenoids	master:OlgaV
Catechol_branch_of_beta-ketoadipate_pathway	master:OlgaV
CbiQO-type_ABC_transporter_systems	master:rodionov
Central_meta-cleavage_pathway_of_aromatic_compound_degradation	master:OlgaV
Chloroaromatic_degradation_pathway	master:OlgaV
Chlorophyll_Biosynthesis	master:VeronikaV
Chlorophyll_Degradation	master:SvetaG
Cholera_toxin	master:VeronikaV
Choline_Transport	master:RobE
Chorismate_Synthesis	master:VeronikaV
Citrate_Metabolism,_Transport,_and_Regulation	master:JenZ
Clavulanic_acid_biosynthesis	master:OlgaV
CMP-N-acetylneuraminate_Biosynthesis	master:OlgaZ
Cobalamin_synthesis	master:gjo
Coenzyme_A_Biosynthesis	master:AndreiO
Coenzyme_A_Biosynthesis_in_Pathogens	master:AndreiO
Coenzyme_F420-H2_dehydrogenase_(methanophenazine)	master:gjo
Coenzyme_F420_hydrogenase	master:gjo
Coenzyme_F420_synthesis	master:gjo
coenzyme_M_biosynthesis	master:AdamF
Coenzyme_PQQ_synthesis	master:gjo
Colanic_acid_biosynthesis	master:JenZ
Coumarin_biosynthesis	master:OlgaV
Cyanobacterial_Circadian_Clock	master:OlgaZ
Cyanobacterial_CO2_uptake	master:OlgaV
Cyanophycin_metabolism	master:MikeR
cysteine_biosynthesis	master:RobE
Cytochrome_B6-F_complex	master:Sveta
Cytochrome_oxidase_assembly_factors	master:SvetaG
Cytolethal_distending_toxin_of_Campylobacter_jejuni	master:OlgaZ
Cytoskeleton	master:JenZ
Cytotoxic_Polyacetylenes	master:OlgaV
D-alanyl_lipoteichoic_acid_Biosynthesis	master:OlgaZ
D-arabinose_degradation	master:MattC
D-galactarate_degradation	master:MattC
D-galacturonate_degradation	master:MattC
D-glucarate_degradation	master:MattC
D-tyrosyl-tRNA(Tyr)_deacylase	master:gjo
De_Novo_Purine_Biosynthesis	master:RossO
De_Novo_Pyrimidine_Synthesis	master:RossO
Dehydrogenase_complexes	master:VeronikaV
Denitrification	master:rodionov
Differentiation_in_bacteria:transcription_factors_and_signaling_systems	master:OlgaV
DNA-replication	master:RickS
DNA_repair,_bacterial	master:gjo
DNA_repair_and_recombination_eukaryotic	master:gjo
DNA_Repair_Base_Excision	master:MikeK
dTDP-rhamnose_synthesis	master:MikeK
Embden-Meyerhof_and_Gluconeogenesis	master:SvetaG
Embden-Meyerhof_and_Gluconeogenesis_Archaeal	master:SvetaG
Entner-Doudoroff_Pathway	master:SvetaG
Ethanolamine_utilization	master:gjo
F0F1-type_ATP_synthase	master:RickS
Fatty_Acid_Biosynthesis_FASII	master:AndreiO
fatty_acid_metabolism	master:MattC
fatty_acid_oxidation_pathway	master:MattC
Fe-S_cluster_assembly	master:rodionov
Fermentations:_Lactate	master:SvetaG
Fermentations:_Mixed_acid	master:SvetaG
Flagellum	master:RickS
Flavanone_biosynthesis	master:OlgaV
FMN_and_FAD_biosynthesis	master:AndreiO
FMN_and_FAD_biosynthesis_in_pathogens	master:AndreiO
Folate_Biosynthesis	master:vcrecy
Formate_dehydrogenase	master:gjo
Formate_hydrogenase	master:OlgaV
Fructose-bisphosphate_aldolase_protein_family	master:SvetaG
Fucose_and_rhamnose_degradation	master:MattC
Fungal_cytostatics	master:OlgaV
Fungal_differentiation_factors	master:OlgaV
Galactitol_degradation	master:MattC
Galactose_degradation	master:MattC
General_secretory_pathway_(Sec-SRP)_complex_(TC_3.A.5.1.1)	master:MattC
Glutamate,_aspartate_and_asparagine_biosynthesis	master:MattC
Glutamate_biosynthesis	master:MattC
Glutamyl_peptidase?	master:RamyA
Glutathione_Redox_Metabolism	master:Neema_UCSD
Glycerol_fermenation_to_1,3-propanediol	master:gjo
Glycerol_Metabolism	master:MattC
Glycerolipid_and_glycerphospholipid_metabolism	master:VasiliyP_UCSD
Glycine_cleavage_system	master:MattC
Glycine_reductase,_sarcosine_reductase_and_betaine_reductase	master:gjo
Glycine_synthesis	master:MikeK
glyoxylate_degradation	master:MattC
Glyoxylate_Synthesis	master:RickS
Gram-Positive_Extracellular_Nucleases	master:RamyA
gram_plus_late_competence	master:alexS
GroEL_GroES	master:MikeK
Heavy_metal_ion_sensors_and_exporters	master:JenZ
Heme-bound_Iron_Scavenge_Pathway	master:RickS
Hexitol_degradation	master:MattC
Histidine_Biosynthesis	master:RossO
Histidine_Degradation	master:RossO
HMG_CoA_Synthesis	master:VeronikaV
Homogentisate_pathway_of_aromatic_compound_degradation	master:OlgaV
hpa_catabolic_pathway	master:YakovK
Hydrogenases	master:OlgaV
Inorganic_Sulfur_Assimilation	master:ChristianR
Inositol_catabolism	master:VeronikaV
Intercellular_adhesion_SA	master:MattC
Isoleucine_degradation	master:OlgaZ
Isoprenoid_Biosynthesis	master:OlgaZ
KDO2-Lipid_A_biosynthesis	master:OlgaZ
Ketogluconate_metabolism	master:MattC
L-ascorbate_degradation	master:MattC
Lactose_degradation	master:MattC
Leucine_Biosynthesis_v2	master:AdamF
Leucine_Degradation_and_HMG-CoA_Metabolism	master:VeronikaV
Lignine_biosynthesis	master:OlgaV
linker_unit-arabinogalactan_synthesis	master:NJ
Lipid_A_biosynthesis	master:OlgaZ
Lipid_A_modifications	master:OlgaZ
Lipoic_acid_metabolism	master:gjo
Lipoteichoic_acid_biosynthesis	master:RamyA
Listeria_Pathogenicity_Island_LIPI-1_extended	master:SvetaG
Listeria_surface_proteins:_Internalin-like_proteins	master:SvetaG
Listeria_surface_proteins:_LPXTG_motif	master:SvetaG
LMPTP_YfkJ_cluster	master:AndreiO
LMPTP_YwlE_cluster	master:AndreiO
LOS_core_oligosaccharide_biosynthesis	master:OlgaZ
Lysine_Biosynthesis_DAP_Pathway	master:AndreiO
Malonate_decarboxylase	master:VeronikaV
Mannose-sensitive_hemagglutinin_type_4_pilus	master:RobE
Mannose_and_fructose_metabolism	master:HanYuC_UCSD
mannose_and_GDP-mannose_metabolism	master:MattC
Membrane-bound_Ni,_Fe-hydrogenase	master:rodionov
Menaquinone_and_Phylloquinone_Biosynthesis	master:OlgaZ
Menaquinone_Biosynthesis	master:RickS
Mercury_resistance_operon	master:JenZ
Methane_metabolism	master:MikeR
Methanogenesis	master:gjo
Methanogenesis_from_methylated_compounds	master:gjo
Methanophenazine_hydrogenase	master:gjo
methanopterin_biosynthesis	master:AdamF
Methionine_Biosynthesis	master:rodionov
Methionine_Salvage	master:gjo
Methylcitrate_cycle	master:MattC
Methylglyoxal_Metabolism	master:OlgaZ
MLST	master:RobE
Molybdopterin_biosynthesis	master:JenZ
mycolic_acid_synthesis	master:NJ
N-Acetyl-D-Glucosamine_Utilization	master:OlgaZ
N-heterocyclic_aromatic_compound_degradation	master:OlgaV
N-linked_Glycosylation_in_Bacteria	master:OlgaZ
n-Phenylalkanoic_acid_degradation	master:OlgaV
Na(+)-translocating_NADH-quinone_oxidoreductase_and_rnf-like_group_of_electron_transport_complexes	master:OlgaV
NAD_and_NADP_cofactor_biosynthesis_global	master:AndreiO
NAD_and_NADP_cofactor_biosynthesis_in_pathogens	master:AndreiO
NAD_and_NADP_paper	master:SvetaG
NAD_and_NADP_tutorial_10	master:AndreiO
Naphtalene_and_antracene_degradation	master:OlgaV
NiFe_hydrogenase_maturation	master:gjo
Nitrate_and_nitrite_ammonification	master:rodionov
Nitrosative_stress	master:rodionov
NusA-TFII_Cluster	master:gjo
O-linked_flagella_Glycosylation	master:OlgaZ
Octadecanoids	master:OlgaV
Osmotically_activated_L-carnitine_ABC_transporter_in_Listeria	master:JenZ
Oxidative_stress	master:OlgaV
Oxidative_stress_(animal_systems)	master:OlgaV
Oxidative_stress_in_bacteria	master:OlgaV
p-Hydroxybenzoate_degradation	master:OlgaV
P-type_ATPase_transporter_potassium_(TC_3.A.3.7.1)	master:MattC
P_uptake_(cyanobacteria)	master:acm_at_mit
Pentose_phosphate_pathway	master:SvetaG
Peptidoglycan_Biosynthesis	master:RickS
Phenylacetate_pathway_of_aromatic_compound_degradation	master:OlgaV
Phenylalanine_synthesis	master:MikeK
Phenylpropanoid_compound_degradation	master:OlgaV
Phenylpropanoids_general_biosynthesis	master:OlgaV
Phenylpropionate_Degradation	master:OlgaV
Phosphoglycerate_mutase_protein_family	master:SvetaG
Phosphotransferase_enzyme_II_-_Glucose_class_permease	master:JenZ
Phosphotransferase_enzyme_II_-_Lactose_class_permease	master:JenZ
Phosphotransferase_enzyme_II_-_Mannitol_class_permease	master:JenZ
Phosphotransferase_enzyme_II_-_Mannose_family_permease	master:JenZ
Photosystem_I	master:SvetaG
Photosystem_II	master:SvetaG
Phycobilisome	master:OlgaZ
Phytoalexin_biosynthesis	master:OlgaV
Phytochromes	master:OlgaZ
Phytosterol_biosynthesis	master:OlgaV
Plastoquinone_Biosynthesis	master:OlgaZ
Polyadenylation_bacterial	master:gjo
Polyamine_Metabolism	master:InesT_UCSD
polyisoprenoid_biosynthesis	master:MattC
polyprenyl_synthesis	master:NJ
Porphyrin,_Heme,_and_Siroheme_Biosynthesis	master:SvetaG
ppGpp_biosynthesis	master:MikeK
Proline_Catabolism	master:laszloC
Proline_degradation	master:unknown
Proline_degradation1	master:unknown
Proline_Synthesis	master:RickS
Propanediol_utilization	master:gjo
Prophage-encoded_Exotoxins	master:RamyA
Prophage_lysogenic_conversion_modules	master:RamyA
Proteasome_archaeal	master:gjo
Proteasome_eukaryotic	master:gjo
Protection_from_Reactive_Oxygen_Species	master:MikeK
Protein_Acetylation_and_Deacetylation_in_Bacteria	master:AndreiO
Protein_degradation	master:gjo
Proteolysis_in_bacteria,_ATP-dependent	master:OlgaZ
Protocatechuate_branch_of_beta-ketoadipate_pathway	master:OlgaV
Protozoan_cytostatics_and_differentiation_factors	master:OlgaV
Pterin_biosynthesis	master:vcrecy
Purine_conversions	master:OlgaV
pyrimidine_conversions	master:RossO
Pyrroloquinoline_Quinone_biosynthesis	master:OlgaZ
Pyruvate:ferredoxin_oxidoreductase	master:SvetaG
Pyruvate_Alanine_Serine_Interconversions	master:JasonS_UCSD
Pyruvate_metabolism_I:_anaplerotic_reactions,_PEP	master:SvetaG
Queuosine-Archaeosine_Biosynthesis	master:vcrecy
Quinate_degradation	master:OlgaV
Quinolinic_acid_and_its_derivatives	master:OlgaV
Quorum_Sensing:_Autoinducer-2_Synthesis	master:AndrewJ
Redox-dependent_regulation_of_nucleus_processes	master:OlgaV
Resistance_to_fluoroquinolones	master:MattC
Resistance_to_Vancomycin	master:MattC
Respiratory_Complex_I	master:OlgaV
Respiratory_dehydrogenases_1	master:OlgaV
Riboflavin_metabolism	master:rodionov
Ribonuclease_P_archaeal_and_eukaryal	master:gjo
Ribonucleotide_reduction	master:rodionov
Ribose_and_deoxyribose_phosphate_metabolism	master:MattC
Ribosome_biogenesis_bacterial	master:gjo
Ribosome_LSU_bacterial	master:gjo
Ribosome_LSU_chloroplast	master:gjo
Ribosome_LSU_eukaryotic_and_archaeal	master:gjo
Ribosome_LSU_mitochondrial	master:gjo
Ribosome_SSU_bacterial	master:gjo
Ribosome_SSU_chloroplast	master:gjo
Ribosome_SSU_eukaryotic_and_archaeal	master:gjo
Ribosome_SSU_mitochondrial	master:gjo
RNA_polymerase_archaeal	master:gjo
RNA_polymerase_archaeal_initiation_factors	master:gjo
RNA_polymerase_bacterial	master:gjo
RNA_polymerase_chloroplast	master:gjo
RNA_polymerase_I	master:gjo
RNA_polymerase_II	master:gjo
RNA_polymerase_II_initiation_factors	master:gjo
RNA_polymerase_III	master:gjo
Rrf2_family_transcriptional_regulators	master:rodionov
Salicylate_ester_degradation	master:OlgaV
Salicylic_acid_biosynthesis1	master:OlgaV
Selenocysteine_metabolism	master:gjo
Serine_Biosynthesis	master:MikeK
Siderophore_Aerobactin_and_Ferrichrome_Biosynthesis	master:MikeK
Siderophore_enterobactin_biosynthesis	master:MattC
Siderophore_enterobactin_biosynthesis_and_ferric_enterbactin_transport	master:MattC
Siderophore_Yersiniabactin_Biosynthesis	master:MikeK
SLO-NADGH_Locus	master:RamyA
Sodium_Hydrogen_Antiporter	master:JenZ
Soluble_cytochromes_and_functionally_related_electron_carriers	master:OlgaV
SpeB-SpeF_extended_regulon	master:RamyA
Sphingolipid_biosynthesis	master:JorgeF
Spliceosome	master:gjo
Spore_Coat	master:RickS
Steroid_sulfates	master:OlgaV
Streptococcal_Hyaluronic_Acid_Capsule	master:RamyA
Streptococcal_Mga_Regulon	master:RamyA
Streptococcus_pyogenes_Transcription_Regulators	master:RamyA
Streptococcus_pyogenes_Virulome	master:RamyA
Streptolysin_S_Biosynthesis_and_Transport	master:RamyA
Streptomycin_biosynthesis	master:OlgaV
Suberine_biosynthesis	master:OlgaV
Succinate_dehydrogenase	master:OlgaV
Sucrose_Metabolism	master:MattC
Sulfate_assimilation	master:MattC
Sulfate_to_Sulfide	master:RobE
Sulfur_Metabolism	master:RobE
Tannin_biosynthesis	master:OlgaV
Taurine_Utilization	master:RobE
TCA_Cycle	master:OlgaV
Teichoic_acid_Biosynthesis	master:OlgaZ
Terminal_cytochrome_C_oxidases	master:OlgaV
Terminal_cytochrome_oxidases	master:OlgaV
Terpen_biosynthesis	master:OlgaV
The_Tartronate_Semialdehyde_Hub	master:RossO
Thiamin_biosynthesis	master:rodionov
Thioredoxin-disulfide_reductase	master:gjo
Threonine_degradation	master:OlgaV
Threonine_synthesis	master:MikeK
Tocopherol_Biosynthesis	master:OlgaZ
Toluene_degradation	master:OlgaV
Transcription_factors_bacterial	master:gjo
Transcription_factors_cyanobacterial_RpoD-like_sigma_factors	master:gjo
Translation_elongation_factors_eukaryotic_and_archaeal	master:gjo
Translation_factors_bacterial	master:gjo
Translation_initiation_factors_eukaryotic_and_archaeal	master:gjo
Transport_of_Nickel_and_Cobalt	master:rodionov
Trehalose_biosynthesis	master:MattC
Triacylglycerol_biosynthesis	master:unknown
Triacylglycerol_degradation	master:unknown
Tricarballylate_Utilization	master:RossO
tRNA_aminoacylation	master:gjo
tRNA_aminoacylation,_mitochondrial	master:gjo
tRNA_processing	master:gjo
tRNA_splicing	master:gjo
Tryptophan_synthesis	master:VeronikaV
Tyrosine_synthesis	master:MikeK
Ubiquinone_Biosynthesis	master:OlgaZ
Ubiquinone_Menaquinone-cytochrome_c_reductase_complexes	master:OlgaV
UDP-N-acetylmuramate_from_Fructose-6-phosphate_Biosynthesis	master:vasiliyP
Universal_GTPases	master:gjo
Urea_decomposition	master:rodionov
Utilization_of_glutathione_as_a_sulphur_source	master:OlgaV
V-Type_ATP_synthase	master:RickS
Valine_Biosynthesis	master:Straw
Valine_degradation	master:OlgaZ
Vibrio_Experimental_Type_III_secretion_system	master:JanelleT
//
END
;
    return split(/\n/,$x);
}


sub choose_best_assignment {
    my($fig,$parms,$pegs,$external_ids) = @_;
    my($peg,$id);

    my $functions = {};
    foreach $peg (@$pegs)
    {
	&load_peg_function($fig,$parms,$peg,$functions);
    }

    foreach $id (@$external_ids)
    {
	&load_ext_function($fig,$parms,$id,$functions);
    }

    return &cleanup(&pick_function($fig,$parms,$functions));
}


sub cleanup {
    my($func) = @_;

    if (! $func)                                           { return "hypothetical protein" }
    if ($func =~ /^hypothetical (\S+ )?protein .*$/i)      { return "hypothetical protein" }
    if ($func =~ /^[a-zA-Z]{1,2}\d{2,5}( protein)?$/i)     { return "hypothetical protein" }
    if ($func =~ /^similar to ORF\d+$/)                    { return "hypothetical protein" }
    if ($func =~ /^(Alr|As|All|Tlr|Tll|Glr|Blr|Slr|SEW|pANL)\d+( protein)?$/i) { return "hypothetical protein" }
    if ($func =~ /^\d{5}/)                                 { return "hypothetical protein" }
    if ($func =~ /unknown protein/)                        { return "hypothetical protein" }
    
    return $func;
}

sub pick_function {
    my($fig,$parms,$functions) = @_;
    my($set,$score,$best_source,$poss_function);
    my(@scored);

    my @partitions = &SameFunc::group_funcs(keys(%$functions));
    if ($ENV{'VERBOSE'}) {  print STDERR "partition: ",&Dumper(\@partitions,$functions); }

    foreach $set (@partitions)
    {
	$score = &score_set($set,$functions);
#	print STDERR &Dumper([$score,$set]);

#       print STDERR "picking from set ",&Dumper($set);
	($poss_function,$best_source) = &pick_specific($fig,$parms,$set,$functions);
#	print STDERR "picked $best_function from $best_source\n";
	push(@scored,[$score,$poss_function,$best_source]);
    }
    @scored = sort { $b->[0] <=> $a->[0] } @scored;

    if ((@scored > 1) && $ENV{'VERBOSE'})
    {
	foreach $_ (@scored)
	{
	    print STDERR join("\t",@$_),"\n";
	}
	print STDERR "//\n";
    }
    return (@scored > 0) ? $scored[0]->[1] : "";
}

sub score_set {
    my($set,$functions) = @_;
    my($func,$x);

    my $score = 0;
    foreach $func (@$set)
    {
	if ($x = $functions->{$func})
	{
	    foreach $_ (@$x)
	    {
		$score += $_->[0];
	    }
	}
    }
    return $score;
}

sub pick_specific {
    my($fig,$parms,$set,$functions) = @_;
    my($best_func,$best_score,$func,$x,$best_source);

    $best_func  = "";
    $best_score = "";
    $best_source = "";

    foreach $func (@$set)
    {
	if ($x = $functions->{$func})
	{
	    my $incr = @$x;
	    foreach $_ (@$x)
	    {
		my($sc,$peg,$in_sub) = @$_;
		$sc += $in_sub ? 10000 : 0;

		if (((100 * $sc) + $incr) > $best_score)
		{
		    $best_score = (100 * $sc) + $incr;
		    $best_func  = $func;
		    $best_source = $peg;
		}
	    }
	}
    }
    if ($ENV{'VERBOSE'}) { print STDERR &Dumper(["picked best source",$set,$functions,$best_func,$best_source]) }
    return ($best_func,$best_source);
}

sub load_ext_function {
    my($fig,$parms,$id,$functions) = @_;

    my $func = $fig->function_of($id);
    if ($func && # (! &FIG::hypo($func)) && 
	($id =~ /^([A-Za-z]{2,4})\|/) && ($_ = $parms->{'external'}->{$1}))
    {
	push(@{$functions->{$func}},[$_,$id]);
    }
}

sub load_peg_function {
    my($fig,$parms,$peg,$functions) = @_;

    my $func = $fig->function_of($peg);
    if ($func) # (! &FIG::hypo($func))
    {
	my $value = 1;

	my $genome = &FIG::genome_of($peg);
	if ($_ = $parms->{'genome'}->{$genome})
	{
	    $value += $_;
	}

	my $subv = 0;
	my @subs = $fig->peg_to_subsystems($peg);
	my $sub;
	my $in_sub = 0;
	foreach $sub (@subs)
	{
	    if ($_ = $parms->{'subsystems'}->{$sub})
	    {
		if ($_ > $subv)
		{
		    $subv = $_;
		}
		$in_sub = 1;
	    }
	}
	$value += $subv;
	push(@{$functions->{$func}},[$value,$peg,$in_sub]);
    }
}

sub equivalent_ids {
    my($fig,$parms,$pegs) = @_;
    my($peg,@aliases,$alias,%external_ids,%pegs,$tuple);

    foreach $peg (@$pegs)
    {
	$pegs{$peg} = 1;
	@aliases = $fig->feature_aliases($peg);
	foreach $alias (@aliases)
	{
	    if (($alias =~ /^([A-Za-z]{2,4})\|\S+$/) && $parms->{"external"}->{$1})
	    {
		$external_ids{$alias} = 1;
	    }
	}
	foreach $tuple ($fig->mapped_prot_ids($peg))
	{
	    if ($tuple->[0] =~ /^fig\|/)
	    {
		$pegs{$tuple->[0]} = 1;
	    }
	    elsif (($tuple->[0] =~ /^([A-Za-z]{2,4})\|\S+$/) && $parms->{"external"}->{$1})
	    {
		$external_ids{$tuple->[0]} = 1;
	    }
	}
    }
    return ([sort { &FIG::by_fig_id($a,$b) }  keys(%pegs)],[sort keys(%external_ids)]);
}

sub load_parms {
    my($parmsF) = @_;
    my @parmsS;

    my $wts = {};

    if ($parmsF)
    {
	@parmsS = `cat $parmsF`;
    }
    else
    {
	@parmsS = &default_parms;
    }
    while ($_ = shift @parmsS)
    {
	chomp;
	my($type,$data,$val) = split(/\t/,$_);
	if ($type eq 'subsystems')
	{
	    my $x;
	    while (($x = shift @parmsS) && ($x !~ /^\/\//))
	    {
		if ($x =~ /^(\S[^\t]+\S)/)
		{
		    $wts->{$type}->{$1} = $val;
		}
	    }
	}
	else
	{
	    $wts->{$type}->{$data} = $val;
	}
    }
    return $wts;
}

sub print_parms {
    my($parms) = @_;
    my($type,$data,$val,$wt_by_type);

    print STDERR "Parameters:\n";
    foreach $type (sort keys(%$parms))
    {
	print STDERR "\n\t$type\n";
	$wt_by_type = $parms->{$type};
	foreach $data (sort keys(%$wt_by_type))
	{
	    $val = $wt_by_type->{$data};
	    print STDERR "\t\t$data\t$val\n";
	}
    }
    print STDERR "\n";
}


1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3