ssvAnnotateSubjectGRanges | R Documentation |
ssvAnnotateSubjectGRanges
ssvAnnotateSubjectGRanges(
annotation_source,
subject_gr,
annotation_name = NULL,
multi_resolver_FUN = "default"
)
## S4 method for signature 'GRanges'
ssvAnnotateSubjectGRanges(
annotation_source,
subject_gr,
annotation_name = NULL,
multi_resolver_FUN = "default"
)
## S4 method for signature 'list'
ssvAnnotateSubjectGRanges(
annotation_source,
subject_gr,
annotation_name = NULL,
multi_resolver_FUN = "default"
)
## S4 method for signature 'GRangesList'
ssvAnnotateSubjectGRanges(
annotation_source,
subject_gr,
annotation_name = NULL,
multi_resolver_FUN = "default"
)
annotation_source |
A single GRanges, a list of GRanges, or a GRangesList |
subject_gr |
The base GRanges to add annotation mcols to. |
annotation_name |
Optional name for single GRanges. Required for list inputs if list does not have names. |
multi_resolver_FUN |
Optional function to resolve multiple overlapping
annotation source regions per subject region. This function must accept 2
arguments. |
GRanges with the same regions as subject_gr
but with addtional
mcols added from annotation_source.
library(GenomicRanges)
data(CTCF_in_10a_narrowPeak_grs)
np_grs = CTCF_in_10a_narrowPeak_grs
olap_gr = ssvOverlapIntervalSets(np_grs)
# annotating with a signle GRanges is OK
ssvAnnotateSubjectGRanges(np_grs$MCF10A_CTCF, olap_gr)
# provide a name if that's useful
ssvAnnotateSubjectGRanges(np_grs$MCF10A_CTCF, olap_gr,
annotation_name = "MCF10A")
# a named list adds each annotation
ssvAnnotateSubjectGRanges(np_grs, olap_gr)
# overriding list names is an option
ssvAnnotateSubjectGRanges(np_grs, olap_gr, LETTERS[1:3])
# GRangeList are handled like a standard list
ssvAnnotateSubjectGRanges(GRangesList(np_grs), olap_gr, LETTERS[1:3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.