Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[GEN-1408] PoC: Remove rows of data containing SEQ_ASSAY_ID that are filtered out #573

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions genie/consortium_to_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ def consortiumToPublic(
database_to_staging.GENIE_RELEASE_DIR,
"data_cna_hg19.seg",
)
combined_bed_path = os.path.join(
database_to_staging.GENIE_RELEASE_DIR, "genie_combined.bed"
)

if not os.path.exists(database_to_staging.GENIE_RELEASE_DIR):
os.mkdir(database_to_staging.GENIE_RELEASE_DIR)
Expand Down Expand Up @@ -311,17 +308,20 @@ def consortiumToPublic(
version_comment=genie_version,
name="data_cna_hg19.seg",
)
elif entName == "genomic_information.txt":
bed = syn.get(entId, followLink=True)
bedDf = pd.read_csv(bed.path, sep="\t")
bedDf = bedDf[bedDf.SEQ_ASSAY_ID.isin(allClin.SEQ_ASSAY_ID)]
bedDf.to_csv(combined_bed_path, sep="\t", index=False)
elif entName in ["genomic_information.txt", "assay_information.txt"]:
file_with_seq_assay_ent = syn.get(entId, followLink=True)
file_with_seq_assay_df = pd.read_csv(file_with_seq_assay_ent.path, sep="\t")
file_with_seq_assay_df = file_with_seq_assay_df[file_with_seq_assay_df.SEQ_ASSAY_ID.isin(allClin.SEQ_ASSAY_ID)]
file_path = os.path.join(
database_to_staging.GENIE_RELEASE_DIR, entName
)
file_with_seq_assay_df.to_csv(file_path, sep="\t", index=False)
load.store_file(
syn=syn,
filepath=combined_bed_path,
filepath=file_path,
parentid=public_release_preview,
version_comment=genie_version,
name="genomic_information.txt",
name=entName,
)
else:
ent = syn.get(entId, followLink=True, downloadFile=False)
Expand Down
Loading