Skip to contents

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

Inherited methods


Method new()

Create a new Wf_umccrise object.

Usage

Wf_umccrise$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_umccrise$print(...)

Arguments

...

(ignored).


Method read_pcgr_json()

Read pcgr.json.gz file.

Usage

Wf_umccrise$read_pcgr_json(x)

Arguments

x

Path to file.


Method read_hrd_chord()

Read chord.tsv.gz cancer report file.

Usage

Wf_umccrise$read_hrd_chord(x)

Arguments

x

Path to file.


Method read_hrd_hrdetect()

Read hrdetect.tsv.gz cancer report file.

Usage

Wf_umccrise$read_hrd_hrdetect(x)

Arguments

x

Path to file.


Method read_sigstsv()

Read signature cancer report file.

Usage

Wf_umccrise$read_sigstsv(x)

Arguments

x

Path to file.


Method read_sigs_snv2015()

Read snv_2015.tsv.gz sigs cancer report file.

Usage

Wf_umccrise$read_sigs_snv2015(x)

Arguments

x

Path to file.


Method read_sigs_snv2020()

Read snv_2020.tsv.gz sigs cancer report file.

Usage

Wf_umccrise$read_sigs_snv2020(x)

Arguments

x

Path to file.


Method read_sigs_dbs()

Read dbs.tsv.gz sigs cancer report file.

Usage

Wf_umccrise$read_sigs_dbs(x)

Arguments

x

Path to file.


Method read_sigs_indel()

Read indel.tsv.gz sigs cancer report file.

Usage

Wf_umccrise$read_sigs_indel(x)

Arguments

x

Path to file.


Method read_qcsum()

Read qc_summary.tsv.gz cancer report file.

Usage

Wf_umccrise$read_qcsum(x)

Arguments

x

Path to file.


Method read_conpairmultiqc()

Read multiqc_conpair.txt file.

Usage

Wf_umccrise$read_conpairmultiqc(x)

Arguments

x

Path to file.


Method clone()

The objects of this class are cloneable with this method.

Usage

Wf_umccrise$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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