uniqueOrder | R Documentation |
This function can be used to calculate unique numerical identifiers
for each of the GRangesList
elements. Elements of
GRangesList
are unique when the GRanges
inside are not duplicated, so ranges differences matter as well as
sorting of the ranges.
uniqueOrder(grl)
grl |
a |
an integer vector of indices of unique groups
uniqueGroups
Other ORFHelpers:
defineTrailer()
,
longestORFs()
,
mapToGRanges()
,
orfID()
,
startCodons()
,
startSites()
,
stopCodons()
,
stopSites()
,
txNames()
,
uniqueGroups()
gr1 <- GRanges("1", IRanges(1,10), "+")
gr2 <- GRanges("1", IRanges(20, 30), "+")
# make a grl with duplicated ORFs (gr1 twice)
grl <- GRangesList(tx1_1 = gr1, tx2_1 = gr2, tx3_1 = gr1)
uniqueOrder(grl) # remember ordering
# example on unique ORFs
uniqueORFs <- uniqueGroups(grl)
# now the orfs are unique, let's map back to original set:
reMappedGrl <- uniqueORFs[uniqueOrder(grl)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.