
Create a Blueprint using Natural Language
inquire_blueprint.Rd
Ask a Large Language Model (LLM) to create a blueprint for glycomics or glycoproteomics data analysis.
To use this function, you need to have a DeepSeek API key.
You can get a DeepSeek API key from https://platform.deepseek.com.
Then set the environment variable
DEEPSEEK_API_KEY to your API key with
Sys.setenv(DEEPSEEK_API_KEY = "your-api-key").
Usage
inquire_blueprint(
description,
exp = NULL,
group_col = "group",
model = "deepseek-chat",
max_retries = 3
)Arguments
- description
A description of what you want to analysis.
- exp
Optional. A
glyexp::experiment()object to provide more context to the LLM.- group_col
The column name of the group variable in the experiment. Default to "group".
- model
Model to use. Default to "deepseek-chat".
- max_retries
Maximum number of retries when the AI output is invalid. Default to 3.
Details
LLMs can be unstable. If you get an error, try again with another description.
Make sure to examine the returned blueprint carefully to ensure it's what you want.
You can also create parallel analysis branches with br("name", step_..., step_...),
which will namespace outputs with the branch prefix.
If the LLM needs required information to proceed, it may ask clarifying questions
interactively and then retry with your answers.
After a blueprint is generated, the description is printed and, in interactive
sessions, you can press ENTER to accept it or type new requirements to refine
the blueprint. This review step can repeat until you accept the plan.
Here are some examples that works:
"I want to know what pathways are enriched for my differentially expressed glycoforms."
"I want a heatmap and a pca plot. I have already performed preprocessing myself."
"I have a glycomics dataset. I want to calculate derived traits and perform DEA on them."