Skip to contents

Reads and writes tidy versions of files from the tso_ctdna_tumor_only workflow.

Super class

dracarys::Wf -> Wf_tso_ctdna_tumor_only

Public fields

prefix

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

Methods

Inherited methods


Method new()

Create a new Wf_tso_ctdna_tumor_only object.

Usage

Wf_tso_ctdna_tumor_only$new(path = NULL, prefix = NULL)

Arguments

path

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

prefix

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


Method print()

Print details about the Workflow.

Usage

Wf_tso_ctdna_tumor_only$print(...)

Arguments

...

(ignored).


Method read_sar()

Read SampleAnalysisResults.json.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_sar(x)

Arguments

x

Path to file.


Method read_tmbt()

Read TMB_Trace.tsv file.

Usage

Wf_tso_ctdna_tumor_only$read_tmbt(x)

Arguments

x

Path to file.


Method read_acfc()

Read AlignCollapseFusionCaller_metrics.json.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_acfc(x)

Arguments

x

Path to file.


Method read_msv()

Read MergedSmallVariants.vcf.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_msv(x)

Arguments

x

Path to file.


Method read_msvg()

Read MergedSmallVariants.genome.vcf.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_msvg(x)

Arguments

x

Path to file.


Method read_cvo()

Read CombinedVariantOutput.tsv file.

Usage

Wf_tso_ctdna_tumor_only$read_cvo(x)

Arguments

x

Path to file.


Method read_cnv()

Read CopyNumberVariants.vcf.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_cnv(x)

Arguments

x

Path to file.


Method read_flh()

Read fragment_length_hist.json.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_flh(x)

Arguments

x

Path to file.


Method read_trc()

Read TargetRegionCoverage.json.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_trc(x)

Arguments

x

Path to file.


Method read_tmb()

Read tmb.json.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_tmb(x)

Arguments

x

Path to file.


Method read_msi()

Read msi.json.gz file.

Usage

Wf_tso_ctdna_tumor_only$read_msi(x)

Arguments

x

Path to file.


Method read_fus()

Read Fusions.csv file.

Usage

Wf_tso_ctdna_tumor_only$read_fus(x)

Arguments

x

Path to file.


Method clone()

The objects of this class are cloneable with this method.

Usage

Wf_tso_ctdna_tumor_only$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{

#---- Local ----#
p <- file.path(
  "~/icav1/g/production/analysis_data/SBJ04651/tso_ctdna_tumor_only",
  "20240223d1951163/L2400183"
)
prefix <- "PRJ230876_L2400183"
t1 <- Wf_tso_ctdna_tumor_only$new(path = p, prefix = prefix)
t1$list_files(max_files = 20)
t1$list_files_filter_relevant(max_files = 300)
d <- t1$download_files(max_files = 100, dryrun = F)
d_tidy <- t1$tidy_files(d)
d_write <- t1$write(
  d_tidy,
  outdir = file.path(p, "dracarys_tidy"),
  prefix = prefix,
  format = "tsv"
)

#---- GDS ----#
p <- file.path(
  "gds://production/analysis_data/SBJ05563/tso_ctdna_tumor_only",
  "20240914d41300cd/L2401388/Results"
)
prefix <- "PRJ241446_L2401388"
outdir <- file.path(sub("gds:/", "~/icav1/g", p))
token <- Sys.getenv("ICA_ACCESS_TOKEN")
t2 <- Wf_tso_ctdna_tumor_only$new(path = p, prefix = prefix)
t2$list_files(max_files = 100, ica_token = token)
t2$list_files_filter_relevant(max_files = 100, ica_token = token)
d <- t2$download_files(
  outdir = outdir, ica_token = token,
  max_files = 100, dryrun = F
)
d_tidy <- t2$tidy_files(d)
d_write <- t2$write(
  d_tidy,
  outdir = file.path(outdir, "dracarys_tidy"),
  prefix = prefix,
  format = "tsv"
)
} # }