modelNucCounts: Model nucleotide resolution counts from oligo counts

Description Usage Arguments Value Examples

View source: R/modelNucCounts.R

Description

This is the main modeling function in this pakcage. We use the counts from all oligos overlapping the nucleotide to model the nucleotide's counts. We provide 3 options to do this: (1) Take the median of the counts of all oligos tiling the nucleotide, (2) Take the sum of the counts of all oligos tiling the nucleotide or (3) Use a Bayesian network to model the "hidden layer" of nucleotides and then using conditional inference based on the observed oligo counts, obtain the nucleotide counts.

Usage

1
2
modelNucCounts(normalizedCounts, metaData, conditionLabels,
  modelMethod = c("median", "sum", "pgm"), oligoLen = NULL)

Arguments

normalizedCounts

matrix of normalized counts in the format returned by the function normCounts. Contains one row per oligo in the pool and one column for each sequenced replicate. The first column contains the name of the oligo. Make sure that the name of the transcript is in the same format as described in 'allTranscriptsCounts_Raw.tsv'. Briefly, format is "GeneName_oligoNum_Barcode". It is critical that oligoNum is second to last and separated by "_" otherwise parsing won't work properly. You can have any string downstream of oligoNum separated by _. Generally, people use barcode but it is not necessary to use the barcode.

metaData

A file with the meta data of the experiment. Should include details such as the name of genes tiled, window size, length of oligo. Please see oligoMeta.tab in extdata for reference.

conditionLabels

character vector of length two which contains the condition labels for the two conditions that are being compared.

modelMethod

The modeling method used to get nucleotide counts from oligo counts. Must be either "median", "sum", or "pgm". Defaults to "median".

oligoLen

numeric value for the length of the oligos if all oligos have the same value and this information is not included in the metadata file.

Value

modeledNucs matrix of modeled nucleotide counts

Examples

1
2
3
4
5
6
normalizedCounts <- normCounts(rawCounts = read.table(system.file("extdata", 
"allTranscriptsCounts_Raw.tsv", package = "oligoGames"), sep='\t', header=T))
metaData <- system.file("extdata", "oligoMeta.tsv", package = "oligoGames")
oligoLen <- 110
modeledNucs <- modelNucCounts(normalizedCounts, metaData, 
conditionLabels = c("Nuclei", "Total"), modelMethod = "median", oligoLen = 110)

cshukla/oligoGames documentation built on May 27, 2019, 8:44 a.m.