Input Mapping File¶
The input mapping .csv lists 86 essential parameters in columns and (indepdendent) selection experiments in rows. Here is an example of mapping file with two independent experiments.
| selected_function | protocol | seed | exp_id | overwrite_plate | passage_overwrite_plate | output_dir | save_function | save_composition | save_plate | function_lograte | composition_lograte | scale | n_inoc | rich_medium | monoculture | dilution | n_wells | n_propagation | n_transfer | n_transfer_selection | metacommunity_sampling | power_alpha | lognormal_mean | lognormal_sd | phi_distribution | phi_mean | phi_sd | phi_lower | phi_upper | ruggedness | function_ratio | binary_threshold | g0 | cost_distribution | cost_mean | cost_sd | cost_lower | cost_upper | invader_index | invader_sampling | invader_strength | target_resource | directed_selection | knock_out | knock_in | knock_in_threshold | bottleneck | bottleneck_size | migration | n_migration | s_migration | coalescence | frac_coalescence | resource_shift | r_type | r_percent | sampling | sn | sf | Sgen | rn | rf | R0_food | food | supply | muc | sigc | c0 | c1 | q | sparsity | fs | fw | g | w | l | m | n | response | sigma_max | regulation | nreg | tau | r | S |
| f1_additive | simple_screening | 1 | f1_additive-simple_screening-1 | NA | False | /home/cc2553/project/community-selection/data/independent_f1_additive/ | True | True | False | 1 | 20 | 1000000 | 1e+06 | TRUE | False | 0.001 | 96 | 1 | 40 | 20 | Power | 0.01 | 8 | 8 | Norm | 0 | 1 | 0 | 1 | NA | 1 | 1 | 1 | Norm | 0 | 0 | 0 | 1 | 2 | Gamma | 10 | NA | False | False | False | NA | False | NA | False | 1000000 | NA | False | NA | False | NA | NA | Binary_Gamma | 2100 | 1 | 0 | 90 | 1 | 1000 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | 0 | 0 | NA | type III | 1 | NA | NA | NA | NA | NA |
| f1_additive | simple_screening | 1 | f1_additive-monoculture-1 | NA | False | /home/cc2553/project/community-selection/data/independent_f1_additive/ | True | True | False | 1 | 20 | 1000000 | 1e+06 | TRUE | True | 0.001 | 96 | 1 | 40 | 20 | Power | 0.01 | 8 | 8 | Norm | 0 | 1 | 0 | 1 | NA | 1 | 1 | 1 | Norm | 0 | 0 | 0 | 1 | 2 | Gamma | 10 | NA | False | False | False | NA | False | NA | False | 1000000 | NA | False | NA | False | NA | NA | Binary_Gamma | 2100 | 1 | 0 | 90 | 1 | 1000 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | 0 | 0 | NA | type III | 1 | NA | NA | NA | NA | NA |
The mapping file has five categories of parameters:
File operation¶
-
selected_function¶ Type: string Default: f1_additiveFunction under selection. Available options are
f1_additiveandf2_interaction,f2a_interaction,f3_additive_binary,f4_interaction_binary,f5_invader_growth, andresource_distance_community_function.
-
protocol¶ Type: string Default: simple_screeningProtocol to implement. Only the protocols listed in
E_protocols.pycan be used.
-
seed¶ Type: integer Default: 1Random seed to initiate pseudorandom number generator.
-
exp_id¶ Type: string Default: f1_additive-simple_screening-1Experiment-specific ID, which will also determine the naming convention of output files. For example, the community function is saved in
f1_additive-simple_screening-1_function.txtifsave_function=True, whereas community compostition is saved inf1_additive-simple_screening-1_compostition.txtifsave_composition=True.
-
overwrite_plate¶ Type: string Default: NATo replace the initial plate composition with an arbitrary plate, specify a text file of the community composition that containes four columns: Type, ID, Well, and Abundance. If an output text file (e.g.,
f1_additive-simple_screening-1_compostition.txt) is specified and it contains composition for more than two transfers, by default only the metacommunity compostition of the latter tranfer is read.
-
passage_overwrite_plate¶ Type: boolean Default: FalseIf overwrite_plate != NA, set TRUE if the community from overwrite_plate is at equilibrium and need an addititonal transfer.
-
output_dir¶ Type: string Default: data/Directory where the output files will be stored.
-
save_function¶ Type: boolean Default: TrueSet True to save function data.
-
save_composition¶ Type: boolean Default: TrueSet
Trueto save composition data.
-
save_plate¶ Type: boolean Default: FalseSet
Trueto save initial Metacommunity in apicklefile.
-
function_lograte¶ Type: integer Default: 1How often you save the function in transfers. Default is saving functional data from every transfer.
-
composition_lograte¶ Type: integer Default: 20How often do you save the composition in transfers.
Protocol-specific parameters¶
-
scale¶ Type: integer Default: 1000000Number of cells equivalent to \(N_i = 1\).
-
n_inoc¶ Type: integer Default: 1000000Number of cells in the initial inoculum.
-
rich_medium¶ Type: boolean Default: TrueSet
Trueto generate a rich medium sampled from an uniform distribution. SetFalseto generate a minimal medium with only the first resource is supplied.
-
monoculture¶ Type: boolean Default: FalseSet
Trueto run simple screening with all monocultures from the regional species pool. The number of wells is equal to the number of species in the regional pool.
-
dilution¶ Type: float Default: 0.001Dilution factor in the batch culture.
-
n_wells¶ Type: integer Default: 96Number of wells (communities) in a plate (metacommunity).
-
n_propagation¶ Type: float Default: 1Incubation time of a transfer.
-
n_transfer¶ Type: integer Default: 40Number of total transfers (generations) to be run in the protocol.
-
n_transfer_selection¶ Type: interger Default: 20Number of transfers (generations) that consecutively executes selection matrices from the start of an experiment. The number of stabilizaiton transfer equals to the difference between
n_transfer_totalandn_transfer_selection.
-
metacommunity_sampling¶ Type: string Default: PowerSampling method for initial metacommunity. Available options are
Power,Lognormal,Default.
-
power_alpha¶ Type: float Default: 0.01
-
lognormal_mean¶ Type: float Default: 8
-
lognormal_sd¶ Type: float Default: 8
Species contribution to function¶
-
phi_distribution¶ Type: string Default: Norm{“Norm”, “Uniform”}
-
phi_mean¶ Type: float Default: 0Mean of normal distribution when
phi_distributionis set to Norm
-
phi_sd¶ Type: float Default: 1Standard deviation of normal distribution when
phi_distributionis set to Norm
-
phi_lower¶ Type: float Default: 0Lower boundary of normal distribution when
phi_distributionis set to Unif
-
phi_upper¶ Type: float Default: 1Upper boundary of normal distribution when
phi_distributionis set to Unif
-
ruggedness¶ Type: fload Default: 0.8(1-
ruggedness) of the additive and non-additive per-capita functino will contribute to community function, whereas the rest will be set to 0.
-
binary_threshold¶ Type: float Default: 1Threshold for binary functions.
-
g0¶ Type: float Default: 1The baseline conversion factor of biomass per energy.
-
cost_distribution¶ Type: string Default: Norm{“Gamma”, “Unif”}
-
cost_mean¶ Type: float Default: 0Mean fraction of cost feeded normal distribution. Suggested maximum to 0.05.
-
cost_sd¶ Type: float Default: 0Standard deviation of fraction of cost feeded into a gamma distribution.
cost_sd = 0ifcost_mean = 0,cost_sd = 0.01ifcost_mean > 0.
-
cost_lower¶ Type: float Default: 0Lower bound for cost if
cost_distributionis set to Uniform
-
cost_upper¶ Type: float Default: 1Upper bound for cost if
cost_distributionis set to Uniform
-
invader_index¶ Type: integer Default: 2Index of an invader. Only one index is choosen. Currently a invasive community is not allowed.
-
invader_sampling¶ Type: string Default: GammaSampling algorithm to generate the invader uptake rate vector. Options are
Gaussian,Binary,Gamma,Binary_Gamma.
-
invader_strength¶ Type: positive float Default: 10Mean utiliration vector for the invader versus the average of the species in the pool
-
target_resource¶ Type: integer Default: NATarget resource production when
selected_functionis set tof6_target_resourece
Directed evolution¶
-
directed_selection¶ Type: boolean Default: FalseSet
Trueto run directed selection, one of flags below in directed evolution has to be also setTrue.
-
knock_out¶ Type: boolean Default: FalseSet
Trueto perform knock out pertubation.
-
knock_in¶ Type: boolean Default: FSet
Trueperforms knock in pertubation.
-
knock_in_threshold¶ Type: float Default: 0.95If
knock_in = True, use the defaultknock_in_threshold=0.95, which means that top 5% species in the pool is prepared to be knocked in a community, whereas the rest 95% of are not used.
-
bottleneck¶ Type: boolean Default: FalseSet
Trueto perform bottleneck pertubations.
-
bottleneck_size¶ Type: float Default: 0.00001If
bottleneck=T, perform an bottleneck shock to the specified communities by a dilution factor default tobottleneck_size=0.00001. This bottleneck dilutoon is in addition to the regular dilution factor in the batch culturedilution=0.001.
-
migration¶ Type: boolean Default: FalseSet
Trueto perform migration pertubations.
-
n_migration¶ Type: integer Default: 1000000Number of cells in the migrant community.
-
s_migration¶ Type: integer Default: NANumber of species in the migrant community. If
NA(as default), the migrant community is sampled from a regional pool where the species abundance follows power-law distribution. If set into an integer,n_migrationcells will be equally allocated tos_migrationsspecies from the pool to build the migrant community.
-
coalescence¶ Type: boolean Default: FalseSet
Trueto perform coalescence pertubation.
-
f_coalescence¶ Type: float Default: 0.5Between 0 and 1. Fraction of migrant community during coalescence. The fraction of a perturbed community is
1-f_coalescence.
-
resource_shift¶ Type: boolean Default: FalseSet
Trueperforms resource pertubations.
-
r_type¶ Type: string Default: addType of resource pertubation. Available options are
rescale_add,rescale_remove,add,remove,old. A fractionr_percentof resource A is removed, and that amount of resource is added to another resource B.
-
r_percent¶ Type: float Default: 1Fraction of specified resource that is removed.
r_percent=1means all resource A is removed.
Community-simulator parameters¶
The parameters in this section are inherited and some with differnt values from community-simulator.
-
sampling¶ Type: string Default: Binary_GammaSpecify choice of sampling algorithm to generate the consumer uptake rate vector. Options are
Gaussian,Binary,Gamma,Binary_Gamma.
-
sn¶ Type: integer Default: 2100Number of microbial species in the global pool.
-
sf¶ Type: integer Default: 1Number of specialist family.
-
s_gen¶ Type: integer Default: 0Number/Richness of generalist taxa.
-
rn¶ Type: integer Default: 90Number of resource types.
-
rf¶ Type: integer Default: 1Number of resource classes.
-
R0_food¶ Type: float Default: 1000Total resource abundance.
-
food¶ Type: float Default: 1000Index of food source being supplied in the minimal medium. Only works when
rich_medium=False.
-
supply¶ Type: string Default: offChoice of intrinsic resoruce dynamics. Set
offfor batch culture where resource is not renewing within a transfer.
-
muc¶ Type: float Default: 10Mean sum over a row of the preference matrix ciα.
-
sigc¶ Type: float Default: 3Standard deviation of sum over a row of the preference matrix ciα.
-
c0¶ Type: float Default: 0Low consumption level for binary ciα.
-
c1¶ Type: integer Default: 1:High consumption level for binary ciα.
-
q¶ Type: float Default: 0Fraction of consumption capacity allocated to preferred resource class.
-
sparsity¶ Type: float Default: 0.2Sparsity of metabolic matrix.
-
fs¶ Type: float Default: 0.45Fraction of secreted byproducts allocated to the same resource class.
-
fw¶ Type: float Default: 0.45Fraction of secreted byproducts allocated to waste resource class.
-
g¶ Type: float Default: 1Conversion factor from energy uptake to growth rate (1/energy).
-
w¶ Type: float Default: 1Energy content of resource α (energy/mass).
-
l¶ Type: float Default: 0Leakage fraction.
-
m¶ Type: float Default: 0Minimal energy uptake for maintenance of species i (energy/time). Mortality.
-
n¶ Type: integer Default: 2Hill coefficient for functional response (unitless).
-
response¶ Type: string Default: type IIIFunctional response of uptaking rates.
-
sigma_max¶ Type: float Default: 1Maximum input flux (mass/time) for type III functional response.
-
regulation¶ Type: string Default: independentMetabolic regulation.
-
nreg¶ Type: integer Default: 10Hill coefficient that tunes steepness of metabolic regulation.
-
tau¶ Type: float Default: 1External resource supply rate when
supply="external"for chemostat setting.
-
r¶ Type: string Default: independentRenewal rate for self renewing resources when
supply="self-renewing"for chemostat setting.