Description Usage Arguments Value Author(s) Examples
View source: R/transformData.R
calculate the log2 ratios, log2 cpm (count per million) ratios, or log2 odds ratios for nucleolus vs genome. pseudo-count will be used to avoid x/0 or log(0).
1 2 3 | transformData(A, B, seqnames.A, seqnames.B, pseudo.count = 1L,
transformation = c("log2OddsRatio", "log2CPMRatio", "log2Ratio"),
chrom.level.lib = TRUE, lib.size.A, lib.size.B)
|
A, B |
window-level counts for nucleolus and genome, extracted from the assays of the output of the tileCounts function |
seqnames.A, seqnames.B |
seqnames, extracted from the rowRanges of the ouput of the tileCounts function |
pseudo.count |
pseudo-count will be used to aviod x/0 or log0, defult to 1. |
transformation |
transformation type |
chrom.level.lib |
indicating whether calculating CPM or odds using sequence depth of the whole genome or the corresponding chromosome |
lib.size.A, lib.size.B |
library size for A and B. these two dataframes contain chromosome-level sequence depth for the chromosomes, which can be extracted from the metadata of the output of the tileCounts function |
a numeric vector of log2 ratios, log2 CPM ratios or log2 odds ratios.
Julie Zhu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | transformData(seq_len(10), 10:1, seqnames.A = Rle(c("chr1", "chr2" ) , c(5,5)),
Rle(c("chr1", "chr2" ) , c(5,5)), transformation = "log2OddsRatio",
chrom.level.lib = FALSE, lib.size.A = cbind(c("chr1", "chr2"), c(10000, 12000)),
lib.size.B = cbind(c("chr1", "chr2"), c(10000, 12000)))
transformData(seq_len(10), 10:1, seqnames.A = Rle(c("chr1", "chr2" ) , c(5,5)),
Rle(c("chr1", "chr2" ) , c(5,5)), transformation = "log2CPMRatio",
chrom.level.lib = FALSE, lib.size.A = cbind(c("chr1", "chr2"), c(10000, 12000)),
lib.size.B = cbind(c("chr1", "chr2"), c(10000, 12000)))
transformData(seq_len(10), 10:1, seqnames.A = Rle(c("chr1", "chr2" ) , c(5,5)),
Rle(c("chr1", "chr2" ) , c(5,5)), transformation = "log2CPMRatio",
chrom.level.lib = TRUE, lib.size.A = cbind(c("chr1", "chr2"), c(100, 12000)),
lib.size.B = cbind(c("chr1", "chr2"), c(10000, 200)))
transformData(seq_len(10), 10:1, seqnames.A = Rle(c("chr1", "chr2" ) , c(5,5)),
Rle(c("chr1", "chr2" ) , c(5,5)), transformation = "log2OddsRatio",
chrom.level.lib = TRUE, lib.size.A = cbind(c("chr1", "chr2"), c(100, 12000)),
lib.size.B = cbind(c("chr1", "chr2"), c(10000, 200)))
transformData(seq_len(10), 10:1, transformation = "log2Ratio")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.