2.1.1.1. wc_kb_gen.random package

2.1.1.1.1. Submodules

2.1.1.1.2. wc_kb_gen.random.compartments module

Author

Bilal Shaikh <bilal.shaikh@columbia.edu>

::Date: 2018-07-19 :Copyright: 2018, Karr Lab :License: MIT

class wc_kb_gen.random.compartments.CompartmentsGenerator(knowledge_base, options=None)[source]

Bases: wc_kb_gen.core.KbComponentGenerator

Creates compartments for the knowledge base from the provided list of compartment ids and names.At least two compartments, with ids(names) ‘c’ (cytosol) and ‘e’ (extracellular), must be created.

Options: * compartments (list) a list of (tuple) of type (string, string) that contain the id and name of the compartment.

clean_and_validate_options()[source]

Apply default options and validate options

gen_components()[source]

Construct knowledge base components

2.1.1.1.3. wc_kb_gen.random.complex module

Author

Ashwin Srinivasan <ashwins@mit.edu>

:Author Bilal Shaikh <bilal.shaikh@columbia.edu> ::Date: 2018-08-02 :Copyright: 2018, Karr Lab :License: MIT

class wc_kb_gen.random.complex.ComplexGenerator(knowledge_base, options=None)[source]

Bases: wc_kb_gen.core.KbComponentGenerator

Creates ComplexSpeciesType objects for ribosomes (and any other complexes that user specifies in assigned_complexes).

Options:
  • assigned_complexes (list): A list of the names of complexes to be created

clean_and_validate_options()[source]

Apply default options and validate options

gen_components()[source]

Creates complex objects based on assigned complexes list

2.1.1.1.4. wc_kb_gen.random.core module

Generator for KBs for random in silico organisms

Author

Jonathan Karr <karr@mssm.edu>

Date

2018-06-11

Copyright

2018, Karr Lab

License

MIT

class wc_kb_gen.random.core.RandomKbGenerator(component_generators=None, options=None)[source]

Bases: wc_kb_gen.core.KbGenerator

Generator for KBs for random in silico organisms

  • Circular chromosome

Options:

  • id

  • version

  • component

    • GenomeGenerator

    • MetabolitesGenerator

    • PropertiesGenerator

DEFAULT_COMPONENT_GENERATORS = (<class 'wc_kb_gen.random.properties.PropertiesGenerator'>, <class 'wc_kb_gen.random.compartments.CompartmentsGenerator'>, <class 'wc_kb_gen.random.genome.GenomeGenerator'>, <class 'wc_kb_gen.random.metabolites.MetabolitesGenerator'>, <class 'wc_kb_gen.random.complex.ComplexGenerator'>, <class 'wc_kb_gen.random.observables.ObservablesGenerator'>)[source]
clean_and_validate_options()[source]

Apply default options and validate options

run()[source]

Generate a knowledge base of experimental data for a whole-cell model

Returns

knowledge base

Return type

wc_kb.KnowledgeBase

2.1.1.1.5. wc_kb_gen.random.genome module

Author

Ashwin Srinivasan <ashwins@mit.edu>

Author

Bilal Shaikh <bilal.shaikh@columbia.edu>

Author

Balazs Szigeti <balazs.szigeti@mssm.edu>

Date

2018-06-06

Copyright

2018, Karr Lab

License

MIT

class wc_kb_gen.random.genome.GenomeGenerator(knowledge_base, options=None)[source]

Bases: wc_kb_gen.core.KbComponentGenerator

Generate synthetic chromosome with randomized genes/intergenic regions. Creates RNA and protein objects corresponding to the genes this chromosome. Associates the chromosome, RNAs, proteins with a knowledge base object (and its Cell attribute).

Options:

  • num_chromosomes (int): number of chromosomes

  • mean_gc_frac (float): fraction of nucleotides which are G or C

  • num_genes (float): mean number of genes

  • mean_gene_len (float): mean codon length of a gene

  • mean_coding_frac (float): mean coding fraction of the genome

  • translation_table (int): The NCBI standard genetic code used

  • num_ncRNA (float): The proportion of non coding RNAs

  • num_rRNA (float): The proportion of ribosomal RNAs

  • tRNA_prop (float): The proportion of transfer RNAs

  • five_prime_len (int): Average 5’ UTR length for transcription units

  • three_prime_len (int): Average 3’ UTR length for transcription units

  • operon_prop (float): Proportion of genes that should be in an operon (polycistronic mRNA)

  • operon_gen_num (int): Average number of genes in an operon

  • mean_copy_number (float): mean copy number of each RNA

  • mean_half_life (float): mean half-life of RNAs

  • genetic_code (str): ‘normal’ / ‘reduced’, if reduced only ‘I’: [‘ATC’], ‘L’: [‘CTG’],

    ‘M’: [‘ATG’], ‘T’: [‘ACG’] codons in genome

  • seq_path (str): path to save genome sequence

clean_and_validate_options()[source]

Apply default options and validate options

gen_components()[source]

Construct knowledge base components

gen_concentrations()[source]

Creates the concentration objects of RNA and protein objects

gen_genome()[source]

Construct knowledge base components and generate the DNA sequence

gen_rnas_proteins()[source]

Creates RNA and protein objects corresponding to genes on chromosome.

gen_tus()[source]

Creates transcription units with 5’/3’ UTRs, polycistronic mRNAs, and other types of RNA (tRNA, rRNA, sRNA)

rand(mean, count=1, min=0, max=inf)[source]

Generated 1 or more random normally distributed integer(s) with standard deviation equal to the square root of the mean value.

Parameters
  • mean (float) – mean value

  • count (int) – number of random numbers to generate

Returns

random normally distributed integer(s)

Return type

int or numpy.ndarray of int

reduce_model()[source]

2.1.1.1.6. wc_kb_gen.random.metabolites module

Generator for metabolites of random in silico organisms

Author

Jonathan Karr <karr@mssm.edu>

Date

2018-06-11

Copyright

2018, Karr Lab

License

MIT

class wc_kb_gen.random.metabolites.MetabolitesGenerator(knowledge_base, options=None)[source]

Bases: wc_kb_gen.core.KbComponentGenerator

Generator for metabolites for random in silico organisms

Options:

  • data_path: path to CSV file with metabolite ids, name, InChI-encoded structures, and intracellular concentrations

clean_and_validate_options()[source]

Apply default options and validate options

gen_components()[source]

Construct knowledge base components

get_data()[source]

Get data for knowledge base components

2.1.1.1.7. wc_kb_gen.random.observables module

Author

Bilal Shaikh <bilal.shaikh@columbia.edu> Ashwin Srinivasan <ashwins@mit.edu>

::Date: 2018-07-19 :Copyright: 2018, Karr Lab :License: MIT

class wc_kb_gen.random.observables.ObservablesGenerator(knowledge_base, options=None)[source]

Bases: wc_kb_gen.core.KbComponentGenerator

Creates observable objects for proteins and tRNAs and complexes that are assigned to specific functions. Adds these observables to the knowledge base.

Options:
  • assigned_trnas (list): A list of the names of trnas to be created

  • assigned_proteins (list): A list of the names of proteins to be created

  • assigned_complexes (list): A list of the names of complexes to be created

clean_and_validate_options()[source]

Apply default options and validate options

gen_components()[source]

Takes random samples of the generated rnas and proteins and assigns them functions based on the included list of proteins and rnas

2.1.1.1.8. wc_kb_gen.random.properties module

Generator for properties

Author

Jonathan Karr <karr@mssm.edu>

Date

2018-06-12

Copyright

2018, Karr Lab

License

MIT

class wc_kb_gen.random.properties.PropertiesGenerator(knowledge_base, options=None)[source]

Bases: wc_kb_gen.core.KbComponentGenerator

Generator for other properties for random in silico organisms

Options:

  • mean_volume (float): mean volume in L

  • mean_doubling_time (float): mean doubling time in s

clean_and_validate_options()[source]

Apply default options and validate options

gen_components()[source]

Construct knowledge base components

2.1.1.1.9. Module contents