Reads and writes tidy versions of files from the umccrise
workflow
Super class
dracarys::Wf
-> Wf_umccrise
Public fields
SubjectID
The SubjectID of the sample (needed for path lookup).
SampleID_tumor
The SampleID of the tumor sample (needed for path lookup).
Methods
Method new()
Create a new Wf_umccrise object.
Usage
Wf_umccrise$new(path = NULL, SubjectID = NULL, SampleID_tumor = NULL)
Method print()
Print details about the Workflow.
Examples
if (FALSE) { # \dontrun{
#---- LOCAL ----#
SubjectID <- "SBJ03043"
SampleID_tumor <- "PRJ230004"
prefix <- glue("{SubjectID}__{SampleID_tumor}")
p1_local <- "~/icav1/g/production/analysis_data"
p <- file.path(p1_local, "SBJ03043/umccrise/20240830ec648f40/L2300064__L2300063")
um1 <- Wf_umccrise$new(path = p, SubjectID = SubjectID, SampleID_tumor = SampleID_tumor)
um1$list_files(max_files = 10)
um1$list_files_filter_relevant()
d <- um1$download_files(max_files = 1000, dryrun = F)
d_tidy <- um1$tidy_files(d)
d_write <- um1$write(
d_tidy,
outdir = file.path(p, "dracarys_tidy"),
prefix = glue("{SubjectID}__{SampleID_tumor}"),
format = "tsv"
)
#---- GDS ----#
SubjectID <- "SBJ03043"
SampleID_tumor <- "PRJ230004"
prefix <- glue("{SubjectID}__{SampleID_tumor}")
p1_gds <- "gds://production/analysis_data"
p <- file.path(p1_gds, "SBJ03043/umccrise/20240830ec648f40/L2300064__L2300063")
outdir <- file.path(sub("gds:/", "~/icav1/g", p))
token <- Sys.getenv("ICA_ACCESS_TOKEN")
um2 <- Wf_umccrise$new(path = p, SubjectID = SubjectID, SampleID_tumor = SampleID_tumor)
um2$list_files(max_files = 8)
um2$list_files_filter_relevant(ica_token = token, max_files = 500)
d <- um2$download_files(
outdir = outdir, ica_token = token,
max_files = 1000, dryrun = F
)
d_tidy <- um2$tidy_files(d)
d_write <- um2$write(
d_tidy,
outdir = file.path(outdir, "dracarys_tidy"),
prefix = glue("{SubjectID}__{SampleID_tumor}"),
format = "tsv"
)
} # }