repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
scientific-agent-skills
skills/pkpd-modeling/scripts/ddi_static.py
.py
#!/usr/bin/env python3 """Drug-drug interaction prediction: ICH M12 basic models and the mechanistic static model. ICH M12 (Step 4, 2024) sets out a stepwise risk assessment: in vitro data feed basic models whose cut-offs decide whether a clinical study is needed, and a mechanistic static or PBPK model can be used to ...
347
15,708
scientific-agent-skills
skills/pkpd-modeling/scripts/nca.py
.py
#!/usr/bin/env python3 """Non-compartmental analysis of concentration-time data. NCA looks arithmetically trivial and is not. Essentially every disagreement between two NCA results traces to one of four choices that are rarely written down: how lambda_z was selected, which trapezoidal rule was used, what happened to B...
588
23,289
scientific-agent-skills
skills/scanpy/scripts/score_genes.py
.py
#!/usr/bin/env python3 """ Score cells for one or more gene signatures. Computes ``sc.tl.score_genes`` for each named gene set in a JSON file and adds one obs column per signature (``<name>_score``). Also supports the built-in cell-cycle scoring with ``--cell-cycle``. Writes UMAPs colored by each score. Gene-set JSON...
83
3,743
scientific-agent-skills
skills/scanpy/scripts/pseudobulk.py
.py
#!/usr/bin/env python3 """ Aggregate single cells into pseudobulk profiles for rigorous DE. Sums raw counts within each combination of grouping columns (e.g. sample x cell_type) using ``sc.get.aggregate`` and exports a genes x pseudobulk-sample count matrix plus a sample-metadata table. Feed these into pydeseq2 / edge...
75
2,972
scientific-agent-skills
skills/scanpy/scripts/preprocess.py
.py
#!/usr/bin/env python3 """ Normalize, log-transform, select highly variable genes, and optionally scale. Takes QC-filtered raw counts and produces a normalized, log1p-transformed object ready for dimensionality reduction. A copy of the raw counts is kept in ``adata.layers['counts']`` and the normalized log values in `...
89
3,801
scientific-agent-skills
skills/scanpy/scripts/reduce_dimensions.py
.py
#!/usr/bin/env python3 """ PCA, neighborhood graph, and UMAP / t-SNE embeddings. Takes a normalized object (optionally HVG-subset / scaled) and computes PCA, the kNN graph, and a UMAP (and optionally t-SNE) embedding. Writes a PCA variance-ratio elbow plot to help choose ``--n-pcs``. Examples: python reduce_dimen...
65
2,684
scientific-agent-skills
skills/scanpy/scripts/plot.py
.py
#!/usr/bin/env python3 """ Generate common single-cell plots from a processed AnnData object. A flexible plotting front-end so the agent doesn't hand-write matplotlib / scanpy plotting calls. Pick a plot type and the keys/genes to show. Plot types: umap / tsne / pca : embedding colored by --color obs columns and/...
79
3,595
scientific-agent-skills
skills/scanpy/scripts/cluster.py
.py
#!/usr/bin/env python3 """ Leiden clustering on a precomputed neighborhood graph. Runs Leiden at one or more resolutions and writes a UMAP colored by each clustering. Requires that ``sc.pp.neighbors`` has already been run (use reduce_dimensions.py first). Examples: python cluster.py reduced.h5ad -o clustered.h5ad...
64
2,523
scientific-agent-skills
skills/scanpy/scripts/convert.py
.py
#!/usr/bin/env python3 """ Load any supported single-cell format and write it as .h5ad. Convenience wrapper to get 10x mtx folders, 10x .h5, CSV/TSV, loom, or mtx files into AnnData .h5ad once, so later steps all read a single fast format. For R-native files (.rds / Seurat / SingleCellExperiment), see references/r_int...
44
1,514
scientific-agent-skills
skills/scanpy/scripts/batch_correct.py
.py
#!/usr/bin/env python3 """ Batch correction / integration across samples. Supports three methods: * harmony : corrects the PCA embedding -> writes obsm['X_pca_harmony']. Fast, recommended default. Needs harmonypy (uv pip install harmonypy). Follow with: reduce_dimensions.py --use-rep X...
66
2,745
scientific-agent-skills
skills/scanpy/scripts/_common.py
.py
#!/usr/bin/env python3 """ Shared helpers for the scanpy script toolkit. Every CLI script in this directory imports from this module so that data loading, saving, figure configuration, and logging behave consistently. This file is NOT a CLI itself; import it: from _common import load_anndata, save_anndata, config...
128
4,459
scientific-agent-skills
skills/scanpy/scripts/qc_analysis.py
.py
#!/usr/bin/env python3 """ Quality control and filtering for single-cell RNA-seq data. Calculates QC metrics (genes/counts per cell, mitochondrial / ribosomal / hemoglobin fractions), writes before/after QC plots, optionally runs Scrublet doublet detection, and filters cells and genes by the given thresholds. Run thi...
105
4,645
scientific-agent-skills
skills/scanpy/scripts/subset.py
.py
#!/usr/bin/env python3 """ Subset an AnnData object by cell metadata or genes. Filter cells by obs-column values (keep or drop), or restrict to a gene list. Useful for isolating a cell type / condition for focused re-analysis. Examples: python subset.py annotated.h5ad -o tcells.h5ad --obs cell_type --keep "CD4 T ...
65
2,533
scientific-agent-skills
skills/scanpy/scripts/find_markers.py
.py
#!/usr/bin/env python3 """ Rank marker genes per group and export tables + plots. Runs ``sc.tl.rank_genes_groups`` for a grouping (e.g. leiden clusters), writes a combined CSV of the top markers per group, per-group CSVs, and the standard marker plots (rank panel, heatmap, dotplot). NOTE: per-cell tests inflate signi...
76
3,445
scientific-agent-skills
skills/scanpy/scripts/inspect_data.py
.py
#!/usr/bin/env python3 """ Inspect an AnnData / single-cell file and print a structured summary. Reports shape, obs/var columns (with dtypes and category counts), layers, obsm/varm/uns keys, X dtype and value range, and whether the data looks like raw counts or normalized values. Use this before analysis to understand...
82
2,886
scientific-agent-skills
skills/scanpy/scripts/run_pipeline.py
.py
#!/usr/bin/env python3 """ End-to-end standard scRNA-seq pipeline in one command. Runs the full exploratory workflow on raw counts: load -> QC + filter -> (optional doublets) -> normalize + log1p -> HVG -> (optional scale/regress) -> PCA -> (optional batch correction) -> neighbors -> UMAP -> Leiden -> mark...
183
8,112
scientific-agent-skills
skills/scanpy/scripts/annotate.py
.py
#!/usr/bin/env python3 """ Annotate clusters with cell-type labels from a mapping file. Maps a cluster column (e.g. leiden) to cell-type names using a JSON or CSV mapping, writes the labels into a new obs column, and saves a UMAP and dotplot. The mapping file is one of: * JSON : {"0": "CD4 T cells", "1": "B cells"...
85
3,604
scientific-agent-skills
skills/scanpy/assets/analysis_template.py
.py
#!/usr/bin/env python3 """ Complete Single-Cell Analysis Template This template provides a complete workflow for single-cell RNA-seq analysis using scanpy, from data loading through clustering and cell type annotation. Customize the parameters and sections as needed for your specific dataset. """ import scanpy as sc...
302
9,806
scientific-agent-skills
skills/deeptools/scripts/validate_files.py
.py
#!/usr/bin/env python3 """ deepTools File Validation Script Validates BAM, bigWig, and BED files for deepTools analysis. Checks for file existence, proper indexing, and basic format requirements. """ import os import sys import argparse from pathlib import Path def check_file_exists(filepath): """Check if file ...
196
6,039
scientific-agent-skills
skills/deeptools/scripts/workflow_generator.py
.py
#!/usr/bin/env python3 """ deepTools Workflow Generator Generates bash script templates for common deepTools workflows. """ import argparse import re import shlex import sys SAFE_PATH_PATTERN = re.compile(r"^[A-Za-z0-9._/-]+$") WORKFLOWS = { 'chipseq_qc': { 'name': 'ChIP-seq Quality Control', ...
521
16,868
scientific-agent-skills
skills/matplotlib/scripts/plot_template.py
.py
#!/usr/bin/env python3 """ Matplotlib Plot Template Comprehensive template demonstrating various plot types and best practices. Use this as a starting point for creating publication-quality visualizations. Usage: python plot_template.py [--plot-type TYPE] [--style STYLE] [--output FILE] Plot types: line, sca...
407
12,257
scientific-agent-skills
skills/matplotlib/scripts/style_configurator.py
.py
#!/usr/bin/env python3 """ Matplotlib Style Configurator Interactive utility to configure matplotlib style preferences and generate custom style sheets. Creates a preview of the style and optionally saves it as a .mplstyle file. Usage: python style_configurator.py [--preset PRESET] [--output FILE] [--preview] Pr...
413
13,368
scientific-agent-skills
skills/experimental-design/scripts/randomization.py
.py
"""Reproducible randomization / allocation schedules for experiments and trials. Randomization is what licenses causal inference: it breaks the link between treatment assignment and any confounder, measured or not. But "I shuffled it" is not enough — the *method* matters (simple vs. blocked vs. stratified) and the sch...
172
7,046
scientific-agent-skills
skills/experimental-design/scripts/doe_designs.py
.py
"""Design-of-experiments (DOE) matrices as labeled, decoded pandas DataFrames. pyDOE3 returns designs in *coded* units (-1/+1, or 0..k-1). Researchers want the design in *real* factor units (temperature in C, concentration in mM) with named columns, randomized run order, and a clear sense of what each design is for. T...
184
7,812
scientific-agent-skills
skills/hypothesis-generation/scripts/lint_causal_claims.py
.py
#!/usr/bin/env python3 """Lexically lint causal versus associational claims in bounded Markdown.""" from __future__ import annotations import argparse import re from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_markdown, write_js...
190
6,809
scientific-agent-skills
skills/hypothesis-generation/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared, dependency-free safety helpers for local hypothesis CLIs.""" from __future__ import annotations import csv import json import os import re import sys import tempfile from datetime import date from pathlib import Path from typing import Any, Iterable MAX_INPUT_BYTES = 2 * 1024 * 1024...
413
14,234
scientific-agent-skills
skills/hypothesis-generation/scripts/check_falsification_controls.py
.py
#!/usr/bin/env python3 """Audit falsifiers, discriminating tests, nulls, and controls without scoring.""" from __future__ import annotations import argparse import re from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_json, requir...
456
16,477
scientific-agent-skills
skills/hypothesis-generation/scripts/generate_preregistration_scaffold.py
.py
#!/usr/bin/env python3 """Generate a deterministic local Markdown preregistration scaffold.""" from __future__ import annotations import argparse import html import re from pathlib import Path from typing import Any from _common import ( ValidationError, error_exit, read_json, read_markdown, writ...
385
14,349
scientific-agent-skills
skills/hypothesis-generation/scripts/validate_hypothesis_schema.py
.py
#!/usr/bin/env python3 """Validate a structured hypothesis record without judging scientific merit.""" from __future__ import annotations import argparse from collections import Counter from pathlib import PurePosixPath from typing import Any from _common import ( ValidationError, error_exit, issue, ...
1,079
38,955
scientific-agent-skills
skills/hypothesis-generation/scripts/audit_evidence_ledger.py
.py
#!/usr/bin/env python3 """Audit a local evidence ledger and dated search boundary without networking.""" from __future__ import annotations import argparse from collections import Counter from datetime import date from typing import Any from _common import ( ValidationError, error_exit, issue, read_c...
338
12,069
scientific-agent-skills
skills/hypothesis-generation/scripts/check_operationalization.py
.py
#!/usr/bin/env python3 """Audit a local operationalization and measurement checklist without scoring.""" from __future__ import annotations import argparse from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_json, require_bool, ...
238
8,086
scientific-agent-skills
skills/hypothesis-generation/scripts/validate_prediction_matrix.py
.py
#!/usr/bin/env python3 """Validate a prediction/rival-hypothesis CSV without ranking candidates.""" from __future__ import annotations import argparse import re from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_csv_records, read_...
287
9,815
scientific-agent-skills
skills/pylabrobot/scripts/inspect_backends.py
.py
#!/usr/bin/env python3 """Inspect a pinned PyLabRobot API surface without constructing a backend.""" from __future__ import annotations import argparse import inspect import re from importlib.metadata import PackageNotFoundError, metadata, version from typing import Any, Sequence if __package__: from ._common impo...
217
7,041
scientific-agent-skills
skills/pylabrobot/scripts/validate_manifest.py
.py
#!/usr/bin/env python3 """Validate a strict offline PyLabRobot protocol manifest.""" from __future__ import annotations import argparse from typing import Sequence if __package__: from ._common import ValidationError, emit_error, emit_json, load_json, validate_manifest else: from _common import ValidationError, ...
48
1,391
scientific-agent-skills
skills/pylabrobot/scripts/check_deck_geometry.py
.py
#!/usr/bin/env python3 """Check bounded static deck geometry without importing PyLabRobot.""" from __future__ import annotations import argparse from typing import Sequence if __package__: from ._common import ( ValidationError, emit_error, emit_json, geometry_report, load_json, ...
53
1,301
scientific-agent-skills
skills/pylabrobot/scripts/plan_transfers.py
.py
#!/usr/bin/env python3 """Plan a deterministic volume ledger and one-use tip allocation.""" from __future__ import annotations import argparse from typing import Sequence if __package__: from ._common import ( ValidationError, emit_error, emit_json, load_csv, load_json, plan_tra...
60
1,556
scientific-agent-skills
skills/pylabrobot/scripts/generate_simulation_plan.py
.py
#!/usr/bin/env python3 """Generate a non-executable, hardware-blocked simulation plan as JSON.""" from __future__ import annotations import argparse from typing import Any, Sequence if __package__: from ._common import ( PYLABROBOT_VERSION, ValidationError, emit_error, emit_json, geom...
141
4,793
scientific-agent-skills
skills/pylabrobot/scripts/_common.py
.py
"""Dependency-free validation and planning helpers for the PyLabRobot skill. These helpers never import PyLabRobot, open sockets, enumerate hardware, or access serial/USB devices. All file inputs are bounded, local to the current working directory, regular files, and non-symlinks. """ from __future__ import annotatio...
719
26,669
scientific-agent-skills
skills/bioservices/scripts/compound_cross_reference.py
.py
#!/usr/bin/env python3 """ Compound Cross-Database Search This script searches for a compound by name and retrieves identifiers from multiple databases: - KEGG Compound - ChEBI - ChEMBL (via UniChem) - Basic compound properties Usage: python compound_cross_reference.py COMPOUND_NAME [--output FILE] Examples: ...
388
11,779
scientific-agent-skills
skills/bioservices/scripts/protein_analysis_workflow.py
.py
#!/usr/bin/env python3 """ Complete Protein Analysis Workflow This script performs a comprehensive protein analysis pipeline: 1. UniProt search and identifier retrieval 2. FASTA sequence retrieval 3. BLAST similarity search 4. KEGG pathway discovery 5. PSICQUIC interaction mapping 6. GO annotation retrieval Usage: ...
442
13,467
scientific-agent-skills
skills/bioservices/scripts/batch_id_converter.py
.py
#!/usr/bin/env python3 """ Batch Identifier Converter This script converts multiple identifiers between biological databases using UniProt's mapping service. Supports batch processing with automatic chunking and error handling. Usage: python batch_id_converter.py INPUT_FILE --from DB1 --to DB2 [options] Examples...
348
10,892
scientific-agent-skills
skills/bioservices/scripts/pathway_analysis.py
.py
#!/usr/bin/env python3 """ KEGG Pathway Network Analysis This script analyzes all pathways for an organism and extracts: - Pathway sizes (number of genes) - Protein-protein interactions - Interaction type distributions - Network data in various formats (CSV, SIF) Usage: python pathway_analysis.py ORGANISM OUTPUT_...
310
9,547
scientific-agent-skills
skills/protocolsio-integration/scripts/protocols_read.py
.py
#!/usr/bin/env python3 """Bounded, read-only protocols.io REST client with an explicit execute gate.""" from __future__ import annotations import argparse import os import re from typing import Any, Mapping, Sequence try: from ._common import ( ACCESS_TOKEN_ENV, DEFAULT_ORIGIN, MAX_JSON_R...
494
15,573
scientific-agent-skills
skills/protocolsio-integration/scripts/_common.py
.py
"""Shared safety primitives for the protocols.io helper scripts. The helpers use only the Python standard library. They never load ``.env`` files, never accept credentials as command-line arguments, and never follow HTTP redirects. """ from __future__ import annotations import json import math import os import re im...
614
20,219
scientific-agent-skills
skills/protocolsio-integration/scripts/pagination_helper.py
.py
#!/usr/bin/env python3 """Validate protocols.io pagination pointers without making requests.""" from __future__ import annotations import argparse import re import urllib.parse from typing import Any, Mapping, Sequence try: from ._common import ( SafetyError, emit_error, emit_json, ...
249
7,665
scientific-agent-skills
skills/protocolsio-integration/scripts/validate_protocol_json.py
.py
#!/usr/bin/env python3 """Validate and summarize a saved protocols.io protocol response offline.""" from __future__ import annotations import argparse import re from typing import Any, Mapping, Sequence try: from ._common import ( SafetyError, clean_text, emit_error, emit_json, ...
359
12,311
scientific-agent-skills
skills/protocolsio-integration/scripts/validate_auth_config.py
.py
#!/usr/bin/env python3 """Validate named protocols.io credential/configuration variables locally.""" from __future__ import annotations import argparse import os from typing import Mapping, Sequence try: from ._common import ( ACCESS_TOKEN_ENV, DEFAULT_ORIGIN, SafetyError, credent...
129
3,529
scientific-agent-skills
skills/protocolsio-integration/scripts/plan_write_request.py
.py
#!/usr/bin/env python3 """Create redacted protocols.io mutation plans; never execute them.""" from __future__ import annotations import argparse import hashlib import hmac import re from pathlib import Path from typing import Any, Mapping, Sequence try: from ._common import ( DEFAULT_ORIGIN, Safe...
658
21,735
scientific-agent-skills
skills/scikit-survival/scripts/model_report.py
.py
#!/usr/bin/env python3 """Render a bounded Markdown model card from local aggregate JSON summaries.""" from __future__ import annotations import argparse import math from typing import Any from _common import CliError, emit_text, load_json COMPETING_RISK_CHOICES = ("not-assessed", "absent", "present") def _mappi...
298
11,156
scientific-agent-skills
skills/scikit-survival/scripts/train_survival_model.py
.py
#!/usr/bin/env python3 """Train a leakage-safe Cox or ensemble example on explicit local schema.""" from __future__ import annotations import argparse from importlib.metadata import version from typing import Any from _common import ( DEFAULT_SEED, MAX_FEATURES, CliError, atomic_save_npz, bounded...
584
19,335
scientific-agent-skills
skills/scikit-survival/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared, standard-library-first helpers for the bundled survival CLIs.""" from __future__ import annotations import io import json import math import os import stat import tempfile from pathlib import Path from typing import Any, Iterable MAX_INPUT_BYTES = 32 * 1024 * 1024 MAX_REPORT_BYTES ...
457
15,360
scientific-agent-skills
skills/scikit-survival/scripts/competing_risk_cif.py
.py
#!/usr/bin/env python3 """Estimate nonparametric competing-risk cumulative incidence from local data.""" from __future__ import annotations import argparse from typing import Any from _common import ( DEFAULT_SEED, CliError, atomic_save_npz, bounded_int, emit_json, parse_floats, probabili...
287
10,334
scientific-agent-skills
skills/scikit-survival/scripts/validate_survival_csv.py
.py
#!/usr/bin/env python3 """Validate a local survival CSV and optionally write a structured NumPy array.""" from __future__ import annotations import argparse from typing import Any from _common import ( DEFAULT_SEED, MAX_FEATURES, CliError, atomic_save_npy, bounded_int, emit_json, parse_na...
173
5,721
scientific-agent-skills
skills/scikit-survival/scripts/evaluate_survival_metrics.py
.py
#!/usr/bin/env python3 """Evaluate censoring-aware survival metrics with strict input contracts.""" from __future__ import annotations import argparse from typing import Any from _common import ( DEFAULT_SEED, MAX_TIME_POINTS, CliError, bounded_int, checked_input_file, emit_json, structur...
297
10,672
scientific-agent-skills
skills/openpiv/scripts/run_example.py
.py
"""End-to-end smoke test of the OpenPIV pipeline on OpenPIV's own bundled data. Runs the full runner.py pipeline against the exp1_001 image pair that ships inside the openpiv package, so it needs no external files. Use it to confirm an install works before pointing the CLI at real experiment data. python skills/o...
79
2,875
scientific-agent-skills
skills/openpiv/scripts/analyze.py
.py
"""Post-processing helpers for a params.npz written by runner.py. Verified against openpiv 0.25.4. Pure numpy -- no OpenPIV import needed here. """ from pathlib import Path from typing import Dict, Optional, Tuple import numpy as np class PIVAnalyzer: """Derived quantities from a saved PIV velocity field. ...
144
5,628
scientific-agent-skills
skills/openpiv/scripts/runner.py
.py
"""CLI for OpenPIV processing of a single image pair. Verified against openpiv 0.25.4. Writes vectors.txt, params.npz, and vector_field.png into the output directory. """ import argparse import warnings from pathlib import Path import matplotlib # openpiv.tools.display_vector_field() calls plt.show() internally, so...
215
6,848
scientific-agent-skills
skills/flowio/scripts/inspect_fcs.py
.py
#!/usr/bin/env python3 """Inspect local FCS files with FlowIO without network or environment access. Metadata-only parsing is the default. Event statistics are opt-in because FlowIO loads each dataset into memory and ``as_array`` allocates another array. Statistics first perform a metadata-only pass so an estimated ar...
440
13,735
scientific-agent-skills
skills/clinical-decision-support/scripts/cohort_table_generator.py
.py
#!/usr/bin/env python3 """Generate disclosure-controlled tables from bounded aggregate cohort summaries.""" from __future__ import annotations import argparse import csv import io import sys from typing import Any from _common import ( InputError, IssueLog, load_json_object, nonnegative_int, requ...
289
11,390
scientific-agent-skills
skills/clinical-decision-support/scripts/decision_logic_traceability.py
.py
#!/usr/bin/env python3 """Validate and export research/governance decision-logic traceability.""" from __future__ import annotations import argparse import csv import io import re import sys from typing import Any from _common import ( InputError, IssueLog, load_json_object, require_list, require...
314
10,929
scientific-agent-skills
skills/clinical-decision-support/scripts/survival_plan_validator.py
.py
#!/usr/bin/env python3 """Validate an estimand-led survival-analysis plan without reading subject rows.""" from __future__ import annotations import argparse import sys from typing import Any from _common import ( InputError, IssueLog, load_json_object, print_report, require_list, require_non...
295
11,149
scientific-agent-skills
skills/clinical-decision-support/scripts/evidence_profile_check.py
.py
#!/usr/bin/env python3 """Check a human-authored GRADE evidence profile without assigning grades.""" from __future__ import annotations import argparse import sys from typing import Any from _common import ( InputError, IssueLog, load_json_object, print_report, require_list, require_nonempty_...
260
10,534
scientific-agent-skills
skills/clinical-decision-support/scripts/validate_cds_artifact.py
.py
#!/usr/bin/env python3 """Validate intended use and governance fields for research-only CDS artifacts.""" from __future__ import annotations import argparse import sys from typing import Any from _common import ( InputError, IssueLog, load_json_object, print_report, require_list, require_none...
270
10,029
scientific-agent-skills
skills/clinical-decision-support/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared bounded local-file utilities for research-only CDS helpers.""" from __future__ import annotations import json import math from dataclasses import dataclass, field from pathlib import Path from typing import Any, Iterable MAX_INPUT_BYTES = 1_000_000 MAX_TEXT_LENGTH = 4_000 MAX_SOURCES...
224
7,537
scientific-agent-skills
skills/clinical-decision-support/scripts/deidentification_checklist.py
.py
#!/usr/bin/env python3 """Check documentation of a de-identification process without reading health data.""" from __future__ import annotations import argparse import sys from typing import Any from _common import ( InputError, IssueLog, load_json_object, print_report, require_list, require_n...
261
10,034
scientific-agent-skills
skills/clinical-decision-support/scripts/model_biomarker_evaluation.py
.py
#!/usr/bin/env python3 """Create a bounded report from aggregate model/biomarker validation counts.""" from __future__ import annotations import argparse import math import sys from typing import Any from _common import ( InputError, IssueLog, finite_number, load_json_object, nonnegative_int, ...
346
13,691
scientific-agent-skills
skills/statistical-analysis/scripts/assumption_checks.py
.py
""" Comprehensive statistical assumption checking utilities. This module provides functions to check common statistical assumptions: - Normality - Homogeneity of variance - Independence - Linearity - Outliers """ import numpy as np import pandas as pd from scipy import stats import matplotlib.pyplot as plt import sea...
653
20,282
scientific-agent-skills
skills/gtars/scripts/coverage_preflight.py
.py
#!/usr/bin/env python3 """Preflight local Gtars uniwig coverage and bigWig generation.""" from __future__ import annotations import argparse import math import sys from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, HARD_MAX_WORKERS, SafetyError, add_path_mode_argument, display_path, ...
257
8,273
scientific-agent-skills
skills/gtars/scripts/bed_validator.py
.py
#!/usr/bin/env python3 """Validate a local BED file without rewriting or uploading it.""" from __future__ import annotations import argparse import sys from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, SafetyError, add_path_mode_argument, display_path, fail_json, inspect_bed, in...
184
5,432
scientific-agent-skills
skills/gtars/scripts/tokenizer_manifest.py
.py
#!/usr/bin/env python3 """Check a local Gtars tokenizer manifest against its exact universe.""" from __future__ import annotations import argparse import re import sys from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, SafetyError, add_path_mode_argument, display_path, fail_json, ins...
239
8,558
scientific-agent-skills
skills/gtars/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared dependency-free safety helpers for local Gtars skill CLIs.""" from __future__ import annotations import argparse import gzip import hashlib import json import os import re import stat import sys from collections import Counter from pathlib import Path from typing import Any, Iterator ...
462
14,970
scientific-agent-skills
skills/gtars/scripts/artifact_inspector.py
.py
#!/usr/bin/env python3 """Hash and classify local Gtars artifacts without loading or executing them.""" from __future__ import annotations import argparse import os import re import stat import sys from email.parser import Parser from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_FILES, ...
329
10,846
scientific-agent-skills
skills/gtars/scripts/execution_plan.py
.py
#!/usr/bin/env python3 """Build a bounded local Gtars overlap/coverage execution plan.""" from __future__ import annotations import argparse import sys from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, HARD_MAX_WORKERS, SafetyError, add_path_mode_argument, displ...
366
11,927
scientific-agent-skills
skills/gtars/scripts/refget_digest_plan.py
.py
#!/usr/bin/env python3 """Validate local refget metadata and FASTA sequence digests without networking.""" from __future__ import annotations import argparse import base64 import hashlib import re import sys from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, SafetyError, ...
312
10,925
scientific-agent-skills
skills/pydeseq2/scripts/run_deseq2_analysis.py
.py
#!/usr/bin/env python3 """ PyDESeq2 Analysis Script This script performs a complete differential expression analysis using PyDESeq2. It can be used as a template for standard RNA-seq DEA workflows. Usage: python run_deseq2_analysis.py --counts counts.csv --metadata metadata.csv \ --design "~condition" ...
389
13,074
scientific-agent-skills
skills/geopandas/scripts/crs_reprojection_plan.py
.py
#!/usr/bin/env python3 """Plan CRS and datum transformation semantics without transforming coordinates.""" from __future__ import annotations import argparse import sys from typing import Any from _common import ( CliError, crs_summary, disable_proj_network, emit_json, fail_json, finite_numbe...
211
7,420
scientific-agent-skills
skills/geopandas/scripts/_common.py
.py
"""Shared local-only safety and reporting helpers for GeoPandas CLIs.""" from __future__ import annotations import hashlib import json import math import os import re import tempfile from importlib.metadata import PackageNotFoundError, version from pathlib import Path from typing import Any PINNED_STACK = { "geo...
606
21,323
scientific-agent-skills
skills/geopandas/scripts/geometry_validity_report.py
.py
#!/usr/bin/env python3 """Audit and simulate repair of bounded local geometries with optional new output.""" from __future__ import annotations import argparse import hashlib import sys from typing import Any from _common import ( DEFAULT_MAX_FEATURES, DEFAULT_MAX_INPUT_BYTES, DEFAULT_MAX_OUTPUT_BYTES, ...
228
7,436
scientific-agent-skills
skills/geopandas/scripts/sensitive_coordinates_checklist.py
.py
#!/usr/bin/env python3 """Produce a deterministic privacy/generalization checklist without reading data.""" from __future__ import annotations import argparse import sys from _common import CliError, emit_json, fail_json, finite_number, positive_int TOOL = "sensitive_coordinates_checklist" SENSITIVE_FLAGS = ( "...
231
8,980
scientific-agent-skills
skills/geopandas/scripts/export_plan.py
.py
#!/usr/bin/env python3 """Create a non-executing, redacted vector export and GeoParquet plan.""" from __future__ import annotations import argparse import sys from typing import Any from _common import ( ABSOLUTE_MAX_FEATURES, DEFAULT_MAX_FEATURES, DEFAULT_MAX_INPUT_BYTES, CliError, bounded_limit...
306
11,098
scientific-agent-skills
skills/geopandas/scripts/vector_inventory.py
.py
#!/usr/bin/env python3 """Create a redacted, metadata-only inventory of one local vector dataset.""" from __future__ import annotations import argparse import hashlib import sys from _common import ( ABSOLUTE_MAX_FEATURES, DEFAULT_MAX_FEATURES, DEFAULT_MAX_INPUT_BYTES, PINNED_STACK, bounded_limit...
141
4,488
scientific-agent-skills
skills/geopandas/scripts/spatial_join_audit.py
.py
#!/usr/bin/env python3 """Run a bounded local spatial join and emit only aggregate cardinality.""" from __future__ import annotations import argparse import sys from collections import Counter from typing import Any from _common import ( ABSOLUTE_MAX_FEATURES, DEFAULT_MAX_FEATURES, DEFAULT_MAX_INPUT_BYTE...
369
12,848
scientific-agent-skills
skills/phylogenetics/scripts/phylogenetic_analysis.py
.py
""" Phylogenetic Analysis Pipeline =============================== Complete workflow: MAFFT alignment → IQ-TREE tree → ETE3 visualization. Requirements: conda install -c bioconda mafft iqtree uv pip install ete3 Usage: python phylogenetic_analysis.py sequences.fasta --type nt --threads 4 python phylog...
273
9,148
scientific-agent-skills
skills/pyopenms/scripts/process_identifications.py
.py
#!/usr/bin/env python3 """ Process Peptide/Protein Identifications Post-process search-engine results (idXML): optionally re-index peptides against a protein FASTA (assigns target/decoy + protein accessions), estimate FDR/q-values, filter by FDR threshold, peptide length, and best-hit-per-spectrum, then export a filte...
112
4,464
scientific-agent-skills
skills/pyopenms/scripts/theoretical_spectrum.py
.py
#!/usr/bin/env python3 """ Theoretical Fragment Spectrum Generator Generate a theoretical fragment-ion spectrum (b/y, optionally a/c/x/z and losses) for a peptide using TheoreticalSpectrumGenerator. Prints annotated fragment ions and optionally writes the spectrum to mzML and/or a CSV peak list. Usage: python the...
76
2,935
scientific-agent-skills
skills/pyopenms/scripts/detect_adducts.py
.py
#!/usr/bin/env python3 """ Adduct Detection / Feature Decharging Group features that are different ionization forms (adducts/charge variants) of the same neutral compound using MetaboliteFeatureDeconvolution. Annotates each feature with its inferred adduct and neutral mass, and writes the decharged feature map plus a ...
91
3,683
scientific-agent-skills
skills/pyopenms/scripts/export_gnps_sirius.py
.py
#!/usr/bin/env python3 """ Export for GNPS (FBMN) and SIRIUS Generate the input files required by downstream annotation tools: gnps Feature-Based Molecular Networking: writes an MGF of MS2 spectra (from a consensusXML linked across samples) plus the GNPS quantification table. sirius...
91
3,359
scientific-agent-skills
skills/pyopenms/scripts/accurate_mass_search.py
.py
#!/usr/bin/env python3 """ Accurate Mass Search (Metabolite Annotation) Annotate detected features with putative metabolite identities by matching accurate masses against the bundled HMDB databases using AccurateMassSearchEngine. Outputs an annotated mzTab and a flat CSV of hits. By default uses the HMDB mapping/struc...
112
4,518
scientific-agent-skills
skills/pyopenms/scripts/convert_format.py
.py
#!/usr/bin/env python3 """ Convert Between MS File Formats Convert spectral data between mzML, mzXML, and MGF, with optional MS-level and RT/intensity filtering. Uses FileHandler for transparent format detection on load. Supported conversions (by output extension): .mzML, .mzXML, .mgf Usage: python convert_forma...
96
3,293
scientific-agent-skills
skills/pyopenms/scripts/align_link_quantify.py
.py
#!/usr/bin/env python3 """ Multi-Sample Align, Link, and Quantify End-to-end untargeted quantification across multiple LC-MS samples: 1. Detect features in each mzML (FeatureFindingMetabo) [or load .featureXML] 2. Align retention times (MapAlignmentAlgorithmPoseClustering) 3. Link features into a consen...
141
5,352
scientific-agent-skills
skills/pyopenms/scripts/plot_ms_data.py
.py
#!/usr/bin/env python3 """ Visualize MS Data Quick plots for inspecting MS data and results: spectrum single MS spectrum (peak/stick plot) by index or RT tic total ion chromatogram featuremap 2D feature map (RT vs m/z, sized/colored by intensity) map2d 2D heatmap of MS1 signal (RT...
130
4,026
scientific-agent-skills
skills/pyopenms/scripts/detect_features_metabo.py
.py
#!/usr/bin/env python3 """ Untargeted Metabolomics Feature Detection Run the standard OpenMS small-molecule feature-finding pipeline on centroided LC-MS data: MassTraceDetection -> ElutionPeakDetection -> FeatureFindingMetabo Outputs a featureXML and (optionally) a CSV table of detected features. This is the rec...
111
4,169
scientific-agent-skills
skills/pyopenms/scripts/inspect_ms_data.py
.py
#!/usr/bin/env python3 """ Inspect Mass Spectrometry Data Load any supported MS file (mzML, mzXML, featureXML, consensusXML, idXML) and print a structured summary: spectrum counts by MS level, RT/m/z ranges, TIC, chromatograms, precursor info, and instrument metadata. Optionally dump a per-spectrum table to CSV. Usag...
168
5,980
scientific-agent-skills
skills/pyopenms/scripts/consensus_to_matrix.py
.py
#!/usr/bin/env python3 """ Consensus Map to Quantification Matrix Convert a consensusXML into analysis-ready tables: a wide intensity matrix (consensus features x samples) joined with feature metadata (RT, m/z, charge, quality), plus an optional long/tidy format. Optionally normalize intensities across samples (median...
71
2,775
scientific-agent-skills
skills/pyopenms/scripts/digest_protein.py
.py
#!/usr/bin/env python3 """ In-Silico Protein Digestion Digest protein sequences (FASTA or a single sequence) with a configurable protease, producing theoretical peptides with masses and m/z. Useful for targeted method design and search-space estimation. Usage: python digest_protein.py proteins.fasta --out peptide...
103
3,535
scientific-agent-skills
skills/pyopenms/scripts/detect_features_centroided.py
.py
#!/usr/bin/env python3 """ Peptide/Centroided Feature Detection Detect features in centroided (peak-picked) LC-MS data using FeatureFinderAlgorithmPicked -- the modern replacement for the removed FeatureFinderCentroided. Suited to peptide/proteomics data with defined isotope patterns and charge states. Outputs a feat...
81
3,027
scientific-agent-skills
skills/pyopenms/scripts/extract_chromatograms.py
.py
#!/usr/bin/env python3 """ Extract Ion Chromatograms (XIC/EIC) and TIC/BPC Build chromatograms from MS1 data: total ion chromatogram (TIC), base peak chromatogram (BPC), and extracted ion chromatograms (XIC) for target m/z values within a ppm tolerance. Writes a tidy CSV (rt, trace, intensity) and optionally a PNG plo...
106
3,810
scientific-agent-skills
skills/pyopenms/scripts/process_spectra.py
.py
#!/usr/bin/env python3 """ Signal Processing for Spectra Apply a configurable chain of signal-processing steps to all (or selected MS-level) spectra in an MS file: smoothing, centroiding (peak picking), normalization, and intensity/S-N thresholding. Steps run in the order listed below. Steps (enable with flags): ...
125
4,793
scientific-agent-skills
skills/pyopenms/scripts/mass_calculator.py
.py
#!/usr/bin/env python3 """ Mass & Chemistry Calculator Compute masses and isotope distributions for peptides (amino-acid sequences), empirical formulas, or both. Reports monoisotopic and average mass, m/z for a range of charge states, the molecular formula, and the theoretical isotope pattern. Usage: python mass_...
93
3,481
scientific-agent-skills
skills/relsa-severity-assessment/scripts/forecast_relsa.py
.py
#!/usr/bin/env python3 """foRcast — ARIMA forecasting of RELSA severity trajectories. Port of the foRcast tool of Lutscher et al. (2026), Front. Physiol. 17:1869563: an ARIMA model fitted per animal to its RELSA trajectory, forecasting the score at the next (or the humane-endpoint) time point with a 95% prediction int...
758
29,431