# Set your API key (in practice, use a more secure method)
if (FALSE) {
# To start using rsynthbio, first you need to have an account with synthesize.bio.
# Go here to create one: https://app.synthesize.bio/
set_synthesize_token()
# Get available models
models <- list_models()
# Create a query for a specific model
query <- get_example_query(model_id = "gem-1-bulk")
# Request raw counts
result <- predict_query(query, model_id = "gem-1-bulk")
# Access the results
metadata <- result$metadata
expression <- result$expression
# Explore the top expressed genes in the first sample
head(sort(expression[1, ], decreasing = TRUE))
# Use deterministic latents for reproducible results
query$deterministic_latents <- TRUE
result_det <- predict_query(query, model_id = "gem-1-bulk")
# Specify a custom total count (library size)
query$total_count <- 5000000
result_custom <- predict_query(query, model_id = "gem-1-bulk")
}
Run the code above in your browser using DataLab