Skip to main content
Glama
systemsomicslab

ms-data-parser

arf_pca_species

Read-only

Runs PCA on selected molecular species across sample groups and returns a score plot, with options for normalization, log transform, group orientation, and low-reliability sample projection.

Instructions

選んだ分子種(arf_plot_species と同じ項目指定・除外)で PCA を回し、スコア図を返す。

  • 対象の試料は groups に入る試料(2 群に入る試料は最初の群の色で 1 回だけ)。

  • low_reliability_samples は主成分の計算に使わず、投影だけする(図では白抜き)。

  • normalize: "none"(既定)/ "total"(試料ごとに選んだ分子種の合計で割り、全試料の合計の中央値を掛ける。 試料量の差を除いて組成を比べるとき)。log_transform(既定 True)で log10(x + 1)。 その後、計算に使う試料の平均と母標準偏差で autoscale。分散 0 の分子種は外す。

  • orient_by: 群名。その群の平均スコアが正になるよう主成分の符号をそろえる(符号は本来任意)。

  • ローディング(固有ベクトルの成分と相関 r)はセッションに残し、plot_pca_loadings(source="species") が描く。スコア図のファイルは save_figure(kind="pca", source="species")。

  • output: "image"(既定)/ "payload"(点列・寄与率・PC1 の r の上位と下位)。

  • 計算に使う試料が 3 未満などの入力の誤りは {"status": "error", "message": ...}。

Input Schema

NameRequiredDescriptionDefault
itemsYes
titleNo
groupsYes
outputNo
normalizeNonone
orient_byNo
require_msmsNo
log_transformNo
apply_curationNo
standard_samplesNo
low_reliability_samplesNo
exclude_auto_likely_wrongNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond readOnlyHint=true: it discloses that low_reliability_samples are excluded from the fit and only projected (rendered hollow), the exact normalization and log10(x+1) + autoscale pipeline, dropping of zero-variance species, the orient_by sign convention, that loadings are persisted to the session for plot_pca_loadings(source="species") and figures saved via save_figure(kind="pca", source="species"), plus the error envelope {"status": "error", "message": ...} for fewer than 3 usable samples.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence states the action and return, then bullets front-load the sample-set and preprocessing semantics before the persistence/output notes. Dense but each bullet carries decision-relevant information; the parenthetical normalization explanation is the only slightly verbose stretch.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter tool with no output schema and no schema descriptions, the description covers the computation pipeline, figure/payload return modes, cross-tool side effects, and the error shape. The remaining gap is the handful of boolean filter parameters (require_msms, apply_curation, exclude_auto_likely_wrong) whose effect on the input sample/feature set is never stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 12 parameters, so the description must carry the load. It explains the non-obvious ones well (normalize, log_transform, orient_by, low_reliability_samples, output), but require_msms, apply_curation, exclude_auto_likely_wrong, standard_samples and title are left entirely undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: run PCA on the selected molecular species (item specification/exclusion identical to arf_plot_species) and return a score plot. It anchors the item-selection convention to a named sibling, which makes the input intent unambiguous. It does not, however, distinguish itself from the other PCA siblings (arf_pca_preprocessed, dataset_pca).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than routed: the description explains that items/groups follow the same convention as arf_plot_species and gives a conditional for normalize="total" (when comparing composition after removing sample-amount differences). There is no explicit statement of when to prefer this over arf_pca_preprocessed or dataset_pca, nor any exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.