Generating an Azimuth Reference - satijalab/azimuth GitHub Wiki
AzimuthReference
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.
Saving the annoy index
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"](/satijalab/azimuth/wiki/"refdr.annoy.neighbors"), file = "idx.annoy")
Validating an Azimuth Reference
The Azimuth package also provides a validation function called ValidateAzimuthReference to check that a given Seurat object meets the specifications outlined above.