Skip to content

Commit

Permalink
Merge pull request #137 from Sage-Bionetworks/GEN-1174-remove-tempora…
Browse files Browse the repository at this point in the history
…ry-retraction

[GEN-1174] Don't use temporary retraction table
  • Loading branch information
thomasyu888 authored May 3, 2024
2 parents ef9e3cb + a1d28fe commit b088810
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions geniesp/bpc_redcap_export_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 "
Expand All @@ -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
Expand Down

0 comments on commit b088810

Please sign in to comment.