├── .gitignore ├── Build.PL ├── Configuration Instructions.txt ├── LICENSE.TXT ├── MANIFEST ├── MANIFEST.SKIP ├── bin ├── ModelDriver.pl ├── ReadMe.txt ├── bio ├── genome ├── import ├── mapping ├── model ├── ms ├── ms-build-modules ├── ms-config ├── mscli ├── mscli.pl └── stores ├── carton.lock ├── docs └── wiki │ └── ModelDriver.wiki ├── ignore.txt ├── lib ├── Bio │ └── KBase │ │ └── CDMI │ │ └── Client.pm ├── BuildEnv │ ├── build.perl │ ├── module-list │ ├── ms-build-modules.pl │ └── ms-build-perl.sh ├── FigKernelPackages │ ├── Diagram.pm │ ├── ShowDiagram.pm │ └── Tracer.pm ├── KBaseScripts │ └── fbaModelServices │ │ ├── exchangeFormat_to_gapfillingFormulation.pl │ │ ├── exchangeformat_to_fbamodel.pl │ │ ├── fbamodel_to_exchangeformat.pl │ │ ├── fbamodel_to_html.pl │ │ ├── fbamodel_to_sbml.pl │ │ ├── gapfill_fbamodel.pl │ │ ├── gapfillingFormulation_to_exchangeFormat.pl │ │ ├── genome_to_fbamodel.pl │ │ ├── get_gapfilling_formulation.pl │ │ └── runfba.pl ├── ModelSEED │ ├── App │ │ ├── Helpers.pm │ │ ├── bio.pm │ │ ├── bio │ │ │ └── Command │ │ │ │ ├── aliasSet.pm │ │ │ │ └── readable.pm │ │ ├── genome.pm │ │ ├── genome │ │ │ └── Command │ │ │ │ ├── buildModel.pm │ │ │ │ ├── mapping.pm │ │ │ │ ├── readable.pm │ │ │ │ ├── roles.pm │ │ │ │ └── subsystems.pm │ │ ├── import.pm │ │ ├── import │ │ │ └── Command │ │ │ │ ├── annotation.pm │ │ │ │ ├── biochemistry.pm │ │ │ │ ├── mapping.pm │ │ │ │ └── model.pm │ │ ├── mapping.pm │ │ ├── mapping │ │ │ └── Command │ │ │ │ ├── bio.pm │ │ │ │ └── readable.pm │ │ ├── model.pm │ │ ├── model │ │ │ └── Command │ │ │ │ ├── gapfill.pm │ │ │ │ ├── genome.pm │ │ │ │ ├── readable.pm │ │ │ │ ├── runfba.pm │ │ │ │ └── sbml.pm │ │ ├── mseed.pm │ │ ├── mseed │ │ │ └── Command │ │ │ │ ├── bio.pm │ │ │ │ ├── createuser.pm │ │ │ │ ├── defaults.pm │ │ │ │ ├── error.pm │ │ │ │ ├── genome.pm │ │ │ │ ├── get.pm │ │ │ │ ├── history.pm │ │ │ │ ├── import.pm │ │ │ │ ├── list.pm │ │ │ │ ├── login.pm │ │ │ │ ├── logout.pm │ │ │ │ ├── mapping.pm │ │ │ │ ├── model.pm │ │ │ │ ├── modeldriver.pm │ │ │ │ ├── pp.pm │ │ │ │ ├── revert.pm │ │ │ │ ├── stores.pm │ │ │ │ └── whoami.pm │ │ ├── stores.pm │ │ └── stores │ │ │ └── Command │ │ │ ├── add.pm │ │ │ ├── list.pm │ │ │ ├── prioritize.pm │ │ │ └── rm.pm │ ├── Auth.pm │ ├── Auth │ │ ├── Basic.pm │ │ ├── Factory.pm │ │ └── Public.pm │ ├── Configuration.pm │ ├── CoreApi.pm │ ├── CoreApi2.pm │ ├── Database.pm │ ├── Database │ │ ├── Composite.pm │ │ ├── FileDB.pm │ │ ├── FileDB │ │ │ ├── KeyValueStore.pm │ │ │ └── test │ │ │ │ └── kvstore_speed.pl │ │ ├── Iterator.pm │ │ ├── Iterator │ │ │ ├── MongoDB.pm │ │ │ └── REST.pm │ │ ├── MongoDB.pm │ │ ├── MongoDBSimple.pm │ │ └── Shock.pm │ ├── FIGMODEL.pm │ ├── FIGMODEL │ │ ├── FIGMODELObject.pm │ │ ├── FIGMODELTable.pm │ │ ├── FIGMODELTableRow.pm │ │ ├── FIGMODELcompound.pm │ │ ├── FIGMODELdata.pm │ │ ├── FIGMODELdatabase.pm │ │ ├── FIGMODELfba.pm │ │ ├── FIGMODELgenome.pm │ │ ├── FIGMODELinterval.pm │ │ ├── FIGMODELmapping.pm │ │ ├── FIGMODELmedia.pm │ │ ├── FIGMODELmodel.pm │ │ ├── FIGMODELreaction.pm │ │ ├── FIGMODELrole.pm │ │ ├── FIGMODELweb.pm │ │ ├── media.pm │ │ ├── queue.pm │ │ └── regmodel.pm │ ├── FIGMODELConfig.txt │ ├── FIGMODELscheduler.pl │ ├── GapfillingDB │ │ ├── CPD.pm │ │ ├── CPDGAP.pm │ │ ├── CPDGAPMDL.pm │ │ ├── CPDMDL.pm │ │ ├── GAPMDL.pm │ │ ├── GAPREP.pm │ │ ├── GAPREPMDL.pm │ │ ├── GapfillingDB.xml │ │ ├── ObjectBase.pm │ │ ├── REPMDL.pm │ │ └── RXN.pm │ ├── Interface │ │ ├── interface.pm │ │ └── workspace.pm │ ├── JobDriver.pl │ ├── MS │ │ ├── AliasSet.pm │ │ ├── Annotation.pm │ │ ├── BaseObject.pm │ │ ├── Biochemistry.pm │ │ ├── Biomass.pm │ │ ├── BiomassCompound.pm │ │ ├── BiomassTemplate.pm │ │ ├── BiomassTemplateComponent.pm │ │ ├── Compartment.pm │ │ ├── Complex.pm │ │ ├── ComplexReaction.pm │ │ ├── ComplexRole.pm │ │ ├── Compound.pm │ │ ├── CompoundCue.pm │ │ ├── CompoundPk.pm │ │ ├── CompoundSet.pm │ │ ├── CompoundSetCompound.pm │ │ ├── CompoundStructure.pm │ │ ├── Constraint.pm │ │ ├── ConstraintVariable.pm │ │ ├── Cue.pm │ │ ├── DB │ │ │ ├── AliasSet.pm │ │ │ ├── Annotation.pm │ │ │ ├── Biochemistry.pm │ │ │ ├── Biomass.pm │ │ │ ├── BiomassCompound.pm │ │ │ ├── BiomassTemplate.pm │ │ │ ├── BiomassTemplateComponent.pm │ │ │ ├── Compartment.pm │ │ │ ├── Complex.pm │ │ │ ├── ComplexReaction.pm │ │ │ ├── ComplexRole.pm │ │ │ ├── Compound.pm │ │ │ ├── CompoundCue.pm │ │ │ ├── CompoundPk.pm │ │ │ ├── CompoundSet.pm │ │ │ ├── CompoundSetCompound.pm │ │ │ ├── CompoundStructure.pm │ │ │ ├── Constraint.pm │ │ │ ├── ConstraintVariable.pm │ │ │ ├── Cue.pm │ │ │ ├── Deletion.pm │ │ │ ├── Experiment.pm │ │ │ ├── ExperimentDataPoint.pm │ │ │ ├── FBABiomassVariable.pm │ │ │ ├── FBACompoundBound.pm │ │ │ ├── FBACompoundVariable.pm │ │ │ ├── FBAConstraint.pm │ │ │ ├── FBAConstraintVariable.pm │ │ │ ├── FBADeletionResult.pm │ │ │ ├── FBAFormulation.pm │ │ │ ├── FBAMetaboliteProductionResult.pm │ │ │ ├── FBAMinimalMediaResult.pm │ │ │ ├── FBAObjectiveTerm.pm │ │ │ ├── FBAPhenotypeSimulation.pm │ │ │ ├── FBAPhenotypeSimultationResult.pm │ │ │ ├── FBAProblem.pm │ │ │ ├── FBAReactionBound.pm │ │ │ ├── FBAReactionVariable.pm │ │ │ ├── FBAResult.pm │ │ │ ├── Feature.pm │ │ │ ├── FeatureRole.pm │ │ │ ├── FluxMeasurement.pm │ │ │ ├── GapfillingFormulation.pm │ │ │ ├── GapfillingGeneCandidate.pm │ │ │ ├── GapfillingSolution.pm │ │ │ ├── GapfillingSolutionReaction.pm │ │ │ ├── GeneMeasurement.pm │ │ │ ├── Genome.pm │ │ │ ├── GfSolutionReactionGeneCandidate.pm │ │ │ ├── Insertion.pm │ │ │ ├── Mapping.pm │ │ │ ├── Media.pm │ │ │ ├── MediaCompound.pm │ │ │ ├── MetaboliteMeasurement.pm │ │ │ ├── Model.pm │ │ │ ├── ModelCompartment.pm │ │ │ ├── ModelCompound.pm │ │ │ ├── ModelReaction.pm │ │ │ ├── ModelReactionProtein.pm │ │ │ ├── ModelReactionProteinSubunit.pm │ │ │ ├── ModelReactionProteinSubunitGene.pm │ │ │ ├── ModelReactionReagent.pm │ │ │ ├── ObjectiveTerm.pm │ │ │ ├── Reaction.pm │ │ │ ├── ReactionCue.pm │ │ │ ├── ReactionSet.pm │ │ │ ├── ReactionSetMultiplier.pm │ │ │ ├── ReactionSetReaction.pm │ │ │ ├── Reagent.pm │ │ │ ├── Role.pm │ │ │ ├── RoleSet.pm │ │ │ ├── RoleSetRole.pm │ │ │ ├── Solution.pm │ │ │ ├── SolutionConstraint.pm │ │ │ ├── SolutionVariable.pm │ │ │ ├── Strain.pm │ │ │ ├── SubsystemState.pm │ │ │ ├── UniversalReaction.pm │ │ │ ├── UptakeMeasurement.pm │ │ │ ├── User.pm │ │ │ └── Variable.pm │ │ ├── Deletion.pm │ │ ├── Environment.pm │ │ ├── Experiment.pm │ │ ├── ExperimentDataPoint.pm │ │ ├── FBABiomassVariable.pm │ │ ├── FBACompoundBound.pm │ │ ├── FBACompoundVariable.pm │ │ ├── FBAConstraint.pm │ │ ├── FBAConstraintVariable.pm │ │ ├── FBADeletionResult.pm │ │ ├── FBAFormulation.pm │ │ ├── FBAMetaboliteProductionResult.pm │ │ ├── FBAMinimalMediaResult.pm │ │ ├── FBAObjectiveTerm.pm │ │ ├── FBAPhenotypeSimulation.pm │ │ ├── FBAPhenotypeSimultationResult.pm │ │ ├── FBAProblem.pm │ │ ├── FBAReactionBound.pm │ │ ├── FBAReactionVariable.pm │ │ ├── FBAResult.pm │ │ ├── Factories │ │ │ ├── Annotation.pm │ │ │ ├── ExchangeFormatFactory.pm │ │ │ ├── FBAMODELFactory.pm │ │ │ ├── ModelTable.pm │ │ │ └── PPOFactory.pm │ │ ├── Feature.pm │ │ ├── FeatureRole.pm │ │ ├── FluxMeasurement.pm │ │ ├── GapfillingFormulation.pm │ │ ├── GapfillingGeneCandidate.pm │ │ ├── GapfillingSolution.pm │ │ ├── GapfillingSolutionReaction.pm │ │ ├── GeneMeasurement.pm │ │ ├── Genome.pm │ │ ├── GfSolutionReactionGeneCandidate.pm │ │ ├── IndexedObject.pm │ │ ├── Insertion.pm │ │ ├── InstanceTransport.pm │ │ ├── Mapping.pm │ │ ├── Media.pm │ │ ├── MediaCompound.pm │ │ ├── MetaboliteMeasurement.pm │ │ ├── Metadata │ │ │ ├── Definitions.pm │ │ │ └── Types.pm │ │ ├── Model.pm │ │ ├── ModelAnalysis.pm │ │ ├── ModelAnalysisAnnotation.pm │ │ ├── ModelAnalysisBiochemistry.pm │ │ ├── ModelAnalysisMapping.pm │ │ ├── ModelAnalysisModel.pm │ │ ├── ModelCompartment.pm │ │ ├── ModelCompound.pm │ │ ├── ModelReaction.pm │ │ ├── ModelReactionProtein.pm │ │ ├── ModelReactionProteinSubunit.pm │ │ ├── ModelReactionProteinSubunitGene.pm │ │ ├── ModelReactionReagent.pm │ │ ├── ObjectiveTerm.pm │ │ ├── Reaction.pm │ │ ├── ReactionCue.pm │ │ ├── ReactionSet.pm │ │ ├── ReactionSetMultiplier.pm │ │ ├── ReactionSetReaction.pm │ │ ├── Reagent.pm │ │ ├── Role.pm │ │ ├── RoleSet.pm │ │ ├── RoleSetRole.pm │ │ ├── Solution.pm │ │ ├── SolutionConstraint.pm │ │ ├── SolutionVariable.pm │ │ ├── Strain.pm │ │ ├── SubsystemState.pm │ │ ├── UniversalReaction.pm │ │ ├── UptakeMeasurement.pm │ │ ├── User.pm │ │ ├── Utilities │ │ │ ├── GlobalFunctions.pm │ │ │ └── SimpleTable.pm │ │ └── Variable.pm │ ├── ModelDB.sql │ ├── ModelDB.sqlite │ ├── ModelDB │ │ ├── BIOLOG_SIGNALS.pm │ │ ├── BIOMASS.pm │ │ ├── COMMENT.pm │ │ ├── COMPARTMENTS.pm │ │ ├── COMPLEX.pm │ │ ├── COMPLEX_ROLE.pm │ │ ├── COMPOUND.pm │ │ ├── COMPOUND_ALIAS.pm │ │ ├── COMPOUND_BIOMASS.pm │ │ ├── COMPOUND_GROUPING.pm │ │ ├── COMPOUND_REACTION.pm │ │ ├── CURRENTID.pm │ │ ├── DBENTITY.pm │ │ ├── DBLINKS.pm │ │ ├── DIAGRAM.pm │ │ ├── DIAGRAM_OBJECTS.pm │ │ ├── ESSENTIALITYSET.pm │ │ ├── EXPERIMENT.pm │ │ ├── FBA_RESULTS.pm │ │ ├── GENE_ESSENTIALITY.pm │ │ ├── GENOMESTATS.pm │ │ ├── HISTORY.pm │ │ ├── MEDIA.pm │ │ ├── MEDIA_COMPOUND.pm │ │ ├── MESSAGE.pm │ │ ├── MODEL.pm │ │ ├── MODELVERSIONS.pm │ │ ├── MODEL_ESSENTIALITY.pm │ │ ├── MODEL_FVA.pm │ │ ├── ModelDB.xml │ │ ├── OUTPUTID.pm │ │ ├── ObjectBase.pm │ │ ├── PERMISSIONS.pm │ │ ├── REACTION.pm │ │ ├── REACTION_ALIAS.pm │ │ ├── REACTION_COMPLEX.pm │ │ ├── REACTION_GROUPING.pm │ │ ├── REACTION_MODEL.pm │ │ ├── REFERENCE.pm │ │ ├── ROLE.pm │ │ ├── SUBSYSTEM.pm │ │ ├── SUBSYSTEM_ROLE.pm │ │ ├── USERS.pm │ │ └── UserSession.pm │ ├── ModelDriver.pm │ ├── ModelSEEDClients │ │ ├── FBAMODELClient.pm │ │ ├── MSAccountManagementClient.pm │ │ ├── MSSeedSupportClient.pm │ │ ├── ModelDBserver.pm │ │ ├── ModelSEEDCommandAPIClient.pm │ │ └── t │ │ │ ├── FBAMODEL.t │ │ │ ├── MSSeedSupportClient.t │ │ │ └── ModelSEEDCommandAPIClient.t │ ├── ModelSEEDScripts │ │ ├── BiochemistryMappingPrintReadable.pl │ │ ├── ChargeMolfiles.pl │ │ ├── JanakaTestScript.pl │ │ ├── KBaseScriptBuilder.pl │ │ ├── MiscScripts.pl │ │ ├── ModelFBA.pl │ │ ├── ModelReconstruction.pl │ │ ├── MongoDBTest.pl │ │ ├── ObjectBuilder.pl │ │ ├── ParsePrimerData.pl │ │ ├── QuickConvert.pm │ │ ├── biochem_test.pl │ │ ├── bootstrap.sh │ │ ├── build-modelseed-sqlite-db │ │ ├── build-test-db │ │ ├── configureMFAToolkit.pl │ │ ├── core_api_test.pl │ │ ├── createBiochemistryMapping.pl │ │ ├── define_fatty_acid_groups.pl │ │ ├── delete-old-files.pl │ │ ├── diffDirectories.pl │ │ ├── dumb-importer.pl │ │ ├── exportPodWiki.pl │ │ ├── filterModelGenes.pl │ │ ├── find_potential_hits.pl │ │ ├── gapfillingModel.pl │ │ ├── generateTablesForKbase.pl │ │ ├── ms-config.pl │ │ ├── ms-create-wiki-docs.pl │ │ ├── ms-install-database │ │ ├── ms-load-mysql.pl │ │ ├── ms-resetdatabase.pl │ │ ├── newDevelopmentScript.pl │ │ ├── parseRoseObjects.pl │ │ ├── resolve-cpd-KEGG-aliases.pl │ │ ├── resolve-rxn-KEGG-aliases.pl │ │ ├── switch-modeldb.pl │ │ ├── unpack-model-db.pl │ │ └── updateDefaultKBaseMongoDB.pl │ ├── ModelSEEDUtilities │ │ └── FileIOFunctions.pm │ ├── MooseDB │ │ ├── media.pm │ │ ├── mediacpd.pm │ │ ├── object.pm │ │ └── user.pm │ ├── Reference.pm │ ├── SchedulerDB │ │ ├── JOB.pm │ │ ├── ObjectBase.pm │ │ ├── QUEUE.pm │ │ └── SchedulerDB.xml │ ├── ServerBackends │ │ ├── FBAMODEL.pm │ │ ├── MSSeedSupport.pm │ │ ├── ModelSEEDCommandAPI.pm │ │ ├── TempModelSEEDCommandAPI.pm │ │ └── t │ │ │ ├── FBAMODEL.t │ │ │ └── MSSeedSupport.t │ ├── Settings.config │ ├── Store.pm │ ├── StrainDB │ │ ├── CONTIG.pm │ │ ├── CONTIGPRIMER.pm │ │ ├── EXPERIMENTER.pm │ │ ├── FEATURE.pm │ │ ├── FEATURE_ALIAS.pm │ │ ├── FEATURE_CONTIG.pm │ │ ├── ObjectBase.pm │ │ ├── OldStrainDB.xml │ │ ├── PHENOTYPE.pm │ │ ├── PREDICTIONS.pm │ │ ├── STRAIN.pm │ │ ├── STRAIN_CONTIG.pm │ │ └── StrainDB.xml │ ├── TestingHelpers.pm │ ├── generatePriceData.pm │ ├── globals.pm │ ├── modelapi.pm │ └── utilities.pm ├── ModelSEEDScripts │ ├── addreferences.pl │ ├── read_test.pl │ ├── strain_database_dump.pl │ ├── svr_all_compounds.pl │ ├── svr_all_models.pl │ ├── svr_all_reactions.pl │ ├── svr_get_compound_data.pl │ ├── svr_get_model_data.pl │ ├── svr_get_model_rxn.pl │ ├── svr_get_reaction_data.pl │ ├── svr_model_build.pl │ ├── svr_model_data.pl │ ├── svr_model_diff.pl │ ├── svr_model_stats.pl │ ├── svr_model_status.pl │ ├── svr_my_models.pl │ ├── svr_retreive_model.pl │ ├── svr_run_gene_activity_simulation.pl │ └── svr_run_model_fba.pl ├── PPO │ ├── DBMaster.pm │ ├── DBObject.pm │ ├── DBObjectCache.pm │ ├── DBSQLArray.pm │ ├── PPOBackend.pm │ ├── PPOBackend │ │ ├── MySQL.pm │ │ └── SQLite.pm │ ├── PPOGenerator.pm │ ├── ppo_generate.pl │ └── ppo_sqlite_copy.pl └── myRAST │ ├── ALITREserver.pm │ ├── ANNOserver.pm │ ├── ATserver.pm │ ├── AliTreeSims.pm │ ├── AlignTree.pm │ ├── AnalyzeMGPanel.pm │ ├── ArrowGlyph.pm │ ├── BerkTable.pm │ ├── Browser.pm │ ├── ClientThing.pm │ ├── Clustering.pm │ ├── ContigEndGlyph.pm │ ├── CorrTableEntry.pm │ ├── DesktopRast.pm │ ├── DesktopRastFrame.pm │ ├── ErrorMessage.pm │ ├── ExportFeaturePanel.pm │ ├── ExportSubsystemsPanel.pm │ ├── FS_RAST.pm │ ├── FileLocking.pm │ ├── GenbankComparisonFrame.pm │ ├── GenoGraphics.pm │ ├── GenomeInfoPanel.pm │ ├── Glyph.pm │ ├── IntergenicGlyph.pm │ ├── JobBrowserFrame.pm │ ├── MinimalTracer.pm │ ├── NCBI_genetic_code.pm │ ├── NCBI_taxonomy.pm │ ├── NewSampleFrame.pm │ ├── NotifyClient.pm │ ├── NotifyServer.pm │ ├── ParamPanel.pm │ ├── PipelineHost.pm │ ├── PipelineStage.pm │ ├── ProtSims.pm │ ├── ProteinPanel.pm │ ├── Psiblast.pm │ ├── RASTserver.pm │ ├── RegionPanel.pm │ ├── SAPserver.pm │ ├── SUPserver.pm │ ├── SampleAnalysisPanel.pm │ ├── SampleDir.pm │ ├── SampleJobBrowserFrame.pm │ ├── SasApp.pm │ ├── ScriptThing.pm │ ├── SeedAware.pm │ ├── SeedEnv.pm │ ├── SeedHTML.pm │ ├── SeedUtils.pm │ ├── SeedV.pm │ ├── Sim.pm │ ├── Subtrack.pm │ ├── Track.pm │ ├── VectorCompareFrame.pm │ ├── ViewableFile.pm │ ├── WebBrowser.pm │ ├── WriteGenbank.pm │ ├── ffxtree.pm │ ├── find_special_proteins.pm │ ├── gjoalign2html.pm │ ├── gjoalignandtree.pm │ ├── gjoalignment.pm │ ├── gjocodonlib.pm │ ├── gjogenbank.pm │ ├── gjolib.pm │ ├── gjonativecodonlib.pm │ ├── gjonewicklib.pm │ ├── gjoparseblast.pm │ ├── gjophylip.pm │ ├── gjosegmentlib.pm │ ├── gjoseqlib.pm │ ├── myRAST.pm │ ├── myRASTApp.pm │ ├── myRASTVersion.pm │ ├── myrast_bootstrap.pm │ ├── representative_sequences.pm │ ├── set_utilities.pm │ └── tree_utilities.pm ├── software └── mfatoolkit │ ├── Include │ ├── AtomCPP.h │ ├── AtomType.h │ ├── CPLEXapi.h │ ├── Data.h │ ├── Definitions.h │ ├── GLPKapi.h │ ├── Gene.h │ ├── GeneInterval.h │ ├── GlobalFunctions.h │ ├── Identity.h │ ├── InterfaceFunctions.h │ ├── LINDOapi.h │ ├── MFAProblem.h │ ├── MFAToolkit.h │ ├── Reaction.h │ ├── SCIPapi.h │ ├── SolverInterface.h │ ├── Species.h │ ├── UtilityFunctions.h │ └── stringDB.h │ ├── Linux │ ├── SystemParameters.txt │ └── makefile │ ├── Parameters │ ├── ArgonneProcessing.txt │ ├── GapFilling.txt │ ├── GapGeneration.txt │ └── ProductionMFA.txt │ ├── Source │ ├── AtomCPP.cpp │ ├── AtomType.cpp │ ├── CPLEXapi.cpp │ ├── CPLEXapiEMPTY.cpp │ ├── Data.cpp │ ├── FullSCIPapi.cpp │ ├── GLPKapi.cpp │ ├── GLPKapiEMPTY.cpp │ ├── Gene.cpp │ ├── GeneInterval.cpp │ ├── GlobalFunctions.cpp │ ├── Identity.cpp │ ├── InterfaceFunctions.cpp │ ├── LINDOapi.cpp │ ├── LINDOapiEMPTY.cpp │ ├── MFAProblem.cpp │ ├── Reaction.cpp │ ├── SCIPapi.cpp │ ├── SCIPapiEMPTY.cpp │ ├── SolverInterface.cpp │ ├── Species.cpp │ ├── UtilityFunctions.cpp │ ├── driver.cpp │ └── stringDB.cpp │ ├── bin │ └── InputFileList.txt │ └── etc │ ├── AtomTypes.txt │ ├── DefaultCompartments.txt │ ├── Defaults.txt │ ├── FileReferences.txt │ ├── FinalGroups.txt │ ├── FunctionRoleMapping.txt │ ├── GroupTranslation.txt │ ├── HopeScenarios.txt │ └── ReactionDatabase.txt └── t ├── 00-load.t ├── Auth ├── Basic.t ├── Factory.t └── Public.t ├── Configuration.t ├── FIGMODEL.t ├── Reference.t ├── Store.t ├── TestingHelpers.t ├── boilerplate.t ├── data-import.t ├── database ├── Composite.t ├── FileDB.t ├── FileDBSpeed.t ├── MongoDB.t ├── MongoDBSimple.t ├── Shock.t └── filedb │ └── KeyValueStore.t ├── figmodel ├── FIGMODELTable.t ├── FIGMODELdatabase.t ├── FIGMODELfba.t ├── FIGMODELgenome.t ├── FIGMODELmodel.t ├── queue.t └── workspace.t ├── interface └── interface.t ├── manifest.t ├── ms ├── Biochemistry.t ├── Compartment.t ├── Media.t ├── Reaction.t ├── biochemistry-object.json ├── factories │ ├── Annotation.t │ └── Biochemistry.t └── versioning.t ├── pod-coverage.t ├── pod.t └── require.t /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | *~ 3 | *.swp 4 | *.#* 5 | *.o 6 | data/* 7 | .includepath 8 | .project 9 | .metadata/* 10 | bin/*.sh 11 | bin/*.cmd 12 | bin/ms-* 13 | bin/bc-* 14 | bin/fba-* 15 | bin/mdl-* 16 | bin/db-* 17 | bin/util-* 18 | bin/sq-* 19 | config/* 20 | MFAToolkit/* 21 | Model-SEED-core.* 22 | Model-SEED-setup/* 23 | logs/* 24 | *.ilk 25 | *.pdb 26 | software/mfatoolkit/bin/* 27 | software/cygwin/* 28 | software/MinGW/* 29 | software/git/* 30 | software/oldMinGW/* 31 | software/PortableApps/* 32 | software/strawberryperl/* 33 | workspace/* 34 | !.gitignore 35 | blib* 36 | Makefile 37 | Makefile.old 38 | Build 39 | Build.bat 40 | _build* 41 | pm_to_blib* 42 | *.tar.gz 43 | .lwpcookies 44 | cover_db 45 | pod2htm*.tmp 46 | ModelSeedCore-* 47 | local/ 48 | .carton/ 49 | -------------------------------------------------------------------------------- /Configuration Instructions.txt: -------------------------------------------------------------------------------- 1 | See instructions at: 2 | http://bionet.mcs.anl.gov/index.php/Configuring_the_Model_SEED_Distribution -------------------------------------------------------------------------------- /MANIFEST.SKIP: -------------------------------------------------------------------------------- 1 | ~$ 2 | \.swp$ 3 | \.o$ 4 | ^data/.* 5 | \.includepath 6 | \.project 7 | \.metadata/* 8 | config/Settings.txt 9 | config/FIGMODELConfig.txt 10 | config/ModelSEEDbootstrap.pm 11 | logs/* 12 | .ilk$ 13 | .pdb$ 14 | software/mfatoolkit/bin/* 15 | software/cygwin/* 16 | workspace/* 17 | ^MYMETA.yml$ 18 | ^\..* 19 | blib 20 | _build 21 | ^MYMETA\.json$ 22 | local/* 23 | bin 24 | -------------------------------------------------------------------------------- /bin/ModelDriver.pl: -------------------------------------------------------------------------------- 1 | use FindBin qw($Bin); 2 | use lib $Bin.'/../config'; 3 | use lib $Bin.'/../lib'; 4 | use lib $Bin.'/../lib/ModelSEED'; 5 | use lib $Bin.'/../lib/myRAST'; 6 | use lib $Bin.'/../lib/PPO'; 7 | use lib $Bin.'/../lib/FigKernelPackages'; 8 | use lib $Bin.'/../lib/ModelSEED/ModelSEEDClients'; 9 | use ModelSEEDbootstrap; 10 | use ModelSEED::ModelDriver; 11 | $|=1; 12 | ModelSEED::ModelDriver->run(@ARGV); 13 | 1; -------------------------------------------------------------------------------- /bin/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This readme file explains the purpose of every binary included in this directory. 2 | configureModelSEED.(cmd/sh): this script configures the Model SEED based on the currently installed environment 3 | ModelDriver.(cmd/sh): this shell script runs the ModelDriver.pl script that is called by the job pipeline to run all ModelSEED commands utilized in the pipeline. 4 | QueueDriver.(cmd/sh): this shell script run the FIGMODELschedule.pl script that actually manages the job queue by starting jobs, monitoring jobs, and killing jobs when needed. 5 | StartScheduler.(cmd/sh): this shell script calls QueueDriver.sh in "nohup" mode for each of the distinct queues being maintained (e.g. slow, fast, cplex..). This script should be called if one of the job pipelines has crashed for some reason. 6 | UpdateModelSEED.(cmd/sh): this shell script does a git pull and make on the production ModelSEED perl code. 7 | -------------------------------------------------------------------------------- /bin/bio: -------------------------------------------------------------------------------- 1 | mscli bio $* 2 | -------------------------------------------------------------------------------- /bin/genome: -------------------------------------------------------------------------------- 1 | mscli genome $* -------------------------------------------------------------------------------- /bin/import: -------------------------------------------------------------------------------- 1 | mscli import $* -------------------------------------------------------------------------------- /bin/mapping: -------------------------------------------------------------------------------- 1 | mscli mapping $* 2 | -------------------------------------------------------------------------------- /bin/model: -------------------------------------------------------------------------------- 1 | mscli model $* -------------------------------------------------------------------------------- /bin/ms: -------------------------------------------------------------------------------- 1 | mscli ms $* 2 | -------------------------------------------------------------------------------- /bin/ms-build-modules: -------------------------------------------------------------------------------- 1 | DIR="$( cd "$( dirname "$0" )" && pwd )" 2 | SCRIPT=$DIR/../lib/BuildEnv/ms-build-modules.pl 3 | perl $SCRIPT $* 4 | -------------------------------------------------------------------------------- /bin/ms-config: -------------------------------------------------------------------------------- 1 | DIR="$( cd "$( dirname "$0" )" && pwd )" 2 | SCRIPT=$DIR/../lib/ModelSEED/ModelSEEDScripts/ms-config.pl 3 | perl -I $DIR/../local/lib/perl5 $SCRIPT $* 4 | -------------------------------------------------------------------------------- /bin/mscli: -------------------------------------------------------------------------------- 1 | perl "/Users/chenry/code/Model-SEED-core/bin/mscli.pl" $* 2 | -------------------------------------------------------------------------------- /bin/mscli.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | use FindBin qw($Bin); 3 | use lib $Bin.'/../config'; 4 | use lib $Bin.'/../lib'; 5 | use lib $Bin.'/../lib/ModelSEED'; 6 | use lib $Bin.'/../lib/myRAST'; 7 | use lib $Bin.'/../lib/PPO'; 8 | use lib $Bin.'/../lib/FigKernelPackages'; 9 | use lib $Bin.'/../lib/ModelSEED/ModelSEEDClients'; 10 | use ModelSEEDbootstrap; 11 | use Class::Autouse; 12 | use Class::Autouse qw( 13 | ModelSEED::App::mseed 14 | ModelSEED::App::bio 15 | ModelSEED::App::genome 16 | ModelSEED::App::import 17 | ModelSEED::App::model 18 | ModelSEED::App::stores 19 | ModelSEED::App::mapping 20 | ModelSEED::ModelDriver 21 | ModelSEED::Interface::interface 22 | ); 23 | $|=1; 24 | #Determine which subscript the user is calling 25 | my $target = shift(@ARGV); 26 | if ($target eq "ms") { 27 | ModelSEED::App::mseed->run; 28 | } elsif ($target eq "bio") { 29 | ModelSEED::App::bio->run; 30 | } elsif ($target eq "genome") { 31 | ModelSEED::App::genome->run; 32 | } elsif ($target eq "model") { 33 | ModelSEED::App::model->run; 34 | } elsif ($target eq "mapping") { 35 | ModelSEED::App::mapping->run; 36 | } elsif ($target eq "stores") { 37 | ModelSEED::App::stores->run; 38 | } elsif ($target eq "import") { 39 | ModelSEED::App::import->run; 40 | } elsif ($target eq "modeldriver") { 41 | ModelSEED::ModelDriver->run(@ARGV); 42 | } 43 | 44 | =pod 45 | 46 | =head1 NAME 47 | 48 | mscli - A unified script to drive the entire Model SEED command line interface 49 | 50 | 51 | =head1 SYNOPSIS 52 | 53 | ms [command] [options] 54 | 55 | 56 | =head1 DESCRIPTION 57 | 58 | Use the B command for a list of avaiable commands. 59 | For help with a specfic command, use the B command 60 | followed by the name of the command you are interested in. 61 | 62 | $ ms commands 63 | $ ms help login 64 | 65 | =cut 66 | -------------------------------------------------------------------------------- /bin/stores: -------------------------------------------------------------------------------- 1 | mscli stores $* -------------------------------------------------------------------------------- /ignore.txt: -------------------------------------------------------------------------------- 1 | blib* 2 | Makefile 3 | Makefile.old 4 | Build 5 | Build.bat 6 | _build* 7 | pm_to_blib* 8 | *.tar.gz 9 | .lwpcookies 10 | cover_db 11 | pod2htm*.tmp 12 | ModelSeedCore-* 13 | -------------------------------------------------------------------------------- /lib/BuildEnv/build.perl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | 5 | use Carp; 6 | use File::Basename; 7 | use Cwd 'abs_path'; 8 | 9 | my $parallel = "-j4"; 10 | 11 | my $here = abs_path("."); 12 | my $dest = "$here/INSTALL"; 13 | 14 | -d $dest || mkdir $dest; 15 | 16 | my $perl_url = "http://www.cpan.org/src/perl-5.12.3.tar.gz"; 17 | my $perl_tgz = basename($perl_url); 18 | my $perl_vers = basename($perl_tgz, ".tar.gz"); 19 | print "tgz=$perl_tgz vers=$perl_vers\n"; 20 | 21 | if (! -f $perl_tgz) 22 | { 23 | run("curl", "-o", $perl_tgz, "-L", $perl_url); 24 | } 25 | if (! -f $perl_tgz) 26 | { 27 | die "could not get perl\n"; 28 | } 29 | 30 | if (! -d $perl_vers) 31 | { 32 | run("tar", "xzf", $perl_tgz); 33 | } 34 | 35 | chdir $perl_vers; 36 | 37 | run("./Configure", "-de", "-Dprefix=$dest", "-A", "ld=-m32", 38 | "-Dcc=cc -m32"); 39 | #run("./Configure", "-de", "-Dprefix=$dest"); 40 | #run("./Configure", "-de", "-Dprefix=$dest", "-Duserelocatableinc", "-Dusesitecustomize"); 41 | run("make", $parallel); 42 | run("make install > $here/install.out 2>&1"); 43 | 44 | sub run 45 | { 46 | my(@cmd) = @_; 47 | print "@cmd\n"; 48 | my $rc = system(@cmd); 49 | $rc == 0 or croak "Failed with rc=$rc: @cmd"; 50 | } 51 | -------------------------------------------------------------------------------- /lib/BuildEnv/module-list: -------------------------------------------------------------------------------- 1 | MRO::Compat 2 | Moose 3 | MooseX::NonMoose 4 | MooseX::Singleton 5 | MooseX::Method::Signatures 6 | MooseX::Params::Validate 7 | Class::Accessor 8 | XML::LibXML 9 | LWP::UserAgent 10 | List::Util 11 | List::MoreUtils 12 | URI::Escape 13 | YAML 14 | YAML::Any 15 | YAML::XS 16 | File::HomeDir 17 | IPC::Run 18 | MIME::Tools 19 | SOAP::Lite 20 | PDL 21 | Class::Accessor 22 | DB_File 23 | Number::Format 24 | Spreadsheet::WriteExcel 25 | Spreadsheet::ParseExcel 26 | Spreadsheet::XLSX 27 | Getopt::Std 28 | DBI 29 | HTML::Template 30 | Template 31 | XML::Simple 32 | FreezeThaw 33 | DBD::SQLite 34 | JSON 35 | JSON::Any 36 | Proc::ParallelLoop 37 | CHI 38 | File::NFSLock 39 | Config::Tiny 40 | File::Copy::Recursive 41 | -------------------------------------------------------------------------------- /lib/BuildEnv/ms-build-perl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PERLBREWURL=https://raw.github.com/gugod/App-perlbrew/master/perlbrew 4 | TMPDIR=$1; 5 | if [ -z "$TMPDIR" ]; then 6 | if [ -d "/tmp" ]; then 7 | TMPDIR="/tmp" 8 | else 9 | TMPDIR="." 10 | fi 11 | fi 12 | 13 | cd $TMPDIR 14 | 15 | echo 16 | if type curl >/dev/null 2>&1; then 17 | echo "## Download the latest perlbrew" 18 | curl -k -Lo perlbrew $PERLBREWURL >/dev/null 2>&1 19 | elif type wget >/dev/null 2>&1; then 20 | echo "## Download the latest perlbrew" 21 | wget --no-check-certificate -O perlbrew $PERLBREWURL >/dev/null 2>&1 22 | else 23 | echo "Need wget or curl to use $0" 24 | exit 1 25 | fi 26 | 27 | echo 28 | echo "## Installing perlbrew" 29 | chmod +x perlbrew 30 | ./perlbrew install 31 | 32 | echo "## Installing patchperl" 33 | ./perlbrew -fq install-patchperl 34 | 35 | echo "## Installing cpanm" 36 | ./perlbrew -fq install-cpanm 37 | 38 | ./perlbrew install --force 5.12.3 39 | ./perlbrew switch 5.12.3 40 | 41 | echo 42 | echo "## Done." 43 | rm ./perlbrew 44 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/exchangeFormat_to_gapfillingFormulation.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # exchangeFormat_to_gapfillingFormulation.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "exchangeFormat_to_gapfillingFormulation [--input exchange-file] [--output formulation-file] [--url service-url] [< exchange-file] [> formulation-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | } 57 | 58 | 59 | my $output = $fbaModelServicesObj->exchangeFormat_to_gapfillingFormulation($input); 60 | 61 | $json->pretty(1); 62 | print $out_fh $json->encode($output); 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/exchangeformat_to_fbamodel.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # exchangeformat_to_fbamodel.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "exchangeformat_to_fbamodel [--input exchange-file] [--output model-file] [--url service-url] [< exchange-file] [> model-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | } 57 | 58 | 59 | my $output = $fbaModelServicesObj->exchangeformat_to_fbamodel($input); 60 | 61 | $json->pretty(1); 62 | print $out_fh $json->encode($output); 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/fbamodel_to_exchangeformat.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # fbamodel_to_exchangeformat.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "fbamodel_to_exchangeformat [--input model-file] [--output exchange-file] [--url service-url] [< model-file] [> exchange-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | $input = $json->decode($input_txt) 57 | } 58 | 59 | 60 | my $output = $fbaModelServicesObj->fbamodel_to_exchangeformat($input); 61 | 62 | print $out_fh $output; 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/fbamodel_to_html.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # fbamodel_to_html.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "fbamodel_to_html [--input model-file] [--output html-file] [--url service-url] [< model-file] [> html-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | $input = $json->decode($input_txt) 57 | } 58 | 59 | 60 | my $output = $fbaModelServicesObj->fbamodel_to_html($input); 61 | 62 | print $out_fh $output; 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/fbamodel_to_sbml.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # fbamodel_to_sbml.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "fbamodel_to_sbml [--input model-file] [--output sbml-file] [--url service-url] [< model-file] [> sbml-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | $input = $json->decode($input_txt) 57 | } 58 | 59 | 60 | my $output = $fbaModelServicesObj->fbamodel_to_sbml($input); 61 | 62 | print $out_fh $output; 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/gapfillingFormulation_to_exchangeFormat.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # gapfillingFormulation_to_exchangeFormat.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "gapfillingFormulation_to_exchangeFormat [--input formulation-file] [--output exchange-file] [--url service-url] [< formulation-file] [> exchange-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | $input = $json->decode($input_txt) 57 | } 58 | 59 | 60 | my $output = $fbaModelServicesObj->gapfillingFormulation_to_exchangeFormat($input); 61 | 62 | print $out_fh $output; 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/genome_to_fbamodel.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # genome_to_fbamodel.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "genome_to_fbamodel [--input genome-file] [--output model-file] [--url service-url] [< genome-file] [> model-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | $input = $json->decode($input_txt) 57 | } 58 | 59 | 60 | my $output = $fbaModelServicesObj->genome_to_fbamodel($input); 61 | 62 | $json->pretty(1); 63 | print $out_fh $json->encode($output); 64 | close($out_fh); 65 | -------------------------------------------------------------------------------- /lib/KBaseScripts/fbaModelServices/get_gapfilling_formulation.pl: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # get_gapfilling_formulation.pl - This is a KBase command script automatically built from server specifications 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | ######################################################################## 7 | use strict; 8 | use lib "/home/chenry/kbase/models_api/clients/"; 9 | use fbaModelServicesClient; 10 | use JSON::XS; 11 | 12 | use Getopt::Long; 13 | 14 | my $input_file; 15 | my $output_file; 16 | my $url = "http://bio-data-1.mcs.anl.gov/services/fba"; 17 | 18 | my $rc = GetOptions( 19 | 'url=s' => \$url, 20 | 'input=s' => \$input_file, 21 | 'output=s' => \$output_file, 22 | ); 23 | 24 | my $usage = "get_gapfilling_formulation [--input formulation-id] [--output formulation-file] [--url service-url] [< formulation-id] [> formulation-file]"; 25 | 26 | @ARGV == 0 or die "Usage: $usage\n"; 27 | 28 | my $fbaModelServicesObj = fbaModelServicesClient->new($url); 29 | 30 | my $in_fh; 31 | if ($input_file) 32 | { 33 | open($in_fh, "<", $input_file) or die "Cannot open $input_file: $!"; 34 | } 35 | else 36 | { 37 | $in_fh = \*STDIN; 38 | } 39 | 40 | my $out_fh; 41 | if ($output_file) 42 | { 43 | open($out_fh, ">", $output_file) or die "Cannot open $output_file: $!"; 44 | } 45 | else 46 | { 47 | $out_fh = \*STDOUT; 48 | } 49 | my $json = JSON::XS->new; 50 | 51 | my $input; 52 | { 53 | local $/; 54 | undef $/; 55 | my $input_txt = <$in_fh>; 56 | } 57 | 58 | 59 | my $output = $fbaModelServicesObj->get_gapfilling_formulation($input); 60 | 61 | $json->pretty(1); 62 | print $out_fh $json->encode($output); 63 | close($out_fh); 64 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/bio.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::bio; 2 | use base 'App::Cmd'; 3 | 1; 4 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/bio/Command/readable.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::bio::Command::readable; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::App::Helpers 7 | ); 8 | sub abstract { return "Prints a readable format for the object" } 9 | sub usage_desc { return "bio readable [< name | name]" } 10 | sub execute { 11 | my ($self, $opts, $args) = @_; 12 | my $auth = ModelSEED::Auth::Factory->new->from_config; 13 | my $store = ModelSEED::Store->new(auth => $auth); 14 | my $helper = ModelSEED::App::Helpers->new(); 15 | my ($biochemistry, $ref) = $helper->get_object("biochemistry", $args, $store); 16 | $self->usage_error("Must specify an biochemistry to use") unless(defined($biochemistry)); 17 | print join("\n", @{$biochemistry->createReadableStringArray}); 18 | } 19 | 1; 20 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/genome.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::genome; 2 | use base 'App::Cmd'; 3 | 1; 4 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/genome/Command/mapping.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::genome::Command::mapping; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::App::Helpers 7 | ); 8 | sub abstract { return "Returns the associated mapping object" } 9 | sub usage_desc { return "genome mapping [< name | name] [options]" } 10 | sub opt_spec { 11 | return ( 12 | ["raw|r", "Return raw JSON output"], 13 | ["full", "Return the full mapping object in a readable form"], 14 | ); 15 | } 16 | 17 | sub execute { 18 | my ($self, $opts, $args) = @_; 19 | my $auth = ModelSEED::Auth::Factory->new->from_config; 20 | my $store = ModelSEED::Store->new(auth => $auth); 21 | my $helpers = ModelSEED::App::Helpers->new(); 22 | my ($anno, $annoRef) = $helpers->get_object("annotation", $args, $store); 23 | $self->usage_error("Must specify an annotation to use") unless(defined($anno)); 24 | print $helpers->handle_ref_lookup( 25 | $store, $anno, "mapping_uuid", "mapping", $opts 26 | ); 27 | } 28 | 1; 29 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/genome/Command/readable.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::genome::Command::readable; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::App::Helpers 7 | ); 8 | sub abstract { return "Prints a readable format for the object" } 9 | sub usage_desc { return "genome readable [< name | name]" } 10 | sub execute { 11 | my ($self, $opts, $args) = @_; 12 | my $auth = ModelSEED::Auth::Factory->new->from_config; 13 | my $store = ModelSEED::Store->new(auth => $auth); 14 | my $helper = ModelSEED::App::Helpers->new(); 15 | my ($annotation, $annoRef) = $helper->get_object("annotation", $args, $store); 16 | $self->usage_error("Must specify an annotation to use") unless(defined($annotation)); 17 | print join("\n", @{$annotation->createReadableStringArray}); 18 | } 19 | 1; 20 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/genome/Command/roles.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::genome::Command::roles; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::Reference 7 | ModelSEED::Configuration 8 | ModelSEED::App::Helpers 9 | ); 10 | sub abstract { return "Get the list of roles for an annotated genome" } 11 | sub usage_desc { return "genome roles [ genome || - ]"; } 12 | sub description { return <_getAnnotation($args); 20 | $self->usage_error("Must specify an annotation to use") unless(defined($annotation)); 21 | print map { $_->name ."\n" } @{$annotation->roles()}; 22 | } 23 | 24 | sub _getAnnotation { 25 | my ($self, $args) = @_; 26 | my $helpers = ModelSEED::App::Helpers->new(); 27 | my $ref = $helpers->get_base_ref("annotation", $args); 28 | if (defined($ref)) { 29 | my $auth = ModelSEED::Auth::Factory->new->from_config; 30 | my $store = ModelSEED::Store->new(auth => $auth); 31 | return $store->get_object($ref); 32 | } 33 | } 34 | 35 | 1; 36 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/genome/Command/subsystems.pm: -------------------------------------------------------------------------------- 1 | =pod 2 | 3 | =head1 anno roles 4 | 5 | Testing using Pod 6 | 7 | =cut 8 | package ModelSEED::App::genome::Command::subsystems; 9 | use base 'App::Cmd::Command'; 10 | use Try::Tiny; 11 | use Class::Autouse qw( 12 | ModelSEED::Store 13 | ModelSEED::Auth::Factory 14 | ModelSEED::Reference 15 | ModelSEED::Configuration 16 | ); 17 | sub abstract { return "Get the list of roles for an annotated genome" } 18 | sub usage_desc { return "genome roles [ options ]" } 19 | sub execute { 20 | my ($self, $opts, $args) = @_; 21 | my $auth = ModelSEED::Auth::Factory::new->from_config; 22 | my $store = ModelSEED::Store->new(auth => $auth); 23 | my $helpers = ModelSEED::App::Helpers->new; 24 | my ($annotation, $annoRef) = $helpers->get_object("annotation", $args, $store); 25 | $self->usage_error("Must specify an annotation to use") unless(defined($annotation)); 26 | print map { $_->type . "\t" . $_->name ."\n" } @{$annotation->subsystems}; 27 | } 28 | 29 | 1; 30 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/import.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::import; 2 | use base 'App::Cmd'; 3 | 1; 4 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mapping.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mapping; 2 | use base 'App::Cmd'; 3 | 1; 4 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mapping/Command/bio.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mapping::Command::bio; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::App::Helpers 7 | ); 8 | sub abstract { return "Returns the associated biochemistry object" } 9 | sub usage_desc { return "mapping bio [< name | name ] [options]" } 10 | sub opt_spec { 11 | return ( 12 | ["raw|r", "Return raw JSON output"], 13 | ["full", "Return the full bio object in a readable form"], 14 | ); 15 | } 16 | 17 | sub execute { 18 | my ($self, $opts, $args) = @_; 19 | my $auth = ModelSEED::Auth::Factory->new->from_config; 20 | my $store = ModelSEED::Store->new(auth => $auth); 21 | my $helpers = ModelSEED::App::Helpers->new(); 22 | my ($map, $mapRef) = $helpers->get_object("mapping", $args, $store); 23 | $self->usage_error("Must specify a mapping to use") unless(defined($map)); 24 | print $helpers->handle_ref_lookup( 25 | $store, $map, "biochemistry_uuid", "biochemistry", $opts 26 | ); 27 | } 28 | 1; 29 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mapping/Command/readable.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mapping::Command::readable; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::App::Helpers 7 | ); 8 | sub abstract { return "Prints a readable format for the object" } 9 | sub usage_desc { return "mapping readable [< name | name]" } 10 | sub execute { 11 | my ($self, $opts, $args) = @_; 12 | my $auth = ModelSEED::Auth::Factory->new->from_config; 13 | my $store = ModelSEED::Store->new(auth => $auth); 14 | my $helper = ModelSEED::App::Helpers->new(); 15 | my ($mapping, $mapRef) = $helper->get_object("mapping", $args, $store); 16 | $self->usage_error("Must specify an mapping to use") unless(defined($mapping)); 17 | print join("\n", @{$mapping->createReadableStringArray}); 18 | } 19 | 1; 20 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/model.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::model; 2 | use base 'App::Cmd'; 3 | 1; 4 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/model/Command/genome.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::model::Command::genome; 2 | use base 'App::Cmd::Command'; 3 | use Try::Tiny; 4 | use Class::Autouse qw( 5 | ModelSEED::Store 6 | ModelSEED::Auth::Factory 7 | ModelSEED::App::Helpers 8 | ); 9 | sub abstract { return "Returns the associated annotation object" } 10 | sub usage_desc { return "model genome [ reference ] [options]" } 11 | sub opt_spec { 12 | return ( 13 | ["raw|r", "Return raw JSON output"], 14 | ["full", "Return the full annotation object in a readable form"], 15 | ); 16 | } 17 | 18 | sub execute { 19 | my ($self, $opts, $args) = @_; 20 | my $auth = ModelSEED::Auth::Factory->new->from_config; 21 | my $store = ModelSEED::Store->new(auth => $auth); 22 | my $helper= ModelSEED::App::Helpers->new(); 23 | my ($model, $modelRef) = $helper->get_object("model", $args, $store); 24 | $self->usage_error("Must specify a model to use") unless(defined($model)); 25 | print $helper->handle_ref_lookup( 26 | $store, $model, "annotation_uuid", "annotation", $opts 27 | ); 28 | } 29 | 1; 30 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/model/Command/readable.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::model::Command::readable; 2 | use base 'App::Cmd::Command'; 3 | use Class::Autouse qw( 4 | ModelSEED::Store 5 | ModelSEED::Auth::Factory 6 | ModelSEED::App::Helpers 7 | ); 8 | sub abstract { return "Prints a readable format for the object" } 9 | sub usage_desc { return "model readable [< name | name]" } 10 | sub execute { 11 | my ($self, $opts, $args) = @_; 12 | my $auth = ModelSEED::Auth::Factory->new->from_config; 13 | my $store = ModelSEED::Store->new(auth => $auth); 14 | my $helper = ModelSEED::App::Helpers->new(); 15 | my ($model, $modelRef) = $helper->get_object("model", $args, $store); 16 | $self->usage_error("Must specify an model to use") unless(defined($model)); 17 | print join("\n", @{$model->createReadableStringArray}); 18 | } 19 | 1; 20 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/model/Command/sbml.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::model::Command::sbml; 2 | use base 'App::Cmd::Command'; 3 | use Try::Tiny; 4 | use Class::Autouse qw( 5 | ModelSEED::Store 6 | ModelSEED::Auth::Factory 7 | ModelSEED::App::Helpers 8 | ); 9 | sub abstract { return "Print SBML version of the model" } 10 | sub usage_desc { return <new->from_config; 18 | my $store = ModelSEED::Store->new(auth => $auth); 19 | my $helper = ModelSEED::App::Helpers->new(); 20 | my ($model, $ref) = $helper->get_object("model", $args, $store); 21 | $self->usage_error("Must specify an model to use") unless(defined($model)); 22 | print join("\n", @{$model->printSBML()}); 23 | } 24 | 25 | 1; 26 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed.pm: -------------------------------------------------------------------------------- 1 | use JSON; 2 | package ModelSEED::App::mseed; 3 | use base 'App::Cmd'; 4 | 1; 5 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/bio.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::bio; 2 | use ModelSEED::App::bio; 3 | use base 'App::Cmd::Command'; 4 | sub abstract { "Alias to ms-bio command" } 5 | sub execute { 6 | my ($self, $opt, $args) = @_; 7 | { 8 | local @ARGV = @ARGV; 9 | my $arg0 = shift @ARGV; 10 | my $app = ModelSEED::App::bio->new; 11 | $app->run; 12 | } 13 | } 14 | 1; 15 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/createuser.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::createuser; 2 | 3 | use Module::Load; 4 | use Try::Tiny; 5 | use Term::ReadKey; 6 | use Class::Autouse qw(ModelSEED::Configuration); 7 | use base 'App::Cmd::Command'; 8 | 9 | use Data::Dumper; 10 | 11 | sub abstract { return "Creates a local user account"; } 12 | sub usage_desc { return "ms createuser [username] [options]"; } 13 | sub opt_spec { 14 | return ( 15 | ["firstname|f=s", "First name for user"], 16 | ["lastname|l=s", "Last name for user"], 17 | ["email|e=s", "Email for user"], 18 | ); 19 | } 20 | 21 | sub execute { 22 | my ($self, $opt, $args) = @_; 23 | my $username = $args->[0]; 24 | my $conf = ModelSEED::Configuration->new(); 25 | if (!defined($username) || length($username) == 0) { 26 | $self->usage_error("Must provide username!"); 27 | } elsif (defined($conf->config->{users}->{$username})) { 28 | #$self->usage_error("Specified username already exists!"); 29 | } 30 | print "Enter password: "; 31 | ReadMode 2; 32 | my $password = ReadLine 0; 33 | ReadMode 0; 34 | chomp($password); 35 | print "\n"; 36 | if (!defined($password) || length($password) == 0) { 37 | $self->usage_error("Must provide nonempty password!"); 38 | } 39 | $password = crypt($password, 1); 40 | # create a user object 41 | my $user = { 42 | login => $username, 43 | password => $password, 44 | firstname => $opt->{firstname}, 45 | lastname => $opt->{lastname}, 46 | email => $opt->{email} 47 | }; 48 | $conf->config->{users}->{$username} = $user; 49 | $conf->save(); 50 | 51 | print "Successfully created user '$username'\n"; 52 | } 53 | 54 | 1; 55 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/genome.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::genome; 2 | use ModelSEED::App::genome; 3 | use base 'App::Cmd::Command'; 4 | sub abstract { "Alias to ms-genome command" } 5 | sub execute { 6 | my ($self, $opt, $args) = @_; 7 | { 8 | local @ARGV = @ARGV; 9 | my $arg0 = shift @ARGV; 10 | my $app = ModelSEED::App::genome->new; 11 | $app->run; 12 | } 13 | } 14 | 1; 15 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/history.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::history; 2 | use Try::Tiny; 3 | use List::Util; 4 | use JSON; 5 | use Class::Autouse qw( 6 | ModelSEED::App::Helpers 7 | ModelSEED::Reference 8 | ModelSEED::Auth::Factory 9 | ModelSEED::Store 10 | ); 11 | use base 'App::Cmd::Command'; 12 | 13 | sub abstract { return "Return references to all previous versions of an object."; } 14 | sub usage_desc { return "ms get [reference || - < STDIN ] [options]"; } 15 | sub opt_spec { 16 | return ( 17 | ["date|d", "Include a timestamp for when the objects was saved"], 18 | ); 19 | } 20 | sub description { return <new->from_config; 29 | my $store = ModelSEED::Store->new(auth => $auth); 30 | my $helpers = ModelSEED::App::Helpers->new; 31 | my ($ref, $type); 32 | $ref = $helpers->get_base_ref("*", $auth->username, $args); 33 | $self->usage_error("Must supply a valid reference") unless(defined($ref)); 34 | $type = $ref->base_types->[0]; 35 | my $unseen_ancestors = [$ref->ref]; 36 | my $seen_ancestors = {}; 37 | my $list = []; 38 | while(my $ancestor = shift @$unseen_ancestors) { 39 | $seen_ancestors->{$ancestor} = 1; 40 | my $object = $store->get_data($ancestor); 41 | next unless(defined($object)); 42 | my $values = [ $ancestor ]; 43 | push(@$values, $object->{modDate}) if($opts->{date}); 44 | print join("\t", @$values) . "\n"; 45 | my $refs = [ 46 | map { $_->ref } 47 | map { ModelSEED::Reference->new( uuid => $_, type => $type ) } 48 | @{ $object->{ancestor_uuids} || [] } 49 | ]; 50 | foreach my $ref (@$refs) { 51 | next if defined($seen_ancestors->{$ref}); 52 | push(@$unseen_ancestors, $ref); 53 | } 54 | } 55 | } 56 | 57 | 1; 58 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/import.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::import; 2 | use ModelSEED::App::stores; 3 | use base 'App::Cmd::Command'; 4 | use Class::Autouse qw( 5 | ModelSEED::App::import 6 | ); 7 | sub abstract { "Import genomes, models, etc. from external sources" } 8 | sub execute { 9 | my ($self, $opt, $args) = @_; 10 | { 11 | local @ARGV = @ARGV; 12 | my $arg0 = shift @ARGV; 13 | my $app = ModelSEED::App::import->new; 14 | $app->run; 15 | } 16 | } 17 | 1; 18 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/logout.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::logout; 2 | use base 'App::Cmd::Command'; 3 | use ModelSEED::Configuration; 4 | 5 | sub abstract { return "Log out" } 6 | sub execute { 7 | my ($self, $opts, $args) = @_; 8 | my $conf = ModelSEED::Configuration->new(); 9 | delete $conf->config->{login}; 10 | $conf->save(); 11 | } 12 | 13 | 1; 14 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/mapping.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::mapping; 2 | use ModelSEED::App::mapping; 3 | use base 'App::Cmd::Command'; 4 | sub abstract { "Alias to ms-mapping command" } 5 | sub execute { 6 | my ($self, $opt, $args) = @_; 7 | { 8 | local @ARGV = @ARGV; 9 | my $arg0 = shift @ARGV; 10 | my $app = ModelSEED::App::mapping->new; 11 | $app->run; 12 | } 13 | } 14 | 1; 15 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/model.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::model; 2 | use ModelSEED::App::model; 3 | use base 'App::Cmd::Command'; 4 | sub abstract { "Alias to ms-model command" } 5 | sub execute { 6 | my ($self, $opt, $args) = @_; 7 | { 8 | local @ARGV = @ARGV; 9 | my $arg0 = shift @ARGV; 10 | my $app = ModelSEED::App::model->new; 11 | $app->run; 12 | } 13 | } 14 | 1; 15 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/pp.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::pp; 2 | use base 'App::Cmd::Command'; 3 | use JSON; 4 | sub abstract { return "Pretty print JSON object" } 5 | sub usage_desc { return "ms pp < object.json" } 6 | sub execute { 7 | my ($self, $opts, $args) = @_; 8 | my $str; 9 | { 10 | local $\; 11 | $str = ; 12 | } 13 | print to_json(from_json($str, {allow_nonref=>1}), {pretty=>1}) . "\n"; 14 | } 15 | 16 | 1; 17 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/stores.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::stores; 2 | use ModelSEED::App::stores; 3 | use base 'App::Cmd::Command'; 4 | sub abstract { "Alias to mseed-stores command" } 5 | sub execute { 6 | my ($self, $opt, $args) = @_; 7 | { 8 | local @ARGV = @ARGV; 9 | my $arg0 = shift @ARGV; 10 | my $app = ModelSEED::App::stores->new; 11 | $app->run; 12 | } 13 | } 14 | 1; 15 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/mseed/Command/whoami.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::mseed::Command::whoami; 2 | use base 'App::Cmd::Command'; 3 | use ModelSEED::Configuration; 4 | 5 | sub abstract { return "Return the currently logged in user" } 6 | sub execute { 7 | my ($self, $opts, $args) = @_; 8 | my $conf = ModelSEED::Configuration->new(); 9 | my $username = $conf->config->{login}->{username}; 10 | $username = "public" unless(defined($username)); 11 | print $username ."\n"; 12 | } 13 | 14 | 15 | 1; 16 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/stores.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::stores; 2 | use base 'App::Cmd'; 3 | sub default_command { 'list' }; 4 | sub usage_desc { $_[0]->arg0 . " [command] " } 5 | 6 | $ModelSEED::App::stores::typeToClass = { 7 | file => 'ModelSEED::Database::FileDB', 8 | mongo => 'ModelSEED::Database::MongoDBSimple', 9 | rest => 'ModelSEED::Database::Rest', 10 | }; 11 | 12 | $ModelSEED::App::stores::typeToArgs = { 13 | file => { directory => [ 'directory=s' => 'Directory to store the database in' ] }, 14 | mongo => { host => [ 'host=s' => 'Hostname of machine running mongod' ], 15 | db_name => [ 'db_name:s' => 'Database name to use for storage' ],, 16 | username => [ 'username:s' => 'Username to login' ], 17 | password => [ 'password:s' => 'Password to login' ], 18 | }, 19 | }; 20 | 21 | $ModelSEED::App::stores::defaultArgValues = { 22 | file => { 23 | directory => $ENV{HOME} . "/.modelseed_filedb" 24 | }, 25 | mongo => { 26 | db_name => 'ModelSeed' 27 | }, 28 | rest => {}, 29 | }; 30 | 31 | 1; 32 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/stores/Command/list.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::stores::Command::list; 2 | use Class::Autouse qw(ModelSEED::Configuration); 3 | use base 'App::Cmd::Command'; 4 | sub abstract { "List current stores in order of priority" } 5 | sub opt_spec { 6 | [ 'verbose|v', "print detailed configuration for each store" ], 7 | } 8 | sub execute { 9 | my ($self, $opt, $args) = @_; 10 | my $ms = ModelSEED::Configuration->new(); 11 | my $stores = $ms->config->{stores}; 12 | if($opt->{verbose}) { 13 | print map { _detailed($_) . "\n" } @$stores; 14 | } else { 15 | print map { $_->{name} . "\n" } @$stores; 16 | } 17 | } 18 | 19 | sub _detailed { 20 | my ($s) = @_; 21 | # name key=value key=value 22 | my $hide = { name => 1, class => 1 }; 23 | my @attrs = grep { !$hide->{$_} } keys %$s; 24 | my $string = join(" ", map { $_ . '=' . $s->{$_} } @attrs); 25 | return $s->{name} . "\t" . $string; 26 | } 27 | 28 | 1; 29 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/stores/Command/prioritize.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::stores::Command::prioritize; 2 | use Class::Autouse qw(ModelSEED::Configuration); 3 | use base 'App::Cmd::Command'; 4 | my $MS = ModelSEED::Configuration->new; 5 | sub abstract { "Set the storage priority" } 6 | sub usage_desc { "%c COMMAND [store] [store] ..." } 7 | sub validate_args { 8 | my ($self, $opt, $args) = @_; 9 | my $stores = $MS->config->{stores} || []; 10 | my %map = map { $_->{name} => $_ } @$stores; 11 | foreach my $name (@$args) { 12 | unless (defined($map{$name})) { 13 | $self->usage_error("No Storage interface named $name!"); 14 | } 15 | } 16 | } 17 | 18 | sub execute { 19 | my ($self, $opt, $args) = @_; 20 | my $stores = $MS->config->{stores} || []; 21 | my $newStore = []; 22 | my %map = map { $_->{name} => $_ } @$stores; 23 | foreach my $name (@$args) { 24 | push(@$newStore, $map{$name}); 25 | delete $map{$name}; 26 | } 27 | push(@$newStore, values %map); 28 | $MS->config->{stores} = $newStore; 29 | $MS->save(); 30 | } 31 | -------------------------------------------------------------------------------- /lib/ModelSEED/App/stores/Command/rm.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::App::stores::Command::rm; 2 | use Class::Autouse qw(ModelSEED::Configuration); 3 | use base 'App::Cmd::Command'; 4 | 5 | 6 | my $MS = ModelSEED::Configuration->new(); 7 | sub abstract { "Remove a storage interface" } 8 | sub description { return <" } 14 | sub command_names { qw(rm remove) } 15 | 16 | sub validate_args { 17 | my ($self, $opt, $args) = @_; 18 | unless(@$args == 1) { 19 | $self->usage_error("Must supply a storage interface to remove"); 20 | } 21 | my $name = $args->[0]; 22 | unless(defined($MS->config->{stores})) { 23 | $self->usage_error("No storage interface $name found"); 24 | } 25 | my $map = { map { $_->{name} => $_ } @{$MS->config->{stores}} }; 26 | unless(defined($map->{$name})) { 27 | $self->usage_error("No storage interface $name found"); 28 | } 29 | } 30 | 31 | sub execute { 32 | my ($self, $opt, $args) = @_; 33 | my $name = $args->[0]; 34 | my $stores = $MS->config->{stores}; 35 | my $remove; 36 | for(my $i=0; $i<@$stores; $i++) { 37 | $remove = $i if $stores->[$i]->{name} eq $name; 38 | last if defined $remove; 39 | } 40 | splice(@$stores, $remove, 1); 41 | $MS->config->{stores} = $stores; 42 | $MS->save; 43 | } 44 | 45 | 1; 46 | -------------------------------------------------------------------------------- /lib/ModelSEED/Auth.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::Auth - Abstract role / interface for authentication 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development locations: 6 | # Mathematics and Computer Science Division, Argonne National Lab; 7 | # Computation Institute, University of Chicago 8 | # 9 | # Date of module creation: 2012-05-16 10 | ######################################################################## 11 | =pod 12 | 13 | =head1 ModelSEED::Auth 14 | 15 | Abstract role for authentication implementations. 16 | 17 | =head1 Abstract 18 | 19 | There are multiple different ways one could authenticate against 20 | an API, a data store, etc. For example, there is the "basic auth" 21 | of a username + password pair. Then there is an OAuth token and 22 | secret. The point of this interface is to abstract these implementations. 23 | 24 | =head1 Methods 25 | 26 | =head2 new 27 | 28 | Each implementation has it's own version of initialization. 29 | 30 | =head2 wrap_http_request 31 | 32 | $bool = $auth->wrap_http_request($request) 33 | 34 | Given a HTTP::Request object, wrap that object in authentication 35 | info and return success (1). If there are problems, this returns 36 | false (0). The request object is modified by this call. 37 | 38 | =head2 username 39 | 40 | $string = $auth->username(); 41 | 42 | Return a username. 43 | 44 | =cut 45 | use HTTP::Request; 46 | package ModelSEED::Auth; 47 | use Moose::Role; 48 | use common::sense; 49 | use namespace::autoclean; 50 | 51 | requires 'wrap_http_request'; 52 | 53 | requires 'username'; 54 | 55 | 1; 56 | -------------------------------------------------------------------------------- /lib/ModelSEED/Auth/Public.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::Auth::Public - Class for not-logged in state 3 | # Authorization 4 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 5 | # Contact email: chenry@mcs.anl.gov 6 | # Development locations: 7 | # Mathematics and Computer Science Division, Argonne National Lab; 8 | # Computation Institute, University of Chicago 9 | # 10 | # Date of module creation: 2012-05-16 11 | ######################################################################## 12 | =pod 13 | 14 | =head1 ModelSEED::Auth::Public 15 | 16 | No athorization version. 17 | 18 | =head1 Methods 19 | 20 | =head2 new 21 | 22 | $auth = ModelSEED::Auth::Public->new(); 23 | 24 | No arguments are required. 25 | 26 | =cut 27 | package ModelSEED::Auth::Public; 28 | use Moose; 29 | use common::sense; 30 | use namespace::autoclean; 31 | use Class::Autouse qw( 32 | HTTP::Request 33 | ); 34 | 35 | sub wrap_http_request { 36 | my ($self, $req) = @_; 37 | die "Not a HTTP::Request" unless($req->isa("HTTP::Request")); 38 | return 1; 39 | } 40 | 41 | sub username { return 'PUBLIC'; } 42 | 43 | with 'ModelSEED::Auth'; 44 | __PACKAGE__->meta->make_immutable; 45 | 1; 46 | 47 | -------------------------------------------------------------------------------- /lib/ModelSEED/Database/Iterator.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::Database::Iterator - Abstract role / interface iterators 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development locations: 6 | # Mathematics and Computer Science Division, Argonne National Lab; 7 | # Computation Institute, University of Chicago 8 | # 9 | # Date of module creation: 2012-05-21 10 | ######################################################################## 11 | =pod 12 | 13 | =head1 ModelSEED::Database::Iterator 14 | 15 | Abstract role / interface for iterators 16 | 17 | =head1 Methods 18 | 19 | =head2 next 20 | 21 | while ( my $object = $itr->next ) { 22 | ... 23 | } 24 | 25 | Return the next entry in the iterator. When the iterator is exhausted, 26 | return undef. 27 | 28 | =head2 all 29 | 30 | my @objects = $itr->all 31 | 32 | Return an array of all the objects in the result. 33 | 34 | =cut 35 | package ModelSEED::Database::Iterator; 36 | use Moose::Role; 37 | 38 | requires 'next'; 39 | requires 'all'; 40 | requires 'count'; 41 | 42 | 1; 43 | -------------------------------------------------------------------------------- /lib/ModelSEED/Database/Iterator/MongoDB.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::Database::Iterator::MongoDB - Iterator wrapper 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development locations: 6 | # Mathematics and Computer Science Division, Argonne National Lab; 7 | # Computation Institute, University of Chicago 8 | # 9 | # Date of module creation: 2012-05-21 10 | ######################################################################## 11 | package ModelSEED::Database::Iterator::MongoDB; 12 | use Moose; 13 | use MongoDB::Cursor; 14 | with 'ModelSEED::Database::Iterator'; 15 | 16 | has _cursor => ( 17 | is => 'ro', 18 | isa => 'MongoDB::Cursor', 19 | required => 1 20 | ); 21 | 22 | sub next { 23 | return $_[0]->_cursor->next; 24 | } 25 | 26 | sub all { 27 | return $_[0]->_cursor->all; 28 | } 29 | 30 | sub count { 31 | return $_[0]->_cursor->count(1); 32 | } 33 | 34 | 1; 35 | -------------------------------------------------------------------------------- /lib/ModelSEED/FIGMODEL/FIGMODELcompound.pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelSEED/Model-SEED-core/c40bb3ebf99fb39279d3c0bcad87dfe68bd24b9e/lib/ModelSEED/FIGMODEL/FIGMODELcompound.pm -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/CPD.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::CPD; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/CPDGAP.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::CPDGAP; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/CPDGAPMDL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::CPDGAPMDL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/CPDMDL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::CPDMDL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/GAPMDL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::GAPMDL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/GAPREP.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::GAPREP; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/GAPREPMDL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::GAPREPMDL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/REPMDL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::REPMDL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/GapfillingDB/RXN.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::GapfillingDB::RXN; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/BiomassCompound.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::BiomassCompound - This is the moose object corresponding to the BiomassCompound object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::BiomassCompound; 10 | package ModelSEED::MS::BiomassCompound; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::BiomassCompound'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/BiomassTemplateComponent.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::BiomassTemplateComponent - This is the moose object corresponding to the BiomassTemplateComponent object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-28T22:56:11 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::BiomassTemplateComponent; 10 | package ModelSEED::MS::BiomassTemplateComponent; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::BiomassTemplateComponent'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Compartment.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Compartment - This is the moose object corresponding to the Compartment object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Compartment; 10 | package ModelSEED::MS::Compartment; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Compartment'; 14 | #*********************************************************************************************************** 15 | # ADDITIONAL ATTRIBUTES: 16 | #*********************************************************************************************************** 17 | has mapped_uuid => ( is => 'rw', isa => 'ModelSEED::uuid',printOrder => '-1', type => 'msdata', metaclass => 'Typed', lazy => 1, builder => '_buildmapped_uuid' ); 18 | 19 | #*********************************************************************************************************** 20 | # BUILDERS: 21 | #*********************************************************************************************************** 22 | sub _buildmapped_uuid { 23 | my ($self) = @_; 24 | return "00000000-0000-0000-0000-000000000000"; 25 | } 26 | 27 | #*********************************************************************************************************** 28 | # CONSTANTS: 29 | #*********************************************************************************************************** 30 | 31 | #*********************************************************************************************************** 32 | # FUNCTIONS: 33 | #*********************************************************************************************************** 34 | 35 | 36 | __PACKAGE__->meta->make_immutable; 37 | 1; 38 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ComplexReaction.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ComplexReaction - This is the moose object corresponding to the ComplexReaction object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-06-19T19:41:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ComplexReaction; 10 | package ModelSEED::MS::ComplexReaction; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ComplexReaction'; 14 | #*********************************************************************************************************** 15 | # ADDITIONAL ATTRIBUTES: 16 | #*********************************************************************************************************** 17 | 18 | 19 | #*********************************************************************************************************** 20 | # BUILDERS: 21 | #*********************************************************************************************************** 22 | 23 | 24 | 25 | #*********************************************************************************************************** 26 | # CONSTANTS: 27 | #*********************************************************************************************************** 28 | 29 | #*********************************************************************************************************** 30 | # FUNCTIONS: 31 | #*********************************************************************************************************** 32 | 33 | 34 | __PACKAGE__->meta->make_immutable; 35 | 1; 36 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ComplexRole.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ComplexRole - This is the moose object corresponding to the ComplexRole object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ComplexRole; 10 | package ModelSEED::MS::ComplexRole; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ComplexRole'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/CompoundCue.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::CompoundCue - This is the moose object corresponding to the CompoundCue object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-05T03:44:17 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::CompoundCue; 10 | package ModelSEED::MS::CompoundCue; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::CompoundCue'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/CompoundPk.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::CompoundPk - This is the moose object corresponding to the CompoundPk object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::CompoundPk; 10 | package ModelSEED::MS::CompoundPk; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::CompoundPk'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/CompoundSet.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::CompoundSet - This is the moose object corresponding to the CompoundSet object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::CompoundSet; 10 | package ModelSEED::MS::CompoundSet; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::CompoundSet'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/CompoundSetCompound.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::CompoundSetCompound - This is the moose object corresponding to the CompoundSetCompound object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-05T20:28:05 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::CompoundSetCompound; 10 | package ModelSEED::MS::CompoundSetCompound; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::CompoundSetCompound'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/CompoundStructure.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::CompoundStructure - This is the moose object corresponding to the CompoundStructure object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::CompoundStructure; 10 | package ModelSEED::MS::CompoundStructure; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::CompoundStructure'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Constraint.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Constraint - This is the moose object corresponding to the Constraint object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-05T02:39:57 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Constraint; 10 | package ModelSEED::MS::Constraint; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Constraint'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ConstraintVariable.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ConstraintVariable - This is the moose object corresponding to the ConstraintVariable object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-05T02:39:58 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ConstraintVariable; 10 | package ModelSEED::MS::ConstraintVariable; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ConstraintVariable'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Cue.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Cue - This is the moose object corresponding to the Cue object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-05T03:44:17 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Cue; 10 | package ModelSEED::MS::Cue; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Cue'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Deletion.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Deletion - This is the moose object corresponding to the Deletion object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Deletion; 10 | package ModelSEED::MS::Deletion; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Deletion'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Experiment.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Experiment - This is the moose object corresponding to the Experiment object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Experiment; 10 | package ModelSEED::MS::Experiment; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Experiment'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ExperimentDataPoint.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ExperimentDataPoint - This is the moose object corresponding to the ExperimentDataPoint object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ExperimentDataPoint; 10 | package ModelSEED::MS::ExperimentDataPoint; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ExperimentDataPoint'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/FeatureRole.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::FeatureRole - This is the moose object corresponding to the FeatureRole object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::FeatureRole; 10 | package ModelSEED::MS::FeatureRole; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::FeatureRole'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/FluxMeasurement.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::FluxMeasurement - This is the moose object corresponding to the FluxMeasurement object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::FluxMeasurement; 10 | package ModelSEED::MS::FluxMeasurement; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::FluxMeasurement'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/GapfillingGeneCandidate.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::GapfillingGeneCandidate - This is the moose object corresponding to the GapfillingGeneCandidate object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-21T20:27:15 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::GapfillingGeneCandidate; 10 | package ModelSEED::MS::GapfillingGeneCandidate; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::GapfillingGeneCandidate'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/GapfillingSolution.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::GapfillingSolution - This is the moose object corresponding to the GapfillingSolution object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::GapfillingSolution; 10 | package ModelSEED::MS::GapfillingSolution; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::GapfillingSolution'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/GapfillingSolutionReaction.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::GapfillingSolutionReaction - This is the moose object corresponding to the GapfillingSolutionReaction object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::GapfillingSolutionReaction; 10 | package ModelSEED::MS::GapfillingSolutionReaction; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::GapfillingSolutionReaction'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/GeneMeasurement.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::GeneMeasurement - This is the moose object corresponding to the GeneMeasurement object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::GeneMeasurement; 10 | package ModelSEED::MS::GeneMeasurement; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::GeneMeasurement'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Genome.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Genome - This is the moose object corresponding to the Genome object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Genome; 10 | package ModelSEED::MS::Genome; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Genome'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/GfSolutionReactionGeneCandidate.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::GfSolutionReactionGeneCandidate - This is the moose object corresponding to the GfSolutionReactionGeneCandidate object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::GfSolutionReactionGeneCandidate; 10 | package ModelSEED::MS::GfSolutionReactionGeneCandidate; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::GfSolutionReactionGeneCandidate'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Insertion.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Insertion - This is the moose object corresponding to the Insertion object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Insertion; 10 | package ModelSEED::MS::Insertion; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Insertion'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/InstanceTransport.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::InstanceTransport - This is the moose object corresponding to the InstanceTransport object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::InstanceTransport; 10 | package ModelSEED::MS::InstanceTransport; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::InstanceTransport'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/MediaCompound.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::MediaCompound - This is the moose object corresponding to the MediaCompound object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::MediaCompound; 10 | package ModelSEED::MS::MediaCompound; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::MediaCompound'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/MetaboliteMeasurement.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::MetaboliteMeasurement - This is the moose object corresponding to the MetaboliteMeasurement object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::MetaboliteMeasurement; 10 | package ModelSEED::MS::MetaboliteMeasurement; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::MetaboliteMeasurement'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Metadata/Definitions.pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelSEED/Model-SEED-core/c40bb3ebf99fb39279d3c0bcad87dfe68bd24b9e/lib/ModelSEED/MS/Metadata/Definitions.pm -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Metadata/Types.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Metadata::Types - this class holds all the custom types used by our moose objects 3 | # Author: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Author email: chenry@mcs.anl.gov 5 | # Author affiliation: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 3/14/2012 7 | ######################################################################## 8 | use strict; 9 | use Moose::Util::TypeConstraints; 10 | 11 | $ModelSEED::MS::Metadata::Types::uuidRegex = qr/[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}/; 12 | 13 | subtype 'ModelSEED::uuid', 14 | as 'Str', 15 | where { $_ =~ $ModelSEED::MS::Metadata::Types::uuidRegex }, 16 | message { "The string you provided ($_) is not a vaild UUID!" }; 17 | 18 | subtype 'ModelSEED::varchar', 19 | as 'Str', where { !defined($_) || length($_) < 256 }, 20 | message { "The string you provided ($_) is too long to be a varchar!" }; 21 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelAnalysis.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelAnalysis - This is the moose object corresponding to the ModelAnalysis object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelAnalysis; 10 | package ModelSEED::MS::ModelAnalysis; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelAnalysis'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelAnalysisAnnotation.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelAnalysisAnnotation - This is the moose object corresponding to the ModelAnalysisAnnotation object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelAnalysisAnnotation; 10 | package ModelSEED::MS::ModelAnalysisAnnotation; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelAnalysisAnnotation'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelAnalysisBiochemistry.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelAnalysisBiochemistry - This is the moose object corresponding to the ModelAnalysisBiochemistry object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelAnalysisBiochemistry; 10 | package ModelSEED::MS::ModelAnalysisBiochemistry; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelAnalysisBiochemistry'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelAnalysisMapping.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelAnalysisMapping - This is the moose object corresponding to the ModelAnalysisMapping object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelAnalysisMapping; 10 | package ModelSEED::MS::ModelAnalysisMapping; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelAnalysisMapping'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelAnalysisModel.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelAnalysisModel - This is the moose object corresponding to the ModelAnalysisModel object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-25T05:08:47 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelAnalysisModel; 10 | package ModelSEED::MS::ModelAnalysisModel; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelAnalysisModel'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelCompartment.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelCompartment - This is the moose object corresponding to the ModelCompartment object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelCompartment; 10 | package ModelSEED::MS::ModelCompartment; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelCompartment'; 14 | #*********************************************************************************************************** 15 | # ADDITIONAL ATTRIBUTES: 16 | #*********************************************************************************************************** 17 | has mapped_uuid => ( is => 'rw', isa => 'ModelSEED::uuid',printOrder => '-1', type => 'msdata', metaclass => 'Typed', lazy => 1, builder => '_buildmapped_uuid' ); 18 | 19 | #*********************************************************************************************************** 20 | # BUILDERS: 21 | #*********************************************************************************************************** 22 | sub _buildmapped_uuid { 23 | my ($self) = @_; 24 | return "00000000-0000-0000-0000-000000000000"; 25 | } 26 | 27 | #*********************************************************************************************************** 28 | # CONSTANTS: 29 | #*********************************************************************************************************** 30 | 31 | #*********************************************************************************************************** 32 | # FUNCTIONS: 33 | #*********************************************************************************************************** 34 | 35 | 36 | __PACKAGE__->meta->make_immutable; 37 | 1; 38 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelReactionProteinSubunitGene.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelReactionProteinSubunitGene - This is the moose object corresponding to the ModelReactionProteinSubunitGene object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-21T02:47:43 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelReactionProteinSubunitGene; 10 | package ModelSEED::MS::ModelReactionProteinSubunitGene; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelReactionProteinSubunitGene'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ModelReactionReagent.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ModelReactionReagent - This is the moose object corresponding to the ModelReactionReagent object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-28T22:56:11 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ModelReactionReagent; 10 | package ModelSEED::MS::ModelReactionReagent; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ModelReactionReagent'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ObjectiveTerm.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ObjectiveTerm - This is the moose object corresponding to the ObjectiveTerm object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-14T05:02:10 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ObjectiveTerm; 10 | package ModelSEED::MS::ObjectiveTerm; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ObjectiveTerm'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ReactionCue.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ReactionCue - This is the moose object corresponding to the ReactionCue object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-05T03:44:17 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ReactionCue; 10 | package ModelSEED::MS::ReactionCue; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ReactionCue'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ReactionSetMultiplier.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ReactionSetMultiplier - This is the moose object corresponding to the ReactionSetMultiplier object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-21T20:27:15 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ReactionSetMultiplier; 10 | package ModelSEED::MS::ReactionSetMultiplier; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ReactionSetMultiplier'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/ReactionSetReaction.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::ReactionSetReaction - This is the moose object corresponding to the ReactionSetReaction object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-05T20:28:05 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::ReactionSetReaction; 10 | package ModelSEED::MS::ReactionSetReaction; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::ReactionSetReaction'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Reagent.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Reagent - This is the moose object corresponding to the Reagent object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Reagent; 10 | package ModelSEED::MS::Reagent; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Reagent'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Role.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Role - This is the moose object corresponding to the Role object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Role; 10 | package ModelSEED::MS::Role; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Role'; 14 | #*********************************************************************************************************** 15 | # ADDITIONAL ATTRIBUTES: 16 | #*********************************************************************************************************** 17 | has searchname => ( is => 'rw', isa => 'Str',printOrder => '-1', type => 'msdata', metaclass => 'Typed', lazy => 1, builder => '_buildsearchname' ); 18 | 19 | #*********************************************************************************************************** 20 | # BUILDERS: 21 | #*********************************************************************************************************** 22 | sub _buildsearchname { 23 | my ($self) = @_; 24 | return ModelSEED::MS::Utilities::GlobalFunctions::convertRoleToSearchRole($self->name()); 25 | } 26 | 27 | #*********************************************************************************************************** 28 | # CONSTANTS: 29 | #*********************************************************************************************************** 30 | 31 | #*********************************************************************************************************** 32 | # FUNCTIONS: 33 | #*********************************************************************************************************** 34 | 35 | 36 | __PACKAGE__->meta->make_immutable; 37 | 1; 38 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/RoleSetRole.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::RoleSetRole - This is the moose object corresponding to the RoleSetRole object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-05T20:28:05 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::RoleSetRole; 10 | package ModelSEED::MS::RoleSetRole; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::RoleSetRole'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/SolutionConstraint.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::SolutionConstraint - This is the moose object corresponding to the SolutionConstraint object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-16T20:55:14 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::SolutionConstraint; 10 | package ModelSEED::MS::SolutionConstraint; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::SolutionConstraint'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Strain.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Strain - This is the moose object corresponding to the Strain object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Strain; 10 | package ModelSEED::MS::Strain; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Strain'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/SubsystemState.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::SubsystemState - This is the moose object corresponding to the SubsystemState object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-28T22:56:11 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::SubsystemState; 10 | package ModelSEED::MS::SubsystemState; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::SubsystemState'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/UptakeMeasurement.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::UptakeMeasurement - This is the moose object corresponding to the UptakeMeasurement object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-04-01T08:09:02 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::UptakeMeasurement; 10 | package ModelSEED::MS::UptakeMeasurement; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::UptakeMeasurement'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/User.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::User - This is the moose object corresponding to the User object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-26T23:22:35 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::User; 10 | package ModelSEED::MS::User; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::User'; 14 | 15 | sub set_password { 16 | my ($self, $password) = @_; 17 | my $new_password = encrypt($password); 18 | $self->password($new_password); 19 | return 1; 20 | } 21 | 22 | sub check_password { 23 | my ($self, $password) = @_; 24 | if (crypt($password, $self->password) eq $self->password) { 25 | return 1; 26 | } else { 27 | return 0; 28 | } 29 | } 30 | 31 | sub encrypt { 32 | my ($password) = @_; 33 | my $seed = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]; 34 | return crypt($password, $seed); 35 | } 36 | 37 | __PACKAGE__->meta->make_immutable; 38 | 1; 39 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Utilities/SimpleTable.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Utilities::SimpleTable - This is a simple utility object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-03-15T16:44:01 7 | ######################################################################## 8 | use strict; 9 | use namespace::autoclean; 10 | package ModelSEED::MS::Utilities::SimpleTable; 11 | use Moose; 12 | 13 | # ATTRIBUTES: 14 | has data => ( is => 'rw', isa => 'HashRef', required => 1); 15 | has headingHash => ( is => 'rw', isa => 'HashRef', lazy => 1, builder => '_buildheadingHash' ); 16 | 17 | # BUILDERS: 18 | sub _buildheadingHash { 19 | my ($self) = @_; 20 | my $hash; 21 | for (my $i=0; $i < @{$self->data()->{headings}}; $i++) { 22 | $hash->{$self->data()->{headings}->[$i]} = $i; 23 | } 24 | return $hash; 25 | } 26 | 27 | # CONSTANTS: 28 | 29 | 30 | # FUNCTIONS: 31 | 32 | 33 | __PACKAGE__->meta->make_immutable; 34 | -------------------------------------------------------------------------------- /lib/ModelSEED/MS/Variable.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MS::Variable - This is the moose object corresponding to the Variable object 3 | # Authors: Christopher Henry, Scott Devoid, Paul Frybarger 4 | # Contact email: chenry@mcs.anl.gov 5 | # Development location: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 2012-05-05T02:39:58 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::MS::DB::Variable; 10 | package ModelSEED::MS::Variable; 11 | use Moose; 12 | use namespace::autoclean; 13 | extends 'ModelSEED::MS::DB::Variable'; 14 | # CONSTANTS: 15 | #TODO 16 | # FUNCTIONS: 17 | #TODO 18 | 19 | 20 | __PACKAGE__->meta->make_immutable; 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/BIOLOG_SIGNALS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::BIOLOG_SIGNALS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/BIOMASS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::BIOMASS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMMENT.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMMENT; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPARTMENTS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPARTMENTS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPLEX.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPLEX; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPLEX_ROLE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPLEX_ROLE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPOUND.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPOUND; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPOUND_ALIAS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPOUND_ALIAS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPOUND_BIOMASS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPOUND_BIOMASS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPOUND_GROUPING.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPOUND_GROUPING; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/COMPOUND_REACTION.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::COMPOUND_REACTION; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/CURRENTID.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::CURRENTID; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/DBENTITY.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::DBENTITY; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/DBLINKS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::DBLINKS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/DIAGRAM.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::DIAGRAM; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/DIAGRAM_OBJECTS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::DIAGRAM_OBJECTS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/ESSENTIALITYSET.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::ESSENTIALITYSET; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/EXPERIMENT.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::EXPERIMENT; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/FBA_RESULTS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::FBA_RESULTS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/GENE_ESSENTIALITY.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::GENE_ESSENTIALITY; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/GENOMESTATS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::GENOMESTATS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/HISTORY.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::HISTORY; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MEDIA.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MEDIA; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MEDIA_COMPOUND.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MEDIA_COMPOUND; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MESSAGE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MESSAGE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MODEL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MODEL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MODELVERSIONS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MODELVERSIONS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MODEL_ESSENTIALITY.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MODEL_ESSENTIALITY; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/MODEL_FVA.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::MODEL_FVA; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/OUTPUTID.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::OUTPUTID; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/PERMISSIONS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::PERMISSIONS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/REACTION.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::REACTION; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/REACTION_ALIAS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::REACTION_ALIAS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/REACTION_COMPLEX.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::REACTION_COMPLEX; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/REACTION_GROUPING.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::REACTION_GROUPING; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/REACTION_MODEL.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::REACTION_MODEL; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/REFERENCE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::REFERENCE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/ROLE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::ROLE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/SUBSYSTEM.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::SUBSYSTEM; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/SUBSYSTEM_ROLE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::SUBSYSTEM_ROLE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/USERS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::USERS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | =pod 12 | 13 | =item * B (I, I) 14 | 15 | This method sets the password for a user to (I). The 16 | I parameter is optional. If present, a mail will be 17 | sent to the user with his password enclosed. 18 | 19 | =cut 20 | 21 | sub set_password { 22 | my ($self, $password) = @_; 23 | my $new_password = encrypt($password); 24 | $self->password($new_password); 25 | return 1; 26 | } 27 | 28 | =pod 29 | 30 | =item * B (I) 31 | 32 | This method checks whether the passed password (I) matches that of the user. 33 | 34 | =cut 35 | 36 | sub check_password { 37 | my ($self, $password) = @_; 38 | if (crypt($password, $self->password) eq $self->password) { 39 | return 1; 40 | } else { 41 | return 0; 42 | } 43 | } 44 | 45 | =pod 46 | 47 | =item * B (I) 48 | 49 | Encrypt I and return the result. This is a static method that 50 | does not require instantiating a user object in order to run. 51 | 52 | =cut 53 | 54 | sub encrypt { 55 | my ($password) = @_; 56 | 57 | my $seed = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]; 58 | return crypt($password, $seed); 59 | } -------------------------------------------------------------------------------- /lib/ModelSEED/ModelDB/UserSession.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::ModelDB::UserSession; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/FBAMODELClient.pm: -------------------------------------------------------------------------------- 1 | # 2 | # This is a SAS Component 3 | # 4 | 5 | package FBAMODELClient; 6 | 7 | use strict; 8 | use base qw(ClientThing); 9 | 10 | sub new { 11 | my($class, @options) = @_; 12 | my %options = ClientThing::FixOptions(@options); 13 | if (!defined($options{url})) { 14 | #$options{url} = "http://bioseed.mcs.anl.gov/~chenry/FIG/CGI/FBAMODEL_server.cgi"; 15 | $options{url} = "http://pubseed.theseed.org/model-prod/FBAMODEL_server.cgi"; 16 | } 17 | return $class->SUPER::new("ModelSEED::ServerBackends::FBAMODEL" => %options); 18 | } 19 | 20 | 1; 21 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/MSAccountManagementClient.pm: -------------------------------------------------------------------------------- 1 | package MSAccountManagementClient; 2 | 3 | use base qw(ClientThing); 4 | 5 | sub new { 6 | my($class, @options) = @_; 7 | my %options = ClientThing::FixOptions(@options); 8 | if (!defined($options{url})) { 9 | $options{url} = "http://pubseed.theseed.org/model-prod/MSAccountManagement.cgi"; 10 | } 11 | return $class->SUPER::new("MSAccountManagement" => %options); 12 | } 13 | 14 | 1; 15 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/MSSeedSupportClient.pm: -------------------------------------------------------------------------------- 1 | # 2 | # This is a SAS Component 3 | # 4 | package MSSeedSupportClient; 5 | 6 | use strict; 7 | use base qw(ClientThing); 8 | 9 | sub new { 10 | my($class, @options) = @_; 11 | my %options = ClientThing::FixOptions(@options); 12 | if (!defined($options{url})) { 13 | $options{url} = "http://bioseed.mcs.anl.gov/~chenry/FIG/CGI/MSSeedSupport_server.cgi"; 14 | } 15 | return $class->SUPER::new("MSSeedSupport" => %options); 16 | } 17 | 18 | 1; 19 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/ModelDBserver.pm: -------------------------------------------------------------------------------- 1 | # 2 | # This is a SAS Component 3 | # 4 | 5 | package ModelDBserver; 6 | 7 | use strict; 8 | use base qw(ClientThing); 9 | 10 | sub new { 11 | my($class, @options) = @_; 12 | my %options = ClientThing::FixOptions(@options); 13 | if (!defined($options{url})) { 14 | $options{url} = ClientThing::ComputeURL($options{url}, 'ModelDB_server.cgi', 'model-prod'); 15 | } 16 | $options{url} =~ s/\/server\.cgi$/\/ModelDB_server.cgi/; # switch /server.cgi to /FBAMODEL_server.cgi 17 | return $class->SUPER::new("ModelSEED::ModelSEEDServers::ModelDBServer" => %options); 18 | } 19 | 20 | 1; 21 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/ModelSEEDCommandAPIClient.pm: -------------------------------------------------------------------------------- 1 | # 2 | # This is a SAS Component 3 | # 4 | package ModelSEEDCommandAPIClient; 5 | 6 | use strict; 7 | use base qw(ClientThing); 8 | 9 | sub new { 10 | my($class, @options) = @_; 11 | my %options = ClientThing::FixOptions(@options); 12 | if (!defined($options{url})) { 13 | $options{url} = "http://bioseed.mcs.anl.gov/~chenry/FIG/CGI/ModelSEEDCommandAPI_server.cgi"; 14 | } 15 | return $class->SUPER::new("ModelSEED::ServerBackends::TempModelSEEDCommandAPI" => %options); 16 | } 17 | 18 | 1; 19 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/t/MSSeedSupportClient.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Data::Dumper; 4 | use Test::More tests => 5; 5 | use lib "../../../myRAST/"; 6 | use lib "../"; 7 | use MSSeedSupportClient; 8 | 9 | my $mss = MSSeedSupportClient->new(); 10 | 11 | #Testing each server function 12 | { 13 | my $usrdata = $mss->get_user_info({ 14 | username => "reviewer", 15 | password => "reviewer", 16 | }); 17 | ok defined($usrdata->{username}), "User account not found or authentication failed!"; 18 | $usrdata = $mss->build_primers({ 19 | genome => "224308.1", 20 | start => "3317087", 21 | stop => "3318652", 22 | username => "reviewer", 23 | password => "reviewer" 24 | }); 25 | ok defined($usrdata->{p1}->{sequence}), "Failed to retrieve primers!"; 26 | $usrdata = $mss->blast_sequence({ 27 | sequences => ["atgaaacgcattagcaccaccattaccaccaccatcaccattaccacagg"], 28 | genomes => ["83333.1"] 29 | }); 30 | ok defined($usrdata->{"atgaaacgcattagcaccaccattaccaccaccatcaccattaccacagg"}), "Expected sequence not found!"; 31 | $usrdata = $mss->pegs_of_function({ 32 | roles => ["Thr operon leader peptide"] 33 | }); 34 | ok defined($usrdata->{"Thr operon leader peptide"}), "Expected role not found!"; 35 | $usrdata = $mss->getRastGenomeData({ 36 | genome => "315750.3", 37 | username => "reviewer", 38 | password => "reviewer" 39 | }); 40 | ok defined($usrdata->{features}->size() > 1000), "Genome not retrieved!"; 41 | $usrdata = $mss->users_for_genome({ 42 | genome => "315750.3", 43 | username => "reviewer", 44 | password => "reviewer" 45 | }); 46 | ok defined($usrdata->{"315750.3"}->{"chenry"}), "Users for genome not retrieved!"; 47 | } 48 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDClients/t/ModelSEEDCommandAPIClient.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Data::Dumper; 4 | use Test::More tests => 5; 5 | use lib "../../../myRAST/"; 6 | use lib "../"; 7 | use ModelSEEDCommandAPIClient; 8 | 9 | my $msc = ModelSEEDCommandAPIClient->new(); 10 | 11 | #Testing each server function 12 | { 13 | my $output = $msc->fbasimulatekomedialist({ 14 | model => "iBsu1103V2", 15 | media => ["LB","NMS","GMM_nh4","GMM_gln"], 16 | ko => [["peg.3"]] 17 | }); 18 | ok defined($output->{RESULTS}->{"peg.3"}), "Phenotype simulation failed!"; 19 | } 20 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/BiochemistryMappingPrintReadable.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use JSON::Any; 4 | use ModelSEED::MS::Biochemistry; 5 | use ModelSEED::MS::Mapping; 6 | use ModelSEED::MS::Annotation; 7 | use ModelSEED::MS::Model; 8 | use ModelSEED::MS::Factories::Annotation; 9 | use Time::HiRes qw(time); 10 | 11 | #Loading biochemistry 12 | my $directory = "C:/Code/Model-SEED-core/data/exampleObjects/"; 13 | open BIOCHEM, "<".$directory."biochemistry.json"; 14 | my $string = join("\n",); 15 | close BIOCHEM; 16 | my $objectData = JSON::Any->decode($string); 17 | my $biochem = ModelSEED::MS::Biochemistry->new($objectData); 18 | my $readable = $biochem->createReadableStringArray(); 19 | ModelSEED::utilities::PRINTFILE("c:/Code/Model-SEED-core/data/exampleObjects/biochemistry.readable",$readable); 20 | #Loading mapping 21 | open MAPPING, "<".$directory."mapping.json"; 22 | $string = join("\n",); 23 | close MAPPING; 24 | $objectData = JSON::Any->decode($string); 25 | my $mapping = ModelSEED::MS::Mapping->new($objectData); 26 | $mapping->biochemistry($biochem); 27 | $readable = $mapping->createReadableStringArray(); 28 | ModelSEED::utilities::PRINTFILE("c:/Code/Model-SEED-core/data/exampleObjects/mapping.readable",$readable); 29 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/JanakaTestScript.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use JSON::Any; 4 | use ModelSEED::MS::Biochemistry; 5 | use ModelSEED::MS::Mapping; 6 | use ModelSEED::MS::Annotation; 7 | use ModelSEED::MS::Model; 8 | use ModelSEED::MS::Factories::Annotation; 9 | use Time::HiRes qw(time); 10 | use IO::Compress::Gzip qw(gzip); 11 | use IO::Uncompress::Gunzip qw(gunzip); 12 | use ModelSEEDbootstrap; 13 | use ModelSEED::FIGMODEL; 14 | 15 | #Loading biochemistry 16 | my $string; 17 | my $figmodel = ModelSEED::FIGMODEL->new({username => "public",password => "public"}); 18 | my $directory = $figmodel->config("database root directory")->[0]."exampleObjects/"; 19 | open BIOCHEM, "<".$directory."biochemistry.json"; 20 | $string = join("\n",); 21 | close BIOCHEM; 22 | my $objectData = JSON::Any->decode($string); 23 | my $biochem = ModelSEED::MS::Biochemistry->new($objectData); 24 | $biochem->setParents(undef); 25 | print "Biochemistry loaded!\n"; 26 | #Loading mapping 27 | open MAPPING, "<".$directory."mapping.json"; 28 | $string = join("\n",); 29 | close MAPPING; 30 | $objectData = JSON::Any->decode($string); 31 | my $mapping = ModelSEED::MS::Mapping->new($objectData); 32 | $mapping->setParents(undef); 33 | $mapping->biochemistry($biochem); 34 | print "Mapping loaded!\n"; 35 | $mapping->buildSubsystemReactionSets(); 36 | $biochem->printJSONFile($directory."biochemistry.json"); 37 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/ModelReconstruction.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use JSON::Any; 4 | use ModelSEED::MS::Biochemistry; 5 | use ModelSEED::MS::Mapping; 6 | use ModelSEED::MS::Annotation; 7 | use ModelSEED::MS::Model; 8 | use ModelSEED::MS::Factories::Annotation; 9 | use Time::HiRes qw(time); 10 | use Data::Dumper; 11 | 12 | $| = 1; 13 | 14 | #Loading biochemistry 15 | my $directory = "C:/Code/Model-SEED-core/data/exampleObjects/"; 16 | open BIOCHEM, "<".$directory."biochemistry.json"; 17 | my $string = join("\n",); 18 | close BIOCHEM; 19 | my $objectData = JSON::Any->decode($string); 20 | my $biochem = ModelSEED::MS::Biochemistry->new($objectData); 21 | #Loading mapping 22 | open MAPPING, "<".$directory."mapping.json"; 23 | $string = join("\n",); 24 | close MAPPING; 25 | $objectData = JSON::Any->decode($string); 26 | my $mapping = ModelSEED::MS::Mapping->new($objectData); 27 | $mapping->biochemistry($biochem); 28 | #Retrieving annotation 29 | #open ANNO, "<".$directory."FullAnnotation.json"; 30 | #$string = join("\n",); 31 | #close ANNO; 32 | #$objectData = JSON::Any->decode($string); 33 | #my $anno = ModelSEED::MS::Annotation->new($objectData); 34 | #$anno->mapping($mapping); 35 | my $seedFactory = ModelSEED::MS::Factories::Annotation->new(); 36 | my $anno = $seedFactory->build({ 37 | genome_id => "83333.1", 38 | mapping => $mapping 39 | }); 40 | $anno->printJSONFile($directory."83333.1.json"); 41 | $mapping->printJSONFile($directory."83333.1.mapping.json"); 42 | my $readable = $anno->createReadableStringArray(); 43 | ModelSEED::utilities::PRINTFILE($directory."83333.1.readable",$readable); 44 | ##Building model 45 | my $mdl = $anno->createStandardFBAModel(); 46 | my $data = $mdl->serializeToDB(); 47 | $mdl->printJSONFile($directory."ReconstructedModel.json"); 48 | my $html = $mdl->createHTML(); 49 | ModelSEED::utilities::PRINTFILE($directory."ReconstructedModel.html",[$html]); 50 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/MongoDBTest.pl: -------------------------------------------------------------------------------- 1 | use JSON::Any; 2 | use strict; 3 | use Data::Dumper; 4 | use URI; 5 | use ModelSEED::Database::MongoDBSimple; 6 | use ModelSEED::Auth::Basic; 7 | use ModelSEED::Store; 8 | use IO::Compress::Gzip qw(gzip); 9 | use IO::Uncompress::Gunzip qw(gunzip); 10 | 11 | print "Connecting to the database!\n"; 12 | my $db = ModelSEED::Database::MongoDBSimple->new({db_name => "modelObjectStore",host => "birch.mcs.anl.gov"}); 13 | my $auth = ModelSEED::Auth::Basic->new({username => "kbase",password => "kbase"}); 14 | my $store = ModelSEED::Store->new({auth => $auth,database => $db}); 15 | 16 | print "Loading the biochemistry!\n"; 17 | my $string; 18 | my $gzipString; 19 | open BIOCHEM, "; 21 | #read BIOCHEM,$gzipString,1000000000;#Note, I oversized the buffer to ensure we get the whole file 22 | close BIOCHEM; 23 | #gunzip \$gzipString => \$string;#Unzipping the data 24 | my $objectData = JSON::Any->decode($string);#Decoding the json 25 | 26 | print "Saving the biochemistry!\n"; 27 | $store->save_data("biochemistry/kbase/default",$objectData); 28 | $store->set_public("biochemistry/kbase/default",1); 29 | 30 | print "Loading the mapping!\n"; 31 | open MAPPING, "; 33 | #read MAPPING,$gzipString,1000000000;#Note, I oversized the buffer to ensure we get the whole file 34 | close MAPPING; 35 | #gunzip \$gzipString => \$string;#Unzipping the data 36 | $objectData = JSON::Any->decode($string);#Decoding the json 37 | 38 | print "Saving the mapping!\n"; 39 | $store->save_data("mapping/kbase/default",$objectData); 40 | $store->set_public("mapping/kbase/default",1); -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/ParsePrimerData.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use lib 'c:/Code/Model-SEED-core/lib'; 3 | use ModelSEED::utilities; 4 | 5 | my $data = ModelSEED::utilities::LOADFILE("C:/Code/Model-SEED-core/workspace/chenry/minibsub/PrimerData.txt"); 6 | my $primerHash; 7 | my $output = ["Interval\tStart\tStop\tTime\tP1\tP2\tP3\tP4\tP5\tP6"]; 8 | for (my $i=0; $i < @{$data}; $i++) { 9 | if ($data->[$i] =~ m/Interval:\s\[(\d+),\s(\d+)\]\tkoI(\d+)\t([^\t]+)/) { 10 | my $line = "i". 11 | 12 | $3."\t".$1."\t".$2."\t".$4; 13 | for (my $j=0; $j < 6; $j++) { 14 | $i++; 15 | my $temp = [split(/\t/,$data->[$i])]; 16 | if (defined($temp->[8])) { 17 | $line .= "\t".$temp->[8]; 18 | } 19 | } 20 | push(@{$output},$line); 21 | } 22 | } 23 | my $data = ModelSEED::utilities::PRINTFILE("C:/Code/Model-SEED-core/workspace/chenry/minibsub/RefinedPrimerData.txt",$output); -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/biochem_test.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use lib '../../../config/'; 4 | use ModelSEEDbootstrap; 5 | use ModelSEED::Interface::interface; 6 | use ModelSEED::CoreApi; 7 | use ModelSEED::MS::Biochemistry; 8 | 9 | use Time::HiRes qw(time); 10 | use Data::Dumper; 11 | 12 | my $bio_uuid = "DBB3B96A-3D63-11E1-94F6-C43F3D9902C7"; 13 | my $dbfile = ModelSEED::Interface::interface::MODELSEEDDIRECTORY()."/data/NewScheme.db"; 14 | my $api = ModelSEED::CoreApi->new({ 15 | database => $dbfile, 16 | driver => "sqlite" 17 | }); 18 | 19 | print "Timing the getBiochemistry call by itself:\n"; 20 | my $time = time; 21 | my $data = $api->getBiochemistry({ 22 | uuid => $bio_uuid, 23 | user => "master", 24 | with_all => 1 25 | }); 26 | print " took " . sprintf("%.5f", time - $time) . " s\n"; 27 | print "Timing generation of moose object:\n"; 28 | $time = time; 29 | my $biochem = ModelSEED::MS::Biochemistry->new({ 30 | om => $api, 31 | uuid => $bio_uuid, 32 | user => "master" 33 | }); 34 | print " took " . sprintf("%.5f", time - $time) . " s\n"; 35 | 36 | #print "Testing different methods to access reactions.\n"; 37 | #print "First loading each individually...\n"; 38 | #my $rxn_ids = $biochem->getReactionIds(); 39 | 40 | #foreach my $rxn_id (@$rxn_ids) { 41 | # $biochem->getReaction($rxn_id, $bio_uuid); 42 | #} 43 | #print " just kidding, this takes forever to run (minutes).\n"; 44 | #print "Using iterator which loads 100 at a time...\n"; 45 | #my $time = time; 46 | #my $reaction_it = $biochem->getReactionIterator(); 47 | #while ($reaction_it->hasNext) { 48 | # $reaction_it->next(); 49 | #} 50 | #print " took " . sprintf("%.5f", time - $time) . " s\n"; 51 | #print "Using CoreApi->getReactions which loads them all...\n"; 52 | #$time = time; 53 | #my $rxns = $api->getReactions($bio_uuid); 54 | #print " took " . sprintf("%.5f", time - $time) . " s\n"; 55 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | INSTALL_DIR=$1; 3 | if [ -d $INSTALL_DIR ]; 4 | then 5 | echo "Directory $INSTALL_DIR already exists!"; 6 | exit; 7 | fi 8 | # Check for required applications 9 | ERRORS=0; 10 | for PROGRAM in git curl sqlite3 11 | do 12 | if [ ! `which $PROGRAM 2>&-` ]; 13 | then 14 | ERRORS=1; 15 | echo "Could not find required program $PROGRAM in path."; 16 | fi 17 | done 18 | # stop after errors if we got them 19 | if [ $ERRORS -eq 1 ]; 20 | then 21 | exit; 22 | fi 23 | # Checkout the code repository 24 | echo "Cloning repository git://github.com/ModelSEED/Model-SEED-core"; 25 | git clone git://github.com/ModelSEED/Model-SEED-core $INSTALL_DIR; 26 | # Make the default data dir 27 | DATA_DIR=$INSTALL_DIR/data; 28 | if [ ! -d $DATA_DIR ]; 29 | then 30 | mkdir -p $DATA_DIR; 31 | fi 32 | # Download the base database to tempfile and untar 33 | echo "Downloading standard datasets to $INSTALL_DIR/data"; 34 | TMPFILE=`mktemp /tmp/XXXXXXXX`; 35 | curl http://bioseed.mcs.anl.gov/~chenry/data.tgz > $TMPFILE; 36 | tar -xzf $TMPFILE -C $DATA_DIR; 37 | # Download the sqlite database 38 | TMPFILE=`mktemp /tmp/XXXXXXXX`; 39 | echo "Downloading biochemistry database to $INSTALL_DIE/data/ModelDB/"; 40 | curl http://bioseed.mcs.anl.gov/~chenry/ModelDB-sqlite.tgz > $TMPFILE; 41 | tar -xzf $TMPFILE -C $DATA_DIR; 42 | echo "Loading database into sqlite at $INSTALL_DIE/data/ModelDB/ModelDB.db"; 43 | sqlite3 $DATA_DIR/ModelDB/ModelDB.db < $DATA_DIR/ModelDB/ModelDB.sqlite; 44 | rm $DATA_DIR/ModelDB/ModelDB.sqlite; 45 | cd $INSTALL_DIR; 46 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/createBiochemistryMapping.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use ModelSEED::FIGMODEL; 4 | use ModelSEED::MS::Biochemistry; 5 | use ModelSEED::MS::Mapping; 6 | use ModelSEED::MS::Factories::PPOFactory; 7 | use ModelSEEDbootstrap; 8 | 9 | my $figmodel = ModelSEED::FIGMODEL->new({username => "public",password => "public"}); 10 | my $ppoFactory = ModelSEED::MS::Factories::PPOFactory->new({ 11 | figmodel => $figmodel, 12 | namespace => "public" 13 | }); 14 | 15 | my $biochem = $ppoFactory->createBiochemistry(); 16 | my $mapping = $ppoFactory->createMapping({ 17 | biochemistry => $biochem 18 | }); 19 | 20 | $biochem->printJSONFile($figmodel->config("database root directory")->[0]."exampleObjects/biochemistry.json"); 21 | $mapping->printJSONFile($figmodel->config("database root directory")->[0]."exampleObjects/mapping.json"); 22 | my $readable = $biochem->createReadableStringArray(); 23 | ModelSEED::utilities::PRINTFILE($figmodel->config("database root directory")->[0]."exampleObjects/Biochemistry.readable",$readable); 24 | $readable = $mapping->createReadableStringArray(); 25 | ModelSEED::utilities::PRINTFILE($figmodel->config("database root directory")->[0]."exampleObjects/Mapping.readable",$readable); -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/delete-old-files.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | ######################################################################## 4 | # Script deletes old files from specified directory 5 | # Author: Christopher Henry 6 | # Author email: chenry@mcs.anl.gov 7 | # Author affiliation: Mathematics and Computer Science Division, Argonne National Lab 8 | # Date of module creation: 2/29/2012 9 | ######################################################################## 10 | use strict; 11 | 12 | my $directory; 13 | if (defined($ARGV[0]) && -d $ARGV[0]) { 14 | $directory = $ARGV[0]; 15 | } else { 16 | print "delete-old-files (directory) (max age in hours)\n\n"; 17 | exit(0); 18 | } 19 | 20 | my $maxage; 21 | if (defined($ARGV[1]) && $ARGV[1] =~ m/^\d+$/) { 22 | $maxage = $ARGV[1]; 23 | } else { 24 | print "delete-old-files (directory) (max age in hours)\n\n"; 25 | exit(0); 26 | } 27 | 28 | my @FileList = glob($directory."*"); 29 | for (my $i=0; $i < @FileList; $i++) { 30 | my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($FileList[$i]); 31 | if ((time() - $mtime) > 3600*$maxage) { 32 | if (-d $FileList[$i]) { 33 | print "Deleting ".$FileList[$i]."\n"; 34 | system("rm -rf ".$FileList[$i]); 35 | } else { 36 | unlink($FileList[$i]); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/filterModelGenes.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | use ModelSEED::utilities; 4 | 5 | my $intervalGenesFile = "C:/Code/Model-SEED-core/data/IntervalGenes.txt"; 6 | my $intdata = ModelSEED::utilities::LOADFILE($intervalGenesFile); 7 | my $modelGenes = "C:/Code/Model-SEED-core/data/ModelGenes.txt"; 8 | my $mdlgenes = ModelSEED::utilities::LOADFILE($modelGenes); 9 | my $mdlGeneHash; 10 | my $intGeneHash; 11 | for (my $i=1; $i <@{$mdlgenes}; $i++) { 12 | my $array = [split(/\t/,$mdlgenes->[$i])]; 13 | if (defined($array->[0]) && $array->[0] =~ /peg\.\d+/) { 14 | $mdlGeneHash->{$array->[0]} = 1; 15 | } 16 | } 17 | for (my $i=1; $i <@{$intdata}; $i++) { 18 | my $array = [split(/\t/,$intdata->[$i])]; 19 | if (defined($array->[2]) && $array->[0] =~ /(i\d+)/ && $array->[2] eq "LB") { 20 | my $newarray = [split(/,/,$array->[1])]; 21 | for (my $j=0; $j <@{$newarray}; $j++) { 22 | if (defined($mdlGeneHash->{$newarray->[$j]})) { 23 | $intGeneHash->{$array->[0]}->{$newarray->[$j]} = 1; 24 | } 25 | } 26 | } 27 | } 28 | my $output = []; 29 | foreach my $int (keys(%{$intGeneHash})) { 30 | push(@{$output},$int."\t".join(",",keys(%{$intGeneHash->{$int}}))); 31 | } 32 | ModelSEED::utilities::PRINTFILE("C:/Code/Model-SEED-core/data/MetabolicIntervalGenes.txt",$output); -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/find_potential_hits.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | 4 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/ms-install-database: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | use strict; 3 | use warnings; 4 | use File::Temp qw(tempfile); 5 | use Getopt::Long; 6 | 7 | my ($data, $type, $filename, $host, $user, $password, $socket, $port); 8 | my $args = GetOptions( 9 | "dataDir=s" => \$data, 10 | "type=s" => \$type, 11 | "filename=s" => \$filename, 12 | "host=s" => \$host, 13 | "user=s" => \$user, 14 | "password=s" => \$password, 15 | "socket=s" => \$socket, 16 | "port=s" => \$port, 17 | ); 18 | $data =~ s/\/$//; 19 | 20 | print "Downloading standard datasets to /data\n"; 21 | my ($fh, $tmp) = tempfile(); 22 | system("curl http://bioseed.mcs.anl.gov/~chenry/data.tgz > $tmp"); 23 | system("tar -xzf $tmp -C $data"); 24 | # Download the database 25 | if(lc($type) eq 'sqlite') { 26 | print "Downloading biochemistry database to $filename\n"; 27 | my ($fh, $tmp) = tempfile(); 28 | system("curl http://bioseed.mcs.anl.gov/~devoid/ModelDB-sqlite.tgz > $tmp"); 29 | system("tar -xzf $tmp -C $data"); 30 | print "Loading database into sqlite at $data/ModelDB/ModelDB.db\n"; 31 | system("sqlite3 $data/ModelDB/ModelDB.db < $data/ModelDB/ModelDB.sqlite"); 32 | unlink "$data/ModelDB/ModelDB.sqlite"; 33 | } 34 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/ms-resetdatabase.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | ######################################################################## 3 | # This perl script configures a model seed installation 4 | # Author: Christopher Henry 5 | # Author email: chrisshenry@gmail.com 6 | # Author affiliation: Mathematics and Computer Science Division, Argonne National Lab 7 | # Date of script creation: 8/29/2011 8 | ######################################################################## 9 | use strict; 10 | use Getopt::Long; 11 | use Pod::Usage; 12 | use Config::Tiny; 13 | use Cwd qw(abs_path); 14 | use File::Path; 15 | use Data::Dumper; 16 | 17 | my $directoryRoot = abs_path($0); 18 | my $args = {}; 19 | my $result = GetOptions( 20 | "address|a=s@" => \$args->{"-address"}, 21 | ); 22 | if (!defined($args->{"-address"})) { 23 | $args->{"-address"} = "http://bioseed.mcs.anl.gov/~devoid/ModelDB-sqlite.tgz"; 24 | } 25 | my ($fh, $filename) = File::Temp::tempfile("databasedownload.XXXX"); 26 | close($fh); 27 | system("curl ".$args->{"-address"}." > ".$filename); 28 | system("tar -xzf ".$filename." -C ".$directoryRoot."../data/"); 29 | system("sqlite3 ".$directoryRoot."../data/ModelDB/ModelDB.db < ".$directoryRoot."../data/ModelDB/ModelDB.sqlite"); 30 | unlink($directoryRoot."../data/ModelDB/ModelDB.sqlite"); 31 | 32 | __DATA__ 33 | 34 | =head1 NAME 35 | 36 | ms-resetdatabase - resets the sql-lite database in the Model SEED 37 | 38 | =head1 SYNOPSIS 39 | 40 | ms-resetdatabase 41 | 42 | Options: 43 | 44 | --address [-a] Address that the new database will be downloaded from. 45 | 46 | =cut 47 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/newDevelopmentScript.pl: -------------------------------------------------------------------------------- 1 | use JSON::Any; 2 | use strict; 3 | use Bio::KBase::Exceptions; 4 | 5 | use URI; 6 | use ModelSEED::Database::MongoDBSimple; 7 | use Bio::KBase::IDServer::Client; 8 | use ModelSEED::Auth::Basic; 9 | use ModelSEED::Store; 10 | use Data::UUID; 11 | use ModelSEED::MS::Biochemistry; 12 | use ModelSEED::MS::Mapping; 13 | use ModelSEED::MS::Annotation; 14 | use ModelSEED::MS::Model; 15 | use ModelSEED::FIGMODEL; 16 | 17 | my $self; 18 | $self->{_db} = 19 | ModelSEED::Database::MongoDBSimple->new( 20 | { db_name => "modelObjectStore", host => "birch.mcs.anl.gov" } ); 21 | $self->{_auth} = 22 | ModelSEED::Auth::Basic->new( { username => "kbase", password => "kbase" } ) 23 | ; 24 | $self->{_store} = 25 | ModelSEED::Store->new( { auth => $self->{_auth}, database => $self->{_db} } ); 26 | 27 | my $figmodel = ModelSEED::FIGMODEL->new({username => "public",password => "public"}); 28 | my $ppoFactory = ModelSEED::MS::Factories::PPOFactory->new({ 29 | figmodel => $figmodel, 30 | namespace => "public" 31 | }); 32 | my $biochem = $ppoFactory->createBiochemistry(); 33 | my $mapping = $ppoFactory->createMapping({ 34 | biochemistry => $biochem 35 | }); 36 | 37 | #Saving the mapping to the mongodb document store 38 | $self->{_store}->save_data( "biochemistry/kbase/default", $biochem->serializeToDB() ); 39 | $self->{_store}->save_data( "mapping/kbase/default", $mapping->serializeToDB() ); 40 | $self->{_store}->set_public( "biochemistry/kbase/default", 1 ); 41 | $self->{_store}->set_public( "mapping/kbase/default", 1 ); 42 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/unpack-model-db.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | use File::Temp qw(tempfile tempdir); 3 | 4 | # NOTE: This should get added onto the init script 5 | # Assume that there's a configuration connection parameters: 6 | my $modelDBFile = '/path/to/modelDB.sqlite'; # where we want the file to be created 7 | my $flatDataDir = '/data/'; # Where ReactioDB, models, etc. are located 8 | 9 | my $tarball = $faltDataDir."dumps/modelDB.tar.gz"; 10 | # Fail if no download of the database exists 11 | if(!-d $flatDataDir . "dumps" || !-f $flatDataDir . "dumps/modelDB.tar.gz") { 12 | warn "Could not find modelDB file in download. Tried looking in ". 13 | $flatDataDir . "dumps/modelDB.tar.gz\n". 14 | "Please contact the software developers for assistance.\n"; 15 | exit(); 16 | } 17 | 18 | # Fail if there already exists a database in the target location. 19 | if(-f$modelDBFile) { 20 | warn "Database file already exists at $modelDBFile\n". 21 | "Skipping install of standard database. To install a ". 22 | "clean modelDB copy, delete this file and try again."; 23 | exit(); 24 | } 25 | 26 | # Fail if there's no copy of sqlite 27 | my $binary = `whcih sqlite3`; 28 | unless(defined($binary) && -f $binary) { 29 | warn "Could not find a copy of SQLite3! ". 30 | "Install that and try again!"; 31 | exit(); 32 | } 33 | # Create temporary directory to extract into 34 | my $tmpDir = tempdir(); 35 | system("tar -xzf $tarball -C $tmpDir"); 36 | # Fail if there's no file where we expect it to be 37 | unless(-f "$tmpDir/modelDB/modelDB.sqlite") { 38 | warn "Unable to find sqlite file in $tarball!\n"; 39 | exit(); 40 | } 41 | system("cat $tmpDir/modelDB/modelDB.sqlite | $binary $modelDBFile"); 42 | -------------------------------------------------------------------------------- /lib/ModelSEED/ModelSEEDScripts/updateDefaultKBaseMongoDB.pl: -------------------------------------------------------------------------------- 1 | use JSON::Any; 2 | use strict; 3 | use Bio::KBase::Exceptions; 4 | 5 | use URI; 6 | use ModelSEED::Database::MongoDBSimple; 7 | use Bio::KBase::IDServer::Client; 8 | use ModelSEED::Auth::Basic; 9 | use ModelSEED::Store; 10 | use Data::UUID; 11 | use ModelSEED::MS::Biochemistry; 12 | use ModelSEED::MS::Mapping; 13 | use ModelSEED::MS::Annotation; 14 | use ModelSEED::MS::Model; 15 | use ModelSEED::FIGMODEL; 16 | use ModelSEED::MS::Factories::PPOFactory; 17 | 18 | my $self; 19 | $self->{_db} = 20 | ModelSEED::Database::MongoDBSimple->new( 21 | { db_name => "modelObjectStore", host => "birch.mcs.anl.gov" } ); 22 | $self->{_auth} = 23 | ModelSEED::Auth::Basic->new( { username => "kbase", password => "kbase" } ) 24 | ; 25 | $self->{_store} = 26 | ModelSEED::Store->new( { auth => $self->{_auth}, database => $self->{_db} } ); 27 | 28 | my $figmodel = ModelSEED::FIGMODEL->new({username => "public",password => "public"}); 29 | my $ppoFactory = ModelSEED::MS::Factories::PPOFactory->new({ 30 | figmodel => $figmodel, 31 | namespace => "public" 32 | }); 33 | my $biochem = $ppoFactory->createBiochemistry(); 34 | my $mapping = $ppoFactory->createMapping({ 35 | biochemistry => $biochem 36 | }); 37 | 38 | #Saving the mapping to the mongodb document store 39 | $self->{_store}->save_data( "biochemistry/kbase/default", $biochem->serializeToDB() ); 40 | $self->{_store}->save_data( "mapping/kbase/default", $mapping->serializeToDB() ); 41 | $self->{_store}->set_public( "biochemistry/kbase/default", 1 ); 42 | $self->{_store}->set_public( "mapping/kbase/default", 1 ); 43 | -------------------------------------------------------------------------------- /lib/ModelSEED/MooseDB/user.pm: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # ModelSEED::MooseDB::media - This is the moose object corresponding to the media object in the database 3 | # Author: Christopher Henry 4 | # Author email: chenry@mcs.anl.gov 5 | # Author affiliation: Mathematics and Computer Science Division, Argonne National Lab 6 | # Date of module creation: 11/6/2011 7 | ######################################################################## 8 | use strict; 9 | use ModelSEED::globals; 10 | use ModelSEED::MooseDB::object; 11 | package ModelSEED::MooseDB::user; 12 | use Moose; 13 | use Moose::Util::TypeConstraints; 14 | use namespace::autoclean; 15 | 16 | extends 'ModelSEED::MooseDB::object'; 17 | 18 | has 'email' => (is => 'ro', isa => 'Str', required => 1, default => ""); 19 | has 'login' => (is => 'ro', isa => 'Str', required => 1); 20 | has 'password' => (is => 'ro', isa => 'Str', required => 1); 21 | has 'firstname' => (is => 'ro', isa => 'Str', required => 1, default => ""); 22 | has 'lastname' => (is => 'ro', isa => 'Str', required => 1, default => ""); 23 | 24 | sub BUILD { 25 | my ($self,$params) = @_; 26 | $params = ModelSEED::utilities::ARGS($params,[],{}); 27 | } 28 | 29 | 1; 30 | -------------------------------------------------------------------------------- /lib/ModelSEED/SchedulerDB/JOB.pm: -------------------------------------------------------------------------------- 1 | package SchedulerDB::JOB; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/SchedulerDB/ObjectBase.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | no warnings qw(redefine); 4 | 5 | 1; 6 | 7 | # this class is AUTOGENERATED and will be AUTOMATICALLY REGENERATED 8 | # all work done in this module will be LOST 9 | 10 | 11 | package SchedulerDB::JOB; 12 | 13 | use DBObject; 14 | use base qw(DBObject); 15 | 16 | sub attributes { 17 | return { 18 | ID => [ DB_SCALAR, undef, 0, undef ], 19 | FINISHED => [ DB_SCALAR, undef, 0, undef ], 20 | EXCLUSIVEKEY => [ DB_SCALAR, undef, 0, undef ], 21 | QUEUE => [ DB_SCALAR, undef, 0, "-1" ], 22 | STATUS => [ DB_SCALAR, undef, 0, "unknown" ], 23 | START => [ DB_SCALAR, undef, 0, undef ], 24 | PRIORITY => [ DB_SCALAR, undef, 0, "3" ], 25 | PROCESSID => [ DB_SCALAR, undef, 0, "0" ], 26 | COMMAND => [ DB_SCALAR, undef, 1, undef ], 27 | STATE => [ DB_SCALAR, undef, 0, "0" ], 28 | QUEUETIME => [ DB_SCALAR, undef, 1, undef ], 29 | USER => [ DB_SCALAR, undef, 0, "unknown" ], 30 | }; 31 | } 32 | 33 | sub unique_indices { 34 | return 35 | [ 36 | [ "ID" ], 37 | ]; 38 | } 39 | 40 | sub indices { 41 | return 42 | [ 43 | [ "PRIORITY" ], 44 | [ "PROCESSID" ], 45 | [ "QUEUE" ], 46 | [ "USER" ], 47 | ]; 48 | } 49 | 50 | 1; 51 | 52 | package SchedulerDB::QUEUE; 53 | 54 | use DBObject; 55 | use base qw(DBObject); 56 | 57 | sub attributes { 58 | return { 59 | ID => [ DB_SCALAR, undef, 0, undef ], 60 | NAME => [ DB_SCALAR, undef, 1, undef ], 61 | MAXPROCESSES => [ DB_SCALAR, undef, 0, "-1" ], 62 | TYPE => [ DB_SCALAR, undef, 0, "QSUB" ], 63 | }; 64 | } 65 | 66 | sub unique_indices { 67 | return 68 | [ 69 | [ "ID" ], 70 | [ "NAME" ], 71 | ]; 72 | } 73 | 74 | sub indices { 75 | return 76 | [ 77 | ]; 78 | } 79 | 80 | 1; 81 | -------------------------------------------------------------------------------- /lib/ModelSEED/SchedulerDB/QUEUE.pm: -------------------------------------------------------------------------------- 1 | package SchedulerDB::QUEUE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/SchedulerDB/SchedulerDB.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/ModelSEED/Settings.config: -------------------------------------------------------------------------------- 1 | [Database] 2 | # type is either sqlite or mysql 3 | type=sqlite 4 | 5 | # required for sqlite 6 | # filename= 7 | 8 | # required for mysql 9 | # username= 10 | # password= 11 | # host= 12 | # socket= 13 | # port= 14 | 15 | [Optional] 16 | # dataDirectory= 17 | # admin_users=admin1,admin2 18 | 19 | [Optimizers] 20 | # includeDirectoryGLPK= 21 | # libraryDirectoryGLPK= 22 | # includeDirectoryCPLEX= 23 | # libraryDirectoryCPLEX= 24 | # licenceDirectoryCPLEX= 25 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/CONTIG.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::CONTIG; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/CONTIGPRIMER.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::CONTIGPRIMER; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/EXPERIMENTER.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::EXPERIMENTER; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/FEATURE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::FEATURE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/FEATURE_ALIAS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::FEATURE_ALIAS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/FEATURE_CONTIG.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::FEATURE_CONTIG; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/PHENOTYPE.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::PHENOTYPE; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/PREDICTIONS.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::PREDICTIONS; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/STRAIN.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::STRAIN; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEED/StrainDB/STRAIN_CONTIG.pm: -------------------------------------------------------------------------------- 1 | package ModelSEED::StrainDB::STRAIN_CONTIG; 2 | 3 | use strict; 4 | use warnings; 5 | 6 | 1; 7 | 8 | # this class is a stub, this file will not be automatically regenerated 9 | # all work in this module will be saved 10 | 11 | -------------------------------------------------------------------------------- /lib/ModelSEEDScripts/read_test.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use JSON::Any; 4 | use ModelSEED::MS::ObjectManager; 5 | use Time::HiRes qw(time); 6 | 7 | open FILE, "; 10 | my $objectData = JSON::Any->decode($string); 11 | print "File load done!"; 12 | my $biochem = ModelSEED::MS::Biochemistry->new($objectData); 13 | my $length = length($string); 14 | 15 | #my @string = ; 16 | #my $length = 0; 17 | #map {$length += length($_)} @string; 18 | 19 | $time = (time - $time); 20 | $time = sprintf("%.3f", $time); 21 | print "Read $length chars in $time seconds\n"; 22 | -------------------------------------------------------------------------------- /lib/ModelSEEDScripts/svr_all_models.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | 3 | use Getopt::Long; 4 | use Pod::Usage qw(pod2usage); 5 | use SeedEnv; 6 | use FBAMODELserver; 7 | 8 | # 9 | # This is a SAS Component 10 | # 11 | 12 | 13 | 14 | my ($user, $password, $man, $help) = undef; 15 | my $opted = GetOptions('help|h|?' => \$help, 16 | 'man|m' => \$man, 17 | 'u|username|user=s' => \$user, 18 | 'p|password=s' => \$password) or pod2usage(2); 19 | pod2usage(1) if $help; 20 | pod2usage(-exitstatus => 0, -verbose => 2) if $man; 21 | my $fba = new FBAMODELserver; 22 | my $models; 23 | if($password && $user) { 24 | $models = $fba->get_model_id_list({ user => $user, password => $password }); 25 | } else { 26 | $models = $fba->get_model_id_list(); 27 | } 28 | foreach my $id (@$models) { 29 | print "$id\n"; 30 | } 31 | 32 | __DATA__ 33 | 34 | =head1 SYNOPSIS 35 | 36 | svr_all_models [options] > output 37 | 38 | =head2 OPTIONS 39 | 40 | =over 4 41 | 42 | =item username 43 | 44 | If provided along with password, also returns private models. 45 | 46 | =item password 47 | 48 | =back 49 | 50 | =head2 DESCRIPTION 51 | 52 | Returns a list of model IDs, one per line. If Username and Password are 53 | provided, this will also return private models for that user. 54 | 55 | =cut 56 | -------------------------------------------------------------------------------- /lib/ModelSEEDScripts/svr_get_model_rxn.pl: -------------------------------------------------------------------------------- 1 | 2 | use strict; 3 | use FBAMODELserver; 4 | use ClientThing; 5 | 6 | my $ServerObject = FBAMODELserver->new(); 7 | 8 | #1.) Getting the complete set of reaction IDs from the database. 9 | my $modelList = ["Seed83333.1", "iJR904"]; 10 | my $modelReactions = $ServerObject->get_reaction_id_list({"id" => $modelList}); 11 | 12 | #2.) Finding the unique set of reaction IDs represented in the input models 13 | my @models = keys(%{$modelReactions}); 14 | my $rxnHash; 15 | for (my $i=0; $i < @models; $i++) { 16 | for (my $j=0; $j < @{$modelReactions->{$models[$i]}}; $j++) { 17 | $rxnHash->{$modelReactions->{$models[$i]}->[$j]} = 1; 18 | } 19 | } 20 | my $rxnList; 21 | push(@{$rxnList},keys(%{$rxnHash})); 22 | 23 | #3.) Getting the data for all model reactions from database 24 | my $reactionData = $ServerObject->get_reaction_data({"id" => $rxnList,"model" => $modelList}); 25 | 26 | #4.) Printing rection data to file 27 | open (OUTPUT, ">ReactionData.txt"); 28 | print OUTPUT "Reaction ID\tEquation"; 29 | for (my $i=0; $i < @models; $i++) { 30 | print OUTPUT "\t".$models[$i]; 31 | } 32 | print OUTPUT "\n"; 33 | for (my $i=0; $i < @{$rxnList}; $i++) { 34 | print OUTPUT $rxnList->[$i]."\t".$reactionData->{$rxnList->[$i]}->{EQUATION}->[0]; 35 | for (my $j=0; $j < @models; $j++) { 36 | if (defined($reactionData->{$rxnList->[$i]}->{$models[$j]})) { 37 | print OUTPUT "\t".$reactionData->{$rxnList->[$i]}->{$models[$j]}->{DIRECTIONALITY}->[0].":".join("|",@{$reactionData->{$rxnList->[$i]}->{$models[$j]}->{"ASSOCIATED PEG"}}); 38 | } else { 39 | print OUTPUT "\tNot in model"; 40 | } 41 | 42 | } 43 | print OUTPUT "\n"; 44 | } 45 | close(OUTPUT); 46 | -------------------------------------------------------------------------------- /lib/ModelSEEDScripts/svr_my_models.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | 3 | use Getopt::Long; 4 | use Pod::Usage qw(pod2usage); 5 | use SeedEnv; 6 | use FBAMODELserver; 7 | 8 | # 9 | # This is a SAS Component 10 | # 11 | 12 | 13 | my ($user, $password, $man, $help) = undef; 14 | $user = $ENV{'SAS_USER'} if(defined($ENV{'SAS_USER'})); 15 | $password = $ENV{'SAS_PASSWORD'} if(defined($ENV{'SAS_PASSWORD'})); 16 | my $opted = GetOptions('help|h|?' => \$help, 17 | 'man|m' => \$man, 18 | 'u|username|user=s' => \$user, 19 | 'p|password=s' => \$password) or pod2usage(2); 20 | pod2usage(1) if $help; 21 | pod2usage(-exitstatus => 0, -verbose => 2) if $man; 22 | unless(defined($user) && defined($password)) { 23 | warn "You must provide a username and passsword!\n"; 24 | pod2usage(2); 25 | } 26 | 27 | my $fba = new FBAMODELserver; 28 | my $models; 29 | if($password && $user) { 30 | $models = $fba->get_model_id_list({ user => $user, password => $password, 'onlyMine' => 1}); 31 | } else { 32 | $models = $fba->get_model_id_list(); 33 | } 34 | foreach my $id (@$models) { 35 | print "$id\n"; 36 | } 37 | 38 | __DATA__ 39 | 40 | =head1 SYNOPSIS 41 | 42 | svr_my_models [options] > output 43 | 44 | =head2 OPTIONS 45 | 46 | =over 4 47 | 48 | =item username [-u] 49 | 50 | Required. If the environment variable "SAS_USER" is defined, this defaults 51 | to that username. You may still override that with the --username flag. 52 | 53 | =item password [-p] 54 | 55 | Required. If the enviornment variable "SAS_PASSWORD" is defined, this 56 | defaults to that password. You may still override that with the --password flag. 57 | 58 | =back 59 | 60 | =head2 DESCRIPTION 61 | 62 | Returns a list of model Ids that are owned by the user. One per line. 63 | 64 | =cut 65 | -------------------------------------------------------------------------------- /lib/ModelSEEDScripts/svr_run_model_fba.pl: -------------------------------------------------------------------------------- 1 | 2 | use strict; 3 | use FBAMODELserver; 4 | use ClientThing; 5 | 6 | my $ServerObject = FBAMODELserver->new(); 7 | 8 | #1.) Getting the complete list of available media conditions 9 | my $model = "Seed83333.1"; 10 | my $media = $ServerObject->get_media_id_list(); 11 | 12 | #2.) Running FBA on all media contiions 13 | my $FBAInput; 14 | for (my $i=0; $i < 1; $i++) { 15 | push(@{$FBAInput->{parameters}},{id => $model,media => "Carbon-D-Glucose",reactionKO => ["none"],geneKO => ["none"],user => "PUBLIC",password => ""}); 16 | } 17 | my $output = $ServerObject->simulate_model_growth($FBAInput); 18 | 19 | #3.) Printing results to file 20 | open (OUTPUT, ">FBAResults.txt"); 21 | print OUTPUT "Media ID\tGrowth\n"; 22 | for (my $i=0; $i < @{$output}; $i++) { 23 | print OUTPUT $output->[$i]->{media}."\t".$output->[$i]->{growth}."\n"; 24 | } 25 | close(OUTPUT); 26 | 27 | #4.) Simulating single gene knockouts on some different media conditions 28 | $FBAInput = {}; 29 | for (my $i=0; $i < 1; $i++) { 30 | push(@{$FBAInput->{parameters}},{id => $model,media => "Carbon-D-Glucose",reactionKO => ["none"],geneKO => ["none"],user => "PUBLIC",password => ""}); 31 | } 32 | $output = $ServerObject->simulate_all_single_gene_knockout($FBAInput); 33 | 34 | #3.) Printing results to file 35 | open (OUTPUT, ">KOResults.txt"); 36 | print OUTPUT "Media ID\tEssential genes\n"; 37 | for (my $i=0; $i < @{$output}; $i++) { 38 | print OUTPUT $output->[$i]->{media}."\t".join(",",@{$output->[$i]->{"essential genes"}})."\n"; 39 | } 40 | close(OUTPUT); -------------------------------------------------------------------------------- /lib/PPO/ppo_sqlite_copy.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use PPOBackend; 7 | 8 | # usage message 9 | sub usage { 10 | my $error = shift; 11 | print "Usage: ppo_sqlite_copy.pl source_database target_database\n"; 12 | print "Error: $error\n" if($error); 13 | exit; 14 | } 15 | 16 | my $source = $ARGV[0] | ''; 17 | -f $source || &usage("Unable to find database source '$source'."); 18 | my $target = $ARGV[1] || &usage('No new database name given'); 19 | !-f $target || &usage("Target file already exists."); 20 | my $connect = "DBI:SQLite:dbname=$target"; 21 | 22 | system("cp", $source, $target) == 0 23 | || &usage("Unable to copy database from $source to $target."); 24 | 25 | 26 | my $backend = PPOBackend->new(-backend => 'SQLite', -database => $source); 27 | 28 | if (ref $backend) { 29 | $backend->update_row('_references', 30 | { '_database' => $target, 31 | '_backend_data' => $connect }, 32 | '_database='.$backend->dbh->quote($source)) 33 | || die "Failed to update database."; 34 | } 35 | else { 36 | &usage("Unable to open database '$source'."); 37 | } 38 | 39 | $backend->dbh->disconnect; 40 | 41 | exit 1; 42 | -------------------------------------------------------------------------------- /lib/myRAST/ATserver.pm: -------------------------------------------------------------------------------- 1 | # 2 | # This is a SAS Component. 3 | # 4 | # Copyright (c) 2003-2006 University of Chicago and Fellowship 5 | # for Interpretations of Genomes. All Rights Reserved. 6 | # 7 | # This file is part of the SEED Toolkit. 8 | # 9 | # The SEED Toolkit is free software. You can redistribute 10 | # it and/or modify it under the terms of the SEED Toolkit 11 | # Public License. 12 | # 13 | # You should have received a copy of the SEED Toolkit Public License 14 | # along with this program; if not write to the University of Chicago 15 | # at info@ci.uchicago.edu or the Fellowship for Interpretation of 16 | # Genomes at veronika@thefig.info or download a copy from 17 | # http://www.theseed.org/LICENSE.TXT. 18 | # 19 | 20 | package ATserver; 21 | 22 | use strict; 23 | use base qw(ClientThing); 24 | 25 | use Data::Dumper; 26 | 27 | sub new { 28 | my ($class, @options) = @_; 29 | 30 | my %options = ClientThing::FixOptions(@options); 31 | 32 | $options{url} ||= 'http://servers.theseed.org/figdisk/FIG/AT_server.cgi'; 33 | # $options{url} ||= "http://bioseed.mcs.anl.gov/~fangfang/FIG/AT_server.cgi"; 34 | # $options{url} = ClientThing::ComputeURL($options{url}, 'AT_server.cgi', 'AT'); 35 | # $options{url} = "localhost"; 36 | 37 | return $class->SUPER::new(AT => %options); 38 | } 39 | 40 | 41 | 1; 42 | -------------------------------------------------------------------------------- /lib/myRAST/IntergenicGlyph.pm: -------------------------------------------------------------------------------- 1 | package IntergenicGlyph; 2 | 3 | =head1 NAME 4 | 5 | IntergenicGlyph - a genome display glyph 6 | 7 | =cut 8 | 9 | use Moose; 10 | 11 | use Glyph; 12 | extends 'Glyph'; 13 | 14 | use Wx ':everything'; 15 | 16 | override 'render' => sub { 17 | 18 | my($self, $panel, $dc, $off_x, $off_y) = @_; 19 | 20 | if ($self->selected) 21 | { 22 | super(); 23 | } 24 | 25 | }; 26 | 27 | 1; 28 | 29 | -------------------------------------------------------------------------------- /lib/myRAST/MinimalTracer.pm: -------------------------------------------------------------------------------- 1 | package MinimalTracer; 2 | 3 | # 4 | # This is a SAS component. 5 | # 6 | 7 | use strict; 8 | use base qw(Exporter); 9 | use vars qw(@EXPORT); 10 | @EXPORT = qw(Trace T TSetup ETracing); 11 | 12 | sub T { 13 | 14 | } 15 | 16 | sub Trace { 17 | my($msg) = @_; 18 | } 19 | 20 | sub ETracing { 21 | } 22 | 23 | sub TSetup { 24 | } 25 | 26 | 1; 27 | -------------------------------------------------------------------------------- /lib/myRAST/NotifyClient.pm: -------------------------------------------------------------------------------- 1 | # 2 | # This is a little class that sends notifications to a 3 | # NotificationServer. Used for updating the GUI when 4 | # status changes on a helper application. 5 | # 6 | 7 | package NotifyClient; 8 | 9 | use YAML::Any; 10 | use IO::Socket::INET; 11 | 12 | use Moose; 13 | 14 | has 'port' => (is => 'ro', 15 | isa => 'Num'); 16 | 17 | has 'host' => (is => 'ro', 18 | isa => 'Str', 19 | default => 'localhost'); 20 | 21 | has 'handle' => (is => 'ro', 22 | isa => 'Str'); 23 | 24 | has 'socket' => (isa => 'Maybe[IO::Socket::INET]', 25 | is => 'ro', 26 | lazy => 1, 27 | builder => '_connect'); 28 | 29 | sub _connect 30 | { 31 | my($self) = @_; 32 | 33 | # print "Notify connect to $self->{host} $self->{port}\n"; 34 | 35 | if ($self->port <= 0) 36 | { 37 | return undef; 38 | } 39 | 40 | my $sock = IO::Socket::INET->new(PeerHost => $self->host, 41 | PeerPort => $self->port, 42 | Proto => 'tcp'); 43 | return $sock; 44 | } 45 | 46 | sub status 47 | { 48 | my($self, $msg) = @_; 49 | $self->send([status => $msg]); 50 | } 51 | 52 | sub progress 53 | { 54 | my($self, $val, $range) = @_; 55 | $self->send([progress => [$val, $range]]); 56 | } 57 | 58 | sub send 59 | { 60 | my($self, @items) = @_; 61 | 62 | return if !defined($self->socket); 63 | 64 | my $txt = Dump([$self->handle => \@items]); 65 | my $len = length($txt); 66 | $self->socket->print(pack("N", $len) . $txt); 67 | } 68 | 69 | 1; 70 | -------------------------------------------------------------------------------- /lib/myRAST/PipelineHost.pm: -------------------------------------------------------------------------------- 1 | 2 | package PipelineHost; 3 | 4 | =head1 DESCRIPTION 5 | 6 | A pipeline host is a role implemented by objects that hold 7 | pipeline stages. It provides the framework for status callbacks 8 | from the pipeline stages. 9 | 10 | =cut 11 | 12 | use Moose::Role; 13 | 14 | has 'notify_port' => (is => 'rw', 15 | isa => 'Num', 16 | default => 0); 17 | 18 | 1; 19 | 20 | -------------------------------------------------------------------------------- /lib/myRAST/SasApp.pm: -------------------------------------------------------------------------------- 1 | package SasApp; 2 | 3 | use Moose; 4 | use MooseX::NonMoose; 5 | 6 | use Wx; 7 | extends 'Wx::App'; 8 | 9 | use DesktopRastFrame; 10 | use DesktopRast; 11 | 12 | sub OnInit 13 | { 14 | my($self) = @_; 15 | 16 | my $rast = DesktopRast->new(); 17 | my $fr = DesktopRastFrame->new(title => "foo", rast => $rast, 18 | size => Wx::Size->new(700,700)); 19 | $fr->Show(1); 20 | return 1; 21 | } 22 | 23 | 1; 24 | -------------------------------------------------------------------------------- /lib/myRAST/SeedEnv.pm: -------------------------------------------------------------------------------- 1 | use strict; 2 | 3 | # This is a SAS component. 4 | 5 | # 6 | # Master include for the SAS seed environment. 7 | # 8 | # Script to determine the uses we should have: 9 | # for i in *pm; do if grep -s -i 'SAS Comp' $i > /dev/null ; then b=`basename $i .pm`; echo "use $b;" ; fi done 10 | # 11 | # Make sure to not reinclude SeedEnv since it'll be found too. 12 | # 13 | 14 | use ANNOserver; 15 | use ClientThing; 16 | use ErrorMessage; 17 | use ModelSEED::FBAMODELserver; 18 | use RASTserver; 19 | use SAPserver; 20 | use ScriptThing; 21 | use SeedUtils; 22 | 23 | 1; 24 | -------------------------------------------------------------------------------- /lib/myRAST/ViewableFile.pm: -------------------------------------------------------------------------------- 1 | # 2 | # Little class to wrap up a file that has a 3 | # label for a button used to trigger a view of it. 4 | # 5 | 6 | package ViewableFile; 7 | use File::Basename; 8 | 9 | our $is_win32; 10 | eval { 11 | require Win32; 12 | $is_win32 = 1; 13 | }; 14 | 15 | use Moose; 16 | 17 | has 'filename' => (is => 'ro', 18 | isa => 'Str'); 19 | 20 | has 'label' => (is => 'ro', 21 | isa => 'Str'); 22 | 23 | sub get_path 24 | { 25 | my($self) = @_; 26 | my $f = $self->filename; 27 | if (!$is_win32) 28 | { 29 | return $f; 30 | } 31 | 32 | if (-f $f || -d $f) 33 | { 34 | return Win32::GetShortPathName($f); 35 | } 36 | else 37 | { 38 | my $dir = dirname($f); 39 | my $base = basename($f); 40 | return Win32::GetShortPathName($dir) . "\\$base"; 41 | } 42 | } 43 | 44 | 45 | 1; 46 | -------------------------------------------------------------------------------- /lib/myRAST/WebBrowser.pm: -------------------------------------------------------------------------------- 1 | package WebBrowser; 2 | use URI::Escape; 3 | 4 | use strict; 5 | 6 | our $have_fileop; 7 | eval 8 | { 9 | require Win32::FileOp; 10 | $have_fileop = 1; 11 | }; 12 | 13 | sub open 14 | { 15 | my($url) = @_; 16 | $url =~ s/\|/%7C/g; 17 | if ($^O eq 'darwin') 18 | { 19 | system("open", $url); 20 | } 21 | elsif ($^O =~ /win32/i && $have_fileop) 22 | { 23 | print "win32 shellexecute $url\n"; 24 | Win32::FileOp::ShellExecute($url); 25 | } 26 | elsif ($^O =~ /win32/i) 27 | { 28 | print "win32 start $url\n"; 29 | system("start", $url); 30 | } 31 | elsif ($^O =~ /linux/i) 32 | { 33 | my $rc = system("xdg-open", $url); 34 | if ($rc != 0) 35 | { 36 | system("firefox", $url); 37 | } 38 | } 39 | 40 | 41 | } 42 | 43 | 1; 44 | -------------------------------------------------------------------------------- /lib/myRAST/myRASTVersion.pm: -------------------------------------------------------------------------------- 1 | # This is a SAS component. 2 | package myRASTVersion; 3 | use base 'Class::Accessor'; 4 | __PACKAGE__->mk_accessors(qw(release)); 5 | sub new 6 | { 7 | my($class) = @_; 8 | my $self = { 9 | release => "36", 10 | }; 11 | return bless $self, $class; 12 | } 13 | 1; 14 | -------------------------------------------------------------------------------- /lib/myRAST/myrast_bootstrap.pm: -------------------------------------------------------------------------------- 1 | @INC = ( 2 | 'C:\Program Files\myRAST\deplib', 3 | 'C:\Program Files\myRAST\lib' 4 | ); 5 | my $prog = shift(@ARGV); 6 | do $prog; 7 | if ($@) { die "Failure running $prog: $@\n" } 8 | 1; 9 | -------------------------------------------------------------------------------- /software/mfatoolkit/Include/CPLEXapi.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // MFAToolkit: Software for running flux balance analysis on stoichiometric models 3 | // Software developer: Christopher Henry (chenry@mcs.anl.gov), MCS Division, Argonne National Laboratory 4 | // Copyright (C) 2007 Argonne National Laboratory/University of Chicago. All Rights Reserved. 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program. If not, see . 18 | // For more information on MFAToolkit, see . 19 | //////////////////////////////////////////////////////////////////////////////// 20 | 21 | #ifndef CPLEXAPI_H 22 | #define CPLEXAPI_H 23 | 24 | int InitializeCPLEXVariables(); 25 | 26 | int CPLEXInitialize(); 27 | 28 | int CPLEXCleanup(); 29 | 30 | int CPLEXClearSolver(); 31 | 32 | int CPLEXPrintFromSolver(); 33 | 34 | OptSolutionData* CPLEXRunSolver(int ProbType); 35 | 36 | int CPLEXLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds); 37 | 38 | int CPLEXLoadObjective(LinEquation* InEquation, bool Max); 39 | 40 | int CPLEXAddConstraint(LinEquation* InEquation); 41 | 42 | int CPLEXDelConstraint(LinEquation* InEquation); 43 | 44 | #endif -------------------------------------------------------------------------------- /software/mfatoolkit/Include/GLPKapi.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // MFAToolkit: Software for running flux balance analysis on stoichiometric models 3 | // Software developer: Christopher Henry (chenry@mcs.anl.gov), MCS Division, Argonne National Laboratory 4 | // Copyright (C) 2007 Argonne National Laboratory/University of Chicago. All Rights Reserved. 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program. If not, see . 18 | // For more information on MFAToolkit, see . 19 | //////////////////////////////////////////////////////////////////////////////// 20 | 21 | #ifndef GLPKAPI_H 22 | #define GLPKAPI_H 23 | 24 | int InitializeGLPKVariables(); 25 | 26 | int GLPKInitialize(); 27 | 28 | int GLPKCleanup(); 29 | 30 | int GLPKClearSolver(); 31 | 32 | int GLPKPrintFromSolver(); 33 | 34 | OptSolutionData* GLPKRunSolver(int ProbType); 35 | 36 | int GLPKLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds); 37 | 38 | int GLPKLoadObjective(LinEquation* InEquation, bool Max); 39 | 40 | int GLPKAddConstraint(LinEquation* InEquation); 41 | 42 | #endif -------------------------------------------------------------------------------- /software/mfatoolkit/Include/GeneInterval.h: -------------------------------------------------------------------------------- 1 | #ifndef GENEINTERVAL_H 2 | #define GENEINTERVAL_H 3 | 4 | #include "Identity.h" 5 | 6 | class Gene; 7 | class Data; 8 | struct OptimizationParameter; 9 | struct MFAVariable; 10 | 11 | class GeneInterval : public Identity{ 12 | private: 13 | Data* MainData; 14 | 15 | vector GeneList; 16 | 17 | int StartCoord; 18 | int EndCoord; 19 | int TotalGenes; 20 | double ExperimentalGrowth; 21 | 22 | MFAVariable* IntervalUseVariable; 23 | public: 24 | GeneInterval(int InStartCoord, int InEndCoord, int InTotalGenes, double ExpGrowth, Data* InData); 25 | ~GeneInterval(); 26 | 27 | //Input 28 | 29 | //Output 30 | int FNumLoadedGenes(); 31 | int FNumTotalGenes(); 32 | double FExperimentalGrowth(); 33 | int FStartCoord(); 34 | int FEndCoord(); 35 | Gene* GetGene(int InIndex); 36 | 37 | //Metabolic flux analysis functions 38 | MFAVariable* CreateMFAVariable(OptimizationParameter* InParameters); 39 | MFAVariable* GetMFAVar(); 40 | void ClearMFAVariables(bool DeleteThem); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /software/mfatoolkit/Include/LINDOapi.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // MFAToolkit: Software for running flux balance analysis on stoichiometric models 3 | // Software developer: Christopher Henry (chenry@mcs.anl.gov), MCS Division, Argonne National Laboratory 4 | // Copyright (C) 2007 Argonne National Laboratory/University of Chicago. All Rights Reserved. 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program. If not, see . 18 | // For more information on MFAToolkit, see . 19 | //////////////////////////////////////////////////////////////////////////////// 20 | 21 | #ifndef LINDOAPI_H 22 | #define LINDOAPI_H 23 | 24 | int InitializeLINDOVariables(); 25 | 26 | int LINDOInitialize(); 27 | 28 | int LINDOCleanup(); 29 | 30 | int LINDOClearSolver(); 31 | 32 | int LINDOPrintFromSolver(); 33 | 34 | OptSolutionData* LINDORunSolver(int ProbType); 35 | 36 | int LINDOLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds); 37 | 38 | int LINDOLoadObjective(LinEquation* InEquation, bool Max); 39 | 40 | int LINDOAddConstraint(LinEquation* InEquation); 41 | 42 | #endif -------------------------------------------------------------------------------- /software/mfatoolkit/Include/SCIPapi.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // MFAToolkit: Software for running flux balance analysis on stoichiometric models 3 | // Software developer: Christopher Henry (chenry@mcs.anl.gov), MCS Division, Argonne National Laboratory 4 | // Copyright (C) 2007 Argonne National Laboratory/University of Chicago. All Rights Reserved. 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program. If not, see . 18 | // For more information on MFAToolkit, see . 19 | //////////////////////////////////////////////////////////////////////////////// 20 | 21 | #ifndef SCIPAPI_H 22 | #define SCIPAPI_H 23 | 24 | int InitializeSCIPVariables(); 25 | 26 | int SCIPInitialize(); 27 | 28 | int SCIPCleanup(); 29 | 30 | int SCIPClearSolver(); 31 | 32 | int SCIPPrintFromSolver(); 33 | 34 | OptSolutionData* SCIPRunSolver(int ProbType); 35 | 36 | int SCIPLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds); 37 | 38 | int SCIPLoadObjective(LinEquation* InEquation, bool Max); 39 | 40 | int SCIPAddConstraint(LinEquation* InEquation); 41 | 42 | #endif -------------------------------------------------------------------------------- /software/mfatoolkit/Linux/SystemParameters.txt: -------------------------------------------------------------------------------- 1 | perl directory|/usr/bin/perl|This is the directory where the perl executable is located. This should be a complete path.|Filenames required for proper program start up 2 | scip executable|../../scip/bin/scip|0|MFA parameters 3 | os|linux|setting the oprating system for the program -------------------------------------------------------------------------------- /software/mfatoolkit/Linux/makefile: -------------------------------------------------------------------------------- 1 | # --------------------------------------------------------------------- 2 | # Directories section 3 | # --------------------------------------------------------------------- 4 | SRCDIR = $(MFATOOLKITDIR)Source 5 | # --------------------------------------------------------------------- 6 | # Compiler section 7 | # --------------------------------------------------------------------- 8 | CCC = g++ 9 | # --------------------------------------------------------------------- 10 | # Compiler options 11 | # --------------------------------------------------------------------- 12 | SRCFILES = $(SRCDIR)/driver.cpp $(SRCDIR)/MFAProblem.cpp $(SRCDIR)/$(CPLEXAPI) $(SRCDIR)/SCIPapi.cpp $(SRCDIR)/GLPKapi.cpp $(SRCDIR)/LINDOapiEMPTY.cpp $(SRCDIR)/SolverInterface.cpp $(SRCDIR)/Species.cpp $(SRCDIR)/Data.cpp $(SRCDIR)/InterfaceFunctions.cpp $(SRCDIR)/Identity.cpp $(SRCDIR)/Reaction.cpp $(SRCDIR)/GlobalFunctions.cpp $(SRCDIR)/AtomCPP.cpp $(SRCDIR)/UtilityFunctions.cpp $(SRCDIR)/AtomType.cpp $(SRCDIR)/Gene.cpp $(SRCDIR)/GeneInterval.cpp $(SRCDIR)/stringDB.cpp 13 | 14 | OBJFILES = $(SRCFILES:.cpp=.o) 15 | 16 | MFATOOLKIT: $(OBJFILES) 17 | $(CCC) $(MFATOOLKITCCFLAGS) -o $(MFATOOLKITDIR)Linux/mfatoolkit $(^) $(MFATOOLKITCCLNFLAGS) 18 | 19 | %.o: %.cpp 20 | $(CCC) $(MFATOOLKITCCFLAGS) -c $<; mv *.o $(SRCDIR) 21 | 22 | clean: 23 | rm -f $(SRCDIR)/*.o $(MFATOOLKITDIR)Linux/mfatoolkit -------------------------------------------------------------------------------- /software/mfatoolkit/Source/CPLEXapiEMPTY.cpp: -------------------------------------------------------------------------------- 1 | #include "MFAToolkit.h" 2 | 3 | int InitializeCPLEXVariables() { 4 | return FAIL; 5 | } 6 | 7 | int CPLEXInitialize() { 8 | return FAIL; 9 | } 10 | 11 | int CPLEXCleanup() { 12 | return FAIL; 13 | } 14 | 15 | int CPLEXClearSolver() { 16 | return FAIL; 17 | } 18 | 19 | int CPLEXPrintFromSolver() { 20 | return FAIL; 21 | } 22 | 23 | OptSolutionData* CPLEXRunSolver(int ProbType) { 24 | return NULL; 25 | } 26 | 27 | int CPLEXLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds) { 28 | return FAIL; 29 | } 30 | 31 | int CPLEXLoadObjective(LinEquation* InEquation, bool Max) { 32 | return FAIL; 33 | } 34 | 35 | int CPLEXAddConstraint(LinEquation* InEquation) { 36 | return FAIL; 37 | } 38 | 39 | int CPLEXDelConstraint(LinEquation* InEquation) { 40 | return FAIL; 41 | } -------------------------------------------------------------------------------- /software/mfatoolkit/Source/GLPKapiEMPTY.cpp: -------------------------------------------------------------------------------- 1 | #include "MFAToolkit.h" 2 | 3 | int InitializeGLPKVariables() { 4 | return FAIL; 5 | } 6 | 7 | int GLPKInitialize() { 8 | return FAIL; 9 | } 10 | 11 | int GLPKCleanup() { 12 | return FAIL; 13 | } 14 | 15 | int GLPKClearSolver() { 16 | return FAIL; 17 | } 18 | 19 | int GLPKPrintFromSolver() { 20 | return FAIL; 21 | } 22 | 23 | OptSolutionData* GLPKRunSolver(int ProbType) { 24 | return NULL; 25 | } 26 | 27 | int GLPKLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds) { 28 | return FAIL; 29 | } 30 | 31 | int GLPKLoadObjective(LinEquation* InEquation, bool Max) { 32 | return FAIL; 33 | } 34 | 35 | int GLPKAddConstraint(LinEquation* InEquation) { 36 | return FAIL; 37 | } 38 | -------------------------------------------------------------------------------- /software/mfatoolkit/Source/LINDOapiEMPTY.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // MFAToolkit: Software for running flux balance analysis on stoichiometric models 3 | // Software developer: Christopher Henry (chenry@mcs.anl.gov), MCS Division, Argonne National Laboratory 4 | // Copyright (C) 2007 Argonne National Laboratory/University of Chicago. All Rights Reserved. 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program. If not, see . 18 | // For more information on MFAToolkit, see . 19 | //////////////////////////////////////////////////////////////////////////////// 20 | 21 | #include "MFAToolkit.h" 22 | 23 | int InitializeLINDOVariables() { 24 | return FAIL; 25 | } 26 | 27 | int LINDOInitialize() { 28 | return FAIL; 29 | } 30 | 31 | int LINDOCleanup() { 32 | return FAIL; 33 | } 34 | 35 | int LINDOClearSolver() { 36 | return FAIL; 37 | } 38 | 39 | int LINDOPrintFromSolver() { 40 | return FAIL; 41 | } 42 | 43 | OptSolutionData* LINDORunSolver(int ProbType) { 44 | return NULL; 45 | } 46 | 47 | int LINDOLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds) { 48 | return FAIL; 49 | } 50 | 51 | int LINDOLoadObjective(LinEquation* InEquation, bool Max) { 52 | return FAIL; 53 | } 54 | 55 | int LINDOAddConstraint(LinEquation* InEquation) { 56 | return FAIL; 57 | } -------------------------------------------------------------------------------- /software/mfatoolkit/Source/SCIPapiEMPTY.cpp: -------------------------------------------------------------------------------- 1 | #include "MFAToolkit.h" 2 | 3 | int InitializeSCIPVariables() { 4 | return FAIL; 5 | } 6 | 7 | int SCIPInitialize() { 8 | return FAIL; 9 | } 10 | 11 | int SCIPCleanup() { 12 | return FAIL; 13 | } 14 | 15 | int SCIPClearSolver() { 16 | return FAIL; 17 | } 18 | 19 | int SCIPPrintFromSolver() { 20 | return FAIL; 21 | } 22 | 23 | OptSolutionData* SCIPRunSolver(int ProbType) { 24 | return NULL; 25 | } 26 | 27 | int SCIPLoadVariables(MFAVariable* InVariable, bool RelaxIntegerVariables,bool UseTightBounds) { 28 | return FAIL; 29 | } 30 | 31 | int SCIPLoadObjective(LinEquation* InEquation, bool Max) { 32 | return FAIL; 33 | } 34 | 35 | int SCIPAddConstraint(LinEquation* InEquation) { 36 | return FAIL; 37 | } -------------------------------------------------------------------------------- /software/mfatoolkit/bin/InputFileList.txt: -------------------------------------------------------------------------------- 1 | SystemParameters.txt 2 | ../Parameters/Defaults.txt 3 | ../Parameters/ProductionMFA.txt -------------------------------------------------------------------------------- /software/mfatoolkit/etc/AtomTypes.txt: -------------------------------------------------------------------------------- 1 | AtomID Mass Valence Expected_bonds 2 | C 12 4 4 3 | H 1 1 1 4 | Ca 40 1 1 5 | Co 59 6 6 6 | Cu 63 2 2 7 | Mo 96 6 6 8 | Fe 56 6 6 9 | N 14 5 35 10 | O 16 6 2 11 | P 31 5 5 12 | R 1 1 1 13 | S 32 6 246 14 | K 39 1 1 15 | Na 23 1 1 16 | Se 79 6 2 17 | X 1 1 1 18 | Ag 108 1 1 19 | As 75 5 35 20 | Cd 112 1 1 21 | Cl 35 7 1 22 | Br 80 7 1 23 | I 127 7 1 24 | F 19 7 1 25 | H+ 1 0 0 26 | Hg 201 1 1 27 | Mg 24 1 1 28 | Mn 55 1 1 29 | Ni 59 1 1 30 | Zn 65 1 1 31 | Si 28 4 4 32 | W 1 0 1 33 | CoA 731 1 1 34 | E 0 7 1 35 | Te 128 1 1 36 | Pb 207 1 1 37 | Pt 195 1 1 38 | Bi 209 1 1 39 | Li 7 1 1 40 | Au 197 1 1 41 | Sn 119 1 1 42 | Sb 122 1 1 43 | V 51 1 1 44 | B 11 1 1 45 | Ge 73 1 1 46 | Al 27 1 1 47 | Gd 157 1 1 48 | Xe 131 1 1 49 | Rb 85 1 1 50 | Ba 137 1 1 51 | Sr 88 1 1 52 | Ru 101 1 1 53 | Tl 204 1 1 54 | Cr 52 1 1 55 | Ti 48 4 34 56 | Rn 222 2 2 57 | Th 232 4 34 58 | -------------------------------------------------------------------------------- /software/mfatoolkit/etc/DefaultCompartments.txt: -------------------------------------------------------------------------------- 1 | Index;Abbrevation;Name;I;pH;Max concentration;Min concentration;DeltaPsiCoef;DeltaPsiConst;default?;Special concentrations 2 | 0;e;extracellular;0;7.5;1;0.0000001;-33.33;143.33;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 3 | 1;c;cytosol;0;7.0;0.02;0.00001;0;0;1;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 4 | 2;p;periplasm;0.25;7;0.02;0.00001;-33.33;143.33;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 5 | 3;n;nucleus;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 6 | 4;m;mitochondrion;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 7 | 5;x;peroxisomal;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 8 | 6;g;golgi apparatus;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 9 | 7;r;endoplasmic reticulum;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 10 | 8;v;vacuole;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 11 | 9;l;lysosome;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 12 | 10;d;plastid;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 13 | 11;w;cell wall;0.25;7;0.02;0.00001;0;0;0;CO2:1e-8:0.0014|H2:1e-8:3.4e-5|O2:1e-8:5.5e-5 -------------------------------------------------------------------------------- /software/mfatoolkit/etc/ReactionDatabase.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelSEED/Model-SEED-core/c40bb3ebf99fb39279d3c0bcad87dfe68bd24b9e/software/mfatoolkit/etc/ReactionDatabase.txt -------------------------------------------------------------------------------- /t/00-load.t: -------------------------------------------------------------------------------- 1 | #!perl -T 2 | 3 | use Test::More tests => 1; 4 | 5 | BEGIN { 6 | use_ok( 'ModelSEED::FIGMODEL' ) || print "Bail out!\n"; 7 | } 8 | 9 | diag( "Testing ModelSeedCore $ModelSEED::FIGMODEL::VERSION, Perl $], $^X" ); 10 | -------------------------------------------------------------------------------- /t/Auth/Basic.t: -------------------------------------------------------------------------------- 1 | # Tests for ModelSEED::Auth::Basic 2 | use strict; 3 | use warnings; 4 | use ModelSEED::Auth::Basic; 5 | use HTTP::Request; 6 | use Test::More; 7 | use Test::Exception; 8 | my $test_count = 0; 9 | # Test initialization 10 | { 11 | my $auth = ModelSEED::Auth::Basic->new( 12 | username => "alice", 13 | password => "password" 14 | ); 15 | ok defined($auth), "Should create object correctly"; 16 | dies_ok { 17 | ModelSEED::Auth::Basic->new(); 18 | } "Should die if no username or password is passed"; 19 | dies_ok { 20 | ModelSEED::Auth::Basic->new(username => "foo"); 21 | } "Should die if no password is passed"; 22 | dies_ok { 23 | ModelSEED::Auth::Basic->new(password => "foo"); 24 | } "Should die if no username is passed"; 25 | 26 | my $auth2 = ModelSEED::Auth::Basic->new({ 27 | username => "alice", 28 | password => "password" 29 | }); 30 | ok defined($auth2), "Should create object correctly with hash"; 31 | ok $auth->does("ModelSEED::Auth"), "Inherits Role"; 32 | $test_count += 6; 33 | } 34 | { 35 | my $req = HTTP::Request->new(); 36 | my $bad_req = {}; # not an HTTP::Request 37 | my $auth = ModelSEED::Auth::Basic->new({ 38 | username => "alice", 39 | password => "password", 40 | }); 41 | dies_ok { $auth->wrap_http_request($bad_req) } 42 | "Passing an object that is not a request should die!"; 43 | ok $auth->wrap_http_request($req), 44 | "Good request should return true"; 45 | ok defined($req->header("Authorization")), 46 | "Request object should have Athorization header now"; 47 | 48 | $test_count += 3; 49 | } 50 | done_testing($test_count); 51 | -------------------------------------------------------------------------------- /t/Auth/Public.t: -------------------------------------------------------------------------------- 1 | # Tests for ModelSEED::Auth::Public 2 | use strict; 3 | use warnings; 4 | use ModelSEED::Auth::Public; 5 | use HTTP::Request; 6 | use Test::More; 7 | use Test::Exception; 8 | my $test_count = 0; 9 | # Test initialization 10 | { 11 | my $auth = ModelSEED::Auth::Public->new(); 12 | ok defined($auth), "Should create object correctly"; 13 | ok $auth->does("ModelSEED::Auth"), "Inherits Role"; 14 | $test_count += 2; 15 | } 16 | { 17 | my $req = HTTP::Request->new(); 18 | my $bad_req = {}; # not an HTTP::Request 19 | my $auth = ModelSEED::Auth::Public->new(); 20 | dies_ok { $auth->wrap_http_request($bad_req) } 21 | "Passing an object that is not a request should die!"; 22 | ok $auth->wrap_http_request($req), 23 | "Good request should return true"; 24 | $test_count += 2; 25 | } 26 | done_testing($test_count); 27 | -------------------------------------------------------------------------------- /t/Configuration.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use ModelSEED::Configuration; 4 | use File::Temp qw(tempfile); 5 | use JSON; 6 | use Test::More; 7 | my $testCount = 0; 8 | 9 | my ($fh, $TMPDB) = tempfile(); 10 | my $TESTINI = <new({filename => $temp_cfg_file }); 33 | ok defined($c), "Should create class instance"; 34 | my $j = JSON->new->utf8; 35 | my $data = $j->decode($TESTINI); 36 | is_deeply($c->config, $data, "JSON should go in correctly"); 37 | 38 | TODO: { 39 | local $TODO = "Singleton destructor not working"; 40 | my $d = ModelSEED::Configuration->instance; 41 | is_deeply($d, $c, "Should be singleton class"); 42 | }; 43 | 44 | $testCount += 3; 45 | } 46 | 47 | 48 | done_testing($testCount); 49 | -------------------------------------------------------------------------------- /t/FIGMODEL.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use ModelSEED::TestingHelpers; 4 | use Test::More tests => 3; 5 | 6 | my $helper = ModelSEED::TestingHelpers->new(); 7 | my $fm = $helper->getDebugFIGMODEL(); 8 | 9 | # test authenticate / unathenticate 10 | { 11 | ok $fm->user() eq "PUBLIC", "should return PUBLIC when not logged in"; 12 | $fm->authenticate({ username => "alice", password => "alice"}); 13 | ok $fm->user() eq "alice", "should correctly login as reviewer with authenticate()"; 14 | $fm->logout(); 15 | ok $fm->user() eq "PUBLIC", "should correctly log out with logout() and return PUBLIC as user"; 16 | } 17 | -------------------------------------------------------------------------------- /t/Store.t: -------------------------------------------------------------------------------- 1 | # 2 | #=============================================================================== 3 | # 4 | # FILE: Store.t 5 | # 6 | # DESCRIPTION: Tests for Store.pm 7 | # 8 | # FILES: --- 9 | # BUGS: --- 10 | # NOTES: --- 11 | # AUTHOR: Scott Devoid (), devoid@ci.uchicago.edu 12 | # COMPANY: University of Chicago / Argonne Nat. Lab. 13 | # VERSION: 1.0 14 | # CREATED: 04/30/2012 17:32:46 15 | # REVISION: --- 16 | #=============================================================================== 17 | 18 | use strict; 19 | use warnings; 20 | use ModelSEED::Store; 21 | use ModelSEED::Auth::Basic; 22 | use Test::More tests => 4; # last test to print 23 | 24 | 25 | my $auth = ModelSEED::Auth::Basic->new(username => "bob", password => "password"); 26 | my $store = ModelSEED::Store->new(auth => $auth); 27 | ok defined $store, "Should create class"; 28 | ok defined $store->auth, "Should create auth object"; 29 | 30 | my $bio = $store->create("Biochemistry"); 31 | ok defined $bio, "Should create biochemistry object"; 32 | is $store, $bio->parent(), "Parent of created object should be the store"; 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /t/TestingHelpers.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Test::More tests => 9; 4 | # unit tests for TestingHelpers.pm package, meta-testing ftw 5 | use ModelSEED::TestingHelpers; 6 | use Data::Dumper; 7 | my $modelId = "Seed83333.1"; 8 | 9 | my $helper = ModelSEED::TestingHelpers->new(); 10 | my $debug_one = $helper->getDebugFIGMODEL(); 11 | ok defined($debug_one->config("model directory")->[0]), "getDebugFIGMODEL defines tmp model directory"; 12 | my $debug_two = $helper->newDebugFIGMODEL(); 13 | # Check that we can get a model of type $modelId 14 | my $model_one = $debug_one->get_model($modelId); 15 | my $model_two = $debug_two->get_model($modelId); 16 | ok defined($model_one), "testDatabase (1) should have model $modelId"; 17 | ok defined($model_two), "testDatabase (2) should have model $modelId"; 18 | # Check that we can login with alice and bob 19 | $debug_one->authenticate({username => "alice", password => "alice"}); 20 | $debug_two->authenticate({username => "bob", password => "bob"}); 21 | ok $debug_one->user() eq "alice", "login with alice should work"; 22 | ok $debug_two->user() eq "bob", "login with bob should work"; 23 | # Check that alice can get her model 24 | my $alice_model_one = $debug_one->get_model($modelId.".".$debug_one->userObj()->_id()); 25 | ok defined($alice_model_one), "alice should be able to get her own copy of the model"; 26 | # Check that alice modifying her own model in one doesn't change two 27 | my $alice_model_two = $debug_two->get_model($modelId.".".$debug_one->userObj()->_id()); 28 | $alice_model_one->ppo()->message("foo"); 29 | ok $alice_model_one->ppo()->message() eq "foo", "alice should be able to edit her own model"; 30 | ok $alice_model_two->ppo()->message() ne "foo", "different debug FM's should not interact with eachother's data"; 31 | 32 | my $om = $helper->getDebugCoreApi(); 33 | ok defined $om, "Should get ModelSEED::CoreApi from getDebugCoreApi()"; 34 | -------------------------------------------------------------------------------- /t/boilerplate.t: -------------------------------------------------------------------------------- 1 | #!perl -T 2 | 3 | use 5.006; 4 | use strict; 5 | use warnings; 6 | use Test::More tests => 3; 7 | 8 | sub not_in_file_ok { 9 | my ($filename, %regex) = @_; 10 | open( my $fh, '<', $filename ) 11 | or die "couldn't open $filename for reading: $!"; 12 | 13 | my %violated; 14 | 15 | while (my $line = <$fh>) { 16 | while (my ($desc, $regex) = each %regex) { 17 | if ($line =~ $regex) { 18 | push @{$violated{$desc}||=[]}, $.; 19 | } 20 | } 21 | } 22 | 23 | if (%violated) { 24 | fail("$filename contains boilerplate text"); 25 | diag "$_ appears on lines @{$violated{$_}}" for keys %violated; 26 | } else { 27 | pass("$filename contains no boilerplate text"); 28 | } 29 | } 30 | 31 | sub module_boilerplate_ok { 32 | my ($module) = @_; 33 | not_in_file_ok($module => 34 | 'the great new $MODULENAME' => qr/ - The great new /, 35 | 'boilerplate description' => qr/Quick summary of what the module/, 36 | 'stub function definition' => qr/function[12]/, 37 | ); 38 | } 39 | 40 | TODO: { 41 | local $TODO = "Need to replace the boilerplate text"; 42 | 43 | not_in_file_ok(README => 44 | "The README is used..." => qr/The README is used/, 45 | "'version information here'" => qr/to provide version information/, 46 | ); 47 | 48 | not_in_file_ok(Changes => 49 | "placeholder date/time" => qr(Date/time) 50 | ); 51 | 52 | module_boilerplate_ok('lib/ModelSeedCore.pm'); 53 | 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /t/database/Composite.t: -------------------------------------------------------------------------------- 1 | # Unit tests for composite database interface 2 | use ModelSEED::Database::Composite; 3 | use ModelSEED::Database::MongoDBSimple; 4 | use Test::More; 5 | 6 | my $test_count = 0; 7 | 8 | # Basic object initialization 9 | { 10 | my $file_db_1 = ModelSEED::Database::MongoDBSimple->new(db_name => 'test_1'); 11 | my $file_db_2 = ModelSEED::Database::MongoDBSimple->new(db_name => 'test_1'); 12 | 13 | my $composite = ModelSEED::Database::Composite->new( 14 | databases => [ $file_db_1, $file_db_2 ], 15 | ); 16 | ok defined($composite), "Should create a class instance"; 17 | ok defined($composite->primary), "Should have primary database"; 18 | ok defined($composite->databases), "Should have databases"; 19 | $test_count += 3; 20 | } 21 | 22 | # TODO - actual unit tests 23 | 24 | done_testing($test_count); 25 | -------------------------------------------------------------------------------- /t/figmodel/FIGMODELfba.t: -------------------------------------------------------------------------------- 1 | # 2 | #=============================================================================== 3 | # 4 | # FILE: FIGMODELfba.t 5 | # 6 | # DESCRIPTION: Testing for FIGMODELfba. 7 | # 8 | # FILES: --- 9 | # BUGS: --- 10 | # NOTES: Test for feature of FIGMODELfba 11 | # AUTHOR: Chris Henry (chenry@mcs.anl.gov) 12 | # CREATED: 06/12/11 13 | # REVISION: --- 14 | #=============================================================================== 15 | 16 | use strict; 17 | use warnings; 18 | use Data::Dumper; 19 | use ModelSEED::FIGMODEL; 20 | use ModelSEED::TestingHelpers; 21 | use Test::More tests => 1; 22 | 23 | my $helper = ModelSEED::TestingHelpers->new(); 24 | my $fm = $helper->getDebugFIGMODEL(); 25 | # test general access routines 26 | { 27 | my $public_model = $fm->get_model('Seed83333.1'); 28 | my $fba = $public_model->fba(); 29 | $fba->setFBAStudy(); 30 | $fba->runFBA({ 31 | filename => "FIGMODELfbaTest", 32 | printToScratch => 0, 33 | runSimulation => 0, 34 | nohup => 0, 35 | studyType => "LoadCentralSystem", 36 | logfile => "FIGMODELfbaTest.log", 37 | mediaPrintList => ["ArgonneLBMedia"], 38 | }); 39 | } 40 | ok 1, "yes it passes" 41 | -------------------------------------------------------------------------------- /t/figmodel/FIGMODELgenome.t: -------------------------------------------------------------------------------- 1 | # 2 | #=============================================================================== 3 | # 4 | # FILE: FIGMODELgenome.t 5 | # 6 | # DESCRIPTION: Testing for FIGMODELgenome. 7 | # 8 | # FILES: --- 9 | # BUGS: --- 10 | # NOTES: --- 11 | # AUTHOR: Christopher Henry (chenry@mcs.anl.gov) 12 | # CREATED: 09/25/11 13 | # REVISION: --- 14 | #=============================================================================== 15 | 16 | use strict; 17 | use warnings; 18 | use Data::Dumper; 19 | use lib $ENV{MODEL_SEED_CORE}."/config/"; 20 | use ModelSEEDbootstrap; 21 | use ModelSEED::FIGMODEL; 22 | use ModelSEED::TestingHelpers; 23 | use Test::More tests => 2; 24 | use File::Temp qw(tempfile); 25 | 26 | my $helper = ModelSEED::TestingHelpers->new(); 27 | my $fm = $helper->getDebugFIGMODEL(); 28 | 29 | #Testing ability to remotely access RAST genomes 30 | { 31 | $fm->authenticate({ 32 | username => "reviewer", 33 | password => "reviewer" 34 | }); 35 | my $genome = $fm->get_genome("315750.3"); 36 | ok defined($genome), "Could not obtain RAST genome 315750.3!"; 37 | my $ftrTbl = $genome->feature_table(); 38 | ok defined($ftrTbl) && $ftrTbl->size() > 1000, "Could not obtain features for RAST genome 315750.3!"; 39 | } 40 | -------------------------------------------------------------------------------- /t/manifest.t: -------------------------------------------------------------------------------- 1 | #!perl -T 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | unless ( $ENV{RELEASE_TESTING} ) { 8 | plan( skip_all => "Author tests not required for installation" ); 9 | } 10 | 11 | eval "use Test::CheckManifest 0.9"; 12 | plan skip_all => "Test::CheckManifest 0.9 required" if $@; 13 | ok_manifest(); 14 | -------------------------------------------------------------------------------- /t/ms/Compartment.t: -------------------------------------------------------------------------------- 1 | # Tests for Compartment object 2 | use Test::More; 3 | use ModelSEED::MS::Compartment; 4 | my $testCount = 0; 5 | 6 | # Test basic initialization with raw data 7 | { 8 | my $d1 = { id => 'c', name => 'Cytosol' }; 9 | my $d2 = { id => 'e', name => 'Extracellular', locked => 1 }; 10 | $o1 = ModelSEED::MS::Compartment->new($d1); 11 | $o2 = ModelSEED::MS::Compartment->new($d2); 12 | ok defined($o1), "Should get object back"; 13 | ok defined($o2), "Should get object back"; 14 | is $o1->id, $d1->{id}, "Should have same id."; 15 | is $o1->name, $d1->{name}, "Should have same name."; 16 | is $o1->locked, 0, "Should not be locked"; 17 | is $o2->id, $d2->{id}, "Should have same id."; 18 | is $o2->name, $d2->{name}, "Should have same name."; 19 | is $o2->locked, 1, "Should be locked"; 20 | ok defined($o1->uuid), "should have uuid if we want it."; 21 | ok defined($o2->uuid), "should have uuid if we want it."; 22 | ok defined($o1->modDate), "should have modDate if we want it."; 23 | $testCount += 11; 24 | } 25 | 26 | 27 | done_testing($testCount); 28 | 29 | -------------------------------------------------------------------------------- /t/pod-coverage.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Test::More; 4 | 5 | # Ensure a recent version of Test::Pod::Coverage 6 | my $min_tpc = 1.08; 7 | eval "use Test::Pod::Coverage $min_tpc"; 8 | plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" 9 | if $@; 10 | 11 | # Test::Pod::Coverage doesn't require a minimum Pod::Coverage version, 12 | # but older versions don't recognize some common documentation styles 13 | my $min_pc = 0.18; 14 | eval "use Pod::Coverage $min_pc"; 15 | plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" 16 | if $@; 17 | 18 | all_pod_coverage_ok(); 19 | -------------------------------------------------------------------------------- /t/pod.t: -------------------------------------------------------------------------------- 1 | #!perl -T 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | # Ensure a recent version of Test::Pod 8 | my $min_tp = 1.22; 9 | eval "use Test::Pod $min_tp"; 10 | plan skip_all => "Test::Pod $min_tp required for testing POD" if $@; 11 | 12 | all_pod_files_ok(); 13 | -------------------------------------------------------------------------------- /t/require.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use lib 'lib'; 4 | use Test::More; 5 | use Module::Pluggable search_path => ['ModelSEED']; 6 | 7 | # Test for compliation errors in all plugins under ModelSEED. 8 | require_ok($_) for __PACKAGE__->plugins; 9 | done_testing(scalar(__PACKAGE__->plugins)); 10 | --------------------------------------------------------------------------------