AI is no longer used only to generate R or Python code through conversation. “AI agents” that can execute code and commands themselves are also emerging. MedgeClaw is an open-source AI agent environment designed to support bioinformatics analyses, including RNA-Seq. Users can request an analysis through chat, have the AI perform the necessary processing in R or Python, and inspect the generated code, figures, and tables in RStudio, JupyterLab, or the Research Dashboard.
Because users can inspect the generated scripts, CSV files, figures, and intermediate outputs, MedgeClaw is more transparent than a fully black-box service that returns only the final results. The dashboard is designed to display the code and output from each step. By bringing R, Python, RStudio, and JupyterLab together within a Docker environment, it can also standardize the package environment to some extent. These features reflect an emphasis on reproducibility and code inspectability.
However, Even as AI agents make automated RNA-Seq analysis easier, neither the validity of the analysis nor the coherence among its results is automatically guaranteed.
This article therefore introduces a workflow in which RNA-Seq analysis is performed using MedgeClaw, Gene Counts and sample information are exported, and the data and analysis results are then examined using Subio Platform. It also explains how to obtain a second opinion on an analysis when it is difficult to evaluate the results independently.
What Is MedgeClaw?
MedgeClaw is an AI agent environment for biomedical research that combines OpenClaw, Claude Code, scientific research Skills, and R and Python analysis environments. According to the official repository, users can submit research instructions through services such as WhatsApp, Slack, and Discord. The AI then performs the analysis, and the results can be examined in the Research Dashboard, RStudio, JupyterLab, and related environments.
The R environment can include packages widely used for biological data analysis, such as DESeq2, edgeR, Seurat, and clusterProfiler. A Python environment is also available, allowing it to support a wide range of tasks, including RNA-Seq, single-cell RNA-Seq, clinical statistics, and drug discovery-related analyses. Rather than being a new RNA-Seq analysis algorithm, MedgeClaw is an integrated environment for operating existing analysis tools and packages through AI.
AI Can Execute the Analysis, Not Just Write the Code
In a conventional RNA-Seq workflow involving generative AI, the user asks the AI how to perform the analysis, copies the generated R or Python code into a local environment, runs it, and then returns to the AI for corrections when an error occurs. This process may need to be repeated several times.
MedgeClaw aims not only to suggest code, but also to execute code and commands within the analysis environment and generate the resulting files. For example, Gene Counts and sample information can be provided with an instruction such as the following.
Using counts.tsv and sample_information.tsv,
perform an RNA-Seq differential expression analysis
comparing the Treatment and Control groups.
Review the sample information
and construct an appropriate comparison model.
Save the code used for the analysis,
the data before and after normalization,
the PCA results,
the differential expression analysis results,
and the main figures.
When the AI agent functions as intended, it can proceed continuously from data import to analysis code generation, command execution, and result file creation. Many steps that previously had to be connected manually may therefore be carried out through natural-language instructions.
As tools of this kind emerge and develop, the meaning of “learning RNA-Seq data analysis” will also change. The central focus of learning needs to shift from “becoming able to operate individual tools” to “thinking about the validity of the question, the analytical procedure, and the results.”
However, It Does Not Guarantee the Validity of the Analysis
MedgeClaw can perform an analysis automatically, but it does not guarantee that the generated results are appropriate for the research objective or the data. Furthermore, even when each individual tool is used appropriately, the relationships among the analysis results and the consistency of interpreting those results together are not automatically guaranteed. This issue is not unique to MedgeClaw. It applies broadly to AI agents and automated analysis pipelines.
For example, even when the analysis code runs without errors and results are produced using established methods such as DESeq2 or edgeR, the following questions still remain.
- Were the comparison groups defined appropriately?
- Should a paired design have been considered?
- Were the criteria for removing low-Count genes appropriate?
- Is it appropriate to exclude samples that appear to be outliers?
- Can the PCA, heatmap, and DEG analysis results generated together legitimately be interpreted in relation to one another?
- Have batch effects been distinguished from biological differences?
- Could the detected significant differences have been caused by measurement bias?
All such validation must remain the responsibility of the analyst.
Therefore, even when analyses can be performed automatically, tools that allow people to inspect and validate the results remain necessary. Subio Platform is suitable for this purpose.
Exporting Gene Counts and Sample Information for Subio Platform
To examine data analyzed with MedgeClaw in Subio Platform, at minimum, a Gene Counts table containing all genes and all samples, together with a table linking sample names to their experimental conditions, must be exported from MedgeClaw as tab-delimited text files.
However, MedgeClaw may not accurately understand the import specifications of Subio Platform or exactly which values the user wants to examine. If it is instructed only to “export files that can be analyzed in Subio Platform,” it may export only the genes retained after filtering for differential expression analysis, export normalized values rather than raw Counts, or select only DEGs instead of all genes.
It may also round Count values, remove version numbers from Ensembl Gene IDs, combine genes that share the same Gene Symbol, automatically convert sample names into formats that are easier to handle in R, or omit information such as Batch, Time, and Patient while retaining only Condition. It is therefore safer to specify in advance whether Gene IDs and sample names may be modified and how missing or duplicated values should be handled.
In addition to specifying which values should be exported, it is important to instruct the AI to report the processing it performed in as much detail as possible. Based on these considerations, a prompt such as the following can be used.
Using the data from this RNA-Seq analysis,
create the following tab-delimited files.
1. A table containing Gene Counts for all genes and all samples
- Row 1: Header row. Column 1 must be "Ensembl Gene ID", and Column 2 onward must contain the Sample IDs.
- Row 2 onward: Data rows. Column 1 must contain the Ensembl Gene ID for each gene, and Column 2 onward must contain the Gene Counts for each sample.
- Include all genes before filtering.
- Preserve the unnormalized and unprocessed Gene Counts.
- If the values include decimals, preserve the original values without rounding or converting them to integers.
- Preserve zero values as 0.
- If NA values, blank cells, or other missing values are present, do not infer or impute them. Export them as missing values.
- Output filename: gene_counts.txt
2. A table linking sample names to experimental parameters
- Row 1: Header row. Column 1 must be "Sample ID", and Column 2 onward must contain the parameter names.
- Row 2 onward: Data rows. Column 1 must contain the Sample ID for each sample, and Column 2 onward must contain the parameter values for each sample.
- Use exactly the same sample names as those used in the Gene Counts table.
- Include all available experimental information without omission, including Condition, Treatment, Time, Batch, Patient, and any other available parameters.
- Output filename: sample_parameters.txt
Before exporting the files, confirm the following:
- The sample names in the two files match exactly.
- There are no duplicated sample names.
- There are no duplicated Gene IDs.
- Report the number of genes, samples, and parameters.
- Report all data processing that was performed.
An example of the Gene Counts output is shown below.
Ensembl Gene ID Control_1 Control_2 Treatment_1 Treatment_2
ENSG00000141510 1254 1388 975 1042
ENSG00000146648 438 502 1620 1715
ENSG00000157764 82 75 390 421
An example of the sample information output is shown below.
Sample ID Condition Treatment Time Batch
Control_1 Control Vehicle 24h Batch1
Control_2 Control Vehicle 24h Batch1
Treatment_1 Treatment DrugA 24h Batch1
Treatment_2 Treatment DrugA 24h Batch1
Require a Detailed Report of the Automated Analysis
When examining Gene Counts and sample information in Subio Platform, the processing performed during the automated MedgeClaw analysis should also be reported in as much detail as possible. Unless it is known what type of values the starting data contained and what preprocessing and filtering were used to generate each analysis result, it will not be possible to correctly determine why differences arose between the automated analysis and the results obtained through examination or reanalysis in Subio Platform.
In addition, for this automated analysis,
report the following information for each analysis and output:
- Name of the analysis or output
- Input files used
- Preprocessing and normalization applied to the input values
- Genes that were excluded and the exclusion criteria
- Samples that were excluded and the reasons for exclusion
- Analysis tools and options used
- Values used for the analysis or visualization
- Data transformations and display settings used for visualization
- Conditions selected by the AI and the reasons for those selections
- Points that could not be confirmed and areas of uncertainty in the analysis
Save this information as analysis_report.txt.
Using this information as a reference, the distribution of Gene Counts, relationships among samples, changes before and after filtering, PCA, clustering, and the expression patterns of individual genes can be examined in Subio Platform.
The purpose of examining the data in Subio Platform is not simply to repeat the exact same procedure that MedgeClaw performed. For example, the following points can be examined.
- Whether the Count distributions differ substantially among samples
- Whether those differences affect the DEG analysis or clustering results
- Whether the degree of variability differs substantially among experimental groups
- Whether instability caused by low Counts has a major influence on the analysis
- Whether the PCA and clustering results correspond to the experimental conditions
- Whether only certain samples are separated from the other samples
- Whether Condition and Batch are confounded
- Whether the results change substantially under different filtering criteria
If the same pattern can be confirmed using different methods, this provides evidence supporting the robustness of the conclusion. However, in real RNA-Seq data analysis, the characteristics of the data and the analysis results may lead even human analysts to different judgments.
In such cases, the reasons for the disagreement and the assumptions underlying each analytical approach should be made explicit. Analyses based on multiple scenarios should then be performed, and their results should be compared. For example, excluding a sample that appears to be an outlier as a technical abnormality may produce a different result from retaining it as part of the biological variability.
However, even after multiple analysis results have been compared, the correct assumption cannot always be determined from the data alone. In practice, the analytical strategy often has to be selected through the analyst’s judgment, based on the research objective, the experimental design, the characteristics of the data, and the way in which each result is evaluated. AI cannot make this type of judgment, and it must therefore be undertaken by a human analyst. The results should also not be treated as objective facts independent of the assumptions that were selected. They must be interpreted in light of the assumptions and judgments under which they were obtained.
▶ RNA-Seq Data Analysis Tutorial
When Evaluation Is Difficult, Share the Analysis Results and Consult a Third Party
For analysis results generated by an AI agent, you may want a third party to examine whether the same pattern can be obtained using another analytical method and whether any comparison settings or preprocessing decisions have been overlooked.
In Subio Platform, imported data, sample information, normalization and filtering settings, and generated analysis results can be saved in an SSA file. By sharing this SSA file with collaborators or data analysts, you can consult with them about the analytical strategy and the interpretation of the results while examining the same data and analysis state in Subio Platform.
Unlike sharing only figures or analysis results, an SSA file allows users to return to the original data, change filtering conditions, and generate alternative analysis results for further examination. It can therefore also be used to identify the assumptions under which the results were produced and to compare multiple possibilities.
If it remains difficult to reach a conclusion even after consulting collaborators, or if you would like the analysis results to be independently reassessed from a third-party perspective, you can use Subio’s data analysis service .
With this service, you can send us an SSA file created in Subio Platform, and request a second opinion on the analysis based on the data and analysis content stored in the file. Alternatively, you can send us the Gene Counts and use the service to compare the results generated by Subio with those obtained using an AI agent such as MedgeClaw.
You Can Also Review the Results Together in an Online Meeting
If you would prefer to discuss the analysis directly, please use our online training service . During a session of up to three hours, you can share your screen with us and review the analysis results and data together.
AI Agents and Subio Platform Are Not Competing Approaches
AI agents such as MedgeClaw and visualization and analysis environments such as Subio Platform are not intended to replace one another. They serve different roles.
- MedgeClaw supports code generation, analysis execution, and file organization.
- Subio Platform supports examination of the overall data structure and the analysis results.
- The analysis service provides third-party validation when the results are difficult to evaluate.
- The analytical strategy and final interpretation are determined by people who understand the research objective and experimental design.
A complementary way to use the two is to allow AI to perform the analysis while ensuring that people remain able to inspect the original data and the analysis results.
Transparency Alone Does Not Ensure the Quality of an Analysis
One reason researchers have been required to deposit raw omics data in public databases such as GEO when publishing scientific papers is to allow third parties to return to the original data and examine the analysis results.
However, even when raw data are publicly available, reanalyzing them requires substantial time and effort, as well as knowledge of data processing and statistical analysis. In practice, relatively few people have been able to perform this type of validation. As a result, the publication of raw data has not necessarily functioned as a mechanism that substantively ensures the quality of an analysis.
The same issue applies to the publication of analysis scripts and the use of Docker or similar systems to standardize the analysis environment. Even if a script can be executed and the same result can be reproduced, this does not demonstrate that the comparison design, preprocessing, filtering, statistical method, or relationships among the different analysis results were appropriate. Examining these aspects still requires time and effort, as well as an understanding of data analysis.
Therefore, publishing raw data, scripts, and analysis environments is important, but these measures alone cannot ensure analytical quality. The fundamental response to this problem is to increase the number of people who can examine published data and analysis procedures and judge whether they are valid.
As AI makes analysis easier to execute, the ability to consider which data should be used, which assumptions should be adopted, and how far the results can legitimately be interpreted becomes even more important.
