GetModReportDeepSignal: GetModReportDeepSignal Function (GloModAn)

View source: R/GloModAn.R

GetModReportDeepSignalR Documentation

GetModReportDeepSignal Function (GloModAn)

Description

Return a report with global characteristics of DNA modifications (Mod) distribution in the genome assembly provided. (adapted to data from DeepSignal software)

Usage

GetModReportDeepSignal(
  dnastringsetGenome,
  grangesGenome,
  gposDeepSignalMod,
  gposDeepSignalModBase,
  cOrgAssemblyName,
  cBaseLetterForMod,
  cModNameInOutput
)

Arguments

dnastringsetGenome

A DNAStringSet object containing the sequence for each contig.

grangesGenome

A GRanges object containing the width of each contig.

gposDeepSignalMod

An UnStitched GPos object containing DeepSignal modified sites data.

gposDeepSignalModBase

An UnStitched GPos object containing DeepSignal modification target sites data.

cOrgAssemblyName

The name of the genome assembly provided.

cBaseLetterForMod

The name of the base letter of the modified base.

cModNameInOutput

Name for the modification in the output.

Examples

# preparing genome (simulated)
myGenome <- Biostrings::DNAStringSet(paste0(rep("ATCG", 100000), collapse = ""))
names(myGenome) <- "NC_000001.11"
myGrangesGenome <- GetGenomeGRanges(myGenome)

# Loading Nanopore data
myDeepSignalModPath <- system.file(
  package = "DNAModAnnot", "extdata",
  "FAB39088-288418386-Chr1.CpG.call_mods.frequency.tsv"
)
mygposDeepSignalModBase <- ImportDeepSignalModFrequency(
  cDeepSignalModPath = myDeepSignalModPath,
  lSortGPos = TRUE,
  cContigToBeAnalyzed = "all"
)

# Filtering
mygposDeepSignalMod <- FiltDeepSignal(
  gposDeepSignalModBase = mygposDeepSignalModBase,
  cParamNameForFilter = "frac",
  nFiltParamLoBoundaries = 0,
  nFiltParamUpBoundaries = 1,
  cFiltParamBoundariesToInclude = "upperOnly"
)$Mod

# Mod report
myReport_Mod <- GetModReportDeepSignal(
  dnastringsetGenome = myGenome,
  grangesGenome = myGrangesGenome,
  gposDeepSignalMod = as(mygposDeepSignalMod, "GRanges"),
  gposDeepSignalModBase = as(mygposDeepSignalModBase, "GRanges"),
  cOrgAssemblyName = "Test_function",
  cBaseLetterForMod = "C", cModNameInOutput = "5mC"
)
myReport_Mod

AlexisHardy/DNAModAnnot documentation built on Feb. 27, 2023, 12:03 a.m.