Reads and writes tidy versions of files from the sash
workflow
Super class
dracarys::Wf
-> Wf_sash
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_sash object.
Usage
Wf_sash$new(path = NULL, SubjectID = NULL, SampleID_tumor = NULL)
Examples
if (FALSE) { # \dontrun{
#---- Local ----#
p1 <- "~/s3/org.umccr.data.oncoanalyser/analysis_data/SBJ05571/sash"
p2 <- "202408270b93455e/L2401308_L2401307"
p <- normalizePath(file.path(p1, p2))
SubjectID <- "SBJ05571"
SampleID_tumor <- "MDX240307"
prefix <- glue("{SubjectID}__{SampleID_tumor}")
s1 <- Wf_sash$new(path = p, SubjectID = SubjectID, SampleID_tumor = SampleID_tumor)
s1$list_files(max_files = 20)
s1$list_files_filter_relevant(max_files = 300)
d <- s1$download_files(max_files = 1000, dryrun = F)
d_tidy <- s1$tidy_files(d)
d_write <- s1$write(
d_tidy,
outdir = file.path(p, "dracarys_tidy"),
prefix = glue("{SubjectID}_{SampleID_tumor}"),
format = "tsv"
)
#---- S3 ----#
p1 <- "s3://org.umccr.data.oncoanalyser/analysis_data/SBJ05571/sash"
p2 <- "202408270b93455e/L2401308_L2401307"
p <- file.path(p1, p2)
SubjectID <- "SBJ05571"
SampleID_tumor <- "MDX240307"
prefix <- glue("{SubjectID}__{SampleID_tumor}")
s1 <- Wf_sash$new(path = p, SubjectID = SubjectID, SampleID_tumor = SampleID_tumor)
s1$list_files(max_files = 20)
s1$list_files_filter_relevant()
outdir <- sub("s3:/", "~/s3", p)
d <- s1$download_files(outdir = outdir, max_files = 1000, dryrun = F)
d_tidy <- s1$tidy_files(d)
d_write <- s1$write(
d_tidy,
outdir = file.path(p, "dracarys_tidy"),
prefix = glue("{SubjectID}__{SampleID_tumor}"),
format = "tsv"
)
} # }