AnnotationArray | R Documentation |
This is a base class for Annotation arrays that provides common methods for creating empty arrays and ingesting data.
Duplicates are always disabled in the schemas created for AnnotationArray
objects to guarantee each array cell is associated with a unique value. This
also means that updates to an array cell will overwrite the previous value
(although previous values are still available via time-travel). For example,
consider the following AnnotationDataframe
(a child of AnnotationArray
)
with a single cell:
uri <- file.path(tempdir(), "annotdf") df <- data.frame(value = 1, row.names = "a") annotdf <- AnnotationDataframe$new(uri, verbose = FALSE) annotdf$from_dataframe(df, "id")
If we update the cell to value = 2
the previous value 1
will be
overwritten.
df$value <- 2 annotdf$from_dataframe(df, "id") annotdf$object[] #> $id #> [1] "a" #> #> $value #> [1] 2 #> #> attr(,"query_status") #> [1] "COMPLETE"
If duplicates were allowed the result would be:
## $id ## [1] "a" "a" ## ## $value ## [1] 1 2 ## ## attr(,"query_status") ## [1] "COMPLETE"
tiledbsc::TileDBObject
-> tiledbsc::TileDBArray
-> AnnotationArray
tiledbsc::TileDBObject$class()
tiledbsc::TileDBObject$exists()
tiledbsc::TileDBArray$add_metadata()
tiledbsc::TileDBArray$array_exists()
tiledbsc::TileDBArray$attributes()
tiledbsc::TileDBArray$attrnames()
tiledbsc::TileDBArray$dimensions()
tiledbsc::TileDBArray$dimnames()
tiledbsc::TileDBArray$fragment_count()
tiledbsc::TileDBArray$get_metadata()
tiledbsc::TileDBArray$initialize()
tiledbsc::TileDBArray$print()
tiledbsc::TileDBArray$reset_query()
tiledbsc::TileDBArray$schema()
tiledbsc::TileDBArray$set_query()
tiledbsc::TileDBArray$tiledb_array()
clone()
The objects of this class are cloneable with this method.
AnnotationArray$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.