Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BDB-Genomics/AlphaGenomeR/llms.txt

Use this file to discover all available pages before exploring further.

alphagenome_get_contact_maps() extracts 3D chromatin contact frequency predictions from the list returned by alphagenome_query(). These predictions capture the spatial organization of the genome within the queried interval, analogous to Hi-C data. The function accesses the contact_maps slot of the Python response object via reticulate::py_get_attr() and converts the contact frequency matrix and any associated metadata into native R objects. If "CONTACT_MAPS" was not included in requested_outputs, the function returns NULL.

Function signature

alphagenome_get_contact_maps(response_body)

Parameters

response_body
list
required
The list returned by alphagenome_query(). Must have been called with "CONTACT_MAPS" in requested_outputs. Pass the return value of alphagenome_query() directly without modification.

Return value

result
list or NULL
Returns NULL if "CONTACT_MAPS" was not included in requested_outputs when calling alphagenome_query().Otherwise returns a named list with two elements:

Example

library(AlphaGenomeR)

api_key <- Sys.getenv("ALPHAGENOME_API_KEY")

results <- alphagenome_query(
  access_token      = api_key,
  genomic_region    = "chr17:42560601-43609177",
  requested_outputs = c("CONTACT_MAPS")
)

contacts <- alphagenome_get_contact_maps(results)

dim(contacts$values)    # 2D contact frequency matrix
head(contacts$metadata)
Include "CONTACT_MAPS" in requested_outputs when calling alphagenome_query(). The function returns NULL if "CONTACT_MAPS" was omitted.
Contact maps can be combined with other modalities in a single query. For example, requesting both "RNA_SEQ" and "CONTACT_MAPS" together lets you correlate gene expression levels with 3D genome organization in a single API call.

Build docs developers (and LLMs) love