-
Notifications
You must be signed in to change notification settings - Fork 0
[DPE-1448] Adjust MAF validation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| import sys | ||
|
|
||
| import synapseclient | ||
| import synapseutils | ||
|
|
||
| import utils | ||
|
|
||
|
|
@@ -49,44 +48,26 @@ def save_to_synapse( | |
| dataset_name (str): name of the iatlas dataset to save to | ||
| synapse | ||
| datahub_tools_path (str): Path to the datahub tools repo | ||
| output_folder_synid (str): Synapse id of the output folder | ||
| output_folder_synid (str): Synapse id of the outputs folder | ||
| version_comment (str): Version comment for this iteration of files on synapse. Optional. | ||
| Defaults to None. | ||
| """ | ||
| # TODO: Make into argument | ||
| dataset_dir = os.path.join(datahub_tools_path, "add-clinical-header", dataset_name) | ||
| # see if dataset_folder exists | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove code as we just need to input the output folder synapse id directly instead of trying to create one inside the project |
||
| dataset_folder_exists = False | ||
| for _, directory_names, _ in synapseutils.walk(syn=syn, synId=output_folder_synid): | ||
| directories = directory_names # top level directories | ||
| break | ||
|
|
||
| for dataset_folder in directories: | ||
| if dataset_name == dataset_folder[0]: | ||
| dataset_folder_exists = True | ||
| dataset_folder_id = dataset_folder[1] | ||
| break | ||
|
|
||
| if not dataset_folder_exists: | ||
| new_dataset_folder = synapseclient.Folder( | ||
| dataset_name, parent=output_folder_synid | ||
| ) | ||
| dataset_folder_id = syn.store(new_dataset_folder).id | ||
|
|
||
| # store required files | ||
| for file in utils.REQUIRED_OUTPUT_FILES: | ||
| syn.store( | ||
| synapseclient.File( | ||
| f"{dataset_dir}/{file}", | ||
| name=file, | ||
| parent=dataset_folder_id, | ||
| parent=output_folder_synid, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to save all files in the same level of repo?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that is the expected folder structure. Case list files get their own folder within the output folder |
||
| version_comment=version_comment | ||
| ) | ||
| ) | ||
|
|
||
| # store case lists | ||
| case_list_files = os.listdir(os.path.join(dataset_dir, "case_lists")) | ||
| case_list_folder = synapseclient.Folder("case_lists", parent=dataset_folder_id) | ||
| case_list_folder = synapseclient.Folder("case_lists", parent=output_folder_synid) | ||
| try: | ||
| case_list_folder_id = syn.store(case_list_folder).id | ||
| except: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,6 @@ | |
| "meta_gene_signatures.txt", | ||
| "data_rna_seq_mrna.txt", | ||
| "meta_rna_seq_mrna.txt", | ||
| "cbioportal_validator_output.txt", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you track why this file is removed?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think my comment got lost in the old |
||
| ] | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency specification uses '=' instead of the correct '==' operator for version pinning. This should be 'pyyaml==6.0' to properly specify the exact version.