-
Notifications
You must be signed in to change notification settings - Fork 11
Command Line Interface
For the ModelSeed's command line interface, there are four major commands that are available:
-
mseed
for configuring the system and accessing data objects. -
mdl
for interacting with model objects. -
bio
for interacting with biochemistry objects. -
fba
for interacting with the output of flux balance / variability analysis runs.
These commands are called with sub-commands that group together
relevant functionality. So mdl
has sub-commands that relate to
models while bio
has sub-commands that relate to the biochemistry.
$ mdl <command> [model-id] [options]
model-id is optional and specifies which model to run command
with. mdl
will default to the model selected in your workspace---set
your workspace model with ws model [model-id]
. You may also pipe
in a model from standard input:
$ mseed get model/model-id | mdl <command>
command is required and may be one of:
-
info
prints general information about the model. By default it prints out information in a more readable format. That may not be suitable for your needs so there are a variety of formatting options:-v[erbose] Print detailed information -r[aw] Print raw JSON (implies -v) -t[able] Print as tab-delimited table -h[eader] Print as tab-delimited table with header row -i[d] Print the current reference id for this model -w[orkspace] Print output to current workspace -f[ile] f Print output to named file 'f'
So the following two commands will produce the same output:
$ mdl info -v tutorial/iJR904 $ mseed get model tutorial/iJR904
-
genome
returns the genome object associated with this model. If no genome is associated with the model, this command returns nothing. Note that this takes the same arguments as$ genome info
but by default prints with the[-r]
raw output. This makes piping betweenmdl
andgenome
commands simple:$ mdl genome tutorial/iJR904 | genome taxonomyId 83333
-
annotations
returns the annotations object associated with this model. This behaves like themdl genome
command and may be piped to theann
command. -
biochemistry
returns the biochemistry object associated with this model. This behaves like themdl genome
command and may be piped to thebio
command. -
mapping
returns the mapping object associated with this model. This behaves like themdl genome
command and may be piped to themap
command. -
fba
starts a flux balance analysis on the model. There are a variety of configuration options for this. These may be supplied in an options-file or as command line parameters. Output from this function behaves like themdl genome
command and may be piped to thefba
command for further analysis. -
check-growth
-
gapfill
starts an algorithm to gapfill the model. Configuration options may be supplied with a configuration-file or as command line parameters. -
fva
-
validate
-
diff
-
patch
-
readable
converts the model to a human readable format. By default this function prints to standard output. There are options for printing:-[t]ype <format> # specify the format, currently only 'text' -[f]ile f # print output to named file -[w]orkspace # print output to workspace
-
unreadable
converts a model from the human readable format back to the format used in the ModelSeed system.
$ mseed [ -s session ] # start a ModelSeed session
$ mseed config # change configuration parameters
$ mseed login <username> # login as authenticated user
$ mseed logout
$ mseed list # list available types
$ mseed list models # list / query available models
$ mseed list biochem # list / query available biochemistries
$ mseed list mappings # list / query available mappings
$ mseed list genomes # list / query available genomes
$ mseed get model/name # then get the raw objects
$ mseed stores -v # list available stores
$ mseed stores add <name> ... # add a store to the set
$ mseed stores remove <name> # remove a store
$ mseed stores prioritize <name> <name> ...
Basic informational commands:
$ mdl info [id] # print basic info on model
$ mdl genome [id] # get raw genome object
$ mdl annotations [id] # get raw annotation object
$ mdl biochemistry [id] # get raw biochemistry object
$ mdl list reactions # list model reactions
Model analysis and flux-balance commands:
$ mdl gapfill [id] [config] # run gapfilling algorithm
$ mdl fba # run flux balance analysis
$ mdl fva # run flux-variability analysis
$ mdl check-growth # simply check growth ("mdl fba" wrapper)
Model comparison commands:
$ mdl diff # produce human-readable diff
$ mdl diff -p # produce diff suitable for mdl-patch
$ mdl patch -f patchFile # apply changes to model
Model human-readable file commands:
$ mdl readable # convert model to human-readable file
$ mdl unreadable # convert readable file to model
Basic informational commands:
$ bio info # print basic information about biochemistry
$ bio media # print media refs
$ bio list media
$ bio list compounds
Biochemistry import and validation:
$ bio import -r <file> -c <file> -m <file>
$ bio validate # validates biochemistry is suitable
Biochemistry comparison commands:
$ bio diff # produce human-readable diff
$ bio diff -p # produce diff suitable for bio-patch
$ bio patch -f patchFile # apply changes to biochemistry
Biochemistry human-readable file commands:
$ mdl readable
$ mdl unreadable
List all top level object types in Model SEED:
>> mseed list
biochems (3)
models (10)
mappings (1)
annotations (8)
List all models:
>> mseed list models
chenry/Seed83333.1
public/iJR904
...
List all media in the biochemistry currently selected in the environment:
>> mseed list biochem/media
biochem/chenry/main/media/LB
biochem/chenry/main/media/GlucoseMinimal
biochem/chenry/main/media/NMS
...
List all media in the specific biochemistry "chenry/main":
>> mseed list biochem/chenry/main/media
biochem/chenry/main/media/LB
biochem/chenry/main/media/GlucoseMinimal
biochem/chenry/main/media/NMS
...
List all sub-entities of the biochemistry entity:
>> mseed list biochem/
media (200)
reactions (10,134)
compounds (12,439)
compartments (10)
...