From a1d28fe8e5f186cf88a5cdf1de059a84f583a918 Mon Sep 17 00:00:00 2001 From: thomasyu888 Date: Sat, 6 Apr 2024 22:27:56 -0700 Subject: [PATCH] Don't use temporary retraction table --- geniesp/bpc_redcap_export_mapping.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/geniesp/bpc_redcap_export_mapping.py b/geniesp/bpc_redcap_export_mapping.py index c2b985d..1d38c07 100644 --- a/geniesp/bpc_redcap_export_mapping.py +++ b/geniesp/bpc_redcap_export_mapping.py @@ -538,7 +538,7 @@ class BpcProjectRunner(metaclass=ABCMeta): _sample_retraction_synid = "syn25779833" _patient_retraction_synid = "syn25998970" _retraction_at_release_synid = "syn52915299" - _temporary_patient_retraction_synid = "syn29266682" + # _temporary_patient_retraction_synid = "syn29266682" # main GENIE assay information table _ASSAY_SYNID = "syn17009222" # exclude files to be created for cbioportal @@ -606,11 +606,11 @@ def genie_clinicaldf(self) -> pd.DataFrame: ) bpc_patient_retraction_df = bpc_patient_retraction_db.asDataFrame() - bpc_temp_patient_retraction_db = self.syn.tableQuery( - f"select patient_id from {self._temporary_patient_retraction_synid} where " - f"cohort like '{self._SPONSORED_PROJECT}%'" - ) - bpc_temp_patient_retraction_df = bpc_temp_patient_retraction_db.asDataFrame() + # bpc_temp_patient_retraction_db = self.syn.tableQuery( + # f"select patient_id from {self._temporary_patient_retraction_synid} where " + # f"cohort like '{self._SPONSORED_PROJECT}%'" + # ) + # bpc_temp_patient_retraction_df = bpc_temp_patient_retraction_db.asDataFrame() retraction_at_release = self.syn.tableQuery( f"select patient_id from {self._retraction_at_release_synid} where " @@ -629,12 +629,12 @@ def genie_clinicaldf(self) -> pd.DataFrame: keep_clinicaldf = keep_clinicaldf[ ~keep_clinicaldf["PATIENT_ID"].isin(retraction_at_release_df["patient_id"]) ] - # Retract patients from temporary patient retraction db - keep_clinicaldf = keep_clinicaldf[ - ~keep_clinicaldf["PATIENT_ID"].isin( - bpc_temp_patient_retraction_df["patient_id"] - ) - ] + # # Retract patients from temporary patient retraction db + # keep_clinicaldf = keep_clinicaldf[ + # ~keep_clinicaldf["PATIENT_ID"].isin( + # bpc_temp_patient_retraction_df["patient_id"] + # ) + # ] return keep_clinicaldf @cached_property