@yeyuan98/opencode-bioresearcher-plugin 1.6.7 → 1.6.8-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +11 -0
  3. package/dist/agents/bioresearcher/index.d.ts +0 -0
  4. package/dist/agents/bioresearcher/index.js +0 -0
  5. package/dist/agents/bioresearcher/prompt.d.ts +0 -0
  6. package/dist/agents/bioresearcher/prompt.js +0 -0
  7. package/dist/agents/bioresearcherDR/index.d.ts +0 -0
  8. package/dist/agents/bioresearcherDR/index.js +0 -0
  9. package/dist/agents/bioresearcherDR/prompt.d.ts +1 -1
  10. package/dist/agents/bioresearcherDR/prompt.js +1 -0
  11. package/dist/agents/bioresearcherDR_worker/index.d.ts +0 -0
  12. package/dist/agents/bioresearcherDR_worker/index.js +0 -0
  13. package/dist/agents/bioresearcherDR_worker/prompt.d.ts +1 -1
  14. package/dist/agents/bioresearcherDR_worker/prompt.js +1 -0
  15. package/dist/index.d.ts +0 -0
  16. package/dist/index.js +4 -3
  17. package/dist/shared/skill-sync.d.ts +0 -0
  18. package/dist/shared/skill-sync.js +0 -0
  19. package/dist/shared/tool-restrictions.d.ts +0 -0
  20. package/dist/shared/tool-restrictions.js +0 -0
  21. package/dist/skills/bioresearcher-core/README.md +0 -0
  22. package/dist/skills/bioresearcher-core/SKILL.md +0 -0
  23. package/dist/skills/bioresearcher-core/examples/contexts.json +0 -0
  24. package/dist/skills/bioresearcher-core/examples/data-exchange-example.md +0 -0
  25. package/dist/skills/bioresearcher-core/examples/template.md +0 -0
  26. package/dist/skills/bioresearcher-core/patterns/bioresearcher/analysis-methods.md +0 -0
  27. package/dist/skills/bioresearcher-core/patterns/bioresearcher/best-practices.md +0 -0
  28. package/dist/skills/bioresearcher-core/patterns/bioresearcher/python-standards.md +0 -0
  29. package/dist/skills/bioresearcher-core/patterns/bioresearcher/report-template.md +0 -0
  30. package/dist/skills/bioresearcher-core/patterns/bioresearcher/tool-selection.md +0 -0
  31. package/dist/skills/bioresearcher-core/patterns/calculator.md +0 -0
  32. package/dist/skills/bioresearcher-core/patterns/citations.md +0 -0
  33. package/dist/skills/bioresearcher-core/patterns/data-exchange.md +0 -0
  34. package/dist/skills/bioresearcher-core/patterns/json-tools.md +0 -0
  35. package/dist/skills/bioresearcher-core/patterns/progress.md +0 -0
  36. package/dist/skills/bioresearcher-core/patterns/rate-limiting.md +0 -0
  37. package/dist/skills/bioresearcher-core/patterns/retry.md +0 -0
  38. package/dist/skills/bioresearcher-core/patterns/shell-commands.md +0 -0
  39. package/dist/skills/bioresearcher-core/patterns/subagent-waves.md +0 -0
  40. package/dist/skills/bioresearcher-core/patterns/table-tools.md +0 -0
  41. package/dist/skills/bioresearcher-core/patterns/user-confirmation.md +0 -0
  42. package/dist/skills/bioresearcher-core/python/template.md +0 -0
  43. package/dist/skills/bioresearcher-core/python/template.py +0 -0
  44. package/dist/skills/bioresearcher-tests/README.md +0 -0
  45. package/dist/skills/bioresearcher-tests/SKILL.md +0 -0
  46. package/dist/skills/bioresearcher-tests/pyproject.toml +0 -0
  47. package/dist/skills/bioresearcher-tests/resources/json_samples/in_markdown.md.gz +0 -0
  48. package/dist/skills/bioresearcher-tests/resources/json_samples/nested_object.json.gz +0 -0
  49. package/dist/skills/bioresearcher-tests/resources/json_samples/schema_draft7.json.gz +0 -0
  50. package/dist/skills/bioresearcher-tests/resources/json_samples/simple_array.json.gz +0 -0
  51. package/dist/skills/bioresearcher-tests/resources/json_samples/simple_object.json.gz +0 -0
  52. package/dist/skills/bioresearcher-tests/resources/obo_sample.obo.gz +0 -0
  53. package/dist/skills/bioresearcher-tests/resources/pubmed_sample.xml.gz +0 -0
  54. package/dist/skills/bioresearcher-tests/resources/table_sample.xlsx.gz +0 -0
  55. package/dist/skills/bioresearcher-tests/test_cases/json_tests.md +0 -0
  56. package/dist/skills/bioresearcher-tests/test_cases/misc_tests.md +0 -0
  57. package/dist/skills/bioresearcher-tests/test_cases/parser_tests.md +0 -0
  58. package/dist/skills/bioresearcher-tests/test_cases/skill_tests.md +0 -0
  59. package/dist/skills/bioresearcher-tests/test_cases/table_tests.md +0 -0
  60. package/dist/skills/bioresearcher-tests/test_runner.py +0 -0
  61. package/dist/skills/demo-skill/SKILL.md +0 -0
  62. package/dist/skills/demo-skill/demo_script.py +0 -0
  63. package/dist/skills/env-jsonc-setup/SKILL.md +0 -0
  64. package/dist/skills/gromacs-guides/SKILL.md +0 -0
  65. package/dist/skills/gromacs-guides/guides/create_index.md +96 -96
  66. package/dist/skills/gromacs-guides/guides/inspect_tpr.md +160 -160
  67. package/dist/skills/long-table-summary/SKILL.md +0 -0
  68. package/dist/skills/long-table-summary/combine_outputs.py +0 -0
  69. package/dist/skills/long-table-summary/generate_prompts.py +0 -0
  70. package/dist/skills/long-table-summary/pyproject.toml +0 -0
  71. package/dist/skills/pubmed-weekly/SKILL.md +0 -0
  72. package/dist/skills/pubmed-weekly/pubmed_weekly.py +0 -0
  73. package/dist/skills/pubmed-weekly/pyproject.toml +0 -0
  74. package/dist/skills/python-setup-uv/SKILL.md +0 -0
  75. package/dist/tools/db/backends/index.d.ts +0 -0
  76. package/dist/tools/db/backends/index.js +0 -0
  77. package/dist/tools/db/backends/mongodb/backend.d.ts +0 -0
  78. package/dist/tools/db/backends/mongodb/backend.js +0 -0
  79. package/dist/tools/db/backends/mongodb/connection.d.ts +0 -0
  80. package/dist/tools/db/backends/mongodb/connection.js +0 -0
  81. package/dist/tools/db/backends/mongodb/index.d.ts +0 -0
  82. package/dist/tools/db/backends/mongodb/index.js +0 -0
  83. package/dist/tools/db/backends/mongodb/translator.d.ts +0 -0
  84. package/dist/tools/db/backends/mongodb/translator.js +0 -0
  85. package/dist/tools/db/backends/mysql/backend.d.ts +0 -0
  86. package/dist/tools/db/backends/mysql/backend.js +0 -0
  87. package/dist/tools/db/backends/mysql/connection.d.ts +0 -0
  88. package/dist/tools/db/backends/mysql/connection.js +0 -0
  89. package/dist/tools/db/backends/mysql/index.d.ts +0 -0
  90. package/dist/tools/db/backends/mysql/index.js +0 -0
  91. package/dist/tools/db/backends/mysql/translator.d.ts +0 -0
  92. package/dist/tools/db/backends/mysql/translator.js +0 -0
  93. package/dist/tools/db/core/base.d.ts +0 -0
  94. package/dist/tools/db/core/base.js +0 -0
  95. package/dist/tools/db/core/config-loader.d.ts +0 -0
  96. package/dist/tools/db/core/config-loader.js +0 -0
  97. package/dist/tools/db/core/index.d.ts +0 -0
  98. package/dist/tools/db/core/index.js +0 -0
  99. package/dist/tools/db/core/jsonc-parser.d.ts +0 -0
  100. package/dist/tools/db/core/jsonc-parser.js +0 -0
  101. package/dist/tools/db/core/validator.d.ts +0 -0
  102. package/dist/tools/db/core/validator.js +0 -0
  103. package/dist/tools/db/index.d.ts +0 -0
  104. package/dist/tools/db/index.js +0 -0
  105. package/dist/tools/db/interface/backend.d.ts +0 -0
  106. package/dist/tools/db/interface/backend.js +0 -0
  107. package/dist/tools/db/interface/connection.d.ts +0 -0
  108. package/dist/tools/db/interface/connection.js +0 -0
  109. package/dist/tools/db/interface/index.d.ts +0 -0
  110. package/dist/tools/db/interface/index.js +0 -0
  111. package/dist/tools/db/interface/query.d.ts +0 -0
  112. package/dist/tools/db/interface/query.js +0 -0
  113. package/dist/tools/db/interface/schema.d.ts +0 -0
  114. package/dist/tools/db/interface/schema.js +0 -0
  115. package/dist/tools/db/tools.d.ts +0 -0
  116. package/dist/tools/db/tools.js +0 -0
  117. package/dist/tools/db/utils.d.ts +0 -0
  118. package/dist/tools/db/utils.js +0 -0
  119. package/dist/tools/misc/calculator.d.ts +0 -0
  120. package/dist/tools/misc/calculator.js +0 -0
  121. package/dist/tools/misc/index.d.ts +1 -0
  122. package/dist/tools/misc/index.js +1 -0
  123. package/dist/tools/misc/json-extract.d.ts +0 -0
  124. package/dist/tools/misc/json-extract.js +0 -0
  125. package/dist/tools/misc/json-infer.d.ts +0 -0
  126. package/dist/tools/misc/json-infer.js +0 -0
  127. package/dist/tools/misc/json-validate.d.ts +0 -0
  128. package/dist/tools/misc/json-validate.js +0 -0
  129. package/dist/tools/misc/markdown-to-html.d.ts +19 -0
  130. package/dist/tools/misc/markdown-to-html.js +109 -0
  131. package/dist/tools/misc/marked-bundle.d.ts +1 -0
  132. package/dist/tools/misc/marked-bundle.js +1 -0
  133. package/dist/tools/misc/timer.d.ts +0 -0
  134. package/dist/tools/misc/timer.js +0 -0
  135. package/dist/tools/parser/obo/index.d.ts +0 -0
  136. package/dist/tools/parser/obo/index.js +0 -0
  137. package/dist/tools/parser/obo/obo.d.ts +0 -0
  138. package/dist/tools/parser/obo/obo.js +0 -0
  139. package/dist/tools/parser/obo/types.d.ts +0 -0
  140. package/dist/tools/parser/obo/types.js +0 -0
  141. package/dist/tools/parser/obo/utils.d.ts +0 -0
  142. package/dist/tools/parser/obo/utils.js +0 -0
  143. package/dist/tools/parser/pubmed/index.d.ts +0 -0
  144. package/dist/tools/parser/pubmed/index.js +0 -0
  145. package/dist/tools/parser/pubmed/pubmed.d.ts +0 -0
  146. package/dist/tools/parser/pubmed/pubmed.js +0 -0
  147. package/dist/tools/parser/pubmed/types.d.ts +0 -0
  148. package/dist/tools/parser/pubmed/types.js +0 -0
  149. package/dist/tools/parser/pubmed/utils.d.ts +0 -0
  150. package/dist/tools/parser/pubmed/utils.js +0 -0
  151. package/dist/tools/sandbox/bash-parser.d.ts +0 -0
  152. package/dist/tools/sandbox/bash-parser.js +0 -0
  153. package/dist/tools/sandbox/escape-scenarios.test.d.ts +0 -0
  154. package/dist/tools/sandbox/escape-scenarios.test.js +0 -0
  155. package/dist/tools/sandbox/expander.d.ts +0 -0
  156. package/dist/tools/sandbox/expander.js +0 -0
  157. package/dist/tools/sandbox/final-verification.test.d.ts +0 -0
  158. package/dist/tools/sandbox/final-verification.test.js +0 -0
  159. package/dist/tools/sandbox/hooks.d.ts +0 -0
  160. package/dist/tools/sandbox/hooks.js +0 -0
  161. package/dist/tools/sandbox/index.d.ts +0 -0
  162. package/dist/tools/sandbox/index.js +0 -0
  163. package/dist/tools/sandbox/manager.d.ts +0 -0
  164. package/dist/tools/sandbox/manager.js +0 -0
  165. package/dist/tools/sandbox/sandbox.integration.test.d.ts +0 -0
  166. package/dist/tools/sandbox/sandbox.integration.test.js +0 -0
  167. package/dist/tools/sandbox/sandbox.test.d.ts +0 -0
  168. package/dist/tools/sandbox/sandbox.test.js +0 -0
  169. package/dist/tools/sandbox/tool.d.ts +0 -0
  170. package/dist/tools/sandbox/tool.js +0 -0
  171. package/dist/tools/sandbox/types.d.ts +0 -0
  172. package/dist/tools/sandbox/types.js +0 -0
  173. package/dist/tools/sandbox/validator.d.ts +0 -0
  174. package/dist/tools/sandbox/validator.js +0 -0
  175. package/dist/tools/skill/frontmatter.d.ts +0 -0
  176. package/dist/tools/skill/frontmatter.js +0 -0
  177. package/dist/tools/skill/index.d.ts +0 -0
  178. package/dist/tools/skill/index.js +0 -0
  179. package/dist/tools/skill/registry.d.ts +0 -0
  180. package/dist/tools/skill/registry.js +0 -0
  181. package/dist/tools/skill/tool.d.ts +0 -0
  182. package/dist/tools/skill/tool.js +0 -0
  183. package/dist/tools/skill/types.d.ts +0 -0
  184. package/dist/tools/skill/types.js +0 -0
  185. package/dist/tools/table/index.d.ts +0 -0
  186. package/dist/tools/table/index.js +0 -0
  187. package/dist/tools/table/tools.d.ts +0 -0
  188. package/dist/tools/table/tools.js +0 -0
  189. package/dist/tools/table/utils.d.ts +0 -0
  190. package/dist/tools/table/utils.js +0 -0
  191. package/dist/version.d.ts +1 -1
  192. package/dist/version.js +1 -1
  193. package/package.json +3 -2
  194. package/dist/skills/pzfx-io/SKILL.md +0 -111
  195. package/dist/skills/pzfx-io/guides/convert.md +0 -102
  196. package/dist/skills/pzfx-io/guides/read-parse.md +0 -116
  197. package/dist/skills/pzfx-io/guides/schema-reference.md +0 -167
  198. package/dist/skills/pzfx-io/guides/write-edit.md +0 -150
  199. package/dist/skills/pzfx-io/pyproject.toml +0 -6
  200. package/dist/skills/pzfx-io/pzfx.py +0 -1156
@@ -1,102 +0,0 @@
1
- # Converting PZFX Files
2
-
3
- ## Convert to CSV
4
-
5
- ```bash
6
- uv run python pzfx.py convert <file.pzfx> --format csv
7
- ```
8
-
9
- Creates `<basename>.csv` next to the original file.
10
-
11
- ## Convert to TSV
12
-
13
- ```bash
14
- uv run python pzfx.py convert <file.pzfx> --format tsv
15
- ```
16
-
17
- ## Convert to JSON
18
-
19
- ```bash
20
- uv run python pzfx.py convert <file.pzfx> --format json
21
- ```
22
-
23
- JSON output includes full structured data:
24
- ```json
25
- {
26
- "success": true,
27
- "table_id": "Table0",
28
- "table_type": "OneWay",
29
- "columns": [...],
30
- "row_titles": [...],
31
- "source_file": "/path/to/file.pzfx"
32
- }
33
- ```
34
-
35
- ## Convert Specific Table
36
-
37
- For multi-table files, convert a single table:
38
- ```bash
39
- uv run python pzfx.py convert <file.pzfx> --table 0 --format csv
40
- ```
41
-
42
- ## Convert All Tables
43
-
44
- Without `--table`, all tables are converted. For CSV/TSV, each table gets a separate file:
45
- ```
46
- basename_Table0.csv
47
- basename_Table1.csv
48
- ```
49
-
50
- ## Custom Output Path
51
-
52
- ```bash
53
- uv run python pzfx.py convert <file.pzfx> --format csv --output /path/to/output.csv
54
- ```
55
-
56
- Note: `--output` is only used when converting a single table (or the last table).
57
-
58
- ## Excluded Data Modes
59
-
60
- ```bash
61
- uv run python pzfx.py convert <file.pzfx> --exclude-mode keep
62
- uv run python pzfx.py convert <file.pzfx> --exclude-mode star
63
- ```
64
-
65
- | Mode | Effect |
66
- |------|--------|
67
- | `exclude` (default) | Excluded values omitted (empty cells) |
68
- | `keep` | Excluded values preserved as raw numbers |
69
- | `star` | Excluded values marked with asterisk (e.g., `90*`) |
70
-
71
- ## Convert Output Includes
72
-
73
- By default, converted output includes:
74
- - Row titles (if present)
75
- - X column data (if present, for XY/Survival tables)
76
- - All Y column subcolumns with proper naming
77
-
78
- Column naming follows YFormat conventions:
79
- - Replicates: `Title_1`, `Title_2`
80
- - SD: `Title_MEAN`, `Title_SD`
81
- - SE: `Title_MEAN`, `Title_SE`
82
- - etc.
83
-
84
- ## Batch Conversion Example
85
-
86
- Convert all PZFX files in a directory:
87
- ```bash
88
- for f in *.pzfx; do
89
- uv run python pzfx.py convert "$f" --format csv
90
- done
91
- ```
92
-
93
- ## Comparison with `read` Command
94
-
95
- | Feature | `read` | `convert` |
96
- |---------|--------|-----------|
97
- | Output to stdout | Yes | No (writes file) |
98
- | Write to file | No | Yes |
99
- | Include row titles | `--include-row-titles` | Always included |
100
- | Include X column | `--include-x` | Always included |
101
- | Multi-table | One at a time (`--table`) | All or one |
102
- | Use case | Quick inspection, piping | File export, batch processing |
@@ -1,116 +0,0 @@
1
- # Reading and Parsing PZFX Files
2
-
3
- ## Quick Inspect
4
-
5
- Get file metadata without extracting data:
6
-
7
- ```bash
8
- uv run python pzfx.py inspect <file.pzfx>
9
- ```
10
-
11
- Output includes: table IDs, types, formats, row counts, column titles and subcolumn counts.
12
-
13
- ## Read Table Data
14
-
15
- ### JSON format (default)
16
- ```bash
17
- uv run python pzfx.py read <file.pzfx> --format json --include-x --include-row-titles
18
- ```
19
-
20
- JSON structure:
21
- ```json
22
- {
23
- "table_id": "Table0",
24
- "table_type": "XY",
25
- "columns": [
26
- {
27
- "title": "X Title",
28
- "subcolumn_names": ["X Title"],
29
- "data": [[1.0, 2.0, 3.0]]
30
- },
31
- {
32
- "title": "Sample",
33
- "subcolumn_names": ["Sample_1", "Sample_2"],
34
- "data": [[100.0, 90.0, 80.0], [50.0, 60.0, 70.0]]
35
- }
36
- ],
37
- "row_titles": ["A", "B", "C"]
38
- }
39
- ```
40
-
41
- ### CSV/TSV format
42
- ```bash
43
- uv run python pzfx.py read <file.pzfx> --format csv --include-x --include-row-titles
44
- uv run python pzfx.py read <file.pzfx> --format tsv --include-x
45
- ```
46
-
47
- Output:
48
- ```
49
- ROWTITLE,XX,Ya_1,Ya_2,Yb_1,Yb_2
50
- A,1.0,100.0,50.0,1.0,10.0
51
- B,2.0,90.0,60.0,2.0,9.0
52
- C,3.0,80.0,70.0,3.0,8.0
53
- ```
54
-
55
- ## Multi-Table Files
56
-
57
- Specify table index (0-based):
58
- ```bash
59
- uv run python pzfx.py read <file.pzfx> --table 1 --format csv
60
- ```
61
-
62
- Use `inspect` first to see how many tables exist.
63
-
64
- ## Excluded Data Handling
65
-
66
- Prism supports "excluding" (striking through) data points. Control with `--exclude-mode`:
67
-
68
- | Mode | Effect | Example |
69
- |------|--------|---------|
70
- | `exclude` (default) | Excluded values → `null`/empty | `[100, null, 80]` |
71
- | `keep` | Excluded values kept as-is | `[100, 90, 80]` |
72
- | `star` | Append asterisk to excluded | `[100, "90*", 80]` |
73
-
74
- ```bash
75
- uv run python pzfx.py read <file.pzfx> --exclude-mode star --format csv
76
- ```
77
-
78
- ## Value Normalization
79
-
80
- Values are automatically normalized:
81
- - `"42."` → integer `42`
82
- - `"3.14"` → float `3.14`
83
- - `"3,5"` → float `3.5` (comma-decimal notation)
84
- - `""` or empty → `null`
85
- - Non-numeric text → kept as string
86
-
87
- ## Reading Specific Table Types
88
-
89
- ### XY Tables (with X column)
90
- ```bash
91
- uv run python pzfx.py read <file.pzfx> --include-x --format csv
92
- ```
93
-
94
- ### Contingency Tables (with row titles)
95
- ```bash
96
- uv run python pzfx.py read <file.pzfx> --include-row-titles --format csv
97
- ```
98
-
99
- ### Date-Formatted X Columns
100
- XColumn stores fractional years; XAdvancedColumn stores formatted date strings. Both are included with `--include-x`.
101
-
102
- ### HugeTable Files
103
- Handled identically to regular Tables. `inspect` shows `"is_huge": true`.
104
-
105
- ## Error Output Format
106
-
107
- On failure, JSON error is returned:
108
- ```json
109
- {
110
- "success": false,
111
- "error": "CATEGORY: message",
112
- "hint": "Suggested fix"
113
- }
114
- ```
115
-
116
- Error categories: `FILE_NOT_FOUND`, `PARSE_ERROR`, `VALIDATION_ERROR`
@@ -1,167 +0,0 @@
1
- # PZFX Schema Reference
2
-
3
- ## File Structure
4
-
5
- Every PZFX file follows this layout:
6
-
7
- ```xml
8
- <?xml version="1.0" encoding="UTF-8"?>
9
- <GraphPadPrismFile PrismXMLVersion="5.00">
10
- <Created>...</Created>
11
- <InfoSequence><Ref ID="Info0" Selected="1"></Ref></InfoSequence>
12
- <Info ID="Info0">...</Info>
13
- <TableSequence><Ref ID="Table0" Selected="1"></Ref></TableSequence>
14
- <Table ...>...</Table>
15
- <!--Analyses, graphs and layouts as compressed binary. Don't edit this part of the file.-->
16
- <Template dt:dt="bin.base64" xmlns:dt="urn:schemas-microsoft-com:datatypes">base64...</Template>
17
- </GraphPadPrismFile>
18
- ```
19
-
20
- The `<Template>` block is an opaque base64-encoded zlib blob containing graphs, analyses, and layouts. It must never be modified.
21
-
22
- ## XML Style Variants
23
-
24
- | Variant | Prism Version | Features |
25
- |---------|---------------|----------|
26
- | Classic | 6-7 | Closing tags (`</Subcolumn></YColumn>`), no xmlns |
27
- | Modern | 8+ | Self-closing tags (`<Subcolumn/>`), `xmlns="http://graphpad.com/prism/Prism.htm"` on root |
28
-
29
- Both variants are handled by stripping XML namespaces at parse time.
30
-
31
- ## Table Element Attributes
32
-
33
- ```xml
34
- <Table ID="Table0" XFormat="numbers" YFormat="replicates" Replicates="2"
35
- TableType="XY" EVFormat="AsteriskAfterNumber">
36
- ```
37
-
38
- | Attribute | Required | Values |
39
- |-----------|----------|--------|
40
- | ID | Yes | Unique table identifier (e.g. "Table0") |
41
- | TableType | Yes | `OneWay`, `TwoWay`, `XY`, `Survival`, `Contingency`, `PartsOfWhole` |
42
- | XFormat | Yes | `none`, `numbers`, `date`, `error` |
43
- | YFormat | Conditional | `replicates`, `SD`, `SE`, `CV`, `SDN`, `SEN`, `CVN`, `low-high`, `upper-lower-limits` |
44
- | Replicates | Conditional | Integer, required when YFormat="replicates" |
45
- | EVFormat | Yes | Always `AsteriskAfterNumber` |
46
-
47
- ### TableType to XFormat Mapping
48
-
49
- | TableType | Required XFormat |
50
- |-----------|-----------------|
51
- | OneWay | none |
52
- | TwoWay | none |
53
- | Contingency | none |
54
- | PartsOfWhole | none |
55
- | XY | numbers (or date, error) |
56
- | Survival | numbers |
57
-
58
- ## Column Types
59
-
60
- ### XColumn (XY/Survival tables only)
61
-
62
- ```xml
63
- <XColumn Width="199" Subcolumns="1" Decimals="8">
64
- <Title>X Title</Title>
65
- <Subcolumn>
66
- <d>1.0</d>
67
- <d>2.0</d>
68
- </Subcolumn>
69
- </XColumn>
70
- ```
71
-
72
- - When XFormat="error", has 2 subcolumns (value ± error)
73
- - Subcolumns count is always 1 for numbers/date formats
74
-
75
- ### XAdvancedColumn (Date-formatted X columns)
76
-
77
- ```xml
78
- <XAdvancedColumn Version="1" Width="199" Decimals="8" Subcolumns="1">
79
- <Title>Date X</Title>
80
- <Subcolumn>
81
- <d>2023-01-15</d>
82
- </Subcolumn>
83
- </XAdvancedColumn>
84
- ```
85
-
86
- - Stores formatted date strings alongside XColumn fractional years
87
- - Always paired with an XColumn when XFormat="date"
88
-
89
- ### YColumn
90
-
91
- ```xml
92
- <YColumn Width="89" Decimals="0" Subcolumns="2">
93
- <Title>Sample</Title>
94
- <Subcolumn><d>1.</d><d>2.</d></Subcolumn>
95
- <Subcolumn><d>3.</d><d>4.</d></Subcolumn>
96
- </YColumn>
97
- ```
98
-
99
- Subcolumn count depends on YFormat:
100
-
101
- | YFormat | Subcolumns | Naming Convention |
102
- |---------|------------|-------------------|
103
- | replicates | = Replicates | `{Title}_1`, `{Title}_2`, ... |
104
- | SD | 2 | `{Title}_MEAN`, `{Title}_SD` |
105
- | SE | 2 | `{Title}_MEAN`, `{Title}_SE` |
106
- | CV | 2 | `{Title}_MEAN`, `{Title}_CV` |
107
- | SDN | 3 | `{Title}_MEAN`, `{Title}_SD`, `{Title}_N` |
108
- | SEN | 3 | `{Title}_MEAN`, `{Title}_SEM`, `{Title}_N` |
109
- | CVN | 3 | `{Title}_MEAN`, `{Title}_CV`, `{Title}_N` |
110
- | low-high | 3 | `{Title}_MEAN`, `{Title}_PLUSERROR`, `{Title}_MINUSERROR` |
111
- | upper-lower-limits | 3 | `{Title}_MEAN`, `{Title}_UPPERLIMIT`, `{Title}_LOWERLIMIT` |
112
-
113
- ### RowTitlesColumn (Contingency tables)
114
-
115
- ```xml
116
- <RowTitlesColumn Width="81">
117
- <Subcolumn>
118
- <d>Male</d>
119
- <d>Female</d>
120
- </Subcolumn>
121
- </RowTitlesColumn>
122
- ```
123
-
124
- ## Cell Data (`<d>` Elements)
125
-
126
- ```xml
127
- <d>42.5</d> <!-- Normal value -->
128
- <d>3,5</d> <!-- Comma decimal (3.5) -->
129
- <d Excluded="1">99.0</d> <!-- Excluded/strikethrough value -->
130
- <d></d> <!-- Empty cell -->
131
- <d><TextAlign>Label</TextAlign></d> <!-- Text cell (non-numeric) -->
132
- ```
133
-
134
- - Comma-as-decimal: values like `3,5` are normalized to `3.5`
135
- - Excluded cells have `Excluded="1"` attribute
136
- - Empty `<d></d>` or `<d/>` represents missing data
137
-
138
- ## Other Elements
139
-
140
- ### Info Block
141
- ```xml
142
- <Info ID="Info0">
143
- <Title>Project info 1</Title>
144
- <Notes></Notes>
145
- <Constant><Name>Experiment Date</Name><Value>2024-01-01</Value></Constant>
146
- </Info>
147
- ```
148
-
149
- ### HugeTable
150
- Identical to `Table` internally, just uses `<HugeTable>` tag for large datasets.
151
-
152
- ### FloatingNote
153
- ```xml
154
- <FloatingNote ID="#0" Width="262" Height="137" Left="451" Top="33" Expanded="1">
155
- <Title>Note</Title>
156
- <Content>Some annotation text</Content>
157
- </FloatingNote>
158
- ```
159
-
160
- ## Validation Rules
161
-
162
- 1. PartsOfWhole tables must have exactly 1 YColumn
163
- 2. Contingency tables must have a RowTitlesColumn
164
- 3. YColumn titles must be unique within a table
165
- 4. SD/SE/CV format requires exactly 2 subcolumns per YColumn
166
- 5. SDN/SEN/CVN/low-high/upper-lower-limits requires exactly 3 subcolumns
167
- 6. XY tables require XFormat in (numbers, date, error)
@@ -1,150 +0,0 @@
1
- # Writing and Editing PZFX Files
2
-
3
- ## Creating New PZFX Files
4
-
5
- ### From CSV/TSV data
6
- ```bash
7
- uv run python pzfx.py write output.pzfx \
8
- --data-file data.csv \
9
- --data-format csv \
10
- --table-type OneWay
11
- ```
12
-
13
- ### From TSV data
14
- ```bash
15
- uv run python pzfx.py write output.pzfx \
16
- --data-file data.tsv \
17
- --data-format tsv \
18
- --table-type XY \
19
- --x-format numbers \
20
- --y-format replicates \
21
- --replicates 2
22
- ```
23
-
24
- ### From JSON data
25
- ```bash
26
- uv run python pzfx.py write output.pzfx \
27
- --data-file data.json \
28
- --data-format json \
29
- --table-type TwoWay \
30
- --y-format SD
31
- ```
32
-
33
- ### Input CSV/TSV Format
34
-
35
- Headers determine column assignment. For XY tables, the first non-ROWTITLE column becomes the X column:
36
-
37
- ```csv
38
- ROWTITLE,Xconc,Ya,Yb
39
- A,1.0,100,50
40
- B,2.0,90,60
41
- C,3.0,80,70
42
- ```
43
-
44
- For non-XY tables (XFormat=none), all columns become YColumns:
45
-
46
- ```csv
47
- Aa,Bb
48
- 1,100
49
- 2,90
50
- 3,80
51
- ```
52
-
53
- ### Dry Run (validate without writing)
54
- ```bash
55
- uv run python pzfx.py write output.pzfx \
56
- --data-file data.csv --data-format csv \
57
- --table-type OneWay --dry-run
58
- ```
59
-
60
- ## Editing Existing Files
61
-
62
- ### Modify cell values
63
- ```bash
64
- uv run python pzfx.py edit <file.pzfx> \
65
- --column-title "Aa" \
66
- --subcolumn 0 \
67
- --values '[10,20,30,40]'
68
- ```
69
-
70
- ### Edit with exclusion flags
71
- ```bash
72
- uv run python pzfx.py edit <file.pzfx> \
73
- --column-title "Sample" \
74
- --subcolumn 0 \
75
- --values '[100,90,80]' \
76
- --exclude-values '[false,true,false]'
77
- ```
78
-
79
- ### Edit and save to different file
80
- ```bash
81
- uv run python pzfx.py edit <file.pzfx> \
82
- --column-title "Aa" \
83
- --subcolumn 0 \
84
- --values '[10,20,30,40]' \
85
- --output modified.pzfx
86
- ```
87
-
88
- ### Preview changes without writing
89
- ```bash
90
- uv run python pzfx.py edit <file.pzfx> \
91
- --column-title "Aa" \
92
- --subcolumn 0 \
93
- --values '[10,20,30,40]' \
94
- --dry-run
95
- ```
96
-
97
- ## Adding Columns
98
-
99
- ### Add a single-subcolumn column
100
- ```bash
101
- uv run python pzfx.py add-column <file.pzfx> \
102
- --title "NewCol" \
103
- --subcolumns 1 \
104
- --values '[[1,2,3,4]]' \
105
- --output modified.pzfx
106
- ```
107
-
108
- ### Add a multi-subcolumn column (e.g., Mean ± SD)
109
- ```bash
110
- uv run python pzfx.py add-column <file.pzfx> \
111
- --title "Treatment" \
112
- --subcolumns 2 \
113
- --values '[[100,110,120],[10,20,30]]' \
114
- --output modified.pzfx
115
- ```
116
-
117
- The `--values` is a JSON array of arrays: one inner array per subcolumn.
118
-
119
- ### Dry run
120
- ```bash
121
- uv run python pzfx.py add-column <file.pzfx> \
122
- --title "NewCol" --subcolumns 1 \
123
- --values '[[1,2,3]]' --dry-run
124
- ```
125
-
126
- ## Table Type Constraints
127
-
128
- | TableType | XFormat | YColumns | Special |
129
- |-----------|---------|----------|---------|
130
- | OneWay | none | >= 1 | Default column type |
131
- | TwoWay | none | >= 1 | Supports error formats |
132
- | XY | numbers/date/error | >= 1 | Requires XColumn |
133
- | Survival | numbers | >= 1 | X = time, Y = event |
134
- | Contingency | none | >= 1 | Requires RowTitlesColumn |
135
- | PartsOfWhole | none | exactly 1 | Pie chart data |
136
-
137
- ## Template Preservation
138
-
139
- All write/edit operations preserve the original `<Template>` base64 blob unchanged. This ensures graphs, analyses, and layouts survive round-trips.
140
-
141
- ## Round-Trip Safety
142
-
143
- Read → edit → write preserves:
144
- - All columns not being edited
145
- - XColumn and XAdvancedColumn data
146
- - RowTitlesColumn data
147
- - FloatingNote annotations
148
- - Table metadata (ID, type, format, replicates)
149
- - The complete Template blob
150
- - Info block data
@@ -1,6 +0,0 @@
1
- [project]
2
- name = "pzfx-io-skill"
3
- version = "0.1.0"
4
- description = "GraphPad Prism PZFX file read/write skill"
5
- requires-python = ">=3.10"
6
- dependencies = []