gGnome.js: Generate a gGnome.js instance

View source: R/jsUtils.R

gGnome.jsR Documentation

Generate a gGnome.js instance

Description

Takes a table with paths to gGraphs and coverage files (optional) and generates an instance of a gGnome.js directory that is ready to visualize using gGnome.js

Usage

gGnome.js(
  data,
  name.col = "sample",
  outdir = "./gGnome.js",
  reference = "hg19",
  cov.col = "coverage",
  gg.col = "graph",
  append = FALSE,
  cov.field = "ratio",
  cov.field.col = NA,
  cov.bin.width = 10000,
  overwrite = FALSE,
  annotation = c("simple", "bfb", "chromoplexy", "chromothripsis", "del", "dm", "dup",
    "pyrgo", "qrdel", "qrdup", "qrp", "rigma", "tic", "tyfonas"),
  kag.col = "kag",
  ncn.gr = NA,
  mc.cores = 1
)

Arguments

data

either a path to a TSV/CSV or a data.table

name.col

column name in the input data table containing the sample names (default: "sample")

outdir

the path where to save the files. This path should not exist, unless you want to add more files to an existing directory in which case you must use append = TRUE

reference

name of the reference genome used. You can use one of the built-in references (hg19, hg38), or provide a path to a folder with properly formatted genes.json and metadata.json files

cov.col

column name in the input data table containing the paths to coverage files

gg.col

column name in the input data table containing the paths to RDS files containing the gGnome objects

append

if set to FALSE the the directory is expected not to exist yet (default: TRUE). By default, samples would be appended to a gGnome.js instance if the directory already exists

cov.field

the name of the field in the coverage GRanges that should be used (default: "ratio")

cov.field.col

column name in the input data table containing the name of the field in the coverage GRanges that should be used. If this is supplied then it overrides the value in "cov.field". Use this if some of your coverage files differ in the field used.

cov.bin.width

bin width to use when rebinning the coverage data (default: 1e4). If you don't want rebinning to be performed then set to NA.

overwrite

by default only files that are missing will be created. If set to TRUE then existing coverage arrow files and gGraph JSON files will be overwritten

annotation

which node/edge annotation fields to add to the gGraph JSON file. By default we assume that gGnome::events has been executed and we add the following SV annotations: 'simple', 'bfb', 'chromoplexy', 'chromothripsis', 'del', 'dm', 'dup', 'pyrgo', 'qrdel', 'qrdup', 'qrp', 'rigma', 'tic', 'tyfonas'

mc.cores

how many cores to use

ref

the genome reference name used for this dataset. This reference name must be defined in the settings.json file. By default gGnome.js accepts one of the following: hg19, hg38, covid19. If you are using a different reference then you must first add it to the settings.json file.


mskilab/gGnome documentation built on May 8, 2024, 4:25 p.m.