Parameters
Parameter classes.
AssayParams
Bases: BaseModel
Parameters for assay generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
baseline
|
float
|
Baseline reading value |
1.0
|
degrade
|
float
|
Rate at which sample responses decrease per day after first day (0..1) |
0.05
|
delay
|
int
|
Maximum number of days between specimen collection and assay |
5
|
mutant
|
float
|
Mutant reading value (must be positive) |
5.0
|
rel_stdev
|
float
|
Relative standard deviation in readings |
0.2
|
plate_size
|
int
|
Size of assay plate (must be positive) |
4
|
image_noise
|
int
|
Plate image noise (grayscale 0-255) |
32
|
p_duplicate_assay
|
float
|
Probably that an assay is repeated |
0.05
|
Source code in src/snailz/parameters.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
validate_fields()
Validate requirements on fields.
Source code in src/snailz/parameters.py
59 60 61 62 63 64 |
|
MachineParams
Bases: BaseModel
Parameters for machine generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number
|
int
|
Number of machines |
5
|
variation
|
float
|
Camera variation |
0.15
|
Source code in src/snailz/parameters.py
67 68 69 70 71 72 73 |
|
PersonParams
Bases: BaseModel
Parameters for people generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
locale
|
str
|
Locale for names |
'et_EE'
|
number
|
int
|
Number of people |
5
|
Source code in src/snailz/parameters.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
validate_fields(v)
Validate that the locale is available in faker.
Source code in src/snailz/parameters.py
84 85 86 87 88 89 |
|
SpecimenParams
Bases: BaseModel
Parameters for specimen generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prob_species
|
list[float]
|
Proability of each species (first is mutatable) |
[0.6, 0.4]
|
mean_masses
|
list[float]
|
Mean mass for each species |
[10.0, 20.0]
|
genome_length
|
int
|
Length of specimen genomes |
20
|
start_date
|
date
|
Start date for specimen collection |
datetime.date(2024, 3, 1)
|
mut_mass_scale
|
float
|
Scaling factor for mutant snail mass |
2.0
|
mass_rel_stdev
|
float
|
Relative standard deviation in mass |
0.5
|
max_mutations
|
int
|
Maximum number of mutations in specimens (must be between 0 and length) |
5
|
daily_growth
|
float
|
Mass increase per day |
0.01
|
p_missing_location
|
float
|
Probability that location is missing |
0.05
|
Source code in src/snailz/parameters.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
validate_fields()
Check parameter validity.
Source code in src/snailz/parameters.py
131 132 133 134 135 136 |
|
SurveyParams
Bases: BaseModel
Parameters for survey generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number
|
int
|
Number of surveys |
3
|
size
|
int
|
Survey size |
15
|
start_date
|
date
|
Start date for specimen collection |
datetime.date(2024, 3, 1)
|
max_interval
|
int
|
Maximum interval between samples |
7
|
Source code in src/snailz/parameters.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
ScenarioParams
Bases: BaseModel
Represent all parameters combined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seed
|
int
|
RNG seed |
7493418
|
assay
|
AssayParams
|
parameters for assay generation |
AssayParams(baseline=1.0, degrade=0.05, delay=5, mutant=5.0, rel_stdev=0.2, plate_size=4, image_noise=32, p_duplicate_assay=0.05)
|
machine
|
MachineParams
|
parameters for machine generation |
MachineParams(number=5, variation=0.15)
|
person
|
PersonParams
|
parameters for people generation |
PersonParams(locale='et_EE', number=5)
|
specimen
|
SpecimenParams
|
parameters for specimen generation |
SpecimenParams(prob_species=[0.6, 0.4], mean_masses=[10.0, 20.0], genome_length=20, start_date=datetime.date(2024, 3, 1), mut_mass_scale=2.0, mass_rel_stdev=0.5, max_mutations=5, daily_growth=0.01, p_missing_location=0.05)
|
survey
|
SurveyParams
|
parameters for survey generation |
SurveyParams(number=3, size=15, start_date=datetime.date(2024, 3, 1), max_interval=7)
|
Source code in src/snailz/parameters.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
|