-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from pranavanba/main
Upload intermediate summaries to internal folder in Synapse for validation
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
scripts/write-output/upload-intermediate-summaries-files.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generate a TSV manifest file of intermediate summaries files (intermediate output concepts files) | ||
synapserutils::generate_sync_manifest( | ||
directory_path = outputConceptsDir, | ||
parent_id = tempOutputConceptSynID, | ||
manifest_path = "temp-output-concepts-manifest.tsv" | ||
) | ||
|
||
# Exclude the final output_concepts.csv file from the manifest and write the | ||
# modified manifest file to a CSV file | ||
read.delim("temp-output-concepts-manifest.tsv") %>% | ||
dplyr::filter(!grepl("output_concepts.csv", path)) %>% | ||
write.csv(file = "temp-output-concepts-manifest.csv", row.names = FALSE, quote = FALSE) | ||
|
||
login <- synapser::synLogin() | ||
|
||
# Store each file listed in the CSV manifest file at its specified parent Synapse ID | ||
synapserutils::syncToSynapse(manifestFile = "temp-output-concepts-manifest.csv") | ||
|
||
# synclient <- reticulate::import("synapseclient") | ||
# syn_temp <- synclient$Synapse() | ||
# syn <- syn_temp$login() | ||
# | ||
# synutils <- reticulate::import("synapseutils") | ||
# synutils$syncToSynapse(syn = syn, manifestFile = "temp-output-concepts-manifest.csv") |