@@ -92,30 +92,106 @@ def __init__(self, projectdir):
92
92
self .pydir = os .path .join (projectdir , "py" )
93
93
94
94
self ._toml_data : dict = self ._read_from_toml ()
95
- self .general = self ._toml_data ["general" ]
96
- self .rnaseq_preprocess = self ._toml_data ["rnaseq_preprocess" ]
97
- self .rna_seq_generation = self ._toml_data ["rna_seq_generation" ]
98
- self .proteomics_analysis = self ._toml_data ["proteomics_analysis" ]
99
- self .merge_xomics = self ._toml_data ["merge_xomics" ]
100
- self .model_creation = self ._toml_data ["model_creation" ]
101
- self .disease_analysis = self ._toml_data ["disease_analysis" ]
102
- self .drug_repurposing = self ._toml_data ["drug_repurposing" ]
103
- self .about = self ._toml_data ["about" ]
104
95
105
- self ._add_date_to_about ()
96
+ self .general : general = self ._get_general ()
97
+ self .rnaseq_preprocess : rnaseq_preprocess = self ._get_rnaseq_preprocess ()
98
+ self .rna_seq_generation : rna_seq_generation = self ._get_rna_seq_generation ()
99
+ self .proteomics_analysis : proteomics_analysis = self ._get_proteomics_analysis ()
100
+ self .merge_xomics : merge_xomics = self ._get_merge_xomics ()
101
+ self .model_creation : model_creation = self ._get_model_creation ()
102
+ self .disease_analysis : disease_analysis = self ._get_disease_analysis ()
103
+ self .drug_repurposing : drug_repurposing = self ._get_drug_repurposing ()
104
+ self .about : about = self ._get_about ()
105
+
106
+ def _get_general (self ) -> general :
107
+ data : general = general (
108
+ taxon_id = self ._toml_data ["general" ]["taxon_id" ],
109
+ context_names = self ._toml_data ["general" ]["context_names" ],
110
+ )
111
+ return data
112
+
113
+ def _get_rnaseq_preprocess (self ) -> rnaseq_preprocess :
114
+ data : rnaseq_preprocess = rnaseq_preprocess (
115
+ create_counts_matrix = self ._toml_data ["rnaseq_preprocess" ]["create_counts_matrix" ],
116
+ gene_format = self ._toml_data ["rnaseq_preprocess" ]["gene_format" ],
117
+ preprocess_mode = self ._toml_data ["rnaseq_preprocess" ]["preprocess_mode" ],
118
+ )
119
+ return data
120
+
121
+ def _get_rna_seq_generation (self ) -> rna_seq_generation :
122
+ data : rna_seq_generation = rna_seq_generation (
123
+ trnaseq_config_file = self ._toml_data ["rna_seq_generation" ]["trnaseq_config_file" ],
124
+ mrnaseq_config_file = self ._toml_data ["rna_seq_generation" ]["mrnaseq_config_file" ],
125
+ technique = self ._toml_data ["rna_seq_generation" ]["technique" ],
126
+ rep_ratio = self ._toml_data ["rna_seq_generation" ]["rep_ratio" ],
127
+ group_ratio = self ._toml_data ["rna_seq_generation" ]["group_ratio" ],
128
+ rep_ratio_h = self ._toml_data ["rna_seq_generation" ]["rep_ratio_h" ],
129
+ group_ratio_h = self ._toml_data ["rna_seq_generation" ]["group_ratio_h" ],
130
+ quantile = self ._toml_data ["rna_seq_generation" ]["quantile" ],
131
+ min_zfpkm = self ._toml_data ["rna_seq_generation" ]["min_zfpkm" ],
132
+ )
133
+ return data
134
+
135
+ def _get_proteomics_analysis (self ) -> proteomics_analysis :
136
+ data : proteomics_analysis = proteomics_analysis (
137
+ proteomics_config_file = self ._toml_data ["proteomics_analysis" ]["proteomics_config_file" ],
138
+ rep_ratio = self ._toml_data ["proteomics_analysis" ]["rep_ratio" ],
139
+ batch_ratio = self ._toml_data ["proteomics_analysis" ]["batch_ratio" ],
140
+ high_rep_ratio = self ._toml_data ["proteomics_analysis" ]["high_rep_ratio" ],
141
+ high_batch_ratio = self ._toml_data ["proteomics_analysis" ]["high_batch_ratio" ],
142
+ quantile = self ._toml_data ["proteomics_analysis" ]["quantile" ],
143
+ )
144
+ return data
145
+
146
+ def _get_merge_xomics (self ) -> merge_xomics :
147
+ data : merge_xomics = merge_xomics (
148
+ expression_requirement = self ._toml_data ["merge_xomics" ]["expression_requirement" ],
149
+ requirement_adjust = self ._toml_data ["merge_xomics" ]["requirement_adjust" ],
150
+ total_rna_weight = self ._toml_data ["merge_xomics" ]["total_rna_weight" ],
151
+ mrna_weight = self ._toml_data ["merge_xomics" ]["mrna_weight" ],
152
+ single_cell_weight = self ._toml_data ["merge_xomics" ]["single_cell_weight" ],
153
+ proteomics_weight = self ._toml_data ["merge_xomics" ]["proteomics_weight" ],
154
+ )
155
+ return data
156
+
157
+ def _get_model_creation (self ) -> model_creation :
158
+ data : model_creation = model_creation (
159
+ low_threshold = self ._toml_data ["model_creation" ]["low_threshold" ],
160
+ high_threshold = self ._toml_data ["model_creation" ]["high_threshold" ],
161
+ output_filetypes = self ._toml_data ["model_creation" ]["output_filetypes" ],
162
+ objective_dict = self ._toml_data ["model_creation" ]["objective_dict" ],
163
+ general_model_file = self ._toml_data ["model_creation" ]["general_model_file" ],
164
+ solver = self ._toml_data ["model_creation" ]["solver" ],
165
+ boundary_reactions_filename = self ._toml_data ["model_creation" ]["boundary_reactions_filename" ],
166
+ force_reactions_filename = self ._toml_data ["model_creation" ]["force_reactions_filename" ],
167
+ exclude_reactions_filename = self ._toml_data ["model_creation" ]["exclude_reactions_filename" ],
168
+ recon_algorithms = self ._toml_data ["model_creation" ]["recon_algorithms" ],
169
+ )
170
+ return data
171
+
172
+ def _get_disease_analysis (self ) -> disease_analysis :
173
+ data : disease_analysis = disease_analysis (
174
+ data_source = self ._toml_data ["disease_analysis" ]["data_source" ],
175
+ disease_names = self ._toml_data ["disease_analysis" ]["disease_names" ],
176
+ )
177
+ return data
178
+
179
+ def _get_drug_repurposing (self ) -> drug_repurposing :
180
+ data : drug_repurposing = drug_repurposing (
181
+ sovler = self ._toml_data ["drug_repurposing" ]["sovler" ],
182
+ drug_raw_file = self ._toml_data ["drug_repurposing" ]["drug_raw_file" ],
183
+ )
184
+ return data
185
+
186
+ def _get_about (self ) -> about :
187
+ return about ()
106
188
107
189
def _read_from_toml (self ):
108
190
toml_file : str = os .path .join (self .rootdir , "config.toml" )
109
191
with open (toml_file , "rb" ) as i_stream :
110
192
data = tomllib .load (i_stream )
111
193
return data
112
194
113
- def _add_date_to_about (self ):
114
- """
115
- This function will add the current date in the format of "Month Day, Year" to the self.about dictionary
116
- """
117
- self .about ["date" ] = datetime .now ().strftime ("%B %d, %Y" )
118
-
119
195
120
196
current_dir = os .getcwd ()
121
197
directory_list = current_dir .split ("/" )
0 commit comments