GetModReportPacBio: GetModReportPacBio Function (GloModAn)

View source: R/GloModAn.R

GetModReportPacBioR Documentation

GetModReportPacBio Function (GloModAn)

Description

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

Usage

GetModReportPacBio(
  dnastringsetGenome,
  grangesGenome,
  grangesPacBioGFF,
  gposPacBioCSVBase,
  cOrgAssemblyName,
  cBaseLetterForMod,
  cModNameInOutput
)

Arguments

dnastringsetGenome

A DNAStringSet object containing the sequence for each contig.

grangesGenome

A GRanges object containing the width of each contig.

grangesPacBioGFF

A GRanges object containing PacBio GFF data.

gposPacBioCSVBase

A GPos object containing PacBio CSV data for sites that can be targeted by the modification only.

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

# loading genome
myGenome <- Biostrings::readDNAStringSet(system.file(
  package = "DNAModAnnot", "extdata",
  "ptetraurelia_mac_51_sca171819.fa"
))
myGrangesGenome <- GetGenomeGRanges(myGenome)

# Preparing a grangesPacBioGFF datasets
myGrangesPacBioGFF <-
  ImportPacBioGFF(
    cPacBioGFFPath = system.file(
      package = "DNAModAnnot", "extdata",
      "ptetraurelia.modifications.sca171819.gff"
    ),
    cNameModToExtract = "m6A",
    cModNameInOutput = "6mA",
    cContigToBeAnalyzed = names(myGenome)
  )

myGposPacBioCSV <-
  ImportPacBioCSV(
    cPacBioCSVPath = system.file(
      package = "DNAModAnnot", "extdata",
      "ptetraurelia.bases.sca171819.csv"
    ),
    cSelectColumnsToExtract = c(
      "refName", "tpl", "strand", "base",
      "score", "ipdRatio", "coverage"
    ),
    lKeepExtraColumnsInGPos = TRUE, lSortGPos = TRUE,
    cContigToBeAnalyzed = names(myGenome)
  )
myGposPacBioCSV <- myGposPacBioCSV[myGposPacBioCSV$base == "A"]

# Mod report
myReport_Mod <- GetModReportPacBio(
  grangesGenome = myGrangesGenome,
  dnastringsetGenome = myGenome,
  grangesPacBioGFF = myGrangesPacBioGFF,
  gposPacBioCSVBase = myGposPacBioCSV,
  cOrgAssemblyName = "ptetraurelia_mac_51",
  cBaseLetterForMod = "A",
  cModNameInOutput = "6mA"
)
myReport_Mod

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