-
Notifications
You must be signed in to change notification settings - Fork 32
Generating an Azimuth Reference
Andrew Butler edited this page Jul 16, 2021
·
2 revisions
The Azimuth package provides the function AzimuthReference
to generate an Azimuth compatible reference (meeting the specifications above) from an existing Seurat object. An example of its usage is below:
ref <- AzimuthReference(
object = ref,
refUMAP = "umap",
refDR = "pca",
metadata = c("class_label", "cluster_label", "subclass_label", "cross_species_cluster_label"),
dims = 1:50,
k.param = 31
)
saveRDS(ref, file = "ref.Rds")
For more examples, please see the azimuth-references repository.
In addition to the ref.Rds
file, Azimuth requires a pre-computed annoy index on the reference data. This can be saved to a file with the SaveAnnoyIndex
function.
SaveAnnoyIndex(object = ref[["refdr.annoy.neighbors"]], file = "idx.annoy")
The Azimuth package also provides a validation function called ValidateAzimuthReference to check that a given Seurat object meets the specifications outlined above.