|
1 | 1 | import logging |
2 | 2 | import os |
3 | | -from typing import Union |
| 3 | +from typing import Tuple, Union |
4 | 4 |
|
5 | 5 | import pandas as pd |
6 | 6 | import synapseclient |
@@ -175,7 +175,18 @@ def process_steps(self, cnaDf, newPath): |
175 | 175 | self.syn.store(synapseclient.File(newPath, parent=centerMafSynId)) |
176 | 176 | return newPath |
177 | 177 |
|
178 | | - def _validate(self, cnvDF, skip_database_checks): |
| 178 | + def _validate(self, cnvDF: pd.DataFrame, skip_database_checks: bool) -> Tuple: |
| 179 | + """ |
| 180 | + Validates the values of the input cna file |
| 181 | +
|
| 182 | + Args: |
| 183 | + cnvDF (pd.DataFrame): input CNA file |
| 184 | + skip_database_checks (bool): Whether to skip this validation check |
| 185 | + since it requires access to the internal clinical sample database |
| 186 | +
|
| 187 | + Returns: |
| 188 | + Tuple: complete error and warning messages |
| 189 | + """ |
179 | 190 | total_error = "" |
180 | 191 | warning = "" |
181 | 192 | cnvDF.columns = [col.upper() for col in cnvDF.columns] |
@@ -230,14 +241,16 @@ def validate_no_dup_symbols_after_remapping( |
230 | 241 | self, cnvDF: pd.DataFrame, skip_database_checks: bool |
231 | 242 | ) -> str: |
232 | 243 | """Validates that there are no duplicated Hugo_Symbol values |
233 | | - after remapping the previous Hugo_Symbol column using the |
234 | | - gene symv |
| 244 | + after remapping the previous Hugo_Symbol column using the |
| 245 | + bed database table. See validateSymbol for more details |
| 246 | + on the remapping method. |
235 | 247 |
|
236 | 248 | Args: |
237 | | - skip_database_checks (bool): _description_ |
| 249 | + skip_database_checks (bool): Whether to skip this validation check |
| 250 | + since it requires access to the internal bed database |
238 | 251 |
|
239 | 252 | Returns: |
240 | | - str: _description_ |
| 253 | + str: error message |
241 | 254 | """ |
242 | 255 | error = "" |
243 | 256 | if not skip_database_checks: |
|
0 commit comments