Skip to content

Commit

Permalink
correct col name
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu17 committed Jan 24, 2025
1 parent 91e4fab commit 0cd8f8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions genie/database_to_staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,6 @@ def store_sv_files(
# sv_df["ENTREZ_GENE_ID"].mask(
# sv_df["ENTREZ_GENE_ID"] == 0, float("nan"), inplace=True
# )

if not current_release_staging:
sv_staging_df = sv_df[
sv_df["SAMPLE_ID"].isin(keep_for_center_consortium_samples)
Expand All @@ -751,7 +750,7 @@ def store_sv_files(
)

sv_df = sv_df[sv_df["SAMPLE_ID"].isin(keep_for_merged_consortium_samples)]
sv_df = filter_out_germline_variants(input_data=sv_df, status_col="SV_Status")
sv_df = filter_out_germline_variants(input_data=sv_df, status_col="SV_STATUS")
sv_df.rename(columns=transform._col_name_to_titlecase, inplace=True)
sv_text = process_functions.removePandasDfFloat(sv_df)
sv_path = os.path.join(GENIE_RELEASE_DIR, "data_sv.txt")
Expand Down
18 changes: 9 additions & 9 deletions tests/test_database_to_staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,28 @@ def test_store_assay_info_files(syn):
(
pd.DataFrame(
dict(
SV_Status=["GERMLINE", "GERMLINE"], Sample_ID=["GENIE-1", "GENIE-2"]
SV_STATUS=["GERMLINE", "GERMLINE"], Sample_ID=["GENIE-1", "GENIE-2"]
)
),
"SV_Status",
pd.DataFrame(columns=["SV_Status", "Sample_ID"]),
"SV_STATUS",
pd.DataFrame(columns=["SV_STATUS", "Sample_ID"]),
),
(
pd.DataFrame(
dict(
SV_Status=["GERMLINE", "SOMATIC"], Sample_ID=["GENIE-1", "GENIE-2"]
SV_STATUS=["GERMLINE", "SOMATIC"], Sample_ID=["GENIE-1", "GENIE-2"]
)
),
"SV_Status",
pd.DataFrame(dict(SV_Status=["SOMATIC"], Sample_ID=["GENIE-2"])),
"SV_STATUS",
pd.DataFrame(dict(SV_STATUS=["SOMATIC"], Sample_ID=["GENIE-2"])),
),
(
pd.DataFrame(
dict(SV_Status=["SOMATIC", "SOMATIC"], Sample_ID=["GENIE-1", "GENIE-2"])
dict(SV_STATUS=["SOMATIC", "SOMATIC"], Sample_ID=["GENIE-1", "GENIE-2"])
),
"SV_Status",
"SV_STATUS",
pd.DataFrame(
dict(SV_Status=["SOMATIC", "SOMATIC"], Sample_ID=["GENIE-1", "GENIE-2"])
dict(SV_STATUS=["SOMATIC", "SOMATIC"], Sample_ID=["GENIE-1", "GENIE-2"])
),
),
],
Expand Down

0 comments on commit 0cd8f8c

Please sign in to comment.