Skip to contents

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

Inherited methods


Method new()

Create a new Wf_sash object.

Usage

Wf_sash$new(path = NULL, SubjectID = NULL, SampleID_tumor = NULL)

Arguments

path

Path to directory with raw workflow results (from GDS, S3, or local filesystem).

SubjectID

The SubjectID of the sample (needed for path lookup).

SampleID_tumor

The SampleID of the tumor sample (needed for path lookup).


Method print()

Print details about the Workflow.

Usage

Wf_sash$print(...)

Arguments

...

(ignored).


Method read_pcgr_json()

Read pcgr.json.gz file.

Usage

Wf_sash$read_pcgr_json(x)

Arguments

x

Path to file.


Method read_hrd_dragen()

Read dragen.tsv.gz cancer report hrd file.

Usage

Wf_sash$read_hrd_dragen(x)

Arguments

x

Path to file.


Method read_hrd_chord()

Read chord.tsv.gz cancer report hrd file.

Usage

Wf_sash$read_hrd_chord(x)

Arguments

x

Path to file.


Method read_hrd_hrdetect()

Read hrdetect.tsv.gz cancer report hrd file.

Usage

Wf_sash$read_hrd_hrdetect(x)

Arguments

x

Path to file.


Method read_sigstsv()

Read signature cancer report file.

Usage

Wf_sash$read_sigstsv(x)

Arguments

x

Path to file.


Method read_sigs_snv2015()

Read snv_2015.tsv.gz sigs cancer report file.

Usage

Wf_sash$read_sigs_snv2015(x)

Arguments

x

Path to file.


Method read_sigs_snv2020()

Read snv_2020.tsv.gz sigs cancer report file.

Usage

Wf_sash$read_sigs_snv2020(x)

Arguments

x

Path to file.


Method read_sigs_dbs()

Read dbs.tsv.gz sigs cancer report file.

Usage

Wf_sash$read_sigs_dbs(x)

Arguments

x

Path to file.


Method read_sigs_indel()

Read indel.tsv.gz sigs cancer report file.

Usage

Wf_sash$read_sigs_indel(x)

Arguments

x

Path to file.


Method read_qcsum()

Read qc_summary.tsv.gz cancer report file.

Usage

Wf_sash$read_qcsum(x)

Arguments

x

Path to file.


Method clone()

The objects of this class are cloneable with this method.

Usage

Wf_sash$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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"
)
} # }