getMeanDPTrack: getMeanDPTrack

View source: R/get-mean-dp-track.R

getMeanDPTrackR Documentation

getMeanDPTrack

Description

Generate the mean DP (Depth) DataTrack (from Gviz) for cells

Usage

getMeanDPTrack(
  chrom = "chr1",
  path_loc,
  nwindow = 80,
  sampleName,
  barcodeFile,
  plot_type = "hist",
  selectedBarcodes = NULL,
  snp_track = NULL,
  log = TRUE
)

Arguments

chrom

the chromosome

path_loc

the path prefix to the output files from sscocaller including "*_totalCount.mtx" and "_altCount.mtx"

nwindow

the number of windows for binning the chromosome

sampleName

the sample name, which is the prefix of sscocaller's output files

barcodeFile

the barcode file containing the list of cell barcodes used as the input file for sscocaller

plot_type,

the DataTrack plot type, default to be 'hist'

selectedBarcodes,

the selected cell barcodes which should be the barcodes that have been called crossovers for. If not supplied then all cells are counted.

snp_track

the SNP position track which is used for obtaining the SNP chromosome locations. It could be omitted and the SNP positions will be acquired from the "*_snpAnnot.txt" file.

log,

whether the histogram of SNP density should be plotted on log scale (log10)

Value

DataTrack object plotting the mean DP histogram for windowed chromosomes

Author(s)

Ruqian Lyu

Examples

demo_path <-paste0(system.file("extdata",package = "comapr"),"/")
meanDP_track <- getMeanDPTrack(chrom ="chr1",
                               path_loc = demo_path,
                               sampleName = "s1",
                               barcodeFile = paste0(demo_path,
                                                    "s1_barcodes.txt"))


ruqianl/comapr documentation built on Oct. 27, 2023, 5:12 a.m.