Skip to contents

Config YAML file parsing.

Public fields

tool

(character(1))
Tool name.

config

(list())
Config list.

raw_schemas_all

(tibble())
All raw schemas for tool.

tidy_schemas_all

(tibble())
All tidy schemas for tool.

Methods


Method new()

Create a new Config object.

Usage

Config$new(tool)

Arguments

tool

(character(1))
Tool name.


Method print()

Print details about the Tool.

Usage

Config$print(...)

Arguments

...

(ignored).


Method read()

Read YAML configs.

Usage

Config$read()

Returns

A list() with the parsed data.


Method get_raw_patterns()

Return all output file patterns.

Usage

Config$get_raw_patterns()


Method get_raw_versions()

Return all output file schema versions.

Usage

Config$get_raw_versions()


Method get_raw_descriptions()

Return all output file descriptions.

Usage

Config$get_raw_descriptions()


Method get_raw_schemas_all()

Return all output file schemas.

Usage

Config$get_raw_schemas_all()


Method get_raw_schema()

Get raw file schema.

Usage

Config$get_raw_schema(x, v = "latest")

Arguments

x

(character(1))
Raw file name.

v

(character(1))
Version (def: latest).


Method are_raw_schemas_valid()

Validate schema.

Usage

Config$are_raw_schemas_valid()


Method get_tidy_descriptions()

Return all tidy tibble descriptions.

Usage

Config$get_tidy_descriptions()


Method get_tidy_schemas_all()

Return all tidy tibble schemas.

Usage

Config$get_tidy_schemas_all()


Method get_tidy_schema()

Get tidy tbl schema.

Usage

Config$get_tidy_schema(x, v = "latest", subtbl = "tbl1")

Arguments

x

(character(1))
Tidy tbl name.

v

(character(1))
Version of schema (def: latest).

subtbl

(character(1))
Subtbl to use (def: tbl1).


Method clone()

The objects of this class are cloneable with this method.

Usage

Config$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

tool <- "isofox"
conf <- Config$new(tool)
conf$get_raw_patterns()
#> # A tibble: 8 × 2
#>   name           value                            
#>   <chr>          <chr>                            
#> 1 summary        "\\.isf\\.summary\\.csv$"        
#> 2 genedata       "\\.isf\\.gene_data\\.csv$"      
#> 3 transdata      "\\.isf\\.transcript_data\\.csv$"
#> 4 altsj          "\\.isf\\.alt_splice_junc\\.csv$"
#> 5 retintron      "\\.isf\\.retained_intron\\.csv$"
#> 6 fusionsall     "\\.isf\\.fusions\\.csv$"        
#> 7 fusionspass    "\\.isf\\.pass_fusions\\.csv$"   
#> 8 genecollection "\\.isf\\.gene_collection\\.csv$"
conf$get_raw_versions()
#> # A tibble: 8 × 2
#>   name           value 
#>   <chr>          <chr> 
#> 1 summary        latest
#> 2 genedata       latest
#> 3 transdata      latest
#> 4 altsj          latest
#> 5 retintron      latest
#> 6 fusionsall     latest
#> 7 fusionspass    latest
#> 8 genecollection latest
conf$get_raw_descriptions()
#> # A tibble: 8 × 2
#>   name           value                      
#>   <chr>          <chr>                      
#> 1 summary        QC summary.                
#> 2 genedata       Gene level data.           
#> 3 transdata      Transcript level data.     
#> 4 altsj          Alternate splice junctions.
#> 5 retintron      Retained introns.          
#> 6 fusionsall     All fusions.               
#> 7 fusionspass    Passed fusions.            
#> 8 genecollection Gene collection.           
conf$get_raw_schemas_all()
#> # A tibble: 8 × 3
#>   name           version schema           
#>   <chr>          <chr>   <list>           
#> 1 summary        latest  <tibble [16 × 2]>
#> 2 genedata       latest  <tibble [13 × 2]>
#> 3 transdata      latest  <tibble [18 × 2]>
#> 4 altsj          latest  <tibble [18 × 2]>
#> 5 retintron      latest  <tibble [10 × 2]>
#> 6 fusionsall     latest  <tibble [31 × 2]>
#> 7 fusionspass    latest  <tibble [29 × 2]>
#> 8 genecollection latest  <tibble [15 × 2]>
conf$get_raw_schema("summary")
#> # A tibble: 16 × 2
#>    field                 type 
#>    <chr>                 <chr>
#>  1 SampleId              c    
#>  2 QcStatus              c    
#>  3 TotalFragments        d    
#>  4 DuplicateFragments    d    
#>  5 SplicedFragmentPerc   d    
#>  6 UnsplicedFragmentPerc d    
#>  7 AltFragmentPerc       d    
#>  8 ChimericFragmentPerc  d    
#>  9 SplicedGeneCount      d    
#> 10 ReadLength            d    
#> 11 FragLength5th         d    
#> 12 FragLength50th        d    
#> 13 FragLength95th        d    
#> 14 EnrichedGenePercent   d    
#> 15 MedianGCRatio         d    
#> 16 ForwardStrandPercent  d    
conf$are_raw_schemas_valid()
#> [1] TRUE
conf$get_tidy_descriptions()
#> # A tibble: 8 × 2
#>   name           value                      
#>   <chr>          <chr>                      
#> 1 summary        QC summary.                
#> 2 genedata       Gene level data.           
#> 3 transdata      Transcript level data.     
#> 4 altsj          Alternate splice junctions.
#> 5 retintron      Retained introns.          
#> 6 fusionsall     All fusions.               
#> 7 fusionspass    Passed fusions.            
#> 8 genecollection Gene collection.           
conf$get_tidy_schemas_all()
#> # A tibble: 8 × 4
#>   name           version tbl   schema           
#>   <chr>          <chr>   <chr> <list>           
#> 1 summary        latest  tbl1  <tibble [16 × 3]>
#> 2 genedata       latest  tbl1  <tibble [13 × 3]>
#> 3 transdata      latest  tbl1  <tibble [18 × 3]>
#> 4 altsj          latest  tbl1  <tibble [18 × 3]>
#> 5 retintron      latest  tbl1  <tibble [10 × 3]>
#> 6 fusionsall     latest  tbl1  <tibble [31 × 3]>
#> 7 fusionspass    latest  tbl1  <tibble [29 × 3]>
#> 8 genecollection latest  tbl1  <tibble [15 × 3]>
conf$get_tidy_schema("summary")
#> # A tibble: 16 × 3
#>    field              type  description                                         
#>    <chr>              <chr> <chr>                                               
#>  1 sample_id          c     "sample ID"                                         
#>  2 qc_status          c     "QC status"                                         
#>  3 frag_tot           d     "total fragments"                                   
#>  4 frag_dup           d     "duplicate marked fragments"                        
#>  5 frag_spliced_pct   d     "fragment % supporting 1 or more known transcripts" 
#>  6 frag_unspliced_pct d     "fragment % not containing a splice junction and no…
#>  7 frag_alt_pct       d     "fragment % supporting an alternate splice junction…
#>  8 frag_chimeric_pct  d     "fragment % supporting a chimeric junction"         
#>  9 spliced_gene_count d     "count of spliced genes"                            
#> 10 read_length        d     "raw read length of fragments"                      
#> 11 frag_length_5th    d     "5th percentile of genic intronic fragment lengths" 
#> 12 frag_length_50th   d     "50th percentile of genic intronic fragment lengths"
#> 13 frag_length_95th   d     "95th percentile of genic intronic fragment lengths"
#> 14 enriched_gene_pct  d     "fragment % supporting one of the following 6 genes…
#> 15 median_gc_ratio    d     "median GC ratio excluding the 6 highly enriched ge…
#> 16 forward_strand_pct d     ""