Skip to content

Generating an Azimuth Reference

Andrew Butler edited this page Jul 16, 2021 · 2 revisions

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"]], 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.

Clone this wiki locally