ImportPacBioGFF: ImportPacBioGFF Function (DaLoad)

View source: R/DaLoad.R

ImportPacBioGFFR Documentation

ImportPacBioGFF Function (DaLoad)

Description

Import PacBio GFF file, extract one modification, rename this modification and convert it as a GRanges object with new colnames similar to PacBio CSV file containing data from all bases sequenced.

Usage

ImportPacBioGFF(
  cPacBioGFFPath,
  cNameModToExtract,
  cModNameInOutput,
  cContigToBeAnalyzed = NULL,
  lKeepSequence = TRUE
)

Arguments

cPacBioGFFPath

Path to a PacBio GFF file containing modification detection data.

cNameModToExtract

Name of modification to be extracted.

cModNameInOutput

Name for the extracted modification in the output.

cContigToBeAnalyzed

Names of contigs for which the data will be kept. If NULL, data from all contigs available will be imported. Defaults to NULL.

lKeepSequence

If TRUE, the sequence of the base will be retained in one column. Otherwise, it will be discarded to reduce object size. Defaults to TRUE.

Examples

# Loading genome data
myGenome <- Biostrings::readDNAStringSet(system.file(
  package = "DNAModAnnot", "extdata",
  "ptetraurelia_mac_51_sca171819.fa"
))
names(myGenome)

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

# Loading PacBio data for 2 scaffolds only
myGrangesPacBioGFF <-
  ImportPacBioGFF(
    cPacBioGFFPath = system.file(
      package = "DNAModAnnot", "extdata",
      "ptetraurelia.modifications.sca171819.gff"
    ),
    cNameModToExtract = "m6A",
    cModNameInOutput = "6mA",
    cContigToBeAnalyzed = c("scaffold51_18", "scaffold51_19")
  )
myGrangesPacBioGFF

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