Skip to contents

Plot the read coverages of a contig and its associated pattern-match for Prophage-like, Sloping and HighCovNoPattern classifications. Returns a list of ggplot objects.

Usage

plotTrIdentResults(
  VLPpileup,
  WCpileup,
  TrIdentResults,
  onlyPlot,
  logScale = FALSE,
  allPlots = FALSE,
  saveFilesTo
)

Arguments

VLPpileup

VLP-fraction pileup file generated by mapping sequencing reads from a sample's ultra-purified VLP-fraction mapped to the sample's whole-community metagenome assembly. The pileup file MUST have the following format: * V1: Contig accession * V2: Mapped read coverage values averaged over 100 bp windows * V3: Starting position (bp) of each 100 bp window. Restarts from 0 at the start of each new contig. * V4: Starting position (bp) of each 100 bp window. Does NOT restart at the start of each new contig.

WCpileup

A whole-community pileup file generated by mapping sequencing reads from a sample's whole-community mapped to the sample's whole-community metagenome assembly. The pileup file MUST have the following format: * V1: Contig accession * V2: Mapped read coverage values averaged over 100 bp windows * V3: Starting position (bp) of each 100 bp window. Restarts from 0 at the start of each new contig. * V4: Starting position (bp) of each 100 bp window. Does NOT restart at the start of each new contig.

TrIdentResults

Output from `TrIdentClassifier()`.

onlyPlot

Optional, use to 'only plot' the contigs classified as either "Prophage-like", "Sloping", or "HighCovNoPattern".

logScale

TRUE or FALSE, display VLP-fraction read coverage in log10 scale. Default is FALSE.

allPlots

TRUE or FALSE. Display read coverage patterns for all contigs greater than the length cutoff (default 30 kbp). Default is FALSE. *Warning* This may produce a lot of plots and a very large list object!

saveFilesTo

Optional, Provide a path to the directory you wish to save output to. A folder will be made within the provided directory to store results.

Value

Large list containing ggplot objects

Examples

data("VLPFractionSamplePileup")
data("WholeCommunitySamplePileup")
data("TrIdentSampleOutput")

patternMatches <- plotTrIdentResults(
  VLPpileup = VLPFractionSamplePileup,
  WCpileup = WholeCommunitySamplePileup,
  TrIdentResults = TrIdentSampleOutput
)