Write a report
In Reports you give an AI agent an analysis plan. It writes and runs the R code, writes the pages and renders a Quarto website of the report. This page goes through one report from plan to publishing. It assumes a running session; see Reports on Roihu or Reports on your own computer to start one.
The Tengeler2020 example report was written this way from the plan in Write the plan, with Claude Code and one message. It took the agent 24 minutes and cost USD 4.03 on the key’s account.
Before you start
Write the plan
The agent works from your plan, so the plan decides what the report contains. Write it as you would for a colleague who will do the analysis:
- Question: what the report should answer.
- Data: where the data are and what the important variables mean.
- Analyses: the steps, with the methods, covariates and thresholds you want.
- Report: what the result should be, such as a website with a page per analysis.
The plan of the example, slightly shortened:
# Microbiome: ADHD donor microbiota in humanised mice
**Question.** Does the gut microbiota of germ-free mice colonised with stool
from individuals with ADHD differ from that of mice colonised with stool from
healthy controls?
**Data.** `Tengeler2020` in mia (`data(Tengeler2020, package = "mia")`): a
TreeSummarizedExperiment with 151 taxa and 27 mice, taxonomy from kingdom to
genus. Sample variables: `patient_status` (ADHD or Control), `cohort`
(Cohort_1–3), `patient_status_vs_cohort`, `sample_name`.
**Analyses.**
1. Samples per group and cohort, library sizes, dominant phyla and genera per group.
2. Alpha diversity (observed richness, Shannon) by `patient_status`, with cohort
taken into account.
3. Bray–Curtis dissimilarity on relative abundances, PCoA coloured by group,
PERMANOVA of `patient_status` with cohort as a term.
4. Differential abundance at genus level between ADHD and Control, adjusted for
cohort, q < 0.05.
The sample is small (27 mice): report effect sizes and uncertainty, and do not
claim more than the design supports.
**Report.** A Quarto website.
Ask only if this plan is ambiguous in a way that changes the analysis.The last line keeps the agent working instead of asking about details it can decide itself. Leave it out if you would rather answer more questions.
Start the agent
- In the workspace header, open the agent menu. Its tooltip says Agent: and the agent’s name.
- Under Switch Agent Engine, choose the agent, even if it is already the one shown. A new conversation starts in the report’s folder, with OmicsBase’s instructions for writing a report website.
- Paste your plan into the message box at the bottom and send it.
Start every new task in a report from the agent menu. New Chat in the left column starts a conversation outside the report’s folder, without OmicsBase’s instructions: the agent then has to look for your files, and writes its own outside the report’s folder.
While the agent works
The conversation shows each step: Running with the command it runs, and Thinking while it plans. Choose a step to see the command and its output. The agent reads the data, writes R code, runs it, writes the pages and renders the site.
If the agent asks a question, answer it in the message box. To stop it, choose the pause button in the message box.
You do not need to keep the page open. The agent keeps working on Roihu, or on your own computer, when you close the tab or the browser. When you come back, open the report’s Workspace tab: the conversation shows everything it did meanwhile. See Leave and come back.
Your model provider charges your key for every step. Its own website shows what you have used, for example the Anthropic Console for an Anthropic key.
See the report
When the agent has finished, it sums up what it did and what it checked.
- In the right-hand panel, choose Browser.
- Choose Report to see the website. Pipeline lists its pages.
To render the report again yourself, choose the play button in the header.
The report’s files are in the report’s folder: the Quarto pages (.qmd), the R code and the rendered website in _site.
Ask for changes
Send what you want changed in the same conversation, for example Add a table of the genera with q < 0.05 to the overview or Use one decimal for the fold changes. The agent knows the report it wrote and renders it again.
Start a new conversation from the agent menu for a separate task. The new conversation sees the report’s files but not the earlier conversation.
Publish
When the report is ready, choose Publish, the share button beside the play button. You choose who can open it: people you name, or anyone with the link. Publish a report.
Finish
Stop the session when you are done; a session on Roihu uses your project’s billing units until it stops or its time runs out. Your report, its files and its conversations stay for your next session.
If something goes wrong
| What you see | What to do |
|---|---|
| ACP error: [-32000] Authentication required | The agent has no key. Add it under Settings → Secrets with the exact name, then start a new conversation from the agent menu. |
| Authentication required in a conversation from an earlier session | A conversation does not keep its key from one session to the next. Start a new conversation from the agent menu; the report’s files are all there. |
| The agent cannot find your plan or data, or its files are not in the report’s folder | The conversation was started with New Chat. Start a new one from the agent menu. |
| This browser could not connect to your session. | Choose Try again. |