Description Usage Arguments Value Examples
View source: R/meta_analysis_functions.R
This function is used to obtain a binary matrix of overlaps between a list of GRanges objects (GRangesList object) and a target GRanges object. The resulting matrix has N rows where N is the number of intervals in the target GRanges object and M columns where M is the number GRanges objects in the query GRangesList object.
1 2 3 4 5 6 | getIntervalOverlapMatrix(
queryRegionsList,
targetRegions,
targetRegionNames = NULL,
nodeN = 1
)
|
queryRegionsList |
A GRangesList object |
targetRegions |
A GRanges object |
targetRegionNames |
Optional vector of names to be used as rownames in the resulting matrix. The vector indices must correspond to the intervals in targetRegions object. |
nodeN |
Positive integer value to use one or more cpus for parallel computation (default: 1) |
A binary matrix object consisting of number of rows equal to the number of intervals in targetRegions object, and number of columns equal to the number of GRanges objects available in the queryRegionsList object.
1 2 3 4 5 6 7 8 | data(gff)
input1 <- system.file("extdata", "testfile.bed", package='RCAS')
input2 <- system.file("extdata", "testfile2.bed", package='RCAS')
bedData <- RCAS::importBedFiles(filePaths = c(input1, input2))
M <- RCAS::getIntervalOverlapMatrix(
queryRegionsList = bedData,
targetRegions = gff[gff$type == 'gene',][1:100],
targetRegionNames = gff[gff$type == 'gene',][1:100]$gene_name)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.