calcExpectedPartitions {GenomicDistributions} | R Documentation |
Takes a GRanges object, then assigns each element to a partition from the provided partitionList, and then tallies the number of regions assigned to each partition. A typical example of partitions is promoter, exon, intron, etc; this function will yield the number of each for a query GRanges object There will be a priority order to these, to account for regions that may overlap multiple genomic partitions.
calcExpectedPartitions( query, partitionList, genomeSize = NULL, remainder = "Intergenic" )
query |
GRanges or GRangesList with regions to classify. |
partitionList |
An ORDERED and NAMED list of genomic partitions GRanges. This list must be in priority order; the input will be assigned to the first partition it overlaps. |
genomeSize |
The number of bases in the query genome. In other words, the sum of all chromosome sizes. |
remainder |
Which partition do you want to account for 'everything else'? |
A data.frame assigning each element of a GRanges object to a partition from a previously provided partitionList.
partitionList = genomePartitionList(geneModels_hg19$genesGR, geneModels_hg19$exonsGR, geneModels_hg19$threeUTRGR, geneModels_hg19$fiveUTRGR) chromSizes = getChromSizes('hg19') genomeSize = sum(chromSizes) calcExpectedPartitions(vistaEnhancers, partitionList, genomeSize)