Skip to content

Commit

Permalink
Merge pull request #35 from pranavanba/main
Browse files Browse the repository at this point in the history
Upload intermediate summaries to internal folder in Synapse for validation
  • Loading branch information
pranavanba authored Oct 3, 2024
2 parents 5d86d2e + 46594b9 commit 7101e58
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ staging:
s3basekey: main/archive/2024-06-13/
selectedVarsFileID: syn53503994
outputConceptsDir: ./temp-output-concepts
tempOutputConceptSynID: syn53822708

prod:
inherits: staging
Expand Down
24 changes: 24 additions & 0 deletions scripts/write-output/upload-intermediate-summaries-files.R
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")

0 comments on commit 7101e58

Please sign in to comment.