From 487d2a11ff25880e664ffca15db41b7428466326 Mon Sep 17 00:00:00 2001 From: Shihab Dider Date: Mon, 7 Aug 2023 10:01:45 -0400 Subject: [PATCH] refactor: Add parse.js.seqlengths to export This function is needed for PGVdb but is not exported. --- DESCRIPTION | 2 +- NAMESPACE | 1 + R/jsUtils.R | 1 + man/pgv.Rd | 12 ++++++++---- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 99afcce5..c2d2835c 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -49,4 +49,4 @@ Suggests: License: GPL-3 Encoding: UTF-8 LazyData: true -RoxygenNote: 7.2.1.9000 +RoxygenNote: 7.2.3 diff --git a/NAMESPACE b/NAMESPACE index 8ca4bda4..714772e4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -71,6 +71,7 @@ export(merge) export(merge.Junction) export(microhomology) export(nodestats) +export(parse.js.seqlengths) export(peel) export(pgv) export(phased.binstats.legacy) diff --git a/R/jsUtils.R b/R/jsUtils.R index 3530ba68..bbe941ec 100644 --- a/R/jsUtils.R +++ b/R/jsUtils.R @@ -1632,6 +1632,7 @@ jab2json = function(fn = "./jabba.simple.rds", #' @param js.type either 'gGnome.js' or 'PGV' to determine the format of the JSON file #' @param ref the name of the reference to load (only relevant for PGV). If not provided, then the default reference (which is set in the settings.json file) will be loaded. #' @author Alon Shaiber +#' @export parse.js.seqlengths = function(meta.js, js.type = 'gGnome.js', ref = NULL){ if (!(js.type %in% c('gGnome.js', 'PGV'))){ stop('js.type must be either gGnome.js or PGV') diff --git a/man/pgv.Rd b/man/pgv.Rd index 20668e03..a3c3e10e 100644 --- a/man/pgv.Rd +++ b/man/pgv.Rd @@ -8,9 +8,10 @@ pgv( data, name.col = "sample", patient.id = "participant", - outdir = "./gGnome.js", + outdir = "./pgv", cov.col = "coverage", gg.col = "graph", + gw.col = "walks", descriptors = NA, append = TRUE, cov.field = "ratio", @@ -49,6 +50,9 @@ coverage files} \item{gg.col}{column name in the input data table containing the paths to RDS files containing the gGnome objects} +\item{gw.col}{column name in the input data table containing the paths to +RDS files containing the gWalk objects (optional)} + \item{descriptors}{list of columns in data table that provides description tags to our patient IDs. Here we are looking for IDs and tags that can be used in PGV to subset our data. Expects a list of character column names. (default: NA)} @@ -57,7 +61,7 @@ our data. Expects a list of character column names. (default: NA)} yet (default: TRUE). By default, samples would be appended to a PGV instance if the directory already exists} -\item{cov.field}{the name of the field in the coverage GRanges that should be used (default: "ratio")} +\item{cov.field}{the name of the field in the coverage GRanges that should be used (default: "ratio", use "foreground" if dryclean output)} \item{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 @@ -112,6 +116,6 @@ umber (ncn) values. The ncn values must be contained in a field named "ncn"} a generated PGV formatted json ready for visualization. } \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 +Takes a table with paths to gGraphs, coverage files, and gWalks (optional), and +generates an instance of a PGV directory that is ready to visualize using PGV }