exportInteractTrack | R Documentation |
Export the predicted gene-pair interactions calculated by
upstream function linkGenesAndPeaks
into an Interact Track file
which is compatible with UCSC
Genome Browser.
exportInteractTrack(
corrMat,
pathToCoords,
useGenes = NULL,
outputPath = getwd()
)
corrMat |
A sparse matrix of correlation with peak names as rows and gene names as columns. |
pathToCoords |
Path to the gene coordinates file. |
useGenes |
Character vector of gene names to be exported. Default
|
outputPath |
Path of filename where the output file will be stored. If
a folder, a file named |
No return value. A file located at outputPath
will be created.
bmmc <- normalize(bmmc)
bmmc <- selectGenes(bmmc)
bmmc <- scaleNotCenter(bmmc)
if (requireNamespace("RcppPlanc", quietly = TRUE) &&
requireNamespace("GenomicRanges", quietly = TRUE) &&
requireNamespace("IRanges", quietly = TRUE) &&
requireNamespace("psych", quietly = TRUE)) {
bmmc <- runINMF(bmmc)
bmmc <- alignFactors(bmmc)
bmmc <- normalizePeak(bmmc)
bmmc <- imputeKNN(bmmc, reference = "atac", queries = "rna")
corr <- linkGenesAndPeaks(
bmmc, useDataset = "rna",
pathToCoords = system.file("extdata/hg19_genes.bed", package = "rliger")
)
resultPath <- tempfile()
exportInteractTrack(
corrMat = corr,
pathToCoords = system.file("extdata/hg19_genes.bed", package = "rliger"),
outputPath = resultPath
)
head(read.table(resultPath, skip = 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.