Skip to contents

Cobalt file parsing and manipulation.

Super class

nemo::Tool -> Cobalt

Methods

Inherited methods


Method new()

Create a new Cobalt object.

Usage

Cobalt$new(path = NULL, files_tbl = NULL)

Arguments

path

(character(1))
Output directory of tool. If files_tbl is supplied, this is ignored.

files_tbl

(tibble(n))
Tibble of files from nemo::list_files_dir().


Method parse_gcmed()

Read gc.median.tsv file.

Usage

Cobalt$parse_gcmed(x)

Arguments

x

(character(1))
Path to file.


Method tidy_gcmed()

Tidy gc.median.tsv file. Generates 2 sub-tbls: sample with the sample mean/median read depth, and buckets with the median depth per GC bucket.

Usage

Cobalt$tidy_gcmed(x)

Arguments

x

(character(1))
Path to file.

Examples

cls <- Cobalt
indir <- system.file("extdata/oa", package = "tidywigits")
odir <- tempdir()
id <- "cobalt_run1"
obj <- cls$new(indir)
obj$run(output_dir = odir, format = "parquet", input_id = id)
(lf <- list.files(odir, pattern = "cobalt_.*parquet", full.names = FALSE))
#> [1] "sample1_cobalt_gcmedbuckets.parquet" "sample1_cobalt_gcmedsample.parquet" 
#> [3] "sample1_cobalt_ratiomed.parquet"     "sample1_cobalt_ratiopcf.parquet"    
#> [5] "version_cobalt_version.parquet"