Description Usage Arguments Value Note See Also Examples
When used in genomic context, the function annotates genomic positions of interest with information like if they were in a gene or cpg island or whatever annotation that was supplied in the subject.
1 2 3 4 5 6 7 8 9 10 |
sites.rd |
GRanges object to be used as the query. |
features.rd |
GRanges object to be used as the subject or the annotation table. |
colnam |
column name to be added to sites.rd for the newly calculated annotation...serves a core! If allSubjectCols=TRUE, then this is used as a prefix to all metadata column. |
asBool |
Flag indicating whether to return results as TRUE/FALSE or the property of an overlapping feature..namely feature name and orientation if available. Defaults to FALSE. |
feature.colnam |
column name from features.rd to be used for retrieving the feature name. By default this is NULL assuming that features.rd has a column that includes the word 'name' somewhere in it. Not required if asBool=TRUE or allSubjectCols=TRUE |
parallel |
use parallel backend to perform calculation with
|
allSubjectCols |
Flag indicating whether to return all annotations or metadata columns from features.rd. Defaults to FALSE. |
overlapType |
see |
a GRanges object with new annotation columns appended at the end of sites.rd.
If parallel=TRUE, then be sure to have a parallel backend registered
before running the function. One can use any of the following libraries
compatible with foreach
: doMC, doSMP, doSNOW,
doMPI. For example: library(doMC); registerDoMC(2)
makeGRanges
, getFeatureCounts
,
getNearestFeature
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Convert a dataframe to GRanges object
data(sites)
alldata.rd <- makeGRanges(sites, soloStart = TRUE)
data(genes)
genes.rd <- makeGRanges(genes)
InGenes <- getSitesInFeature(alldata.rd, genes.rd, "InGene")
InGenes
## Not run:
InGenes <- getSitesInFeature(alldata.rd, genes.rd, "InGene", asBool = TRUE)
InGenes
## Parallel version of getSitesInFeature
InGenes <- getSitesInFeature(alldata.rd, genes.rd, "InGene", asBool = TRUE,
parallel = TRUE)
InGenes
InGenes <- getSitesInFeature(alldata.rd, genes.rd, "InGene",
allSubjectCols = TRUE, parallel = TRUE)
InGenes
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.