Skip to contents

Sage file parsing and manipulation.

Super class

nemo::Tool -> Sage

Methods

Inherited methods


Method new()

Create a new Sage object.

Usage

Sage$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 tidy_genecvg()

Tidy gene.coverage.tsv file. Generates 2 sub-tbls: genes with the per-gene metadata and cvg with the long-form depth-range counts.

Usage

Sage$tidy_genecvg(x)

Arguments

x

(character(1))
Path to file.

Examples

cls <- Sage
indir <- system.file("extdata/oa", package = "tidywigits")
odir <- tempdir()
id <- "sage_run1"
obj <- cls$new(indir)
obj$run(output_dir = odir, format = "parquet", input_id = id)
(lf <- list.files(odir, pattern = "sage_.*parquet", full.names = FALSE))
#>  [1] "sample1_germline_sage_bqrtsv.parquet"      
#>  [2] "sample1_sage_bqrtsv.parquet"               
#>  [3] "sample1_somatic_sage_bqrtsv.parquet"       
#>  [4] "sample1_somatic_sage_exoncvg.parquet"      
#>  [5] "sample1_somatic_sage_genecvgcvg.parquet"   
#>  [6] "sample1_somatic_sage_genecvggenes.parquet" 
#>  [7] "sample2_germline_sage_bqrtsv.parquet"      
#>  [8] "sample2_germline_sage_exoncvg.parquet"     
#>  [9] "sample2_germline_sage_genecvgcvg.parquet"  
#> [10] "sample2_germline_sage_genecvggenes.parquet"
#> [11] "sample2_somatic_sage_bqrtsv.parquet"