Skip to content

Commit a0a0661

Browse files
committed
update docstring
1 parent 5229efd commit a0a0661

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

genie_registry/assay.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Assay information class"""
22

33
import os
4+
from typing import Tuple
45

56
import pandas as pd
67
import yaml
@@ -127,15 +128,19 @@ def _get_dataframe(self, filepath_list):
127128
all_panel_info = pd.concat([all_panel_info, assay_finaldf])
128129
return all_panel_info
129130

130-
def _validate(self, assay_info_df, skip_database_checks):
131+
def _validate(
132+
self, assay_info_df: pd.DataFrame, skip_database_checks: bool
133+
) -> Tuple[str, str]:
131134
"""
132135
Validates the values of assay information file
133136
134137
Args:
135-
assay_info_df: assay information dataframe
138+
assay_info_df (pd.DataFrame): input assay information dataframe
139+
skip_database_checks (bool): Whether to skip certain validation checks
140+
since they requires access to the internal database tables
136141
137142
Returns:
138-
tuple: error and warning
143+
Tuple[str, str]: complete error and warning messages
139144
"""
140145

141146
total_error = ""

genie_registry/cna.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
22
import os
3-
from typing import Union
3+
from typing import Tuple, Union
44

55
import pandas as pd
66
import synapseclient
@@ -175,7 +175,18 @@ def process_steps(self, cnaDf, newPath):
175175
self.syn.store(synapseclient.File(newPath, parent=centerMafSynId))
176176
return newPath
177177

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+
"""
179190
total_error = ""
180191
warning = ""
181192
cnvDF.columns = [col.upper() for col in cnvDF.columns]
@@ -230,14 +241,16 @@ def validate_no_dup_symbols_after_remapping(
230241
self, cnvDF: pd.DataFrame, skip_database_checks: bool
231242
) -> str:
232243
"""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.
235247
236248
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
238251
239252
Returns:
240-
str: _description_
253+
str: error message
241254
"""
242255
error = ""
243256
if not skip_database_checks:

0 commit comments

Comments
 (0)