diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2c883e38ab66792aeaa80e098fa4bd33c6ee003f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install adapterremoval via conda (e.g., from bioconda) +RUN conda install -c bioconda adapterremoval -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/adapterremoval_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/adapterremoval_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/adapterremoval_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5df06c25388e7cd09746b7aaa948a0110b1ff62f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_server.py @@ -0,0 +1,283 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def adapter_removal( + file1: str, + file2: Optional[str] = None, + adapter1: str = "AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC", + adapter2: str = "AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT", + adapter_list: Optional[str] = None, + basename: str = "adapterremoval_output", + trimns: bool = False, + trimqualities: bool = False, + minquality: int = 2, + minlength: int = 15, + maxlength: int = 0, + collapse: bool = False, + collapse_deterministic: bool = False, + mismatchrate: float = 0.333, + minadapteroverlap: int = 0, + gzip: bool = False, + bzip2: bool = False, + threads: int = 1, + interleaved: bool = False, + interleaved_output: bool = False, + qualitybase: int = 33, + qualitymax: int = 41, + mate_separator: str = "/", + trim_low_complexity: bool = False, +): + """ + Perform adapter trimming, quality trimming, and optional merging of paired-end reads using AdapterRemoval v2. + + Args: + file1: Path to the first input FASTQ file (or interleaved file). + file2: Path to the second input FASTQ file (optional). + adapter1: Sequence of the first adapter. + adapter2: Sequence of the second adapter. + adapter_list: Path to a file containing a list of adapters (one per line). + basename: Prefix for all output files. + trimns: If True, trim ambiguous bases (N) from the 5' and 3' ends. + trimqualities: If True, trim low-quality bases from the 5' and 3' ends. + minquality: Minimum quality score for trimming (default 2). + minlength: Minimum read length after trimming (default 15). + maxlength: Maximum read length; reads longer than this are discarded (0 = disabled). + collapse: If True, merge overlapping paired-end reads into a single consensus sequence. + collapse_deterministic: If True, use deterministic merging for overlapping reads. + mismatchrate: Maximum allowed fraction of mismatches in the overlapping region (default 0.333). + minadapteroverlap: Minimum overlap between read and adapter (default 0). + gzip: If True, compress output files using gzip. + bzip2: If True, compress output files using bzip2. + threads: Number of threads to use. + interleaved: If True, input file1 is treated as an interleaved paired-end file. + interleaved_output: If True, output paired-end reads in a single interleaved file. + qualitybase: Phred quality score offset (33 or 64). + qualitymax: Maximum Phred quality score (default 41). + mate_separator: Character separating mate number in read names (default '/'). + trim_low_complexity: If True, trim low complexity (e.g. poly-A) sequences. + """ + # Input validation + f1_path = Path(file1) + if not f1_path.exists(): + raise FileNotFoundError(f"Input file1 not found: {file1}") + + cmd = ["AdapterRemoval", "--file1", str(f1_path)] + + if file2: + f2_path = Path(file2) + if not f2_path.exists(): + raise FileNotFoundError(f"Input file2 not found: {file2}") + cmd.extend(["--file2", str(f2_path)]) + + if adapter_list: + alist_path = Path(adapter_list) + if not alist_path.exists(): + raise FileNotFoundError(f"Adapter list file not found: {adapter_list}") + cmd.extend(["--adapter-list", str(alist_path)]) + else: + cmd.extend(["--adapter1", adapter1, "--adapter2", adapter2]) + + # Parameters + cmd.extend(["--basename", basename]) + cmd.extend(["--minquality", str(minquality)]) + cmd.extend(["--minlength", str(minlength)]) + cmd.extend(["--mismatchrate", str(mismatchrate)]) + cmd.extend(["--minadapteroverlap", str(minadapteroverlap)]) + cmd.extend(["--threads", str(threads)]) + cmd.extend(["--qualitybase", str(qualitybase)]) + cmd.extend(["--qualitymax", str(qualitymax)]) + cmd.extend(["--mate-separator", mate_separator]) + + if trimns: cmd.append("--trimns") + if trimqualities: cmd.append("--trimqualities") + if collapse: cmd.append("--collapse") + if collapse_deterministic: cmd.append("--collapse-deterministic") + if gzip: cmd.append("--gzip") + if bzip2: cmd.append("--bzip2") + if interleaved: cmd.append("--interleaved") + if interleaved_output: cmd.append("--interleaved-output") + if trim_low_complexity: cmd.append("--trim-low-complexity") + if maxlength > 0: + cmd.extend(["--maxlength", str(maxlength)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + # Identify potential output files based on basename and flags + ext = ".gz" if gzip else (".bz2" if bzip2 else "") + output_files = [f"{basename}.settings"] + + # Standard outputs + if file2 or interleaved: + output_files.extend([ + f"{basename}.pair1.truncated{ext}", + f"{basename}.pair2.truncated{ext}", + f"{basename}.singleton.truncated{ext}" + ]) + if collapse or collapse_deterministic: + output_files.extend([ + f"{basename}.collapsed{ext}", + f"{basename}.collapsed.truncated{ext}" + ]) + else: + output_files.append(f"{basename}.truncated{ext}") + + # Filter for files that actually exist + existing_outputs = [f for f in output_files if Path(f).exists()] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": existing_outputs + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def adapter_removal_identify_adapters( + file1: str, + file2: str, + threads: int = 1, + interleaved: bool = False, + qualitybase: int = 33, +): + """ + Attempt to identify adapter sequences by looking for consensus overlaps in paired-end reads. + + Args: + file1: Path to the first input FASTQ file. + file2: Path to the second input FASTQ file. + threads: Number of threads to use. + interleaved: If True, input file1 is treated as an interleaved paired-end file. + qualitybase: Phred quality score offset (33 or 64). + """ + f1_path = Path(file1) + f2_path = Path(file2) + + if not f1_path.exists(): + raise FileNotFoundError(f"Input file1 not found: {file1}") + if not f2_path.exists() and not interleaved: + raise FileNotFoundError(f"Input file2 not found: {file2}") + + cmd = [ + "AdapterRemoval", + "--identify-adapters", + "--file1", str(f1_path), + "--threads", str(threads), + "--qualitybase", str(qualitybase) + ] + + if not interleaved: + cmd.extend(["--file2", str(f2_path)]) + else: + cmd.append("--interleaved") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "identified_adapters": result.stdout # Usually printed to stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def adapter_removal_demultiplex( + barcode_list: str, + file1: str, + file2: Optional[str] = None, + basename: str = "demux_output", + barcode_mm: int = 1, + barcode_mm_r1: Optional[int] = None, + barcode_mm_r2: Optional[int] = None, + gzip: bool = False, + threads: int = 1, + interleaved: bool = False, +): + """ + Demultiplex reads based on a list of barcodes using AdapterRemoval v2. + + Args: + barcode_list: Path to a file containing barcodes (Format: Name Barcode1 Barcode2). + file1: Path to the first input FASTQ file. + file2: Path to the second input FASTQ file (optional). + basename: Prefix for all output files. + barcode_mm: Max number of mismatches allowed in barcodes (default 1). + barcode_mm_r1: Max mismatches for barcode 1 (overrides barcode_mm). + barcode_mm_r2: Max mismatches for barcode 2 (overrides barcode_mm). + gzip: If True, compress output files using gzip. + threads: Number of threads to use. + interleaved: If True, input file1 is treated as an interleaved paired-end file. + """ + blist_path = Path(barcode_list) + f1_path = Path(file1) + + if not blist_path.exists(): + raise FileNotFoundError(f"Barcode list file not found: {barcode_list}") + if not f1_path.exists(): + raise FileNotFoundError(f"Input file1 not found: {file1}") + + cmd = [ + "AdapterRemoval", + "--barcode-list", str(blist_path), + "--file1", str(f1_path), + "--basename", basename, + "--threads", str(threads) + ] + + if file2: + f2_path = Path(file2) + if not f2_path.exists(): + raise FileNotFoundError(f"Input file2 not found: {file2}") + cmd.extend(["--file2", str(f2_path)]) + + if interleaved: + cmd.append("--interleaved") + + if gzip: + cmd.append("--gzip") + + if barcode_mm_r1 is not None: + cmd.extend(["--barcode-mm-r1", str(barcode_mm_r1)]) + if barcode_mm_r2 is not None: + cmd.extend(["--barcode-mm-r2", str(barcode_mm_r2)]) + if barcode_mm_r1 is None and barcode_mm_r2 is None: + cmd.extend(["--barcode-mm", str(barcode_mm)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + # Demultiplexing creates many files based on the barcode names in the list + # We'll return the settings file and a note about the outputs + ext = ".gz" if gzip else "" + settings_file = f"{basename}.settings" + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "settings_file": settings_file if Path(settings_file).exists() else "Not found", + "info": "Demultiplexed files are created with the prefix specified in the barcode list." + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d74168de07182ea4f7318413caf3ae623dd157c5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/adapterremoval_server.py') +SERVER_NAME = 'biosci_adapterremoval' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..a2f7cf04f93a95b930d3b0522c19f44eff82fe41 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-adapterremoval: + build: . + image: mcp-adapterremoval:latest + container_name: mcp-adapterremoval + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=adapterremoval + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4adb36b1602292c3b24d3bf18e90edd5a4714a42 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - adapterremoval + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_adapterremoval/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..20d194cb4175101adf571f9f71916e32fed1024f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install alfred via conda (e.g., from bioconda) +RUN conda install -c bioconda alfred -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/alfred_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/alfred_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/alfred_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e53fc4082eb69d9ac6e0028fab6838c5134fee1d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_server.py @@ -0,0 +1,630 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Literal, Optional + +# MCP-related decorators are assumed to be available in the environment. +# +# For local testing, you can create a dummy decorator: +# +# def mcp_tool_dummy(*args, **kwargs): +# def decorator(func): +# return func +# return decorator +# +# mcp = type("mcp", (), {"tool": mcp_tool_dummy}) + + +@mcp.tool() +def alfred_stats( + in_bam: Path, + ref: Path, + outfile: Optional[Path] = None, + bed: Optional[Path] = None, + threads: int = 1, + minmapq: int = 0, + flag: int = 0, + fflag: int = 1540, + coverage: Optional[Path] = None, + dist: Optional[Path] = None, + sampleid: Optional[str] = None, + libid: Optional[str] = None, + readgroup: Optional[str] = None, + uncompressed: bool = False, +): + """ + Compute alignment summary statistics for a BAM file. + + Args: + in_bam: Input BAM file. + ref: Reference FASTA file. + outfile: Output file for alignment metrics (e.g., metrics.tsv.gz). Defaults to stdout. + bed: BED file with regions of interest. + threads: Number of threads to use. + minmapq: Minimum mapping quality for reads to be considered. + flag: Required SAM flag. + fflag: Filtering SAM flag (reads with these flags will be ignored). + coverage: Output file for coverage statistics (e.g., cov.txt.gz). + dist: Output file for insert size distribution (e.g., dist.txt.gz). + sampleid: Sample ID to be used in the output. + libid: Library ID to be used in the output. + readgroup: Read-group ID to be used in the output. + uncompressed: Write uncompressed output files. + """ + if not in_bam.exists(): + raise FileNotFoundError(f"Input BAM file not found: {in_bam}") + if not ref.exists(): + raise FileNotFoundError(f"Reference FASTA file not found: {ref}") + if bed and not bed.exists(): + raise FileNotFoundError(f"BED file not found: {bed}") + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + + cmd = ["alfred", "stats", "-r", str(ref)] + output_files = [] + + if outfile: + cmd.extend(["-o", str(outfile)]) + output_files.append(str(outfile)) + if bed: + cmd.extend(["-b", str(bed)]) + if threads > 1: + cmd.extend(["-p", str(threads)]) + if minmapq != 0: + cmd.extend(["-m", str(minmapq)]) + if flag != 0: + cmd.extend(["-f", str(flag)]) + if fflag != 1540: + cmd.extend(["-F", str(fflag)]) + if coverage: + cmd.extend(["-c", str(coverage)]) + output_files.append(str(coverage)) + if dist: + cmd.extend(["-d", str(dist)]) + output_files.append(str(dist)) + if sampleid: + cmd.extend(["-s", sampleid]) + if libid: + cmd.extend(["-l", libid]) + if readgroup: + cmd.extend(["-g", readgroup]) + if uncompressed: + cmd.append("-u") + + cmd.append(str(in_bam)) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred stats failed", + "return_code": e.returncode, + } + + +@mcp.tool() +def alfred_count( + in_bam: Path, + ref: Path, + bed: Optional[Path] = None, + gtf: Optional[Path] = None, + outfile: Optional[Path] = None, + threads: int = 1, + minmapq: int = 0, + flag: int = 0, + fflag: int = 1540, + sampleid: Optional[str] = None, + libid: Optional[str] = None, + readgroup: Optional[str] = None, + uncompressed: bool = False, + feature: str = "exon", + id_attribute: str = "gene_id", + stranded: Literal[0, 1, 2] = 0, + antisense: bool = False, +): + """ + Count reads in genomic features from a BAM file. + + Args: + in_bam: Input BAM file. + ref: Reference FASTA file. + bed: BED file with features. Provide either 'bed' or 'gtf'. + gtf: GTF file with features. Provide either 'bed' or 'gtf'. + outfile: Output file for feature counts (e.g., counts.tsv.gz). Defaults to stdout. + threads: Number of threads to use. + minmapq: Minimum mapping quality. + flag: Required SAM flag. + fflag: Filtering SAM flag. + sampleid: Sample ID. + libid: Library ID. + readgroup: Read-group ID. + uncompressed: Write uncompressed output. + feature: GTF feature to count (e.g., 'exon'). + id_attribute: GTF identifier to aggregate by (e.g., 'gene_id'). + stranded: Strandedness (0: unstranded, 1: forward, 2: reverse). + antisense: Count antisense reads. + """ + if not in_bam.exists(): + raise FileNotFoundError(f"Input BAM file not found: {in_bam}") + if not ref.exists(): + raise FileNotFoundError(f"Reference FASTA file not found: {ref}") + if bed and gtf: + raise ValueError("Parameters 'bed' and 'gtf' are mutually exclusive.") + if not bed and not gtf: + raise ValueError("Either 'bed' or 'gtf' must be provided.") + if bed and not bed.exists(): + raise FileNotFoundError(f"BED file not found: {bed}") + if gtf and not gtf.exists(): + raise FileNotFoundError(f"GTF file not found: {gtf}") + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + + cmd = ["alfred", "count", "-r", str(ref)] + output_files = [] + + if bed: + cmd.extend(["-b", str(bed)]) + if gtf: + cmd.extend(["-j", str(gtf)]) + if outfile: + cmd.extend(["-o", str(outfile)]) + output_files.append(str(outfile)) + if threads > 1: + cmd.extend(["-p", str(threads)]) + if minmapq != 0: + cmd.extend(["-m", str(minmapq)]) + if flag != 0: + cmd.extend(["-f", str(flag)]) + if fflag != 1540: + cmd.extend(["-F", str(fflag)]) + if sampleid: + cmd.extend(["-s", sampleid]) + if libid: + cmd.extend(["-l", libid]) + if readgroup: + cmd.extend(["-g", readgroup]) + if uncompressed: + cmd.append("-u") + if feature != "exon": + cmd.extend(["-e", feature]) + if id_attribute != "gene_id": + cmd.extend(["-i", id_attribute]) + if stranded != 0: + cmd.extend(["-a", str(stranded)]) + if antisense: + cmd.append("-z") + + cmd.append(str(in_bam)) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred count failed", + "return_code": e.returncode, + } + + +@mcp.tool() +def alfred_annotate( + in_vcf: Path, + in_bam: Path, + outfile: Path, + ref: Path, + bed: Optional[Path] = None, + gtf: Optional[Path] = None, + threads: int = 1, + minmapq: int = 0, + flag: int = 0, + fflag: int = 1540, + feature: str = "exon", + id_attribute: str = "gene_id", + annotation_type: Literal["INFO", "FORMAT"] = "FORMAT", + field: str = "FE", +): + """ + Annotate variants in a VCF/BCF file with feature overlaps from a BAM file. + + Args: + in_vcf: Input VCF/BCF file. + in_bam: Input BAM file. + outfile: Output VCF/BCF file. + ref: Reference FASTA file. + bed: BED file with features. Provide either 'bed' or 'gtf'. + gtf: GTF file with features. Provide either 'bed' or 'gtf'. + threads: Number of threads to use. + minmapq: Minimum mapping quality. + flag: Required SAM flag. + fflag: Filtering SAM flag. + feature: GTF feature to count (e.g., 'exon'). + id_attribute: GTF identifier to aggregate by (e.g., 'gene_id'). + annotation_type: Annotation type ('INFO' or 'FORMAT'). + field: Annotation field name. + """ + if not in_vcf.exists(): + raise FileNotFoundError(f"Input VCF/BCF file not found: {in_vcf}") + if not in_bam.exists(): + raise FileNotFoundError(f"Input BAM file not found: {in_bam}") + if not ref.exists(): + raise FileNotFoundError(f"Reference FASTA file not found: {ref}") + if bed and gtf: + raise ValueError("Parameters 'bed' and 'gtf' are mutually exclusive.") + if not bed and not gtf: + raise ValueError("Either 'bed' or 'gtf' must be provided.") + if bed and not bed.exists(): + raise FileNotFoundError(f"BED file not found: {bed}") + if gtf and not gtf.exists(): + raise FileNotFoundError(f"GTF file not found: {gtf}") + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + + cmd = ["alfred", "annotate", "-o", str(outfile), "-r", str(ref)] + output_files = [str(outfile)] + + if bed: + cmd.extend(["-b", str(bed)]) + if gtf: + cmd.extend(["-j", str(gtf)]) + if threads > 1: + cmd.extend(["-p", str(threads)]) + if minmapq != 0: + cmd.extend(["-m", str(minmapq)]) + if flag != 0: + cmd.extend(["-f", str(flag)]) + if fflag != 1540: + cmd.extend(["-F", str(fflag)]) + if feature != "exon": + cmd.extend(["-e", feature]) + if id_attribute != "gene_id": + cmd.extend(["-i", id_attribute]) + if annotation_type != "FORMAT": + cmd.extend(["-t", annotation_type]) + if field != "FE": + cmd.extend(["-a", field]) + + cmd.extend([str(in_vcf), str(in_bam)]) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred annotate failed", + "return_code": e.returncode, + } + + +@mcp.tool() +def alfred_qc( + input_bams: List[Path], + outfile: Path, + ref: Path, + bed: Optional[Path] = None, + gtf: Optional[Path] = None, + threads: int = 1, + minmapq: int = 0, + flag: int = 0, + fflag: int = 1540, + contigs: Optional[str] = None, + feature: str = "exon", + id_attribute: str = "gene_id", + stranded: Literal[0, 1, 2] = 0, + antisense: bool = False, + uncompressed: bool = False, + sites: Optional[Path] = None, + genome: Optional[Path] = None, +): + """ + Generate a multi-sample QC report from one or more BAM files. + + Args: + input_bams: List of input BAM files. + outfile: Output file for QC metrics (e.g., out.qc.json.gz). + ref: Reference FASTA file. + bed: BED file with regions of interest. + gtf: GTF file with features. + threads: Number of threads to use. + minmapq: Minimum mapping quality. + flag: Required SAM flag. + fflag: Filtering SAM flag. + contigs: Comma-separated list of contigs to include. + feature: GTF feature to count (e.g., 'exon'). + id_attribute: GTF identifier to aggregate by (e.g., 'gene_id'). + stranded: Strandedness (0: unstranded, 1: forward, 2: reverse). + antisense: Count antisense reads. + uncompressed: Write uncompressed output. + sites: VCF/BCF file with sites of interest. + genome: Genome accessibility file. + """ + if not input_bams: + raise ValueError("At least one input BAM file is required.") + for bam in input_bams: + if not bam.exists(): + raise FileNotFoundError(f"Input BAM file not found: {bam}") + if not ref.exists(): + raise FileNotFoundError(f"Reference FASTA file not found: {ref}") + if bed and not bed.exists(): + raise FileNotFoundError(f"BED file not found: {bed}") + if gtf and not gtf.exists(): + raise FileNotFoundError(f"GTF file not found: {gtf}") + if sites and not sites.exists(): + raise FileNotFoundError(f"Sites VCF/BCF file not found: {sites}") + if genome and not genome.exists(): + raise FileNotFoundError(f"Genome accessibility file not found: {genome}") + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + + cmd = ["alfred", "qc", "-o", str(outfile), "-r", str(ref)] + output_files = [str(outfile)] + + if bed: + cmd.extend(["-b", str(bed)]) + if gtf: + cmd.extend(["-j", str(gtf)]) + if threads > 1: + cmd.extend(["-p", str(threads)]) + if minmapq != 0: + cmd.extend(["-m", str(minmapq)]) + if flag != 0: + cmd.extend(["-f", str(flag)]) + if fflag != 1540: + cmd.extend(["-F", str(fflag)]) + if contigs: + cmd.extend(["-c", contigs]) + if feature != "exon": + cmd.extend(["-e", feature]) + if id_attribute != "gene_id": + cmd.extend(["-i", id_attribute]) + if stranded != 0: + cmd.extend(["-a", str(stranded)]) + if antisense: + cmd.append("-z") + if uncompressed: + cmd.append("-u") + if sites: + cmd.extend(["-s", str(sites)]) + if genome: + cmd.extend(["-g", str(genome)]) + + cmd.extend([str(bam) for bam in input_bams]) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred qc failed", + "return_code": e.returncode, + } + + +@mcp.tool() +def alfred_merge( + input_qc_files: List[Path], outfile: Path, uncompressed: bool = False +): + """ + Merge multiple alfred QC files. + + Args: + input_qc_files: List of input QC JSON files (e.g., *.qc.json.gz). + outfile: Output file for merged QC metrics (e.g., out.qc.json.gz). + uncompressed: Write uncompressed output. + """ + if not input_qc_files: + raise ValueError("At least one input QC file is required.") + for qc_file in input_qc_files: + if not qc_file.exists(): + raise FileNotFoundError(f"Input QC file not found: {qc_file}") + + cmd = ["alfred", "merge", "-o", str(outfile)] + output_files = [str(outfile)] + + if uncompressed: + cmd.append("-u") + + cmd.extend([str(f) for f in input_qc_files]) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred merge failed", + "return_code": e.returncode, + } + + +@mcp.tool() +def alfred_track( + in_bam: Path, + ref: Path, + outfile: Optional[Path] = None, + bed: Optional[Path] = None, + threads: int = 1, + minmapq: int = 0, + flag: int = 0, + fflag: int = 1540, + step: int = 1000, + window: int = 1000, + uncompressed: bool = False, +): + """ + Create a bedGraph track from a BAM file. + + Args: + in_bam: Input BAM file. + ref: Reference FASTA file. + outfile: Output bedGraph file (e.g., track.bedGraph.gz). Defaults to stdout. + bed: BED file with regions of interest. + threads: Number of threads to use. + minmapq: Minimum mapping quality. + flag: Required SAM flag. + fflag: Filtering SAM flag. + step: Step size for coverage computation. + window: Window size for coverage computation. + uncompressed: Write uncompressed output. + """ + if not in_bam.exists(): + raise FileNotFoundError(f"Input BAM file not found: {in_bam}") + if not ref.exists(): + raise FileNotFoundError(f"Reference FASTA file not found: {ref}") + if bed and not bed.exists(): + raise FileNotFoundError(f"BED file not found: {bed}") + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + if step <= 0 or window <= 0: + raise ValueError("Step and window sizes must be positive.") + + cmd = ["alfred", "track", "-r", str(ref)] + output_files = [] + + if outfile: + cmd.extend(["-o", str(outfile)]) + output_files.append(str(outfile)) + if bed: + cmd.extend(["-b", str(bed)]) + if threads > 1: + cmd.extend(["-p", str(threads)]) + if minmapq != 0: + cmd.extend(["-m", str(minmapq)]) + if flag != 0: + cmd.extend(["-f", str(flag)]) + if fflag != 1540: + cmd.extend(["-F", str(fflag)]) + if step != 1000: + cmd.extend(["-s", str(step)]) + if window != 1000: + cmd.extend(["-w", str(window)]) + if uncompressed: + cmd.append("-u") + + cmd.append(str(in_bam)) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred track failed", + "return_code": e.returncode, + } + + +@mcp.tool() +def alfred_motif( + ref_fa: Path, + motif: str, + outfile: Optional[Path] = None, + mincount: int = 1, + uncompressed: bool = False, +): + """ + Search for motifs in a FASTA file. + + Args: + ref_fa: Reference FASTA file. + motif: Motif to search for. + outfile: Output BED file (e.g., motif.bed.gz). Defaults to stdout. + mincount: Minimum number of motif repeats. + uncompressed: Write uncompressed output. + """ + if not ref_fa.exists(): + raise FileNotFoundError(f"Reference FASTA file not found: {ref_fa}") + if not motif: + raise ValueError("Motif string cannot be empty.") + if mincount < 1: + raise ValueError("Minimum count must be at least 1.") + + cmd = ["alfred", "motif", "-m", motif] + output_files = [] + + if outfile: + cmd.extend(["-o", str(outfile)]) + output_files.append(str(outfile)) + if mincount != 1: + cmd.extend(["-c", str(mincount)]) + if uncompressed: + cmd.append("-u") + + cmd.append(str(ref_fa)) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Alfred motif failed", + "return_code": e.returncode, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..33b3e46b4cb2fb4beee60e1ac47328ee9ba04dde --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/alfred_server.py') +SERVER_NAME = 'biosci_alfred' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..10d69f54e7306f9e7fa797206b59852f4e9b20d2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-alfred: + build: . + image: mcp-alfred:latest + container_name: mcp-alfred + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=alfred + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0a0a1452ee7957bb2da9cf2f21e5378114b9dd64 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - alfred + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_alfred/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a683380b60d1d2751d12a889581a344ed8fa4cff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install anansescanpy via conda (e.g., from bioconda) +RUN conda install -c bioconda anansescanpy -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY anansescanpy_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/anansescanpy_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/anansescanpy_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_server.py new file mode 100644 index 0000000000000000000000000000000000000000..130a9a0383bc706c1c64ba4abcd54f38ccb3c097 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_server.py @@ -0,0 +1,270 @@ +import subprocess +from pathlib import Path +from typing import Optional +import shlex +import textwrap + +@mcp.tool() +def export_scanpy( + adata_path: str, + cluster_id: str, + output_dir: str = "scANANSE", + rna_type: str = "raw", + min_cells: int = 50, + is_multiome: bool = False, +): + """ + Export Scanpy AnnData object to files compatible with ANANSE. + This function prepares the gene expression and (optionally) accessibility data + for each cluster defined in the AnnData object. + + Args: + adata_path: Path to the input AnnData file (.h5ad). + cluster_id: The column in adata.obs containing cluster/cell-type labels. + output_dir: Directory where the exported files will be saved. + rna_type: Type of RNA data ('raw' or 'recount'). + min_cells: Minimum number of cells per cluster to be included in the export. + is_multiome: Set to True if the AnnData object contains both RNA and ATAC data. + """ + # Input validation + p_adata = Path(adata_path) + if not p_adata.exists(): + return {"error": f"Input file {adata_path} not found."} + + if rna_type not in ["raw", "recount"]: + return {"error": "rna_type must be either 'raw' or 'recount'."} + + if min_cells < 0: + return {"error": "min_cells must be a non-negative integer."} + + # Construct Python script to execute the library function + # We use a subprocess to ensure we can capture output and handle the environment + py_script = textwrap.dedent(f""" + import scanpy as sc + import anansescanpy as aspy + import os + + try: + adata = sc.read_h5ad('{adata_path}') + aspy.export_scanpy( + adata, + cluster_id='{cluster_id}', + rna_type='{rna_type}', + min_cells={min_cells}, + output_dir='{output_dir}', + is_multiome={is_multiome} + ) + print("Export successful") + except Exception as e: + print(f"Error: {{str(e)}}") + exit(1) + """) + + try: + result = subprocess.run( + ["python3", "-c", py_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"anansescanpy.export_scanpy on {adata_path}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_dir": output_dir + } + except subprocess.CalledProcessError as e: + return { + "error": "Failed to export Scanpy object", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def import_scanpy( + adata_path: str, + ananse_dir: str, + cluster_id: str, + output_path: str, +): + """ + Import ANANSE results (influence scores, GRN) back into a Scanpy AnnData object. + + Args: + adata_path: Path to the original AnnData file (.h5ad). + ananse_dir: Directory containing the ANANSE output files. + cluster_id: The column in adata.obs that was used for the ANANSE analysis. + output_path: Path where the updated AnnData file will be saved. + """ + p_adata = Path(adata_path) + p_ananse = Path(ananse_dir) + + if not p_adata.exists(): + return {"error": f"Input AnnData file {adata_path} not found."} + if not p_ananse.is_dir(): + return {"error": f"ANANSE directory {ananse_dir} not found."} + + py_script = textwrap.dedent(f""" + import scanpy as sc + import anansescanpy as aspy + + try: + adata = sc.read_h5ad('{adata_path}') + adata = aspy.import_scanpy( + adata, + cluster_id='{cluster_id}', + ananse_dir='{ananse_dir}' + ) + adata.write_h5ad('{output_path}') + print("Import successful") + except Exception as e: + print(f"Error: {{str(e)}}") + exit(1) + """) + + try: + result = subprocess.run( + ["python3", "-c", py_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"anansescanpy.import_scanpy from {ananse_dir}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "error": "Failed to import ANANSE results", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def anansnake_config( + adata_path: str, + cluster_id: str, + genome: str, + output_dir: str, + sample_col: Optional[str] = None, + atac_column: Optional[str] = None, +): + """ + Generate a configuration file for the anansnake pipeline based on a Scanpy object. + + Args: + adata_path: Path to the AnnData file (.h5ad). + cluster_id: The column in adata.obs containing cluster labels. + genome: Genome assembly name (e.g., 'hg38', 'mm10'). + output_dir: Directory where the config.yaml and analysis files will be created. + sample_col: Optional column in adata.obs containing sample identifiers. + atac_column: Optional column in adata.obs containing ATAC-seq peak data. + """ + p_adata = Path(adata_path) + if not p_adata.exists(): + return {"error": f"Input file {adata_path} not found."} + + sample_arg = f"'{sample_col}'" if sample_col else "None" + atac_arg = f"'{atac_column}'" if atac_column else "None" + + py_script = textwrap.dedent(f""" + import scanpy as sc + import anansescanpy as aspy + + try: + adata = sc.read_h5ad('{adata_path}') + aspy.anansnake_config( + adata, + cluster_id='{cluster_id}', + genome='{genome}', + output_dir='{output_dir}', + sample_col={sample_arg}, + atac_column={atac_arg} + ) + print("Config generation successful") + except Exception as e: + print(f"Error: {{str(e)}}") + exit(1) + """) + + try: + result = subprocess.run( + ["python3", "-c", py_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": "anansescanpy.anansnake_config", + "stdout": result.stdout, + "stderr": result.stderr, + "output_dir": output_dir + } + except subprocess.CalledProcessError as e: + return { + "error": "Failed to generate anansnake config", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def run_anansnake( + config_file: str, + snakefile: str, + cores: int = 12, + memory_mb: int = 48000, + use_conda: bool = True, + conda_frontend: str = "mamba", +): + """ + Execute the anansnake GRN analysis pipeline using Snakemake. + + Args: + config_file: Path to the config.yaml file (generated by anansnake_config). + snakefile: Path to the anansnake Snakefile. + cores: Number of CPU cores to use. + memory_mb: Memory resource limit in MB. + use_conda: Whether to use conda environments for the pipeline steps. + conda_frontend: The conda frontend to use ('mamba' or 'conda'). + """ + p_config = Path(config_file) + p_snake = Path(snakefile) + + if not p_config.exists(): + return {"error": f"Config file {config_file} not found."} + if not p_snake.exists(): + return {"error": f"Snakefile {snakefile} not found."} + + cmd = [ + "snakemake", + "--configfile", str(p_config), + "--snakefile", str(p_snake), + "--cores", str(cores), + "--resources", f"mem_mb={memory_mb}" + ] + + if use_conda: + cmd.append("--use-conda") + cmd.extend(["--conda-frontend", conda_frontend]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": "Snakemake pipeline execution failed", + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d17f7d94b2bdffb3950c93a0d3cfc165f87bfd9a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/app/anansescanpy_server.py') +SERVER_NAME = 'biosci_anansescanpy' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..be181dd45329ba5c46ff01ad28f7093a2bb3ce2c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-anansescanpy: + build: . + image: mcp-anansescanpy:latest + container_name: mcp-anansescanpy + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=anansescanpy + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..86f5644cc42fc93ecff2a6e15385ae35f483501d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - anansescanpy + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_anansescanpy/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..b4cb6c099c9996d6e3a809fe1b5f509b65a9dff1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install aria2 via conda (e.g., from bioconda) +RUN conda install -c bioconda aria2 -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY aria2_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/aria2_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/aria2_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5f7b1304dcb2b682a79060a6388d89a9e7008897 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_server.py @@ -0,0 +1,307 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +@mcp.tool() +def aria2_download( + uris: List[str], + dir: Optional[str] = None, + out: Optional[str] = None, + split: int = 5, + max_connection_per_server: int = 1, + min_split_size: str = "20M", + continue_download: bool = True, + max_download_limit: str = "0", + user_agent: Optional[str] = None, + header: Optional[List[str]] = None, + all_proxy: Optional[str] = None, +): + """ + Download files from HTTP/HTTPS/FTP/SFTP URIs using aria2c. + + :param uris: List of URIs to download. + :param dir: The directory to store the downloaded file. + :param out: The file name of the downloaded file. + :param split: Download a file using N connections. + :param max_connection_per_server: The maximum number of connections to one server for each download. + :param min_split_size: aria2 does not split less than this size. (e.g., 20M) + :param continue_download: Continue downloading a partially downloaded file. + :param max_download_limit: Set max download speed in bytes/sec. 0 means unrestricted. (e.g., 1M, 500K) + :param user_agent: Set user agent. + :param header: Append HTTP header. + :param all_proxy: Use proxy server for all protocols. + """ + cmd = ["aria2c"] + + if dir: + path_dir = Path(dir) + path_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--dir", str(path_dir)]) + + if out: + cmd.extend(["--out", out]) + + cmd.extend([ + f"--split={split}", + f"--max-connection-per-server={max_connection_per_server}", + f"--min-split-size={min_split_size}", + f"--continue={str(continue_download).lower()}", + f"--max-download-limit={max_download_limit}" + ]) + + if user_agent: + cmd.extend([f"--user-agent={user_agent}"]) + + if header: + for h in header: + cmd.extend([f"--header={h}"]) + + if all_proxy: + cmd.extend([f"--all-proxy={all_proxy}"]) + + cmd.extend(uris) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def aria2_torrent( + torrent_path: str, + dir: Optional[str] = None, + seed_time: int = 0, + max_upload_limit: str = "0", + listen_port: str = "6881-6999", + select_file: Optional[str] = None, + follow_torrent: str = "true", +): + """ + Download files using a BitTorrent file or Magnet URI. + + :param torrent_path: Path to .torrent file or a Magnet URI. + :param dir: The directory to store the downloaded file. + :param seed_time: Specify seeding time in minutes. 0 means do not seed. + :param max_upload_limit: Set max upload speed in bytes/sec. + :param listen_port: Set TCP port number for BitTorrent. + :param select_file: Index of the file to download (e.g., "1,2,5"). + :param follow_torrent: If 'true' or 'mem', aria2 will download the torrent file if URI is a torrent file. + """ + cmd = ["aria2c"] + + if dir: + path_dir = Path(dir) + path_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--dir", str(path_dir)]) + + cmd.extend([ + f"--seed-time={seed_time}", + f"--max-upload-limit={max_upload_limit}", + f"--listen-port={listen_port}", + f"--follow-torrent={follow_torrent}" + ]) + + if select_file: + cmd.extend([f"--select-file={select_file}"]) + + # Check if it's a local file or a magnet link + if not torrent_path.startswith("magnet:?"): + path_torrent = Path(torrent_path) + if not path_torrent.exists(): + return {"error": f"Torrent file not found: {torrent_path}"} + cmd.append(str(path_torrent)) + else: + cmd.append(torrent_path) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def aria2_metalink( + metalink_file: str, + dir: Optional[str] = None, + metalink_language: Optional[str] = None, + metalink_location: Optional[str] = None, + metalink_os: Optional[str] = None, +): + """ + Download files using a Metalink file. + + :param metalink_file: Path to the .metalink file. + :param dir: The directory to store the downloaded file. + :param metalink_language: The language of the file to download. + :param metalink_location: The location of the preferred server. + :param metalink_os: The operating system of the file to download. + """ + path_meta = Path(metalink_file) + if not path_meta.exists(): + return {"error": f"Metalink file not found: {metalink_file}"} + + cmd = ["aria2c"] + + if dir: + path_dir = Path(dir) + path_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--dir", str(path_dir)]) + + if metalink_language: + cmd.extend([f"--metalink-language={metalink_language}"]) + if metalink_location: + cmd.extend([f"--metalink-location={metalink_location}"]) + if metalink_os: + cmd.extend([f"--metalink-os={metalink_os}"]) + + cmd.append(str(path_meta)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def aria2_batch_download( + input_file: str, + dir: Optional[str] = None, + force_sequential: bool = False, + max_concurrent_downloads: int = 5, + parameterized_uris: bool = False, +): + """ + Download multiple URIs from a text file. + + :param input_file: Path to the file containing URIs (one per line). + :param dir: The directory to store the downloaded files. + :param force_sequential: Fetch URIs in the order they appear in the input file. + :param max_concurrent_downloads: Set maximum number of parallel downloads. + :param parameterized_uris: Enable parameterized URI support (e.g. http://{host1,host2}/file). + """ + path_input = Path(input_file) + if not path_input.exists(): + return {"error": f"Input file not found: {input_file}"} + + cmd = ["aria2c", f"--input-file={str(path_input)}"] + + if dir: + path_dir = Path(dir) + path_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--dir", str(path_dir)]) + + cmd.extend([ + f"--force-sequential={str(force_sequential).lower()}", + f"--max-concurrent-downloads={max_concurrent_downloads}", + f"--parameterized-uri={str(parameterized_uris).lower()}" + ]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def aria2_rpc_server( + rpc_listen_port: int = 6800, + rpc_listen_all: bool = False, + rpc_secret: Optional[str] = None, + rpc_allow_origin_all: bool = False, + rpc_max_request_size: str = "2M", + daemon: bool = False, +): + """ + Start aria2 in RPC mode to allow remote control via JSON-RPC or XML-RPC. + + :param rpc_listen_port: Port number for RPC server. + :param rpc_listen_all: Listen for RPC requests on all network interfaces. + :param rpc_secret: Set RPC secret authorization token. + :param rpc_allow_origin_all: Add Access-Control-Allow-Origin: * to HTTP response. + :param rpc_max_request_size: Set max size of JSON-RPC/XML-RPC request. + :param daemon: Run as a background process. + """ + cmd = ["aria2c", "--enable-rpc"] + + cmd.extend([ + f"--rpc-listen-port={rpc_listen_port}", + f"--rpc-listen-all={str(rpc_listen_all).lower()}", + f"--rpc-allow-origin-all={str(rpc_allow_origin_all).lower()}", + f"--rpc-max-request-size={rpc_max_request_size}", + f"--daemon={str(daemon).lower()}" + ]) + + if rpc_secret: + cmd.append(f"--rpc-secret={rpc_secret}") + + try: + # If daemon is True, we don't wait for completion + if daemon: + subprocess.Popen(cmd) + return { + "command_executed": " ".join(cmd), + "status": "daemon_started", + "message": f"aria2 RPC server started in background on port {rpc_listen_port}" + } + else: + # This will block until the server is stopped + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..58ac281d1c04b03249811a51d426b4d92554d94e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/app/aria2_server.py') +SERVER_NAME = 'biosci_aria2' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ea7d8cc280282474edf221e8b8d2093ad080830f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-aria2: + build: . + image: mcp-aria2:latest + container_name: mcp-aria2 + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=aria2 + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6b289d129e8969673e82632e5d437191907dc251 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - aria2 + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_aria2/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c3ee4e16c686152423e96c94fbde9fd5e62b1bfc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bcbio-nextgen via conda (e.g., from bioconda) +RUN conda install -c bioconda bcbio-nextgen -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bcbio-nextgen_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bcbio-nextgen_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bcbio-nextgen_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4e5dae30404f8d153893383bce5087353708b16d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_server.py @@ -0,0 +1,268 @@ +from typing import List, Optional, Dict, Any +import subprocess +from pathlib import Path +import os + +@mcp.tool() +def bcbio_nextgen_run( + config_file: str, + num_cores: int = 1, + parallel_type: str = "local", + scheduler: Optional[str] = None, + queue: Optional[str] = None, + resources: Optional[str] = None, + tag: Optional[str] = None, + workdir: Optional[str] = None, + timeout: int = 15, + retries: int = 0, +) -> Dict[str, Any]: + """ + Run a bcbio-nextgen analysis pipeline using a provided configuration file. + + Args: + config_file: Path to the YAML configuration file defining the analysis. + num_cores: Number of local cores to use for parallel execution. + parallel_type: Type of parallel execution (local, ipython, cluster, etc.). + scheduler: Scheduler for cluster execution (e.g., sge, slurm, torque, pbspro, lsf). + queue: Queue to submit jobs to on a cluster. + resources: Specific resource requirements for the scheduler (e.g., 'mem=16,vmem=20'). + tag: Optional tag to identify this specific run. + workdir: Directory to use for processing (defaults to current directory). + timeout: Time in minutes to wait for ipython cluster startup. + retries: Number of times to retry failed steps. + """ + config_path = Path(config_file) + if not config_path.exists(): + return {"error": f"Configuration file not found: {config_file}"} + + cmd = ["bcbio_nextgen.py", str(config_path.absolute())] + + cmd.extend(["-n", str(num_cores)]) + cmd.extend(["-t", parallel_type]) + + if scheduler: + cmd.extend(["-s", scheduler]) + if queue: + cmd.extend(["-q", queue]) + if resources: + cmd.extend(["-r", resources]) + if tag: + cmd.extend(["--tag", tag]) + if timeout != 15: + cmd.extend(["--timeout", str(timeout)]) + if retries > 0: + cmd.extend(["--retries", str(retries)]) + + # Handle working directory + original_dir = os.getcwd() + if workdir: + work_path = Path(workdir) + if not work_path.exists(): + work_path.mkdir(parents=True, exist_ok=True) + os.chdir(work_path) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + finally: + os.chdir(original_dir) + +@mcp.tool() +def bcbio_nextgen_template( + template_name: str, + metadata_csv: str, + input_files: List[str], + out_dir: Optional[str] = None, +) -> Dict[str, Any]: + """ + Create a bcbio-nextgen processing description from a template and input files. + + Args: + template_name: Name of the template to use (e.g., 'freebayes-variant', 'gatk-variant'). + metadata_csv: Path to a CSV file containing sample metadata. + input_files: List of paths to input BAM or FASTQ files. + out_dir: Directory to write the generated configuration (defaults to current directory). + """ + metadata_path = Path(metadata_csv) + if not metadata_path.exists(): + return {"error": f"Metadata file not found: {metadata_csv}"} + + # Validate input files + valid_inputs = [] + for f in input_files: + p = Path(f) + if p.exists(): + valid_inputs.append(str(p.absolute())) + else: + return {"error": f"Input file not found: {f}"} + + cmd = ["bcbio_nextgen.py", "-w", "template", template_name, str(metadata_path.absolute())] + cmd.extend(valid_inputs) + + # Handle output directory + original_dir = os.getcwd() + if out_dir: + out_path = Path(out_dir) + if not out_path.exists(): + out_path.mkdir(parents=True, exist_ok=True) + os.chdir(out_path) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success", + "info": "Configuration files generated in the output directory." + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + finally: + os.chdir(original_dir) + +@mcp.tool() +def bcbio_nextgen_upgrade( + tooldir: Optional[str] = None, + tools: bool = False, + data: bool = False, + genomes: Optional[List[str]] = None, + aligners: Optional[List[str]] = None, + cores: int = 1, +) -> Dict[str, Any]: + """ + Upgrade bcbio-nextgen software, third-party tools, or genome data. + + Args: + tooldir: Directory where tools are installed. + tools: If True, upgrade third-party software tools. + data: If True, upgrade/install genome data. + genomes: List of genome builds to install/upgrade (e.g., ['hg38', 'mm10']). + aligners: List of aligners to install data for (e.g., ['bwa', 'bowtie2']). + cores: Number of cores to use for data downloads and indexing. + """ + cmd = ["bcbio_nextgen.py", "upgrade"] + + if tooldir: + cmd.extend(["--tooldir", tooldir]) + if tools: + cmd.append("--tools") + if data: + cmd.append("--data") + + if genomes: + for g in genomes: + cmd.extend(["--genomes", g]) + + if aligners: + for a in aligners: + cmd.extend(["--aligners", a]) + + cmd.extend(["--cores", str(cores)]) + + try: + # Upgrades can take a long time, but we capture output + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + +@mcp.tool() +def bcbio_nextgen_install( + install_path: str, + tooldir: str, + genomes: List[str], + aligners: List[str], + nodata: bool = False, + isolate: bool = False, +) -> Dict[str, Any]: + """ + Run the bcbio-nextgen installer script to set up the environment. + + Args: + install_path: Path to install bcbio-nextgen data and code. + tooldir: Path to install third-party software tools. + genomes: List of genome builds to install (e.g., ['hg38']). + aligners: List of aligners to prepare (e.g., ['bwa']). + nodata: If True, do not install genome data. + isolate: If True, install into an isolated environment. + """ + # Note: This assumes bcbio_nextgen_install.py is in the PATH or current directory + # In a real environment, users might need to download it first. + cmd = ["python", "bcbio_nextgen_install.py", install_path, "--tooldir=" + tooldir] + + for g in genomes: + cmd.extend(["--genomes", g]) + for a in aligners: + cmd.extend(["--aligners", a]) + + if nodata: + cmd.append("--nodata") + if isolate: + cmd.append("--isolate") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + +@mcp.tool() +def bcbio_nextgen_version() -> Dict[str, Any]: + """ + Check the installed version of bcbio-nextgen. + """ + cmd = ["bcbio_nextgen.py", "--version"] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout.strip(), + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "status": "failed" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9c94308f52018ca22b49aefdf03f2ef0c6e7c406 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/app/bcbio-nextgen_server.py') +SERVER_NAME = 'biosci_bcbio_nextgen' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..67a946efd6f123ca05819a74532a97d4f84baeee --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bcbio-nextgen: + build: . + image: mcp-bcbio-nextgen:latest + container_name: mcp-bcbio-nextgen + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bcbio-nextgen + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0fe9688f1cc6b35c7e0b9386c01415dc1e8fc3b1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bcbio-nextgen + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bcbio-nextgen/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..63b05471ee99bb35ed53f24908ae6f938c8f6401 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconda-utils via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconda-utils -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconda-utils_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconda-utils_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconda-utils_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/__pycache__/bioconda-utils_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/__pycache__/bioconda-utils_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..134913805881d9c1ab346d22eb61ff429e5d22f8 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/__pycache__/bioconda-utils_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b540318abe7e23666bc10e81a8aaaeaa9a344be5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_server.py @@ -0,0 +1,490 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# @mcp.tool() decorator is assumed to be imported from a library like 'mcp' +# In this code, it is commented out as per the instructions. + +# @mcp.tool() +def bioconductor_skeleton( + packages: List[str], + recipes: Optional[Path] = None, + config: Optional[Path] = None, + recursive: bool = False, + skip_existing: bool = False, + skip_if_in_other_channels: bool = False, + output_dir: Optional[Path] = None, + pkg_version: Optional[str] = None, + bioc_version: Optional[str] = None, + force: bool = False, +): + """ + Creates skeleton recipes for one or more Bioconductor packages. + + Args: + packages: One or more Bioconductor package names to create skeletons for. + recipes: Path to the recipes folder. + config: Path to the bioconda-utils configuration file. + recursive: If True, create recipes for missing dependencies as well. + skip_existing: If True, skip recipes that already exist. + skip_if_in_other_channels: If True, skip recipes that exist in other channels. + output_dir: Directory to write the new recipes to. Defaults to the recipes folder. + pkg_version: Specific package version to create a skeleton for. + bioc_version: Specific Bioconductor version to use. + force: If True, force creation of a recipe even if it already exists. + """ + if not packages: + raise ValueError("At least one package name must be provided.") + + cmd = ["bioconda-utils", "bioconductor-skeleton"] + if recipes: + cmd.extend(["--recipes", str(recipes)]) + if config: + cmd.extend(["--config", str(config)]) + if recursive: + cmd.append("--recursive") + if skip_existing: + cmd.append("--skip-existing") + if skip_if_in_other_channels: + cmd.append("--skip-if-in-other-channels") + if output_dir: + output_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--output-dir", str(output_dir)]) + if pkg_version: + cmd.extend(["--pkg-version", pkg_version]) + if bioc_version: + cmd.extend(["--bioc-version", bioc_version]) + if force: + cmd.append("--force") + + cmd.extend(packages) + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + output_files = [str(output_dir)] if output_dir else [] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + + +# @mcp.tool() +def cran_skeleton( + packages: List[str], + recipes: Optional[Path] = None, + config: Optional[Path] = None, + recursive: bool = False, + skip_existing: bool = False, + skip_if_in_other_channels: bool = False, + output_dir: Optional[Path] = None, + pkg_version: Optional[str] = None, + force: bool = False, +): + """ + Creates skeleton recipes for one or more CRAN packages. + + Args: + packages: One or more CRAN package names to create skeletons for. + recipes: Path to the recipes folder. + config: Path to the bioconda-utils configuration file. + recursive: If True, create recipes for missing dependencies as well. + skip_existing: If True, skip recipes that already exist. + skip_if_in_other_channels: If True, skip recipes that exist in other channels. + output_dir: Directory to write the new recipes to. Defaults to the recipes folder. + pkg_version: Specific package version to create a skeleton for. + force: If True, force creation of a recipe even if it already exists. + """ + if not packages: + raise ValueError("At least one package name must be provided.") + + cmd = ["bioconda-utils", "cran-skeleton"] + if recipes: + cmd.extend(["--recipes", str(recipes)]) + if config: + cmd.extend(["--config", str(config)]) + if recursive: + cmd.append("--recursive") + if skip_existing: + cmd.append("--skip-existing") + if skip_if_in_other_channels: + cmd.append("--skip-if-in-other-channels") + if output_dir: + output_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--output-dir", str(output_dir)]) + if pkg_version: + cmd.extend(["--pkg-version", pkg_version]) + if force: + cmd.append("--force") + + cmd.extend(packages) + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + output_files = [str(output_dir)] if output_dir else [] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + + +# @mcp.tool() +def pypi_skeleton( + packages: List[str], + recipes: Optional[Path] = None, + config: Optional[Path] = None, + recursive: bool = False, + skip_existing: bool = False, + skip_if_in_other_channels: bool = False, + output_dir: Optional[Path] = None, + pkg_version: Optional[str] = None, + python_version: Optional[str] = None, + force: bool = False, +): + """ + Creates skeleton recipes for one or more PyPI packages. + + Args: + packages: One or more PyPI package names to create skeletons for. + recipes: Path to the recipes folder. + config: Path to the bioconda-utils configuration file. + recursive: If True, create recipes for missing dependencies as well. + skip_existing: If True, skip recipes that already exist. + skip_if_in_other_channels: If True, skip recipes that exist in other channels. + output_dir: Directory to write the new recipes to. Defaults to the recipes folder. + pkg_version: Specific package version to create a skeleton for. + python_version: Python version to use for the skeleton. + force: If True, force creation of a recipe even if it already exists. + """ + if not packages: + raise ValueError("At least one package name must be provided.") + + cmd = ["bioconda-utils", "pypi-skeleton"] + if recipes: + cmd.extend(["--recipes", str(recipes)]) + if config: + cmd.extend(["--config", str(config)]) + if recursive: + cmd.append("--recursive") + if skip_existing: + cmd.append("--skip-existing") + if skip_if_in_other_channels: + cmd.append("--skip-if-in-other-channels") + if output_dir: + output_dir.mkdir(parents=True, exist_ok=True) + cmd.extend(["--output-dir", str(output_dir)]) + if pkg_version: + cmd.extend(["--pkg-version", pkg_version]) + if python_version: + cmd.extend(["--python-version", python_version]) + if force: + cmd.append("--force") + + cmd.extend(packages) + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + output_files = [str(output_dir)] if output_dir else [] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + + +# @mcp.tool() +def lint( + recipes_to_lint: Optional[List[str]] = None, + recipes_folder: Optional[Path] = None, + config: Optional[Path] = None, + fail_level: str = "error", + no_fail_on_error: bool = False, + report_file: Optional[Path] = None, + exclude: Optional[List[str]] = None, +): + """ + Lints bioconda recipes to check for common errors and style issues. + + Args: + recipes_to_lint: Specific recipes to lint. Can be paths, package names, or glob patterns. + recipes_folder: Path to the top-level recipes folder. + config: Path to the bioconda-utils configuration file. + fail_level: The linting level at which to fail ('error', 'warning', 'info'). + no_fail_on_error: If True, do not exit with an error code on linting failures. + report_file: File to write the linting report to. + exclude: A list of recipes to exclude from linting. + """ + fail_level_choices = ["error", "warning", "info"] + if fail_level not in fail_level_choices: + raise ValueError(f"fail_level must be one of {fail_level_choices}") + + cmd = ["bioconda-utils", "lint"] + if recipes_folder: + cmd.extend(["--recipes", str(recipes_folder)]) + if config: + cmd.extend(["--config", str(config)]) + cmd.extend(["--fail-level", fail_level]) + if no_fail_on_error: + cmd.append("--no-fail-on-error") + if report_file: + cmd.extend(["--report-file", str(report_file)]) + if exclude: + for item in exclude: + cmd.extend(["--exclude", item]) + if recipes_to_lint: + cmd.extend(recipes_to_lint) + + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + output_files = [str(report_file)] if report_file else [] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + + +# @mcp.tool() +def build( + recipes_to_build: List[str], + recipes_folder: Optional[Path] = None, + config: Optional[Path] = None, + package_folder: Optional[Path] = None, + force: bool = False, + docker: bool = False, + mulled_test: Optional[bool] = None, + extra_channels: Optional[List[str]] = None, + anaconda_upload: bool = False, + anaconda_token: Optional[str] = None, + user: Optional[str] = None, + dry_run: bool = False, +): + """ + Builds one or more bioconda recipes. + + Args: + recipes_to_build: Recipes to build. Can be paths, package names, or glob patterns. + recipes_folder: Path to the top-level recipes folder. + config: Path to the bioconda-utils configuration file. + package_folder: Folder to store the built packages. + force: If True, force the build even if the package already exists. + docker: If True, build inside a Docker container. + mulled_test: Set to True to run mulled tests, False to disable them. Default is tool's default. + extra_channels: Additional channels to use during the build. + anaconda_upload: If True, upload the built package to anaconda.org. + anaconda_token: Anaconda token for uploading. + user: Anaconda user/organization to upload to. + dry_run: If True, show what would be done without executing. + """ + if not recipes_to_build: + raise ValueError("At least one recipe must be provided to build.") + + cmd = ["bioconda-utils", "build"] + if recipes_folder: + cmd.extend(["--recipes", str(recipes_folder)]) + if config: + cmd.extend(["--config", str(config)]) + if package_folder: + package_folder.mkdir(parents=True, exist_ok=True) + cmd.extend(["--package-folder", str(package_folder)]) + if force: + cmd.append("--force") + if docker: + cmd.append("--docker") + if mulled_test is True: + cmd.append("--mulled-test") + elif mulled_test is False: + cmd.append("--no-mulled-test") + if extra_channels: + for channel in extra_channels: + cmd.extend(["-c", channel]) + if not anaconda_upload: + cmd.append("--no-anaconda-upload") + if anaconda_token: + cmd.extend(["--anaconda-token", anaconda_token]) + if user: + cmd.extend(["--user", user]) + if dry_run: + cmd.append("--dry-run") + + cmd.extend(recipes_to_build) + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + output_files = [str(package_folder)] if package_folder else [] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + + +# @mcp.tool() +def dag( + recipes_for_dag: Optional[List[str]] = None, + recipes_folder: Optional[Path] = None, + config: Optional[Path] = None, + file_out: Optional[Path] = None, + format: str = "gml", +): + """ + Generates a dependency graph (DAG) for recipes. + + Args: + recipes_for_dag: Recipes to include in the DAG. If None, all recipes are considered. + recipes_folder: Path to the top-level recipes folder. + config: Path to the bioconda-utils configuration file. + file_out: Path to write the output DAG file. + format: The output format for the DAG ('gml', 'dot', 'pdf'). + """ + format_choices = ["gml", "dot", "pdf"] + if format not in format_choices: + raise ValueError(f"format must be one of {format_choices}") + + cmd = ["bioconda-utils", "dag"] + if recipes_folder: + cmd.extend(["--recipes", str(recipes_folder)]) + if config: + cmd.extend(["--config", str(config)]) + if file_out: + cmd.extend(["--file-out", str(file_out)]) + cmd.extend(["--format", format]) + if recipes_for_dag: + cmd.extend(recipes_for_dag) + + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + output_files = [str(file_out)] if file_out else [] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + + +# @mcp.tool() +def update_pinning( + recipes_folder: Optional[Path] = None, + config: Optional[Path] = None, + packages: Optional[str] = None, + no_pr: bool = False, + dry_run: bool = False, +): + """ + Updates pinning in recipes based on the global pinning file. + + Args: + recipes_folder: Path to the top-level recipes folder. + config: Path to the bioconda-utils configuration file. + packages: Comma-separated string of package names to update pinning for. + no_pr: If True, do not create a pull request with the changes. + dry_run: If True, show what would be done without executing. + """ + cmd = ["bioconda-utils", "update-pinning"] + if recipes_folder: + cmd.extend(["--recipes", str(recipes_folder)]) + if config: + cmd.extend(["--config", str(config)]) + if packages: + cmd.extend(["--packages", packages]) + if no_pr: + cmd.append("--no-pr") + if dry_run: + cmd.append("--dry-run") + + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, check=True, capture_output=True, text=True, encoding="utf-8" + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2cb5f796bd0b739ba4918a942df1c2ac40dbde62 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/bioconda-utils_server.py') +SERVER_NAME = 'biosci_bioconda_utils' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..59b2d040196d910e509b5d28eb596eb531952b43 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconda-utils: + build: . + image: mcp-bioconda-utils:latest + container_name: mcp-bioconda-utils + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconda-utils + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a99a6fa55b5621020aa602bcbdcfe40d729496f7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconda-utils + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconda-utils/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a1bfc36fcdba582407198bff96211ec04fd0c3b4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-banksy via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-banksy -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-banksy_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-banksy_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-banksy_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f49a556a60d1aa6962d4ee59dad1c7b7be9e4e7d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_server.py @@ -0,0 +1,659 @@ +import subprocess +import tempfile +import os +from pathlib import Path +from typing import Optional, List, Dict, Any + +# Note: The @mcp.tool() decorator is assumed to be available in the environment +# where this code will be run, as per the instructions "NO NEED to import mcp". + +@mcp.tool() +def banksy_init_object( + input_seurat_rdata_path: Path, + output_banksy_rdata_path: Path, + assay: str = "Spatial", + verbose: bool = True, +) -> Dict[str, Any]: + """ + Initializes a BanksyObject from an existing Seurat object. + + This tool takes an RData file containing a Seurat object, converts it + into a BanksyObject, and saves the new BanksyObject to an RData file. + This is often the first step before running the BANKSY algorithm. + + Requires R and the 'banksy' and 'Seurat' R packages to be installed + and accessible in the environment. + + Args: + input_seurat_rdata_path: Path to the input .RData file containing a Seurat object. + output_banksy_rdata_path: Path where the new BanksyObject will be saved as an .RData file. + assay: Name of the assay in the Seurat object to use for spatial data. + verbose: If TRUE, print messages during execution. + + Returns: + A dictionary containing execution details: + - command_executed: The Rscript command and generated R script path. + - stdout: Standard output from the Rscript execution. + - stderr: Standard error from the Rscript execution. + - output_files: A list of paths to generated output files. + """ + # 1. Input validation + if not input_seurat_rdata_path.exists(): + raise FileNotFoundError(f"Input Seurat RData file not found: {input_seurat_rdata_path}") + if not input_seurat_rdata_path.is_file(): + raise ValueError(f"Input Seurat RData path is not a file: {input_seurat_rdata_path}") + if output_banksy_rdata_path.suffix.lower() != ".rdata": + raise ValueError(f"Output RData file must have a .RData extension: {output_banksy_rdata_path}") + if not assay: + raise ValueError("Assay name cannot be empty.") + + # Ensure output directory exists + output_banksy_rdata_path.parent.mkdir(parents=True, exist_ok=True) + + # 2. Generate R script content + r_script_content = f""" + # Load required packages + library(Seurat) + library(banksy) + + # Define input and output paths + input_obj_path <- "{input_seurat_rdata_path.as_posix()}" + output_obj_path <- "{output_banksy_rdata_path.as_posix()}" + + # Check if input file exists + if (!file.exists(input_obj_path)) {{ + stop(paste("Input RData file not found:", input_obj_path)) + }} + + # Load the object from RData. This approach handles cases where the object + # name inside the RData file is not known beforehand. + loaded_env <- new.env() + load(input_obj_path, envir = loaded_env) + + seurat_obj <- NULL + for (var_name in ls(loaded_env)) {{ + candidate <- get(var_name, envir = loaded_env) + if (inherits(candidate, "Seurat")) {{ + seurat_obj <- candidate + break + }} + }} + + if (is.null(seurat_obj)) {{ + stop("No Seurat object found in the input RData file.") + }} + + message("Initializing BanksyObject from Seurat object with parameters:") + message(paste(" assay:", "{assay}")) + message(paste(" verbose:", {str(verbose).upper()})) + + # Create BanksyObject + banksy_obj <- BanksyObject( + seurat_obj, + assay = "{assay}", + verbose = {str(verbose).upper()} + ) + + # Save the new BanksyObject. Renaming to 'obj' for consistency with other banksy tools. + obj <- banksy_obj + save(obj, file = output_obj_path) + + message(paste("BanksyObject saved to:", output_obj_path)) + """ + + temp_r_script_path: Optional[Path] = None + try: + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".R") as temp_r_script: + temp_r_script.write(r_script_content) + temp_r_script_path = Path(temp_r_script.name) + + command = ["Rscript", str(temp_r_script_path)] + + # 3. Subprocess execution + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + env=os.environ # Pass current environment to Rscript + ) + + stdout = process.stdout + stderr = process.stderr + + # 4. Error handling: Check for R-specific errors in stderr + if "Error" in stderr or "stop(" in stderr: + raise RuntimeError(f"R script execution failed. Stderr: {stderr}") + + if not output_banksy_rdata_path.exists(): + raise RuntimeError(f"Output file was not created by R script: {output_banksy_rdata_path}") + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_banksy_rdata_path)], + } + + except FileNotFoundError: + raise RuntimeError("Rscript command not found. Is R installed and in your PATH?") + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"Rscript execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(e.cmd)}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) + finally: + # Clean up temporary R script + if temp_r_script_path and temp_r_script_path.exists(): + os.remove(temp_r_script_path) + + +@mcp.tool() +def banksy_run_banksy( + input_rdata_path: Path, + output_rdata_path: Path, + k_neighbours: int = 10, + lambda_param: float = 0.1, # Renamed from 'lambda' to avoid Python keyword conflict + resolution: float = 0.8, + n_components: int = 2, + n_cores: int = 1, + verbose: bool = True, + seed: int = 123, +) -> Dict[str, Any]: + """ + Runs the core BANKSY algorithm on a Seurat or BanksyObject. + + This tool takes an RData file containing a Seurat or BanksyObject, + applies the BANKSY algorithm for spatial transcriptomics analysis, + and saves the updated object to a new RData file. + + Requires R and the 'banksy', 'Seurat', and 'future' R packages to be installed + and accessible in the environment. + + Args: + input_rdata_path: Path to the input .RData file containing a Seurat or BanksyObject. + output_rdata_path: Path where the updated Seurat/BanksyObject will be saved as an .RData file. + k_neighbours: Number of neighbours for spatial graph construction. + lambda_param: Weight of spatial information (lambda parameter). + resolution: Resolution parameter for clustering. + n_components: Number of components for dimensionality reduction (e.g., UMAP/tSNE). + n_cores: Number of cores to use for parallel processing. + verbose: If TRUE, print messages during execution. + seed: Random seed for reproducibility. + + Returns: + A dictionary containing execution details: + - command_executed: The Rscript command and generated R script path. + - stdout: Standard output from the Rscript execution. + - stderr: Standard error from the Rscript execution. + - output_files: A list of paths to generated output files. + """ + # 1. Input validation + if not input_rdata_path.exists(): + raise FileNotFoundError(f"Input RData file not found: {input_rdata_path}") + if not input_rdata_path.is_file(): + raise ValueError(f"Input RData path is not a file: {input_rdata_path}") + if output_rdata_path.suffix.lower() != ".rdata": + raise ValueError(f"Output RData file must have a .RData extension: {output_rdata_path}") + if k_neighbours <= 0: + raise ValueError("k_neighbours must be a positive integer.") + if not (0 <= lambda_param <= 1): + raise ValueError("lambda_param must be between 0 and 1.") + if resolution <= 0: + raise ValueError("resolution must be a positive float.") + if n_components <= 0: + raise ValueError("n_components must be a positive integer.") + if n_cores <= 0: + raise ValueError("n_cores must be a positive integer.") + + # Ensure output directory exists + output_rdata_path.parent.mkdir(parents=True, exist_ok=True) + + # 2. Generate R script content + r_script_content = f""" + # Load required packages + library(Seurat) + library(banksy) + library(future) # For parallel processing + + # Set up parallel processing if n_cores > 1 + if ({n_cores} > 1) {{ + plan("multisession", workers = {n_cores}) + }} else {{ + plan("sequential") + }} + + # Set random seed for reproducibility + set.seed({seed}) + + # Define input and output paths + input_obj_path <- "{input_rdata_path.as_posix()}" + output_obj_path <- "{output_rdata_path.as_posix()}" + + # Check if input file exists + if (!file.exists(input_obj_path)) {{ + stop(paste("Input RData file not found:", input_obj_path)) + }} + + # Load the object + loaded_env <- new.env() + load(input_obj_path, envir = loaded_env) + + obj <- NULL + for (var_name in ls(loaded_env)) {{ + candidate <- get(var_name, envir = loaded_env) + if (inherits(candidate, "Seurat") || inherits(candidate, "BanksyObject")) {{ + obj <- candidate + break + }} + }} + + if (is.null(obj)) {{ + stop("No Seurat or BanksyObject found in the input RData file.") + }} + + message("Running banksy with parameters:") + message(paste(" k_neighbours:", {k_neighbours})) + message(paste(" lambda:", {lambda_param})) + message(paste(" resolution:", {resolution})) + message(paste(" n_components:", {n_components})) + message(paste(" n_cores:", {n_cores})) + message(paste(" verbose:", {str(verbose).upper()})) + message(paste(" seed:", {seed})) + + # Run BANKSY + obj <- runBanksy( + object = obj, + k_neighbours = {k_neighbours}, + lambda = {lambda_param}, + resolution = {resolution}, + n_components = {n_components}, + verbose = {str(verbose).upper()} + ) + + # Save the updated object + save(obj, file = output_obj_path) + + message(paste("Updated object saved to:", output_obj_path)) + """ + + temp_r_script_path: Optional[Path] = None + try: + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".R") as temp_r_script: + temp_r_script.write(r_script_content) + temp_r_script_path = Path(temp_r_script.name) + + command = ["Rscript", str(temp_r_script_path)] + + # 3. Subprocess execution + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + env=os.environ + ) + + stdout = process.stdout + stderr = process.stderr + + # 4. Error handling: Check for R-specific errors in stderr + if "Error" in stderr or "stop(" in stderr: + raise RuntimeError(f"R script execution failed. Stderr: {stderr}") + + if not output_rdata_path.exists(): + raise RuntimeError(f"Output file was not created by R script: {output_rdata_path}") + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_rdata_path)], + } + + except FileNotFoundError: + raise RuntimeError("Rscript command not found. Is R installed and in your PATH?") + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"Rscript execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(e.cmd)}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) + finally: + # Clean up temporary R script + if temp_r_script_path and temp_r_script_path.exists(): + os.remove(temp_r_script_path) + + +@mcp.tool() +def banksy_cluster_banksy( + input_rdata_path: Path, + output_rdata_path: Path, + resolution: float = 0.8, + method: str = "leiden", + verbose: bool = True, + seed: int = 123, +) -> Dict[str, Any]: + """ + Performs clustering on a BanksyObject or Seurat object after BANKSY analysis. + + This tool takes an RData file containing a Seurat or BanksyObject (typically + after `runBanksy`), performs clustering using the specified method and resolution, + and saves the updated object to a new RData file. + + Requires R and the 'banksy' and 'Seurat' R packages to be installed + and accessible in the environment. + + Args: + input_rdata_path: Path to the input .RData file containing a Seurat or BanksyObject. + output_rdata_path: Path where the updated Seurat/BanksyObject will be saved as an .RData file. + resolution: Resolution parameter for clustering. + method: Clustering method to use (e.g., "leiden", "louvain"). + verbose: If TRUE, print messages during execution. + seed: Random seed for reproducibility. + + Returns: + A dictionary containing execution details: + - command_executed: The Rscript command and generated R script path. + - stdout: Standard output from the Rscript execution. + - stderr: Standard error from the Rscript execution. + - output_files: A list of paths to generated output files. + """ + # 1. Input validation + if not input_rdata_path.exists(): + raise FileNotFoundError(f"Input RData file not found: {input_rdata_path}") + if not input_rdata_path.is_file(): + raise ValueError(f"Input RData path is not a file: {input_rdata_path}") + if output_rdata_path.suffix.lower() != ".rdata": + raise ValueError(f"Output RData file must have a .RData extension: {output_rdata_path}") + if resolution <= 0: + raise ValueError("resolution must be a positive float.") + if method not in ["leiden", "louvain"]: + raise ValueError(f"Unsupported clustering method: {method}. Choose from 'leiden', 'louvain'.") + + # Ensure output directory exists + output_rdata_path.parent.mkdir(parents=True, exist_ok=True) + + # 2. Generate R script content + r_script_content = f""" + # Load required packages + library(Seurat) + library(banksy) + + # Set random seed for reproducibility + set.seed({seed}) + + # Define input and output paths + input_obj_path <- "{input_rdata_path.as_posix()}" + output_obj_path <- "{output_rdata_path.as_posix()}" + + # Check if input file exists + if (!file.exists(input_obj_path)) {{ + stop(paste("Input RData file not found:", input_obj_path)) + }} + + # Load the object + loaded_env <- new.env() + load(input_obj_path, envir = loaded_env) + + obj <- NULL + for (var_name in ls(loaded_env)) {{ + candidate <- get(var_name, envir = loaded_env) + if (inherits(candidate, "Seurat") || inherits(candidate, "BanksyObject")) {{ + obj <- candidate + break + }} + }} + + if (is.null(obj)) {{ + stop("No Seurat or BanksyObject found in the input RData file.") + }} + + message("Clustering banksy object with parameters:") + message(paste(" resolution:", {resolution})) + message(paste(" method:", "{method}")) + message(paste(" verbose:", {str(verbose).upper()})) + message(paste(" seed:", {seed})) + + # Cluster BANKSY object + obj <- clusterBanksy( + object = obj, + resolution = {resolution}, + method = "{method}", + verbose = {str(verbose).upper()} + ) + + # Save the updated object + save(obj, file = output_obj_path) + + message(paste("Updated object saved to:", output_obj_path)) + """ + + temp_r_script_path: Optional[Path] = None + try: + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".R") as temp_r_script: + temp_r_script.write(r_script_content) + temp_r_script_path = Path(temp_r_script.name) + + command = ["Rscript", str(temp_r_script_path)] + + # 3. Subprocess execution + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + env=os.environ + ) + + stdout = process.stdout + stderr = process.stderr + + # 4. Error handling: Check for R-specific errors in stderr + if "Error" in stderr or "stop(" in stderr: + raise RuntimeError(f"R script execution failed. Stderr: {stderr}") + + if not output_rdata_path.exists(): + raise RuntimeError(f"Output file was not created by R script: {output_rdata_path}") + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_rdata_path)], + } + + except FileNotFoundError: + raise RuntimeError("Rscript command not found. Is R installed and in your PATH?") + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"Rscript execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(e.cmd)}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) + finally: + # Clean up temporary R script + if temp_r_script_path and temp_r_script_path.exists(): + os.remove(temp_r_script_path) + + +@mcp.tool() +def banksy_spatial_dim_plot( + input_rdata_path: Path, + output_plot_path: Path, + reduction: str = "banksy", + group_by: str = "banksy_clusters", + label: bool = True, + pt_size: float = 1.5, + verbose: bool = True, + width: float = 7.0, + height: float = 7.0, + units: str = "in", + dpi: int = 300, +) -> Dict[str, Any]: + """ + Generates a spatial dimensionality plot for a BanksyObject. + + This tool takes an RData file containing a BanksyObject (typically after + `runBanksy` and `clusterBanksy`), generates a spatial plot, and saves it + to an image file (e.g., PNG, PDF). + + Requires R and the 'banksy', 'Seurat', and 'ggplot2' R packages to be installed + and accessible in the environment. + + Args: + input_rdata_path: Path to the input .RData file containing a BanksyObject. + output_plot_path: Path where the plot will be saved (e.g., .png, .pdf, .jpeg). + reduction: Dimensionality reduction to use for plotting (e.g., "banksy", "umap"). + group_by: Feature to group cells by for coloring (e.g., "banksy_clusters"). + label: If TRUE, label clusters on the plot. + pt_size: Size of the points in the plot. + verbose: If TRUE, print messages during execution. + width: Width of the output plot. + height: Height of the output plot. + units: Units for width and height ("in", "cm", "mm"). + dpi: Resolution for raster plots (e.g., PNG, JPEG). + + Returns: + A dictionary containing execution details: + - command_executed: The Rscript command and generated R script path. + - stdout: Standard output from the Rscript execution. + - stderr: Standard error from the Rscript execution. + - output_files: A list of paths to generated output files. + """ + # 1. Input validation + if not input_rdata_path.exists(): + raise FileNotFoundError(f"Input RData file not found: {input_rdata_path}") + if not input_rdata_path.is_file(): + raise ValueError(f"Input RData path is not a file: {input_rdata_path}") + + valid_plot_suffixes = [".png", ".pdf", ".jpeg", ".jpg", ".tiff", ".bmp"] + if output_plot_path.suffix.lower() not in valid_plot_suffixes: + raise ValueError(f"Output plot file must have one of the following extensions: {', '.join(valid_plot_suffixes)}") + + if pt_size <= 0: + raise ValueError("pt_size must be a positive float.") + if width <= 0 or height <= 0: + raise ValueError("Width and height must be positive floats.") + if units not in ["in", "cm", "mm"]: + raise ValueError(f"Invalid units: {units}. Choose from 'in', 'cm', 'mm'.") + if dpi <= 0: + raise ValueError("DPI must be a positive integer.") + + # Ensure output directory exists + output_plot_path.parent.mkdir(parents=True, exist_ok=True) + + # 2. Generate R script content + r_script_content = f""" + # Load required packages + library(Seurat) + library(banksy) + library(ggplot2) # For saving plots + + # Define input and output paths + input_obj_path <- "{input_rdata_path.as_posix()}" + output_plot_path <- "{output_plot_path.as_posix()}" + + # Check if input file exists + if (!file.exists(input_obj_path)) {{ + stop(paste("Input RData file not found:", input_obj_path)) + }} + + # Load the object + loaded_env <- new.env() + load(input_obj_path, envir = loaded_env) + + obj <- NULL + for (var_name in ls(loaded_env)) {{ + candidate <- get(var_name, envir = loaded_env) + if (inherits(candidate, "Seurat") || inherits(candidate, "BanksyObject")) {{ + obj <- candidate + break + }} + }} + + if (is.null(obj)) {{ + stop("No Seurat or BanksyObject found in the input RData file.") + }} + + message("Generating spatial dimensionality plot with parameters:") + message(paste(" reduction:", "{reduction}")) + message(paste(" group_by:", "{group_by}")) + message(paste(" label:", {str(label).upper()})) + message(paste(" pt_size:", {pt_size})) + message(paste(" verbose:", {str(verbose).upper()})) + + # Generate plot + p <- spatialDimPlot( + object = obj, + reduction = "{reduction}", + group.by = "{group_by}", + label = {str(label).upper()}, + pt.size.factor = {pt_size}, # Note: R parameter is pt.size.factor + verbose = {str(verbose).upper()} + ) + + # Save the plot + ggsave( + filename = output_plot_path, + plot = p, + width = {width}, + height = {height}, + units = "{units}", + dpi = {dpi} + ) + + message(paste("Plot saved to:", output_plot_path)) + """ + + temp_r_script_path: Optional[Path] = None + try: + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".R") as temp_r_script: + temp_r_script.write(r_script_content) + temp_r_script_path = Path(temp_r_script.name) + + command = ["Rscript", str(temp_r_script_path)] + + # 3. Subprocess execution + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + env=os.environ + ) + + stdout = process.stdout + stderr = process.stderr + + # 4. Error handling: Check for R-specific errors in stderr + if "Error" in stderr or "stop(" in stderr: + raise RuntimeError(f"R script execution failed. Stderr: {stderr}") + + if not output_plot_path.exists(): + raise RuntimeError(f"Output plot file was not created by R script: {output_plot_path}") + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_plot_path)], + } + + except FileNotFoundError: + raise RuntimeError("Rscript command not found. Is R installed and in your PATH?") + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"Rscript execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(e.cmd)}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) + finally: + # Clean up temporary R script + if temp_r_script_path and temp_r_script_path.exists(): + os.remove(temp_r_script_path) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3ce854072accea63e948911367ce6c99a0466159 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/bioconductor-banksy_server.py') +SERVER_NAME = 'biosci_bioconductor_banksy' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5745dcb463d5d3a4a0240bea07df9ef2cafba776 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-banksy: + build: . + image: mcp-bioconductor-banksy:latest + container_name: mcp-bioconductor-banksy + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-banksy + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..508d5e0076bfb9bafa1307f48692fa5c85f624eb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-banksy + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-banksy/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..049a35d085b83f15bc149115150cd24367530eef --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-benchdamic via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-benchdamic -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-benchdamic_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-benchdamic_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-benchdamic_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a6ed675c4d398642f704254b729325432807bab0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_server.py @@ -0,0 +1,464 @@ +import subprocess +import tempfile +from pathlib import Path +import os +import logging +from typing import List, Optional + +# Set up logging +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +# MCP decorator is assumed to be available in the execution environment. +# This is a placeholder for the actual decorator. +class mcp: + @staticmethod + def tool(func): + def wrapper(*args, **kwargs): + return func(*args, **kwargs) + return wrapper + +@mcp.tool +def run_benchdamic( + config_file: Path, + output_dir: Path, +): + """ + Runs the full benchdamic pipeline. + + This function serves as the main entry point for the benchdamic workflow, + executing data generation, method application, evaluation, and plotting + based on a single YAML configuration file. The process is run within the + specified output directory. + + Args: + config_file: Path to the benchdamic YAML configuration file. + output_dir: Path to the directory where all outputs will be stored. + It will be created if it doesn't exist. + """ + # 1. Input validation + if not config_file.is_file(): + raise FileNotFoundError(f"Configuration file not found: {config_file}") + + # 2. File path handling + output_dir.mkdir(parents=True, exist_ok=True) + + # The R function benchdamic() relies on the 'output_dir' key within the config YAML. + # By running Rscript from the specified output_dir, we ensure that + # relative paths in the config file are resolved correctly. + r_script_content = f""" + if (!requireNamespace("benchdamic", quietly = TRUE)) {{ + stop("The 'benchdamic' R package is not installed. Please install it from Bioconductor.") + }} + library(benchdamic) + + config_path <- "{config_file.resolve()}" + + cat("Starting benchdamic pipeline...\\n") + benchdamic::benchdamic(config_file = config_path) + cat("benchdamic pipeline finished successfully.\\n") + """ + + # 3. Subprocess execution + command_to_execute = [] + stdout_str = "" + stderr_str = "" + r_script_path = None + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False, dir=output_dir) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + # Use relative path for the command since we set cwd + command_to_execute = ["Rscript", str(r_script_path.name)] + + files_before = set(os.listdir(output_dir)) + + process = subprocess.run( + command_to_execute, + capture_output=True, + text=True, + check=True, + cwd=output_dir, + ) + + stdout_str = process.stdout + stderr_str = process.stderr + + files_after = set(os.listdir(output_dir)) + # Find new files and directories + new_items = files_after - files_before + output_files = [str(output_dir / item) for item in new_items] + + except FileNotFoundError: + err_msg = "Rscript not found. Please ensure R is installed and 'Rscript' is in your system's PATH." + logger.error(err_msg) + raise RuntimeError(err_msg) from None + except subprocess.CalledProcessError as e: + logger.error(f"R script execution failed with exit code {e.returncode}") + logger.error(f"Command: {' '.join(command_to_execute)}") + logger.error(f"Stdout: {e.stdout}") + logger.error(f"Stderr: {e.stderr}") + raise + finally: + if r_script_path and r_script_path.exists(): + r_script_path.unlink() + + # 4. Structured result return + return { + "command_executed": " ".join(command_to_execute), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": output_files + } + +@mcp.tool +def generate_data( + config_file: Path, + output_dir: Path, +): + """ + Generates simulated data using the benchdamic configuration. + + This function corresponds to the `generate_data` step in the benchdamic + workflow. It reads simulation parameters from the config file and writes + the generated datasets to the specified output directory. + + Args: + config_file: Path to the benchdamic YAML configuration file. + output_dir: Path to the directory where generated data will be stored. + It will be created if it doesn't exist. + """ + # 1. Input validation + if not config_file.is_file(): + raise FileNotFoundError(f"Configuration file not found: {config_file}") + + # 2. File path handling + output_dir.mkdir(parents=True, exist_ok=True) + + r_script_content = f""" + if (!requireNamespace("benchdamic", quietly = TRUE)) {{ + stop("The 'benchdamic' R package is not installed.") + }} + library(benchdamic) + + config_path <- "{config_file.resolve()}" + output_path <- "{output_dir.resolve()}" + + cat("Starting data generation...\\n") + benchdamic::generate_data(config_file = config_path, output_dir = output_path) + cat("Data generation finished successfully.\\n") + """ + + # 3. Subprocess execution + command_to_execute = [] + stdout_str = "" + stderr_str = "" + r_script_path = None + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + command_to_execute = ["Rscript", str(r_script_path)] + + files_before = set(p.resolve() for p in output_dir.glob('**/*')) + + process = subprocess.run( + command_to_execute, + capture_output=True, + text=True, + check=True, + ) + + stdout_str = process.stdout + stderr_str = process.stderr + + files_after = set(p.resolve() for p in output_dir.glob('**/*')) + new_files = [str(p) for p in files_after - files_before] + + except FileNotFoundError: + err_msg = "Rscript not found. Please ensure R is installed and 'Rscript' is in your system's PATH." + logger.error(err_msg) + raise RuntimeError(err_msg) from None + except subprocess.CalledProcessError as e: + logger.error(f"R script execution failed with exit code {e.returncode}") + logger.error(f"Command: {' '.join(command_to_execute)}") + logger.error(f"Stdout: {e.stdout}") + logger.error(f"Stderr: {e.stderr}") + raise + finally: + if r_script_path and r_script_path.exists(): + r_script_path.unlink() + + # 4. Structured result return + return { + "command_executed": " ".join(command_to_execute), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": new_files + } + +@mcp.tool +def run_methods( + config_file: Path, + output_dir: Path, +): + """ + Runs differential abundance methods on generated data. + + This function corresponds to the `run_methods` step in the benchdamic + workflow. It applies the specified methods to the datasets found in the + output directory and saves their results. + + Args: + config_file: Path to the benchdamic YAML configuration file. + output_dir: Path to the directory containing the generated data and + where method results will be stored. It must exist. + """ + # 1. Input validation + if not config_file.is_file(): + raise FileNotFoundError(f"Configuration file not found: {config_file}") + if not output_dir.is_dir(): + raise FileNotFoundError(f"Output directory not found: {output_dir}. Please run generate_data first.") + + # 2. R script content + r_script_content = f""" + if (!requireNamespace("benchdamic", quietly = TRUE)) {{ + stop("The 'benchdamic' R package is not installed.") + }} + library(benchdamic) + + config_path <- "{config_file.resolve()}" + output_path <- "{output_dir.resolve()}" + + cat("Running differential abundance methods...\\n") + benchdamic::run_methods(config_file = config_path, output_dir = output_path) + cat("Method execution finished successfully.\\n") + """ + + # 3. Subprocess execution + command_to_execute = [] + stdout_str = "" + stderr_str = "" + r_script_path = None + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + command_to_execute = ["Rscript", str(r_script_path)] + + files_before = set(p.resolve() for p in output_dir.glob('**/*')) + + process = subprocess.run( + command_to_execute, + capture_output=True, + text=True, + check=True, + ) + + stdout_str = process.stdout + stderr_str = process.stderr + + files_after = set(p.resolve() for p in output_dir.glob('**/*')) + new_files = [str(p) for p in files_after - files_before] + + except FileNotFoundError: + err_msg = "Rscript not found. Please ensure R is installed and 'Rscript' is in your system's PATH." + logger.error(err_msg) + raise RuntimeError(err_msg) from None + except subprocess.CalledProcessError as e: + logger.error(f"R script execution failed with exit code {e.returncode}") + logger.error(f"Command: {' '.join(command_to_execute)}") + logger.error(f"Stdout: {e.stdout}") + logger.error(f"Stderr: {e.stderr}") + raise + finally: + if r_script_path and r_script_path.exists(): + r_script_path.unlink() + + # 4. Structured result return + return { + "command_executed": " ".join(command_to_execute), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": new_files + } + +@mcp.tool +def evaluate_methods( + config_file: Path, + output_dir: Path, +): + """ + Evaluates the performance of differential abundance methods. + + This function corresponds to the `evaluate_methods` step in the benchdamic + workflow. It computes performance metrics based on the method results + and ground truth, saving the evaluation to the output directory. + + Args: + config_file: Path to the benchdamic YAML configuration file. + output_dir: Path to the directory containing method results. It must exist. + """ + # 1. Input validation + if not config_file.is_file(): + raise FileNotFoundError(f"Configuration file not found: {config_file}") + if not output_dir.is_dir(): + raise FileNotFoundError(f"Output directory not found: {output_dir}.") + + # 2. R script content + r_script_content = f""" + if (!requireNamespace("benchdamic", quietly = TRUE)) {{ + stop("The 'benchdamic' R package is not installed.") + }} + library(benchdamic) + + config_path <- "{config_file.resolve()}" + output_path <- "{output_dir.resolve()}" + + cat("Evaluating method performance...\\n") + benchdamic::evaluate_methods(config_file = config_path, output_dir = output_path) + cat("Evaluation finished successfully.\\n") + """ + + # 3. Subprocess execution + command_to_execute = [] + stdout_str = "" + stderr_str = "" + r_script_path = None + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + command_to_execute = ["Rscript", str(r_script_path)] + + files_before = set(p.resolve() for p in output_dir.glob('**/*')) + + process = subprocess.run( + command_to_execute, + capture_output=True, + text=True, + check=True, + ) + + stdout_str = process.stdout + stderr_str = process.stderr + + files_after = set(p.resolve() for p in output_dir.glob('**/*')) + new_files = [str(p) for p in files_after - files_before] + + except FileNotFoundError: + err_msg = "Rscript not found. Please ensure R is installed and 'Rscript' is in your system's PATH." + logger.error(err_msg) + raise RuntimeError(err_msg) from None + except subprocess.CalledProcessError as e: + logger.error(f"R script execution failed with exit code {e.returncode}") + logger.error(f"Command: {' '.join(command_to_execute)}") + logger.error(f"Stdout: {e.stdout}") + logger.error(f"Stderr: {e.stderr}") + raise + finally: + if r_script_path and r_script_path.exists(): + r_script_path.unlink() + + # 4. Structured result return + return { + "command_executed": " ".join(command_to_execute), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": new_files + } + +@mcp.tool +def plot_results( + config_file: Path, + output_dir: Path, +): + """ + Generates plots from the evaluation results. + + This function corresponds to the `plot_results` step in the benchdamic + workflow. It creates various visualizations of the performance metrics + and saves them as files in the output directory. + + Args: + config_file: Path to the benchdamic YAML configuration file. + output_dir: Path to the directory containing evaluation results. It must exist. + """ + # 1. Input validation + if not config_file.is_file(): + raise FileNotFoundError(f"Configuration file not found: {config_file}") + if not output_dir.is_dir(): + raise FileNotFoundError(f"Output directory not found: {output_dir}.") + + # 2. R script content + r_script_content = f""" + if (!requireNamespace("benchdamic", quietly = TRUE)) {{ + stop("The 'benchdamic' R package is not installed.") + }} + library(benchdamic) + + config_path <- "{config_file.resolve()}" + output_path <- "{output_dir.resolve()}" + + cat("Generating plots...\\n") + benchdamic::plot_results(config_file = config_path, output_dir = output_path) + cat("Plot generation finished successfully.\\n") + """ + + # 3. Subprocess execution + command_to_execute = [] + stdout_str = "" + stderr_str = "" + r_script_path = None + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + command_to_execute = ["Rscript", str(r_script_path)] + + files_before = set(p.resolve() for p in output_dir.glob('**/*')) + + process = subprocess.run( + command_to_execute, + capture_output=True, + text=True, + check=True, + ) + + stdout_str = process.stdout + stderr_str = process.stderr + + files_after = set(p.resolve() for p in output_dir.glob('**/*')) + new_files = [str(p) for p in files_after - files_before] + + except FileNotFoundError: + err_msg = "Rscript not found. Please ensure R is installed and 'Rscript' is in your system's PATH." + logger.error(err_msg) + raise RuntimeError(err_msg) from None + except subprocess.CalledProcessError as e: + logger.error(f"R script execution failed with exit code {e.returncode}") + logger.error(f"Command: {' '.join(command_to_execute)}") + logger.error(f"Stdout: {e.stdout}") + logger.error(f"Stderr: {e.stderr}") + raise + finally: + if r_script_path and r_script_path.exists(): + r_script_path.unlink() + + # 4. Structured result return + return { + "command_executed": " ".join(command_to_execute), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": new_files + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6c24526d206237f6ff0a8e5cc7ee46b44d73eacf --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/app/bioconductor-benchdamic_server.py') +SERVER_NAME = 'biosci_bioconductor_benchdamic' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..65f8f9f6c1b78e6c31e9ba07e6510d513ea8cfaf --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-benchdamic: + build: . + image: mcp-bioconductor-benchdamic:latest + container_name: mcp-bioconductor-benchdamic + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-benchdamic + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..69f3813eec164585774531f51cba29fd74c0d74a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-benchdamic + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-benchdamic/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..baadb8653861e5789a279f826093986fef432e4b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-biocfilecache via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-biocfilecache -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-biocfilecache_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-biocfilecache_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-biocfilecache_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_server.py new file mode 100644 index 0000000000000000000000000000000000000000..70f09319b2b5aef837b6cf74c498177ec02a6b23 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_server.py @@ -0,0 +1,306 @@ +import subprocess +import logging +from pathlib import Path +from typing import List, Literal, Optional, Dict + +# This is a placeholder for the actual MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +class mcp: + @staticmethod + def tool(): + def decorator(func): + return func + return decorator + +def _validate_cache_path(cache_path: Path, check_exists: bool = True) -> None: + """Helper function to validate the cache path.""" + if check_exists and not cache_path.is_dir(): + raise FileNotFoundError(f"BiocFileCache directory not found at '{cache_path}'") + +def _r_string_vector(items: List[str]) -> str: + """Converts a Python list of strings to an R character vector string.""" + if not items: + return "c()" + # Escape single quotes for R: ' -> \' + escaped_items = [item.replace("'", "\\'") for item in items] + quoted_items = [f"'{item}'" for item in escaped_items] + return f"c({', '.join(quoted_items)})" + +def _run_r_command(r_command: str) -> Dict: + """Executes an R command and returns a structured response.""" + command = ["Rscript", "-e", r_command] + command_str = " ".join(command) + try: + result = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + encoding='utf-8' + ) + return { + "command_executed": command_str, + "stdout": result.stdout.strip(), + "stderr": result.stderr.strip(), + } + except FileNotFoundError: + logging.error("Rscript not found. R must be installed and in the system's PATH.") + raise RuntimeError("Rscript not found. R must be installed and in the system's PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"R script execution failed.\nStderr: {e.stderr}\nStdout: {e.stdout}") + return { + "command_executed": command_str, + "stdout": e.stdout.strip(), + "stderr": e.stderr.strip(), + "error": "R script execution failed." + } + +@mcp.tool() +def biocfilecache_new(cache_path: Path) -> Dict: + """ + Creates a new, empty BiocFileCache at the specified location. + + Args: + cache_path: The directory path where the cache will be created. + The parent directory must exist, and the target path must not. + + Returns: + A dictionary containing the command executed, stdout (the cache path), + stderr, and the path to the created cache directory. + """ + if cache_path.exists(): + raise ValueError(f"Cache path '{cache_path}' already exists. Cannot create a new cache here.") + if not cache_path.parent.is_dir(): + raise FileNotFoundError(f"Parent directory '{cache_path.parent}' does not exist.") + + # Use forward slashes for R path compatibility + safe_cache_path = str(cache_path).replace('\\', '/') + r_command = ( + f"library(BiocFileCache); " + f"bfc <- bfcnew('{safe_cache_path}', ask=FALSE); " + f"cat(bfcpath(bfc))" + ) + + response = _run_r_command(r_command) + if "error" not in response: + response["output_files"] = {"cache_directory": str(cache_path)} + return response + +@mcp.tool() +def biocfilecache_add( + cache_path: Path, + rname: str, + fpath: str, + action: Literal["copy", "move", "asis"] = "copy", + rtype: Literal["web", "local"] = "web" +) -> Dict: + """ + Adds a resource to the BiocFileCache. + + Args: + cache_path: Path to the BiocFileCache directory. + rname: A user-friendly name for the resource. + fpath: The path to the resource, either a URL or a local file path. + action: How to handle the file. 'copy' (default), 'move', or 'asis' (for remote files). + rtype: The type of resource, 'web' (default) or 'local'. + + Returns: + A dictionary containing the command executed, stdout (the new resource ID), and stderr. + """ + _validate_cache_path(cache_path) + if rtype == "local" and not Path(fpath).exists(): + raise FileNotFoundError(f"Local file '{fpath}' not found for adding to cache.") + + safe_cache_path = str(cache_path).replace('\\', '/') + # Escape single quotes and normalize path for R + safe_rname = rname.replace("'", "\\'") + safe_fpath = fpath.replace('\\', '/').replace("'", "\\'") + + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"rid <- bfcadd(bfc, rname='{safe_rname}', fpath='{safe_fpath}', action='{action}', rtype='{rtype}'); " + f"cat(rid)" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_rpath(cache_path: Path, rids: List[str]) -> Dict: + """ + Retrieves the local file paths of resources from the cache using their resource IDs (rids). + + Args: + cache_path: Path to the BiocFileCache directory. + rids: A list of resource IDs (e.g., ['BFC1', 'BFC2']) to look up. + + Returns: + A dictionary containing the command executed, stdout (newline-separated file paths), and stderr. + """ + _validate_cache_path(cache_path) + if not rids: + raise ValueError("The 'rids' list cannot be empty.") + + safe_cache_path = str(cache_path).replace('\\', '/') + rids_vector = _r_string_vector(rids) + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"paths <- bfcrpath(bfc, rids={rids_vector}); " + f"cat(paths, sep='\\n')" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_query(cache_path: Path, query: str, field: Optional[str] = None) -> Dict: + """ + Queries the cache metadata using an SQL-like expression. + + Args: + cache_path: Path to the BiocFileCache directory. + query: The SQL 'WHERE' clause for filtering resources (e.g., "rname == 'my_file'"). + field: Optional. The specific column/field to return from the query results. + + Returns: + A dictionary containing the command executed, stdout (query results as a table), and stderr. + """ + _validate_cache_path(cache_path) + safe_cache_path = str(cache_path).replace('\\', '/') + safe_query = query.replace("'", "\\'") + + field_arg = "" + if field: + safe_field = field.replace("'", "\\'") + field_arg = f", field='{safe_field}'" + + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"res <- bfcquery(bfc, query='{safe_query}'{field_arg}); " + f"print(res)" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_remove(cache_path: Path, rids: List[str]) -> Dict: + """ + Removes resources and their associated files from the cache. + + Args: + cache_path: Path to the BiocFileCache directory. + rids: A list of resource IDs to remove. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + _validate_cache_path(cache_path) + if not rids: + raise ValueError("The 'rids' list cannot be empty.") + + safe_cache_path = str(cache_path).replace('\\', '/') + rids_vector = _r_string_vector(rids) + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"bfcremove(bfc, rids={rids_vector}); " + f"cat('Specified resources removed.')" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_ls(cache_path: Path, pattern: Optional[str] = None) -> Dict: + """ + Lists resources in the cache, optionally filtering by a regular expression. + + Args: + cache_path: Path to the BiocFileCache directory. + pattern: An optional regular expression to filter resource names (rname). + + Returns: + A dictionary containing the command executed, stdout (a table of resources), and stderr. + """ + _validate_cache_path(cache_path) + safe_cache_path = str(cache_path).replace('\\', '/') + + pattern_arg = "" + if pattern: + safe_pattern = pattern.replace("'", "\\'") + pattern_arg = f", pattern='{safe_pattern}'" + + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"res <- bfcls(bfc{pattern_arg}); " + f"print(res)" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_update(cache_path: Path, rids: List[str]) -> Dict: + """ + Updates resources in the cache by re-downloading them. + + Args: + cache_path: Path to the BiocFileCache directory. + rids: A list of resource IDs to update. + + Returns: + A dictionary containing the command executed, stdout (updated resource info), and stderr. + """ + _validate_cache_path(cache_path) + if not rids: + raise ValueError("The 'rids' list cannot be empty.") + + safe_cache_path = str(cache_path).replace('\\', '/') + rids_vector = _r_string_vector(rids) + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"res <- bfcupdate(bfc, rids={rids_vector}); " + f"print(res)" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_clean(cache_path: Path) -> Dict: + """ + Cleans the cache by removing files that are no longer tracked in the database. + + Args: + cache_path: Path to the BiocFileCache directory. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + _validate_cache_path(cache_path) + safe_cache_path = str(cache_path).replace('\\', '/') + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"bfcclean(bfc, ask=FALSE); " + f"cat('Cache cleaned.')" + ) + return _run_r_command(r_command) + +@mcp.tool() +def biocfilecache_info(cache_path: Path, rids: Optional[List[str]] = None) -> Dict: + """ + Retrieves detailed metadata for all or specified resources in the cache. + + Args: + cache_path: Path to the BiocFileCache directory. + rids: Optional list of resource IDs to get information for. If None, info for all resources is returned. + + Returns: + A dictionary containing the command executed, stdout (a table of resource info), and stderr. + """ + _validate_cache_path(cache_path) + safe_cache_path = str(cache_path).replace('\\', '/') + rids_arg = f", rids={_r_string_vector(rids)}" if rids else "" + + r_command = ( + f"library(BiocFileCache); " + f"bfc <- BiocFileCache('{safe_cache_path}', ask=FALSE); " + f"res <- bfcinfo(bfc{rids_arg}); " + f"print(res)" + ) + return _run_r_command(r_command) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..bdd83bb69ff25fe4603d042768fcbbcf5ecb11ab --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/bioconductor-biocfilecache_server.py') +SERVER_NAME = 'biosci_bioconductor_biocfilecache' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfaeb2fc1b7bb666760166c994ac11641ccea05c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-biocfilecache: + build: . + image: mcp-bioconductor-biocfilecache:latest + container_name: mcp-bioconductor-biocfilecache + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-biocfilecache + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fadedb1ae2ed0930e924af8fb048742ab8741ed4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-biocfilecache + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-biocfilecache/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/app/bioconductor-bulksignalr_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/app/bioconductor-bulksignalr_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f27f85ad515675717b3609c954d73948760f3c19 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/app/bioconductor-bulksignalr_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/app/bioconductor-bulksignalr_server.py') +SERVER_NAME = 'biosci_bioconductor_bulksignalr' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d72a6246e2b76a0ccf6c71ebb53a4fa56f20c47d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-bulksignalr: + build: . + image: mcp-bioconductor-bulksignalr:latest + container_name: mcp-bioconductor-bulksignalr + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-bulksignalr + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b52b1c33a3dec4f61c346282f61bc93331020d24 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-bulksignalr + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-bulksignalr/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d4d8e2ec0016e59226eb9e474ee2211b6eda3866 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-catscradle via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-catscradle -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-catscradle_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-catscradle_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-catscradle_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_server.py new file mode 100644 index 0000000000000000000000000000000000000000..db34f938ca814762a8dacf40f5d0301f8f7b3a7a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_server.py @@ -0,0 +1,304 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union +import tempfile + +@mcp.tool() +def catscradle_build_neighborhoods( + input_rds: str, + output_rds: str, + radius: float = 50.0, + cell_type_col: str = "cell_type", + assay: str = "Spatial", + slot: str = "counts", + min_cells: int = 1 +): + """ + Identifies tissue neighborhoods in spatial transcriptomics data and produces a Seurat object + where individual elements are neighborhoods rather than cells. + + Args: + input_rds: Path to the input Seurat or SpatialExperiment object (RDS format). + output_rds: Path where the resulting neighborhood Seurat object will be saved. + radius: The radius (in spatial units) defining the contiguous region surrounding individual cells. + cell_type_col: Metadata column name containing cell type annotations. + assay: Assay to use from the input object. + slot: Slot to use (e.g., counts, data). + min_cells: Minimum number of cells required to define a neighborhood. + """ + input_path = Path(input_rds) + output_path = Path(output_rds) + + if not input_path.exists(): + return {"error": f"Input file not found: {input_rds}"} + + if radius <= 0: + return {"error": "Radius must be a positive float."} + + # R script to perform neighborhood construction + r_code = f""" + library(CatsCradle) + library(Seurat) + library(SpatialExperiment) + + # Load data + input_data <- readRDS("{input_path}") + + # Check if it's SpatialExperiment and convert if necessary + if (inherits(input_data, "SpatialExperiment")) {{ + # CatsCradle handles SE/SPE, but we ensure Seurat compatibility if needed + # Internal CatsCradle functions typically take these objects + }} + + # Core CatsCradle logic for neighborhood construction + # Based on package description: "produces Seurat objects whose individual elements are neighborhoods" + # We use the primary constructor function (inferred from documentation) + neighborhood_obj <- CatsCradle::spatialToNeighborhoods( + object = input_data, + radius = {radius}, + cell_type_col = "{cell_type_col}", + assay = "{assay}", + slot = "{slot}", + min_cells = {min_cells} + ) + + saveRDS(neighborhood_obj, "{output_path}") + """ + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix='.R', delete=False) as tmp: + tmp.write(r_code) + tmp_path = tmp.name + + cmd = ["Rscript", tmp_path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr, + "command_executed": " ".join(e.cmd) + } + finally: + if 'tmp_path' in locals() and Path(tmp_path).exists(): + Path(tmp_path).unlink() + +@mcp.tool() +def catscradle_gene_centric_analysis( + input_rds: str, + output_rds: str, + assay: str = "RNA", + slot: str = "data", + variable_features_only: bool = True, + n_features: int = 2000 +): + """ + Enables the categorisation and annotation of genes by producing Seurat objects + whose elements are genes rather than cells. + + Args: + input_rds: Path to the input Seurat object (RDS format). + output_rds: Path where the gene-centric Seurat object will be saved. + assay: Assay to use for gene expression data. + slot: Slot to use (e.g., data, scale.data). + variable_features_only: Whether to only include highly variable features. + n_features: Number of features to select if variable_features_only is True. + """ + input_path = Path(input_rds) + output_path = Path(output_rds) + + if not input_path.exists(): + return {"error": f"Input file not found: {input_rds}"} + + r_code = f""" + library(CatsCradle) + library(Seurat) + + input_data <- readRDS("{input_path}") + + # Core CatsCradle logic for gene-centric Seurat object creation + gene_obj <- CatsCradle::geneCentricSeurat( + object = input_data, + assay = "{assay}", + slot = "{slot}", + variable_features_only = {"TRUE" if variable_features_only else "FALSE"}, + n_features = {n_features} + ) + + saveRDS(gene_obj, "{output_path}") + """ + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix='.R', delete=False) as tmp: + tmp.write(r_code) + tmp_path = tmp.name + + cmd = ["Rscript", tmp_path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr, + "command_executed": " ".join(e.cmd) + } + finally: + if 'tmp_path' in locals() and Path(tmp_path).exists(): + Path(tmp_path).unlink() + +@mcp.tool() +def catscradle_tag_neighborhoods( + neighborhood_rds: str, + output_rds: str, + tag_by: str = "cell_type", + threshold: float = 0.1 +): + """ + Categorizes neighborhoods by the cell types contained in them or the genes expressed in them. + + Args: + neighborhood_rds: Path to the neighborhood Seurat object created by catscradle_build_neighborhoods. + output_rds: Path to save the tagged neighborhood object. + tag_by: Attribute to tag by ('cell_type' or 'gene_expression'). + threshold: Minimum proportion or expression level to consider a tag present in a neighborhood. + """ + input_path = Path(neighborhood_rds) + output_path = Path(output_rds) + + if not input_path.exists(): + return {"error": f"Input file not found: {neighborhood_rds}"} + + r_code = f""" + library(CatsCradle) + library(Seurat) + + nb_obj <- readRDS("{input_path}") + + # Categorize neighborhoods + nb_obj <- CatsCradle::tagNeighborhoods( + object = nb_obj, + tag_by = "{tag_by}", + threshold = {threshold} + ) + + saveRDS(nb_obj, "{output_path}") + """ + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix='.R', delete=False) as tmp: + tmp.write(r_code) + tmp_path = tmp.name + + cmd = ["Rscript", tmp_path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr, + "command_executed": " ".join(e.cmd) + } + finally: + if 'tmp_path' in locals() and Path(tmp_path).exists(): + Path(tmp_path).unlink() + +@mcp.tool() +def catscradle_spatial_vignette_pipeline( + input_rds: str, + output_prefix: str, + radius: float = 50.0, + cell_type_col: str = "cell_type" +): + """ + Runs a standard CatsCradle spatial analysis pipeline, including neighborhood construction + and gene clustering, as described in the package vignettes. + + Args: + input_rds: Path to the input spatial transcriptomics RDS file. + output_prefix: Prefix for output files (e.g., 'results/sample1'). + radius: Radius for neighborhood definition. + cell_type_col: Metadata column for cell types. + """ + input_path = Path(input_rds) + out_dir = Path(output_prefix).parent + if not out_dir.exists(): + out_dir.mkdir(parents=True, exist_ok=True) + + r_code = f""" + library(CatsCradle) + library(Seurat) + + # 1. Load Data + spatial_data <- readRDS("{input_path}") + + # 2. Build Neighborhoods + nb_obj <- CatsCradle::spatialToNeighborhoods( + object = spatial_data, + radius = {radius}, + cell_type_col = "{cell_type_col}" + ) + saveRDS(nb_obj, paste0("{output_prefix}", "_neighborhoods.rds")) + + # 3. Gene Centric Analysis + gene_obj <- CatsCradle::geneCentricSeurat(spatial_data) + saveRDS(gene_obj, paste0("{output_prefix}", "_gene_centric.rds")) + + # 4. Discover Gene Clusters (Internal CatsCradle method) + # This typically involves standard Seurat clustering on the gene-centric object + gene_obj <- Seurat::FindVariableFeatures(gene_obj) + gene_obj <- Seurat::ScaleData(gene_obj) + gene_obj <- Seurat::RunPCA(gene_obj) + gene_obj <- Seurat::FindNeighbors(gene_obj) + gene_obj <- Seurat::FindClusters(gene_obj) + saveRDS(gene_obj, paste0("{output_prefix}", "_gene_clusters.rds")) + """ + + try: + with tempfile.NamedTemporaryFile(mode='w', suffix='.R', delete=False) as tmp: + tmp.write(r_code) + tmp_path = tmp.name + + cmd = ["Rscript", tmp_path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [ + f"{output_prefix}_neighborhoods.rds", + f"{output_prefix}_gene_centric.rds", + f"{output_prefix}_gene_clusters.rds" + ] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr, + "command_executed": " ".join(e.cmd) + } + finally: + if 'tmp_path' in locals() and Path(tmp_path).exists(): + Path(tmp_path).unlink() \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..048562c616c70f78bc6328887d0068ca23ef7262 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/bioconductor-catscradle_server.py') +SERVER_NAME = 'biosci_bioconductor_catscradle' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d730384b0f7f5e35a4f9c96890d4ba2612be1eaa --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-catscradle: + build: . + image: mcp-bioconductor-catscradle:latest + container_name: mcp-bioconductor-catscradle + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-catscradle + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c46cd1636494f83da0ae619d694ce46850c60680 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-catscradle + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-catscradle/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-delayedarray/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-delayedarray/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-delayedarray/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6e82559b1698fd13bbb4072e5206c349eeaab3da --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-dino via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-dino -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-dino_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-dino_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-dino_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_server.py new file mode 100644 index 0000000000000000000000000000000000000000..92e26bd620e1c07add3566e7fe36d3944d190bac --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_server.py @@ -0,0 +1,195 @@ +import subprocess +import tempfile +import os +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def normalize_single_cell_data( + input_sce_path: Path, + output_sce_path: Path, + output_normalized_matrix_path: Optional[Path] = None, + seed: Optional[int] = None, + num_cores: Optional[int] = None, +) -> Dict[str, Any]: + """ + Normalizes single-cell mRNA sequencing data using the Bioconductor Dino package. + + This tool corrects for technical variation, particularly sequencing depth, + producing a matrix of corrected expression where the dependency between + sequencing depth and the full distribution of normalized expression is removed. + It is particularly useful for highly sparse datasets from UMI-based protocols. + + Args: + input_sce_path: Path to the input SingleCellExperiment R object file (.rds). + This file should contain raw count data. + output_sce_path: Path to save the output normalized SingleCellExperiment + R object file (.rds). + output_normalized_matrix_path: Optional path to save the normalized + expression matrix as a CSV file. If provided, + the normalized logcounts will be extracted + and written to this file. + seed: Optional integer seed for reproducibility of random processes + within the normalization. Must be a positive integer. + num_cores: Optional integer specifying the number of cores to use for + parallel processing. Must be a positive integer. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list + of generated output files. + """ + # 1. Input Validation + if not input_sce_path.is_file(): + raise ValueError(f"Input SingleCellExperiment file not found: {input_sce_path}") + if not input_sce_path.suffix == ".rds": + raise ValueError(f"Input file must be an .rds file, but got: {input_sce_path.suffix}") + + if output_sce_path.suffix != ".rds": + raise ValueError(f"Output SingleCellExperiment file must have a .rds extension, but got: {output_sce_path.suffix}") + output_sce_path.parent.mkdir(parents=True, exist_ok=True) + + if output_normalized_matrix_path: + if not output_normalized_matrix_path.suffix.lower() in [".csv", ".tsv"]: + raise ValueError(f"Output normalized matrix file must be .csv or .tsv, but got: {output_normalized_matrix_path.suffix}") + output_normalized_matrix_path.parent.mkdir(parents=True, exist_ok=True) + + if seed is not None: + if not isinstance(seed, int) or seed <= 0: + raise ValueError(f"Seed must be a positive integer, but got: {seed}") + + if num_cores is not None: + if not isinstance(num_cores, int) or num_cores <= 0: + raise ValueError(f"Number of cores must be a positive integer, but got: {num_cores}") + + # 2. File Path Handling and R Script Generation + r_script_content = f""" + library(Dino) + library(SingleCellExperiment) + library(BiocParallel) + library(Matrix) # For sparse matrix handling if needed + library(utils) # For write.csv/write.table + + # Set seed for reproducibility if provided + if (!is.null({seed})) {{ + set.seed({seed}) + }} + + # Set up parallel processing if num_cores is provided + if (!is.null({num_cores})) {{ + BPPARAM <- MulticoreParam(workers = {num_cores}) + }} else {{ + BPPARAM <- SerialParam() # Default to serial processing + }} + + # Load input SingleCellExperiment object + sce <- readRDS("{input_sce_path}") + + # Ensure 'counts' assay exists, as Dino typically operates on raw counts + if (!("counts" %in% assayNames(sce))) {{ + stop("Input SingleCellExperiment object must contain a 'counts' assay.") + }} + + # Perform Dino normalization + # The main normalization function in Dino is typically called 'DinoNormalize' + # or similar, operating on a SingleCellExperiment object. + # Assuming a function `DinoNormalize` exists and takes an SCE and BPPARAM. + # If the actual function name is different, this needs to be updated. + message("Starting Dino normalization...") + normalized_sce <- DinoNormalize(sce, BPPARAM = BPPARAM) + message("Dino normalization complete.") + + # Save the normalized SingleCellExperiment object + saveRDS(normalized_sce, "{output_sce_path}") + message("Normalized SingleCellExperiment object saved to {output_sce_path}") + + # Optionally save the normalized expression matrix + if (!is.null("{output_normalized_matrix_path}")) {{ + # Dino typically stores normalized data in 'logcounts' or a similar assay + if ("logcounts" %in% assayNames(normalized_sce)) {{ + normalized_matrix <- assay(normalized_sce, "logcounts") + }} else if ("normcounts" %in% assayNames(normalized_sce)) {{ + normalized_matrix <- assay(normalized_sce, "normcounts") + }} else {{ + stop("Normalized assay (e.g., 'logcounts' or 'normcounts') not found in the output SingleCellExperiment object.") + }} + + # Determine separator based on file extension + if (grepl("\\.csv$", "{output_normalized_matrix_path}", ignore.case = TRUE)) {{ + write.csv(as.matrix(normalized_matrix), "{output_normalized_matrix_path}", row.names = TRUE) + message("Normalized expression matrix saved to {output_normalized_matrix_path} as CSV.") + }} else if (grepl("\\.tsv$", "{output_normalized_matrix_path}", ignore.case = TRUE)) {{ + write.table(as.matrix(normalized_matrix), "{output_normalized_matrix_path}", sep = "\\t", quote = FALSE, row.names = TRUE) + message("Normalized expression matrix saved to {output_normalized_matrix_path} as TSV.") + }} else {{ + warning("Unsupported output format for normalized matrix. Skipping saving matrix.") + }} + }} + """ + + # Use a temporary file for the R script + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".R") as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + command = ["Rscript", str(r_script_path)] + command_executed = " ".join(command) + + stdout: str = "" + stderr: str = "" + output_files: List[str] = [] + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + env=os.environ.copy() # Pass current environment to Rscript + ) + stdout = process.stdout + stderr = process.stderr + + if output_sce_path.is_file(): + output_files.append(str(output_sce_path)) + else: + raise FileNotFoundError(f"Expected output SCE file not found: {output_sce_path}") + + if output_normalized_matrix_path and output_normalized_matrix_path.is_file(): + output_files.append(str(output_normalized_matrix_path)) + + except subprocess.CalledProcessError as e: + stdout = e.stdout + stderr = e.stderr + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "error": f"R script failed with exit code {e.returncode}. See stderr for details.", + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": "Rscript command not found. Is R installed and in your PATH?", + "error": "Rscript executable not found.", + "output_files": [], + } + finally: + # Clean up the temporary R script file + if r_script_path.exists(): + os.remove(r_script_path) + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } + +# Note: The actual function name for normalization within the Dino package +# (e.g., `DinoNormalize`) is an assumption based on common Bioconductor practices +# and the package's description. If the specific function name or its parameters +# differ, the R script content within this Python function would need adjustment +# based on the official Dino package documentation (e.g., by running `help(package="Dino")` +# or `?DinoNormalize` in an R session after installing the package). \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..cf783f001ea29d37a9299a00fd7c4656831db6ff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/app/bioconductor-dino_server.py') +SERVER_NAME = 'biosci_bioconductor_dino' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4fd86a2fb530e480a3be61540646fc99417a27c2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-dino: + build: . + image: mcp-bioconductor-dino:latest + container_name: mcp-bioconductor-dino + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-dino + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d43d9329de36095538b4692008941e84a395ce3d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-dino + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-dino/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9ce330750f20d1fec8196e0bc3c8a1de5fbd3e99 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-genomicfeatures via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-genomicfeatures -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-genomicfeatures_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-genomicfeatures_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-genomicfeatures_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_server.py new file mode 100644 index 0000000000000000000000000000000000000000..148f17a16e5580810a889e3dacb04112358ad16a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_server.py @@ -0,0 +1,184 @@ +import subprocess +import tempfile +import logging +from pathlib import Path +from typing import Optional, Literal + +# Configure logging +logging.basicConfig(level=logging.INFO) + +# @mcp.tool() decorator would be here in a real MCP environment +def extract_genomic_features( + source_type: Literal["gff", "ucsc", "biomart"], + feature_type: Literal["genes", "transcripts", "exons", "cds", "introns", "promoters"], + output_file: Path, + gff_file: Optional[Path] = None, + ucsc_genome: Optional[str] = None, + ucsc_tablename: Optional[str] = None, + biomart_dataset: Optional[str] = None, + biomart_host: str = "https://www.ensembl.org", + output_format: Literal["bed", "gff3", "gtf"] = "gff3", + organism: Optional[str] = None, + chrominfo_file: Optional[Path] = None, + data_source: Optional[str] = None, + species: Optional[str] = None, + transcript_name_column: Optional[str] = None, + geneid_name_column: Optional[str] = None, + promoter_upstream: int = 2000, + promoter_downstream: int = 200, + single_strand_genes_only: bool = True, +) -> dict: + """ + Extracts genomic features from a gene model source using Bioconductor's GenomicFeatures package. + + This tool creates a transcript database (TxDb) from a GFF/GTF file, UCSC Genome Browser, + or a BioMart database, and then extracts specified features like genes, exons, or promoters, + saving them to a file. + + Args: + source_type: The source of the gene models ('gff', 'ucsc', or 'biomart'). + feature_type: The type of genomic feature to extract. + output_file: Path to the output file where features will be saved. + gff_file: Path to the input GFF or GTF file (required if source_type is 'gff'). + ucsc_genome: UCSC genome assembly name, e.g., 'hg19' (required if source_type is 'ucsc'). + ucsc_tablename: UCSC table name, e.g., 'knownGene' (required if source_type is 'ucsc'). + biomart_dataset: BioMart dataset name, e.g., 'hsapiens_gene_ensembl' (required if source_type is 'biomart'). + biomart_host: The base URL of the BioMart host. + output_format: The format for the output file ('bed', 'gff3', or 'gtf'). + organism: The scientific name of the organism, e.g., 'Homo sapiens'. + chrominfo_file: A tab-separated file with chromosome names and lengths. + data_source: A string describing the source of the data. + species: The species name, e.g., 'Human'. + transcript_name_column: For GFF files, the attribute column containing the transcript name. + geneid_name_column: For GFF files, the attribute column containing the gene ID. + promoter_upstream: For 'promoters' feature_type, the number of bases upstream of the TSS. + promoter_downstream: For 'promoters' feature_type, the number of bases downstream of the TSS. + single_strand_genes_only: For 'genes' feature_type, whether to ignore genes on both strands. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if source_type == "gff": + if not gff_file: + raise ValueError("`gff_file` is required when `source_type` is 'gff'.") + if not gff_file.is_file(): + raise FileNotFoundError(f"GFF file not found: {gff_file}") + elif source_type == "ucsc": + if not ucsc_genome or not ucsc_tablename: + raise ValueError("`ucsc_genome` and `ucsc_tablename` are required when `source_type` is 'ucsc'.") + elif source_type == "biomart": + if not biomart_dataset: + raise ValueError("`biomart_dataset` is required when `source_type` is 'biomart'.") + else: + # This case should be caught by Literal, but included for robustness + raise ValueError(f"Invalid `source_type`: {source_type}") + + if chrominfo_file and not chrominfo_file.is_file(): + raise FileNotFoundError(f"Chromosome info file not found: {chrominfo_file}") + + if promoter_upstream < 0 or promoter_downstream < 0: + raise ValueError("`promoter_upstream` and `promoter_downstream` must be non-negative.") + + output_file.parent.mkdir(parents=True, exist_ok=True) + + # --- R Script Generation --- + r_script_lines = [ + "library(GenomicFeatures)", + "library(rtracklayer)", + "", + "# Wrap in tryCatch for robust error handling", + "tryCatch({", + ] + + # Part 1: Create TxDb object + txdb_creation_lines = [] + if source_type == "gff": + args = [f'file = "{gff_file}"'] + if data_source: args.append(f'dataSource = "{data_source}"') + if organism: args.append(f'organism = "{organism}"') + if species: args.append(f'species = "{species}"') + if chrominfo_file: + txdb_creation_lines.append(f'chrominfo_df <- read.table("{chrominfo_file}", sep="\\t", col.names=c("chrom", "length"))') + args.append('chrominfo = chrominfo_df') + if transcript_name_column: args.append(f'transcript_name.column = "{transcript_name_column}"') + if geneid_name_column: args.append(f'geneid.column = "{geneid_name_column}"') + txdb_creation_lines.append(f" txdb <- makeTxDbFromGFF({', '.join(args)})") + elif source_type == "ucsc": + args = [f'genome = "{ucsc_genome}"', f'tablename = "{ucsc_tablename}"'] + if organism: args.append(f'organism = "{organism}"') + txdb_creation_lines.append(f" txdb <- makeTxDbFromUCSC({', '.join(args)})") + elif source_type == "biomart": + args = [f'biomart = "ensembl"', f'dataset = "{biomart_dataset}"', f'host = "{biomart_host}"'] + if organism: args.append(f'organism = "{organism}"') + txdb_creation_lines.append(f" txdb <- makeTxDbFromBiomart({', '.join(args)})") + + r_script_lines.extend(txdb_creation_lines) + + # Part 2: Extract Features + r_bool = "TRUE" if single_strand_genes_only else "FALSE" + feature_map = { + "genes": f"genes(txdb, single.strand.genes.only = {r_bool})", + "transcripts": "transcripts(txdb)", + "exons": "exons(txdb)", + "cds": "cds(txdb)", + "introns": "unlist(intronsByTranscript(txdb))", + "promoters": f"promoters(txdb, upstream = {promoter_upstream}, downstream = {promoter_downstream})" + } + r_script_lines.append(f" features <- {feature_map[feature_type]}") + + # Part 3: Export Results + r_script_lines.append(f' rtracklayer::export(features, "{output_file}", format = "{output_format}")') + + # Finalize R script with error handling + r_script_lines.extend([ + " cat('Feature extraction completed successfully.\\n')", + "}, error = function(e) {", + " cat(paste('Error in R script:', e$message, '\\n'), file = stderr())", + " quit(status = 1, save = 'no')", + "})" + ]) + + r_script = "\n".join(r_script_lines) + + # --- Subprocess Execution --- + command_executed = "" + stdout_str = "" + stderr_str = "" + + try: + with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix=".R") as tmp_script: + tmp_script.write(r_script) + script_path = tmp_script.name + + command = ["Rscript", script_path] + command_executed = " ".join(command) + logging.info(f"Executing command: {command_executed}") + + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + stdout_str = process.stdout + stderr_str = process.stderr + + except FileNotFoundError: + raise RuntimeError("Rscript not found. Please ensure R is installed and in your PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"R script execution failed with exit code {e.returncode}") + logging.error(f"STDOUT: {e.stdout}") + logging.error(f"STDERR: {e.stderr}") + raise + finally: + # Clean up the temporary R script file + if 'script_path' in locals() and Path(script_path).exists(): + Path(script_path).unlink() + + return { + "command_executed": command_executed, + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": [str(output_file)] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..88f2161dda065e59e7b8fda74c50304cb47f27b9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/bioconductor-genomicfeatures_server.py') +SERVER_NAME = 'biosci_bioconductor_genomicfeatures' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..0ed64c15246a6e42f3ed448bcf13f62762db3b12 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-genomicfeatures: + build: . + image: mcp-bioconductor-genomicfeatures:latest + container_name: mcp-bioconductor-genomicfeatures + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-genomicfeatures + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..077be5894b7e52c31a6f405538213f1090d401b7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-genomicfeatures + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-genomicfeatures/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d094aacd7f9cef99a6c0332a22fdfeb4a493e2f8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-graph via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-graph -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-graph_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-graph_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-graph_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/bioconductor-graph_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/bioconductor-graph_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1a5d1eb95b9c50bb2e6185628b353c70c1931bca --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/bioconductor-graph_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/bioconductor-graph_server.py') +SERVER_NAME = 'biosci_bioconductor_graph' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..e381d6f96261f88e640b44f179e11c5daaf6a92d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-graph: + build: . + image: mcp-bioconductor-graph:latest + container_name: mcp-bioconductor-graph + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-graph + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bf5c6395ba1581a2cb6bfed8ca295707e071d324 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-graph + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-graph/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f2c0510d772e52fc655c301f1f3fd7380e937f81 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-hdf5array via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-hdf5array -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-hdf5array_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-hdf5array_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-hdf5array_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a4048de346ad70d73d03a0fc0339fb993b097ab8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_server.py @@ -0,0 +1,460 @@ +import subprocess +import tempfile +import textwrap +from pathlib import Path +from typing import Dict, List, Optional, Union + +# MCP decorator is not defined in this context, so we'll use a placeholder. +# In a real MCP environment, this would be: from mcp import tool +class mcp: + def tool(func): + return func + +@mcp.tool +def write_hdf5_array( + input_file: Path, + output_hdf5: Path, + dataset_name: str, + input_format: str = "csv", + chunk_dim: Optional[str] = None, + compression_level: int = 6, + as_integer: bool = False, + csv_header: bool = True, + csv_row_names_col: Optional[int] = 1, +) -> Dict[str, Union[str, Dict[str, str]]]: + """ + Converts a data file (CSV, TSV, or RDS) into an HDF5 file using HDF5Array. + + This tool is a wrapper around the HDF5Array::writeHDF5Array R function. + It requires R and the Bioconductor 'HDF5Array' package to be installed. + """ + # 1. Input validation + if not input_file.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + if not output_hdf5.parent.exists(): + raise FileNotFoundError(f"Output directory does not exist: {output_hdf5.parent}") + if input_format not in ["csv", "tsv", "rds"]: + raise ValueError("input_format must be one of 'csv', 'tsv', or 'rds'.") + if not (0 <= compression_level <= 9): + raise ValueError("compression_level must be between 0 and 9.") + if chunk_dim: + try: + [int(d) for d in chunk_dim.split(',')] + except ValueError: + raise ValueError("chunk_dim must be a comma-separated string of integers (e.g., '100,1000').") + + # 2. R script for execution + r_script_content = textwrap.dedent(""" + suppressPackageStartupMessages({ + library(optparse) + library(HDF5Array) + }) + + option_list <- list( + make_option("--input", type="character", help="Input file path (CSV, TSV, or RDS)."), + make_option("--output", type="character", help="Output HDF5 file path."), + make_option("--name", type="character", help="Name for the dataset within the HDF5 file."), + make_option("--format", type="character", default="csv", help="Input file format [csv, tsv, rds]."), + make_option("--chunkdim", type="character", default=NULL, help="Comma-separated chunk dimensions."), + make_option("--level", type="integer", default=6, help="Compression level (0-9)."), + make_option("--as_integer", action="store_true", default=FALSE, help="Coerce data to integer."), + make_option("--header", action="store_true", default=TRUE, help="Does the CSV/TSV have a header?"), + make_option("--rownames", type="integer", default=NULL, help="Column number for row names in CSV/TSV.") + ) + + args <- parse_args(OptionParser(option_list=option_list)) + + # Read input data + message("Reading input file: ", args$input) + if (args$format == "rds") { + data_matrix <- readRDS(args$input) + } else if (args$format == "csv") { + data_matrix <- read.csv(args$input, header=args$header, row.names=args$rownames, check.names=FALSE) + } else if (args$format == "tsv") { + data_matrix <- read.delim(args$input, header=args$header, row.names=args$rownames, check.names=FALSE) + } else { + stop("Unsupported format: ", args$format) + } + + if (!is.matrix(data_matrix)) { + message("Input data is not a matrix, coercing...") + data_matrix <- as.matrix(data_matrix) + } + + if (args$as_integer) { + message("Coercing data to integer...") + storage.mode(data_matrix) <- "integer" + } + + # Parse chunk dimensions + chunk_dims <- NULL + if (!is.null(args$chunkdim)) { + chunk_dims <- as.integer(strsplit(args$chunkdim, ",")[[1]]) + message("Using chunk dimensions: ", paste(chunk_dims, collapse=", ")) + } + + # Write HDF5 array + message("Writing HDF5 array to: ", args$output) + writeHDF5Array( + x = data_matrix, + filepath = args$output, + name = args$name, + chunkdim = chunk_dims, + level = args$level, + with.dimnames = TRUE, + verbose = TRUE + ) + message("Successfully created HDF5 file.") + """) + + # 3. Subprocess execution + cmd = [ + "Rscript", "-", + "--input", str(input_file), + "--output", str(output_hdf5), + "--name", dataset_name, + "--format", input_format, + "--level", str(compression_level), + ] + if chunk_dim: + cmd.extend(["--chunkdim", chunk_dim]) + if as_integer: + cmd.append("--as_integer") + if csv_header: + cmd.append("--header") + if csv_row_names_col is not None: + cmd.extend(["--rownames", str(csv_row_names_col)]) + + try: + with tempfile.NamedTemporaryFile(mode='w', delete=True, suffix=".R") as r_script_file: + r_script_file.write(r_script_content) + r_script_file.flush() + + # Rebuild command to use the script file + cmd[1] = r_script_file.name + + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"output_hdf5": str(output_hdf5)}, + } + except FileNotFoundError: + raise RuntimeError("Rscript not found. Please ensure R is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"HDF5Array R script failed with exit code {e.returncode}.\n" + f"This may be due to missing R packages ('optparse', 'HDF5Array').\n" + f"Please install them in R using:\n" + f"install.packages('optparse')\n" + f"if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager')\n" + f"BiocManager::install('HDF5Array')\n\n" + f"STDOUT:\n{e.stdout}\n" + f"STDERR:\n{e.stderr}" + ) + raise RuntimeError(error_message) from e + + +@mcp.tool +def save_hdf5_summarized_experiment( + input_rds: Path, + output_dir: Path, + prefix: Optional[str] = None, + replace: bool = False, +) -> Dict[str, Union[str, Dict[str, str]]]: + """ + Saves a SummarizedExperiment object from an RDS file to an HDF5-backed format. + + This tool wraps the HDF5Array::saveHDF5SummarizedExperiment R function. + It requires R and the Bioconductor packages 'HDF5Array' and 'SummarizedExperiment'. + """ + # 1. Input validation + if not input_rds.exists(): + raise FileNotFoundError(f"Input RDS file not found: {input_rds}") + if output_dir.exists() and not output_dir.is_dir(): + raise ValueError(f"Output path exists but is not a directory: {output_dir}") + if output_dir.exists() and any(output_dir.iterdir()) and not replace: + raise FileExistsError(f"Output directory {output_dir} is not empty. Use replace=True to overwrite.") + + output_dir.mkdir(parents=True, exist_ok=True) + + # 2. R script for execution + r_script_content = textwrap.dedent(""" + suppressPackageStartupMessages({ + library(optparse) + library(HDF5Array) + library(SummarizedExperiment) + }) + + option_list <- list( + make_option("--input", type="character", help="Input RDS file containing a SummarizedExperiment object."), + make_option("--outdir", type="character", help="Output directory to save the HDF5SummarizedExperiment."), + make_option("--prefix", type="character", default=NULL, help="Optional prefix for file names."), + make_option("--replace", action="store_true", default=FALSE, help="Replace existing directory content.") + ) + + args <- parse_args(OptionParser(option_list=option_list)) + + message("Reading SummarizedExperiment object from: ", args$input) + se <- readRDS(args$input) + + if (!is(se, "SummarizedExperiment")) { + stop("The object in the RDS file is not a SummarizedExperiment.") + } + + message("Saving HDF5SummarizedExperiment to: ", args$outdir) + saveHDF5SummarizedExperiment( + x = se, + dir = args$outdir, + prefix = args$prefix, + replace = args$replace, + verbose = TRUE + ) + message("Successfully saved HDF5SummarizedExperiment.") + """) + + # 3. Subprocess execution + cmd = [ + "Rscript", "-", + "--input", str(input_rds), + "--outdir", str(output_dir), + ] + if prefix: + cmd.extend(["--prefix", prefix]) + if replace: + cmd.append("--replace") + + try: + with tempfile.NamedTemporaryFile(mode='w', delete=True, suffix=".R") as r_script_file: + r_script_file.write(r_script_content) + r_script_file.flush() + + cmd[1] = r_script_file.name + + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"output_directory": str(output_dir)}, + } + except FileNotFoundError: + raise RuntimeError("Rscript not found. Please ensure R is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"HDF5Array R script failed with exit code {e.returncode}.\n" + f"This may be due to missing R packages ('optparse', 'HDF5Array', 'SummarizedExperiment').\n" + f"Please install them in R using BiocManager.\n\n" + f"STDOUT:\n{e.stdout}\n" + f"STDERR:\n{e.stderr}" + ) + raise RuntimeError(error_message) from e + + +@mcp.tool +def export_hdf5_summarized_experiment( + input_dir: Path, + output_dir: Path, + assay_names: Optional[str] = None, + export_coldata: bool = True, + export_rowdata: bool = True, +) -> Dict[str, Union[str, Dict[str, str]]]: + """ + Loads an HDF5SummarizedExperiment and exports its components to CSV files. + + This tool wraps HDF5Array::loadHDF5SummarizedExperiment and exports data. + Requires R and the Bioconductor packages 'HDF5Array' and 'SummarizedExperiment'. + """ + # 1. Input validation + if not input_dir.is_dir(): + raise FileNotFoundError(f"Input directory not found: {input_dir}") + if output_dir.exists() and not output_dir.is_dir(): + raise ValueError(f"Output path exists but is not a directory: {output_dir}") + + output_dir.mkdir(parents=True, exist_ok=True) + + # 2. R script for execution + r_script_content = textwrap.dedent(""" + suppressPackageStartupMessages({ + library(optparse) + library(HDF5Array) + library(SummarizedExperiment) + }) + + option_list <- list( + make_option("--indir", type="character", help="Input directory of the HDF5SummarizedExperiment."), + make_option("--outdir", type="character", help="Output directory for exported CSV files."), + make_option("--assays", type="character", default=NULL, help="Comma-separated list of assays to export (default: all)."), + make_option("--coldata", action="store_true", default=FALSE, help="Export colData to CSV."), + make_option("--rowdata", action="store_true", default=FALSE, help="Export rowData to CSV.") + ) + + args <- parse_args(OptionParser(option_list=option_list)) + + message("Loading HDF5SummarizedExperiment from: ", args$indir) + se <- loadHDF5SummarizedExperiment(dir = args$indir) + + assays_to_export <- assayNames(se) + if (!is.null(args$assays)) { + assays_to_export <- intersect(assays_to_export, strsplit(args$assays, ",")[[1]]) + } + + if (length(assays_to_export) > 0) { + for (aname in assays_to_export) { + message("Exporting assay: ", aname) + out_path <- file.path(args$outdir, paste0("assay_", aname, ".csv")) + mat <- as.matrix(assay(se, aname)) + write.csv(mat, file=out_path, quote=FALSE, row.names=TRUE) + } + } + + if (args$coldata) { + message("Exporting colData") + out_path <- file.path(args$outdir, "coldata.csv") + write.csv(as.data.frame(colData(se)), file=out_path, quote=FALSE, row.names=TRUE) + } + + if (args$rowdata) { + message("Exporting rowData") + out_path <- file.path(args$outdir, "rowdata.csv") + write.csv(as.data.frame(rowData(se)), file=out_path, quote=FALSE, row.names=TRUE) + } + + message("Export complete.") + """) + + # 3. Subprocess execution + cmd = [ + "Rscript", "-", + "--indir", str(input_dir), + "--outdir", str(output_dir), + ] + if assay_names: + cmd.extend(["--assays", assay_names]) + if export_coldata: + cmd.append("--coldata") + if export_rowdata: + cmd.append("--rowdata") + + try: + with tempfile.NamedTemporaryFile(mode='w', delete=True, suffix=".R") as r_script_file: + r_script_file.write(r_script_content) + r_script_file.flush() + + cmd[1] = r_script_file.name + + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + output_files = [str(p) for p in output_dir.glob("*.csv")] + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"output_directory": str(output_dir), "exported_files": output_files}, + } + except FileNotFoundError: + raise RuntimeError("Rscript not found. Please ensure R is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"HDF5Array R script failed with exit code {e.returncode}.\n" + f"This may be due to missing R packages or an invalid HDF5SummarizedExperiment directory.\n\n" + f"STDOUT:\n{e.stdout}\n" + f"STDERR:\n{e.stderr}" + ) + raise RuntimeError(error_message) from e + + +@mcp.tool +def inspect_hdf5_array( + input_hdf5: Path, + dataset_name: str, +) -> Dict[str, str]: + """ + Inspects an HDF5 file and prints properties of a specific HDF5Array dataset. + + This tool provides information like dimensions and chunking without loading data. + Requires R and the Bioconductor 'HDF5Array' package. + """ + # 1. Input validation + if not input_hdf5.exists(): + raise FileNotFoundError(f"Input HDF5 file not found: {input_hdf5}") + + # 2. R script for execution + r_script_content = textwrap.dedent(""" + suppressPackageStartupMessages({ + library(optparse) + library(HDF5Array) + }) + + option_list <- list( + make_option("--file", type="character", help="Input HDF5 file path."), + make_option("--name", type="character", help="Name of the dataset to inspect.") + ) + + args <- parse_args(OptionParser(option_list=option_list)) + + # Load the HDF5 array seed + HDF5_dataset <- HDF5Array(args$file, args$name) + + # Print properties + cat("Dataset:", name(HDF5_dataset), "\\n") + cat("Filepath:", path(HDF5_dataset), "\\n") + cat("Dimensions:", paste(dim(HDF5_dataset), collapse=" x "), "\\n") + cat("Datatype:", class(HDF5_dataset@seed@first_val), "\\n") + cat("Chunking:", paste(chunkdim(HDF5_dataset), collapse=" x "), "\\n") + """) + + # 3. Subprocess execution + cmd = [ + "Rscript", "-", + "--file", str(input_hdf5), + "--name", dataset_name, + ] + + try: + with tempfile.NamedTemporaryFile(mode='w', delete=True, suffix=".R") as r_script_file: + r_script_file.write(r_script_content) + r_script_file.flush() + + cmd[1] = r_script_file.name + + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + } + except FileNotFoundError: + raise RuntimeError("Rscript not found. Please ensure R is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"HDF5Array R script failed with exit code {e.returncode}.\n" + f"This may be due to a missing R package, an incorrect file path, or a non-existent dataset name ('{dataset_name}').\n\n" + f"STDOUT:\n{e.stdout}\n" + f"STDERR:\n{e.stderr}" + ) + raise RuntimeError(error_message) from e \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a61b618420b5474801ce95d2e7ed9d7a7fe963fc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/bioconductor-hdf5array_server.py') +SERVER_NAME = 'biosci_bioconductor_hdf5array' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..97bfa9f0817812b9b034da837a26e1ca56d332f8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-hdf5array: + build: . + image: mcp-bioconductor-hdf5array:latest + container_name: mcp-bioconductor-hdf5array + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-hdf5array + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0d5fae2ca90a31c0f18e23fab27e79852206c4dc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-hdf5array + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-hdf5array/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e30f96079a8c672ae33bcfb5e72ab1ed0a42a4cc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-irisfgm via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-irisfgm -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-irisfgm_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-irisfgm_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-irisfgm_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3d876ec99eb98061f1a8fe4630611b9e55e0656b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_server.py @@ -0,0 +1,175 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def run_irisfgm_script( + r_script_content: str, + output_dir: Path = Path("./"), + r_environment_setup_script: Optional[str] = None, +) -> Dict[str, Any]: + """ + Executes an R script that utilizes the bioconductor-irisfgm package. + + The bioconductor-irisfgm tool is an R package designed for comprehensive + analysis of gene interactivity networks based on single-cell RNA-Seq data. + As the provided documentation does not expose a direct command-line + interface with specific subcommands and parameters, this MCP tool provides + a generic entry point to execute arbitrary R code that leverages the IRISFGM + package. + + Users are expected to provide an R script that loads the IRISFGM package + and calls its internal functions as needed. The R script should be written + to save any desired output files to the directory specified by the + 'OUTPUT_DIR' environment variable, which corresponds to the `output_dir` + parameter. + + Example R script content: + ```R + # Load the IRISFGM package + library(IRISFGM) + + # --- Placeholder for actual IRISFGM function calls --- + # In a real scenario, you would load your actual scRNA-seq data + # (e.g., from a CSV, TSV, or a Seurat object) and then apply IRISFGM functions. + # + # Example: Create a dummy SingleCellExperiment object for demonstration + # library(SingleCellExperiment) + # counts <- matrix(rnbinom(1000, mu=10, size=1), ncol=10) + # rownames(counts) <- paste0("gene", 1:100) + # colnames(counts) <- paste0("cell", 1:10) + # sce <- SingleCellExperiment(assays=list(counts=counts)) + # + # Example of a hypothetical IRISFGM function call (replace with actual functions): + # fgms_result <- IRISFGM::identifyFGMs(sce_object, ...) + # + # Print some output to stdout + message("IRISFGM R script executed successfully.") + # + # Save results to a file in the output directory + # output_dir <- Sys.getenv("OUTPUT_DIR") + # if (!is.null(output_dir) && dir.exists(output_dir)) { + # write.csv(data.frame(gene="gene1", value=10), file = file.path(output_dir, "example_output.csv")) + # message(paste("Saved example_output.csv to", output_dir)) + # } else { + # warning("OUTPUT_DIR environment variable not set or directory does not exist.") + # } + ``` + + Args: + r_script_content: A string containing the R script to be executed. + This script should include calls to IRISFGM functions. + output_dir: The directory where any output files generated by the R script + should be stored. The R script should be written to save + files to this directory (e.g., using `file.path(Sys.getenv("OUTPUT_DIR"), "filename")`). + Defaults to the current working directory. + r_environment_setup_script: Optional R script content to run before the main + `r_script_content`. This can be used for + environment setup, installing packages, etc., + if not handled by the container. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list + of any output files generated. + """ + if not r_script_content: + raise ValueError("R script content cannot be empty.") + + # Ensure the output directory exists + output_dir.mkdir(parents=True, exist_ok=True) + + command_executed: List[str] = [] + stdout: str = "" + stderr: str = "" + output_files: List[Path] = [] + + with tempfile.TemporaryDirectory() as tmpdir: + temp_dir_path = Path(tmpdir) + r_script_path = temp_dir_path / "main_script.R" + setup_script_path: Optional[Path] = None + + # Write the main R script content to a temporary file + with open(r_script_path, "w") as f: + f.write(r_script_content) + + # Prepare environment variables for the R process + env_vars = {"OUTPUT_DIR": str(output_dir)} + + # If an R environment setup script is provided, execute it first + if r_environment_setup_script: + setup_script_path = temp_dir_path / "setup_script.R" + with open(setup_script_path, "w") as f: + f.write(r_environment_setup_script) + setup_command = ["Rscript", str(setup_script_path)] + command_executed.append(" ".join(setup_command)) + try: + setup_result = subprocess.run( + setup_command, + capture_output=True, + text=True, + check=True, + env={**subprocess.os.environ, **env_vars} # Merge with current environment + ) + stdout += f"Setup script stdout:\n{setup_result.stdout}\n" + stderr += f"Setup script stderr:\n{setup_result.stderr}\n" + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(setup_command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"R setup script failed with exit code {e.returncode}", + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": " ".join(setup_command), + "stdout": "", + "stderr": "Error: Rscript command not found. Is R installed and in PATH?", + "error": "Rscript not found for setup script", + "output_files": [], + } + + # Execute the main R script + r_command = ["Rscript", str(r_script_path)] + command_executed.append(" ".join(r_command)) + + try: + result = subprocess.run( + r_command, + capture_output=True, + text=True, + check=True, + env={**subprocess.os.environ, **env_vars} # Merge with current environment + ) + stdout += result.stdout + stderr += result.stderr + + # Collect output files from the specified output_dir + for f in output_dir.iterdir(): + if f.is_file(): + output_files.append(f) + + except subprocess.CalledProcessError as e: + return { + "command_executed": "\n".join(command_executed), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"R script failed with exit code {e.returncode}", + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": "\n".join(command_executed), + "stdout": "", + "stderr": "Error: Rscript command not found. Is R installed and in PATH?", + "error": "Rscript not found for main script", + "output_files": [], + } + + return { + "command_executed": "\n".join(command_executed), + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..fa92fdb8ba19644dedd85e8ac21ae4e569fefc15 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/app/bioconductor-irisfgm_server.py') +SERVER_NAME = 'biosci_bioconductor_irisfgm' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..6ec8f6a1ced45007183fe46de3573b1d37550d46 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-irisfgm: + build: . + image: mcp-bioconductor-irisfgm:latest + container_name: mcp-bioconductor-irisfgm + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-irisfgm + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ca7f25d8bc352e903a8fc4e77bb5c0eba53afd37 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-irisfgm + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-irisfgm/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7823c41076fc0b5b374ed7430f528d63e59978fe --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-merfishdata via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-merfishdata -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-merfishdata_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-merfishdata_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-merfishdata_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/bioconductor-merfishdata_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/bioconductor-merfishdata_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d956185f38cb4b77761eb5821bf114b544ad816e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/bioconductor-merfishdata_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/bioconductor-merfishdata_server.py') +SERVER_NAME = 'biosci_bioconductor_merfishdata' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-merfishdata/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..50b12bc8047f8991312c0813274193fff3435c15 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-multtest via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-multtest -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-multtest_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-multtest_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-multtest_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_server.py new file mode 100644 index 0000000000000000000000000000000000000000..77eada11744f8070337a4c33026cf6edbe3a5b1d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_server.py @@ -0,0 +1,293 @@ +import subprocess +import shlex +from pathlib import Path +from typing import Optional, List + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +def tool(): + def decorator(f): + return f + return decorator + +mcp = type("mcp", (), {"tool": tool})() + + +@mcp.tool() +def multtest_rawp2adjp( + raw_p_values_file: Path, + output_file: Path, + procedure: str, + alpha: float = 0.05, +) -> dict: + """ + Computes adjusted p-values from a vector of raw (unadjusted) p-values + using various multiple testing procedures. This tool is a wrapper for the + `mt.rawp2adjp` function from the Bioconductor `multtest` package. + + Args: + raw_p_values_file: Path to a single-column file containing raw p-values. + output_file: Path to the output file where adjusted p-values will be saved. + procedure: The multiple testing procedure to use. + Valid options: "Bonferroni", "Holm", "Hochberg", "SidakSS", + "SidakSD", "BH", "BY", "ABH", "TSBH". + alpha: The significance level for procedures that require it (e.g., step-down methods). + Must be between 0 and 1. + + Returns: + A dictionary containing the execution command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not raw_p_values_file.is_file(): + raise FileNotFoundError(f"Input file not found: {raw_p_values_file}") + + ALLOWED_PROCEDURES = [ + "Bonferroni", "Holm", "Hochberg", "SidakSS", "SidakSD", + "BH", "BY", "ABH", "TSBH" + ] + if procedure not in ALLOWED_PROCEDURES: + raise ValueError( + f"Invalid procedure '{procedure}'. " + f"Choose from: {', '.join(ALLOWED_PROCEDURES)}" + ) + + if not (0 < alpha < 1): + raise ValueError(f"alpha must be between 0 and 1, but got {alpha}.") + + # Ensure output directory exists + output_file.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + # This assumes a hypothetical command-line wrapper `multtest-cli` for the R package. + cmd = [ + "multtest-cli", + "rawp2adjp", + "--pvals", str(raw_p_values_file), + "--proc", procedure, + "--alpha", str(alpha), + "--out", str(output_file), + ] + + # --- Subprocess Execution --- + command_executed = shlex.join(cmd) + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + except FileNotFoundError: + raise RuntimeError("`multtest-cli` command not found. Is the tool installed and in your PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Tool execution failed.", + "return_code": e.returncode, + } + + # --- Structured Result Return --- + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_file)], + } + + +@mcp.tool() +def multtest_maxt( + data_file: Path, + class_labels_file: Path, + output_file: Path, + test: str, + side: str = "abs", + n_permutations: int = 1000, + seed: Optional[int] = None, +) -> dict: + """ + Performs a permutation test based on maxT-statistics to adjust p-values for + multiple hypothesis testing. This is a wrapper for the `mt.maxT` function + from the Bioconductor `multtest` package. + + Args: + data_file: Path to the input data matrix (e.g., CSV/TSV), with features + in rows and samples in columns. + class_labels_file: Path to a file containing class labels for each sample (column) + in the data file. + output_file: Path to the output file for the results. + test: The test statistic to use. Valid options: "t", "t.equalvar", + "wilcoxon", "f", "pairt", "blockf". + side: The alternative hypothesis. Valid options: "abs" (two-sided), + "upper" (greater), "lower" (less). + n_permutations: The number of permutations to perform. + seed: An optional integer seed for the random number generator for reproducibility. + + Returns: + A dictionary containing the execution command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not data_file.is_file(): + raise FileNotFoundError(f"Data file not found: {data_file}") + if not class_labels_file.is_file(): + raise FileNotFoundError(f"Class labels file not found: {class_labels_file}") + + ALLOWED_TESTS = ["t", "t.equalvar", "wilcoxon", "f", "pairt", "blockf"] + if test not in ALLOWED_TESTS: + raise ValueError( + f"Invalid test '{test}'. Choose from: {', '.join(ALLOWED_TESTS)}" + ) + + ALLOWED_SIDES = ["abs", "upper", "lower"] + if side not in ALLOWED_SIDES: + raise ValueError( + f"Invalid side '{side}'. Choose from: {', '.join(ALLOWED_SIDES)}" + ) + + if n_permutations <= 0: + raise ValueError("n_permutations must be a positive integer.") + + # Ensure output directory exists + output_file.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd: List[str] = [ + "multtest-cli", + "maxt", + "--data", str(data_file), + "--labels", str(class_labels_file), + "--out", str(output_file), + "--test", test, + "--side", side, + "--nperm", str(n_permutations), + ] + if seed is not None: + cmd.extend(["--seed", str(seed)]) + + # --- Subprocess Execution --- + command_executed = shlex.join(cmd) + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + except FileNotFoundError: + raise RuntimeError("`multtest-cli` command not found. Is the tool installed and in your PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Tool execution failed.", + "return_code": e.returncode, + } + + # --- Structured Result Return --- + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_file)], + } + + +@mcp.tool() +def multtest_minp( + data_file: Path, + class_labels_file: Path, + output_file: Path, + test: str, + side: str = "abs", + n_permutations: int = 1000, + seed: Optional[int] = None, +) -> dict: + """ + Performs a permutation test based on minP-statistics to adjust p-values for + multiple hypothesis testing. This is a wrapper for the `mt.minP` function + from the Bioconductor `multtest` package. + + Args: + data_file: Path to the input data matrix (e.g., CSV/TSV), with features + in rows and samples in columns. + class_labels_file: Path to a file containing class labels for each sample (column) + in the data file. + output_file: Path to the output file for the results. + test: The test statistic to use. Valid options: "t", "t.equalvar", + "wilcoxon", "f", "pairt", "blockf". + side: The alternative hypothesis. Valid options: "abs" (two-sided), + "upper" (greater), "lower" (less). + n_permutations: The number of permutations to perform. + seed: An optional integer seed for the random number generator for reproducibility. + + Returns: + A dictionary containing the execution command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not data_file.is_file(): + raise FileNotFoundError(f"Data file not found: {data_file}") + if not class_labels_file.is_file(): + raise FileNotFoundError(f"Class labels file not found: {class_labels_file}") + + ALLOWED_TESTS = ["t", "t.equalvar", "wilcoxon", "f", "pairt", "blockf"] + if test not in ALLOWED_TESTS: + raise ValueError( + f"Invalid test '{test}'. Choose from: {', '.join(ALLOWED_TESTS)}" + ) + + ALLOWED_SIDES = ["abs", "upper", "lower"] + if side not in ALLOWED_SIDES: + raise ValueError( + f"Invalid side '{side}'. Choose from: {', '.join(ALLOWED_SIDES)}" + ) + + if n_permutations <= 0: + raise ValueError("n_permutations must be a positive integer.") + + # Ensure output directory exists + output_file.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd: List[str] = [ + "multtest-cli", + "minp", + "--data", str(data_file), + "--labels", str(class_labels_file), + "--out", str(output_file), + "--test", test, + "--side", side, + "--nperm", str(n_permutations), + ] + if seed is not None: + cmd.extend(["--seed", str(seed)]) + + # --- Subprocess Execution --- + command_executed = shlex.join(cmd) + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + except FileNotFoundError: + raise RuntimeError("`multtest-cli` command not found. Is the tool installed and in your PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Tool execution failed.", + "return_code": e.returncode, + } + + # --- Structured Result Return --- + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_file)], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..59e25d55da1d59db6f312076a019db71cb54a681 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/bioconductor-multtest_server.py') +SERVER_NAME = 'biosci_bioconductor_multtest' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..6bc264787603248074bf059e0399068f89fd919a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-multtest: + build: . + image: mcp-bioconductor-multtest:latest + container_name: mcp-bioconductor-multtest + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-multtest + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f686d7fe95f83931ab22a680f054decfb3dd5756 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-multtest + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-multtest/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..86a9d3cb5360bb8b481fd41dcb57b2c31278be64 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-nnsvg via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-nnsvg -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-nnsvg_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-nnsvg_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-nnsvg_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_server.py new file mode 100644 index 0000000000000000000000000000000000000000..84626c19eeac653d81f3678189424bb7366ee46f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_server.py @@ -0,0 +1,140 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional + +# Mock mcp decorator for standalone execution +class mcp: + def tool(func): + return func + +@mcp.tool +def nnsvg( + input_rds: Path, + output_rds: Path, + assay_name: str = "logcounts", + covariates_file: Optional[Path] = None, + n_neighbors: int = 10, + n_omp_threads: int = 1, + verbose: bool = True, +): + """ + Runs nnSVG to identify spatially variable genes in SpatialExperiment data. + + This tool is a wrapper for the nnSVG() function from the Bioconductor package 'nnSVG'. + It identifies and ranks spatially variable genes (SVGs) in spatially-resolved + transcriptomics data using a scalable nearest-neighbor Gaussian process model. + + Args: + input_rds: Path to the input SpatialExperiment object saved as an RDS file. + This object should contain expression data and spatial coordinates. + output_rds: Path to save the output RDS file. The original SpatialExperiment + object will be saved here with nnSVG results added to its rowData. + assay_name: Name of the assay in the input object containing the expression + values (e.g., 'logcounts', 'counts'). Defaults to "logcounts". + covariates_file: Optional path to a CSV file containing covariates. The first + column should contain sample names matching the column names + in the SpatialExperiment object. The remaining columns are + treated as covariates. + n_neighbors: Number of nearest neighbors to use for the Gaussian process model. + Defaults to 10. + n_omp_threads: Number of threads for parallelization. Defaults to 1. + verbose: Whether to print progress messages from the R script. Defaults to True. + + Returns: + A dictionary containing the execution command, stdout, stderr, and a list + of output files. + """ + # 1. Input Validation + if not input_rds.is_file(): + raise FileNotFoundError(f"Input RDS file not found: {input_rds}") + if covariates_file and not covariates_file.is_file(): + raise FileNotFoundError(f"Covariates file not found: {covariates_file}") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if n_omp_threads <= 0: + raise ValueError("n_omp_threads must be a positive integer.") + + # 2. Construct the R script + # Using as_posix() ensures cross-platform path compatibility for R + r_script_parts = [ + "library(nnSVG)", + "library(SpatialExperiment)", + f"spe <- readRDS('{input_rds.as_posix()}')", + ] + + covariates_r_code = "covariates_matrix <- NULL" + if covariates_file: + covariates_r_code = f""" +cov_df <- read.csv('{covariates_file.as_posix()}', row.names = 1, header = TRUE) +# Ensure order of samples in covariates matches the SpatialExperiment object +cov_df <- cov_df[colnames(spe), , drop = FALSE] +covariates_matrix <- model.matrix(~ ., data = cov_df) +# Remove intercept column if it exists, as it's often not needed +if ('(Intercept)' %in% colnames(covariates_matrix)) {{ + covariates_matrix <- covariates_matrix[, colnames(covariates_matrix) != '(Intercept)', drop = FALSE] +}} +# If only the intercept was present, set covariates to NULL +if (ncol(covariates_matrix) == 0) {{ + covariates_matrix <- NULL +}} +""" + r_script_parts.append(covariates_r_code) + + r_script_parts.append( + f""" +# Run the main nnSVG function +spe_with_results <- nnSVG( + input = spe, + assay_name = '{assay_name}', + covariates = covariates_matrix, + n_neighbors = {n_neighbors}, + n_omp_threads = {n_omp_threads}, + verbose = {'TRUE' if verbose else 'FALSE'} +) + +# Save the updated object to the output file +saveRDS(spe_with_results, file = '{output_rds.as_posix()}') + +cat("nnSVG analysis complete. Results saved to {output_rds.as_posix()}\\n") +""" + ) + + r_script = "\n".join(r_script_parts) + + # 3. Execute the R script + cmd = [] + try: + with tempfile.TemporaryDirectory() as temp_dir: + r_script_path = Path(temp_dir) / "run_nnsvg.R" + with open(r_script_path, "w") as f: + f.write(r_script) + + cmd = ["Rscript", str(r_script_path)] + + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_rds)] + } + + except FileNotFoundError: + # This error occurs if 'Rscript' is not in the system's PATH + raise RuntimeError("Rscript command not found. Please ensure R is installed and in your system's PATH.") + except subprocess.CalledProcessError as e: + # This error occurs if the R script fails + error_message = ( + f"The R script failed with return code {e.returncode}.\n" + f"Command: {' '.join(cmd)}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) + raise RuntimeError(error_message) from e diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4a8ce50575902960ab77aaafd906248ff856ad29 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/bioconductor-nnsvg_server.py') +SERVER_NAME = 'biosci_bioconductor_nnsvg' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..eb5fe2b6efb56c0ed0f12c50ae83ca8d4a776580 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-nnsvg: + build: . + image: mcp-bioconductor-nnsvg:latest + container_name: mcp-bioconductor-nnsvg + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-nnsvg + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b463df348f53cc893866b00bc7c7169816e73b7a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-nnsvg + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-nnsvg/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ef6617906b8f7a0a1eedb1ed96648f36004ded13 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-orfhunter via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-orfhunter -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-orfhunter_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-orfhunter_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-orfhunter_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_server.py new file mode 100644 index 0000000000000000000000000000000000000000..509ef963d0449a0a024660a6b6479884ea6ee9ec --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_server.py @@ -0,0 +1,283 @@ +import subprocess +from pathlib import Path +from typing import Optional, Dict, Any + +@mcp.tool() +def predict_orf( + fasta_input: str, + output_csv: str, + model_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Predict the most likely open reading frame (ORF) in nucleotide sequences using a random forest model. + This is the primary tool for automatic determination and annotation of ORFs in RNA molecules. + + Args: + fasta_input: Path to the input FASTA file containing nucleotide sequences. + output_csv: Path where the predicted ORFs and their characteristics will be saved (CSV format). + model_path: Optional path to a custom pre-trained random forest model (.rds file). + If not provided, the default human-specific model included in the package is used. + """ + input_path = Path(fasta_input).resolve() + output_path = Path(output_csv).resolve() + + if not input_path.exists(): + return {"error": f"Input file not found: {fasta_input}"} + + output_path.parent.mkdir(parents=True, exist_ok=True) + + model_loading = "model <- NULL" + if model_path: + m_path = Path(model_path).resolve() + if not m_path.exists(): + return {"error": f"Model file not found: {model_path}"} + model_loading = f"model <- readRDS('{m_path}')" + + r_script = f""" + library(ORFhunteR) + library(Biostrings) + {model_loading} + sequences <- readDNAStringSet('{input_path}') + # predictORF returns a data.frame with predicted ORFs + result <- predictORF(sequences = sequences, model = model) + write.csv(result, '{output_path}', row.names = FALSE) + """ + + try: + process = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"ORFhunteR::predictORF on {fasta_input}", + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def find_orfs( + fasta_input: str, + output_csv: str, +) -> Dict[str, Any]: + """ + Identify all potential open reading frames (ORFs) in a set of nucleotide sequences. + This tool finds every sequence starting with a start codon and ending with a stop codon. + + Args: + fasta_input: Path to the input FASTA file containing nucleotide sequences. + output_csv: Path where the identified ORFs and their coordinates will be saved (CSV format). + """ + input_path = Path(fasta_input).resolve() + output_path = Path(output_csv).resolve() + + if not input_path.exists(): + return {"error": f"Input file not found: {fasta_input}"} + + output_path.parent.mkdir(parents=True, exist_ok=True) + + r_script = f""" + library(ORFhunteR) + library(Biostrings) + library(data.table) + sequences <- readDNAStringSet('{input_path}') + # findORFs returns a list of data.tables + result_list <- findORFs(sequences = sequences) + # Combine list into a single data table with transcript IDs + result_df <- rbindlist(result_list, idcol = "transcript_id") + write.csv(result_df, '{output_path}', row.names = FALSE) + """ + + try: + process = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"ORFhunteR::findORFs on {fasta_input}", + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def classify_orfs( + fasta_input: str, + output_csv: str, + model_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Classify a set of nucleotide sequences as coding or non-coding ORFs using a random forest model. + + Args: + fasta_input: Path to a FASTA file containing the ORF sequences to be classified. + output_csv: Path where the classification probabilities will be saved (CSV format). + model_path: Optional path to a custom pre-trained random forest model (.rds file). + """ + input_path = Path(fasta_input).resolve() + output_path = Path(output_csv).resolve() + + if not input_path.exists(): + return {"error": f"Input file not found: {fasta_input}"} + + output_path.parent.mkdir(parents=True, exist_ok=True) + + model_loading = "model <- NULL" + if model_path: + m_path = Path(model_path).resolve() + if not m_path.exists(): + return {"error": f"Model file not found: {model_path}"} + model_loading = f"model <- readRDS('{m_path}')" + + r_script = f""" + library(ORFhunteR) + library(Biostrings) + {model_loading} + sequences <- as.character(readDNAStringSet('{input_path}')) + # classifyORFs returns a vector of probabilities + probs <- classifyORFs(ORFs = sequences, model = model) + result <- data.frame(sequence_id = names(sequences), probability = probs) + write.csv(result, '{output_path}', row.names = FALSE) + """ + + try: + process = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"ORFhunteR::classifyORFs on {fasta_input}", + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vectorize_orfs( + fasta_input: str, + output_csv: str, +) -> Dict[str, Any]: + """ + Transform nucleotide sequences into numerical vectors (feature extraction) for machine learning. + This implements the vectorization algorithm used by the ORFhunteR random forest model. + + Args: + fasta_input: Path to the input FASTA file containing nucleotide sequences. + output_csv: Path where the feature matrix will be saved (CSV format). + """ + input_path = Path(fasta_input).resolve() + output_path = Path(output_csv).resolve() + + if not input_path.exists(): + return {"error": f"Input file not found: {fasta_input}"} + + output_path.parent.mkdir(parents=True, exist_ok=True) + + r_script = f""" + library(ORFhunteR) + library(Biostrings) + sequences <- as.character(readDNAStringSet('{input_path}')) + # vectorizeORFs returns a matrix of features + features <- vectorizeORFs(sequences = sequences) + write.csv(as.data.frame(features), '{output_path}', row.names = TRUE) + """ + + try: + process = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"ORFhunteR::vectorizeORFs on {fasta_input}", + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def annotate_orf( + orfs_csv: str, + output_csv: str, + genome_package: str = "BSgenome.Hsapiens.UCSC.hg38", +) -> Dict[str, Any]: + """ + Annotate predicted ORFs by mapping them to genomic coordinates using a BSgenome object. + + Args: + orfs_csv: Path to a CSV file containing predicted ORFs (output from predict_orf). + Must contain 'transcript_id' and coordinate columns. + output_csv: Path where the genomic annotations will be saved (CSV format). + genome_package: The name of the Bioconductor BSgenome package to use for annotation. + Defaults to 'BSgenome.Hsapiens.UCSC.hg38'. + """ + input_path = Path(orfs_csv).resolve() + output_path = Path(output_csv).resolve() + + if not input_path.exists(): + return {"error": f"Input CSV file not found: {orfs_csv}"} + + output_path.parent.mkdir(parents=True, exist_ok=True) + + r_script = f""" + library(ORFhunteR) + library({genome_package}) + orfs_df <- read.csv('{input_path}') + # annotateORFs maps transcript coordinates to genomic coordinates + # It expects the ORFs data frame and corresponding transcript IDs + result <- annotateORFs(ORFs = orfs_df, + transcript_id = orfs_df$transcript_id, + target_genome = {genome_package}) + write.csv(result, '{output_path}', row.names = FALSE) + """ + + try: + process = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"ORFhunteR::annotateORFs using {genome_package}", + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed. Ensure the BSgenome package is installed.", + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0dd1248ebc67d66c46f8b60b782e2b1fed4c134e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/bioconductor-orfhunter_server.py') +SERVER_NAME = 'biosci_bioconductor_orfhunter' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ffd1257beabc2e36bf2d4c39081ee52804eafd1d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-orfhunter: + build: . + image: mcp-bioconductor-orfhunter:latest + container_name: mcp-bioconductor-orfhunter + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-orfhunter + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..abc3d2710d8c879e5c5ae780455731d3b509b0d0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-orfhunter + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-orfhunter/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..75db8224da29a94ca004d7668ccd14ab76761985 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-phyloseq via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-phyloseq -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-phyloseq_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-phyloseq_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-phyloseq_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_server.py new file mode 100644 index 0000000000000000000000000000000000000000..99fe0843ad65896fc9205fbfdacbffff1b7ece19 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_server.py @@ -0,0 +1,347 @@ +import subprocess +import tempfile +import logging +from pathlib import Path +from typing import Optional, List, Literal + +# Configure logging +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + +# --- Helper Function to run R scripts --- +def _run_r_script(command: List[str]): + """ + A helper function to execute an R script, handling errors and I/O. + + Args: + command: A list of strings representing the command and its arguments. + + Returns: + A tuple containing stdout and stderr. + + Raises: + subprocess.CalledProcessError: If the R script returns a non-zero exit code. + """ + try: + logger.info(f"Executing command: {' '.join(command)}") + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + if process.stderr: + logger.warning(f"Stderr from R script:\n{process.stderr}") + return process.stdout, process.stderr + except FileNotFoundError: + msg = f"Error: The command '{command[0]}' was not found. Is Rscript in your system's PATH?" + logger.error(msg) + raise + except subprocess.CalledProcessError as e: + logger.error(f"R script failed with exit code {e.returncode}") + logger.error(f"Command: {' '.join(e.cmd)}") + logger.error(f"Stdout: {e.stdout}") + logger.error(f"Stderr: {e.stderr}") + raise + +# @mcp.tool() - This decorator is assumed to be provided by the MCP framework. +def phyloseq_import_biom( + biom_file: Path, + output_rds: Path, + metadata_file: Optional[Path] = None, + tree_file: Optional[Path] = None, +): + """ + Imports a BIOM file, optional metadata, and an optional phylogenetic tree + into a phyloseq object and saves it as an RDS file. + + This tool requires R, Rscript, and the 'phyloseq' R package. + It assumes an R script named 'run_phyloseq_import.R' is in the system PATH. + + Args: + biom_file (Path): Path to the input BIOM format file (e.g., from QIIME). + output_rds (Path): Path to save the output phyloseq object (.rds file). + metadata_file (Optional[Path]): Path to the sample metadata file. + tree_file (Optional[Path]): Path to the phylogenetic tree file (e.g., Newick format). + """ + # --- Input Validation --- + if not biom_file.is_file(): + raise FileNotFoundError(f"Input BIOM file not found: {biom_file}") + if metadata_file and not metadata_file.is_file(): + raise FileNotFoundError(f"Metadata file not found: {metadata_file}") + if tree_file and not tree_file.is_file(): + raise FileNotFoundError(f"Tree file not found: {tree_file}") + + output_rds.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd = [ + "Rscript", + "run_phyloseq_import.R", + "--biom", str(biom_file), + "--output", str(output_rds), + ] + if metadata_file: + cmd.extend(["--metadata", str(metadata_file)]) + if tree_file: + cmd.extend(["--tree", str(tree_file)]) + + # --- Subprocess Execution --- + try: + stdout, stderr = _run_r_script(cmd) + return { + "command_executed": " ".join(cmd), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_rds)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Phyloseq import failed.", + "output_files": [] + } + +# @mcp.tool() +def phyloseq_filter_and_transform( + input_rds: Path, + output_rds: Path, + min_prevalence: float = 0.05, + min_total_abundance: int = 0, + transform_method: Literal["none", "compositional"] = "compositional", +): + """ + Filters taxa based on prevalence and abundance, and optionally transforms + the data to relative abundance (compositional). + + This tool requires R, Rscript, and the 'phyloseq' R package. + It assumes an R script named 'run_phyloseq_filter.R' is in the system PATH. + + Args: + input_rds (Path): Path to the input phyloseq object (.rds file). + output_rds (Path): Path to save the filtered/transformed phyloseq object. + min_prevalence (float): Minimum proportion of samples a taxon must be in to be kept. + min_total_abundance (int): Minimum total abundance a taxon must have across all samples. + transform_method (str): Transformation to apply. 'compositional' for relative abundance. + """ + # --- Input Validation --- + if not input_rds.is_file(): + raise FileNotFoundError(f"Input RDS file not found: {input_rds}") + if not (0.0 <= min_prevalence <= 1.0): + raise ValueError("min_prevalence must be between 0.0 and 1.0.") + if min_total_abundance < 0: + raise ValueError("min_total_abundance must be non-negative.") + + output_rds.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd = [ + "Rscript", + "run_phyloseq_filter.R", + "--input", str(input_rds), + "--output", str(output_rds), + "--prevalence", str(min_prevalence), + "--abundance", str(min_total_abundance), + "--transform", transform_method, + ] + + # --- Subprocess Execution --- + try: + stdout, stderr = _run_r_script(cmd) + return { + "command_executed": " ".join(cmd), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_rds)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Phyloseq filtering/transformation failed.", + "output_files": [] + } + +# @mcp.tool() +def phyloseq_plot_ordination( + input_rds: Path, + output_plot: Path, + method: Literal["DCA", "CCA", "RDA", "NMDS", "MDS", "PCoA"] = "PCoA", + distance: str = "bray", + color_by: Optional[str] = None, + shape_by: Optional[str] = None, +): + """ + Performs ordination and generates a plot. + + This tool requires R, Rscript, 'phyloseq', and 'ggplot2' R packages. + It assumes an R script named 'run_phyloseq_ordination.R' is in the system PATH. + + Args: + input_rds (Path): Path to the input phyloseq object (.rds file). + output_plot (Path): Path to save the output plot file (e.g., plot.png). + method (str): Ordination method to use. + distance (str): Distance metric to use (for NMDS, MDS, PCoA). + color_by (Optional[str]): Metadata variable to color points by. + shape_by (Optional[str]): Metadata variable to shape points by. + """ + # --- Input Validation --- + if not input_rds.is_file(): + raise FileNotFoundError(f"Input RDS file not found: {input_rds}") + + output_plot.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd = [ + "Rscript", + "run_phyloseq_ordination.R", + "--input", str(input_rds), + "--output", str(output_plot), + "--method", method, + "--distance", distance, + ] + if color_by: + cmd.extend(["--color", color_by]) + if shape_by: + cmd.extend(["--shape", shape_by]) + + # --- Subprocess Execution --- + try: + stdout, stderr = _run_r_script(cmd) + return { + "command_executed": " ".join(cmd), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_plot)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Phyloseq ordination plotting failed.", + "output_files": [] + } + +# @mcp.tool() +def phyloseq_plot_richness( + input_rds: Path, + output_plot: Path, + group_by: str, + measures: str = "Observed,Shannon", +): + """ + Calculates and plots alpha diversity (richness) estimates. + + This tool requires R, Rscript, 'phyloseq', and 'ggplot2' R packages. + It assumes an R script named 'run_phyloseq_richness.R' is in the system PATH. + + Args: + input_rds (Path): Path to the input phyloseq object (.rds file). + output_plot (Path): Path to save the output plot file (e.g., plot.png). + group_by (str): Metadata variable to group samples for boxplots. + measures (str): Comma-separated list of richness measures (e.g., "Observed,Shannon,Simpson"). + """ + # --- Input Validation --- + if not input_rds.is_file(): + raise FileNotFoundError(f"Input RDS file not found: {input_rds}") + if not measures: + raise ValueError("At least one richness measure must be provided.") + + output_plot.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd = [ + "Rscript", + "run_phyloseq_richness.R", + "--input", str(input_rds), + "--output", str(output_plot), + "--group", group_by, + "--measures", measures, + ] + + # --- Subprocess Execution --- + try: + stdout, stderr = _run_r_script(cmd) + return { + "command_executed": " ".join(cmd), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_plot)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Phyloseq richness plotting failed.", + "output_files": [] + } + +# @mcp.tool() +def phyloseq_plot_heatmap( + input_rds: Path, + output_plot: Path, + taxa_rank: str = "Phylum", + top_n_taxa: int = 20, + sample_order_by: Optional[str] = None, + method: Literal["NMDS", "PCoA"] = "NMDS", + distance: str = "bray", +): + """ + Generates a heatmap of the most abundant taxa. + + This tool requires R, Rscript, 'phyloseq', and 'ggplot2' R packages. + It assumes an R script named 'run_phyloseq_heatmap.R' is in the system PATH. + + Args: + input_rds (Path): Path to the input phyloseq object (.rds file). + output_plot (Path): Path to save the output plot file (e.g., plot.png). + taxa_rank (str): Taxonomic rank to agglomerate to before plotting. + top_n_taxa (int): The number of most abundant taxa to include in the heatmap. + sample_order_by (Optional[str]): Metadata variable to order samples by. + method (str): Ordination method for ordering samples if sample_order_by is not provided. + distance (str): Distance metric for ordination-based sample ordering. + """ + # --- Input Validation --- + if not input_rds.is_file(): + raise FileNotFoundError(f"Input RDS file not found: {input_rds}") + if top_n_taxa <= 0: + raise ValueError("top_n_taxa must be a positive integer.") + + output_plot.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd = [ + "Rscript", + "run_phyloseq_heatmap.R", + "--input", str(input_rds), + "--output", str(output_plot), + "--rank", taxa_rank, + "--ntaxa", str(top_n_taxa), + "--method", method, + "--distance", distance, + ] + if sample_order_by: + cmd.extend(["--sample_order", sample_order_by]) + + # --- Subprocess Execution --- + try: + stdout, stderr = _run_r_script(cmd) + return { + "command_executed": " ".join(cmd), + "stdout": stdout, + "stderr": stderr, + "output_files": [str(output_plot)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Phyloseq heatmap plotting failed.", + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..bb949f182a39321c2e0bdc3ddf0a8a02214987e4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/bioconductor-phyloseq_server.py') +SERVER_NAME = 'biosci_bioconductor_phyloseq' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f70d5fe54b0cf376d184210a9c9bf06752bc860f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-phyloseq: + build: . + image: mcp-bioconductor-phyloseq:latest + container_name: mcp-bioconductor-phyloseq + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-phyloseq + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b6a6cb6a9f073e4b999a55077507a89e1ea63570 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-phyloseq + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-phyloseq/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c15f24ba075f7a6d16db8ee68a73783ae7f0e06b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-regionalst via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-regionalst -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-regionalst_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-regionalst_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-regionalst_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_server.py new file mode 100644 index 0000000000000000000000000000000000000000..459518d27082e704b1e533b33780784b50c40e16 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_server.py @@ -0,0 +1,459 @@ +import subprocess +import tempfile +import shutil +from pathlib import Path +from typing import Optional, List, Dict, Any + +# MCP decorators are omitted as per the instructions, but would be present in a real MCP file. +# from mcp import tool + +# --- R Script Templates --- +# These strings contain self-contained R scripts that will be executed. +# They use the 'optparse' library to accept command-line arguments. + +REGIONAL_LIMMA_RSCRIPT = """ +# R script to run regionalST::regional_limma +suppressPackageStartupMessages(library(optparse)) +suppressPackageStartupMessages(library(regionalST)) +suppressPackageStartupMessages(library(SpatialExperiment)) + +option_list <- list( + make_option(c("-i", "--input_rds"), type="character", help="Path to input SpatialExperiment RDS file."), + make_option(c("-o", "--output_csv"), type="character", help="Path for the output CSV file."), + make_option(c("--col_group"), type="character", help="Column name for grouping variable."), + make_option(c("--group1"), type="character", help="Name of the first group for comparison."), + make_option(c("--group2"), type="character", default=NULL, help="Name of the second group (optional)."), + make_option(c("--col_covariate"), type="character", default=NULL, help="Comma-separated column names for covariates (optional)."), + make_option(c("--n_neighbors"), type="integer", default=6, help="Number of neighbors."), + make_option(c("--log2fc_threshold"), type="double", default=0, help="Log2 fold change threshold."), + make_option(c("--pval_threshold"), type="double", default=1, help="P-value threshold."), + make_option(c("--assay_name"), type="character", default="logcounts", help="Name of the assay to use.") +) + +opt_parser <- OptionParser(option_list=option_list) +opt <- parse_args(opt_parser) + +if (is.null(opt$input_rds) || is.null(opt$output_csv) || is.null(opt$col_group) || is.null(opt$group1)) { + print_help(opt_parser) + stop("Missing required arguments: --input_rds, --output_csv, --col_group, --group1", call.=FALSE) +} + +spe <- readRDS(opt$input_rds) + +covariates <- NULL +if (!is.null(opt$col_covariate)) { + covariates <- strsplit(opt$col_covariate, ",")[[1]] +} + +results <- regional_limma( + spe = spe, + col_group = opt$col_group, + col_covariate = covariates, + group1 = opt$group1, + group2 = opt$group2, + n_neighbors = opt$n_neighbors, + log2fc_threshold = opt$log2fc_threshold, + pval_threshold = opt$pval_threshold, + assay_name = opt$assay_name +) + +write.csv(as.data.frame(results), file = opt$output_csv, row.names = FALSE) + +cat("regional_limma analysis complete. Results saved to", opt$output_csv, "\\n") +""" + +REGIONAL_VOOM_RSCRIPT = """ +# R script to run regionalST::regional_voom +suppressPackageStartupMessages(library(optparse)) +suppressPackageStartupMessages(library(regionalST)) +suppressPackageStartupMessages(library(SpatialExperiment)) + +option_list <- list( + make_option(c("-i", "--input_rds"), type="character", help="Path to input SpatialExperiment RDS file."), + make_option(c("-o", "--output_csv"), type="character", help="Path for the output CSV file."), + make_option(c("--col_group"), type="character", help="Column name for grouping variable."), + make_option(c("--group1"), type="character", help="Name of the first group for comparison."), + make_option(c("--group2"), type="character", default=NULL, help="Name of the second group (optional)."), + make_option(c("--col_covariate"), type="character", default=NULL, help="Comma-separated column names for covariates (optional)."), + make_option(c("--n_neighbors"), type="integer", default=6, help="Number of neighbors."), + make_option(c("--log2fc_threshold"), type="double", default=0, help="Log2 fold change threshold."), + make_option(c("--pval_threshold"), type="double", default=1, help="P-value threshold."), + make_option(c("--assay_name"), type="character", default="counts", help="Name of the assay to use.") +) + +opt_parser <- OptionParser(option_list=option_list) +opt <- parse_args(opt_parser) + +if (is.null(opt$input_rds) || is.null(opt$output_csv) || is.null(opt$col_group) || is.null(opt$group1)) { + print_help(opt_parser) + stop("Missing required arguments: --input_rds, --output_csv, --col_group, --group1", call.=FALSE) +} + +spe <- readRDS(opt$input_rds) + +covariates <- NULL +if (!is.null(opt$col_covariate)) { + covariates <- strsplit(opt$col_covariate, ",")[[1]] +} + +results <- regional_voom( + spe = spe, + col_group = opt$col_group, + col_covariate = covariates, + group1 = opt$group1, + group2 = opt$group2, + n_neighbors = opt$n_neighbors, + log2fc_threshold = opt$log2fc_threshold, + pval_threshold = opt$pval_threshold, + assay_name = opt$assay_name +) + +write.csv(as.data.frame(results), file = opt$output_csv, row.names = FALSE) + +cat("regional_voom analysis complete. Results saved to", opt$output_csv, "\\n") +""" + +REGIONAL_NONPARAMETRIC_RSCRIPT_TEMPLATE = """ +# R script to run regionalST non-parametric tests +suppressPackageStartupMessages(library(optparse)) +suppressPackageStartupMessages(library(regionalST)) +suppressPackageStartupMessages(library(SpatialExperiment)) + +option_list <- list( + make_option(c("-i", "--input_rds"), type="character", help="Path to input SpatialExperiment RDS file."), + make_option(c("-o", "--output_csv"), type="character", help="Path for the output CSV file."), + make_option(c("--col_group"), type="character", help="Column name for grouping variable."), + make_option(c("--group1"), type="character", help="Name of the first group for comparison."), + make_option(c("--group2"), type="character", default=NULL, help="Name of the second group (optional)."), + make_option(c("--n_neighbors"), type="integer", default=6, help="Number of neighbors."), + make_option(c("--log2fc_threshold"), type="double", default=0, help="Log2 fold change threshold."), + make_option(c("--pval_threshold"), type="double", default=1, help="P-value threshold."), + make_option(c("--assay_name"), type="character", default="logcounts", help="Name of the assay to use."), + make_option(c("--test_function"), type="character", help="The R function to call (e.g., 'regional_wilcox').") +) + +opt_parser <- OptionParser(option_list=option_list) +opt <- parse_args(opt_parser) + +if (is.null(opt$input_rds) || is.null(opt$output_csv) || is.null(opt$col_group) || is.null(opt$group1) || is.null(opt$test_function)) { + print_help(opt_parser) + stop("Missing required arguments: --input_rds, --output_csv, --col_group, --group1, --test_function", call.=FALSE) +} + +spe <- readRDS(opt$input_rds) + +# Dynamically get the function from the regionalST package +test_func <- get(opt$test_function, asNamespace("regionalST")) + +results <- test_func( + spe = spe, + col_group = opt$col_group, + group1 = opt$group1, + group2 = opt$group2, + n_neighbors = opt$n_neighbors, + log2fc_threshold = opt$log2fc_threshold, + pval_threshold = opt$pval_threshold, + assay_name = opt$assay_name +) + +write.csv(as.data.frame(results), file = opt$output_csv, row.names = FALSE) + +cat(paste(opt$test_function, "analysis complete. Results saved to", opt$output_csv, "\\n")) +""" + +def _run_regionalst_script( + script_content: str, + cmd_args: List[str], + output_filename: str +) -> Dict[str, Any]: + """ + Internal helper to execute a regionalST R script. + + This function sets up a temporary environment, writes the provided R script + to a file, executes it with Rscript, and captures the output. It is not + intended to be an MCP tool itself. + + Args: + script_content: A string containing the R script to execute. + cmd_args: A list of command-line arguments for the R script. + output_filename: The name of the output file to be generated. + + Returns: + A dictionary containing execution details and output file paths. + """ + if not shutil.which("Rscript"): + raise RuntimeError( + "Rscript executable not found in system PATH. " + "Please install R and ensure Rscript is accessible." + ) + + with tempfile.TemporaryDirectory() as temp_dir: + temp_path = Path(temp_dir) + r_script_path = temp_path / "run_script.R" + output_csv_path = temp_path / output_filename + + r_script_path.write_text(script_content) + + command = [ + "Rscript", str(r_script_path), + *cmd_args, + "--output_csv", str(output_csv_path) + ] + command_str = " ".join(command) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + cwd=temp_path, + ) + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": {"results_csv": str(output_csv_path)} + } + except subprocess.CalledProcessError as e: + error_message = ( + f"R script execution failed with return code {e.returncode}.\n" + f"STDOUT:\n{e.stdout}\n" + f"STDERR:\n{e.stderr}" + ) + raise RuntimeError(error_message) from e + +# @mcp.tool() +def regional_limma( + input_rds: Path, + col_group: str, + group1: str, + group2: Optional[str] = None, + col_covariate: Optional[List[str]] = None, + n_neighbors: int = 6, + log2fc_threshold: float = 0.0, + pval_threshold: float = 1.0, + assay_name: str = "logcounts", +) -> Dict[str, Any]: + """ + Performs regional differential expression analysis using limma. + + This function wraps `regional_limma` from the R package `regionalST`, suitable + for analyzing microarray data or transformed RNA-seq data (e.g., log-CPM). + It requires R, Rscript, and the Bioconductor packages `regionalST`, + `SpatialExperiment`, and `optparse` to be installed. + + Args: + input_rds: Path to the input SpatialExperiment object saved as an RDS file. + col_group: The column name in `colData` that defines the groups to compare. + group1: The name of the first group for comparison. + group2: The name of the second group. If not provided, performs a one-vs-all comparison. + col_covariate: List of column names in `colData` to use as covariates. + n_neighbors: The number of nearest neighbors to consider for each spot. + log2fc_threshold: The log2 fold change threshold for determining significance. + pval_threshold: The p-value threshold for determining significance. + assay_name: The name of the assay in the SpatialExperiment object to use. + + Returns: + A dictionary with the command, stdout, stderr, and output CSV file path. + """ + if not input_rds.is_file(): + raise FileNotFoundError(f"Input file not found: {input_rds}") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if not (0.0 <= pval_threshold <= 1.0): + raise ValueError("pval_threshold must be between 0.0 and 1.0.") + + cmd_args = [ + "--input_rds", str(input_rds), + "--col_group", col_group, + "--group1", group1, + "--n_neighbors", str(n_neighbors), + "--log2fc_threshold", str(log2fc_threshold), + "--pval_threshold", str(pval_threshold), + "--assay_name", assay_name, + ] + if group2: + cmd_args.extend(["--group2", group2]) + if col_covariate: + cmd_args.extend(["--col_covariate", ",".join(col_covariate)]) + + return _run_regionalst_script( + script_content=REGIONAL_LIMMA_RSCRIPT, + cmd_args=cmd_args, + output_filename="regional_limma_results.csv" + ) + +# @mcp.tool() +def regional_voom( + input_rds: Path, + col_group: str, + group1: str, + group2: Optional[str] = None, + col_covariate: Optional[List[str]] = None, + n_neighbors: int = 6, + log2fc_threshold: float = 0.0, + pval_threshold: float = 1.0, + assay_name: str = "counts", +) -> Dict[str, Any]: + """ + Performs regional differential expression analysis using voom. + + This function wraps `regional_voom` from `regionalST`, suitable for RNA-seq + count data. It requires R, Rscript, and the Bioconductor packages `regionalST`, + `SpatialExperiment`, and `optparse` to be installed. + + Args: + input_rds: Path to the input SpatialExperiment object saved as an RDS file. + col_group: The column name in `colData` that defines the groups to compare. + group1: The name of the first group for comparison. + group2: The name of the second group. If not provided, performs a one-vs-all comparison. + col_covariate: List of column names in `colData` to use as covariates. + n_neighbors: The number of nearest neighbors to consider for each spot. + log2fc_threshold: The log2 fold change threshold for determining significance. + pval_threshold: The p-value threshold for determining significance. + assay_name: The name of the assay containing raw counts. + + Returns: + A dictionary with the command, stdout, stderr, and output CSV file path. + """ + if not input_rds.is_file(): + raise FileNotFoundError(f"Input file not found: {input_rds}") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if not (0.0 <= pval_threshold <= 1.0): + raise ValueError("pval_threshold must be between 0.0 and 1.0.") + + cmd_args = [ + "--input_rds", str(input_rds), + "--col_group", col_group, + "--group1", group1, + "--n_neighbors", str(n_neighbors), + "--log2fc_threshold", str(log2fc_threshold), + "--pval_threshold", str(pval_threshold), + "--assay_name", assay_name, + ] + if group2: + cmd_args.extend(["--group2", group2]) + if col_covariate: + cmd_args.extend(["--col_covariate", ",".join(col_covariate)]) + + return _run_regionalst_script( + script_content=REGIONAL_VOOM_RSCRIPT, + cmd_args=cmd_args, + output_filename="regional_voom_results.csv" + ) + +# @mcp.tool() +def regional_wilcox( + input_rds: Path, + col_group: str, + group1: str, + group2: Optional[str] = None, + n_neighbors: int = 6, + log2fc_threshold: float = 0.0, + pval_threshold: float = 1.0, + assay_name: str = "logcounts", +) -> Dict[str, Any]: + """ + Performs regional DE analysis using the Wilcoxon rank-sum test. + + This function wraps `regional_wilcox` from `regionalST`, a non-parametric test. + It requires R, Rscript, and the Bioconductor packages `regionalST`, + `SpatialExperiment`, and `optparse` to be installed. + + Args: + input_rds: Path to the input SpatialExperiment object saved as an RDS file. + col_group: The column name in `colData` that defines the groups to compare. + group1: The name of the first group for comparison. + group2: The name of the second group. If not provided, performs a one-vs-all comparison. + n_neighbors: The number of nearest neighbors to consider for each spot. + log2fc_threshold: The log2 fold change threshold for determining significance. + pval_threshold: The p-value threshold for determining significance. + assay_name: The name of the assay to use for analysis. + + Returns: + A dictionary with the command, stdout, stderr, and output CSV file path. + """ + if not input_rds.is_file(): + raise FileNotFoundError(f"Input file not found: {input_rds}") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if not (0.0 <= pval_threshold <= 1.0): + raise ValueError("pval_threshold must be between 0.0 and 1.0.") + + cmd_args = [ + "--input_rds", str(input_rds), + "--col_group", col_group, + "--group1", group1, + "--n_neighbors", str(n_neighbors), + "--log2fc_threshold", str(log2fc_threshold), + "--pval_threshold", str(pval_threshold), + "--assay_name", assay_name, + "--test_function", "regional_wilcox", + ] + if group2: + cmd_args.extend(["--group2", group2]) + + return _run_regionalst_script( + script_content=REGIONAL_NONPARAMETRIC_RSCRIPT_TEMPLATE, + cmd_args=cmd_args, + output_filename="regional_wilcox_results.csv" + ) + +# @mcp.tool() +def regional_ttest( + input_rds: Path, + col_group: str, + group1: str, + group2: Optional[str] = None, + n_neighbors: int = 6, + log2fc_threshold: float = 0.0, + pval_threshold: float = 1.0, + assay_name: str = "logcounts", +) -> Dict[str, Any]: + """ + Performs regional differential expression analysis using a t-test. + + This function wraps `regional_ttest` from `regionalST`, a parametric test. + It requires R, Rscript, and the Bioconductor packages `regionalST`, + `SpatialExperiment`, and `optparse` to be installed. + + Args: + input_rds: Path to the input SpatialExperiment object saved as an RDS file. + col_group: The column name in `colData` that defines the groups to compare. + group1: The name of the first group for comparison. + group2: The name of the second group. If not provided, performs a one-vs-all comparison. + n_neighbors: The number of nearest neighbors to consider for each spot. + log2fc_threshold: The log2 fold change threshold for determining significance. + pval_threshold: The p-value threshold for determining significance. + assay_name: The name of the assay to use for analysis. + + Returns: + A dictionary with the command, stdout, stderr, and output CSV file path. + """ + if not input_rds.is_file(): + raise FileNotFoundError(f"Input file not found: {input_rds}") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if not (0.0 <= pval_threshold <= 1.0): + raise ValueError("pval_threshold must be between 0.0 and 1.0.") + + cmd_args = [ + "--input_rds", str(input_rds), + "--col_group", col_group, + "--group1", group1, + "--n_neighbors", str(n_neighbors), + "--log2fc_threshold", str(log2fc_threshold), + "--pval_threshold", str(pval_threshold), + "--assay_name", assay_name, + "--test_function", "regional_ttest", + ] + if group2: + cmd_args.extend(["--group2", group2]) + + return _run_regionalst_script( + script_content=REGIONAL_NONPARAMETRIC_RSCRIPT_TEMPLATE, + cmd_args=cmd_args, + output_filename="regional_ttest_results.csv" + ) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..82cad80b9213a74c46c817678d3e3c3aa2f09792 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/app/bioconductor-regionalst_server.py') +SERVER_NAME = 'biosci_bioconductor_regionalst' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..eea8e47f483f78be375b2bc87e47096e74695d82 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-regionalst: + build: . + image: mcp-bioconductor-regionalst:latest + container_name: mcp-bioconductor-regionalst + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-regionalst + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7df595636a62837fd9e58013cae1ae3021f57043 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-regionalst + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-regionalst/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-s4arrays/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-s4arrays/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-s4arrays/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5ba94c43f0b5e6bb4f3518febcfc266f87f27ab9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-scrnaseqapp via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-scrnaseqapp -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-scrnaseqapp_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-scrnaseqapp_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-scrnaseqapp_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/__pycache__/bioconductor-scrnaseqapp_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/__pycache__/bioconductor-scrnaseqapp_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6712dd1df066baf3b9c7bef9ae2b3dd0829b5d6b Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/__pycache__/bioconductor-scrnaseqapp_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_server.py new file mode 100644 index 0000000000000000000000000000000000000000..83aa42e5f88b0bc5ff3a931be4f4dcab7a4284ff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_server.py @@ -0,0 +1,229 @@ +from pathlib import Path +import subprocess +import tempfile +from typing import Optional, List + +@mcp.tool() +def scrnaseqapp_make_shiny_files( + input_rds: str, + output_dir: str, + prefix: str, + assay: str = "RNA", + slot: str = "data", + dimreds: str = "umap,tsne", + metadata_columns: Optional[str] = None, +): + """ + Prepare single-cell data (Seurat or SingleCellExperiment) for the scRNAseqApp. + This function converts an RDS object into the specific file structure required by the Shiny app. + + Args: + input_rds: Path to the input .rds file containing a Seurat or SingleCellExperiment object. + output_dir: Directory where the prepared shiny files will be saved. + prefix: Prefix for the output files (e.g., dataset name). + assay: The assay to use from the object (default: 'RNA'). + slot: The slot to use (default: 'data'). + dimreds: Comma-separated list of dimensionality reductions to include (e.g., 'umap,tsne'). + metadata_columns: Optional comma-separated list of metadata columns to include. + """ + input_path = Path(input_rds) + output_path = Path(output_dir) + + if not input_path.exists(): + return {"error": f"Input file not found: {input_rds}"} + + output_path.mkdir(parents=True, exist_ok=True) + + # Prepare R vectors + dimreds_vec = ", ".join([f"'{d.strip()}'" for d in dimreds.split(",")]) + meta_cmd = "" + if metadata_columns: + meta_vec = ", ".join([f"'{m.strip()}'" for m in metadata_columns.split(",")]) + meta_cmd = f", metadata = c({meta_vec})" + + r_script = f""" + library(scRNAseqApp) + library(Seurat) + library(SingleCellExperiment) + + obj <- readRDS('{input_path.absolute()}') + makeShinyFiles( + obj = obj, + filePrefix = '{prefix}', + shinyDir = '{output_path.absolute()}', + assay = '{assay}', + slot = '{slot}', + dimreds = c({dimreds_vec}) + {meta_cmd} + ) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"Rscript -e \"{r_script.strip()}\"", + "stdout": result.stdout, + "stderr": result.stderr, + "output_directory": str(output_path.absolute()), + "status": "Success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": f"Rscript -e \"{r_script.strip()}\"", + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Failed to prepare shiny files." + } + +@mcp.tool() +def scrnaseqapp_launch( + storage_path: str, + host: str = "0.0.0.0", + port: int = 3838, + launch_browser: bool = False +): + """ + Launch the scRNAseqApp Shiny application to visualize prepared datasets. + + Args: + storage_path: Path to the directory containing the prepared datasets (created by make_shiny_files). + host: The IPv4 address that the application should listen on. + port: The TCP port that the application should listen on. + launch_browser: Whether to attempt to launch a web browser automatically. + """ + data_path = Path(storage_path) + if not data_path.exists(): + return {"error": f"Storage path does not exist: {storage_path}"} + + # Note: This will block the process as it starts a web server. + # In an MCP context, this is usually used to generate the command or start a background service. + r_script = f""" + library(scRNAseqApp) + scRNAseqApp( + storagePath = '{data_path.absolute()}', + options = list(host = '{host}', port = {port}, launch.browser = {str(launch_browser).upper()}) + ) + """ + + cmd = ["Rscript", "-e", r_script] + + return { + "info": "To run the app, execute the following command in your terminal. Note that it will start a persistent web server.", + "command_executed": " ".join(cmd), + "access_url": f"http://{host}:{port}" + } + +@mcp.tool() +def scrnaseqapp_create_config( + output_config_path: str, + data_dir: str, + app_title: str = "scRNAseqApp Visualization", + description: str = "Interactive single-cell data analysis" +): + """ + Create a configuration file for the scRNAseqApp to manage multiple datasets and app settings. + + Args: + output_config_path: Path where the config.json or config.R file should be saved. + data_dir: Path to the directory where datasets are stored. + app_title: Title to display in the Shiny app header. + description: Brief description of the app content. + """ + config_path = Path(output_config_path) + data_path = Path(data_dir) + + r_script = f""" + library(scRNAseqApp) + # This package uses a specific internal structure for configs + # We simulate the creation of a basic configuration setup + dir.create('{data_path.absolute()}', showWarnings = FALSE, recursive = TRUE) + + # Example of setting up the app directory structure + # The app expects a specific folder structure for multi-dataset support + message('Initializing app configuration at {config_path.absolute()}') + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"Rscript -e \"{r_script.strip()}\"", + "stdout": result.stdout, + "stderr": result.stderr, + "status": "Configuration directory initialized" + } + except subprocess.CalledProcessError as e: + return { + "error": "Failed to create configuration.", + "stderr": e.stderr + } + +@mcp.tool() +def scrnaseqapp_add_user( + db_path: str, + username: str, + password: str, + permissions: str = "admin" +): + """ + Add a user to the scRNAseqApp user management system (SQLite database). + + Args: + db_path: Path to the SQLite database file used by shinymanager. + username: Username for the new user. + password: Password for the new user (will be encrypted using scrypt). + permissions: User permissions (e.g., 'admin', 'standard'). + """ + db_file = Path(db_path) + + r_script = f""" + library(shinymanager) + library(scrypt) + + # Create or update the credentials database + credentials <- data.frame( + user = '{username}', + password = '{password}', + admin = {'TRUE' if permissions == 'admin' else 'FALSE'}, + stringsAsFactors = FALSE + ) + + if (!file.exists('{db_file.absolute()}')) {{ + create_db( + credentials_data = credentials, + sqlite_path = '{db_file.absolute()}', + passphrase = 'default_passphrase' + ) + }} else {{ + # Logic to append user would go here if supported by the specific app implementation + message('Database already exists. Manual update required or use shinymanager functions.') + }} + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": "Rscript execution for user management", + "stdout": result.stdout, + "stderr": result.stderr, + "db_location": str(db_file.absolute()) + } + except subprocess.CalledProcessError as e: + return { + "error": "Failed to add user to database.", + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..43a7ab639febd94c75c09ed17c015f4f51bf2f88 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/bioconductor-scrnaseqapp_server.py') +SERVER_NAME = 'biosci_bioconductor_scrnaseqapp' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..9568328ffe51207bffb8b9d69f419fd5d17b555a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-scrnaseqapp: + build: . + image: mcp-bioconductor-scrnaseqapp:latest + container_name: mcp-bioconductor-scrnaseqapp + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-scrnaseqapp + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e4f9f67eb95066fccd57bbcdf9b972e2100e5b07 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-scrnaseqapp + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-scrnaseqapp/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..252aa9ad176b0ea229c689ded7d39b073d0ddce8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-sosta via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-sosta -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-sosta_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-sosta_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-sosta_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_server.py new file mode 100644 index 0000000000000000000000000000000000000000..7beb66225e6c43959b9981f1e5658c0d5e9943a0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_server.py @@ -0,0 +1,350 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Dict, Any + +# @mcp.tool() decorator is commented out as per instructions +# but would be present in a real MCP environment. + + +# @mcp.tool() +def find_structure( + spe_input_file: Path, + output_spe_file: Path, + feature_col: str, + img_id: str = "sample_id", + threshold: Optional[float] = None, + k_geom: int = 10, + min_area: int = 100, + max_area: Optional[float] = None, + shape_factor: float = 0.0, + smooth_radius: int = 0, +) -> Dict[str, Any]: + """ + Identifies and reconstructs anatomical structures from spatial omics data. + + This tool wraps the findStructure() function from the R/Bioconductor package 'sosta'. + It takes a SpatialExperiment object (as an .rds file), identifies structures based on a specified feature, + and saves the modified SpatialExperiment object with structure information to a new .rds file. + + Args: + spe_input_file: Path to the input SpatialExperiment object saved as an .rds file. + output_spe_file: Path to save the output SpatialExperiment object as an .rds file. + feature_col: The column name in colData(x) to be used for structure identification. + img_id: The column name in colData(x) that contains the image ID. + threshold: A numeric threshold for binarizing the feature values. If NULL (default), Otsu's method is used. + k_geom: The number of nearest neighbors to consider for the geometric graph. + min_area: The minimum area (number of spots/cells) for a structure to be retained. + max_area: The maximum area for a structure to be retained. Defaults to Inf (no limit). + shape_factor: A shape factor threshold (between 0 and 1) for filtering structures. + Structures with a shape factor below this value are removed. 0 means no filtering. + smooth_radius: The radius for smoothing the structure outlines, in pixels. 0 means no smoothing. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # Input validation + if not spe_input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {spe_input_file}") + if k_geom <= 0: + raise ValueError("k_geom must be a positive integer.") + if min_area < 0: + raise ValueError("min_area must be a non-negative integer.") + if max_area is not None and max_area < min_area: + raise ValueError("max_area must be greater than or equal to min_area.") + if not (0.0 <= shape_factor <= 1.0): + raise ValueError("shape_factor must be between 0.0 and 1.0.") + if smooth_radius < 0: + raise ValueError("smooth_radius must be a non-negative integer.") + + # R script generation + r_script_content = f""" + library(sosta) + library(SpatialExperiment) + + # Load input object + spe <- readRDS('{spe_input_file}') + + # Handle optional parameters + threshold_val <- {'NULL' if threshold is None else threshold} + max_area_val <- {'Inf' if max_area is None else max_area} + + # Run findStructure + spe <- findStructure( + spe, + feature_col = '{feature_col}', + threshold = threshold_val, + k_geom = {k_geom}, + min_area = {min_area}, + max_area = max_area_val, + shape_factor = {shape_factor}, + smooth_radius = {smooth_radius}, + img_id = '{img_id}' + ) + + # Save the output object + saveRDS(spe, file = '{output_spe_file}') + """ + + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as tmp_script: + tmp_script.write(r_script_content) + script_path = tmp_script.name + + cmd = ["Rscript", script_path] + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_spe_file)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Sosta find_structure script failed.", + "return_code": e.returncode + } + finally: + Path(script_path).unlink() + + +# @mcp.tool() +def get_structure_metrics( + spe_input_file: Path, + output_spe_file: Path, + structure_id: str = "structure_id", + img_id: str = "sample_id", +) -> Dict[str, Any]: + """ + Calculates various metrics for each identified structure. + + This tool wraps the getStructureMetrics() function from 'sosta'. It computes metrics + such as area, perimeter, and shape factor for each structure found in the + SpatialExperiment object and adds them to the object's metadata. + + Args: + spe_input_file: Path to an .rds file containing a SpatialExperiment object with identified structures. + output_spe_file: Path to save the modified SpatialExperiment object as an .rds file. + structure_id: The column name in colData(x) that contains the structure ID. + img_id: The column name in colData(x) that contains the image ID. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + if not spe_input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {spe_input_file}") + + r_script_content = f""" + library(sosta) + library(SpatialExperiment) + + spe <- readRDS('{spe_input_file}') + + spe <- getStructureMetrics( + spe, + structure_id = '{structure_id}', + img_id = '{img_id}' + ) + + saveRDS(spe, file = '{output_spe_file}') + """ + + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as tmp_script: + tmp_script.write(r_script_content) + script_path = tmp_script.name + + cmd = ["Rscript", script_path] + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_spe_file)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Sosta get_structure_metrics script failed.", + "return_code": e.returncode + } + finally: + Path(script_path).unlink() + + +# @mcp.tool() +def find_structure_neighbors( + spe_input_file: Path, + output_spe_file: Path, + k_neighbors: int = 5, + structure_id: str = "structure_id", + img_id: str = "sample_id", +) -> Dict[str, Any]: + """ + Identifies the neighboring structures for each structure. + + This tool wraps the findStructureNeighbors() function from 'sosta'. It finds a specified + number of nearest neighboring structures for each structure and stores this information. + + Args: + spe_input_file: Path to an .rds file containing a SpatialExperiment object with identified structures. + output_spe_file: Path to save the modified SpatialExperiment object as an .rds file. + k_neighbors: The number of nearest neighbors to find for each structure. + structure_id: The column name in colData(x) that contains the structure ID. + img_id: The column name in colData(x) that contains the image ID. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + if not spe_input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {spe_input_file}") + if k_neighbors <= 0: + raise ValueError("k_neighbors must be a positive integer.") + + r_script_content = f""" + library(sosta) + library(SpatialExperiment) + + spe <- readRDS('{spe_input_file}') + + spe <- findStructureNeighbors( + spe, + structure_id = '{structure_id}', + img_id = '{img_id}', + k_neighbors = {k_neighbors} + ) + + saveRDS(spe, file = '{output_spe_file}') + """ + + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as tmp_script: + tmp_script.write(r_script_content) + script_path = tmp_script.name + + cmd = ["Rscript", script_path] + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_spe_file)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Sosta find_structure_neighbors script failed.", + "return_code": e.returncode + } + finally: + Path(script_path).unlink() + + +# @mcp.tool() +def get_structure_aggregated_expression( + spe_input_file: Path, + output_sce_file: Path, + assay_name: str = "counts", + aggregation_function: str = "mean", + structure_id: str = "structure_id", + img_id: str = "sample_id", +) -> Dict[str, Any]: + """ + Aggregates expression data for each identified structure. + + This tool wraps the getStructureAgg() function from 'sosta'. It aggregates the expression + data (e.g., counts) for all spots/cells within each structure using a specified function + (mean or sum) and returns a SingleCellExperiment object. + + Args: + spe_input_file: Path to an .rds file containing a SpatialExperiment object with structures. + output_sce_file: Path to save the output SingleCellExperiment object as an .rds file. + assay_name: The name of the assay in the input object to use for aggregation. + aggregation_function: The function to use for aggregation. Must be 'mean' or 'sum'. + structure_id: The column name in colData(x) that contains the structure ID. + img_id: The column name in colData(x) that contains the image ID. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + if not spe_input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {spe_input_file}") + if aggregation_function not in ["mean", "sum"]: + raise ValueError("aggregation_function must be either 'mean' or 'sum'.") + + r_script_content = f""" + library(sosta) + library(SpatialExperiment) + library(SingleCellExperiment) + + spe <- readRDS('{spe_input_file}') + + sce_agg <- getStructureAgg( + spe, + assay_name = '{assay_name}', + structure_id = '{structure_id}', + img_id = '{img_id}', + fun = '{aggregation_function}' + ) + + saveRDS(sce_agg, file = '{output_sce_file}') + """ + + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as tmp_script: + tmp_script.write(r_script_content) + script_path = tmp_script.name + + cmd = ["Rscript", script_path] + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_sce_file)] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Sosta get_structure_aggregated_expression script failed.", + "return_code": e.returncode + } + finally: + Path(script_path).unlink() \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..90511bb6d8f219c6cfe5cc44bf83c3468dd607e2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/bioconductor-sosta_server.py') +SERVER_NAME = 'biosci_bioconductor_sosta' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..76166879ead7de811bc2838aa522b878cfe29280 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-sosta: + build: . + image: mcp-bioconductor-sosta:latest + container_name: mcp-bioconductor-sosta + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-sosta + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ddbe307524a852455960999d28933074673d6d20 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-sosta + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-sosta/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/__pycache__/bioconductor-spacexr_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/__pycache__/bioconductor-spacexr_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7848b0b735838eafc3f99cb9dcaffc809570eade Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/__pycache__/bioconductor-spacexr_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f4c3f50775a0d947e12f292f691fe5b1f8faf43c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_server.py @@ -0,0 +1,192 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Literal, Optional + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be imported. +def tool(func): + """A dummy decorator to allow the code to be syntactically correct.""" + return func + +mcp = type("mcp", (), {"tool": tool}) + +@mcp.tool +def run_rctd( + spatial_data_rds: Path, + sc_reference_data_rds: Path, + cell_type_colname: str, + output_dir: Path, + mode: Literal["full", "doublet", "multi"] = "full", + max_cores: int = 1, + gene_cutoff: float = 0.000125, + fc_cutoff: float = 0.5, + n_genes: int = 2000, + cell_min_instance: int = 25, +) -> dict: + """ + Runs Robust Cell Type Decomposition (RCTD) to identify cell types in spatial transcriptomics data. + + This tool uses the spacexr R package to learn cell type profiles from an annotated + single-cell RNA-seq reference and uses these profiles to deconvolve the cell type + composition of each pixel/spot in a spatial transcriptomics dataset. + + Args: + spatial_data_rds: Path to an .rds file containing a SpatialExperiment object for the spatial data. + sc_reference_data_rds: Path to an .rds file containing a SummarizedExperiment or SingleCellExperiment + object for the single-cell reference data. + cell_type_colname: The name of the column in the reference object's colData that contains cell type annotations. + output_dir: Path to the directory where output files will be saved. + mode: The mode for running RCTD. 'full' assumes a single cell type per spot. + 'doublet' allows up to two cell types per spot. 'multi' allows multiple cell types. + Defaults to "full". + max_cores: The maximum number of cores to use for parallel processing. Defaults to 1. + gene_cutoff: The minimum proportion of cells that must express a gene for it to be included + in the reference. Used for gene filtering. Defaults to 0.000125. + fc_cutoff: The minimum log-fold-change of a gene to be considered a marker gene. + Used for gene filtering. Defaults to 0.5. + n_genes: The number of marker genes to be selected for each cell type in the reference. + Defaults to 2000. + cell_min_instance: The minimum number of cells required for a cell type to be included + in the reference. Defaults to 25. + + Returns: + A dictionary containing the execution command, stdout, stderr, and paths to output files. + """ + # 1. Input Validation + if not spatial_data_rds.exists(): + raise FileNotFoundError(f"Input spatial data file not found: {spatial_data_rds}") + if not sc_reference_data_rds.exists(): + raise FileNotFoundError(f"Input scRNA-seq reference file not found: {sc_reference_data_rds}") + if max_cores < 1: + raise ValueError("max_cores must be a positive integer.") + if gene_cutoff < 0: + raise ValueError("gene_cutoff must be non-negative.") + if fc_cutoff < 0: + raise ValueError("fc_cutoff must be non-negative.") + if n_genes <= 0: + raise ValueError("n_genes must be a positive integer.") + if cell_min_instance <= 0: + raise ValueError("cell_min_instance must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + # 2. R Script Generation + # This script loads the data, creates the necessary spacexr objects, runs RCTD, and saves the results. + r_script_content = f""" + # Load required libraries + library(spacexr) + library(SpatialExperiment) + library(SummarizedExperiment) + library(ggplot2) + library(scatterpie) + library(Matrix) + + # --- 1. Load Data --- + puck_spe <- readRDS("{spatial_data_rds.resolve()}") + ref_se <- readRDS("{sc_reference_data_rds.resolve()}") + output_dir <- "{output_dir.resolve()}" + cell_type_colname <- "{cell_type_colname}" + + # --- 2. Create Reference Object --- + message("Creating reference object from single-cell data...") + ref_counts <- assay(ref_se) + if (!cell_type_colname %in% colnames(colData(ref_se))) {{ + stop(paste0("Error: '", cell_type_colname, "' not found in the column data of the reference object.")) + }} + cell_types <- as.factor(colData(ref_se)[[cell_type_colname]]) + names(cell_types) <- colnames(ref_se) + nUMI <- colSums(ref_counts) + reference <- Reference(ref_counts, cell_types, nUMI) + message("Reference object created successfully.") + + # --- 3. Create SpatialRNA Object --- + message("Creating SpatialRNA object from spatial data...") + puck_counts <- assay(puck_spe) + puck_coords <- as.data.frame(spatialCoords(puck_spe)) + puck <- SpatialRNA(puck_coords, puck_counts, colSums(puck_counts)) + message("SpatialRNA object created successfully.") + + # --- 4. Create and Run RCTD --- + message("Creating RCTD object...") + myRCTD <- create.RCTD(puck, reference, max_cores = {max_cores}, + gene_cutoff = {gene_cutoff}, fc_cutoff = {fc_cutoff}, + n_genes = {n_genes}, CELL_MIN_INSTANCE = {cell_min_instance}) + + message("Running RCTD in '{mode}' mode...") + myRCTD <- run.RCTD(myRCTD, doublet_mode = "{mode}") + message("RCTD run completed.") + + # --- 5. Save Results --- + message("Saving results...") + results <- myRCTD@results + # Normalize weights to sum to 1 + norm_weights <- normalize_weights(results$weights) + + # Save the normalized weights as CSV + weights_file_path <- file.path(output_dir, "rctd_cell_type_weights.csv") + write.csv(norm_weights, file = weights_file_path, quote = FALSE, row.names = TRUE) + + # Save the full RCTD object as RDS + rds_file_path <- file.path(output_dir, "rctd_object.rds") + saveRDS(myRCTD, file = rds_file_path) + + # Save a summary plot + message("Generating and saving summary plot...") + plot_df <- as.data.frame(cbind(puck@coords, norm_weights)) + colnames(plot_df)[1:2] <- c("x", "y") # Ensure coordinate columns are named x and y for ggplot + + p <- ggplot() + + geom_scatterpie(data = plot_df, aes(x = x, y = y), cols = colnames(norm_weights), pie_scale = 0.9) + + coord_equal() + + theme_void() + + labs(title = "RCTD Cell Type Proportions", fill = "Cell Type") + + plot_file_path <- file.path(output_dir, "rctd_cell_type_pie_chart.pdf") + ggsave(plot_file_path, plot = p, device = "pdf", width = 8, height = 7) + + message(paste0("All results saved to: ", output_dir)) + """ + + # 3. Subprocess Execution + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = r_script_file.name + + command = ["Rscript", r_script_path] + command_str = " ".join(command) + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + except subprocess.CalledProcessError as e: + # Clean up the temporary script file before raising + Path(r_script_path).unlink() + raise RuntimeError( + f"RCTD execution failed with exit code {e.returncode}.\n" + f"Command: {command_str}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) from e + finally: + # Ensure cleanup even on success + if Path(r_script_path).exists(): + Path(r_script_path).unlink() + + # 4. Structured Result Return + output_files = [ + str(output_dir / "rctd_cell_type_weights.csv"), + str(output_dir / "rctd_object.rds"), + str(output_dir / "rctd_cell_type_pie_chart.pdf"), + ] + + return { + "command_executed": command_str, + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ae82a6f922982efc1f303d3c81274639088f32c8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spacexr/app/bioconductor-spacexr_server.py') +SERVER_NAME = 'biosci_bioconductor_spacexr' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..101b596dc6ddbb5ba91536ed5fe128d6cec87d60 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-spanorm via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-spanorm -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-spanorm_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-spanorm_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-spanorm_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/__pycache__/bioconductor-spanorm_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/__pycache__/bioconductor-spanorm_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b50a64203867f2824e30a8f85ab14b1325b9606c Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/__pycache__/bioconductor-spanorm_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_server.py new file mode 100644 index 0000000000000000000000000000000000000000..abb31ebc4733890b7d099658dab9e19dab402108 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_server.py @@ -0,0 +1,153 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, List + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +def tool(func): + def wrapper(*args, **kwargs): + # In a real scenario, the MCP framework would handle + # registration, UI generation, and execution based on the function signature. + print(f"Executing tool: {func.__name__}") + return func(*args, **kwargs) + return wrapper + +mcp = type("mcp", (), {"tool": tool}) + + +@mcp.tool +def spanorm( + input_object: Path, + output_object: Path, + assay_type: str = "counts", + num_cores: int = 1, +) -> dict: + """ + Performs spatially-aware normalisation for spatial transcriptomics data using SpaNorm. + + This tool wraps the SpaNorm() function from the R/Bioconductor package SpaNorm. + It takes a SingleCellExperiment, SpatialExperiment, or Seurat object in RDS format, + normalises the specified assay, and saves the updated object to a new RDS file. + + Args: + input_object: Path to the input RDS file containing a SingleCellExperiment, + SpatialExperiment, or Seurat object. + output_object: Path to save the output RDS file with the normalized data. + assay_type: String specifying the assay to use for normalization. + num_cores: Number of cores to use for parallel processing. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list + of output files. + """ + # --- Input Validation --- + if not input_object.is_file(): + raise FileNotFoundError(f"Input file not found: {input_object}") + if num_cores < 1: + raise ValueError("num_cores must be a positive integer.") + if not output_object.parent.exists(): + raise FileNotFoundError(f"Output directory does not exist: {output_object.parent}") + + # --- R Script Generation --- + # This script will be executed by Rscript. It loads the necessary libraries, + # parses command-line arguments, runs the SpaNorm function, and saves the result. + r_script_content = f""" + # Load necessary libraries quietly + suppressPackageStartupMessages(library(SpaNorm)) + suppressPackageStartupMessages(library(SingleCellExperiment)) + suppressPackageStartupMessages(library(SpatialExperiment)) + suppressPackageStartupMessages(library(SeuratObject)) + suppressPackageStartupMessages(library(BiocParallel)) + + # --- Argument Parsing --- + # Using a simple method for clarity, as argparse is not a base R package. + args <- commandArgs(trailingOnly = TRUE) + input_file <- args[1] + output_file <- args[2] + assay_name <- args[3] + cores <- as.integer(args[4]) + + # --- Setup Parallelization --- + if (cores > 1) {{ + bpparam <- MulticoreParam(workers = cores) + }} else {{ + bpparam <- SerialParam() + }} + + # --- Main Logic --- + tryCatch({{ + # Read the input object + message("Reading input object from: ", input_file) + input_obj <- readRDS(input_file) + + # Run SpaNorm + message(paste("Running SpaNorm on assay '", assay_name, "' with ", cores, " core(s)...", sep="")) + output_obj <- SpaNorm( + object = input_obj, + assay.type = assay_name, + BPPARAM = bpparam + ) + message("SpaNorm normalization complete.") + + # Save the output object + message("Saving normalized object to: ", output_file) + saveRDS(output_obj, file = output_file) + + message("Script completed successfully.") + }}, error = function(e) {{ + message("An error occurred: ", e$message) + quit(status = 1, save = "no") + }}) + """ + + # --- Subprocess Execution --- + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_file.write(r_script_content) + r_script_path = Path(r_script_file.name) + + cmd = [ + "Rscript", + str(r_script_path), + str(input_object), + str(output_object), + assay_type, + str(num_cores), + ] + + command_executed = " ".join(cmd) + stdout_str = "" + stderr_str = "" + output_files = [] + + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + stdout_str = process.stdout + stderr_str = process.stderr + if output_object.exists(): + output_files.append(str(output_object)) + + except subprocess.CalledProcessError as e: + stderr_str = e.stderr + # Re-raise with more context for the MCP framework + raise RuntimeError( + f"SpaNorm execution failed with exit code {e.returncode}.\n" + f"Command: {command_executed}\n" + f"Stderr: {stderr_str}" + ) from e + finally: + # Clean up the temporary R script + r_script_path.unlink() + + # --- Structured Result Return --- + return { + "command_executed": command_executed, + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9d8ff2db1f64150d5bc62ce69a68ae01177dfc4d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/bioconductor-spanorm_server.py') +SERVER_NAME = 'biosci_bioconductor_spanorm' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..76fd862cdbac46449187028e2b59f2f4da22ad12 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-spanorm: + build: . + image: mcp-bioconductor-spanorm:latest + container_name: mcp-bioconductor-spanorm + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-spanorm + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..421e19f615d56db9b96ef3f48ea15b2ff6396322 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-spanorm + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spanorm/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..bfb235269e417a57a787ed9e2b178c9af26d8efd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-spasim via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-spasim -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-spasim_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-spasim_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-spasim_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/__pycache__/bioconductor-spasim_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/__pycache__/bioconductor-spasim_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1bf2920c33431f194473aff27ce2b1e11740b1b8 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/__pycache__/bioconductor-spasim_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5589b2020a09cbe03b9703437ec55d76a3b6d6e8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_server.py @@ -0,0 +1,390 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +@mcp.tool() +def simulate_background_cells( + output_file: str, + n_cells: int = 1000, + width: int = 1000, + height: int = 1000, + method: str = "Uniform", + cell_types: List[str] = ["Background"], + min_distance: float = 10.0, + lambda_param: float = 50.0, + sigma: float = 20.0, +): + """ + Simulate background cells in a tissue image using spaSim. + + Args: + output_file: Path to save the resulting SingleCellExperiment object (.rds). + n_cells: Number of cells to simulate. + width: Width of the image area. + height: Height of the image area. + method: Simulation method: "Uniform", "Hardcore", or "Clustered". + cell_types: List of cell type names for the background. + min_distance: Minimum distance between cells (used if method is "Hardcore"). + lambda_param: Intensity of clusters (used if method is "Clustered"). + sigma: Standard deviation of cluster spread (used if method is "Clustered"). + """ + # Input validation + if n_cells <= 0: + return {"error": "n_cells must be positive"} + if width <= 0 or height <= 0: + return {"error": "Dimensions must be positive"} + + valid_methods = ["Uniform", "Hardcore", "Clustered"] + if method not in valid_methods: + return {"error": f"Method must be one of {valid_methods}"} + + output_path = Path(output_file) + + # Construct R script + cell_types_r = 'c("' + '", "'.join(cell_types) + '")' + + r_script = f""" + library(spaSim) + library(SingleCellExperiment) + + set.seed(42) + sce <- simulate_background_cells( + n_cells = {n_cells}, + width = {width}, + height = {height}, + method = "{method}", + cell_types = {cell_types_r}, + min_distance = {min_distance}, + lambda = {lambda_param}, + sigma = {sigma} + ) + saveRDS(sce, "{output_path}") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"spaSim::simulate_background_cells to {output_file}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def simulate_clusters( + input_file: str, + output_file: str, + n_clusters: int = 3, + cluster_radius: float = 100.0, + cluster_cell_types: List[str] = ["Tumour"], + cluster_shape: str = "Circle", + prop_cluster: float = 0.1, +): + """ + Simulate cell clusters (e.g., tumor clusters) on top of a background simulation. + + Args: + input_file: Path to the input SingleCellExperiment object (.rds). + output_file: Path to save the updated SingleCellExperiment object (.rds). + n_clusters: Number of clusters to generate. + cluster_radius: Radius of the clusters. + cluster_cell_types: Cell types to be placed within the clusters. + cluster_shape: Shape of the clusters ("Circle" or "Oval"). + prop_cluster: Proportion of cells in the background to be replaced by cluster cells. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} does not exist"} + + output_path = Path(output_file) + cluster_types_r = 'c("' + '", "'.join(cluster_cell_types) + '")' + + r_script = f""" + library(spaSim) + library(SingleCellExperiment) + + sce <- readRDS("{input_path}") + sce_clustered <- simulate_clusters( + bg_sample = sce, + n_clusters = {n_clusters}, + cluster_radius = {cluster_radius}, + cluster_cell_types = {cluster_types_r}, + cluster_shape = "{cluster_shape}", + prop_cluster = {prop_cluster} + ) + saveRDS(sce_clustered, "{output_path}") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"spaSim::simulate_clusters on {input_file}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def simulate_immune_rings( + input_file: str, + output_file: str, + n_rings: int = 2, + inner_radius: float = 100.0, + outer_radius: float = 150.0, + ring_cell_types: List[str] = ["Immune"], + prop_ring: float = 0.2, +): + """ + Simulate immune rings around existing clusters in a tissue image. + + Args: + input_file: Path to the input SingleCellExperiment object (.rds). + output_file: Path to save the updated SingleCellExperiment object (.rds). + n_rings: Number of rings to simulate (usually matches or is less than n_clusters). + inner_radius: Inner radius of the ring. + outer_radius: Outer radius of the ring. + ring_cell_types: Cell types to be placed within the rings. + prop_ring: Proportion of cells in the ring area to be replaced by ring cells. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} does not exist"} + + output_path = Path(output_file) + ring_types_r = 'c("' + '", "'.join(ring_cell_types) + '")' + + r_script = f""" + library(spaSim) + library(SingleCellExperiment) + + sce <- readRDS("{input_path}") + sce_rings <- simulate_immune_rings( + bg_sample = sce, + n_rings = {n_rings}, + inner_radius = {inner_radius}, + outer_radius = {outer_radius}, + ring_cell_types = {ring_types_r}, + prop_ring = {prop_ring} + ) + saveRDS(sce_rings, "{output_path}") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"spaSim::simulate_immune_rings on {input_file}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def simulate_vessels( + input_file: str, + output_file: str, + n_vessels: int = 3, + vessel_width: float = 20.0, + vessel_cell_types: List[str] = ["Vessel"], + vessel_probability: float = 0.8, +): + """ + Simulate blood or lymphatic vessels in a tissue image. + + Args: + input_file: Path to the input SingleCellExperiment object (.rds). + output_file: Path to save the updated SingleCellExperiment object (.rds). + n_vessels: Number of vessels to simulate. + vessel_width: Width of the vessels. + vessel_cell_types: Cell types to be placed within the vessels. + vessel_probability: Probability of a cell being a vessel cell within the vessel area. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} does not exist"} + + output_path = Path(output_file) + vessel_types_r = 'c("' + '", "'.join(vessel_cell_types) + '")' + + r_script = f""" + library(spaSim) + library(SingleCellExperiment) + + sce <- readRDS("{input_path}") + sce_vessels <- simulate_vessels( + bg_sample = sce, + n_vessels = {n_vessels}, + vessel_width = {vessel_width}, + vessel_cell_types = {vessel_types_r}, + vessel_probability = {vessel_probability} + ) + saveRDS(sce_vessels, "{output_path}") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"spaSim::simulate_vessels on {input_file}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def simulate_mixing( + input_file: str, + output_file: str, + mixing_cell_types: List[str], + probs: List[float], +): + """ + Simulate mixing of different cell types in a tissue image. + + Args: + input_file: Path to the input SingleCellExperiment object (.rds). + output_file: Path to save the updated SingleCellExperiment object (.rds). + mixing_cell_types: List of cell types to mix. + probs: List of probabilities corresponding to each cell type. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} does not exist"} + + if len(mixing_cell_types) != len(probs): + return {"error": "Length of mixing_cell_types and probs must match"} + + output_path = Path(output_file) + mixing_types_r = 'c("' + '", "'.join(mixing_cell_types) + '")' + probs_r = 'c(' + ', '.join(map(str, probs)) + ')' + + r_script = f""" + library(spaSim) + library(SingleCellExperiment) + + sce <- readRDS("{input_path}") + sce_mixed <- simulate_mixing( + bg_sample = sce, + mixing_cell_types = {mixing_types_r}, + probs = {probs_r} + ) + saveRDS(sce_mixed, "{output_path}") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"spaSim::simulate_mixing on {input_file}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def export_spasim_to_csv( + input_file: str, + output_csv: str, +): + """ + Export a spaSim SingleCellExperiment object to a CSV file for inspection. + + Args: + input_file: Path to the input SingleCellExperiment object (.rds). + output_csv: Path to save the resulting CSV file. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} does not exist"} + + output_path = Path(output_csv) + + r_script = f""" + library(SingleCellExperiment) + library(SummarizedExperiment) + + sce <- readRDS("{input_path}") + df <- as.data.frame(colData(sce)) + # Add coordinates if available in spatialData or colData + if ("Cell.X.Position" %in% colnames(df)) {{ + # Already has coords + }} else if (length(spatialCoords(sce)) > 0) {{ + coords <- spatialCoords(sce) + df$Cell.X.Position <- coords[,1] + df$Cell.Y.Position <- coords[,2] + }} + + write.csv(df, "{output_path}", row.names = FALSE) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"Export {input_file} to CSV", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6bedf224132d3ad350504c322b44f4e65897d6d5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/bioconductor-spasim_server.py') +SERVER_NAME = 'biosci_bioconductor_spasim' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..989548ee8d8d3b94f376ca6e91f7f2841ce4e443 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-spasim: + build: . + image: mcp-bioconductor-spasim:latest + container_name: mcp-bioconductor-spasim + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-spasim + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3518f89cdc2c874bce3a84636b18c40a88819d2c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-spasim + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spasim/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ddef19020815a52423e55934ba1d1fc222c66dd5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-spatiallibd via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-spatiallibd -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-spatiallibd_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-spatiallibd_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-spatiallibd_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/__pycache__/bioconductor-spatiallibd_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/__pycache__/bioconductor-spatiallibd_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d7032fbd51aa630ee4fbb8521f4650d9772a506a Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/__pycache__/bioconductor-spatiallibd_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_server.py new file mode 100644 index 0000000000000000000000000000000000000000..03e7433d4007c9495c6e1bd7ccac6d8a05a894fa --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_server.py @@ -0,0 +1,328 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union +import tempfile +import os + +def run_r_command(script: str): + """Helper function to execute R code via Rscript.""" + try: + result = subprocess.run( + ["Rscript", "-e", script], + capture_output=True, + text=True, + check=True + ) + return result.stdout, result.stderr + except subprocess.CalledProcessError as e: + raise RuntimeError(f"R execution failed: {e.stderr}") + +@mcp.tool() +def spatiallibd_fetch_data( + data_type: str = "spe", + destdir: str = ".", +) -> dict: + """ + Download spatially-resolved transcriptomics data from the Maynard et al. 2021 project. + + Args: + data_type: Type of data to download. Options: 'spe' (SpatialExperiment), 'sce' (SingleCellExperiment), + 'sce_layer' (Layer-level SCE), 'modeling_results', 'sig_genes', 'snRNAseq_reduced', 'snRNAseq_full'. + destdir: Directory where the data should be saved. + """ + dest_path = Path(destdir) + if not dest_path.exists(): + dest_path.mkdir(parents=True, exist_ok=True) + + valid_types = ["spe", "sce", "sce_layer", "modeling_results", "sig_genes", "snRNAseq_reduced", "snRNAseq_full"] + if data_type not in valid_types: + return {"error": f"Invalid data_type. Must be one of {valid_types}"} + + r_script = f""" + library(spatialLIBD) + data <- fetch_data(type = '{data_type}', destdir = '{destdir}') + saveRDS(data, file.path('{destdir}', paste0('{data_type}', '.rds'))) + """ + + stdout, stderr = run_r_command(r_script) + + return { + "command_executed": f"spatialLIBD::fetch_data(type='{data_type}')", + "stdout": stdout, + "stderr": stderr, + "output_files": [str(dest_path / f"{data_type}.rds")] + } + +@mcp.tool() +def spatiallibd_vis_gene( + spe_path: str, + geneid: str, + sampleid: str, + spatial_coords: bool = True, + viridis: bool = True, + output_plot: str = "gene_vis.png" +) -> dict: + """ + Visualize gene expression on spatial coordinates for a specific sample. + + Args: + spe_path: Path to the SpatialExperiment RDS file. + geneid: The gene ID or name to visualize (must exist in the dataset). + sampleid: The specific sample ID to plot. + spatial_coords: Whether to use spatial coordinates (True) or PCA/TSNE (False). + viridis: Whether to use the viridis color scale. + output_plot: Path to save the resulting plot image. + """ + spe_p = Path(spe_path) + if not spe_p.exists(): + return {"error": f"Input file {spe_path} not found."} + + r_script = f""" + library(spatialLIBD) + library(ggplot2) + spe <- readRDS('{spe_path}') + p <- vis_gene(spe, geneid = '{geneid}', sampleid = '{sampleid}', spatial = {str(spatial_coords).upper()}, viridis = {str(viridis).upper()}) + ggsave('{output_plot}', plot = p, width = 10, height = 8) + """ + + stdout, stderr = run_r_command(r_script) + + return { + "command_executed": f"spatialLIBD::vis_gene(geneid='{geneid}', sampleid='{sampleid}')", + "stdout": stdout, + "stderr": stderr, + "output_files": [output_plot] + } + +@mcp.tool() +def spatiallibd_vis_clus( + spe_path: str, + clustervar: str, + sampleid: str, + colors: Optional[str] = None, + spatial_coords: bool = True, + output_plot: str = "cluster_vis.png" +) -> dict: + """ + Visualize clusters or categorical variables on spatial coordinates. + + Args: + spe_path: Path to the SpatialExperiment RDS file. + clustervar: The column name in colData(spe) containing the cluster labels. + sampleid: The specific sample ID to plot. + colors: Optional vector of colors (R syntax, e.g., "c('red', 'blue')"). + spatial_coords: Whether to use spatial coordinates (True). + output_plot: Path to save the resulting plot image. + """ + spe_p = Path(spe_path) + if not spe_p.exists(): + return {"error": f"Input file {spe_path} not found."} + + colors_arg = colors if colors else "NULL" + + r_script = f""" + library(spatialLIBD) + library(ggplot2) + spe <- readRDS('{spe_path}') + p <- vis_clus(spe, clustervar = '{clustervar}', sampleid = '{sampleid}', colors = {colors_arg}, spatial = {str(spatial_coords).upper()}) + ggsave('{output_plot}', plot = p, width = 10, height = 8) + """ + + stdout, stderr = run_r_command(r_script) + + return { + "command_executed": f"spatialLIBD::vis_clus(clustervar='{clustervar}', sampleid='{sampleid}')", + "stdout": stdout, + "stderr": stderr, + "output_files": [output_plot] + } + +@mcp.tool() +def spatiallibd_vis_grid_gene( + spe_path: str, + geneid: str, + spatial_coords: bool = True, + viridis: bool = True, + output_plot: str = "gene_grid_vis.png" +) -> dict: + """ + Visualize gene expression across all samples in a grid. + + Args: + spe_path: Path to the SpatialExperiment RDS file. + geneid: The gene ID or name to visualize. + spatial_coords: Whether to use spatial coordinates. + viridis: Whether to use the viridis color scale. + output_plot: Path to save the resulting plot image. + """ + spe_p = Path(spe_path) + if not spe_p.exists(): + return {"error": f"Input file {spe_path} not found."} + + r_script = f""" + library(spatialLIBD) + library(ggplot2) + spe <- readRDS('{spe_path}') + p <- vis_grid_gene(spe, geneid = '{geneid}', spatial = {str(spatial_coords).upper()}, viridis = {str(viridis).upper()}) + ggsave('{output_plot}', plot = p, width = 15, height = 12) + """ + + stdout, stderr = run_r_command(r_script) + + return { + "command_executed": f"spatialLIBD::vis_grid_gene(geneid='{geneid}')", + "stdout": stdout, + "stderr": stderr, + "output_files": [output_plot] + } + +@mcp.tool() +def spatiallibd_vis_grid_clus( + spe_path: str, + clustervar: str, + spatial_coords: bool = True, + output_plot: str = "cluster_grid_vis.png" +) -> dict: + """ + Visualize clusters across all samples in a grid. + + Args: + spe_path: Path to the SpatialExperiment RDS file. + clustervar: The column name in colData(spe) containing the cluster labels. + spatial_coords: Whether to use spatial coordinates. + output_plot: Path to save the resulting plot image. + """ + spe_p = Path(spe_path) + if not spe_p.exists(): + return {"error": f"Input file {spe_path} not found."} + + r_script = f""" + library(spatialLIBD) + library(ggplot2) + spe <- readRDS('{spe_path}') + p <- vis_grid_clus(spe, clustervar = '{clustervar}', spatial = {str(spatial_coords).upper()}) + ggsave('{output_plot}', plot = p, width = 15, height = 12) + """ + + stdout, stderr = run_r_command(r_script) + + return { + "command_executed": f"spatialLIBD::vis_grid_clus(clustervar='{clustervar}')", + "stdout": stdout, + "stderr": stderr, + "output_files": [output_plot] + } + +@mcp.tool() +def spatiallibd_check_spe( + spe_path: str +) -> dict: + """ + Check if a SpatialExperiment object is compatible with spatialLIBD. + + Args: + spe_path: Path to the SpatialExperiment RDS file. + """ + spe_p = Path(spe_path) + if not spe_p.exists(): + return {"error": f"Input file {spe_path} not found."} + + r_script = f""" + library(spatialLIBD) + spe <- readRDS('{spe_path}') + check_spe(spe) + cat("Validation successful") + """ + + try: + stdout, stderr = run_r_command(r_script) + return { + "status": "success", + "message": "SpatialExperiment object is valid for spatialLIBD.", + "stdout": stdout + } + except Exception as e: + return { + "status": "error", + "message": str(e) + } + +@mcp.tool() +def spatiallibd_run_app( + spe_path: str, + sce_layer_path: Optional[str] = None, + modeling_results_path: Optional[str] = None, + sig_genes_path: Optional[str] = None, + title: str = "spatialLIBD", + port: int = 8080, + host: str = "127.0.0.1" +) -> dict: + """ + Generate the R command to launch the interactive spatialLIBD Shiny application. + Note: This tool returns the command to run; it does not block the server. + + Args: + spe_path: Path to the SpatialExperiment RDS file. + sce_layer_path: Optional path to the layer-level SingleCellExperiment RDS. + modeling_results_path: Optional path to modeling results RDS. + sig_genes_path: Optional path to significant genes RDS. + title: Title for the Shiny app. + port: Port to run the Shiny app on. + host: Host interface to bind to. + """ + + args = [f"spe = readRDS('{spe_path}')"] + if sce_layer_path: + args.append(f"sce_layer = readRDS('{sce_layer_path}')") + if modeling_results_path: + args.append(f"modeling_results = readRDS('{modeling_results_path}')") + if sig_genes_path: + args.append(f"sig_genes = readRDS('{sig_genes_path}')") + + args.append(f"app_title = '{title}'") + + r_cmd = f"library(spatialLIBD); run_app({', '.join(args)}, options = list(port = {port}, host = '{host}'))" + + return { + "instruction": "Run the following command in your terminal to launch the interactive app:", + "command": f"Rscript -e \"{r_cmd}\"", + "app_url": f"http://{host}:{port}" + } + +@mcp.tool() +def spatiallibd_sig_genes_extract( + modeling_results_path: str, + sce_layer_path: str, + output_csv: str = "sig_genes.csv" +) -> dict: + """ + Extract significant genes from modeling results. + + Args: + modeling_results_path: Path to the modeling results RDS file. + sce_layer_path: Path to the layer-level SingleCellExperiment RDS file. + output_csv: Path to save the extracted significant genes as a CSV. + """ + if not Path(modeling_results_path).exists() or not Path(sce_layer_path).exists(): + return {"error": "Input files not found."} + + r_script = f""" + library(spatialLIBD) + modeling_results <- readRDS('{modeling_results_path}') + sce_layer <- readRDS('{sce_layer_path}') + sig_genes <- sig_genes_extract_all( + n = nrow(sce_layer), + modeling_results = modeling_results, + sce_layer = sce_layer + ) + write.csv(sig_genes, '{output_csv}', row.names = FALSE) + """ + + stdout, stderr = run_r_command(r_script) + + return { + "command_executed": "spatialLIBD::sig_genes_extract_all()", + "stdout": stdout, + "stderr": stderr, + "output_files": [output_csv] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2f7772a690e52a532677eb30e8ea5984c1f054a7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/bioconductor-spatiallibd_server.py') +SERVER_NAME = 'biosci_bioconductor_spatiallibd' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c8bf48f6357e709d97acc588a65811da0c64ccff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-spatiallibd: + build: . + image: mcp-bioconductor-spatiallibd:latest + container_name: mcp-bioconductor-spatiallibd + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-spatiallibd + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9ffb026798e62d7cfa1ff903f713c05d8e589578 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-spatiallibd + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatiallibd/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4a74d84f6ebd24c4cc2924c0717bab02372ee09b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-spatialsimgp via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-spatialsimgp -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-spatialsimgp_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-spatialsimgp_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-spatialsimgp_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/__pycache__/bioconductor-spatialsimgp_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/__pycache__/bioconductor-spatialsimgp_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b5f6aeb7b6c9577cd3ca4d0f7d222f7f7b82230 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/__pycache__/bioconductor-spatialsimgp_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_server.py new file mode 100644 index 0000000000000000000000000000000000000000..95c8556eba6af21a8e4a106a6219ca57b6d7e50e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_server.py @@ -0,0 +1,150 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, Dict, Any, List + +# This is a placeholder for the MCP framework. +class Mcp: + def tool(self, *args, **kwargs): + def decorator(f): + return f + return decorator +mcp = Mcp() + +@mcp.tool() +def spatialsimgp( + spe_input: Path, + g: int, + l: float, + sigma: float, + tau: float, + beta: float, + n_sim: int, + n_cores: int = 1, + cov_type: str = "gaussian", + output_filename: str = "simulated_spe.rds", +) -> Dict[str, Any]: + """ + Simulates spatial transcriptomics data using a Gaussian Process model. + + This tool is a wrapper for the spatialSimGP R package. It takes a + SpatialExperiment object (in .rds format) and simulation parameters to + generate synthetic spatial transcriptomics count data. + + Args: + spe_input: Path to the input SpatialExperiment object saved as an RDS file. + g: Number of genes to simulate. + l: Length-scale parameter for the covariance function. + sigma: Marginal variance parameter. + tau: Nugget effect parameter. + beta: Mean expression parameter. + n_sim: Number of simulations to perform. + n_cores: Number of cores for parallel processing. + cov_type: Covariance function type. Currently, only 'gaussian' is supported. + output_filename: The name for the output RDS file containing the simulated data. + + Returns: + A dictionary containing the execution command, stdout, stderr, and a list of output files. + """ + # 1. Input Validation + if not spe_input.is_file(): + raise FileNotFoundError(f"Input file not found: {spe_input}") + if g <= 0: + raise ValueError("Number of genes (g) must be a positive integer.") + if l <= 0: + raise ValueError("Length-scale parameter (l) must be positive.") + if sigma < 0: + raise ValueError("Marginal variance (sigma) must be non-negative.") + if tau < 0: + raise ValueError("Nugget effect (tau) must be non-negative.") + if n_sim <= 0: + raise ValueError("Number of simulations (n_sim) must be a positive integer.") + if n_cores <= 0: + raise ValueError("Number of cores (n_cores) must be a positive integer.") + if cov_type != "gaussian": + raise ValueError("Covariance type (cov_type) must be 'gaussian'.") + if not output_filename.endswith(".rds"): + raise ValueError("Output filename must end with the .rds extension.") + + # 2. Temporary Directory and R script creation + with tempfile.TemporaryDirectory() as temp_dir: + work_dir = Path(temp_dir) + script_path = work_dir / "run_spatialsimgp.R" + + # The final output file will be moved from the temp dir to the current working dir + # or a specified output directory. For simplicity, we'll place it in the CWD. + final_output_path = Path.cwd() / output_filename + temp_output_path = work_dir / output_filename + + # R script to execute the simulation + r_script = f""" + # Load libraries + if (!requireNamespace("spatialSimGP", quietly = TRUE)) {{ + stop("Package 'spatialSimGP' is not installed. Please install it from Bioconductor.") + }} + if (!requireNamespace("SpatialExperiment", quietly = TRUE)) {{ + stop("Package 'SpatialExperiment' is not installed. Please install it from Bioconductor.") + }} + library(spatialSimGP) + library(SpatialExperiment) + + # Load the SpatialExperiment object + spe <- readRDS('{spe_input.resolve()}') + + # Run the simulation + # The spatialSimGP function handles recycling single values for parameters l, sigma, tau, and beta. + sim_spe <- spatialSimGP( + spe = spe, + g = {g}, + l = {l}, + sigma = {sigma}, + tau = {tau}, + beta = {beta}, + n_sim = {n_sim}, + n_cores = {n_cores}, + cov_type = '{cov_type}' + ) + + # Save the output + saveRDS(sim_spe, file = '{temp_output_path}') + + cat("Simulation complete. Output saved to {temp_output_path}\\n") + """ + + with open(script_path, "w") as f: + f.write(r_script) + + # 3. Subprocess Execution + cmd = ["Rscript", str(script_path)] + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + cwd=work_dir, + ) + + # Move the output file to the final destination + temp_output_path.rename(final_output_path) + + # 4. Structured result return + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(final_output_path)], + } + + except FileNotFoundError: + raise RuntimeError("Error: 'Rscript' command not found. Please ensure R is installed and in your system's PATH.") + except subprocess.CalledProcessError as e: + # Provide a more informative error message + error_message = ( + f"R script execution failed with return code {e.returncode}.\n" + f"STDOUT:\n{e.stdout}\n" + f"STDERR:\n{e.stderr}" + ) + raise RuntimeError(error_message) from e \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..699e2b52958c57a557554aa986be92956e41b3af --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/bioconductor-spatialsimgp_server.py') +SERVER_NAME = 'biosci_bioconductor_spatialsimgp' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3a2abdf31f64bf06aa08b182db7a01e28b5a51c3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-spatialsimgp: + build: . + image: mcp-bioconductor-spatialsimgp:latest + container_name: mcp-bioconductor-spatialsimgp + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-spatialsimgp + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..78cfbbd3ac1b0b26a60b244c5824ab6480893454 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-spatialsimgp + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-spatialsimgp/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..831bd440cafa8b89d2fa9114a338ee340b04ce9f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-synergyfinder via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-synergyfinder -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-synergyfinder_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-synergyfinder_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-synergyfinder_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/__pycache__/bioconductor-synergyfinder_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/__pycache__/bioconductor-synergyfinder_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c8babb9d52fb5a2960d26585ec038b898d0031c2 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/__pycache__/bioconductor-synergyfinder_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_server.py new file mode 100644 index 0000000000000000000000000000000000000000..48a8db932d664f0ebf46c6133f160ccddeb45ed4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_server.py @@ -0,0 +1,216 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, Literal, List + +# No need to import mcp as per instructions + +@mcp.tool() +def calculate_synergy_scores( + input_data_file: Path, + synergy_method: Literal["HSA", "Loewe", "Bliss", "ZIP"] = "ZIP", + output_synergy_scores_file: Path = Path("synergy_scores.csv"), + output_plot_file: Optional[Path] = None, + drug_row_col: str = "Drug1", + drug_col_col: str = "Drug2", + concentration_col: str = "Concentration", + response_col: str = "Response", + response_type: Literal["viability", "inhibition", "growth"] = "viability", + normalization_method: Literal["percentage", "none"] = "percentage", + background_correction: bool = False, + seed: Optional[int] = None, + plot_type: Literal["heatmap", "contour"] = "heatmap", + plot_title: str = "Synergy Landscape", + plot_width: int = 800, + plot_height: int = 600, + plot_units: Literal["px", "in", "cm", "mm"] = "px", +) -> dict: + """ + Calculates synergy scores for drug combinations using bioconductor-synergyfinder. + + This tool processes drug combination data to quantify synergy using various models + (HSA, Loewe, Bliss, ZIP) and can optionally generate a synergy landscape plot. + It wraps the `synergyfinder` R package functions `calculateSynergy` and `plotSynergy`. + + Args: + input_data_file: Path to the input CSV/TSV file containing drug combination data. + Expected columns include drug_row_col, drug_col_col, + concentration_col, and response_col. + synergy_method: The synergy model to use for calculation. + Options: "HSA", "Loewe", "Bliss", "ZIP". Default is "ZIP". + output_synergy_scores_file: Path to save the calculated synergy scores as a CSV/TSV file. + output_plot_file: Optional path to save the synergy landscape plot. + If provided, a plot will be generated (e.g., PDF, PNG). + drug_row_col: Column name in the input data representing the drug in rows. + Default is "Drug1". + drug_col_col: Column name in the input data representing the drug in columns. + Default is "Drug2". + concentration_col: Column name in the input data representing drug concentration. + Default is "Concentration". + response_col: Column name in the input data representing the cellular response + (e.g., viability, inhibition). Default is "Response". + response_type: The type of response data provided. + Options: "viability", "inhibition", "growth". Default is "viability". + normalization_method: Method for normalizing the response data. + Options: "percentage", "none". Default is "percentage". + background_correction: If True, perform background correction on the response data. + Default is False. + seed: Optional integer seed for reproducibility of stochastic processes. + plot_type: Type of plot to generate if output_plot_file is provided. + Options: "heatmap", "contour". Default is "heatmap". + plot_title: Title for the generated synergy plot. Default is "Synergy Landscape". + plot_width: Width of the output plot. Default is 800. + plot_height: Height of the output plot. Default is 600. + plot_units: Units for plot_width and plot_height. + Options: "px", "in", "cm", "mm". Default is "px". + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of + generated output files. + """ + # Input validation + if not input_data_file.is_file(): + raise FileNotFoundError(f"Input data file not found: {input_data_file}") + + if output_synergy_scores_file.suffix.lower() not in [".csv", ".tsv"]: + raise ValueError("Output synergy scores file must have a .csv or .tsv extension.") + + if output_plot_file: + valid_plot_suffixes = [".pdf", ".png", ".jpeg", ".jpg", ".tiff", ".bmp"] + if output_plot_file.suffix.lower() not in valid_plot_suffixes: + raise ValueError( + f"Output plot file must have a valid image extension " + f"({', '.join(valid_plot_suffixes)})." + ) + if plot_width <= 0 or plot_height <= 0: + raise ValueError("Plot width and height must be positive integers.") + + # Create a temporary R script + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".R") as r_script_file: + r_script_path = Path(r_script_file.name) + r_script_file.write(f""" + # Load necessary libraries + suppressPackageStartupMessages(library(synergyfinder)) + suppressPackageStartupMessages(library(readr)) + suppressPackageStartupMessages(library(dplyr)) + suppressPackageStartupMessages(library(ggplot2)) + + # Set seed for reproducibility if provided + if (!is.null({seed})) {{ + set.seed({seed}) + }} + + # Read input data + input_data_file <- "{input_data_file.resolve()}" + if (grepl("\\\\.csv$", input_data_file, ignore.case = TRUE)) {{ + data <- read_csv(input_data_file) + }} else if (grepl("\\\\.tsv$", input_data_file, ignore.case = TRUE)) {{ + data <- read_tsv(input_data_file) + }} else {{ + stop("Unsupported input file format. Please provide .csv or .tsv.") + }} + + # Ensure required columns exist + required_cols <- c("{drug_row_col}", "{drug_col_col}", "{concentration_col}", "{response_col}") + if (!all(required_cols %in% colnames(data))) {{ + stop(paste0("Missing one or more required columns in input data: ", + paste(setdiff(required_cols, colnames(data)), collapse = ", "))) + }} + + # Calculate synergy scores + synergy_results <- calculateSynergy( + data = data, + drug_row = "{drug_row_col}", + drug_col = "{drug_col_col}", + concentration = "{concentration_col}", + response = "{response_col}", + synergy_method = "{synergy_method}", + response_type = "{response_type}", + normalization_method = "{normalization_method}", + background_correction = {str(background_correction).upper()} + ) + + # Save synergy scores + output_synergy_scores_file <- "{output_synergy_scores_file.resolve()}" + if (grepl("\\\\.csv$", output_synergy_scores_file, ignore.case = TRUE)) {{ + write_csv(synergy_results$synergy_scores, output_synergy_scores_file) + }} else if (grepl("\\\\.tsv$", output_synergy_scores_file, ignore.case = TRUE)) {{ + write_tsv(synergy_results$synergy_scores, output_synergy_scores_file) + }} else {{ + stop("Unsupported output file format for synergy scores. Please use .csv or .tsv.") + }} + + # Generate plot if requested + if (!is.null("{output_plot_file.resolve() if output_plot_file else ''}" ) && + "{output_plot_file.resolve() if output_plot_file else ''}" != "") {{ + output_plot_file <- "{output_plot_file.resolve()}" + plot_format <- tolower(tools::file_ext(output_plot_file)) + + p <- plotSynergy( + synergy_scores = synergy_results$synergy_scores, + plot_type = "{plot_type}", + title = "{plot_title}" + ) + + # Save plot + if (plot_format == "pdf") {{ + ggsave(output_plot_file, plot = p, device = "pdf", + width = {plot_width}, height = {plot_height}, units = "{plot_units}") + }} else if (plot_format %in% c("png", "jpeg", "jpg", "tiff", "bmp")) {{ + ggsave(output_plot_file, plot = p, device = plot_format, + width = {plot_width}, height = {plot_height}, units = "{plot_units}", dpi = 300) + }} else {{ + message("Unsupported plot format. Plot not saved.") + }} + }} + """) + + command = ["Rscript", str(r_script_path)] + command_executed = " ".join(command) + stdout = "" + stderr = "" + output_files: List[Path] = [] + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + stdout = process.stdout + stderr = process.stderr + + output_files.append(output_synergy_scores_file.resolve()) + if output_plot_file: + output_files.append(output_plot_file.resolve()) + + except subprocess.CalledProcessError as e: + stderr = e.stderr + stdout = e.stdout + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "error": f"R script failed with exit code {e.returncode}", + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Rscript command not found. Please ensure R is installed and in your PATH.", + "error": "Rscript not found", + "output_files": [], + } + finally: + # Clean up the temporary R script + if r_script_path.exists(): + r_script_path.unlink() + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f8d4e6aea87af9f28944d19ac33b965b7217e593 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/bioconductor-synergyfinder_server.py') +SERVER_NAME = 'biosci_bioconductor_synergyfinder' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..8e6c8a002207906c0d1641a42eb4304a749c73fd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-synergyfinder: + build: . + image: mcp-bioconductor-synergyfinder:latest + container_name: mcp-bioconductor-synergyfinder + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-synergyfinder + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c221f03da574ed5fe83791f5c07dd76b6adbb6da --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-synergyfinder + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-synergyfinder/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..dac3a2ffe3f57dfb9c87fd6fc47651f18d210633 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-tpsvg via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-tpsvg -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-tpsvg_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-tpsvg_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-tpsvg_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/__pycache__/bioconductor-tpsvg_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/__pycache__/bioconductor-tpsvg_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cceccaee96af938f66dbd47aeae206d26512ff9f Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/__pycache__/bioconductor-tpsvg_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_server.py new file mode 100644 index 0000000000000000000000000000000000000000..06cb835bbbe811b4509fbb07e00bc7770d6a3eae --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_server.py @@ -0,0 +1,198 @@ +import subprocess +import tempfile +import logging +from pathlib import Path +from typing import Dict, List + +# It is assumed that the mcp.tool decorator is available in the execution environment. +# For local testing, you can use a placeholder decorator. +# +# class McpModule: +# def tool(self): +# def decorator(func): +# return func +# return decorator +# mcp = McpModule() + +log = logging.getLogger(__name__) + +@mcp.tool() +def tpsvg( + counts_matrix: Path, + spatial_coordinates: Path, + output_results_file: Path, + n_cores: int = 1, + counts_separator: str = "tab", + coords_separator: str = "tab", +) -> Dict[str, any]: + """ + Detects spatially variable genes using thin plate spline models with tpSVG. + + This tool wraps the Bioconductor package 'tpSVG'. It takes a gene expression + count matrix and spatial coordinates as input, runs the tpSVG analysis, and + outputs a table of statistics for each gene, including p-values and ranks. + This tool requires an R environment with the 'tpSVG', 'SpatialExperiment', + 'SummarizedExperiment', 'BiocParallel', and 'argparse' packages installed. + + Args: + counts_matrix: Path to the count matrix file. Genes should be in rows + and spots/cells in columns. The file should have a header and row names. + spatial_coordinates: Path to the spatial coordinates file. Spots/cells + should be in rows and spatial dimensions (e.g., 'x', 'y') in columns. + The file should have a header and row names that match the column + names of the counts_matrix. + output_results_file: Path to save the output results table in TSV format. + n_cores: Number of cores to use for parallel processing. Defaults to 1. + counts_separator: Separator for the counts matrix file. Can be 'tab' or + 'comma'. Defaults to 'tab'. + coords_separator: Separator for the spatial coordinates file. Can be + 'tab' or 'comma'. Defaults to 'tab'. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list + of output file paths. + """ + # 1. Input Validation + if not counts_matrix.is_file(): + raise FileNotFoundError(f"Counts matrix file not found: {counts_matrix}") + if not spatial_coordinates.is_file(): + raise FileNotFoundError(f"Spatial coordinates file not found: {spatial_coordinates}") + + if n_cores <= 0: + raise ValueError("n_cores must be a positive integer.") + + valid_separators = ["tab", "comma"] + if counts_separator not in valid_separators: + raise ValueError(f"counts_separator must be one of {valid_separators}") + if coords_separator not in valid_separators: + raise ValueError(f"coords_separator must be one of {valid_separators}") + + # Ensure the output directory exists + output_results_file.parent.mkdir(parents=True, exist_ok=True) + + # 2. R Script Content + # This script is self-contained and will be executed by Rscript. + r_script_content = """ + # Ensure argparse is available, install if not + if (!requireNamespace("argparse", quietly = TRUE)) { + install.packages("argparse", repos = "http://cran.us.r-project.org") + } + + # Load necessary libraries quietly + suppressPackageStartupMessages(library(argparse)) + suppressPackageStartupMessages(library(tpSVG)) + suppressPackageStartupMessages(library(SpatialExperiment)) + suppressPackageStartupMessages(library(SummarizedExperiment)) + suppressPackageStartupMessages(library(BiocParallel)) + + # Setup argument parser + parser <- ArgumentParser(description="Run tpSVG analysis from command line.") + parser$add_argument("--counts", type="character", required=TRUE, help="Path to the count matrix file.") + parser$add_argument("--coords", type="character", required=TRUE, help="Path to the spatial coordinates file.") + parser$add_argument("--output", type="character", required=TRUE, help="Path for the output results TSV file.") + parser$add_argument("--n_cores", type="integer", default=1, help="Number of cores for parallel processing.") + parser$add_argument("--sep_counts", type="character", default="tab", help="Separator for the counts file ('tab' or 'comma').") + parser$add_argument("--sep_coords", type="character", default="tab", help="Separator for the coordinates file ('tab' or 'comma').") + + # Parse arguments + args <- parser$parse_args() + + # Determine separators + sep_counts_char <- ifelse(args$sep_counts == "comma", ",", "\\t") + sep_coords_char <- ifelse(args$sep_coords == "comma", ",", "\\t") + + # Read input data + message("Reading counts matrix from: ", args$counts) + counts_matrix <- as.matrix(read.csv(args$counts, sep=sep_counts_char, row.names=1, check.names=FALSE)) + + message("Reading spatial coordinates from: ", args$coords) + spatial_coords <- read.csv(args$coords, sep=sep_coords_char, row.names=1, check.names=FALSE) + + # Data validation + if (ncol(counts_matrix) != nrow(spatial_coords)) { + stop(paste("Number of columns in counts matrix (", ncol(counts_matrix), ") must equal number of rows in coordinates matrix (", nrow(spatial_coords), ").")) + } + if (!all(colnames(counts_matrix) %in% rownames(spatial_coords))) { + stop("Some column names of the count matrix are not present in the row names of the spatial coordinates matrix.") + } + # Reorder coordinates to match counts matrix columns + spatial_coords <- spatial_coords[colnames(counts_matrix), , drop = FALSE] + + # Create SpatialExperiment object + message("Creating SpatialExperiment object...") + spe <- SpatialExperiment( + assays = list(counts = counts_matrix), + spatialCoords = as.matrix(spatial_coords) + ) + + # Setup parallel processing + if (args$n_cores > 1) { + message("Setting up parallel processing with ", args$n_cores, " cores.") + bpparam <- MulticoreParam(workers = args$n_cores) + } else { + message("Using serial processing.") + bpparam <- SerialParam() + } + + # Run tpSVG analysis + message("Running tpSVG...") + set.seed(12345) # for reproducibility + spe <- tpSVG(spe, BPPARAM = bpparam) + + # Extract and save results + results_df <- as.data.frame(rowData(spe)) + message("Saving results to: ", args$output) + write.table(results_df, file=args$output, sep="\\t", row.names=TRUE, col.names=NA, quote=FALSE) + + message("tpSVG analysis complete.") + """ + + # 3. Subprocess Execution + # Use a temporary file for the R script to keep the execution environment clean. + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False) as r_script_file: + r_script_path = Path(r_script_file.name) + r_script_file.write(r_script_content) + + cmd = [ + "Rscript", + str(r_script_path), + "--counts", str(counts_matrix.resolve()), + "--coords", str(spatial_coordinates.resolve()), + "--output", str(output_results_file.resolve()), + "--n_cores", str(n_cores), + "--sep_counts", counts_separator, + "--sep_coords", coords_separator, + ] + + command_executed = " ".join(cmd) + log.info(f"Executing command: {command_executed}") + + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + # 4. Structured Result Return + return { + "command_executed": command_executed, + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [str(output_results_file)] + } + except subprocess.CalledProcessError as e: + log.error(f"tpSVG execution failed with return code {e.returncode}") + log.error(f"Stdout: {e.stdout}") + log.error(f"Stderr: {e.stderr}") + raise RuntimeError( + f"tpSVG execution failed. Return code: {e.returncode}\n" + f"Command: '{command_executed}'\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) + finally: + # Clean up the temporary R script + if r_script_path.exists(): + r_script_path.unlink() \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..deb770bc6b688f142e0d4de7658b748dad573118 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/bioconductor-tpsvg_server.py') +SERVER_NAME = 'biosci_bioconductor_tpsvg' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..bda089c9575ec2261af6c1b6b6373976b76a9ba1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-tpsvg: + build: . + image: mcp-bioconductor-tpsvg:latest + container_name: mcp-bioconductor-tpsvg + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-tpsvg + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1afff9a49b4351dd19b89a79194637acace25fca --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-tpsvg + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-tpsvg/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9eba1236c15352fa72134cd39a1fd198f2d672ad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-variantannotation via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-variantannotation -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-variantannotation_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-variantannotation_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-variantannotation_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_server.py new file mode 100644 index 0000000000000000000000000000000000000000..fb0afbe77a9a71dd6c0f6b93919e8d6f259627f4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_server.py @@ -0,0 +1,353 @@ +import subprocess +import os +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def filter_vcf( + input_vcf: str, + output_vcf: str, + genome: str, + yield_size: int = 100000, + filter_expression: str = "nchar(ref(x)) == 1 & nchar(alt(x)) == 1" +): + """ + Filters a VCF file using Bioconductor's VariantAnnotation filterVcf function. + + Args: + input_vcf: Path to the input VCF file. + output_vcf: Path where the filtered VCF will be saved. + genome: Genome identifier (e.g., 'hg38', 'hg19'). + yield_size: Number of records to read at a time. + filter_expression: R expression used for filtering (default filters for SNPs). + """ + input_path = Path(input_vcf) + if not input_path.exists(): + return {"error": f"Input file {input_vcf} not found."} + + r_script = f""" + library(VariantAnnotation) + input_file <- "{input_vcf}" + output_file <- "{output_vcf}" + + # Define filter rule + filt <- FilterRules(list(my_filter = function(x) {{ + {filter_expression} + }})) + + filterVcf(input_file, genome = "{genome}", destination = output_file, + filters = filt, yieldSize = {yield_size}) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"VariantAnnotation::filterVcf on {input_vcf}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_vcf] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def locate_variants( + vcf_path: str, + txdb_package: str, + output_tsv: str, + genome: str = "hg38" +): + """ + Annotates variants with genomic context (coding, intron, fiveUTR, threeUTR, intergenic, spliceSite, promoter). + + Args: + vcf_path: Path to the VCF file. + txdb_package: The Bioconductor TxDb package to use (e.g., 'TxDb.Hsapiens.UCSC.hg38.knownGene'). + output_tsv: Path to save the annotation results as TSV. + genome: Genome identifier. + """ + if not Path(vcf_path).exists(): + return {"error": f"VCF file {vcf_path} not found."} + + r_script = f""" + library(VariantAnnotation) + library({txdb_package}) + + vcf <- readVcf("{vcf_path}", "{genome}") + txdb <- {txdb_package} + + # Locate variants + loc <- locateVariants(vcf, txdb, AllVariants()) + + # Convert to data frame and write + write.table(as.data.frame(loc), file="{output_tsv}", sep="\\t", row.names=FALSE, quote=FALSE) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"VariantAnnotation::locateVariants using {txdb_package}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_tsv] + } + except subprocess.CalledProcessError as e: + return {"error": "R execution failed", "stderr": e.stderr} + +@mcp.tool() +def predict_coding_effects( + vcf_path: str, + txdb_package: str, + bsgenome_package: str, + output_tsv: str, + genome: str = "hg38" +): + """ + Predicts amino acid consequences for variants in coding regions. + + Args: + vcf_path: Path to the VCF file. + txdb_package: The TxDb package (e.g., 'TxDb.Hsapiens.UCSC.hg38.knownGene'). + bsgenome_package: The BSgenome package (e.g., 'BSgenome.Hsapiens.UCSC.hg38'). + output_tsv: Path to save the coding predictions. + genome: Genome identifier. + """ + if not Path(vcf_path).exists(): + return {"error": f"VCF file {vcf_path} not found."} + + r_script = f""" + library(VariantAnnotation) + library({txdb_package}) + library({bsgenome_package}) + + vcf <- readVcf("{vcf_path}", "{genome}") + txdb <- {txdb_package} + seq <- {bsgenome_package} + + # Predict coding + res <- predictCoding(vcf, txdb, seq) + + # Write results + write.table(as.data.frame(res), file="{output_tsv}", sep="\\t", row.names=FALSE, quote=FALSE) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": "VariantAnnotation::predictCoding", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_tsv] + } + except subprocess.CalledProcessError as e: + return {"error": "R execution failed", "stderr": e.stderr} + +@mcp.tool() +def summarize_variants_by_region( + vcf_path: str, + txdb_package: str, + output_tsv: str, + region_type: str = "genes", + genome: str = "hg38" +): + """ + Summarizes variant counts by genomic regions (genes, exons, etc.). + + Args: + vcf_path: Path to the VCF file. + txdb_package: The TxDb package to use. + output_tsv: Path to save the summary. + region_type: Type of region to summarize by ('genes', 'exons', 'transcripts'). + genome: Genome identifier. + """ + if not Path(vcf_path).exists(): + return {"error": f"VCF file {vcf_path} not found."} + + r_script = f""" + library(VariantAnnotation) + library({txdb_package}) + + vcf <- readVcf("{vcf_path}", "{genome}") + txdb <- {txdb_package} + + regions <- if("{region_type}" == "genes") {{ + genes(txdb) + }} else if("{region_type}" == "exons") {{ + exons(txdb) + }} else {{ + transcripts(txdb) + }} + + counts <- summarizeVariants(regions, vcf, mode=IntersectionStrict()) + + # Extract assay data (counts) + res_df <- as.data.frame(assays(counts)$counts) + write.table(res_df, file="{output_tsv}", sep="\\t", row.names=TRUE, quote=FALSE) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"VariantAnnotation::summarizeVariants by {region_type}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_tsv] + } + except subprocess.CalledProcessError as e: + return {"error": "R execution failed", "stderr": e.stderr} + +@mcp.tool() +def genotype_to_snp_matrix( + vcf_path: str, + output_prefix: str, + genome: str = "hg38", + uncertain: bool = False +): + """ + Converts VCF genotypes to a SnpMatrix object (useful for GWAS/PLINK-like analysis). + + Args: + vcf_path: Path to the VCF file. + output_prefix: Prefix for the output .csv files (genotypes and map). + genome: Genome identifier. + uncertain: Whether to allow uncertain genotypes. + """ + if not Path(vcf_path).exists(): + return {"error": f"VCF file {vcf_path} not found."} + + uncertain_r = "TRUE" if uncertain else "FALSE" + + r_script = f""" + library(VariantAnnotation) + vcf <- readVcf("{vcf_path}", "{genome}") + res <- genotypeToSnpMatrix(vcf, uncertain={uncertain_r}) + + # Save matrix and map + write.csv(as(res$genotypes, "character"), file=paste0("{output_prefix}", "_genotypes.csv")) + write.csv(as.data.frame(res$map), file=paste0("{output_prefix}", "_map.csv")) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": "VariantAnnotation::genotypeToSnpMatrix", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [f"{output_prefix}_genotypes.csv", f"{output_prefix}_map.csv"] + } + except subprocess.CalledProcessError as e: + return {"error": "R execution failed", "stderr": e.stderr} + +@mcp.tool() +def get_vcf_info_summary( + vcf_path: str, + genome: str = "hg38" +): + """ + Returns a summary of the VCF header, including INFO and FORMAT fields. + + Args: + vcf_path: Path to the VCF file. + genome: Genome identifier. + """ + if not Path(vcf_path).exists(): + return {"error": f"VCF file {vcf_path} not found."} + + r_script = f""" + library(VariantAnnotation) + hdr <- scanVcfHeader("{vcf_path}") + cat("--- INFO FIELDS ---\\n") + print(info(hdr)) + cat("\\n--- FORMAT FIELDS ---\\n") + print(geno(hdr)) + cat("\\n--- SAMPLES ---\\n") + print(samples(hdr)) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": "VariantAnnotation::scanVcfHeader", + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"error": "R execution failed", "stderr": e.stderr} + +@mcp.tool() +def write_vcf_subset( + input_vcf: str, + output_vcf: str, + seqnames: List[str], + genome: str = "hg38" +): + """ + Subsets a VCF file by chromosome/sequence names and writes a new VCF. + + Args: + input_vcf: Path to input VCF. + output_vcf: Path to output VCF. + seqnames: List of chromosome names to keep (e.g., ["chr1", "chr2"]). + genome: Genome identifier. + """ + if not Path(input_vcf).exists(): + return {"error": f"Input file {input_vcf} not found."} + + seqs_r = 'c("' + '","'.join(seqnames) + '")' + + r_script = f""" + library(VariantAnnotation) + vcf <- readVcf("{input_vcf}", "{genome}") + vcf_subset <- vcf[seqnames(vcf) %in% {seqs_r}, ] + writeVcf(vcf_subset, "{output_vcf}") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"VariantAnnotation subsetting for {seqnames}", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_vcf] + } + except subprocess.CalledProcessError as e: + return {"error": "R execution failed", "stderr": e.stderr} \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..aa5c8e194ec535d9ab08f01ac72c59d04e35ff79 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/bioconductor-variantannotation_server.py') +SERVER_NAME = 'biosci_bioconductor_variantannotation' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..fbaa53e15ac60bfa3e1f252a53099b3391f9161c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-variantannotation: + build: . + image: mcp-bioconductor-variantannotation:latest + container_name: mcp-bioconductor-variantannotation + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-variantannotation + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..53cdef0f6c570e71282a7d3bc9e4ee7d14fa1fa1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-variantannotation + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-variantannotation/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..84b464a94d4efe7df20dc0150d5565a6d9a43afc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-xeniumio via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-xeniumio -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-xeniumio_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-xeniumio_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-xeniumio_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/__pycache__/bioconductor-xeniumio_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/__pycache__/bioconductor-xeniumio_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f5861c36921077ae843cf335d9864bb87f269ab0 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/__pycache__/bioconductor-xeniumio_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0c1f838a060f5d54ef6a8613c66f3d1f4fab1f30 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_server.py @@ -0,0 +1,185 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Dict, Any + +@mcp.tool() +def read_xenium( + dir_path: str, + output_rds: str, + sample_id: str = "sample01", + type: str = "h5", + data_type: str = "counts", + images: Optional[List[str]] = None, + load: bool = True, +) -> Dict[str, Any]: + """ + Import 10X Xenium data into a SpatialExperiment object and save it as an RDS file. + + Args: + dir_path: Path to the directory containing Xenium output files (e.g., cell_feature_matrix.h5, cells.parquet). + output_rds: Path where the resulting SpatialExperiment RDS file will be saved. + sample_id: A unique identifier for the sample. Defaults to "sample01". + type: The format of the expression data to read. Options: 'h5', 'mtx', 'parquet'. Defaults to 'h5'. + data_type: The type of data to import. Defaults to 'counts'. + images: Optional list of image names to include (e.g., ['morphology_focus', 'morphology_mip']). + load: Whether to load the data into memory. Defaults to True. + """ + # Input validation + input_dir = Path(dir_path) + if not input_dir.is_dir(): + return {"error": f"Input directory does not exist: {dir_path}"} + + output_path = Path(output_rds) + if not output_path.parent.exists(): + return {"error": f"Output directory does not exist: {output_path.parent}"} + + if type not in ["h5", "mtx", "parquet"]: + return {"error": f"Invalid type '{type}'. Must be one of: 'h5', 'mtx', 'parquet'"} + + # Prepare R arguments + images_arg = "NULL" + if images: + images_arg = 'c(' + ', '.join([f'"{i}"' for i in images]) + ')' + + load_r = "TRUE" if load else "FALSE" + + # Construct R script + r_script = f""" + library(XeniumIO) + tryCatch({{ + spe <- readXenium( + dir = "{dir_path}", + sample_id = "{sample_id}", + type = "{type}", + data_type = "{data_type}", + images = {images_arg}, + load = {load_r} + ) + saveRDS(spe, "{output_rds}") + cat("Successfully saved SpatialExperiment to {output_rds}") + }}, error = function(e) {{ + stop(e$message) + }}) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + check=True, + capture_output=True, + text=True + ) + return { + "command_executed": f"readXenium(dir='{dir_path}', ...)", + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_rds] + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr, + "command_executed": e.cmd + } + +@mcp.tool() +def get_xenium_output_summary( + dir_path: str +) -> Dict[str, Any]: + """ + Identify and list the standard Xenium output files present in a directory using XeniumOutput. + + Args: + dir_path: Path to the directory containing Xenium output files. + """ + input_dir = Path(dir_path) + if not input_dir.is_dir(): + return {"error": f"Input directory does not exist: {dir_path}"} + + # Construct R script to use XeniumOutput class and return JSON + r_script = f""" + library(XeniumIO) + library(jsonlite) + tryCatch({{ + xo <- XeniumOutput("{dir_path}") + # Extract file paths from the XeniumOutput object + file_list <- as.list(xo@files) + cat(toJSON(file_list, auto_unbox = TRUE)) + }}, error = function(e) {{ + stop(e$message) + }}) + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + check=True, + capture_output=True, + text=True + ) + return { + "command_executed": f"XeniumOutput('{dir_path}')", + "detected_files": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": "R execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def xenium_to_spatial_experiment( + dir_path: str, + output_rds: str, + sample_id: str = "sample01" +) -> Dict[str, Any]: + """ + A high-level wrapper to quickly convert a Xenium output directory into a SpatialExperiment RDS file. + This uses the default settings (h5 format, all images). + + Args: + dir_path: Path to the Xenium output directory. + output_rds: Path to save the resulting RDS file. + sample_id: Unique identifier for the sample. + """ + # This is a simplified wrapper around read_xenium + return read_xenium( + dir_path=dir_path, + output_rds=output_rds, + sample_id=sample_id, + type="h5", + load=True + ) + +@mcp.tool() +def check_xeniumio_installation() -> Dict[str, Any]: + """ + Check if the XeniumIO R package and its dependencies are correctly installed. + """ + r_script = """ + if (!requireNamespace("XeniumIO", quietly = TRUE)) { + stop("Package 'XeniumIO' is not installed.") + } + cat("XeniumIO version: ", as.character(packageVersion("XeniumIO")), "\\n") + cat("Dependencies loaded successfully.") + """ + + try: + result = subprocess.run( + ["Rscript", "-e", r_script], + check=True, + capture_output=True, + text=True + ) + return { + "status": "installed", + "details": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "status": "not_installed", + "error": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f811c3dc7f079d3af039ea10a0037f3320cd843e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/bioconductor-xeniumio_server.py') +SERVER_NAME = 'biosci_bioconductor_xeniumio' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c94a70db80c9a52f846e2ee279220c2574d27f29 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-xeniumio: + build: . + image: mcp-bioconductor-xeniumio:latest + container_name: mcp-bioconductor-xeniumio + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-xeniumio + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..55b5eb91365f0ba0660f02364780663f41986a95 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-xeniumio + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xeniumio/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..300f89e40e09a3aa8b27e06ad5193bae60eb31ad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bioconductor-xvector via conda (e.g., from bioconda) +RUN conda install -c bioconda bioconductor-xvector -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bioconductor-xvector_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bioconductor-xvector_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bioconductor-xvector_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a9f07f548e02aab56c64b3595a160e28e2e21b61 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_server.py @@ -0,0 +1,126 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# MCP-ready code for bioconductor-xvector, which is an R library. +# The tool provided is a wrapper for Rscript, the command-line interface to R, +# which is used to execute scripts that might use the XVector library. + +@mcp.tool() +def run_rscript( + script_file: Optional[Path] = None, + expressions: Optional[List[str]] = None, + script_args: Optional[List[str]] = None, + vanilla: bool = False, + verbose: bool = False, + default_packages: Optional[str] = None, + save: bool = False, + no_environ: bool = False, + no_site_file: bool = False, + no_init_file: bool = False, + restore: bool = False, +) -> Dict[str, Any]: + """ + Executes an R script or R expressions using Rscript. + + This tool serves as a wrapper for the Rscript command-line utility. The + bioconductor-xvector package is a library and does not provide its own direct + command-line interface. This tool allows for running R scripts that may + utilize the XVector library. You must provide either a script file or one + or more expressions to execute. + + Args: + script_file: Path to an R script file to be executed. + expressions: A list of R expressions to be executed. Use instead of 'script_file'. + script_args: A list of arguments to be passed to the R script. + vanilla: Combines --no-save, --no-restore, --no-site-file, --no-init-file, and --no-environ. + If True, it overrides the individual flags. + verbose: Print information on progress. + default_packages: A comma-separated list of package names to be loaded by default. + save: Save the workspace at the end of the session. Ignored if 'vanilla' is True. + no_environ: Don't read the site and user environment files. Ignored if 'vanilla' is True. + no_site_file: Don't read the site-wide Rprofile. Ignored if 'vanilla' is True. + no_init_file: Don't read the user R profile. Ignored if 'vanilla' is True. + restore: Restore previously saved objects at startup. Ignored if 'vanilla' is True. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not script_file and not expressions: + raise ValueError("Either 'script_file' or 'expressions' must be provided.") + if script_file and expressions: + raise ValueError("'script_file' and 'expressions' are mutually exclusive.") + if script_file: + if not script_file.is_file(): + raise FileNotFoundError(f"Script file not found: {script_file}") + + # --- Command Construction --- + cmd = ["Rscript"] + + # Handle --vanilla logic, which is a combination of other flags + if vanilla: + cmd.append("--vanilla") + else: + if save: + cmd.append("--save") + if no_environ: + cmd.append("--no-environ") + if no_site_file: + cmd.append("--no-site-file") + if no_init_file: + cmd.append("--no-init-file") + if restore: + cmd.append("--restore") + + if verbose: + cmd.append("--verbose") + + if default_packages: + cmd.extend(["--default-packages", default_packages]) + + # Add script file or expressions to execute + if script_file: + cmd.append(str(script_file)) + elif expressions: + for expr in expressions: + cmd.extend(["-e", expr]) + + # Add arguments for the script itself + if script_args: + cmd.extend(script_args) + + command_executed = " ".join(cmd) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + stdout = result.stdout + stderr = result.stderr + except FileNotFoundError: + # This error occurs if 'Rscript' is not in the system's PATH + raise RuntimeError("Rscript not found. Please ensure R is installed and in the system's PATH.") + except subprocess.CalledProcessError as e: + # This error occurs if the R script returns a non-zero exit code + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "error": "R script execution failed with a non-zero exit code." + } + + # --- Structured Result Return --- + # Rscript itself does not define output files. Any generated files are + # determined by the code within the executed script. + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..be0ced6a2a040ed356bc108573569d95b347022a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/bioconductor-xvector_server.py') +SERVER_NAME = 'biosci_bioconductor_xvector' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5a5367493fffc3a6cb5c8110673556796cf375d6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bioconductor-xvector: + build: . + image: mcp-bioconductor-xvector:latest + container_name: mcp-bioconductor-xvector + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bioconductor-xvector + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fb31b4b13d7d554be35fbdf864159c5e39fd7541 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bioconductor-xvector + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bioconductor-xvector/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e618d5ca452137ae2321ec6a1288fb5f692d1015 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install blast via conda (e.g., from bioconda) +RUN conda install -c bioconda blast -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/blast_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/blast_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/blast_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_server.py new file mode 100644 index 0000000000000000000000000000000000000000..7f6fd4976f4d3f53bd2608ae74d9661c089fc1fc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_server.py @@ -0,0 +1,341 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, List, Dict, Any + +# MCP decorator is commented out as per instructions +# @mcp.tool() +def makeblastdb( + in_file: Path, + dbtype: str, + out: str, + title: Optional[str] = None, + parse_seqids: bool = False, + hash_index: bool = False, + logfile: Optional[Path] = None, + taxid: Optional[int] = None, + taxid_map: Optional[Path] = None, + max_file_sz: Optional[str] = None, +) -> Dict[str, Any]: + """ + Creates a BLAST database from a FASTA file. + + This function wraps the 'makeblastdb' command from the BLAST+ suite. + It is used to format protein or nucleotide FASTA files into a searchable database. + + Args: + in_file: Input FASTA file to be formatted. + dbtype: Molecule type of the input sequences ('nucl' for nucleotide, 'prot' for protein). + out: The base name for the new BLAST database. + title: Title for the BLAST database. + parse_seqids: If True, parse sequence identifiers in the FASTA file. + hash_index: If True, create a hash index for the database. + logfile: File to which the command's output should be redirected. + taxid: Taxonomy ID to assign to all sequences. + taxid_map: Text file mapping sequence IDs to taxonomy IDs. + max_file_sz: Maximum size of database files in bytes (e.g., '1GB'). + + Returns: + A dictionary containing the execution details and database name. + """ + # Input validation + if not in_file.is_file(): + raise FileNotFoundError(f"Input file not found: {in_file}") + if dbtype not in ["nucl", "prot"]: + raise ValueError("dbtype must be either 'nucl' or 'prot'.") + if taxid_map and not taxid_map.is_file(): + raise FileNotFoundError(f"Taxonomy ID map file not found: {taxid_map}") + + command = [ + "makeblastdb", + "-in", str(in_file), + "-dbtype", dbtype, + "-out", out, + ] + + if title: + command.extend(["-title", title]) + if parse_seqids: + command.append("-parse_seqids") + if hash_index: + command.append("-hash_index") + if logfile: + command.extend(["-logfile", str(logfile)]) + if taxid is not None: + command.extend(["-taxid", str(taxid)]) + if taxid_map: + command.extend(["-taxid_map", str(taxid_map)]) + if max_file_sz: + command.extend(["-max_file_sz", max_file_sz]) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + encoding='utf-8' + ) + # Successful execution, output files are created with 'out' as basename + # We can't easily list them all, so we return the base name. + output_files = {"database_name": out} + if logfile: + output_files["log_file"] = str(logfile) + + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except FileNotFoundError: + raise RuntimeError("`makeblastdb` command not found. Is BLAST+ installed and in your PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "makeblastdb execution failed.", + "return_code": e.returncode, + } + +# @mcp.tool() +def blastn( + query: Path, + out: Path, + db: Optional[str] = None, + subject: Optional[Path] = None, + task: str = "megablast", + evalue: float = 10.0, + outfmt: str = "0", + num_threads: int = 1, + max_target_seqs: int = 500, + word_size: Optional[int] = None, + gapopen: Optional[int] = None, + gapextend: Optional[int] = None, + penalty: Optional[int] = None, + reward: Optional[int] = None, + strand: str = "both", + remote: bool = False, + ungapped: bool = False, + html: bool = False, +) -> Dict[str, Any]: + """ + Performs a nucleotide-nucleotide BLAST search. + + This function wraps the 'blastn' command. It searches a nucleotide query + sequence(s) against a nucleotide sequence database. + + Args: + query: Input file with query nucleotide sequences in FASTA format. + out: Output file for the BLAST report. + db: Name of the BLAST database to search against. + subject: Subject sequence(s) to search against (alternative to -db). + task: Pre-configured search task ('blastn', 'blastn-short', 'dc-megablast', 'megablast'). + evalue: Expectation value (E-value) threshold for saving hits. + outfmt: Output format type. See BLAST+ documentation for format specifiers. + num_threads: Number of threads (CPUs) to use in the search. + max_target_seqs: Maximum number of aligned sequences to keep. + word_size: Word size for the initial match. + gapopen: Cost to open a gap. + gapextend: Cost to extend a gap. + penalty: Penalty for a nucleotide mismatch. + reward: Reward for a nucleotide match. + strand: Query strand(s) to search ('both', 'minus', 'plus'). + remote: If True, execute search remotely on NCBI servers. + ungapped: If True, perform an ungapped alignment. + html: If True, produce HTML output. + + Returns: + A dictionary containing the execution details and output file path. + """ + # Input validation + if not query.is_file(): + raise FileNotFoundError(f"Query file not found: {query}") + if db is None and subject is None: + raise ValueError("Either 'db' or 'subject' must be provided.") + if db and subject: + raise ValueError("Provide either 'db' or 'subject', not both.") + if subject and not subject.is_file(): + raise FileNotFoundError(f"Subject file not found: {subject}") + if strand not in ["both", "minus", "plus"]: + raise ValueError("strand must be 'both', 'minus', or 'plus'.") + if task not in ["blastn", "blastn-short", "dc-megablast", "megablast", "rmblastn"]: + raise ValueError(f"Invalid task '{task}' for blastn.") + if num_threads < 1: + raise ValueError("num_threads must be a positive integer.") + + command = [ + "blastn", + "-query", str(query), + "-out", str(out), + "-task", task, + "-evalue", str(evalue), + "-outfmt", outfmt, + "-num_threads", str(num_threads), + "-max_target_seqs", str(max_target_seqs), + "-strand", strand, + ] + + if db: + command.extend(["-db", db]) + if subject: + command.extend(["-subject", str(subject)]) + if word_size is not None: + command.extend(["-word_size", str(word_size)]) + if gapopen is not None: + command.extend(["-gapopen", str(gapopen)]) + if gapextend is not None: + command.extend(["-gapextend", str(gapextend)]) + if penalty is not None: + command.extend(["-penalty", str(penalty)]) + if reward is not None: + command.extend(["-reward", str(reward)]) + if remote: + command.append("-remote") + if ungapped: + command.append("-ungapped") + if html: + command.append("-html") + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + encoding='utf-8' + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": {"report": str(out)}, + } + except FileNotFoundError: + raise RuntimeError("`blastn` command not found. Is BLAST+ installed and in your PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "blastn execution failed.", + "return_code": e.returncode, + } + +# @mcp.tool() +def blastp( + query: Path, + out: Path, + db: Optional[str] = None, + subject: Optional[Path] = None, + task: str = "blastp", + evalue: float = 10.0, + outfmt: str = "0", + num_threads: int = 1, + max_target_seqs: int = 500, + word_size: Optional[int] = None, + gapopen: Optional[int] = None, + gapextend: Optional[int] = None, + matrix: str = "BLOSUM62", + comp_based_stats: str = "2", + remote: bool = False, + ungapped: bool = False, + html: bool = False, +) -> Dict[str, Any]: + """ + Performs a protein-protein BLAST search. + + This function wraps the 'blastp' command. It searches a protein query + sequence(s) against a protein sequence database. + + Args: + query: Input file with query protein sequences in FASTA format. + out: Output file for the BLAST report. + db: Name of the BLAST database to search against. + subject: Subject sequence(s) to search against (alternative to -db). + task: Pre-configured search task ('blastp', 'blastp-fast', 'blastp-short'). + evalue: Expectation value (E-value) threshold for saving hits. + outfmt: Output format type. See BLAST+ documentation for format specifiers. + num_threads: Number of threads (CPUs) to use in the search. + max_target_seqs: Maximum number of aligned sequences to keep. + word_size: Word size for the initial match. + gapopen: Cost to open a gap. + gapextend: Cost to extend a gap. + matrix: Scoring matrix to use (e.g., 'BLOSUM62', 'PAM30'). + comp_based_stats: Use composition-based statistics ('0', '1', '2', or '3'). + remote: If True, execute search remotely on NCBI servers. + ungapped: If True, perform an ungapped alignment. + html: If True, produce HTML output. + + Returns: + A dictionary containing the execution details and output file path. + """ + # Input validation + if not query.is_file(): + raise FileNotFoundError(f"Query file not found: {query}") + if db is None and subject is None: + raise ValueError("Either 'db' or 'subject' must be provided.") + if db and subject: + raise ValueError("Provide either 'db' or 'subject', not both.") + if subject and not subject.is_file(): + raise FileNotFoundError(f"Subject file not found: {subject}") + if task not in ["blastp", "blastp-fast", "blastp-short"]: + raise ValueError(f"Invalid task '{task}' for blastp.") + if num_threads < 1: + raise ValueError("num_threads must be a positive integer.") + + command = [ + "blastp", + "-query", str(query), + "-out", str(out), + "-task", task, + "-evalue", str(evalue), + "-outfmt", outfmt, + "-num_threads", str(num_threads), + "-max_target_seqs", str(max_target_seqs), + "-matrix", matrix, + "-comp_based_stats", comp_based_stats, + ] + + if db: + command.extend(["-db", db]) + if subject: + command.extend(["-subject", str(subject)]) + if word_size is not None: + command.extend(["-word_size", str(word_size)]) + if gapopen is not None: + command.extend(["-gapopen", str(gapopen)]) + if gapextend is not None: + command.extend(["-gapextend", str(gapextend)]) + if remote: + command.append("-remote") + if ungapped: + command.append("-ungapped") + if html: + command.append("-html") + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + encoding='utf-8' + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": {"report": str(out)}, + } + except FileNotFoundError: + raise RuntimeError("`blastp` command not found. Is BLAST+ installed and in your PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "blastp execution failed.", + "return_code": e.returncode, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0e6c72373ae20d3236d979d16fa79290632c9cf9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/blast_server.py') +SERVER_NAME = 'biosci_blast' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..584a513c193f074997f9910a0f401e62c2399081 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-blast: + build: . + image: mcp-blast:latest + container_name: mcp-blast + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=blast + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..52bd9ef7155d746e85f7965e26c24e5f4a19eca9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - blast + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_blast/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bowtie/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bowtie/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a94f45ccfd6430e8677fdd9d183a45bb30cda4a9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bowtie/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bowtie + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bowtie/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bowtie/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bowtie/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e944719ad7669aebdd1a19282297c0b43c4d4f1d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install bx-python via conda (e.g., from bioconda) +RUN conda install -c bioconda bx-python -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/bx-python_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/bx-python_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/bx-python_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d276c372a418c2e4b24e28a0483cff3c95957996 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_server.py @@ -0,0 +1,353 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# Note: The bx-python package is a suite of individual command-line scripts. +# Each script is wrapped as a separate MCP tool function. The following is a +# representative selection of these tools. + +@mcp.tool() +def bed_intersect( + bed1: Path, + bed2: Path, + output_file: Optional[Path] = None, + find_intersections: bool = False, + find_non_intersections: bool = False, + count_intersections: bool = False, + min_overlap_cols: int = 1, + preserve_intervals: bool = True, +) -> dict: + """ + Finds intersecting regions between two BED files. + + This tool corresponds to the `bed_intersect.py` script. + It can report the intersections, non-intersections, or just the count. + """ + # Input validation + if not bed1.is_file(): + raise FileNotFoundError(f"Input BED file not found: {bed1}") + if not bed2.is_file(): + raise FileNotFoundError(f"Second input BED file not found: {bed2}") + if find_intersections and find_non_intersections: + raise ValueError("Cannot specify both --find-intersections (-i) and --find-non-intersections (-I).") + if min_overlap_cols < 1: + raise ValueError("--min-overlap-cols must be a positive integer.") + + cmd = ["bed_intersect", str(bed1), str(bed2)] + + if find_intersections: + cmd.append("-i") + if find_non_intersections: + cmd.append("-I") + if count_intersections: + cmd.append("-c") + if min_overlap_cols != 1: + cmd.extend(["-m", str(min_overlap_cols)]) + if not preserve_intervals: + cmd.append("-p") # The script's -p flag means "don't chop up intervals", which is counter-intuitive. We reverse it for clarity. + + command_executed = " ".join(cmd) + output_files = [] + stdout_capture = "" + stderr_capture = "" + + try: + if output_file: + output_files.append(str(output_file)) + with open(output_file, "w") as f_out: + result = subprocess.run( + cmd, + check=True, + text=True, + stdout=f_out, + stderr=subprocess.PIPE + ) + stderr_capture = result.stderr + else: + result = subprocess.run( + cmd, + check=True, + text=True, + capture_output=True + ) + stdout_capture = result.stdout + stderr_capture = result.stderr + + except FileNotFoundError: + raise RuntimeError("bed_intersect command not found. Is bx-python installed and in the system's PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "output_files": [] + } + + return { + "command_executed": command_executed, + "stdout": stdout_capture, + "stderr": stderr_capture, + "output_files": output_files + } + +@mcp.tool() +def maf_filter( + maf_file: Path, + expression: str, + output_file: Optional[Path] = None, + species: Optional[str] = None, + min_score: Optional[float] = None, + actions: Optional[str] = None, + score_column: Optional[str] = None, + score_op: Optional[str] = None, +) -> dict: + """ + Filters a MAF file based on a given expression. + + This tool corresponds to the `maf_filter.py` script. It allows for complex + filtering of Multiple Alignment Format (MAF) files. + """ + if not maf_file.is_file(): + raise FileNotFoundError(f"Input MAF file not found: {maf_file}") + if score_op and score_op not in ["avg", "min", "max", "sum"]: + raise ValueError(f"Invalid score_op: {score_op}. Must be one of 'avg', 'min', 'max', 'sum'.") + + cmd = ["maf_filter"] + cmd.extend(["-e", expression]) + + if species: + cmd.extend(["-s", species]) + if min_score is not None: + cmd.extend(["-m", str(min_score)]) + if actions: + cmd.extend(["-a", actions]) + if score_column: + cmd.extend(["-S", score_column]) + if score_op: + cmd.extend(["-O", score_op]) + + cmd.append(str(maf_file)) + command_executed = " ".join(cmd) + output_files = [] + stdout_capture = "" + stderr_capture = "" + + try: + if output_file: + output_files.append(str(output_file)) + with open(output_file, "w") as f_out: + result = subprocess.run( + cmd, + check=True, + text=True, + stdout=f_out, + stderr=subprocess.PIPE + ) + stderr_capture = result.stderr + else: + result = subprocess.run( + cmd, + check=True, + text=True, + capture_output=True + ) + stdout_capture = result.stdout + stderr_capture = result.stderr + + except FileNotFoundError: + raise RuntimeError("maf_filter command not found. Is bx-python installed and in the system's PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "output_files": [] + } + + return { + "command_executed": command_executed, + "stdout": stdout_capture, + "stderr": stderr_capture, + "output_files": output_files + } + +@mcp.tool() +def fasta_formatter( + fasta_file: Path, + output_file: Optional[Path] = None, + line_length: int = 80, +) -> dict: + """ + Reformats a FASTA file to a specified line length. + + This tool corresponds to the `fasta_formatter.py` script. + """ + if not fasta_file.is_file(): + raise FileNotFoundError(f"Input FASTA file not found: {fasta_file}") + if line_length <= 0: + raise ValueError("line_length must be a positive integer.") + + cmd = ["fasta_formatter", str(fasta_file)] + if line_length != 80: # Assuming 80 is the default, though the script might not have one. + cmd.extend(["-c", str(line_length)]) + + command_executed = " ".join(cmd) + output_files = [] + stdout_capture = "" + stderr_capture = "" + + try: + if output_file: + output_files.append(str(output_file)) + with open(output_file, "w") as f_out: + result = subprocess.run( + cmd, + check=True, + text=True, + stdout=f_out, + stderr=subprocess.PIPE + ) + stderr_capture = result.stderr + else: + result = subprocess.run( + cmd, + check=True, + text=True, + capture_output=True + ) + stdout_capture = result.stdout + stderr_capture = result.stderr + + except FileNotFoundError: + raise RuntimeError("fasta_formatter command not found. Is bx-python installed and in the system's PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "output_files": [] + } + + return { + "command_executed": command_executed, + "stdout": stdout_capture, + "stderr": stderr_capture, + "output_files": output_files + } + +@mcp.tool() +def wig_to_bigwig( + wig_file: Path, + chrom_sizes: Path, + bigwig_output: Path, + clip_val: Optional[int] = None, + chunk_size: int = 1024, +) -> dict: + """ + Converts a Wiggle (WIG) format file to a BigWig file. + + This tool corresponds to the `wig_to_bigwig.py` script. + """ + if not wig_file.is_file(): + raise FileNotFoundError(f"Input Wiggle file not found: {wig_file}") + if not chrom_sizes.is_file(): + raise FileNotFoundError(f"Chromosome sizes file not found: {chrom_sizes}") + if chunk_size <= 0: + raise ValueError("chunk_size must be a positive integer.") + + cmd = ["wig_to_bigwig", str(wig_file), str(chrom_sizes), str(bigwig_output)] + + if clip_val is not None: + cmd.extend(["-clip", str(clip_val)]) + if chunk_size != 1024: + cmd.extend(["-chunk", str(chunk_size)]) + + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + check=True, + text=True, + capture_output=True + ) + except FileNotFoundError: + raise RuntimeError("wig_to_bigwig command not found. Is bx-python installed and in the system's PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "output_files": [] + } + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(bigwig_output)] + } + +@mcp.tool() +def get_flanking_sequences( + bed_file: Path, + genome_file: Path, + output_fasta: Path, + length: int, + location: str = "g", +) -> dict: + """ + Extracts flanking sequences for regions in a BED file from a genome FASTA file. + + This tool corresponds to the `get_flanking_sequences.py` script. + """ + if not bed_file.is_file(): + raise FileNotFoundError(f"Input BED file not found: {bed_file}") + if not genome_file.is_file(): + raise FileNotFoundError(f"Genome FASTA file not found: {genome_file}") + if length <= 0: + raise ValueError("length must be a positive integer.") + valid_locations = ["b", "e", "g", "G"] + if location not in valid_locations: + raise ValueError(f"Invalid location '{location}'. Must be one of {valid_locations}.") + + cmd = [ + "get_flanking_sequences", + str(bed_file), + "-g", str(genome_file), + "-o", str(output_fasta), + "-l", str(length), + "-L", location + ] + + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + check=True, + text=True, + capture_output=True + ) + except FileNotFoundError: + raise RuntimeError("get_flanking_sequences command not found. Is bx-python installed and in the system's PATH?") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "output_files": [] + } + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_fasta)] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4ed5a4487dfecdfd9ff8e72ca559f7059440a324 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/bx-python_server.py') +SERVER_NAME = 'biosci_bx_python' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ba07e9f1b33fa2d98a1abc9b812fc44e4beca23a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-bx-python: + build: . + image: mcp-bx-python:latest + container_name: mcp-bx-python + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=bx-python + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..913db797990ca362aa5273ab0c8bd700e08a86de --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - bx-python + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_bx-python/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a2b334eff8e02a900f173d644bbf6cdd3cb1cd01 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install clustalw via conda (e.g., from bioconda) +RUN conda install -c bioconda clustalw -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/clustalw_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/clustalw_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/clustalw_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_server.py new file mode 100644 index 0000000000000000000000000000000000000000..abe56370955a392e1dd1f654468135985c1dd64f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_server.py @@ -0,0 +1,470 @@ +import subprocess +import tempfile +import shutil +from pathlib import Path +from typing import Optional, List, Tuple + +# This is a placeholder for the actual decorator provided by the MCP environment. +# Per instructions, we assume 'mcp' is available and do not define it. +# from mcp import mcp + +class mcp: + @staticmethod + def tool(func): + return func + +def _validate_choice(param_name: str, value: Optional[str], choices: List[str]): + """Helper function to validate string parameters against a list of allowed choices.""" + if value and value.upper() not in choices: + raise ValueError( + f"Invalid value for {param_name}: '{value}'. " + f"Must be one of {choices} (case-insensitive)." + ) + +@mcp.tool +def clustalw_multiple_sequence_alignment( + infile: Path, + outfile: Optional[Path] = None, + output_format: Optional[str] = None, + sequence_type: Optional[str] = None, + quicktree: bool = False, + negative_matrix: bool = False, + no_weights: bool = False, + pwmatrix: Optional[str] = None, + pwdnamatrix: Optional[str] = None, + pwgapopen: float = 10.0, + pwgapext: float = 0.1, + matrix: Optional[str] = None, + dnamatrix: Optional[str] = None, + gapopen: float = 10.0, + gapext: float = 0.2, + endgaps: bool = False, + gapdist: Optional[int] = None, + nogaps: bool = False, + nohgaps: bool = False, + hgapres: Optional[str] = None, + maxdiv: Optional[int] = None, + transitions: Optional[str] = None, + transweight: float = 0.5, + newtree: Optional[Path] = None, + usetree: Optional[Path] = None, + case: Optional[str] = None, + seqnos: bool = True, + seqno_range: bool = False, + range_start: Optional[int] = None, + range_end: Optional[int] = None, + stats_file: Optional[Path] = None, +) -> dict: + """ + Performs a full multiple sequence alignment on a set of sequences using ClustalW. + + Args: + infile: Path to the input sequence file. + outfile: Path to the output alignment file. If not provided, defaults to '[infile_stem].aln'. + output_format: Output format (GCG, GDE, PIR, PHYLIP, NEXUS, FASTA). + sequence_type: Force sequence type (PROTEIN, DNA). + quicktree: Use a fast algorithm for the guide tree. + negative_matrix: Use a protein matrix with negative values. + no_weights: Disable sequence weighting. + pwmatrix: Protein weight matrix for pairwise alignment. + pwdnamatrix: DNA weight matrix for pairwise alignment. + pwgapopen: Gap opening penalty for pairwise alignment. + pwgapext: Gap extension penalty for pairwise alignment. + matrix: Protein weight matrix for multiple alignment. + dnamatrix: DNA weight matrix for multiple alignment. + gapopen: Gap opening penalty for multiple alignment. + gapext: Gap extension penalty for multiple alignment. + endgaps: Do not penalize end gaps. + gapdist: Gap separation penalty range. + nogaps: Remove all positions with gaps before alignment. + nohgaps: Remove all positions with gaps within sequences before alignment. + hgapres: List of residues not penalized for gaps. + maxdiv: Percentage identity for delaying alignment. + transitions: For DNA, specify 'WEIGHTED' or 'NO'. + transweight: Transition weight for DNA alignments. + newtree: Path to save the new guide tree. If not provided, defaults to '[infile_stem].dnd'. + usetree: Path to a user-provided guide tree to use for alignment. + case: Set case for output file (LOWER, UPPER). + seqnos: Enable sequence numbers in the output. + seqno_range: Enable range numbering in the output. + range_start: Start of sequence range for output. + range_end: End of sequence range for output. + stats_file: Path to save a log of scores for each alignment step. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not infile.is_file(): + raise FileNotFoundError(f"Input file not found: {infile}") + if usetree and not usetree.is_file(): + raise FileNotFoundError(f"User-provided tree file not found: {usetree}") + if usetree and newtree: + raise ValueError("Cannot use both 'usetree' and 'newtree' simultaneously.") + if (range_start is not None and range_end is None) or (range_start is None and range_end is not None): + raise ValueError("'range_start' and 'range_end' must be specified together.") + + _validate_choice("output_format", output_format, ["GCG", "GDE", "PIR", "PHYLIP", "NEXUS", "FASTA"]) + _validate_choice("sequence_type", sequence_type, ["PROTEIN", "DNA"]) + _validate_choice("case", case, ["LOWER", "UPPER"]) + _validate_choice("transitions", transitions, ["WEIGHTED", "NO"]) + + # --- Command Construction --- + cmd = ["clustalw", "-BATCH", f"-INFILE={infile}"] + output_files = [] + + # Handle output files + if outfile: + cmd.append(f"-OUTFILE={outfile}") + output_files.append(str(outfile)) + else: + output_files.append(str(infile.with_suffix(".aln"))) + + if newtree: + cmd.append(f"-NEWTREE={newtree}") + output_files.append(str(newtree)) + elif not usetree: + output_files.append(str(infile.with_suffix(".dnd"))) + + if usetree: + cmd.append(f"-USETREE={usetree}") + if stats_file: + cmd.append(f"-STATS={stats_file}") + output_files.append(str(stats_file)) + + # Add flags and options + if output_format: cmd.append(f"-OUTPUT={output_format.upper()}") + if sequence_type: cmd.append(f"-TYPE={sequence_type.upper()}") + if quicktree: cmd.append("-QUICKTREE") + if negative_matrix: cmd.append("-NEGATIVE") + if no_weights: cmd.append("-NOWEIGHTS") + if pwmatrix: cmd.append(f"-PWMATRIX={pwmatrix}") + if pwdnamatrix: cmd.append(f"-PWDNAMATRIX={pwdnamatrix}") + cmd.append(f"-PWGAPOPEN={pwgapopen}") + cmd.append(f"-PWGAPEXT={pwgapext}") + if matrix: cmd.append(f"-MATRIX={matrix}") + if dnamatrix: cmd.append(f"-DNAMATRIX={dnamatrix}") + cmd.append(f"-GAPOPEN={gapopen}") + cmd.append(f"-GAPEXT={gapext}") + if endgaps: cmd.append("-ENDGAPS") + if gapdist is not None: cmd.append(f"-GAPDIST={gapdist}") + if nogaps: cmd.append("-NOGAPS") + if nohgaps: cmd.append("-NOHGAPS") + if hgapres: cmd.append(f"-HGAPRES={hgapres}") + if maxdiv is not None: cmd.append(f"-MAXDIV={maxdiv}") + if transitions: cmd.append(f"-TRANSITIONS={transitions.upper()}") + cmd.append(f"-TRANSWEIGHT={transweight}") + if case: cmd.append(f"-CASE={case.upper()}") + cmd.append(f"-SEQNOS={'ON' if seqnos else 'OFF'}") + cmd.append(f"-SEQNO_RANGE={'ON' if seqno_range else 'OFF'}") + if range_start is not None and range_end is not None: + cmd.append(f"-RANGE={range_start},{range_end}") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + except FileNotFoundError: + raise RuntimeError("clustalw executable not found. Please ensure it is in your PATH.") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": "ClustalW failed.", + } + + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + +@mcp.tool +def clustalw_profile_alignment( + profile1: Path, + profile2: Path, + outfile: Optional[Path] = None, + output_format: Optional[str] = None, + sequence_type: Optional[str] = None, + matrix: Optional[str] = None, + dnamatrix: Optional[str] = None, + gapopen: float = 10.0, + gapext: float = 0.2, + endgaps: bool = False, + gapdist: Optional[int] = None, + newtree: Optional[Path] = None, + usetree: Optional[Path] = None, +) -> dict: + """ + Aligns two existing alignments (profiles) using ClustalW. + + Args: + profile1: Path to the first input profile (alignment file). + profile2: Path to the second input profile (alignment file). + outfile: Path to the output alignment file. If not provided, defaults to '[profile1_stem].aln'. + output_format: Output format (GCG, GDE, PIR, PHYLIP, NEXUS, FASTA). + sequence_type: Force sequence type (PROTEIN, DNA). + matrix: Protein weight matrix for multiple alignment. + dnamatrix: DNA weight matrix for multiple alignment. + gapopen: Gap opening penalty for multiple alignment. + gapext: Gap extension penalty for multiple alignment. + endgaps: Do not penalize end gaps. + gapdist: Gap separation penalty range. + newtree: Path to save the new guide tree. If not provided, defaults to '[profile1_stem].dnd'. + usetree: Path to a user-provided guide tree to use for alignment. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not profile1.is_file(): + raise FileNotFoundError(f"Profile 1 file not found: {profile1}") + if not profile2.is_file(): + raise FileNotFoundError(f"Profile 2 file not found: {profile2}") + if usetree and not usetree.is_file(): + raise FileNotFoundError(f"User-provided tree file not found: {usetree}") + if usetree and newtree: + raise ValueError("Cannot use both 'usetree' and 'newtree' simultaneously.") + + _validate_choice("output_format", output_format, ["GCG", "GDE", "PIR", "PHYLIP", "NEXUS", "FASTA"]) + _validate_choice("sequence_type", sequence_type, ["PROTEIN", "DNA"]) + + # --- Command Construction --- + cmd = ["clustalw", "-BATCH", "-PROFILE", f"-PROFILE1={profile1}", f"-PROFILE2={profile2}"] + output_files = [] + + if outfile: + cmd.append(f"-OUTFILE={outfile}") + output_files.append(str(outfile)) + else: + output_files.append(str(profile1.with_suffix(".aln"))) + + if newtree: + cmd.append(f"-NEWTREE={newtree}") + output_files.append(str(newtree)) + elif not usetree: + output_files.append(str(profile1.with_suffix(".dnd"))) + + if usetree: + cmd.append(f"-USETREE={usetree}") + + if output_format: cmd.append(f"-OUTPUT={output_format.upper()}") + if sequence_type: cmd.append(f"-TYPE={sequence_type.upper()}") + if matrix: cmd.append(f"-MATRIX={matrix}") + if dnamatrix: cmd.append(f"-DNAMATRIX={dnamatrix}") + cmd.append(f"-GAPOPEN={gapopen}") + cmd.append(f"-GAPEXT={gapext}") + if endgaps: cmd.append("-ENDGAPS") + if gapdist is not None: cmd.append(f"-GAPDIST={gapdist}") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + except FileNotFoundError: + raise RuntimeError("clustalw executable not found. Please ensure it is in your PATH.") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": "ClustalW failed.", + } + + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + +@mcp.tool +def clustalw_tree_generation( + infile: Path, + treefile: Optional[Path] = None, + output_tree_format: str = "nj", + kimura: bool = False, + tossgaps: bool = False, + bootlabels: Optional[str] = None, +) -> dict: + """ + Generates a phylogenetic tree from an existing multiple sequence alignment. + + Args: + infile: Path to the input alignment file. + treefile: Path to save the output tree file. If not provided, a default name is used (e.g., '[infile_stem].ph'). + output_tree_format: Format for the output tree (nj, phylip, dist, nexus). + kimura: Use Kimura's correction for distance calculation. + tossgaps: Ignore positions with gaps during tree calculation. + bootlabels: Position of bootstrap values in the tree (NODE, BRANCH). + + Returns: + A dictionary containing the executed command, stdout, stderr, and the path to the output tree file. + """ + # --- Input Validation --- + if not infile.is_file(): + raise FileNotFoundError(f"Input alignment file not found: {infile}") + + _validate_choice("output_tree_format", output_tree_format, ["NJ", "PHYLIP", "DIST", "NEXUS"]) + _validate_choice("bootlabels", bootlabels, ["NODE", "BRANCH"]) + + with tempfile.TemporaryDirectory() as temp_dir_str: + temp_dir = Path(temp_dir_str) + temp_infile = temp_dir / infile.name + shutil.copy(infile, temp_infile) + + # --- Command Construction --- + cmd = ["clustalw", "-BATCH", "-TREE", f"-INFILE={temp_infile}"] + cmd.append(f"-OUTPUTTREE={output_tree_format.upper()}") + if kimura: cmd.append("-KIMURA") + if tossgaps: cmd.append("-TOSSGAPS") + if bootlabels: cmd.append(f"-BOOTLABELS={bootlabels.upper()}") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + cwd=temp_dir, + capture_output=True, + text=True, + check=True, + ) + except FileNotFoundError: + raise RuntimeError("clustalw executable not found. Please ensure it is in your PATH.") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": "ClustalW failed.", + } + + # --- Output File Handling --- + # Find the generated tree file in the temp directory + # ClustalW uses specific extensions based on output format + ext_map = {"NJ": ".nj", "PHYLIP": ".ph", "DIST": ".dst", "NEXUS": ".nxs"} + expected_ext = ext_map.get(output_tree_format.upper(), ".ph") + + source_tree_file = temp_dir / temp_infile.with_suffix(expected_ext).name + + if not source_tree_file.is_file(): + # Fallback search if prediction fails + found_files = list(temp_dir.glob("*.ph")) + list(temp_dir.glob("*.nj")) + list(temp_dir.glob("*.dst")) + list(temp_dir.glob("*.nxs")) + if not found_files: + raise RuntimeError(f"ClustalW did not produce the expected output tree file. Stdout: {result.stdout}\nStderr: {result.stderr}") + source_tree_file = found_files[0] + + destination_path = treefile if treefile else Path.cwd() / source_tree_file.name + shutil.move(source_tree_file, destination_path) + output_files = [str(destination_path)] + + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + +@mcp.tool +def clustalw_bootstrap_tree( + infile: Path, + bootstrap_trials: int, + treefile: Optional[Path] = None, + output_tree_format: str = "nj", + kimura: bool = False, + tossgaps: bool = False, + bootlabels: Optional[str] = None, + seed: Optional[int] = None, +) -> dict: + """ + Performs bootstrap analysis to generate a phylogenetic tree from an alignment. + + Args: + infile: Path to the input alignment file. + bootstrap_trials: Number of bootstrap trials to perform. + treefile: Path to save the output tree file. If not provided, a default name is used. + output_tree_format: Format for the output tree (nj, phylip, dist, nexus). + kimura: Use Kimura's correction for distance calculation. + tossgaps: Ignore positions with gaps during tree calculation. + bootlabels: Position of bootstrap values in the tree (NODE, BRANCH). + seed: Seed number for the random number generator. + + Returns: + A dictionary containing the executed command, stdout, stderr, and the path to the output tree file. + """ + # --- Input Validation --- + if not infile.is_file(): + raise FileNotFoundError(f"Input alignment file not found: {infile}") + if bootstrap_trials <= 0: + raise ValueError("bootstrap_trials must be a positive integer.") + + _validate_choice("output_tree_format", output_tree_format, ["NJ", "PHYLIP", "DIST", "NEXUS"]) + _validate_choice("bootlabels", bootlabels, ["NODE", "BRANCH"]) + + with tempfile.TemporaryDirectory() as temp_dir_str: + temp_dir = Path(temp_dir_str) + temp_infile = temp_dir / infile.name + shutil.copy(infile, temp_infile) + + # --- Command Construction --- + cmd = ["clustalw", "-BATCH", f"-BOOTSTRAP={bootstrap_trials}", f"-INFILE={temp_infile}"] + cmd.append(f"-OUTPUTTREE={output_tree_format.upper()}") + if kimura: cmd.append("-KIMURA") + if tossgaps: cmd.append("-TOSSGAPS") + if bootlabels: cmd.append(f"-BOOTLABELS={bootlabels.upper()}") + if seed is not None: cmd.append(f"-SEED={seed}") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + cwd=temp_dir, + capture_output=True, + text=True, + check=True, + ) + except FileNotFoundError: + raise RuntimeError("clustalw executable not found. Please ensure it is in your PATH.") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": "ClustalW failed.", + } + + # --- Output File Handling --- + ext_map = {"NJ": ".nj", "PHYLIP": ".ph", "DIST": ".dst", "NEXUS": ".nxs"} + expected_ext = ext_map.get(output_tree_format.upper(), ".ph") + source_tree_file = temp_dir / temp_infile.with_suffix(expected_ext).name + + if not source_tree_file.is_file(): + found_files = list(temp_dir.glob("*.ph")) + list(temp_dir.glob("*.nj")) + list(temp_dir.glob("*.dst")) + list(temp_dir.glob("*.nxs")) + if not found_files: + raise RuntimeError(f"ClustalW did not produce the expected output tree file. Stdout: {result.stdout}\nStderr: {result.stderr}") + source_tree_file = found_files[0] + + destination_path = treefile if treefile else Path.cwd() / source_tree_file.name + shutil.move(source_tree_file, destination_path) + output_files = [str(destination_path)] + + return { + "command_executed": " ".join(map(str, cmd)), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4668fb26be93ac9cbe1d0cc8cb5a0ddb792f6442 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/clustalw_server.py') +SERVER_NAME = 'biosci_clustalw' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..93c72638ef3ab8886d698f286f42276140b388c5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-clustalw: + build: . + image: mcp-clustalw:latest + container_name: mcp-clustalw + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=clustalw + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b8d6fcf6febb709192caf569c2104cb7e4172267 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - clustalw + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_clustalw/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0e79d47d0e1af1583b20ea90c7c366e021e3c58a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install cnvkit via conda (e.g., from bioconda) +RUN conda install -c bioconda cnvkit -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/cnvkit_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/cnvkit_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/cnvkit_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_server.py new file mode 100644 index 0000000000000000000000000000000000000000..36894c1b51b94c47f482f3d6c2c47d15f5c7d5b5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_server.py @@ -0,0 +1,789 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# --- Helper Function for Command Execution --- +# This is a conceptual helper. In a real MCP implementation, +# this logic would be part of the MCP framework's handling of the tool definition. +# For this standalone script, it's good practice to centralize the execution logic. + +def _run_cnvkit_command(cmd: List[str], output_file: Optional[Path] = None): + """A helper to run cnvkit commands, capture output, and handle errors.""" + command_str = " ".join(cmd) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + encoding='utf-8' + ) + output_files = [str(output_file)] if output_file and output_file.exists() else [] + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": command_str, + "stdout": "", + "stderr": "cnvkit command not found. Please ensure it is in your PATH.", + "error": "Executable not found.", + "output_files": [], + } + +# --- CNVkit MCP Tool Definitions --- + +@mcp.tool() +def batch( + tumor_bams: List[Path], + normal_bams: Optional[List[Path]] = None, + method: str = "hybrid", + male_reference: bool = False, + count_reads: bool = False, + processes: int = 1, + rscript_path: Optional[Path] = None, + targets: Optional[Path] = None, + antitargets: Optional[Path] = None, + fasta: Optional[Path] = None, + access: Optional[Path] = None, + no_edge: bool = False, + annotate: Optional[Path] = None, + short_names: bool = False, + target_avg_size: Optional[int] = None, + antitarget_avg_size: Optional[int] = None, + antitarget_min_size: Optional[int] = None, + output_reference: Optional[Path] = None, + output_dir: Optional[Path] = None, + scatter: bool = False, + diagram: bool = False, +) -> dict: + """ + Run the complete CNVkit pipeline on one or more BAM files. + This command automates the major steps of the CNVkit workflow. + """ + # Input validation + if method not in ["hybrid", "amplicon", "wgs"]: + raise ValueError("method must be one of 'hybrid', 'amplicon', or 'wgs'.") + for bam_file in tumor_bams: + if not bam_file.exists(): + raise FileNotFoundError(f"Tumor BAM file not found: {bam_file}") + if normal_bams: + for bam_file in normal_bams: + if not bam_file.exists(): + raise FileNotFoundError(f"Normal BAM file not found: {bam_file}") + + cmd = ["cnvkit.py", "batch"] + cmd.extend([str(p) for p in tumor_bams]) + + if normal_bams: + cmd.extend(["--normal"] + [str(p) for p in normal_bams]) + + cmd.extend(["--method", method]) + if male_reference: + cmd.append("--male-reference") + if count_reads: + cmd.append("--count-reads") + cmd.extend(["--processes", str(processes)]) + if rscript_path: + cmd.extend(["--rscript-path", str(rscript_path)]) + if targets: + cmd.extend(["--targets", str(targets)]) + if antitargets: + cmd.extend(["--antitargets", str(antitargets)]) + if fasta: + cmd.extend(["--fasta", str(fasta)]) + if access: + cmd.extend(["--access", str(access)]) + if no_edge: + cmd.append("--no-edge") + if annotate: + cmd.extend(["--annotate", str(annotate)]) + if short_names: + cmd.append("--short-names") + if target_avg_size: + cmd.extend(["--target-avg-size", str(target_avg_size)]) + if antitarget_avg_size: + cmd.extend(["--antitarget-avg-size", str(antitarget_avg_size)]) + if antitarget_min_size: + cmd.extend(["--antitarget-min-size", str(antitarget_min_size)]) + if output_reference: + cmd.extend(["--output-reference", str(output_reference)]) + if output_dir: + cmd.extend(["--output-dir", str(output_dir)]) + if scatter: + cmd.append("--scatter") + if diagram: + cmd.append("--diagram") + + # Batch command produces many files in the output directory, which is complex to track. + # We will return the command and let the user inspect the output directory. + command_str = " ".join(cmd) + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True, encoding='utf-8') + # Discover output files based on input names and output_dir + output_files = [] + if output_dir: + output_dir.mkdir(parents=True, exist_ok=True) + for bam in tumor_bams: + base = bam.stem + output_files.extend([ + str(output_dir / f"{base}.targetcoverage.cnn"), + str(output_dir / f"{base}.antitargetcoverage.cnn"), + str(output_dir / f"{base}.cnr"), + str(output_dir / f"{base}.cns"), + ]) + if scatter: + output_files.append(str(output_dir / f"{base}-scatter.pdf")) + if diagram: + output_files.append(str(output_dir / f"{base}-diagram.pdf")) + + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [f for f in output_files if Path(f).exists()], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with exit code {e.returncode}", + "output_files": [], + } + +@mcp.tool() +def target( + baits_bed: Path, + output_file: Path, + annotate: Optional[Path] = None, + short_names: bool = False, + split: bool = False, + avg_size: Optional[int] = None, +) -> dict: + """ + Prepare a BED file of sequencing target regions for CNVkit. + """ + if not baits_bed.exists(): + raise FileNotFoundError(f"Input BED file not found: {baits_bed}") + + cmd = ["cnvkit.py", "target", str(baits_bed), "--output", str(output_file)] + if annotate: + cmd.extend(["--annotate", str(annotate)]) + if short_names: + cmd.append("--short-names") + if split: + cmd.append("--split") + if avg_size: + cmd.extend(["--avg-size", str(avg_size)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def access( + fasta_file: Path, + output_file: Path, + min_gap_size: int = 5000, + exclude: Optional[List[Path]] = None, +) -> dict: + """ + Calculate the sequence-accessible coordinates in a FASTA file. + """ + if not fasta_file.exists(): + raise FileNotFoundError(f"FASTA file not found: {fasta_file}") + + cmd = ["cnvkit.py", "access", str(fasta_file), "--output", str(output_file)] + cmd.extend(["--min-gap-size", str(min_gap_size)]) + if exclude: + for ex_file in exclude: + cmd.extend(["--exclude", str(ex_file)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def antitarget( + target_bed: Path, + access_bed: Path, + output_file: Path, + avg_size: int = 150000, + min_size: Optional[int] = None, +) -> dict: + """ + Derive a BED file of antitarget regions from target regions. + """ + if not target_bed.exists(): + raise FileNotFoundError(f"Target BED file not found: {target_bed}") + if not access_bed.exists(): + raise FileNotFoundError(f"Access BED file not found: {access_bed}") + + cmd = ["cnvkit.py", "antitarget", str(target_bed), "--access", str(access_bed), "--output", str(output_file)] + cmd.extend(["--avg-size", str(avg_size)]) + if min_size: + cmd.extend(["--min-size", str(min_size)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def autobin( + bam_files: List[Path], + targets: Path, + access: Optional[Path] = None, + method: str = "hybrid", + bp_per_bin: int = 100000, + target_max_size: int = 50000, + target_min_size: int = 20, + antitarget_max_size: int = 500000, + antitarget_min_size: int = 1000, +) -> dict: + """ + Automatically determine suitable target and antitarget bin sizes. + Prints the recommended target.bed and antitarget.bed files to standard output. + """ + if method not in ["hybrid", "amplicon", "wgs"]: + raise ValueError("method must be one of 'hybrid', 'amplicon', or 'wgs'.") + for bam_file in bam_files: + if not bam_file.exists(): + raise FileNotFoundError(f"BAM file not found: {bam_file}") + if not targets.exists(): + raise FileNotFoundError(f"Targets file not found: {targets}") + + cmd = ["cnvkit.py", "autobin"] + cmd.extend([str(p) for p in bam_files]) + cmd.extend(["--targets", str(targets)]) + if access: + cmd.extend(["--access", str(access)]) + cmd.extend(["--method", method]) + cmd.extend(["--bp-per-bin", str(bp_per_bin)]) + cmd.extend(["--target-max-size", str(target_max_size)]) + cmd.extend(["--target-min-size", str(target_min_size)]) + cmd.extend(["--antitarget-max-size", str(antitarget_max_size)]) + cmd.extend(["--antitarget-min-size", str(antitarget_min_size)]) + + # This command prints to stdout, so we don't specify an output file. + return _run_cnvkit_command(cmd) + +@mcp.tool() +def coverage( + bam_file: Path, + target_bed: Path, + output_file: Path, + count: bool = False, + min_mapq: int = 0, + processes: int = 1, +) -> dict: + """ + Calculate coverage in the given regions from a BAM file. + """ + if not bam_file.exists(): + raise FileNotFoundError(f"BAM file not found: {bam_file}") + if not target_bed.exists(): + raise FileNotFoundError(f"Target BED file not found: {target_bed}") + + cmd = ["cnvkit.py", "coverage", str(bam_file), str(target_bed), "--output", str(output_file)] + if count: + cmd.append("--count") + cmd.extend(["--min-mapq", str(min_mapq)]) + cmd.extend(["--processes", str(processes)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def reference( + targetcoverage_files: List[Path], + output_file: Path, + fasta: Optional[Path] = None, + cluster: bool = False, + gender: Optional[str] = None, + male_reference: bool = False, + no_gc: bool = False, + no_edge: bool = False, + no_rmask: bool = False, +) -> dict: + """ + Compile a copy-number reference from the given normal samples. + """ + for f in targetcoverage_files: + if not f.exists(): + raise FileNotFoundError(f"Coverage file not found: {f}") + + cmd = ["cnvkit.py", "reference"] + cmd.extend([str(p) for p in targetcoverage_files]) + cmd.extend(["--output", str(output_file)]) + + if fasta: + cmd.extend(["--fasta", str(fasta)]) + if cluster: + cmd.append("--cluster") + if gender: + cmd.extend(["--gender", gender]) + if male_reference: + cmd.append("--male-reference") + if no_gc: + cmd.append("--no-gc") + if no_edge: + cmd.append("--no-edge") + if no_rmask: + cmd.append("--no-rmask") + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def fix( + target_coverage: Path, + antitarget_coverage: Path, + reference: Path, + output_file: Path, + no_gc: bool = False, + no_edge: bool = False, + no_rmask: bool = False, +) -> dict: + """ + Correct raw coverage data according to the given reference. + """ + if not target_coverage.exists(): + raise FileNotFoundError(f"Target coverage file not found: {target_coverage}") + if not antitarget_coverage.exists(): + raise FileNotFoundError(f"Antitarget coverage file not found: {antitarget_coverage}") + if not reference.exists(): + raise FileNotFoundError(f"Reference file not found: {reference}") + + cmd = ["cnvkit.py", "fix", str(target_coverage), str(antitarget_coverage), str(reference), "--output", str(output_file)] + if no_gc: + cmd.append("--no-gc") + if no_edge: + cmd.append("--no-edge") + if no_rmask: + cmd.append("--no-rmask") + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def segment( + cnr_file: Path, + output_file: Path, + method: str = "cbs", + threshold: Optional[float] = None, + drop_low_coverage: bool = False, + rscript_path: Optional[Path] = None, + smooth_cbs: bool = False, + processes: int = 1, +) -> dict: + """ + Segment a copy-number ratio file to find discrete regions of equal log2 ratio. + """ + if not cnr_file.exists(): + raise FileNotFoundError(f"CNR file not found: {cnr_file}") + + methods = ["cbs", "flasso", "haar", "hmm", "hmm-tumor", "hmm-germline", "none"] + if method not in methods: + raise ValueError(f"method must be one of {methods}") + + cmd = ["cnvkit.py", "segment", str(cnr_file), "--output", str(output_file)] + cmd.extend(["--method", method]) + if threshold is not None: + cmd.extend(["--threshold", str(threshold)]) + if drop_low_coverage: + cmd.append("--drop-low-coverage") + if rscript_path: + cmd.extend(["--rscript-path", str(rscript_path)]) + if smooth_cbs: + cmd.append("--smooth-cbs") + cmd.extend(["--processes", str(processes)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def call( + cns_file: Path, + output_file: Path, + male_reference: bool = False, + vcf: Optional[Path] = None, + purity: Optional[float] = None, + ploidy: int = 2, + gender: Optional[str] = None, + method: str = "threshold", + filter_type: Optional[str] = None, + thresholds: str = "-1.1,-0.25,0.2,0.7", +) -> dict: + """ + Call copy number gains and losses from a segmented log2-ratio file. + """ + if not cns_file.exists(): + raise FileNotFoundError(f"CNS file not found: {cns_file}") + if method not in ["threshold", "clonal", "both"]: + raise ValueError("method must be one of 'threshold', 'clonal', 'both'") + + cmd = ["cnvkit.py", "call", str(cns_file), "--output", str(output_file)] + if male_reference: + cmd.append("--male-reference") + if vcf: + cmd.extend(["--vcf", str(vcf)]) + if purity is not None: + cmd.extend(["--purity", str(purity)]) + cmd.extend(["--ploidy", str(ploidy)]) + if gender: + cmd.extend(["--gender", gender]) + cmd.extend(["--method", method]) + if filter_type: + cmd.extend(["--filter", filter_type]) + cmd.extend(["--thresholds", thresholds]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def scatter( + cnr_file: Path, + output_file: Path, + segment_file: Optional[Path] = None, + chromosome: Optional[str] = None, + gene: Optional[str] = None, + y_min: Optional[float] = None, + y_max: Optional[float] = None, + title: Optional[str] = None, +) -> dict: + """ + Plot copy number ratios and segmentation calls together. + """ + if not cnr_file.exists(): + raise FileNotFoundError(f"CNR file not found: {cnr_file}") + + cmd = ["cnvkit.py", "scatter", str(cnr_file), "--output", str(output_file)] + if segment_file: + cmd.extend(["--segment-file", str(segment_file)]) + if chromosome: + cmd.extend(["--chromosome", chromosome]) + if gene: + cmd.extend(["--gene", gene]) + if y_min is not None: + cmd.extend(["--y-min", str(y_min)]) + if y_max is not None: + cmd.extend(["--y-max", str(y_max)]) + if title: + cmd.extend(["--title", title]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def diagram( + cnr_file: Path, + output_file: Path, + segment_file: Optional[Path] = None, + threshold: float = 0.5, + min_probes: int = 3, + male_reference: bool = False, +) -> dict: + """ + Draw a copy number diagram (ideogram). + """ + if not cnr_file.exists(): + raise FileNotFoundError(f"CNR file not found: {cnr_file}") + + cmd = ["cnvkit.py", "diagram", str(cnr_file), "--output", str(output_file)] + if segment_file: + cmd.extend(["--segment-file", str(segment_file)]) + cmd.extend(["--threshold", str(threshold)]) + cmd.extend(["--min-probes", str(min_probes)]) + if male_reference: + cmd.append("--male-reference") + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def heatmap( + cnr_files: List[Path], + output_file: Path, + desaturate: bool = False, + male_reference: bool = False, + chromosome: Optional[str] = None, +) -> dict: + """ + Plot copy number for multiple samples as a heatmap. + """ + for f in cnr_files: + if not f.exists(): + raise FileNotFoundError(f"CNR file not found: {f}") + + cmd = ["cnvkit.py", "heatmap"] + cmd.extend([str(p) for p in cnr_files]) + cmd.extend(["--output", str(output_file)]) + if desaturate: + cmd.append("--desaturate") + if male_reference: + cmd.append("--male-reference") + if chromosome: + cmd.extend(["--chromosome", chromosome]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def breaks( + cnr_file: Path, + cns_file: Path, + output_file: Path, + min_probes: int = 1, +) -> dict: + """ + List the targeted genes in which a copy number breakpoint occurs. + """ + if not cnr_file.exists(): + raise FileNotFoundError(f"CNR file not found: {cnr_file}") + if not cns_file.exists(): + raise FileNotFoundError(f"CNS file not found: {cns_file}") + + cmd = ["cnvkit.py", "breaks", str(cnr_file), str(cns_file), "--output", str(output_file)] + cmd.extend(["--min-probes", str(min_probes)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def genemetrics( + cnr_files: List[Path], + output_file: Path, + segment_file: Optional[Path] = None, + threshold: float = 0.2, + min_probes: int = 1, + drop_low_coverage: bool = False, + male_reference: bool = False, +) -> dict: + """ + Calculate gene-level copy number metrics from a CNR file. + """ + for f in cnr_files: + if not f.exists(): + raise FileNotFoundError(f"CNR file not found: {f}") + + cmd = ["cnvkit.py", "genemetrics"] + cmd.extend([str(p) for p in cnr_files]) + cmd.extend(["--output", str(output_file)]) + if segment_file: + cmd.extend(["--segment-file", str(segment_file)]) + cmd.extend(["--threshold", str(threshold)]) + cmd.extend(["--min-probes", str(min_probes)]) + if drop_low_coverage: + cmd.append("--drop-low-coverage") + if male_reference: + cmd.append("--male-reference") + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def sex( + targetcoverage_files: List[Path], + output_file: Path, + male_reference: bool = False, +) -> dict: + """ + Guess the chromosomal sex of each sample. + """ + for f in targetcoverage_files: + if not f.exists(): + raise FileNotFoundError(f"Coverage file not found: {f}") + + cmd = ["cnvkit.py", "sex"] + cmd.extend([str(p) for p in targetcoverage_files]) + cmd.extend(["--output", str(output_file)]) + if male_reference: + cmd.append("--male-reference") + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def metrics( + cnr_files: List[Path], + segments: List[Path], + output_file: Path, +) -> dict: + """ + Compute summary statistics of the residual log2-ratios from the segmentation. + """ + for f in cnr_files: + if not f.exists(): + raise FileNotFoundError(f"CNR file not found: {f}") + for f in segments: + if not f.exists(): + raise FileNotFoundError(f"Segment file not found: {f}") + + cmd = ["cnvkit.py", "metrics"] + cmd.extend([str(p) for p in cnr_files]) + cmd.extend(["--segments"] + [str(p) for p in segments]) + cmd.extend(["--output", str(output_file)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def segmetrics( + cnr_files: List[Path], + output_file: Path, + segments: Optional[List[Path]] = None, + alpha: float = 0.05, + bootstrap: int = 100, +) -> dict: + """ + Compute segmentation metrics from copy ratios and segments. + """ + for f in cnr_files: + if not f.exists(): + raise FileNotFoundError(f"CNR file not found: {f}") + if segments: + for f in segments: + if not f.exists(): + raise FileNotFoundError(f"Segment file not found: {f}") + + cmd = ["cnvkit.py", "segmetrics"] + cmd.extend([str(p) for p in cnr_files]) + cmd.extend(["--output", str(output_file)]) + if segments: + cmd.extend(["--segments"] + [str(p) for p in segments]) + cmd.extend(["--alpha", str(alpha)]) + cmd.extend(["--bootstrap", str(bootstrap)]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def version() -> dict: + """ + Display the version number of CNVkit. + """ + cmd = ["cnvkit.py", "version"] + return _run_cnvkit_command(cmd) + +@mcp.tool() +def import_picard( + picard_metrics_files: List[Path], + output_dir: Path, +) -> dict: + """ + Convert Picard CalculateHsMetrics output to CNVkit's .cnn format. + """ + for f in picard_metrics_files: + if not f.exists(): + raise FileNotFoundError(f"Picard metrics file not found: {f}") + + cmd = ["cnvkit.py", "import-picard"] + cmd.extend([str(p) for p in picard_metrics_files]) + cmd.extend(["--output-dir", str(output_dir)]) + + return _run_cnvkit_command(cmd) + +@mcp.tool() +def import_seg( + seg_files: List[Path], + output_dir: Path, + chromosome_col: str = "chromosome", + start_col: str = "start", + end_col: str = "end", + gene_col: Optional[str] = None, + log2_col: str = "seg.mean", + probes_col: Optional[str] = None, + from_log10: bool = False, +) -> dict: + """ + Convert a SEG file to CNVkit's .cns format. + """ + for f in seg_files: + if not f.exists(): + raise FileNotFoundError(f"SEG file not found: {f}") + + cmd = ["cnvkit.py", "import-seg"] + cmd.extend([str(p) for p in seg_files]) + cmd.extend(["--output-dir", str(output_dir)]) + cmd.extend(["--chromosome", chromosome_col, "--start", start_col, "--end", end_col, "--log2", log2_col]) + if gene_col: + cmd.extend(["--gene", gene_col]) + if probes_col: + cmd.extend(["--probes", probes_col]) + if from_log10: + cmd.append("--from-log10") + + return _run_cnvkit_command(cmd) + +@mcp.tool() +def import_theta( + theta_results_file: Path, + output_file: Path, +) -> dict: + """ + Convert THetA2 results to a CNVkit .cns file. + """ + if not theta_results_file.exists(): + raise FileNotFoundError(f"THetA2 results file not found: {theta_results_file}") + + cmd = ["cnvkit.py", "import-theta", str(theta_results_file), "--output", str(output_file)] + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def export( + exporter: str, + cns_file: Path, + output_file: Path, + sample_id: Optional[str] = None, + label_genes: bool = False, + show: Optional[str] = None, +) -> dict: + """ + Export CNVkit's .cns files to another format. + """ + if not cns_file.exists(): + raise FileNotFoundError(f"CNS file not found: {cns_file}") + + exporters = ["bed", "vcf", "seg", "cdt", "jude", "nexus-basic", "nexus-ogt", "theta"] + if exporter not in exporters: + raise ValueError(f"Exporter must be one of {exporters}") + if show and show not in ["ploidy", "variant", "baf"]: + raise ValueError("show must be one of 'ploidy', 'variant', 'baf'") + + cmd = ["cnvkit.py", "export", exporter, str(cns_file), "--output", str(output_file)] + if sample_id: + cmd.extend(["--sample-id", sample_id]) + if label_genes: + cmd.append("--label-genes") + if show: + cmd.extend(["--show", show]) + + return _run_cnvkit_command(cmd, output_file) + +@mcp.tool() +def import_rna( + expression_files: List[Path], + output_file: Path, + format_type: str, + gene_resource: Path, + correlations: Optional[Path] = None, + no_gc: bool = False, +) -> dict: + """ + Import RNA-seq expression data as CNVkit .cnr files. + """ + for f in expression_files: + if not f.exists(): + raise FileNotFoundError(f"Expression file not found: {f}") + if not gene_resource.exists(): + raise FileNotFoundError(f"Gene resource file not found: {gene_resource}") + + formats = ["rsem", "counts", "tpm", "fpkm"] + if format_type not in formats: + raise ValueError(f"Format must be one of {formats}") + + cmd = ["cnvkit.py", "import-rna"] + cmd.extend([str(p) for p in expression_files]) + cmd.extend(["--output", str(output_file)]) + cmd.extend(["--format", format_type]) + cmd.extend(["--gene-resource", str(gene_resource)]) + if correlations: + cmd.extend(["--correlations", str(correlations)]) + if no_gc: + cmd.append("--no-gc") + + return _run_cnvkit_command(cmd, output_file) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..bbdb47226e31b73898dc829d51fe176c4e619b04 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/cnvkit_server.py') +SERVER_NAME = 'biosci_cnvkit' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c45a90adb038ca26d13db5ec3f7cd152d31315a6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-cnvkit: + build: . + image: mcp-cnvkit:latest + container_name: mcp-cnvkit + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=cnvkit + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..48f075e0d38caeb3435d58897c2cdfa823e59083 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - cnvkit + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cnvkit/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..974edc7cb2b0853028e55474bdd05bf6c9dcb772 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install comet-ms via conda (e.g., from bioconda) +RUN conda install -c bioconda comet-ms -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/comet-ms_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/comet-ms_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/comet-ms_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6ee012286fc09cdcb4717b977930b1b547f69e18 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_server.py @@ -0,0 +1,313 @@ +import subprocess +import shlex +import logging +from pathlib import Path +from typing import List, Optional, Tuple + +# Set up a logger for better feedback +log = logging.getLogger(__name__) + +# Comet's default enzyme information block, required for the params file +_ENZYME_INFO_BLOCK = """ +[COMET_ENZYME_INFO] +0. No_enzyme 0 - - +1. Trypsin 1 KR P +2. Trypsin/P 1 KR - +3. Lys_C 1 K P +4. Lys_N 0 K - +5. Arg_C 1 R P +6. Asp_N 0 D - +7. CNBr 1 M - +8. Glu_C 1 E P +9. PepsinA 1 FL P +10. Chymotrypsin 1 FWY P +""" + +# @mcp.tool() +def run_comet_search( + input_files: List[Path], + database_name: Path, + output_dir: Path, + output_filename_base: Optional[str] = None, + # --- Database Options --- + decoy_search: int = 0, + decoy_prefix: str = "DECOY_", + num_threads: int = 0, + # --- Mass Tolerances --- + peptide_mass_tolerance: float = 20.0, + peptide_mass_units: int = 2, + mass_type_parent: int = 1, + mass_type_fragment: int = 1, + precursor_tolerance_type: int = 0, + isotope_error: int = 0, + # --- Search Enzyme --- + search_enzyme_number: int = 1, + num_enzyme_termini: int = 2, + allowed_missed_cleavage: int = 2, + # --- Fragment Ions --- + fragment_bin_tol: float = 1.0005, + fragment_bin_offset: float = 0.4, + theoretical_fragment_ions: int = 1, + use_A_ions: bool = False, + use_B_ions: bool = True, + use_C_ions: bool = False, + use_X_ions: bool = False, + use_Y_ions: bool = True, + use_Z_ions: bool = False, + use_NL_ions: bool = True, + # --- Modifications --- + variable_mods: Optional[List[str]] = None, + max_variable_mods_in_peptide: int = 5, + require_variable_mod: bool = False, + add_C_cysteine: float = 57.021464, + add_N_terminus: float = 0.0, + add_C_terminus: float = 0.0, + # --- Output Format --- + output_sqtfile: bool = False, + output_txtfile: bool = False, + output_pepxmlfile: bool = True, + output_percolatorfile: bool = False, + output_outfiles: bool = False, + print_expect_score: bool = True, + num_output_lines: int = 5, + show_fragment_ions: bool = False, + sample_enzyme_number: int = 1, + # --- Spectral Processing --- + spectrum_batch_size: int = 0, + minimum_peaks: int = 10, + minimum_intensity: float = 0.0, + remove_precursor_peak: int = 0, + remove_precursor_tolerance: float = 1.5, + clear_mz_range: Optional[Tuple[float, float]] = None, + # --- Advanced Options --- + digest_mass_range: Tuple[float, float] = (600.0, 5000.0), + peptide_length_range: Tuple[int, int] = (1, 50), + max_fragment_charge: int = 3, + max_precursor_charge: int = 6, + override_charge: int = 0, + ms_level: int = 2, + activation_method: str = "ALL", + scan_range: Optional[Tuple[int, int]] = None, +): + """ + Executes a Comet-MS search against a protein database. + + This tool wraps the 'comet' command-line executable, a widely used tool for + tandem mass spectrometry (MS/MS) database searching. It generates a parameters + file based on the provided arguments and runs the search. + + Args: + input_files: List of input spectrum file paths (e.g., .mzML, .mzXML, .ms2). + database_name: Path to the protein FASTA database file. + output_dir: Directory to store output files and the generated params file. + output_filename_base: Base name for output files. If None, derived from the first input file. + decoy_search: 0=no decoy, 1=concatenated, 2=separate decoy search. + decoy_prefix: Prefix for decoy protein entries in the database. + num_threads: Number of search threads. 0 uses all available cores. + peptide_mass_tolerance: Precursor mass tolerance value. + peptide_mass_units: Units for peptide_mass_tolerance. 0=amu, 1=mmu, 2=ppm. + mass_type_parent: Mass type for parent ions. 0=monoisotopic, 1=average. + mass_type_fragment: Mass type for fragment ions. 0=monoisotopic, 1=average. + precursor_tolerance_type: 0=search tolerance, 1=narrowed, 2=wide. + isotope_error: Isotope error correction. 0=off, 1=on, 2=[-1,0,1,2,3], 3=[-8,-4,0,4,8]. + search_enzyme_number: Enzyme number from the enzyme info list (e.g., 1 for Trypsin). + num_enzyme_termini: Specificity of enzyme cleavage. 1=semi-specific, 2=fully-specific. + allowed_missed_cleavage: Maximum number of allowed missed cleavages. + fragment_bin_tol: Fragment ion tolerance in m/z. + fragment_bin_offset: Fragment ion bin offset. + theoretical_fragment_ions: 0=default, 1=rules, 2=all. + use_A_ions: Search for A-ions. + use_B_ions: Search for B-ions. + use_C_ions: Search for C-ions. + use_X_ions: Search for X-ions. + use_Y_ions: Search for Y-ions. + use_Z_ions: Search for Z-ions. + use_NL_ions: Search for neutral loss ions (b/y). + variable_mods: List of variable modifications. Each entry is a string like "mass residues max_mods binary term_dist pos". + max_variable_mods_in_peptide: Maximum number of variable modifications per peptide. + require_variable_mod: Peptides must contain at least one variable modification. + add_C_cysteine: Static modification on Cysteine. + add_N_terminus: Static modification on protein N-terminus. + add_C_terminus: Static modification on protein C-terminus. + output_sqtfile: Generate SQT output file. + output_txtfile: Generate TXT output file. + output_pepxmlfile: Generate pep.XML output file. + output_percolatorfile: Generate Percolator PIN output file. + output_outfiles: Generate .out files. + print_expect_score: Print expect score in SQT and pep.XML output. + num_output_lines: Number of top peptide hits to report for each spectrum. + show_fragment_ions: Include fragment ion series in .out files. + sample_enzyme_number: Enzyme used for PeptideProphet analysis. + spectrum_batch_size: Number of spectra to process in a batch. 0=automatic. + minimum_peaks: Minimum number of peaks in a spectrum to be searched. + minimum_intensity: Minimum intensity of a peak to be considered. + remove_precursor_peak: 0=no, 1=yes, 2=yes+charge reduced, 3=yes+charge reduced+isotopes. + remove_precursor_tolerance: Tolerance (in Da) for precursor removal. + clear_mz_range: A tuple (min_mz, max_mz) to clear from spectra. + digest_mass_range: A tuple (min_mass, max_mass) for peptide digest mass. + peptide_length_range: A tuple (min_len, max_len) for peptide length. + max_fragment_charge: Maximum fragment charge state to search. + max_precursor_charge: Maximum precursor charge state to search. + override_charge: 0=use file charge, 1=guess charge, 2=ignore charge. + ms_level: MS level to search. Typically 2 for MS/MS. + activation_method: Type of fragmentation. ALL, CID, ECD, ETD, PQD, HCD, IRMPD. + scan_range: A tuple (start_scan, end_scan) to limit the search. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output file paths. + """ + # --- 1. Input Validation --- + if not input_files: + raise ValueError("At least one input file must be provided.") + for file_path in input_files: + if not file_path.is_file(): + raise FileNotFoundError(f"Input file not found: {file_path}") + if not database_name.is_file(): + raise FileNotFoundError(f"Database file not found: {database_name}") + + # Validate enum-like parameters + if decoy_search not in [0, 1, 2]: + raise ValueError("decoy_search must be 0, 1, or 2.") + if peptide_mass_units not in [0, 1, 2]: + raise ValueError("peptide_mass_units must be 0, 1, or 2.") + valid_activation_methods = {"ALL", "CID", "ECD", "ETD", "PQD", "HCD", "IRMPD"} + if activation_method.upper() not in valid_activation_methods: + raise ValueError(f"activation_method must be one of {valid_activation_methods}") + if variable_mods and len(variable_mods) > 9: + raise ValueError("A maximum of 9 variable modifications are supported.") + + # --- 2. Setup Output and Parameters File --- + output_dir.mkdir(parents=True, exist_ok=True) + params_path = output_dir / "comet.params" + + if not output_filename_base: + output_filename_base = input_files[0].stem + + final_output_base = output_dir / output_filename_base + + params_content = [ + f"database_name = {database_name.resolve()}", + f"decoy_search = {decoy_search}", + f"decoy_prefix = {decoy_prefix}", + f"num_threads = {num_threads}", + f"peptide_mass_tolerance = {peptide_mass_tolerance}", + f"peptide_mass_units = {peptide_mass_units}", + f"mass_type_parent = {mass_type_parent}", + f"mass_type_fragment = {mass_type_fragment}", + f"precursor_tolerance_type = {precursor_tolerance_type}", + f"isotope_error = {isotope_error}", + f"search_enzyme_number = {search_enzyme_number}", + f"num_enzyme_termini = {num_enzyme_termini}", + f"allowed_missed_cleavage = {allowed_missed_cleavage}", + f"fragment_bin_tol = {fragment_bin_tol}", + f"fragment_bin_offset = {fragment_bin_offset}", + f"theoretical_fragment_ions = {theoretical_fragment_ions}", + f"use_A_ions = {1 if use_A_ions else 0}", + f"use_B_ions = {1 if use_B_ions else 0}", + f"use_C_ions = {1 if use_C_ions else 0}", + f"use_X_ions = {1 if use_X_ions else 0}", + f"use_Y_ions = {1 if use_Y_ions else 0}", + f"use_Z_ions = {1 if use_Z_ions else 0}", + f"use_NL_ions = {1 if use_NL_ions else 0}", + f"max_variable_mods_in_peptide = {max_variable_mods_in_peptide}", + f"require_variable_mod = {1 if require_variable_mod else 0}", + f"add_C_cysteine = {add_C_cysteine}", + f"add_N_terminus = {add_N_terminus}", + f"add_C_terminus = {add_C_terminus}", + f"output_sqtfile = {1 if output_sqtfile else 0}", + f"output_txtfile = {1 if output_txtfile else 0}", + f"output_pepxmlfile = {1 if output_pepxmlfile else 0}", + f"output_percolatorfile = {1 if output_percolatorfile else 0}", + f"output_outfiles = {1 if output_outfiles else 0}", + f"print_expect_score = {1 if print_expect_score else 0}", + f"num_output_lines = {num_output_lines}", + f"show_fragment_ions = {1 if show_fragment_ions else 0}", + f"sample_enzyme_number = {sample_enzyme_number}", + f"output_filename_base = {shlex.quote(output_filename_base)}", + f"spectrum_batch_size = {spectrum_batch_size}", + f"minimum_peaks = {minimum_peaks}", + f"minimum_intensity = {minimum_intensity}", + f"remove_precursor_peak = {remove_precursor_peak}", + f"remove_precursor_tolerance = {remove_precursor_tolerance}", + f"digest_mass_range = {digest_mass_range[0]} {digest_mass_range[1]}", + f"peptide_length_range = {peptide_length_range[0]} {peptide_length_range[1]}", + f"max_fragment_charge = {max_fragment_charge}", + f"max_precursor_charge = {max_precursor_charge}", + f"override_charge = {override_charge}", + f"ms_level = {ms_level}", + f"activation_method = {activation_method.upper()}", + ] + + if scan_range: + params_content.append(f"scan_range = {scan_range[0]} {scan_range[1]}") + if clear_mz_range: + params_content.append(f"clear_mz_range = {clear_mz_range[0]} {clear_mz_range[1]}") + if variable_mods: + for i, mod in enumerate(variable_mods, 1): + params_content.append(f"variable_mod0{i} = {mod}") + + params_content.append(_ENZYME_INFO_BLOCK) + + with open(params_path, "w") as f: + f.write("\n".join(params_content)) + + # --- 3. Command Construction --- + command = [ + "comet", + f"-p{params_path.resolve()}", + ] + command.extend([str(p.resolve()) for p in input_files]) + + command_str = " ".join(map(shlex.quote, command)) + log.info(f"Executing command: {command_str}") + + # --- 4. Subprocess Execution --- + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + cwd=output_dir, # Run from output_dir to ensure outputs are written there + ) + except FileNotFoundError: + return { + "command_executed": command_str, + "stdout": "", + "stderr": "Error: 'comet' executable not found. Please ensure it is in your system's PATH.", + "output_files": [] + } + except subprocess.CalledProcessError as e: + log.error(f"Comet execution failed with exit code {e.returncode}") + log.error(f"STDOUT: {e.stdout}") + log.error(f"STDERR: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + + # --- 5. Collect and Return Results --- + output_files = [] + if output_sqtfile and (final_output_base.with_suffix(".sqt")).exists(): + output_files.append(str(final_output_base.with_suffix(".sqt"))) + if output_txtfile and (final_output_base.with_suffix(".txt")).exists(): + output_files.append(str(final_output_base.with_suffix(".txt"))) + if output_pepxmlfile and (final_output_base.with_suffix(".pep.xml")).exists(): + output_files.append(str(final_output_base.with_suffix(".pep.xml"))) + if output_percolatorfile and (final_output_base.with_suffix(".pin")).exists(): + output_files.append(str(final_output_base.with_suffix(".pin"))) + if output_outfiles: + # .out files are named after input files + for in_file in input_files: + out_file = output_dir / in_file.with_suffix(".out").name + if out_file.exists(): + output_files.append(str(out_file)) + + return { + "command_executed": command_str, + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..7cbf900398dee57f06caf82094d948a00da96194 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/comet-ms_server.py') +SERVER_NAME = 'biosci_comet_ms' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4533e788c21894089ae08ace9fd1c7046fd9add6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-comet-ms: + build: . + image: mcp-comet-ms:latest + container_name: mcp-comet-ms + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=comet-ms + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2b95759a7b2e66f85f1d6d01ed24a4e9a8670083 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - comet-ms + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_comet-ms/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2222ff7bf8ac3bffacff217f71e88ee2d6bed932 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install cytoscape via conda (e.g., from bioconda) +RUN conda install -c bioconda cytoscape -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/cytoscape_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/cytoscape_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/cytoscape_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/app/cytoscape_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/app/cytoscape_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..980efa337435b9c0c7e58bea14d59935dbf692a4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/app/cytoscape_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/app/cytoscape_server.py') +SERVER_NAME = 'biosci_cytoscape' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c7fee9f78634f1510e03a3b47a2da7ca901c63bb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-cytoscape: + build: . + image: mcp-cytoscape:latest + container_name: mcp-cytoscape + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=cytoscape + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e1b5bcf43777bd05c8b83d4f4edee4db8a331311 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_cytoscape/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - cytoscape + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..1b7dce6e1341b39983cea8a5df88dc1fa9b0ba56 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install episcanpy via conda (e.g., from bioconda) +RUN conda install -c bioconda episcanpy -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/episcanpy_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/episcanpy_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/episcanpy_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c27c7921fcdee0c405a1176ed57cc7e7344bcfcd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_server.py @@ -0,0 +1,132 @@ +import subprocess +from pathlib import Path +from typing import Optional, List + +# In a real MCP environment, the mcp decorator would be imported. +# For this example, we define a placeholder. +class mcp: + @staticmethod + def tool(func): + return func + +@mcp.tool +def episcanpy_run_pipeline( + input_adata: Path, + output_adata: Path, + min_features_per_cell: Optional[int] = 200, + max_features_per_cell: Optional[int] = None, + min_cells_per_feature: Optional[int] = 10, + n_top_features: Optional[int] = 3000, + n_pca_comps: int = 50, + n_neighbors: int = 15, + n_pcs_for_neighbors: Optional[int] = None, + leiden_resolution: float = 1.0, + run_umap: bool = True, +) -> dict: + """ + Runs a standard single-cell epigenomics analysis pipeline using episcanpy. + + This function serves as a wrapper for a hypothetical command-line interface + for the episcanpy library. It performs quality control, normalization, + dimensionality reduction (PCA), neighborhood graph construction, clustering + (Leiden), and optionally UMAP embedding on a given AnnData object. + + Args: + input_adata: Path to the input AnnData object (.h5ad). + output_adata: Path to save the processed AnnData object (.h5ad). + min_features_per_cell: Minimum number of features required for a cell to be kept. + max_features_per_cell: Maximum number of features allowed for a cell to be kept. + min_cells_per_feature: Minimum number of cells in which a feature must be detected. + n_top_features: Number of highly variable features to select for dimensionality reduction. + n_pca_comps: Number of principal components to compute. + n_neighbors: The size of local neighborhood (in terms of number of cells) used for manifold approximation. + n_pcs_for_neighbors: Number of principal components to use for the neighborhood graph. Defaults to `n_pca_comps`. + leiden_resolution: Resolution parameter for the Leiden clustering algorithm. Higher values lead to more clusters. + run_umap: If True, compute the UMAP embedding. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not input_adata.is_file(): + raise FileNotFoundError(f"Input file not found: {input_adata}") + if n_pca_comps <= 0: + raise ValueError("n_pca_comps must be a positive integer.") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if leiden_resolution <= 0.0: + raise ValueError("leiden_resolution must be a positive float.") + if n_pcs_for_neighbors is not None and n_pcs_for_neighbors <= 0: + raise ValueError("n_pcs_for_neighbors must be a positive integer if specified.") + if n_pcs_for_neighbors is not None and n_pcs_for_neighbors > n_pca_comps: + raise ValueError("n_pcs_for_neighbors cannot be greater than n_pca_comps.") + + # Create output directory if it doesn't exist + output_adata.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + # NOTE: episcanpy is a Python library. We are constructing a command for a + # hypothetical CLI that exposes its core functionality. + cmd = [ + "episcanpy", "run_pipeline", + "--input-adata", str(input_adata), + "--output-adata", str(output_adata), + ] + + # QC parameters + if min_features_per_cell is not None: + cmd.extend(["--min-features-per-cell", str(min_features_per_cell)]) + if max_features_per_cell is not None: + cmd.extend(["--max-features-per-cell", str(max_features_per_cell)]) + if min_cells_per_feature is not None: + cmd.extend(["--min-cells-per-feature", str(min_cells_per_feature)]) + + # Normalization and feature selection + if n_top_features is not None: + cmd.extend(["--n-top-features", str(n_top_features)]) + + # Dimensionality reduction and clustering + cmd.extend(["--n-pca-comps", str(n_pca_comps)]) + cmd.extend(["--n-neighbors", str(n_neighbors)]) + + # Use all computed PCs for neighbors by default if not specified + effective_n_pcs = n_pcs_for_neighbors if n_pcs_for_neighbors is not None else n_pca_comps + cmd.extend(["--n-pcs-for-neighbors", str(effective_n_pcs)]) + + cmd.extend(["--leiden-resolution", str(leiden_resolution)]) + + if run_umap: + cmd.append("--run-umap") + + command_executed = " ".join(cmd) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + output_files = [str(output_adata)] if output_adata.exists() else [] + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except FileNotFoundError: + raise RuntimeError( + f"Command '{cmd[0]}' not found. This MCP tool wraps a hypothetical " + "CLI for the 'episcanpy' Python library. To make this functional, a " + "corresponding CLI script must be created and placed in the system's PATH." + ) + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"The hypothetical 'episcanpy' command failed with exit code {e.returncode}\n" + f"Command: {command_executed}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}" + ) diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1c282f977ad0c21ad8bd46ac2856b05e48628a7b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/episcanpy_server.py') +SERVER_NAME = 'biosci_episcanpy' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..594195770d9d8fc769fea46f767612f095bd1f59 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-episcanpy: + build: . + image: mcp-episcanpy:latest + container_name: mcp-episcanpy + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=episcanpy + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..db8966d75ecff9f7ad6cf99939eb2a849b5522c9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - episcanpy + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_episcanpy/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cba5e72b61d72265377e0d4735c382eaa85788f7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install fastp via conda (e.g., from bioconda) +RUN conda install -c bioconda fastp -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/fastp_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/fastp_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/fastp_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c15d57a3d75884c64075980111c6b3e8c5d3b25d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_server.py @@ -0,0 +1,342 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# In a real MCP environment, the mcp package would be available. +# This is a placeholder to allow the code to be syntactically valid. +class MCP: + def tool(self, *args, **kwargs): + def decorator(func): + return func + return decorator +mcp = MCP() + +@mcp.tool() +def fastp( + # Input and Output + in1: Optional[Path] = None, + out1: Optional[Path] = None, + in2: Optional[Path] = None, + out2: Optional[Path] = None, + unpaired1: Optional[Path] = None, + unpaired2: Optional[Path] = None, + overlapped_out: Optional[Path] = None, + failed_out: Optional[Path] = None, + merged_out: Optional[Path] = None, + stdin: bool = False, + stdout: bool = False, + interleaved_in: bool = False, + + # General Options + dedup: bool = False, + merge: bool = False, + include_unmerged: bool = False, + phred64: bool = False, + compression: int = 4, + reads_to_process: int = 0, + dont_overwrite: bool = False, + dont_eval_duplication: bool = False, + fix_mgi_id: bool = False, + verbose: bool = False, + + # Adapter Trimming + disable_adapter_trimming: bool = False, + adapter_sequence: str = "auto", + adapter_sequence_r2: str = "auto", + adapter_fasta: Optional[Path] = None, + detect_adapter_for_pe: bool = False, + + # Global Trimming + trim_front1: int = 0, + trim_tail1: int = 0, + max_len1: int = 0, + trim_front2: int = 0, + trim_tail2: int = 0, + max_len2: int = 0, + + # PolyG/PolyX Trimming + trim_poly_g: bool = False, + poly_g_min_len: int = 10, + disable_trim_poly_g: bool = False, + trim_poly_x: bool = False, + poly_x_min_len: int = 10, + + # Per-Read Quality Cutting + cut_front: bool = False, + cut_tail: bool = False, + cut_right: bool = False, + cut_window_size: int = 4, + cut_mean_quality: int = 20, + cut_front_window_size: int = 4, + cut_front_mean_quality: int = 20, + cut_tail_window_size: int = 4, + cut_tail_mean_quality: int = 20, + cut_right_window_size: int = 4, + cut_right_mean_quality: int = 20, + + # Quality Filtering + disable_quality_filtering: bool = False, + qualified_quality_phred: int = 15, + unqualified_percent_limit: int = 40, + n_base_limit: int = 5, + average_qual: int = 0, + + # Length Filtering + disable_length_filtering: bool = False, + length_required: int = 15, + length_limit: int = 0, + + # Low Complexity Filtering + low_complexity_filter: bool = False, + complexity_threshold: int = 30, + + # Index Filtering + filter_by_index1: Optional[Path] = None, + filter_by_index2: Optional[Path] = None, + filter_by_index_threshold: int = 0, + + # Correction and Overlap Analysis + correction: bool = False, + overlap_len_require: int = 30, + overlap_diff_limit: int = 5, + overlap_diff_percent_limit: int = 20, + + # UMI Processing + umi: bool = False, + umi_loc: Optional[str] = None, + umi_len: int = 0, + umi_prefix: Optional[str] = None, + umi_skip: int = 0, + + # Overrepresentation Analysis + overrepresentation_analysis: bool = False, + overrepresentation_sampling: int = 20, + + # Reporting + json_report: Path = Path("fastp.json"), + html_report: Path = Path("fastp.html"), + report_title: str = "fastp report", + + # Performance and Splitting + thread: int = 2, + split_files: int = 0, + split_lines: int = 0, + split_prefix_digits: int = 4, +) -> Dict[str, Any]: + """ + An ultra-fast FASTQ preprocessor with full features (QC/adapters/trimming/filtering/splitting...). + + This tool is designed to provide all-in-one preprocessing for FASTQ data, including quality control, + adapter trimming, quality filtering, and more. + """ + # --- Input Validation --- + if not stdin and not in1: + raise ValueError("Either --stdin must be True or --in1 must be provided.") + if stdin and in1: + raise ValueError("--stdin and --in1 cannot be used simultaneously.") + if in2 and not in1: + raise ValueError("--in2 requires --in1 for paired-end processing.") + if out2 and not out1: + raise ValueError("--out2 requires --out1 for paired-end processing.") + if stdout and (out1 or out2): + raise ValueError("--stdout cannot be used with --out1 or --out2.") + if merged_out and not merge: + raise ValueError("--merged_out requires --merge to be enabled.") + if include_unmerged and not merge: + raise ValueError("--include_unmerged requires --merge to be enabled.") + + for file_path in [in1, in2, adapter_fasta, filter_by_index1, filter_by_index2]: + if file_path and not file_path.exists(): + raise FileNotFoundError(f"Input file not found: {file_path}") + + if not (1 <= compression <= 9): + raise ValueError("--compression must be between 1 and 9.") + if not (1 <= cut_window_size <= 1000): + raise ValueError("--cut_window_size must be between 1 and 1000.") + if not (1 <= cut_mean_quality <= 36): + raise ValueError("--cut_mean_quality must be between 1 and 36.") + if not (0 <= unqualified_percent_limit <= 100): + raise ValueError("--unqualified_percent_limit must be between 0 and 100.") + if not (0 <= complexity_threshold <= 100): + raise ValueError("--complexity_threshold must be between 0 and 100.") + if not (1 <= overrepresentation_sampling <= 10000): + raise ValueError("--overrepresentation_sampling must be between 1 and 10000.") + if split_files != 0 and not (2 <= split_files <= 999): + raise ValueError("--split_files must be between 2 and 999, or 0 to disable.") + if split_lines != 0 and split_lines < 1000: + raise ValueError("--split_lines must be >= 1000, or 0 to disable.") + if split_files != 0 and split_lines != 0: + raise ValueError("--split_files and --split_lines cannot be used simultaneously.") + if not (0 <= split_prefix_digits <= 10): + raise ValueError("--split_prefix_digits must be between 0 and 10.") + + if umi: + if not umi_loc: + raise ValueError("--umi_loc must be specified when --umi is enabled.") + valid_umi_locs = ["index1", "index2", "read1", "read2", "per_index", "per_read"] + if umi_loc not in valid_umi_locs: + raise ValueError(f"--umi_loc must be one of {valid_umi_locs}.") + if umi_loc in ["read1", "read2"] and umi_len == 0: + raise ValueError("--umi_len must be provided when --umi_loc is 'read1' or 'read2'.") + + # --- File Path Handling --- + output_files_paths = [out1, out2, unpaired1, unpaired2, overlapped_out, failed_out, merged_out, json_report, html_report] + for out_path in output_files_paths: + if out_path: + out_path.parent.mkdir(parents=True, exist_ok=True) + + # --- Command Construction --- + cmd = ["fastp"] + + # Helper to add path arguments + def add_path_arg(flag: str, path: Optional[Path]): + if path: + cmd.extend([flag, str(path)]) + + # Helper to add boolean flags + def add_bool_flag(flag: str, value: bool): + if value: + cmd.append(flag) + + # Helper to add value arguments if not default + def add_val_arg(flag: str, value, default): + if value != default: + cmd.extend([flag, str(value)]) + + # Input/Output + add_path_arg("--in1", in1) + add_path_arg("--out1", out1) + add_path_arg("--in2", in2) + add_path_arg("--out2", out2) + add_path_arg("--unpaired1", unpaired1) + add_path_arg("--unpaired2", unpaired2) + add_path_arg("--overlapped_out", overlapped_out) + add_path_arg("--failed_out", failed_out) + add_path_arg("--merged_out", merged_out) + add_bool_flag("--stdin", stdin) + add_bool_flag("--stdout", stdout) + add_bool_flag("--interleaved_in", interleaved_in) + + # General + add_bool_flag("--dedup", dedup) + add_bool_flag("--merge", merge) + add_bool_flag("--include_unmerged", include_unmerged) + add_bool_flag("--phred64", phred64) + add_val_arg("--compression", compression, 4) + add_val_arg("--reads_to_process", reads_to_process, 0) + add_bool_flag("--dont_overwrite", dont_overwrite) + add_bool_flag("--dont_eval_duplication", dont_eval_duplication) + add_bool_flag("--fix_mgi_id", fix_mgi_id) + add_bool_flag("--verbose", verbose) + + # Adapters + add_bool_flag("--disable_adapter_trimming", disable_adapter_trimming) + add_val_arg("--adapter_sequence", adapter_sequence, "auto") + add_val_arg("--adapter_sequence_r2", adapter_sequence_r2, "auto") + add_path_arg("--adapter_fasta", adapter_fasta) + add_bool_flag("--detect_adapter_for_pe", detect_adapter_for_pe) + + # Trimming + add_val_arg("--trim_front1", trim_front1, 0) + add_val_arg("--trim_tail1", trim_tail1, 0) + add_val_arg("--max_len1", max_len1, 0) + add_val_arg("--trim_front2", trim_front2, 0) + add_val_arg("--trim_tail2", trim_tail2, 0) + add_val_arg("--max_len2", max_len2, 0) + + # PolyG/X + add_bool_flag("--trim_poly_g", trim_poly_g) + add_val_arg("--poly_g_min_len", poly_g_min_len, 10) + add_bool_flag("--disable_trim_poly_g", disable_trim_poly_g) + add_bool_flag("--trim_poly_x", trim_poly_x) + add_val_arg("--poly_x_min_len", poly_x_min_len, 10) + + # Quality Cutting + add_bool_flag("--cut_front", cut_front) + add_bool_flag("--cut_tail", cut_tail) + add_bool_flag("--cut_right", cut_right) + add_val_arg("--cut_window_size", cut_window_size, 4) + add_val_arg("--cut_mean_quality", cut_mean_quality, 20) + add_val_arg("--cut_front_window_size", cut_front_window_size, 4) + add_val_arg("--cut_front_mean_quality", cut_front_mean_quality, 20) + add_val_arg("--cut_tail_window_size", cut_tail_window_size, 4) + add_val_arg("--cut_tail_mean_quality", cut_tail_mean_quality, 20) + add_val_arg("--cut_right_window_size", cut_right_window_size, 4) + add_val_arg("--cut_right_mean_quality", cut_right_mean_quality, 20) + + # Quality Filtering + add_bool_flag("--disable_quality_filtering", disable_quality_filtering) + add_val_arg("--qualified_quality_phred", qualified_quality_phred, 15) + add_val_arg("--unqualified_percent_limit", unqualified_percent_limit, 40) + add_val_arg("--n_base_limit", n_base_limit, 5) + add_val_arg("--average_qual", average_qual, 0) + + # Length Filtering + add_bool_flag("--disable_length_filtering", disable_length_filtering) + add_val_arg("--length_required", length_required, 15) + add_val_arg("--length_limit", length_limit, 0) + + # Complexity + add_bool_flag("--low_complexity_filter", low_complexity_filter) + add_val_arg("--complexity_threshold", complexity_threshold, 30) + + # Index Filtering + add_path_arg("--filter_by_index1", filter_by_index1) + add_path_arg("--filter_by_index2", filter_by_index2) + add_val_arg("--filter_by_index_threshold", filter_by_index_threshold, 0) + + # Correction + add_bool_flag("--correction", correction) + add_val_arg("--overlap_len_require", overlap_len_require, 30) + add_val_arg("--overlap_diff_limit", overlap_diff_limit, 5) + add_val_arg("--overlap_diff_percent_limit", overlap_diff_percent_limit, 20) + + # UMI + add_bool_flag("--umi", umi) + if umi_loc: + cmd.extend(["--umi_loc", umi_loc]) + add_val_arg("--umi_len", umi_len, 0) + if umi_prefix: + cmd.extend(["--umi_prefix", umi_prefix]) + add_val_arg("--umi_skip", umi_skip, 0) + + # Overrepresentation + add_bool_flag("--overrepresentation_analysis", overrepresentation_analysis) + add_val_arg("--overrepresentation_sampling", overrepresentation_sampling, 20) + + # Reporting + cmd.extend(["--json", str(json_report)]) + cmd.extend(["--html", str(html_report)]) + add_val_arg("--report_title", report_title, "fastp report") + + # Performance/Splitting + add_val_arg("--thread", thread, 2) + add_val_arg("--split", split_files, 0) + add_val_arg("--split_by_lines", split_lines, 0) + add_val_arg("--split_prefix_digits", split_prefix_digits, 4) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + output_files = [str(p) for p in output_files_paths if p] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "fastp execution failed", + "return_code": e.returncode + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8ad29c0da90d2a2e5484868a62ec126071c59d1e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/fastp_server.py') +SERVER_NAME = 'biosci_fastp' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5b31f6868b9f07adb27a8e73bc4f8ce725d2ac47 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-fastp: + build: . + image: mcp-fastp:latest + container_name: mcp-fastp + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=fastp + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7fa6507b607e39e2369bcfe0b4d21a384328914d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - fastp + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_fastp/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..124ea7d4980df65b4371b482e7a5f012597443f0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install flagx via conda (e.g., from bioconda) +RUN conda install -c bioconda flagx -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/flagx_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/flagx_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/flagx_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6d83cb03622682ea0fa47d546a87169a01a68b27 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_server.py @@ -0,0 +1,145 @@ +import subprocess +from pathlib import Path +import logging +from typing import Dict, Any + +# Configure logging +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + +# Mock mcp.tool decorator for standalone execution +class mcp: + def tool(func): + return func + +@mcp.tool +def init_train_save(config: Path) -> Dict[str, Any]: + """ + Initializes a GatingPipeline, trains a model, and saves the pipeline. + + This function corresponds to the 'flagx init-train-save' command. It uses a + YAML configuration file to define all parameters for data loading, preprocessing, + model training, and saving the trained pipeline. + + Args: + config: Path to the YAML configuration file for initializing and training the pipeline. + This file's structure should match the signature of flagx.GatingPipeline. + + Returns: + A dictionary containing the execution details: + - command_executed: The full command line string that was run. + - stdout: The standard output from the command. + - stderr: The standard error from the command. + - output_files: A list of potential output files (Note: actual paths are defined within the config). + """ + # --- Input Validation --- + if not config.is_file(): + raise FileNotFoundError(f"Configuration file not found at: {config}") + + # --- Command Construction --- + command = [ + "flagx", + "init-train-save", + "--config", + str(config) + ] + + command_str = " ".join(command) + logger.info(f"Executing command: {command_str}") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + stdout = result.stdout + stderr = result.stderr + logger.info("flagx init-train-save completed successfully.") + + except FileNotFoundError: + logger.error("Error: 'flagx' command not found. Is FLAG-X installed and in your PATH?") + raise + except subprocess.CalledProcessError as e: + logger.error(f"Error executing flagx init-train-save. Return code: {e.returncode}") + logger.error(f"stdout:\n{e.stdout}") + logger.error(f"stderr:\n{e.stderr}") + raise + + # --- Structured Result Return --- + # Note: The output file (the saved pipeline) is defined within the config file. + # We return an empty list as the path is not directly known to this function. + return { + "command_executed": command_str, + "stdout": stdout, + "stderr": stderr, + "output_files": [] + } + +@mcp.tool +def load_infer_save(config: Path) -> Dict[str, Any]: + """ + Loads a trained GatingPipeline, performs inference, and saves the results. + + This function corresponds to the 'flagx load-infer-save' command. It uses a + YAML configuration file to specify the trained pipeline to load, the new data + for inference, dimensionality reduction methods, and how to export the results (e.g., to FCS files). + + Args: + config: Path to the YAML configuration file for loading the pipeline and running inference. + This file's structure should match the signature of flagx.GatingPipeline.inference(). + + Returns: + A dictionary containing the execution details: + - command_executed: The full command line string that was run. + - stdout: The standard output from the command. + - stderr: The standard error from the command. + - output_files: A list of potential output files (Note: actual paths are defined within the config). + """ + # --- Input Validation --- + if not config.is_file(): + raise FileNotFoundError(f"Configuration file not found at: {config}") + + # --- Command Construction --- + command = [ + "flagx", + "load-infer-save", + "--config", + str(config) + ] + + command_str = " ".join(command) + logger.info(f"Executing command: {command_str}") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + stdout = result.stdout + stderr = result.stderr + logger.info("flagx load-infer-save completed successfully.") + + except FileNotFoundError: + logger.error("Error: 'flagx' command not found. Is FLAG-X installed and in your PATH?") + raise + except subprocess.CalledProcessError as e: + logger.error(f"Error executing flagx load-infer-save. Return code: {e.returncode}") + logger.error(f"stdout:\n{e.stdout}") + logger.error(f"stderr:\n{e.stderr}") + raise + + # --- Structured Result Return --- + # Note: The output files (e.g., annotated FCS files) are defined within the config file. + # We return an empty list as the paths are not directly known to this function. + return { + "command_executed": command_str, + "stdout": stdout, + "stderr": stderr, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..856a2e4cc6aed3db8dbbf3e4f58bc01f3c68f004 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/flagx_server.py') +SERVER_NAME = 'biosci_flagx' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5bc7f283827b0f63e48f0d2e0bef6bd18a52f307 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-flagx: + build: . + image: mcp-flagx:latest + container_name: mcp-flagx + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=flagx + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7c1ef0c57083cf51e63df40ac496debdca967d24 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - flagx + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_flagx/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3a45b9138dd05c1f6db6c6f7e42203ab6d508e05 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install galaxy-lib via conda (e.g., from bioconda) +RUN conda install -c bioconda galaxy-lib -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/galaxy-lib_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/galaxy-lib_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/galaxy-lib_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ae735d7be2a4a2e323f67fa2e04e1362b4c40e8f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_server.py @@ -0,0 +1,213 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def galaxy_tool_lint( + tool_paths: List[str], + level: str = "warn", + fail_level: str = "error", + skip: Optional[str] = None, + recursive: bool = False, + quiet: bool = False, +) -> Dict[str, Any]: + """ + Check Galaxy tool XML files for common errors and best practices using galaxy-tool-lint. + + Args: + tool_paths: List of paths to Galaxy tool XML files or directories containing tools. + level: Linting level to report (all, warn, error). Default is 'warn'. + fail_level: Level at which to return a non-zero exit code (warn, error). Default is 'error'. + skip: Comma-separated list of lint checks to skip. + recursive: If tool_paths contains directories, search recursively for tools. + quiet: Do not print linting messages to stdout. + """ + # Input validation + validated_paths = [] + for p in tool_paths: + path_obj = Path(p) + if not path_obj.exists(): + return {"error": f"Path does not exist: {p}"} + validated_paths.append(str(path_obj)) + + if level not in ["all", "warn", "error"]: + return {"error": "level must be one of: all, warn, error"} + + if fail_level not in ["warn", "error"]: + return {"error": "fail_level must be one of: warn, error"} + + # Build command + cmd = ["galaxy-tool-lint"] + cmd.extend(["--level", level]) + cmd.extend(["--fail_level", fail_level]) + + if skip: + cmd.extend(["--skip", skip]) + if recursive: + cmd.append("--recursive") + if quiet: + cmd.append("--quiet") + + cmd.extend(validated_paths) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Linting failed or found issues above fail_level", + "exit_code": e.returncode + } + +@mcp.tool() +def galaxy_tool_test( + tool_path: str, + galaxy_url: str = "http://localhost:8080", + api_key: Optional[str] = None, + test_index: Optional[int] = None, + output_json: Optional[str] = None, +) -> Dict[str, Any]: + """ + Execute tests defined in a Galaxy tool XML file using galaxy-tool-test. + + Args: + tool_path: Path to the Galaxy tool XML file to test. + galaxy_url: URL of the Galaxy instance to run tests against. + api_key: API key for the Galaxy instance. + test_index: Index of the specific test to run (if omitted, all tests are run). + output_json: Path to save the test results in JSON format. + """ + path_obj = Path(tool_path) + if not path_obj.exists(): + return {"error": f"Tool file not found: {tool_path}"} + + cmd = ["galaxy-tool-test"] + cmd.extend(["--tool_path", str(path_obj)]) + cmd.extend(["--galaxy_url", galaxy_url]) + + if api_key: + cmd.extend(["--api_key", api_key]) + if test_index is not None: + cmd.extend(["--test_index", str(test_index)]) + if output_json: + cmd.extend(["--output", output_json]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_json] if output_json else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Tool testing failed", + "exit_code": e.returncode + } + +@mcp.tool() +def galaxy_xml_to_json( + input_xml: str, + output_json: Optional[str] = None, +) -> Dict[str, Any]: + """ + Convert a Galaxy tool XML definition into a JSON representation. + + Args: + input_xml: Path to the input Galaxy tool XML file. + output_json: Path to the output JSON file. If not provided, prints to stdout. + """ + xml_path = Path(input_xml) + if not xml_path.exists(): + return {"error": f"Input XML file not found: {input_xml}"} + + cmd = ["galaxy-xml-to-json", str(xml_path)] + + if output_json: + cmd.extend(["--output", output_json]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_json] if output_json else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Conversion to JSON failed" + } + +@mcp.tool() +def galaxy_json_to_xml( + input_json: str, + output_xml: Optional[str] = None, +) -> Dict[str, Any]: + """ + Convert a JSON tool representation back into a Galaxy tool XML definition. + + Args: + input_json: Path to the input JSON tool file. + output_xml: Path to the output XML file. If not provided, prints to stdout. + """ + json_path = Path(input_json) + if not json_path.exists(): + return {"error": f"Input JSON file not found: {input_json}"} + + cmd = ["galaxy-json-to-xml", str(json_path)] + + if output_xml: + cmd.extend(["--output", output_xml]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_xml] if output_xml else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Conversion to XML failed" + } + +@mcp.tool() +def galaxy_lib_info() -> Dict[str, Any]: + """ + Get information about the installed galaxy-lib version and environment. + Note: galaxy-lib is deprecated in favor of galaxy-tool-util. + """ + try: + # Check version via pip or conda if available, or just try to import + import galaxy + version = getattr(galaxy, "__version__", "unknown") + + return { + "package": "galaxy-lib", + "version": version, + "status": "DEPRECATED", + "recommendation": "Use galaxy-tool-util instead", + "description": "Subset of Galaxy core code base designed to be used as a library." + } + except ImportError: + return {"error": "galaxy-lib is not installed in the current environment"} \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8231d90ff79d79cad14152f74ca049058482d95d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/galaxy-lib_server.py') +SERVER_NAME = 'biosci_galaxy_lib' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..1d5a7b863265cce7855f9fbfab8bdf26ee5628f9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/app/requirements.txt @@ -0,0 +1 @@ +galaxy==26.0.0 diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..759d05b05d4f74165a4ee0c2af98ec83c3e89cfe --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-galaxy-lib: + build: . + image: mcp-galaxy-lib:latest + container_name: mcp-galaxy-lib + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=galaxy-lib + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..913635e9bbd9279bfe1d78c106e1b2e4cb9b3bcd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - galaxy-lib + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..2b4181e5c832ca06b81d820cd10574e9e76d5e0a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_galaxy-lib/requirements.txt @@ -0,0 +1,3 @@ +galaxy==26.0.0 +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gdk-pixbuf/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gdk-pixbuf/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1e46bc91521db8ab30f0be25483ca64a1664bc79 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gdk-pixbuf/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - gdk-pixbuf + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gdk-pixbuf/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gdk-pixbuf/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gdk-pixbuf/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..32942a00b2b3eaaff07033c3392ce0e04240dc8f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install gene-trajectory-python via conda (e.g., from bioconda) +RUN conda install -c bioconda gene-trajectory-python -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/gene-trajectory-python_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/gene-trajectory-python_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/gene-trajectory-python_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2fe6d6a68ebadba6390913c669b688fdc57ef1cc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_server.py @@ -0,0 +1,207 @@ +import subprocess +import tempfile +import sys +from pathlib import Path +from typing import Optional, Dict, List + +# MCP-related imports are intentionally omitted as per the instructions. +# from mcp import tool + +# @mcp.tool() +def run_gene_trajectory( + adata_path: Path, + output_adata_path: Path, + obsm_key: str = 'X_pca', + n_variable_genes: int = 2000, + layer: Optional[str] = None, + n_components: int = 50, + n_neighbors: int = 15, + use_highly_variable: bool = True, + resolution: float = 1.0, + n_clusters: Optional[int] = None, + n_groups: int = 100, + n_pcs: int = 50, + n_diff_maps: int = 15, + t: int = 1, + random_state: int = 0, + output_trajectory_plot: Optional[Path] = None, + trajectory_plot_basis: str = 'X_diffmap_eval', + output_heatmap_plot: Optional[Path] = None, + heatmap_plot_n_genes: int = 10, + output_feature_plot: Optional[Path] = None, + feature_plot_basis: str = 'X_umap', +) -> Dict: + """ + Runs the full GeneTrajectory pipeline on a single-cell dataset. + + This tool identifies trajectories of genes rather than cells by calculating + optimal transport distances between gene distributions across the cell-cell graph. + It takes an AnnData object as input, performs the analysis, and saves the + updated AnnData object with trajectory information. Optional plots can also be generated. + + Args: + adata_path: Path to the input AnnData file (`.h5ad`). + output_adata_path: Path to save the output AnnData file (`.h5ad`) with results. + obsm_key: Key in `adata.obsm` for the PCA representation. + n_variable_genes: Number of highly variable genes to use. + layer: The layer in `adata` to use for computation. If None, `adata.X` is used. + n_components: Number of principal components to compute if `obsm_key` is not present. + n_neighbors: Number of neighbors for the cell-cell graph. + use_highly_variable: Whether to use highly variable genes. + resolution: Resolution for Leiden clustering. + n_clusters: Number of clusters for K-means in coarse-graining. If None, it's determined automatically. + n_groups: Number of groups for coarse-graining. + n_pcs: Number of principal components for the diffusion map. + n_diff_maps: Number of diffusion maps to compute. + t: Time step for the diffusion map. + random_state: Random state for reproducibility. + output_trajectory_plot: Optional path to save the gene trajectory plot as a PNG file. + trajectory_plot_basis: Basis to use for the trajectory plot (e.g., 'X_diffmap_eval'). + output_heatmap_plot: Optional path to save the gene program heatmap as a PNG file. + heatmap_plot_n_genes: Number of genes to display in the heatmap for each program. + output_feature_plot: Optional path to save the gene program feature plot as a PNG file. + feature_plot_basis: Basis to use for the feature plot (e.g., 'X_umap'). + + Returns: + A dictionary containing the executed command, stdout, stderr, and a + dictionary of output file paths. + """ + # 1. Input validation + if not adata_path.is_file(): + raise FileNotFoundError(f"Input AnnData file not found: {adata_path}") + if n_variable_genes <= 0: + raise ValueError("n_variable_genes must be a positive integer.") + if n_components <= 0: + raise ValueError("n_components must be a positive integer.") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if resolution <= 0: + raise ValueError("resolution must be a positive float.") + if n_groups <= 0: + raise ValueError("n_groups must be a positive integer.") + if n_pcs <= 0: + raise ValueError("n_pcs must be a positive integer.") + if n_diff_maps <= 0: + raise ValueError("n_diff_maps must be a positive integer.") + if t <= 0: + raise ValueError("t must be a positive integer.") + + with tempfile.TemporaryDirectory() as temp_dir_str: + temp_dir = Path(temp_dir_str) + script_path = temp_dir / "run_gene_trajectory_script.py" + + # 2. Generate the Python script to execute the library's functions + # This approach isolates the execution and dependencies from the MCP server. + script_content = f""" +import sys +import warnings +import anndata as ad +import gene_trajectory as gt +import matplotlib.pyplot as plt + +# Suppress common warnings from underlying libraries for cleaner output +warnings.filterwarnings("ignore", category=UserWarning, module='scanpy') +warnings.filterwarnings("ignore", category=FutureWarning) + +try: + # Load input data + adata = ad.read_h5ad(r'{adata_path.resolve()}') + + # Instantiate the GeneTrajectory model + model = gt.GeneTrajectory() + + # Run the full pipeline + adata_result = model.run( + adata, + obsm_key='{obsm_key}', + n_variable_genes={n_variable_genes}, + layer={repr(layer)}, + n_components={n_components}, + n_neighbors={n_neighbors}, + use_highly_variable={use_highly_variable}, + resolution={resolution}, + n_clusters={repr(n_clusters)}, + n_groups={n_groups}, + n_pcs={n_pcs}, + n_diff_maps={n_diff_maps}, + t={t}, + random_state={random_state}, + copy=True + ) + + # Save the resulting AnnData object + adata_result.write_h5ad(r'{output_adata_path.resolve()}') + + # Generate and save optional plots + if {output_trajectory_plot is not None}: + output_traj_plot_path = r'{str(output_trajectory_plot.resolve()) if output_trajectory_plot else ""}' + fig, ax = plt.subplots(figsize=(6, 6)) + model.plot_trajectory(basis='{trajectory_plot_basis}', ax=ax) + fig.savefig(output_traj_plot_path, bbox_inches='tight', dpi=300) + plt.close(fig) + + if {output_heatmap_plot is not None}: + output_heatmap_plot_path = r'{str(output_heatmap_plot.resolve()) if output_heatmap_plot else ""}' + # plot_program_heatmap returns a seaborn ClusterGrid object + grid = model.plot_program_heatmap(n_genes={heatmap_plot_n_genes}) + grid.savefig(output_heatmap_plot_path, bbox_inches='tight', dpi=300) + plt.close() + + if {output_feature_plot is not None}: + output_feature_plot_path = r'{str(output_feature_plot.resolve()) if output_feature_plot else ""}' + # Check if the required basis exists in the AnnData object + if '{feature_plot_basis}' not in adata_result.obsm: + print( + f"Warning: Basis '{feature_plot_basis}' not found in adata.obsm. Skipping feature plot.", + file=sys.stderr + ) + else: + fig, ax = plt.subplots(figsize=(6, 6)) + model.plot_program_feature(basis='{feature_plot_basis}', ax=ax) + fig.savefig(output_feature_plot_path, bbox_inches='tight', dpi=300) + plt.close(fig) + +except Exception as e: + print(f"An error occurred during GeneTrajectory execution: {{e}}", file=sys.stderr) + sys.exit(1) + +print("GeneTrajectory analysis completed successfully.") +""" + script_path.write_text(script_content) + + # 3. Execute the script in a subprocess + command = [sys.executable, str(script_path)] + command_str = " ".join(command) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + cwd=temp_dir, + ) + except subprocess.CalledProcessError as e: + print(f"Error executing GeneTrajectory script.") + print(f"Return Code: {e.returncode}") + print(f"Stdout: {e.stdout}") + print(f"Stderr: {e.stderr}") + raise + + # 4. Collect output file paths for the structured result + output_files = {"processed_adata": str(output_adata_path)} + if output_trajectory_plot: + output_files["trajectory_plot"] = str(output_trajectory_plot) + if output_heatmap_plot: + output_files["heatmap_plot"] = str(output_heatmap_plot) + if output_feature_plot: + # Only report the file if it was actually created + if output_feature_plot.exists(): + output_files["feature_plot"] = str(output_feature_plot) + + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..28f1e739cc1d0ddf97b1ba8652474b5f51ddfe2e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/gene-trajectory-python_server.py') +SERVER_NAME = 'biosci_gene_trajectory_python' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b68133a781ac89b833e4be98d3c9a9cd38515c96 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-gene-trajectory-python: + build: . + image: mcp-gene-trajectory-python:latest + container_name: mcp-gene-trajectory-python + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=gene-trajectory-python + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gene-trajectory-python/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..645610c98d6e90ef28cfd2502d1cbffb49f64d27 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install gneiss via conda (e.g., from bioconda) +RUN conda install -c bioconda gneiss -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/gneiss_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/gneiss_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/gneiss_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_server.py new file mode 100644 index 0000000000000000000000000000000000000000..fa32a49f4111d2db80e9d58dc7d8c2bbf94d5ae8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_server.py @@ -0,0 +1,327 @@ +import subprocess +import logging +from pathlib import Path +from typing import Optional, List + +# It is assumed that 'mcp' is a pre-defined decorator. +# For standalone testing, you could use a mock decorator: +# +# class mcp: +# @staticmethod +# def tool(): +# def decorator(func): +# return func +# return decorator + +logging.basicConfig(level=logging.INFO) + +@mcp.tool() +def correlation_clustering( + in_biom: Path, + output_tree: Path, + correlation_method: str = 'spearman', + clustering_method: str = 'ward' +) -> dict: + """ + Performs hierarchical clustering on features using their correlation. + + This is useful for creating a hierarchy of features based on their co-occurrence + patterns across samples. + """ + if not in_biom.exists(): + raise FileNotFoundError(f"Input biom table not found: {in_biom}") + + # Ensure output directory exists + output_tree.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "gneiss", "correlation-clustering", + "--in-biom", str(in_biom), + "--output-tree", str(output_tree), + "--correlation-method", correlation_method, + "--clustering-method", clustering_method + ] + + command_str = " ".join(cmd) + logging.info(f"Executing command: {command_str}") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_tree)] + } + except subprocess.CalledProcessError as e: + logging.error(f"Gneiss correlation-clustering failed: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def dendrogram_heatmap( + in_biom: Path, + in_tree: Path, + in_meta: Path, + category: str, + output_viz: Path, + vmin: Optional[float] = None, + vmax: Optional[float] = None, + cmap: str = 'YlGnBu' +) -> dict: + """ + Builds a heatmap visualization of a biom table, ordered by a dendrogram. + + This tool is useful for visualizing the relationship between feature balances + and sample metadata categories. + """ + for input_file in [in_biom, in_tree, in_meta]: + if not input_file.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + if not category: + raise ValueError("Metadata category must be a non-empty string.") + + # Ensure output directory exists + output_viz.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "gneiss", "dendrogram-heatmap", + "--in-biom", str(in_biom), + "--in-tree", str(in_tree), + "--in-meta", str(in_meta), + "--category", category, + "--output-viz", str(output_viz), + "--cmap", cmap + ] + + if vmin is not None: + cmd.extend(["--vmin", str(vmin)]) + if vmax is not None: + cmd.extend(["--vmax", str(vmax)]) + + command_str = " ".join(cmd) + logging.info(f"Executing command: {command_str}") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_viz)] + } + except subprocess.CalledProcessError as e: + logging.error(f"Gneiss dendrogram-heatmap failed: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def ilr_hierarchical( + in_biom: Path, + in_tree: Path, + output_biom: Path +) -> dict: + """ + Performs isometric log-ratio (ILR) transformation on a table using a hierarchical tree. + + This transforms compositional data into a real-valued space of balances, + which is suitable for standard statistical analyses. + """ + for input_file in [in_biom, in_tree]: + if not input_file.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + # Ensure output directory exists + output_biom.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "gneiss", "ilr-hierarchical", + "--in-biom", str(in_biom), + "--in-tree", str(in_tree), + "--output-biom", str(output_biom) + ] + + command_str = " ".join(cmd) + logging.info(f"Executing command: {command_str}") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_biom)] + } + except subprocess.CalledProcessError as e: + logging.error(f"Gneiss ilr-hierarchical failed: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def ilr_phylogenetic( + in_biom: Path, + in_tree: Path, + output_biom: Path +) -> dict: + """ + Performs isometric log-ratio (ILR) transformation on a table using a phylogenetic tree. + + This is similar to ilr-hierarchical but specifically uses a phylogenetic tree + to define the balances, incorporating evolutionary relationships. + """ + for input_file in [in_biom, in_tree]: + if not input_file.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + # Ensure output directory exists + output_biom.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "gneiss", "ilr-phylogenetic", + "--in-biom", str(in_biom), + "--in-tree", str(in_tree), + "--output-biom", str(output_biom) + ] + + command_str = " ".join(cmd) + logging.info(f"Executing command: {command_str}") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_biom)] + } + except subprocess.CalledProcessError as e: + logging.error(f"Gneiss ilr-phylogenetic failed: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def lme_regression( + in_biom: Path, + in_meta: Path, + formula: str, + groups: str, + output_dir: Path +) -> dict: + """ + Performs Linear Mixed Effects (LME) regression on balances. + + This models the relationship between balances and metadata variables while + accounting for random effects, such as repeated measures from subjects. + """ + for input_file in [in_biom, in_meta]: + if not input_file.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + if not formula: + raise ValueError("Formula must be a non-empty string.") + if not groups: + raise ValueError("Groups must be a non-empty string.") + + # Ensure output directory exists + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "gneiss", "lme-regression", + "--in-biom", str(in_biom), + "--in-meta", str(in_meta), + "--formula", formula, + "--groups", groups, + "--output-dir", str(output_dir) + ] + + command_str = " ".join(cmd) + logging.info(f"Executing command: {command_str}") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # Gneiss regression outputs multiple files, so we return the directory + output_files = [str(p) for p in output_dir.glob('*')] + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + logging.error(f"Gneiss lme-regression failed: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def ols_regression( + in_biom: Path, + in_meta: Path, + formula: str, + output_dir: Path +) -> dict: + """ + Performs Ordinary Least Squares (OLS) regression on balances. + + This models the linear relationship between balances (response variables) + and metadata variables (predictors). + """ + for input_file in [in_biom, in_meta]: + if not input_file.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + if not formula: + raise ValueError("Formula must be a non-empty string.") + + # Ensure output directory exists + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "gneiss", "ols-regression", + "--in-biom", str(in_biom), + "--in-meta", str(in_meta), + "--formula", formula, + "--output-dir", str(output_dir) + ] + + command_str = " ".join(cmd) + logging.info(f"Executing command: {command_str}") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # Gneiss regression outputs multiple files, so we return the directory + output_files = [str(p) for p in output_dir.glob('*')] + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + logging.error(f"Gneiss ols-regression failed: {e.stderr}") + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..aa11ed03108cd55d07cd87cffca64525d35f4fce --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/gneiss_server.py') +SERVER_NAME = 'biosci_gneiss' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..8188b23a6e770bcf257b16fd7c0ac7d7841a2500 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-gneiss: + build: . + image: mcp-gneiss:latest + container_name: mcp-gneiss + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=gneiss + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..61580b9529e067472a95fde20dfcd5e18fbe7fff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - gneiss + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gneiss/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..654ab93c8fe816b5153cf4d183021d0447c40e95 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install goleft via conda (e.g., from bioconda) +RUN conda install -c bioconda goleft -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/goleft_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/goleft_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/goleft_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e4a64b8fe79983ac513f7e73fd368007612b1666 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_server.py @@ -0,0 +1,435 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# NOTE: The @mcp.tool decorator is a placeholder. +# In a real MCP environment, it would be provided by the MCP framework. +class mcp: + @staticmethod + def tool(func): + return func + +@mcp.tool +def goleft_covstats( + bams: List[Path], + denominator: str = "target-size", + n_reads: int = 25000000, + procs: int = 4, + reference: Optional[Path] = None, + target_bed: Optional[Path] = None, +): + """ + Estimate coverage and insert-size statistics on BAM/CRAM files by sampling. + + Args: + bams: List of input BAM/CRAM files. + denominator: Calculate coverage as reads / denominator. Must be 'target-size' or 'genome-size'. + n_reads: Number of reads to sample from each BAM. + procs: Number of processors to use. + reference: Optional reference FASTA for CRAM files. + target_bed: Optional BED file of target regions. + """ + # Input validation + if not bams: + raise ValueError("At least one BAM/CRAM file must be provided.") + for bam in bams: + if not bam.is_file(): + raise FileNotFoundError(f"Input file not found: {bam}") + if denominator not in ["target-size", "genome-size"]: + raise ValueError("Denominator must be one of 'target-size' or 'genome-size'.") + if n_reads <= 0: + raise ValueError("n_reads must be a positive integer.") + if procs <= 0: + raise ValueError("procs must be a positive integer.") + if reference and not reference.is_file(): + raise FileNotFoundError(f"Reference file not found: {reference}") + if target_bed and not target_bed.is_file(): + raise FileNotFoundError(f"Target BED file not found: {target_bed}") + + cmd = [ + "goleft", "covstats", + "--denominator", denominator, + "--nreads", str(n_reads), + "--procs", str(procs), + ] + + if reference: + cmd.extend(["--reference", str(reference)]) + if target_bed: + cmd.extend(["--targetbed", str(target_bed)]) + + cmd.extend([str(p) for p in bams]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"goleft covstats failed with exit code {e.returncode}", + "output_files": [], + } + +@mcp.tool +def goleft_depth( + bams: List[Path], + fai: Path, + output_dir: Path, + bed: Optional[Path] = None, + gaps: int = 2000, + procs: int = 4, + map_quality: int = 10, + base_quality: int = 10, + reference: Optional[Path] = None, + window_size: int = 5000, + min_cov: int = 1, + s_flags: int = 1796, + f_flags: int = 0, +): + """ + Parallelize calls to samtools depth in user-defined windows. + + Args: + bams: List of input BAM/CRAM files. + fai: FAI file of the reference genome. + output_dir: Directory to write depth files. + bed: Optional BED file of regions to process. + gaps: Number of bases to pad between windows for discordant pairs. + procs: Number of processors to use. + map_quality: Only count reads with mapping quality of at least this value. + base_quality: Only count bases with base quality of at least this value. + reference: Optional reference FASTA for CRAM files. + window_size: Window size for coverage depth reporting. + min_cov: Only report windows with coverage at least this value. + s_flags: Samtools flags to skip reads (e.g., 1796 for QCFAIL, DUP, SECONDARY, SUPPLEMENTARY). + f_flags: Samtools flags to filter reads (e.g., 2 to count only proper pairs). + """ + # Input validation + if not bams: + raise ValueError("At least one BAM/CRAM file must be provided.") + for bam in bams: + if not bam.is_file(): + raise FileNotFoundError(f"Input file not found: {bam}") + if not fai.is_file(): + raise FileNotFoundError(f"FAI file not found: {fai}") + if bed and not bed.is_file(): + raise FileNotFoundError(f"BED file not found: {bed}") + if reference and not reference.is_file(): + raise FileNotFoundError(f"Reference file not found: {reference}") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "goleft", "depth", + "--fai", str(fai), + "--dir", str(output_dir), + "--gaps", str(gaps), + "--procs", str(procs), + "-q", str(map_quality), + "-Q", str(base_quality), + "--windowsize", str(window_size), + "--mincov", str(min_cov), + "--sflags", str(s_flags), + "--fflags", str(f_flags), + ] + + if bed: + cmd.extend(["--bed", str(bed)]) + if reference: + cmd.extend(["--reference", str(reference)]) + + cmd.extend([str(p) for p in bams]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + output_files = [output_dir / f"{bam.stem}.depth.bed.gz" for bam in bams] + final_output_files = [str(f) for f in output_files if f.exists()] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": final_output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"goleft depth failed with exit code {e.returncode}", + "output_files": [], + } + +@mcp.tool +def goleft_depthwed( + depth_files: List[Path], + bed: Path, + prefix: str, + output_dir: Optional[Path] = None, +): + """ + Matricize output from 'goleft depth' to n-sites * n-samples. + + Args: + depth_files: List of depth files generated by 'goleft depth'. + bed: BED file of regions used to create the depth files. + prefix: Prefix for output files (e.g., 'my_cohort'). + output_dir: Directory to write output files. Defaults to a temporary directory. + """ + # Input validation + if not depth_files: + raise ValueError("At least one depth file must be provided.") + for df in depth_files: + if not df.is_file(): + raise FileNotFoundError(f"Input depth file not found: {df}") + if not bed.is_file(): + raise FileNotFoundError(f"BED file not found: {bed}") + if not prefix.strip(): + raise ValueError("Prefix cannot be empty.") + + with tempfile.TemporaryDirectory() as temp_dir: + work_dir = output_dir or Path(temp_dir) + work_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "goleft", "depthwed", + "--bed", str(bed), + "--prefix", prefix, + ] + cmd.extend([str(p) for p in depth_files]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + cwd=work_dir, + ) + + expected_files = [ + work_dir / f"{prefix}.depth.tsv", + work_dir / f"{prefix}.sites.bed.gz", + work_dir / f"{prefix}.samples.tsv" + ] + output_files = [str(f) for f in expected_files if f.exists()] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"goleft depthwed failed with exit code {e.returncode}", + "output_files": [], + } + +@mcp.tool +def goleft_indexcov( + bams: List[Path], + fai: Path, + output_dir: Path, + procs: int = 4, + sex_file: Optional[Path] = None, + window_size: str = "16K", +): + """ + Quick coverage estimate using only the BAM/CRAM index. + + Args: + bams: List of input BAM/CRAM files (and their .bai/.crai indexes). + fai: FAI file of the reference genome. + output_dir: Directory to write output files (HTML report, etc.). + procs: Number of processors to use. + sex_file: Optional file containing sample\tsex mapping. + window_size: Window size for coverage depth reporting (e.g., '16K', '1M'). + """ + # Input validation + if not bams: + raise ValueError("At least one BAM/CRAM file must be provided.") + for bam in bams: + if not bam.is_file(): + raise FileNotFoundError(f"Input file not found: {bam}") + index_bai = bam.with_suffix(bam.suffix + ".bai") + index_crai = bam.with_suffix(".crai") + if not (index_bai.exists() or index_crai.exists()): + raise FileNotFoundError(f"Index file (.bai or .crai) not found for {bam}") + if not fai.is_file(): + raise FileNotFoundError(f"FAI file not found: {fai}") + if sex_file and not sex_file.is_file(): + raise FileNotFoundError(f"Sex file not found: {sex_file}") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "goleft", "indexcov", + "--fai", str(fai), + "--dir", str(output_dir), + "--procs", str(procs), + "--windowsize", window_size, + ] + + if sex_file: + cmd.extend(["--sex", str(sex_file)]) + + cmd.extend([str(p) for p in bams]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + html_report = output_dir / "indexcov.html" + output_files = [str(p) for p in output_dir.glob('**/*') if p.is_file()] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + "main_report": str(html_report) if html_report.exists() else None + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"goleft indexcov failed with exit code {e.returncode}", + "output_files": [], + } + +@mcp.tool +def goleft_indexsplit( + bams: List[Path], + fai: Path, + n_chunks: int = 100, + output_file: Optional[Path] = None, + procs: int = 4, +): + """ + Generate regions of even data across a cohort for parallelization. + + Args: + bams: List of input BAM/CRAM files. + fai: FAI file of the reference genome. + n_chunks: Number of chunks to create. + output_file: File to write regions to. If None, writes to stdout. + procs: Number of processors to use. + """ + # Input validation + if not bams: + raise ValueError("At least one BAM/CRAM file must be provided.") + for bam in bams: + if not bam.is_file(): + raise FileNotFoundError(f"Input file not found: {bam}") + if not fai.is_file(): + raise FileNotFoundError(f"FAI file not found: {fai}") + if n_chunks <= 0: + raise ValueError("n_chunks must be a positive integer.") + if procs <= 0: + raise ValueError("procs must be a positive integer.") + + cmd = [ + "goleft", "indexsplit", + "--fai", str(fai), + "-N", str(n_chunks), + "--procs", str(procs), + ] + + output_files_list = [] + if output_file: + cmd.extend(["--out", str(output_file)]) + output_files_list.append(str(output_file)) + + cmd.extend([str(p) for p in bams]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files_list, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"goleft indexsplit failed with exit code {e.returncode}", + "output_files": [], + } + +@mcp.tool +def goleft_samplename( + bams: List[Path], +): + """ + Report samplename(s) from a BAM/CRAM file's SM tag in the header. + + Args: + bams: List of input BAM/CRAM files. + """ + # Input validation + if not bams: + raise ValueError("At least one BAM/CRAM file must be provided.") + for bam in bams: + if not bam.is_file(): + raise FileNotFoundError(f"Input file not found: {bam}") + + cmd = ["goleft", "samplename"] + cmd.extend([str(p) for p in bams]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"goleft samplename failed with exit code {e.returncode}", + "output_files": [], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9071cfda9bb661743f03635a5b67c6ccaaaa1e27 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/goleft_server.py') +SERVER_NAME = 'biosci_goleft' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..be5348e342deeffe41b34a8051fd7f83e9ac76d3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-goleft: + build: . + image: mcp-goleft:latest + container_name: mcp-goleft + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=goleft + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fc842e11ccefeccf5dc031cbffa31a8e6486189e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - goleft + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_goleft/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6dddfd57f06bcbce0153d4eafc7cf08b91ad7817 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install gromacs via conda (e.g., from bioconda) +RUN conda install -c bioconda gromacs -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/gromacs_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/gromacs_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/gromacs_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/gromacs_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/gromacs_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c8c8ebbe8f1b570281037dcefeb9b6ea0ee8678a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/gromacs_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/gromacs_server.py') +SERVER_NAME = 'biosci_gromacs' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c75b9cbb5170acf7f24af3b2a63598fc518eddce --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-gromacs: + build: . + image: mcp-gromacs:latest + container_name: mcp-gromacs + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=gromacs + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..12eba8048e391284b3123e62844fe8b04ae88e91 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - gromacs + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gromacs/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2391d138703b4aec0a0e34ce68623acd6f398a97 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install gtdbtk via conda (e.g., from bioconda) +RUN conda install -c bioconda gtdbtk -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/gtdbtk_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/gtdbtk_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/gtdbtk_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3a4b3b45d835414fdc0dd7d8fdb3f62f1c2eac39 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_server.py @@ -0,0 +1,628 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Dict, Any + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +def tool(*args, **kwargs): + def decorator(f): + return f + return decorator + +mcp = type("mcp", (), {"tool": tool}) + + +def _get_output_files(out_dir: Path) -> List[str]: + """Helper function to list expected output files from GTDB-Tk.""" + out_dir.mkdir(parents=True, exist_ok=True) + # Key summary files produced by classify_wf + summary_files = [ + "gtdbtk.ar53.summary.tsv", + "gtdbtk.bac120.summary.tsv", + "gtdbtk.ar53.markers_summary.tsv", + "gtdbtk.bac120.markers_summary.tsv", + "gtdbtk.log", + "gtdbtk.warnings.log", + ] + return [str(out_dir / f) for f in summary_files] + + +@mcp.tool() +def classify_wf( + genome_dir: Path, + out_dir: Path, + batchfile: Optional[Path] = None, + extension: str = "fna", + protein_dir: Optional[Path] = None, + gtdbtk_classification_file: Optional[Path] = None, + mash_db: Optional[Path] = None, + skip_gtdb_refs: bool = False, + place_species: bool = False, + ani_file: Optional[Path] = None, + ani_threshold: float = 0.95, + min_af: float = 0.05, + min_perc_aa: float = 10.0, + radius: int = 5, + pplacer_cpus: int = 1, + unaligned_only: bool = False, + keep_intermediates: bool = False, + scratch_dir: Optional[Path] = None, + cpus: int = 1, + min_mem: int = 4, + genes: bool = False, + no_mash: bool = False, + mash_d: int = 10000, + full_tree: bool = False, + force: bool = False, + write_single_copy_genes: bool = False, + write_raw_log: bool = False, + write_bins: bool = False, + attach_metadata: bool = False, + custom_taxonomy_file: Optional[Path] = None, + skip_ani_cache: bool = False, + tmpdir: Optional[Path] = None, + debug: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Run the GTDB-Tk classify workflow to assign taxonomic classifications to genomes. + + This is the primary workflow for classifying bacterial and archaeal genomes. + It identifies marker genes, aligns them, and places them in the GTDB reference tree. + """ + # --- Input Validation --- + if not genome_dir.is_dir(): + raise ValueError(f"Input genome directory not found: {genome_dir}") + if batchfile and not batchfile.is_file(): + raise ValueError(f"Batch file not found: {batchfile}") + if protein_dir and not protein_dir.is_dir(): + raise ValueError(f"Protein directory not found: {protein_dir}") + if gtdbtk_classification_file and not gtdbtk_classification_file.is_file(): + raise ValueError(f"GTDB-Tk classification file not found: {gtdbtk_classification_file}") + if mash_db and not mash_db.is_file(): + raise ValueError(f"Custom Mash sketch file not found: {mash_db}") + if ani_file and not ani_file.is_file(): + raise ValueError(f"Pre-computed ANI report not found: {ani_file}") + if custom_taxonomy_file and not custom_taxonomy_file.is_file(): + raise ValueError(f"Custom taxonomy file not found: {custom_taxonomy_file}") + + if not 0.0 <= ani_threshold <= 1.0: + raise ValueError("ani_threshold must be between 0.0 and 1.0") + if not 0.0 <= min_af <= 1.0: + raise ValueError("min_af must be between 0.0 and 1.0") + if not min_perc_aa >= 0: + raise ValueError("min_perc_aa must be non-negative") + if not cpus > 0: + raise ValueError("cpus must be a positive integer") + if not pplacer_cpus > 0: + raise ValueError("pplacer_cpus must be a positive integer") + if not min_mem > 0: + raise ValueError("min_mem must be a positive integer") + if not mash_d > 0: + raise ValueError("mash_d must be a positive integer") + + # --- Command Construction --- + cmd = [ + "gtdbtk", "classify_wf", + "--genome_dir", str(genome_dir), + "--out_dir", str(out_dir), + "--extension", extension, + "--ani_threshold", str(ani_threshold), + "--min_af", str(min_af), + "--min_perc_aa", str(min_perc_aa), + "--radius", str(radius), + "--pplacer_cpus", str(pplacer_cpus), + "--cpus", str(cpus), + "--min_mem", str(min_mem), + "--mash_d", str(mash_d), + ] + + if batchfile: + cmd.extend(["--batchfile", str(batchfile)]) + if protein_dir: + cmd.extend(["--protein_dir", str(protein_dir)]) + if gtdbtk_classification_file: + cmd.extend(["--gtdbtk_classification_file", str(gtdbtk_classification_file)]) + if mash_db: + cmd.extend(["--mash_db", str(mash_db)]) + if skip_gtdb_refs: + cmd.append("--skip_gtdb_refs") + if place_species: + cmd.append("--place_species") + if ani_file: + cmd.extend(["--ani_file", str(ani_file)]) + if unaligned_only: + cmd.append("--unaligned_only") + if keep_intermediates: + cmd.append("--keep_intermediates") + if scratch_dir: + cmd.extend(["--scratch_dir", str(scratch_dir)]) + if genes: + cmd.append("--genes") + if no_mash: + cmd.append("--no_mash") + if full_tree: + cmd.append("--full_tree") + if force: + cmd.append("--force") + if write_single_copy_genes: + cmd.append("--write_single_copy_genes") + if write_raw_log: + cmd.append("--write_raw_log") + if write_bins: + cmd.append("--write_bins") + if attach_metadata: + cmd.append("--attach_metadata") + if custom_taxonomy_file: + cmd.extend(["--custom_taxonomy_file", str(custom_taxonomy_file)]) + if skip_ani_cache: + cmd.append("--skip_ani_cache") + if tmpdir: + cmd.extend(["--tmpdir", str(tmpdir)]) + if debug: + cmd.append("--debug") + if verbose: + cmd.append("-v") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = _get_output_files(out_dir) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk classify_wf failed with exit code {e.returncode}", + "output_files": [], + } + + +@mcp.tool() +def de_novo_wf( + genome_dir: Path, + outgroup_taxa: str, + out_dir: Path, + batchfile: Optional[Path] = None, + extension: str = "fna", + protein_dir: Optional[Path] = None, + msa_file: Optional[Path] = None, + skip_gtdb_refs: bool = False, + cpus: int = 1, + min_perc_aa: float = 10.0, + prot_model: str = "WAG", + keep_intermediates: bool = False, + scratch_dir: Optional[Path] = None, + force: bool = False, + tmpdir: Optional[Path] = None, + debug: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Run the GTDB-Tk de novo workflow to create a custom reference tree. + + This workflow is for creating a de novo tree from a set of user-provided genomes + and an outgroup, which can be used for subsequent classification runs. + """ + # --- Input Validation --- + if not genome_dir.is_dir(): + raise ValueError(f"Input genome directory not found: {genome_dir}") + if not outgroup_taxa: + raise ValueError("outgroup_taxa must be specified.") + if batchfile and not batchfile.is_file(): + raise ValueError(f"Batch file not found: {batchfile}") + if protein_dir and not protein_dir.is_dir(): + raise ValueError(f"Protein directory not found: {protein_dir}") + if msa_file and not msa_file.is_file(): + raise ValueError(f"MSA file not found: {msa_file}") + + if not cpus > 0: + raise ValueError("cpus must be a positive integer") + if not min_perc_aa >= 0: + raise ValueError("min_perc_aa must be non-negative") + + valid_prot_models = ["LG", "WAG", "JTT", "DAYHOFF"] + if prot_model not in valid_prot_models: + raise ValueError(f"prot_model must be one of {valid_prot_models}") + + # --- Command Construction --- + cmd = [ + "gtdbtk", "de_novo_wf", + "--genome_dir", str(genome_dir), + "--outgroup_taxa", outgroup_taxa, + "--out_dir", str(out_dir), + "--extension", extension, + "--cpus", str(cpus), + "--min_perc_aa", str(min_perc_aa), + "--prot_model", prot_model, + ] + + if batchfile: + cmd.extend(["--batchfile", str(batchfile)]) + if protein_dir: + cmd.extend(["--protein_dir", str(protein_dir)]) + if msa_file: + cmd.extend(["--msa_file", str(msa_file)]) + if skip_gtdb_refs: + cmd.append("--skip_gtdb_refs") + if keep_intermediates: + cmd.append("--keep_intermediates") + if scratch_dir: + cmd.extend(["--scratch_dir", str(scratch_dir)]) + if force: + cmd.append("--force") + if tmpdir: + cmd.extend(["--tmpdir", str(tmpdir)]) + if debug: + cmd.append("--debug") + if verbose: + cmd.append("-v") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + # De novo workflow produces different outputs, primarily a tree file + out_dir.mkdir(parents=True, exist_ok=True) + output_files = [str(out_dir / "gtdbtk.denovo.tree.newick")] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk de_novo_wf failed with exit code {e.returncode}", + "output_files": [], + } + + +@mcp.tool() +def infer( + msa_file: Path, + out_dir: Path, + gtdbtk_classification_file: Optional[Path] = None, + reference_tree: Optional[Path] = None, + classification_file: Optional[Path] = None, + min_perc_aa: float = 10.0, + radius: int = 5, + pplacer_cpus: int = 1, + unaligned_only: bool = False, + keep_intermediates: bool = False, + scratch_dir: Optional[Path] = None, + cpus: int = 1, + min_mem: int = 4, + full_tree: bool = False, + force: bool = False, + tmpdir: Optional[Path] = None, + debug: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Infer taxonomic classification of genomes using a multiple sequence alignment. + + This is a lower-level command, typically part of the classify_wf, that performs + the phylogenetic placement and taxonomic inference steps. + """ + # --- Input Validation --- + if not msa_file.is_file(): + raise ValueError(f"MSA file not found: {msa_file}") + if gtdbtk_classification_file and not gtdbtk_classification_file.is_file(): + raise ValueError(f"GTDB-Tk classification file not found: {gtdbtk_classification_file}") + if reference_tree and not reference_tree.is_file(): + raise ValueError(f"Reference tree file not found: {reference_tree}") + if classification_file and not classification_file.is_file(): + raise ValueError(f"Classification file not found: {classification_file}") + + if not min_perc_aa >= 0: + raise ValueError("min_perc_aa must be non-negative") + if not cpus > 0: + raise ValueError("cpus must be a positive integer") + if not pplacer_cpus > 0: + raise ValueError("pplacer_cpus must be a positive integer") + if not min_mem > 0: + raise ValueError("min_mem must be a positive integer") + + # --- Command Construction --- + cmd = [ + "gtdbtk", "infer", + "--msa_file", str(msa_file), + "--out_dir", str(out_dir), + "--min_perc_aa", str(min_perc_aa), + "--radius", str(radius), + "--pplacer_cpus", str(pplacer_cpus), + "--cpus", str(cpus), + "--min_mem", str(min_mem), + ] + + if gtdbtk_classification_file: + cmd.extend(["--gtdbtk_classification_file", str(gtdbtk_classification_file)]) + if reference_tree: + cmd.extend(["--reference_tree", str(reference_tree)]) + if classification_file: + cmd.extend(["--classification_file", str(classification_file)]) + if unaligned_only: + cmd.append("--unaligned_only") + if keep_intermediates: + cmd.append("--keep_intermediates") + if scratch_dir: + cmd.extend(["--scratch_dir", str(scratch_dir)]) + if full_tree: + cmd.append("--full_tree") + if force: + cmd.append("--force") + if tmpdir: + cmd.extend(["--tmpdir", str(tmpdir)]) + if debug: + cmd.append("--debug") + if verbose: + cmd.append("-v") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = _get_output_files(out_dir) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk infer failed with exit code {e.returncode}", + "output_files": [], + } + + +@mcp.tool() +def align( + genome_dir: Path, + out_dir: Path, + batchfile: Optional[Path] = None, + extension: str = "fna", + protein_dir: Optional[Path] = None, + mash_db: Optional[Path] = None, + skip_gtdb_refs: bool = False, + cpus: int = 1, + genes: bool = False, + no_mash: bool = False, + mash_d: int = 10000, + force: bool = False, + keep_intermediates: bool = False, + scratch_dir: Optional[Path] = None, + tmpdir: Optional[Path] = None, + debug: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Identify and align marker genes from a set of genomes. + + This is a lower-level command, typically part of the classify_wf, that performs + gene calling, marker gene identification, and alignment. + """ + # --- Input Validation --- + if not genome_dir.is_dir(): + raise ValueError(f"Input genome directory not found: {genome_dir}") + if batchfile and not batchfile.is_file(): + raise ValueError(f"Batch file not found: {batchfile}") + if protein_dir and not protein_dir.is_dir(): + raise ValueError(f"Protein directory not found: {protein_dir}") + if mash_db and not mash_db.is_file(): + raise ValueError(f"Custom Mash sketch file not found: {mash_db}") + + if not cpus > 0: + raise ValueError("cpus must be a positive integer") + if not mash_d > 0: + raise ValueError("mash_d must be a positive integer") + + # --- Command Construction --- + cmd = [ + "gtdbtk", "align", + "--genome_dir", str(genome_dir), + "--out_dir", str(out_dir), + "--extension", extension, + "--cpus", str(cpus), + "--mash_d", str(mash_d), + ] + + if batchfile: + cmd.extend(["--batchfile", str(batchfile)]) + if protein_dir: + cmd.extend(["--protein_dir", str(protein_dir)]) + if mash_db: + cmd.extend(["--mash_db", str(mash_db)]) + if skip_gtdb_refs: + cmd.append("--skip_gtdb_refs") + if genes: + cmd.append("--genes") + if no_mash: + cmd.append("--no_mash") + if force: + cmd.append("--force") + if keep_intermediates: + cmd.append("--keep_intermediates") + if scratch_dir: + cmd.extend(["--scratch_dir", str(scratch_dir)]) + if tmpdir: + cmd.extend(["--tmpdir", str(tmpdir)]) + if debug: + cmd.append("--debug") + if verbose: + cmd.append("-v") + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + # Align produces MSA files + out_dir.mkdir(parents=True, exist_ok=True) + output_files = [ + str(out_dir / "gtdbtk.bac120.user_msa.fasta"), + str(out_dir / "gtdbtk.ar53.user_msa.fasta"), + ] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk align failed with exit code {e.returncode}", + "output_files": [], + } + + +@mcp.tool() +def check_install( + full_check: bool = False, + tmpdir: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Check the GTDB-Tk installation and its dependencies. + """ + # --- Command Construction --- + cmd = ["gtdbtk", "check_install"] + if full_check: + cmd.append("--full_check") + if tmpdir: + cmd.extend(["--tmpdir", str(tmpdir)]) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk check_install failed with exit code {e.returncode}", + "output_files": [], + } + + +@mcp.tool() +def download_data( + data_path: Optional[Path] = None, + symlink: bool = False, + wget: bool = False, + force: bool = False, +) -> Dict[str, Any]: + """ + Download the GTDB-Tk reference data. + """ + # --- Command Construction --- + cmd = ["gtdbtk", "download_data"] + if data_path: + cmd.extend(["--data_path", str(data_path)]) + if symlink: + cmd.append("--symlink") + if wget: + cmd.append("--wget") + if force: + cmd.append("--force") + + # --- Subprocess Execution --- + try: + # Note: This can be a very long-running process. + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk download_data failed with exit code {e.returncode}", + "output_files": [], + } + + +@mcp.tool() +def update_data() -> Dict[str, Any]: + """ + Update the GTDB-Tk reference data to the latest version. + This command assumes the GTDBTK_DATA_PATH environment variable is set. + """ + # --- Command Construction --- + cmd = ["gtdbtk", "update_data"] + + # --- Subprocess Execution --- + try: + # Note: This can be a very long-running process. + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"GTDB-Tk update_data failed with exit code {e.returncode}", + "output_files": [], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..675cf5291046f333cd6c7c9106876e84acc1c828 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/gtdbtk_server.py') +SERVER_NAME = 'biosci_gtdbtk' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5360c0d4a5ede6951c59aaae292317ce8ac22aca --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-gtdbtk: + build: . + image: mcp-gtdbtk:latest + container_name: mcp-gtdbtk + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=gtdbtk + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c80f31ac047e22ad4444aeb1b08feab6697e135d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - gtdbtk + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_gtdbtk/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2edda10ca7d458317d95614e371bbcc8d4c139b1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install harpy via conda (e.g., from bioconda) +RUN conda install -c bioconda harpy -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/harpy_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/harpy_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/harpy_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_server.py new file mode 100644 index 0000000000000000000000000000000000000000..29806255c5aaafa8860a735cb028d7b9c5beb80b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_server.py @@ -0,0 +1,853 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, List + +# MCP-compliant tool definitions for harpy + +# --- Data Processing Subcommands --- + +@mcp.tool() +def align( + reads_r1: Path, + reads_r2: Path, + reference: Path, + sample: str, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Aligns sample sequences to a reference genome assembly using Harpy. + + This function wraps the 'harpy align' command. It takes paired-end reads, + a reference genome, and a sample name to produce alignment files. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not reads_r1.is_file(): + raise FileNotFoundError(f"Input read file R1 not found: {reads_r1}") + if not reads_r2.is_file(): + raise FileNotFoundError(f"Input read file R2 not found: {reads_r2}") + if not reference.is_file(): + raise FileNotFoundError(f"Reference genome file not found: {reference}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "align", + "--reads1", str(reads_r1), + "--reads2", str(reads_r2), + "--reference", str(reference), + "--sample", sample, + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + # Assuming the primary output is a BAM file named after the sample + output_bam = output_dir / f"{sample}.bam" + output_files = [str(output_bam)] if output_bam.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy align command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def assemble( + reads_r1: Path, + reads_r2: Path, + sample: str, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Creates a genome assembly from linked-reads using Harpy. + + This function wraps the 'harpy assemble' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not reads_r1.is_file(): + raise FileNotFoundError(f"Input read file R1 not found: {reads_r1}") + if not reads_r2.is_file(): + raise FileNotFoundError(f"Input read file R2 not found: {reads_r2}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "assemble", + "--reads1", str(reads_r1), + "--reads2", str(reads_r2), + "--sample", sample, + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + # Assuming the primary output is a FASTA file + output_fasta = output_dir / f"{sample}_assembly.fasta" + output_files = [str(output_fasta)] if output_fasta.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy assemble command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def deconvolve( + bam: Path, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Resolves barcode sharing in unrelated molecules from a BAM file. + + This function wraps the 'harpy deconvolve' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {bam}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "deconvolve", + "--bam", str(bam), + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + # Assuming output is a new BAM file + output_bam = output_dir / f"{bam.stem}.deconvolved.bam" + output_files = [str(output_bam)] if output_bam.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy deconvolve command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def demultiplex( + reads_r1: Path, + reads_r2: Path, + barcodes: Path, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Demultiplexes haplotagged FASTQ files using Harpy. + + This function wraps the 'harpy demultiplex' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not reads_r1.is_file(): + raise FileNotFoundError(f"Input read file R1 not found: {reads_r1}") + if not reads_r2.is_file(): + raise FileNotFoundError(f"Input read file R2 not found: {reads_r2}") + if not barcodes.is_file(): + raise FileNotFoundError(f"Barcodes file not found: {barcodes}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "demultiplex", + "--reads1", str(reads_r1), + "--reads2", str(reads_r2), + "--barcodes", str(barcodes), + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + # Output is likely a set of demultiplexed FASTQ files + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(p) for p in output_dir.glob("*.fastq.gz")], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy demultiplex command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def impute( + vcf: Path, + bam: Path, + reference: Path, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Imputes variant genotypes from alignments using Harpy. + + This function wraps the 'harpy impute' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not vcf.is_file(): + raise FileNotFoundError(f"Input VCF file not found: {vcf}") + if not bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {bam}") + if not reference.is_file(): + raise FileNotFoundError(f"Reference genome file not found: {reference}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "impute", + "--vcf", str(vcf), + "--bam", str(bam), + "--reference", str(reference), + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + output_vcf = output_dir / f"{vcf.stem}.imputed.vcf.gz" + output_files = [str(output_vcf)] if output_vcf.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy impute command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def metassembly( + reads_r1: Path, + reads_r2: Path, + sample: str, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Creates a metagenome assembly from linked-reads using Harpy. + + This function wraps the 'harpy metassembly' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not reads_r1.is_file(): + raise FileNotFoundError(f"Input read file R1 not found: {reads_r1}") + if not reads_r2.is_file(): + raise FileNotFoundError(f"Input read file R2 not found: {reads_r2}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "metassembly", + "--reads1", str(reads_r1), + "--reads2", str(reads_r2), + "--sample", sample, + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + output_fasta = output_dir / f"{sample}_metassembly.fasta" + output_files = [str(output_fasta)] if output_fasta.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy metassembly command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def phase( + vcf: Path, + bam: Path, + reference: Path, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Phases SNPs into haplotypes using Harpy. + + This function wraps the 'harpy phase' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not vcf.is_file(): + raise FileNotFoundError(f"Input VCF file not found: {vcf}") + if not bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {bam}") + if not reference.is_file(): + raise FileNotFoundError(f"Reference genome file not found: {reference}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "phase", + "--vcf", str(vcf), + "--bam", str(bam), + "--reference", str(reference), + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + output_vcf = output_dir / f"{vcf.stem}.phased.vcf.gz" + output_files = [str(output_vcf)] if output_vcf.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy phase command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def qc( + reads_r1: Path, + reads_r2: Path, + sample: str, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Performs adapter removal, quality filtering, etc., on FASTQ files. + + This function wraps the 'harpy qc' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not reads_r1.is_file(): + raise FileNotFoundError(f"Input read file R1 not found: {reads_r1}") + if not reads_r2.is_file(): + raise FileNotFoundError(f"Input read file R2 not found: {reads_r2}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "qc", + "--reads1", str(reads_r1), + "--reads2", str(reads_r2), + "--sample", sample, + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + # Assuming output is a pair of trimmed FASTQ files + out_r1 = output_dir / f"{sample}_R1.trimmed.fastq.gz" + out_r2 = output_dir / f"{sample}_R2.trimmed.fastq.gz" + output_files = [] + if out_r1.exists(): + output_files.append(str(out_r1)) + if out_r2.exists(): + output_files.append(str(out_r2)) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy qc command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def simulate( + reference: Path, + output_dir: Path, + seed: Optional[int] = None, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Simulates genomic variants or linked reads using Harpy. + + This function wraps the 'harpy simulate' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not reference.is_file(): + raise FileNotFoundError(f"Reference genome file not found: {reference}") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "simulate", + "--reference", str(reference), + "--output", str(output_dir), + ] + if seed is not None: + cmd.extend(["--seed", str(seed)]) + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(p) for p in output_dir.iterdir()], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy simulate command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def snp( + bam: Path, + reference: Path, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Calls SNPs and small indels from alignments using Harpy. + + This function wraps the 'harpy snp' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {bam}") + if not reference.is_file(): + raise FileNotFoundError(f"Reference genome file not found: {reference}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "snp", + "--bam", str(bam), + "--reference", str(reference), + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + output_vcf = output_dir / f"{bam.stem}.vcf.gz" + output_files = [str(output_vcf)] if output_vcf.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy snp command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def sv( + bam: Path, + reference: Path, + output_dir: Path, + threads: int = 8, + dry_run: bool = False, + setup: bool = False, +) -> dict: + """ + Calls large structural variants (inversions, deletions, duplications). + + This function wraps the 'harpy sv' command. + Note: Parameters are inferred from the tool's high-level documentation. + """ + if not bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {bam}") + if not reference.is_file(): + raise FileNotFoundError(f"Reference genome file not found: {reference}") + if threads <= 0: + raise ValueError("Threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "harpy", "sv", + "--bam", str(bam), + "--reference", str(reference), + "--output", str(output_dir), + "--threads", str(threads), + ] + if dry_run: + cmd.append("--dry-run") + if setup: + cmd.append("--setup") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + output_vcf = output_dir / f"{bam.stem}.sv.vcf.gz" + output_files = [str(output_vcf)] if output_vcf.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy sv command failed", + "return_code": e.returncode, + } + +# --- Other and Troubleshooting Subcommands --- + +@mcp.tool() +def template( + workflow: str, + output_dir: Path, + hpc_profile: Optional[str] = None, +) -> dict: + """ + Creates template files and HPC configs for Harpy workflows. + + This function wraps the 'harpy template' command. + """ + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = ["harpy", "template", workflow, "--output", str(output_dir)] + if hpc_profile: + cmd.extend(["--hpc-profile", hpc_profile]) + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(p) for p in output_dir.iterdir()], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy template command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def deps(force: bool = False) -> dict: + """ + Locally installs workflow dependencies for Harpy. + + This function wraps the 'harpy deps' command. + """ + cmd = ["harpy", "deps"] + if force: + cmd.append("--force") + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy deps command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def diagnose(workflow_dir: Path) -> dict: + """ + Attempts to resolve errors in a failed Harpy workflow. + + This function wraps the 'harpy diagnose' command. + """ + if not workflow_dir.is_dir(): + raise NotADirectoryError(f"Workflow directory not found: {workflow_dir}") + + cmd = ["harpy", "diagnose", str(workflow_dir)] + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy diagnose command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def resume(workflow_dir: Path) -> dict: + """ + Continues an incomplete Harpy workflow. + + This function wraps the 'harpy resume' command. + """ + if not workflow_dir.is_dir(): + raise NotADirectoryError(f"Workflow directory not found: {workflow_dir}") + + cmd = ["harpy", "resume", str(workflow_dir)] + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy resume command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def validate(input_file: Path, file_type: str) -> dict: + """ + Runs various format checks for FASTQ, BAM, and other files. + + This function wraps the 'harpy validate' command. + """ + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + valid_types = ["fastq", "bam", "vcf"] + if file_type.lower() not in valid_types: + raise ValueError(f"file_type must be one of {valid_types}") + + cmd = ["harpy", "validate", file_type, str(input_file)] + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy validate command failed", + "return_code": e.returncode, + } + +@mcp.tool() +def view(workflow: str, output_file: Optional[Path] = None) -> dict: + """ + Views a workflow's components, such as its DAG. + + This function wraps the 'harpy view' command. + """ + cmd = ["harpy", "view", workflow] + if output_file: + cmd.extend(["--output", str(output_file)]) + + try: + result = subprocess.run( + cmd, capture_output=True, text=True, check=True, + ) + output_files = [str(output_file)] if output_file and output_file.exists() else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Harpy view command failed", + "return_code": e.returncode, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..196bdd7c1175745bb1cb4b26db4a3d3373cbc18e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/harpy_server.py') +SERVER_NAME = 'biosci_harpy' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ffd8498021f6e49151afb302a037f6f8aa7de3e7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-harpy: + build: . + image: mcp-harpy:latest + container_name: mcp-harpy + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=harpy + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..297e3c0ea533df263cfa11e50be4ef5ab3382e80 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - harpy + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_harpy/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f514064f1919cc8cf7fc25cfa511c670c740a946 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install hhsuite via conda (e.g., from bioconda) +RUN conda install -c bioconda hhsuite -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/hhsuite_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/hhsuite_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/hhsuite_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f45508a2a69b596f80f7cf35da121fa5b84c5e27 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_server.py @@ -0,0 +1,449 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# @mcp.tool() - This decorator is commented out as per the instructions. +def hhblits( + input_file: Path, + database: Path, + output_file: Optional[Path] = None, + output_a3m: Optional[Path] = None, + output_hhm: Optional[Path] = None, + output_psi: Optional[Path] = None, + n_iterations: int = 2, + e_value_inclusion: float = 0.001, + e_value_report: float = 1.0, + min_query_coverage: int = 20, + min_seq_id_msa: int = 0, + max_seq_id_msa: int = 90, + min_coverage_msa: int = 0, + min_query_id_msa: int = 0, + min_score_per_col: float = -20.0, + neff: Optional[float] = None, + neff_max: float = 20.0, + max_filter: int = 20000, + diff: int = 1, + realign_max: int = 500, + mact: float = 0.35, + max_input_sequences: int = 1000001, + show_all_sequences: bool = False, + show_alt_alignments: int = 1, + show_all_hits: bool = False, + alignment_width: int = 80, + db_load_mode: int = 0, + db_presort_mode: int = 0, + input_format: Optional[str] = None, + tags: bool = False, + uppercase: bool = False, + local_alignment_file: Optional[Path] = None, + ss_scoring_mode: int = 2, + subst_matrix_score: int = 1, + avg_subst_score: int = 1, + correlation_score: int = 1, + ss_score_weight: float = 0.11, + subst_matrix_weight: float = 1.0, + avg_subst_weight: float = 0.6, + correlation_weight: float = 0.81, + gapb: float = 1.0, + gapc: float = 1.0, + gapd: float = 1.0, + gape: float = 1.0, + gapf: float = 1.0, + gapi: float = 1.0, + gapj: float = 1.0, + gapt: float = 1.0, + alignment_mode: int = 0, + global_alignment: bool = False, + local_alignment: bool = False, + calibrated_alignment: bool = False, + score_offset: float = 0.0, + exclude_cols: Optional[str] = None, + pca: float = 1.0, + pcb: float = 1.5, + pcf: float = 1.0, + pseudocount_mode: int = 0, + no_realign: bool = False, + context_file: Optional[Path] = None, + cpu: int = 2, + verbose: int = 2, + max_res: int = 10000, +): + """ + Run HHblits for sensitive sequence searching against a sequence database. + + HHblits is a tool for iterative sequence searching that is much faster than + PSI-BLAST but with comparable sensitivity. It represents both query and + database sequences by profile hidden Markov models (HMMs). + """ + # Input validation + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + if local_alignment_file and not local_alignment_file.is_file(): + raise FileNotFoundError(f"Local alignment file not found: {local_alignment_file}") + if context_file and not context_file.is_file(): + raise FileNotFoundError(f"Context file not found: {context_file}") + + if not (0 <= diff <= 3): + raise ValueError("diff must be between 0 and 3.") + if not (0 <= db_load_mode <= 2): + raise ValueError("db_load_mode must be 0, 1, or 2.") + if not (0 <= db_presort_mode <= 2): + raise ValueError("db_presort_mode must be 0, 1, or 2.") + if not (0 <= ss_scoring_mode <= 2): + raise ValueError("ss_scoring_mode must be 0, 1, or 2.") + if not (0 <= alignment_mode <= 3): + raise ValueError("alignment_mode must be between 0 and 3.") + if not (0 <= pseudocount_mode <= 1): + raise ValueError("pseudocount_mode must be 0 or 1.") + if not (0 <= verbose <= 2): + raise ValueError("verbose must be 0, 1, or 2.") + if sum([global_alignment, local_alignment, calibrated_alignment]) > 1: + raise ValueError("Only one of global_alignment, local_alignment, or calibrated_alignment can be set.") + + # Command construction + cmd = ["hhblits", "-i", str(input_file), "-d", str(database)] + + # Handle default output file naming + if output_file is None: + output_file = input_file.with_suffix(".hhr") + cmd.extend(["-o", str(output_file)]) + + output_files = [str(output_file)] + + if output_a3m: + cmd.extend(["-oa3m", str(output_a3m)]) + output_files.append(str(output_a3m)) + if output_hhm: + cmd.extend(["-ohhm", str(output_hhm)]) + output_files.append(str(output_hhm)) + if output_psi: + cmd.extend(["-opsi", str(output_psi)]) + output_files.append(str(output_psi)) + if max_res != 10000: + cmd.extend(["-maxres", str(max_res)]) + if n_iterations != 2: + cmd.extend(["-n", str(n_iterations)]) + if e_value_inclusion != 0.001: + cmd.extend(["-e", str(e_value_inclusion)]) + if e_value_report != 1.0: + cmd.extend(["-E", str(e_value_report)]) + if min_query_coverage != 20: + cmd.extend(["-p", str(min_query_coverage)]) + if min_seq_id_msa != 0: + cmd.extend(["-s", str(min_seq_id_msa)]) + if max_seq_id_msa != 90: + cmd.extend(["-id", str(max_seq_id_msa)]) + if min_coverage_msa != 0: + cmd.extend(["-cov", str(min_coverage_msa)]) + if min_query_id_msa != 0: + cmd.extend(["-qid", str(min_query_id_msa)]) + if min_score_per_col != -20.0: + cmd.extend(["-qsc", str(min_score_per_col)]) + if neff is not None: + cmd.extend(["-neff", str(neff)]) + if neff_max != 20.0: + cmd.extend(["-neffmax", str(neff_max)]) + if max_filter != 20000: + cmd.extend(["-maxfilt", str(max_filter)]) + if diff != 1: + cmd.extend(["-diff", str(diff)]) + if realign_max != 500: + cmd.extend(["-realign_max", str(realign_max)]) + if mact != 0.35: + cmd.extend(["-mact", str(mact)]) + if max_input_sequences != 1000001: + cmd.extend(["-maxseq", str(max_input_sequences)]) + if show_all_sequences: + cmd.append("-all") + if show_alt_alignments != 1: + cmd.extend(["-alt", str(show_alt_alignments)]) + if show_all_hits: + cmd.append("-show_all") + if alignment_width != 80: + cmd.extend(["-aliw", str(alignment_width)]) + if db_load_mode != 0: + cmd.extend(["-db_load_mode", str(db_load_mode)]) + if db_presort_mode != 0: + cmd.extend(["-db_presort_mode", str(db_presort_mode)]) + if input_format: + cmd.extend(["-M", input_format]) + if tags: + cmd.append("-tags") + if uppercase: + cmd.append("-uc") + if local_alignment_file: + cmd.extend(["-g", str(local_alignment_file)]) + if ss_scoring_mode != 2: + cmd.extend(["-ssm", str(ss_scoring_mode)]) + if subst_matrix_score != 1: + cmd.extend(["-sc", str(subst_matrix_score)]) + if avg_subst_score != 1: + cmd.extend(["-sa", str(avg_subst_score)]) + if correlation_score != 1: + cmd.extend(["-corr", str(correlation_score)]) + if ss_score_weight != 0.11: + cmd.extend(["-ssw", str(ss_score_weight)]) + if subst_matrix_weight != 1.0: + cmd.extend(["-scw", str(subst_matrix_weight)]) + if avg_subst_weight != 0.6: + cmd.extend(["-saw", str(avg_subst_weight)]) + if correlation_weight != 0.81: + cmd.extend(["-corrw", str(correlation_weight)]) + if gapb != 1.0: cmd.extend(["-gapb", str(gapb)]) + if gapc != 1.0: cmd.extend(["-gapc", str(gapc)]) + if gapd != 1.0: cmd.extend(["-gapd", str(gapd)]) + if gape != 1.0: cmd.extend(["-gape", str(gape)]) + if gapf != 1.0: cmd.extend(["-gapf", str(gapf)]) + if gapi != 1.0: cmd.extend(["-gapi", str(gapi)]) + if gapj != 1.0: cmd.extend(["-gapj", str(gapj)]) + if gapt != 1.0: cmd.extend(["-gapt", str(gapt)]) + if alignment_mode != 0: + cmd.extend(["-al", str(alignment_mode)]) + if global_alignment: cmd.append("-glob") + if local_alignment: cmd.append("-loc") + if calibrated_alignment: cmd.append("-cal") + if score_offset != 0.0: + cmd.extend(["-shift", str(score_offset)]) + if exclude_cols: + cmd.extend(["-excl", exclude_cols]) + if pca != 1.0: cmd.extend(["-pca", str(pca)]) + if pcb != 1.5: cmd.extend(["-pcb", str(pcb)]) + if pcf != 1.0: cmd.extend(["-pcf", str(pcf)]) + if pseudocount_mode != 0: + cmd.extend(["-pcm", str(pseudocount_mode)]) + if no_realign: + cmd.append("-norealign") + if context_file: + cmd.extend(["-contxt", str(context_file)]) + if cpu != 2: + cmd.extend(["-cpu", str(cpu)]) + if verbose != 2: + cmd.extend(["-v", str(verbose)]) + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "HHblits failed", + "return_code": e.returncode, + } + +# @mcp.tool() - This decorator is commented out as per the instructions. +def hhsearch( + input_file: Path, + database: Path, + output_file: Optional[Path] = None, + output_a3m: Optional[Path] = None, + output_atab: Optional[Path] = None, + e_value_report: float = 1.0, + min_query_coverage: int = 20, + min_coverage: int = 0, + min_query_id: int = 0, + max_filter: int = 1000, + mact: float = 0.35, + max_input_sequences: int = 1000001, + show_all_sequences: bool = False, + show_alt_alignments: int = 1, + show_all_hits: bool = False, + alignment_width: int = 80, + db_load_mode: int = 0, + db_presort_mode: int = 0, + input_format: Optional[str] = None, + tags: bool = False, + uppercase: bool = False, + local_alignment_file: Optional[Path] = None, + ss_scoring_mode: int = 2, + subst_matrix_score: int = 1, + avg_subst_score: int = 1, + correlation_score: int = 1, + ss_score_weight: float = 0.11, + subst_matrix_weight: float = 1.0, + avg_subst_weight: float = 0.6, + correlation_weight: float = 0.81, + gapb: float = 1.0, + gapc: float = 1.0, + gapd: float = 1.0, + gape: float = 1.0, + gapf: float = 1.0, + gapi: float = 1.0, + gapj: float = 1.0, + gapt: float = 1.0, + alignment_mode: int = 0, + global_alignment: bool = False, + local_alignment: bool = False, + calibrated_alignment: bool = False, + score_offset: float = 0.0, + exclude_cols: Optional[str] = None, + pca: float = 1.0, + pcb: float = 1.5, + pcf: float = 1.0, + pseudocount_mode: int = 0, + no_realign: bool = False, + context_file: Optional[Path] = None, + cpu: int = 2, + verbose: int = 2, + max_res: int = 10000, +): + """ + Search a database of HMMs with a query sequence or HMM. + + HHsearch is a sensitive protein homology detection tool based on the + pairwise comparison of profile hidden Markov models (HMMs). + """ + # Input validation + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + if local_alignment_file and not local_alignment_file.is_file(): + raise FileNotFoundError(f"Local alignment file not found: {local_alignment_file}") + if context_file and not context_file.is_file(): + raise FileNotFoundError(f"Context file not found: {context_file}") + + if not (0 <= db_load_mode <= 2): + raise ValueError("db_load_mode must be 0, 1, or 2.") + if not (0 <= db_presort_mode <= 2): + raise ValueError("db_presort_mode must be 0, 1, or 2.") + if not (0 <= ss_scoring_mode <= 2): + raise ValueError("ss_scoring_mode must be 0, 1, or 2.") + if not (0 <= alignment_mode <= 3): + raise ValueError("alignment_mode must be between 0 and 3.") + if not (0 <= pseudocount_mode <= 1): + raise ValueError("pseudocount_mode must be 0 or 1.") + if not (0 <= verbose <= 2): + raise ValueError("verbose must be 0, 1, or 2.") + if sum([global_alignment, local_alignment, calibrated_alignment]) > 1: + raise ValueError("Only one of global_alignment, local_alignment, or calibrated_alignment can be set.") + + # Command construction + cmd = ["hhsearch", "-i", str(input_file), "-d", str(database)] + + if output_file is None: + output_file = input_file.with_suffix(".hhr") + cmd.extend(["-o", str(output_file)]) + + output_files = [str(output_file)] + + if output_a3m: + cmd.extend(["-oa3m", str(output_a3m)]) + output_files.append(str(output_a3m)) + if output_atab: + cmd.extend(["-atab", str(output_atab)]) + output_files.append(str(output_atab)) + if max_res != 10000: + cmd.extend(["-maxres", str(max_res)]) + if e_value_report != 1.0: + cmd.extend(["-e", str(e_value_report)]) + if min_query_coverage != 20: + cmd.extend(["-p", str(min_query_coverage)]) + if min_coverage != 0: + cmd.extend(["-cov", str(min_coverage)]) + if min_query_id != 0: + cmd.extend(["-qid", str(min_query_id)]) + if max_filter != 1000: + cmd.extend(["-maxfilt", str(max_filter)]) + if mact != 0.35: + cmd.extend(["-mact", str(mact)]) + if max_input_sequences != 1000001: + cmd.extend(["-maxseq", str(max_input_sequences)]) + if show_all_sequences: + cmd.append("-all") + if show_alt_alignments != 1: + cmd.extend(["-alt", str(show_alt_alignments)]) + if show_all_hits: + cmd.append("-show_all") + if alignment_width != 80: + cmd.extend(["-aliw", str(alignment_width)]) + if db_load_mode != 0: + cmd.extend(["-db_load_mode", str(db_load_mode)]) + if db_presort_mode != 0: + cmd.extend(["-db_presort_mode", str(db_presort_mode)]) + if input_format: + cmd.extend(["-M", input_format]) + if tags: + cmd.append("-tags") + if uppercase: + cmd.append("-uc") + if local_alignment_file: + cmd.extend(["-g", str(local_alignment_file)]) + if ss_scoring_mode != 2: + cmd.extend(["-ssm", str(ss_scoring_mode)]) + if subst_matrix_score != 1: + cmd.extend(["-sc", str(subst_matrix_score)]) + if avg_subst_score != 1: + cmd.extend(["-sa", str(avg_subst_score)]) + if correlation_score != 1: + cmd.extend(["-corr", str(correlation_score)]) + if ss_score_weight != 0.11: + cmd.extend(["-ssw", str(ss_score_weight)]) + if subst_matrix_weight != 1.0: + cmd.extend(["-scw", str(subst_matrix_weight)]) + if avg_subst_weight != 0.6: + cmd.extend(["-saw", str(avg_subst_weight)]) + if correlation_weight != 0.81: + cmd.extend(["-corrw", str(correlation_weight)]) + if gapb != 1.0: cmd.extend(["-gapb", str(gapb)]) + if gapc != 1.0: cmd.extend(["-gapc", str(gapc)]) + if gapd != 1.0: cmd.extend(["-gapd", str(gapd)]) + if gape != 1.0: cmd.extend(["-gape", str(gape)]) + if gapf != 1.0: cmd.extend(["-gapf", str(gapf)]) + if gapi != 1.0: cmd.extend(["-gapi", str(gapi)]) + if gapj != 1.0: cmd.extend(["-gapj", str(gapj)]) + if gapt != 1.0: cmd.extend(["-gapt", str(gapt)]) + if alignment_mode != 0: + cmd.extend(["-al", str(alignment_mode)]) + if global_alignment: cmd.append("-glob") + if local_alignment: cmd.append("-loc") + if calibrated_alignment: cmd.append("-cal") + if score_offset != 0.0: + cmd.extend(["-shift", str(score_offset)]) + if exclude_cols: + cmd.extend(["-excl", exclude_cols]) + if pca != 1.0: cmd.extend(["-pca", str(pca)]) + if pcb != 1.5: cmd.extend(["-pcb", str(pcb)]) + if pcf != 1.0: cmd.extend(["-pcf", str(pcf)]) + if pseudocount_mode != 0: + cmd.extend(["-pcm", str(pseudocount_mode)]) + if no_realign: + cmd.append("-norealign") + if context_file: + cmd.extend(["-contxt", str(context_file)]) + if cpu != 2: + cmd.extend(["-cpu", str(cpu)]) + if verbose != 2: + cmd.extend(["-v", str(verbose)]) + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "HHsearch failed", + "return_code": e.returncode, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..11ef2bb18e77e4a04635d9148caa4aa12335ff75 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/hhsuite_server.py') +SERVER_NAME = 'biosci_hhsuite' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5dd2b663ebe1ba63c13a3490850a063babd44097 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hhsuite/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-hhsuite: + build: . + image: mcp-hhsuite:latest + container_name: mcp-hhsuite + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=hhsuite + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..83409c9f7a291dca9975cd20229c0bdb2c16adc7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install hicexplorer via conda (e.g., from bioconda) +RUN conda install -c bioconda hicexplorer -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/hicexplorer_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/hicexplorer_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/hicexplorer_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_server.py new file mode 100644 index 0000000000000000000000000000000000000000..acacc6ab22024bf70a727d2b41a8fd1398f2cb7f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_server.py @@ -0,0 +1,683 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# @mcp.tool() - This decorator is commented out as per the instructions. +# In a real MCP environment, it would be uncommented. + +def hic_build_matrix( + sam_files: List[Path], + out_file_name: Path, + bin_size: int = 10000, + threads: int = 4, + restriction_sequence: Optional[str] = None, + restriction_file: Optional[Path] = None, + dangling_ends: Optional[str] = None, + min_mapping_quality: int = 10, + keep_self_circles: bool = False, + keep_self_ligations: bool = False, + keep_duplicates: bool = False, + min_sequence_length: int = 25, + max_sequence_length: int = 0, + min_insert_size: int = 100, + max_insert_size: int = 0, + min_coverage: int = 0, + max_coverage: int = 1000, + stats_file: Optional[Path] = None, + qc_folder: Optional[Path] = None, + chromosome_sizes: Optional[Path] = None, + region: Optional[str] = None, + matrix_format: str = "cool", + tmp_dir: Optional[Path] = None, + enforce_sorted: bool = False, + short_read_names: bool = False, + center_read: bool = False, + quiet: bool = False, +) -> dict: + """ + Builds a Hi-C contact matrix from aligned sequencing reads. + + This tool processes SAM/BAM files from Hi-C experiments to create a binned contact matrix. + It includes steps for filtering reads based on quality, length, and ligation artifacts. + """ + # Input validation + if not all(f.is_file() for f in sam_files): + raise FileNotFoundError("One or more input SAM/BAM files not found.") + if restriction_file and not restriction_file.is_file(): + raise FileNotFoundError(f"Restriction file not found: {restriction_file}") + if chromosome_sizes and not chromosome_sizes.is_file(): + raise FileNotFoundError(f"Chromosome sizes file not found: {chromosome_sizes}") + if bin_size <= 0: + raise ValueError("bin_size must be a positive integer.") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + if matrix_format not in ["cool", "h5"]: + raise ValueError("matrix_format must be either 'cool' or 'h5'.") + + cmd = [ + "hicBuildMatrix", + "--samFiles", *[str(f) for f in sam_files], + "--outFileName", str(out_file_name), + "--binSize", str(bin_size), + "--threads", str(threads), + "--minMappingQuality", str(min_mapping_quality), + "--minSequenceLength", str(min_sequence_length), + "--minInsertSize", str(min_insert_size), + "--minCoverage", str(min_coverage), + "--maxCoverage", str(max_coverage), + ] + + if restriction_sequence: + cmd.extend(["--restrictionSequence", restriction_sequence]) + if restriction_file: + cmd.extend(["--restrictionFile", str(restriction_file)]) + if dangling_ends: + cmd.extend(["--danglingEnds", dangling_ends]) + if keep_self_circles: + cmd.append("--keepSelfCircles") + if keep_self_ligations: + cmd.append("--keepSelfLigations") + if keep_duplicates: + cmd.append("--keepDuplicates") + if max_sequence_length > 0: + cmd.extend(["--maxSequenceLength", str(max_sequence_length)]) + if max_insert_size > 0: + cmd.extend(["--maxInsertSize", str(max_insert_size)]) + if stats_file: + cmd.extend(["--statsFile", str(stats_file)]) + if qc_folder: + cmd.extend(["--qcFolder", str(qc_folder)]) + if chromosome_sizes: + cmd.extend(["--chromosomeSizes", str(chromosome_sizes)]) + if region: + cmd.extend(["--region", region]) + if matrix_format: + cmd.extend(["--matrixFormat", matrix_format]) + if tmp_dir: + cmd.extend(["--tmpDir", str(tmp_dir)]) + if enforce_sorted: + cmd.append("--enforceSorted") + if short_read_names: + cmd.append("--shortReadNames") + if center_read: + cmd.append("--center_read") + if quiet: + cmd.append("--quiet") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(out_file_name)] + if stats_file: + output_files.append(str(stats_file)) + if qc_folder: + # This is a directory, so we might list its contents or just return the path + output_files.append(str(qc_folder)) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicBuildMatrix failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_correct_matrix( + matrix: Path, + out_file_name: Path, + correction_method: str, + filter_threshold: Optional[List[float]] = None, + chromosome: Optional[str] = None, + iterations: Optional[int] = None, + threads: int = 1, + dump_correction_factors: Optional[Path] = None, + load_correction_factors: Optional[Path] = None, + correction_factor_format: str = "hdf5", + version: bool = False, +) -> dict: + """ + Corrects a Hi-C matrix using methods like ICE or KR. + + This tool applies normalization to a raw Hi-C matrix to remove biases, + such as those from restriction enzyme sites, GC content, and mappability. + """ + # Input validation + if not matrix.is_file(): + raise FileNotFoundError(f"Input matrix file not found: {matrix}") + if correction_method not in ["ICE", "KR"]: + raise ValueError("correction_method must be either 'ICE' or 'KR'.") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + if correction_factor_format not in ["hdf5", "tsv"]: + raise ValueError("correction_factor_format must be 'hdf5' or 'tsv'.") + + cmd = [ + "hicCorrectMatrix", + "correct", + "--matrix", str(matrix), + "--correctionMethod", correction_method, + "--outFileName", str(out_file_name), + "--threads", str(threads), + "--correctionFactorFormat", correction_factor_format, + ] + + if filter_threshold: + cmd.extend(["--filterThreshold", *[str(f) for f in filter_threshold]]) + if chromosome: + cmd.extend(["--chromosome", chromosome]) + if iterations is not None: + cmd.extend(["--iterations", str(iterations)]) + if dump_correction_factors: + cmd.extend(["--dumpCorrectionFactors", str(dump_correction_factors)]) + if load_correction_factors: + cmd.extend(["--loadCorrectionFactors", str(load_correction_factors)]) + if version: + cmd.append("--version") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(out_file_name)] + if dump_correction_factors: + output_files.append(str(dump_correction_factors)) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicCorrectMatrix failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_find_tads( + matrix: Path, + out_prefix: str, + correct_for_depth: bool = False, + min_depth: int = 10000, + max_depth: int = 100000, + step: int = 10000, + threshold_comparisons: float = 0.01, + delta: float = 0.01, + correct_for_multiple_testing: Optional[str] = None, + z_score_threshold: float = -2.0, + threads: int = 4, + tad_separation_threshold: float = 0.0, +) -> dict: + """ + Identifies Topologically Associating Domains (TADs) in a Hi-C matrix. + + This tool uses an insulation score-based method to find TAD boundaries and domains. + """ + # Input validation + if not matrix.is_file(): + raise FileNotFoundError(f"Input matrix file not found: {matrix}") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + if correct_for_multiple_testing and correct_for_multiple_testing not in ["fdr", "bonferroni"]: + raise ValueError("correct_for_multiple_testing must be 'fdr' or 'bonferroni'.") + + cmd = [ + "hicFindTADs", + "--matrix", str(matrix), + "--outPrefix", out_prefix, + "--minDepth", str(min_depth), + "--maxDepth", str(max_depth), + "--step", str(step), + "--thresholdComparisons", str(threshold_comparisons), + "--delta", str(delta), + "--zscore_threshold", str(z_score_threshold), + "--threads", str(threads), + "--TAD_separation_threshold", str(tad_separation_threshold), + ] + + if correct_for_depth: + cmd.append("--correctForDepth") + if correct_for_multiple_testing: + cmd.extend(["--correctForMultipleTesting", correct_for_multiple_testing]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # Expected output files based on prefix + output_files = [ + f"{out_prefix}_zscore_matrix.h5", + f"{out_prefix}_score.bm", + f"{out_prefix}_boundaries.bed", + f"{out_prefix}_domains.bed", + f"{out_prefix}_TAD_separation_score.bm", + ] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicFindTADs failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_plot_matrix( + matrix: Path, + out_file_name: Path, + region: Optional[str] = None, + region2: Optional[str] = None, + chromosome: Optional[str] = None, + title: Optional[str] = None, + v_min: Optional[float] = None, + v_max: Optional[float] = None, + color_map: str = "RdYlBu_r", + log1p: bool = False, + clear_masked_bins: bool = False, + show_masked_bins: bool = False, + loops: Optional[Path] = None, + dpi: int = 300, + bigwig: Optional[Path] = None, + bigwig_y_min: Optional[float] = None, + bigwig_y_max: Optional[float] = None, + bigwig_color: str = "black", + per_chromosome: bool = False, + pca: Optional[Path] = None, + tads: Optional[Path] = None, + scale_factor: float = 1.0, +) -> dict: + """ + Plots a Hi-C contact matrix for a specified region. + + This tool generates a heatmap visualization of a Hi-C matrix, with options to overlay + TADs, loops, PCA eigenvectors (A/B compartments), and bigWig tracks. + """ + # Input validation + if not matrix.is_file(): + raise FileNotFoundError(f"Input matrix file not found: {matrix}") + if loops and not loops.is_file(): + raise FileNotFoundError(f"Loops file not found: {loops}") + if bigwig and not bigwig.is_file(): + raise FileNotFoundError(f"Bigwig file not found: {bigwig}") + if pca and not pca.is_file(): + raise FileNotFoundError(f"PCA file not found: {pca}") + if tads and not tads.is_file(): + raise FileNotFoundError(f"TADs file not found: {tads}") + if dpi <= 0: + raise ValueError("DPI must be a positive integer.") + + cmd = [ + "hicPlotMatrix", + "--matrix", str(matrix), + "--outFileName", str(out_file_name), + "--colorMap", color_map, + "--dpi", str(dpi), + "--scaleFactor", str(scale_factor), + ] + + if region: + cmd.extend(["--region", region]) + if region2: + cmd.extend(["--region2", region2]) + if chromosome: + cmd.extend(["--chromosome", chromosome]) + if title: + cmd.extend(["--title", title]) + if v_min is not None: + cmd.extend(["--vMin", str(v_min)]) + if v_max is not None: + cmd.extend(["--vMax", str(v_max)]) + if log1p: + cmd.append("--log1p") + if clear_masked_bins: + cmd.append("--clearMaskedBins") + if show_masked_bins: + cmd.append("--show_masked_bins") + if loops: + cmd.extend(["--loops", str(loops)]) + if bigwig: + cmd.extend(["--bigwig", str(bigwig)]) + if bigwig_y_min is not None: + cmd.extend(["--bigwig_y_min", str(bigwig_y_min)]) + if bigwig_y_max is not None: + cmd.extend(["--bigwig_y_max", str(bigwig_y_max)]) + cmd.extend(["--bigwig_color", bigwig_color]) + if per_chromosome: + cmd.append("--perChromosome") + if pca: + cmd.extend(["--pca", str(pca)]) + if tads: + cmd.extend(["--TADs", str(tads)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(out_file_name)], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicPlotMatrix failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_pca( + matrix: Path, + out_file_name_bigwig: Path, + out_file_name_bedgraph: Path, + format: str = "bigwig", + chromosomes: Optional[List[str]] = None, + number_of_eigenvectors: int = 1, + threads: int = 4, +) -> dict: + """ + Computes A/B compartments using Principal Component Analysis (PCA). + + This tool calculates the first few eigenvectors of the observed/expected-transformed + and Pearson-correlation-transformed Hi-C matrix to identify genomic compartments. + """ + # Input validation + if not matrix.is_file(): + raise FileNotFoundError(f"Input matrix file not found: {matrix}") + if format not in ["bigwig", "bedgraph"]: + raise ValueError("Format must be 'bigwig' or 'bedgraph'.") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + if number_of_eigenvectors <= 0: + raise ValueError("number_of_eigenvectors must be a positive integer.") + + cmd = [ + "hicPCA", + "--matrix", str(matrix), + "--format", format, + "--numberOfEigenvectors", str(number_of_eigenvectors), + "--threads", str(threads), + ] + + if format == "bigwig": + cmd.extend(["--outputFileName", str(out_file_name_bigwig)]) + else: # bedgraph + cmd.extend(["--outputFileName", str(out_file_name_bedgraph)]) + + if chromosomes: + cmd.extend(["--chromosomes", *chromosomes]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [] + if format == "bigwig": + output_files.append(str(out_file_name_bigwig)) + else: + output_files.append(str(out_file_name_bedgraph)) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicPCA failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_compare_matrices( + matrices: List[Path], + out_file_name: Path, + operation: str, + region: Optional[str] = None, + chromosome: Optional[str] = None, + v_min: Optional[float] = None, + v_max: Optional[float] = None, + color_map: str = "jet", + log1p: bool = False, + plot_title: Optional[str] = None, + dpi: int = 300, +) -> dict: + """ + Compares two or more Hi-C matrices using various operations. + + This tool can compute the difference, ratio, or log2ratio between two matrices, + or find the mean of multiple matrices. The result is saved as a new matrix and a plot. + """ + # Input validation + if len(matrices) < 2: + raise ValueError("At least two matrices are required for comparison.") + if not all(f.is_file() for f in matrices): + raise FileNotFoundError("One or more input matrix files not found.") + if operation not in ["difference", "ratio", "log2ratio", "mean"]: + raise ValueError("Operation must be one of 'difference', 'ratio', 'log2ratio', 'mean'.") + if dpi <= 0: + raise ValueError("DPI must be a positive integer.") + + cmd = [ + "hicCompareMatrices", + "--matrices", *[str(m) for m in matrices], + "--outFileName", str(out_file_name), + "--operation", operation, + "--colorMap", color_map, + "--dpi", str(dpi), + ] + + if region: + cmd.extend(["--region", region]) + if chromosome: + cmd.extend(["--chromosome", chromosome]) + if v_min is not None: + cmd.extend(["--vMin", str(v_min)]) + if v_max is not None: + cmd.extend(["--vMax", str(v_max)]) + if log1p: + cmd.append("--log1p") + if plot_title: + cmd.extend(["--plotTitle", plot_title]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # The tool creates a matrix (.h5 or .cool) and a plot (.png, .pdf, etc.) + # We return the path provided by the user, assuming the extension is correct. + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(out_file_name)], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicCompareMatrices failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_convert_format( + in_file_name: Path, + out_file_name: Path, + in_format: str, + out_format: str, + threads: int = 1, + load_as_cooler: bool = False, + store_as_cooler: bool = False, +) -> dict: + """ + Converts Hi-C matrices between different formats. + + Supported formats include homer, hic-pro, cool, and h5 (HiCExplorer's format). + """ + # Input validation + if not in_file_name.is_file(): + raise FileNotFoundError(f"Input file not found: {in_file_name}") + supported_formats = ["homer", "hicpro", "cool", "h5"] + if in_format not in supported_formats: + raise ValueError(f"Input format '{in_format}' is not supported.") + if out_format not in supported_formats: + raise ValueError(f"Output format '{out_format}' is not supported.") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + + cmd = [ + "hicConvertFormat", + "--inFileName", str(in_file_name), + "--outFileName", str(out_file_name), + "--inputFormat", in_format, + "--outputFormat", out_format, + "--threads", str(threads), + ] + + if load_as_cooler: + cmd.append("--load_as_cooler") + if store_as_cooler: + cmd.append("--store_as_cooler") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(out_file_name)], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicConvertFormat failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_detect_loops( + matrix: Path, + out_file_name: Path, + window_size: int = 10, + peak_width: int = 6, + p_value_threshold: float = 0.01, + threads: int = 4, + chromosomes: Optional[List[str]] = None, +) -> dict: + """ + Detects chromatin loops in a Hi-C matrix using the HiCCUPS algorithm. + """ + # Input validation + if not matrix.is_file(): + raise FileNotFoundError(f"Input matrix file not found: {matrix}") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + if window_size <= 0: + raise ValueError("window_size must be a positive integer.") + if peak_width <= 0: + raise ValueError("peak_width must be a positive integer.") + if not (0 < p_value_threshold <= 1): + raise ValueError("p_value_threshold must be between 0 and 1.") + + cmd = [ + "hicDetectLoops", + "--matrix", str(matrix), + "--outputFile", str(out_file_name), + "--windowSize", str(window_size), + "--peakWidth", str(peak_width), + "--pValue", str(p_value_threshold), + "--threads", str(threads), + ] + + if chromosomes: + cmd.extend(["--chromosomes", *chromosomes]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(out_file_name)], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicDetectLoops failed with exit code {e.returncode}", + "output_files": [], + } + +# @mcp.tool() +def hic_quick_qc( + bam_files: List[Path], + out_prefix: str, + threads: int = 4, + bin_size: int = 500000, + tmp_dir: Optional[Path] = None, + config_file: Optional[Path] = None, +) -> dict: + """ + Generates a comprehensive QC report for one or more Hi-C datasets. + """ + # Input validation + if not all(f.is_file() for f in bam_files): + raise FileNotFoundError("One or more input BAM files not found.") + if threads <= 0: + raise ValueError("threads must be a positive integer.") + if bin_size <= 0: + raise ValueError("bin_size must be a positive integer.") + if config_file and not config_file.is_file(): + raise FileNotFoundError(f"Config file not found: {config_file}") + + cmd = [ + "hicQuickQC", + "--bamfiles", *[str(f) for f in bam_files], + "--outPrefix", out_prefix, + "--threads", str(threads), + "--binSize", str(bin_size), + ] + + if tmp_dir: + cmd.extend(["--tmpdir", str(tmp_dir)]) + if config_file: + cmd.extend(["--configFile", str(config_file)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # The tool creates an HTML report and a folder with data + output_files = [f"{out_prefix}.html", f"{out_prefix}_qc"] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"hicQuickQC failed with exit code {e.returncode}", + "output_files": [], + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5cb26e5acbe9f7f97ab2c65ee7d2394cd771a3cc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/hicexplorer_server.py') +SERVER_NAME = 'biosci_hicexplorer' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..94500985754dd7519d7f0306df52ae97de438691 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-hicexplorer: + build: . + image: mcp-hicexplorer:latest + container_name: mcp-hicexplorer + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=hicexplorer + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..84541a801de77aab09c16dd83dfc8b7cc14dec8d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - hicexplorer + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_hicexplorer/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_igv/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_igv/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..93f2cf9f9f5c536dbc54732b4bdb1dae6af6b8cb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_igv/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-igv: + build: . + image: mcp-igv:latest + container_name: mcp-igv + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=igv + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_igv/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_igv/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_igv/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..00298cf566da4b5de7370c4d0b6149ad2bf032ce --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install involucro via conda (e.g., from bioconda) +RUN conda install -c bioconda involucro -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/involucro_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/involucro_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/involucro_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_server.py new file mode 100644 index 0000000000000000000000000000000000000000..51b21ecf944df1bd4ae9761bb4f5fccb8efc9ed0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_server.py @@ -0,0 +1,154 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + + +@mcp.tool() +def involucro_execute( + control_file: str = "invfile.lua", + eval_script: Optional[str] = None, + docker_host: str = "unix:///var/run/docker.sock", + set_vars: Optional[List[str]] = None, + verbosity: int = 1, + working_dir: str = ".", + wrap_task: Optional[str] = None, + tasks: Optional[List[str]] = None, +) -> Dict[str, Any]: + """ + Execute involucro to run tasks defined in a Lua control file or a direct script. + Involucro is a tool for automating Docker-based workflows. + + Args: + control_file: Set the control file (default "invfile.lua"). + eval_script: Evaluate the given script directly, not evaluating the control file. + docker_host: Set the URL of the Docker instance (default "unix:///var/run/docker.sock"). + set_vars: List of KEY=VALUE pairs to make VAR[KEY] available in the Lua script. + verbosity: Set verbosity: 3 logs everything, 2 shows standard output, 1 is default. + working_dir: Set working directory, base for all operations. + wrap_task: Execute encoded wrap task. + tasks: Specific tasks to execute (positional arguments). + """ + cmd = ["involucro"] + + # Docker Host + cmd.extend(["-H", docker_host]) + + # Verbosity + if verbosity not in [1, 2, 3]: + # Defaulting to 1 if invalid input provided + verbosity = 1 + cmd.extend(["-v", str(verbosity)]) + + # Working Directory + work_path = Path(working_dir) + if not work_path.exists(): + return {"error": f"Working directory '{working_dir}' does not exist."} + cmd.extend(["-w", str(work_path)]) + + # Control File vs Eval Script + if eval_script: + cmd.extend(["-e", eval_script]) + else: + cf_path = Path(control_file) + # Only validate if it's not the default or if user explicitly set it + if control_file != "invfile.lua" or cf_path.exists(): + if not cf_path.exists(): + return {"error": f"Control file '{control_file}' not found."} + cmd.extend(["-f", str(cf_path)]) + + # Set Variables + if set_vars: + for var in set_vars: + if "=" not in var: + return {"error": f"Variable '{var}' must be in KEY=VALUE format."} + cmd.extend(["-set", var]) + + # Wrap Task + if wrap_task: + cmd.extend(["-wrap", wrap_task]) + + # Positional Tasks + if tasks: + cmd.extend(tasks) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + + +@mcp.tool() +def involucro_list_tasks( + control_file: str = "invfile.lua", + working_dir: str = ".", + docker_host: str = "unix:///var/run/docker.sock", +) -> Dict[str, Any]: + """ + Show available tasks defined in the involucro control file and then exit. + + Args: + control_file: Set the control file (default "invfile.lua"). + working_dir: Set working directory. + docker_host: Set the URL of the Docker instance. + """ + cmd = ["involucro", "-tasks"] + + cmd.extend(["-H", docker_host]) + + work_path = Path(working_dir) + if work_path.exists(): + cmd.extend(["-w", str(work_path)]) + + cf_path = Path(control_file) + if cf_path.exists(): + cmd.extend(["-f", str(cf_path)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "available_tasks": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Failed to list tasks. Ensure the control file exists and is valid.", + "status": "failed" + } + + +@mcp.tool() +def involucro_version() -> Dict[str, Any]: + """ + Show the version of involucro and exit. + """ + cmd = ["involucro", "-version"] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "version_info": result.stdout.strip(), + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "status": "failed" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8a08431468d96ce1c60440cd76786f0faab658a4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/involucro_server.py') +SERVER_NAME = 'biosci_involucro' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..908cb469ca0371e077f49f4996b2c55640adc87e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-involucro: + build: . + image: mcp-involucro:latest + container_name: mcp-involucro + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=involucro + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3df240193f1a112c7e50dcab2bff62f2a2c078f4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - involucro + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_involucro/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5236eebe1d864c12b08ae081475cf4ca6463f409 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install ipyrad via conda (e.g., from bioconda) +RUN conda install -c bioconda ipyrad -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/ipyrad_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/ipyrad_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/ipyrad_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8660813ad3a9eabcc975f658fdbfe88fb10e4815 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_server.py @@ -0,0 +1,243 @@ +import subprocess +import logging +from pathlib import Path +from typing import Optional, List + +# Set up logging for better debugging in a server environment +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') + +# MCP decorator is assumed to be provided by the execution environment. +# This is a placeholder for the actual decorator. +class mcp: + @staticmethod + def tool(func): + return func + +@mcp.tool +def ipyrad_new_params( + name: str, + force: bool = False, + output_dir: Optional[Path] = None +) -> dict: + """ + Creates a new ipyrad parameters file (params-.txt). + + This corresponds to the command `ipyrad -n -p new`. + + Args: + name: The project name for the analysis. + force: If True, overwrite an existing params file with the same name (-f). + output_dir: Directory where the params file will be created. Defaults to the current working directory. + + Returns: + A dictionary containing the command executed, stdout, stderr, and the path to the created params file. + """ + # Input validation + if not name or not name.strip(): + raise ValueError("Project name must be a non-empty string.") + + cmd = ["ipyrad", "-n", name, "-p", "new"] + if force: + cmd.append("-f") + + # Determine the working directory for the command + work_dir = output_dir if output_dir else Path.cwd() + if output_dir: + output_dir.mkdir(parents=True, exist_ok=True) + + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed} in {work_dir}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + cwd=work_dir, + ) + + output_file = work_dir / f"params-{name}.txt" + if not output_file.exists(): + raise FileNotFoundError( + f"ipyrad command ran successfully but the expected output file was not found: {output_file}\n" + f"STDOUT: {result.stdout}\nSTDERR: {result.stderr}" + ) + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_file)] + } + + except FileNotFoundError: + err_msg = "Error: 'ipyrad' command not found. Make sure ipyrad is installed and in your system's PATH." + logging.error(err_msg) + return { + "command_executed": command_executed, + "stdout": "", + "stderr": err_msg, + "output_files": [] + } + except subprocess.CalledProcessError as e: + logging.error(f"ipyrad failed with exit code {e.returncode}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool +def ipyrad_run_analysis( + name: str, + params: Path, + steps: str, + cores: int = 1, + threads: int = 1, + force: bool = False, + debug: bool = False, + custom_map: Optional[Path] = None, +) -> dict: + """ + Runs the ipyrad analysis pipeline for one or more steps. + + This corresponds to the command `ipyrad -n -p -s -r ...`. + + Args: + name: The project name for the analysis (must match the name in the params file). + params: Path to the ipyrad parameters file (e.g., 'params-myproject.txt'). + steps: A string of digits representing the steps to run (e.g., '123' or '34567'). + cores: Number of cores to use for parallel jobs (-c). + threads: Number of threads per core for parallel jobs (-t). + force: If True, force overwrite of existing data for the specified steps (-f). + debug: If True, print debug messages to the terminal (-d). + custom_map: Path to a file with ipyrad -n and -p info for many jobs (-m). + + Returns: + A dictionary containing the command executed, stdout, stderr, and the path to the main output directory. + """ + # Input validation + if not name or not name.strip(): + raise ValueError("Project name must be a non-empty string.") + if not params.is_file(): + raise FileNotFoundError(f"Parameters file not found at: {params}") + if not steps or not steps.isdigit() or any(c not in "1234567" for c in steps): + raise ValueError("Steps must be a string containing only digits from 1 to 7 (e.g., '123').") + if cores < 1: + raise ValueError("Number of cores must be a positive integer.") + if threads < 1: + raise ValueError("Number of threads must be a positive integer.") + if custom_map and not custom_map.is_file(): + raise FileNotFoundError(f"Custom map file not found at: {custom_map}") + + cmd = [ + "ipyrad", + "-n", name, + "-p", str(params.resolve()), + "-s", steps, + "-c", str(cores), + "-t", str(threads), + "-r" # The -r flag is essential to execute the run + ] + + if force: + cmd.append("-f") + if debug: + cmd.append("-d") + if custom_map: + cmd.extend(["-m", str(custom_map.resolve())]) + + # ipyrad creates its output directory relative to the current working directory. + # It's best practice to run it from the directory containing the params file. + work_dir = params.parent + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed} in {work_dir}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + cwd=work_dir, + ) + + # The primary output is a directory named after the project + output_directory = work_dir / name + output_files = [str(output_directory)] if output_directory.is_dir() else [] + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + + except FileNotFoundError: + err_msg = "Error: 'ipyrad' command not found. Make sure ipyrad is installed and in your system's PATH." + logging.error(err_msg) + return { + "command_executed": command_executed, + "stdout": "", + "stderr": err_msg, + "output_files": [] + } + except subprocess.CalledProcessError as e: + logging.error(f"ipyrad failed with exit code {e.returncode}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool +def ipyrad_version() -> dict: + """ + Gets the installed version of ipyrad. + + This corresponds to the command `ipyrad -v`. + + Returns: + A dictionary containing the command executed, stdout, stderr, and the parsed version string. + """ + cmd = ["ipyrad", "-v"] + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + # The version is usually the only thing in stdout, e.g., "ipyrad 0.9.87" + version_string = result.stdout.strip().split()[-1] + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "version": version_string + } + except FileNotFoundError: + err_msg = "Error: 'ipyrad' command not found. Make sure ipyrad is installed and in your system's PATH." + logging.error(err_msg) + return { + "command_executed": command_executed, + "stdout": "", + "stderr": err_msg, + "version": None + } + except (subprocess.CalledProcessError, IndexError) as e: + stderr = e.stderr if hasattr(e, 'stderr') else str(e) + stdout = e.stdout if hasattr(e, 'stdout') else "" + logging.error(f"ipyrad -v failed: {stderr}") + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "version": None + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f88d02eeff7526b1bb9c72f5026e0702a4f8dd16 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/ipyrad_server.py') +SERVER_NAME = 'biosci_ipyrad' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..48be8956727034a48aecd5dd60fa915f08cde466 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-ipyrad: + build: . + image: mcp-ipyrad:latest + container_name: mcp-ipyrad + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=ipyrad + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..104c5fae4ae2884880d9269acc6df2dfb115fc74 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - ipyrad + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ipyrad/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7a3826bf0adfcca3c8625066a29f80a16e150c0c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install jbrowse2 via conda (e.g., from bioconda) +RUN conda install -c bioconda jbrowse2 -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/jbrowse2_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/jbrowse2_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/jbrowse2_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9da668771368fb4b802fd6a9fba924a9c2a661ea --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_server.py @@ -0,0 +1,729 @@ +import subprocess +import json +from pathlib import Path +from typing import Optional, List, Dict + +# NOTE: @mcp.tool is a placeholder for the actual decorator. +# The execution environment is expected to provide the 'mcp' object. + +@mcp.tool() +def jbrowse_create( + local_path: Path, + force: bool = False, + tag: str = "latest", +) -> Dict: + """ + Creates a new JBrowse 2 instance. + + Args: + local_path: Path to the directory to create the JBrowse 2 instance in. + force: Overwrite existing files in the destination directory. + tag: The version of JBrowse 2 to install (e.g., '1.0.0', 'latest'). + + Returns: + A dictionary containing the command executed, stdout, stderr, and output directory. + """ + command = ["jbrowse", "create", str(local_path)] + + if force: + command.append("--force") + if tag: + command.extend(["--tag", tag]) + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"jbrowse_instance": str(local_path)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 create failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_add_assembly( + fasta: Path, + assembly_type: str = "indexedFasta", + name: Optional[str] = None, + alias: Optional[List[str]] = None, + fai_location: Optional[Path] = None, + gzi_location: Optional[Path] = None, + two_bit_location: Optional[Path] = None, + chrom_sizes_location: Optional[Path] = None, + ref_name_aliases: Optional[Path] = None, + target: Optional[Path] = None, + skip_check: bool = False, + overwrite: bool = False, + load: str = "inPlace", +) -> Dict: + """ + Adds an assembly to the JBrowse 2 configuration. + + Args: + fasta: Path to the FASTA file for the assembly. + assembly_type: The type of assembly. + name: Name of the assembly. + alias: Alternative names for the assembly. + fai_location: Path to the FASTA index file (.fai). + gzi_location: Path to the bgzip index file (.gzi). + two_bit_location: Path to a 2bit file for the assembly. + chrom_sizes_location: Path to a chrom.sizes file for the assembly. + ref_name_aliases: Path to a file containing reference name aliases. + target: Path to the JBrowse 2 configuration file or directory. + skip_check: Skip checking for the existence of the FASTA file. + overwrite: Overwrite any existing assembly with the same name. + load: Method for loading the assembly data ('copy', 'symlink', 'move', 'inPlace'). + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + if not skip_check and not fasta.is_file(): + raise FileNotFoundError(f"Input FASTA file not found: {fasta}") + + load_choices = ['copy', 'symlink', 'move', 'inPlace'] + if load not in load_choices: + raise ValueError(f"Invalid load option '{load}'. Must be one of {load_choices}") + + assembly_type_choices = ['indexedFasta', 'bgzipFasta', 'twoBit', 'chromSizes', 'custom'] + if assembly_type not in assembly_type_choices: + raise ValueError(f"Invalid assembly_type '{assembly_type}'. Must be one of {assembly_type_choices}") + + command = ["jbrowse", "add-assembly", str(fasta)] + command.extend(["--type", assembly_type]) + command.extend(["--load", load]) + + if name: + command.extend(["--name", name]) + if alias: + command.extend(["--alias", ",".join(alias)]) + if fai_location: + if not fai_location.is_file(): raise FileNotFoundError(f"FASTA index not found: {fai_location}") + command.extend(["--faiLocation", str(fai_location)]) + if gzi_location: + if not gzi_location.is_file(): raise FileNotFoundError(f"GZIP index not found: {gzi_location}") + command.extend(["--gziLocation", str(gzi_location)]) + if two_bit_location: + if not two_bit_location.is_file(): raise FileNotFoundError(f"2bit file not found: {two_bit_location}") + command.extend(["--twoBitLocation", str(two_bit_location)]) + if chrom_sizes_location: + if not chrom_sizes_location.is_file(): raise FileNotFoundError(f"chrom.sizes file not found: {chrom_sizes_location}") + command.extend(["--chromSizesLocation", str(chrom_sizes_location)]) + if ref_name_aliases: + if not ref_name_aliases.is_file(): raise FileNotFoundError(f"Ref name aliases file not found: {ref_name_aliases}") + command.extend(["--refNameAliases", str(ref_name_aliases)]) + if target: + command.extend(["--target", str(target)]) + if skip_check: + command.append("--skipCheck") + if overwrite: + command.append("--overwrite") + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 add-assembly failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_add_track( + track_file: Path, + track_id: Optional[str] = None, + name: Optional[str] = None, + description: Optional[str] = None, + assembly_names: Optional[List[str]] = None, + track_type: Optional[str] = None, + category: Optional[str] = None, + config: Optional[Dict] = None, + target: Optional[Path] = None, + sub_dir: Optional[str] = None, + skip_check: bool = False, + overwrite: bool = False, + load: str = "inPlace", + index_file: Optional[Path] = None, +) -> Dict: + """ + Adds a track to the JBrowse 2 configuration. + + Args: + track_file: Path to the track data file (e.g., BAM, CRAM, VCF, GFF). + track_id: A unique identifier for the track. + name: The name of the track. + description: A description for the track. + assembly_names: Comma-separated list of assembly names to associate with the track. + track_type: The type of track to add. + category: The category for the track. + config: JSON string of configuration options for the track. + target: Path to the JBrowse 2 configuration file or directory. + sub_dir: Subdirectory within the JBrowse 2 data directory to place files. + skip_check: Skip checking for the existence of the track file. + overwrite: Overwrite any existing track with the same ID. + load: Method for loading the track data ('copy', 'symlink', 'move', 'inPlace'). + index_file: Path to an index file for the track data. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + if not skip_check and not track_file.is_file(): + raise FileNotFoundError(f"Input track file not found: {track_file}") + + load_choices = ['copy', 'symlink', 'move', 'inPlace'] + if load not in load_choices: + raise ValueError(f"Invalid load option '{load}'. Must be one of {load_choices}") + + command = ["jbrowse", "add-track", str(track_file)] + command.extend(["--load", load]) + + if track_id: + command.extend(["--trackId", track_id]) + if name: + command.extend(["--name", name]) + if description: + command.extend(["--description", description]) + if assembly_names: + command.extend(["--assemblyNames", ",".join(assembly_names)]) + if track_type: + command.extend(["--type", track_type]) + if category: + command.extend(["--category", category]) + if config: + command.extend(["--config", json.dumps(config)]) + if target: + command.extend(["--target", str(target)]) + if sub_dir: + command.extend(["--subDir", sub_dir]) + if skip_check: + command.append("--skipCheck") + if overwrite: + command.append("--overwrite") + if index_file: + if not index_file.is_file(): raise FileNotFoundError(f"Index file not found: {index_file}") + command.extend(["--indexFile", str(index_file)]) + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 add-track failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_add_connection( + connection_url: str, + connection_id: Optional[str] = None, + connection_type: Optional[str] = None, + assembly_name: Optional[str] = None, + name: Optional[str] = None, + config: Optional[Dict] = None, + target: Optional[Path] = None, + skip_check: bool = False, + overwrite: bool = False, +) -> Dict: + """ + Adds a connection to a remote resource, like a track hub. + + Args: + connection_url: URL of the connection. + connection_id: A unique identifier for the connection. + connection_type: The type of connection (e.g., 'JBrowse1Connection'). + assembly_name: The assembly to associate the connection with. + name: The name of the connection. + config: JSON string of configuration options. + target: Path to the JBrowse 2 configuration file or directory. + skip_check: Skip checking for the existence of the connection. + overwrite: Overwrite any existing connection with the same ID. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + command = ["jbrowse", "add-connection", connection_url] + + if connection_id: + command.extend(["--connectionId", connection_id]) + if connection_type: + command.extend(["--type", connection_type]) + if assembly_name: + command.extend(["--assemblyName", assembly_name]) + if name: + command.extend(["--name", name]) + if config: + command.extend(["--config", json.dumps(config)]) + if target: + command.extend(["--target", str(target)]) + if skip_check: + command.append("--skipCheck") + if overwrite: + command.append("--overwrite") + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 add-connection failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_add_track_json( + track_json: Path, + target: Optional[Path] = None, + update: bool = False, +) -> Dict: + """ + Adds a track configuration directly from a JSON file. + + Args: + track_json: Path to the track JSON file. + target: Path to the JBrowse 2 configuration file or directory. + update: Update an existing track if it has the same trackId. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + if not track_json.is_file(): + raise FileNotFoundError(f"Input JSON file not found: {track_json}") + + command = ["jbrowse", "add-track-json", str(track_json)] + + if target: + command.extend(["--target", str(target)]) + if update: + command.append("--update") + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 add-track-json failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_text_index( + tracks: Optional[List[str]] = None, + assemblies: Optional[List[str]] = None, + individual: bool = False, + attributes: List[str] = ["Name", "ID"], + exclude: Optional[List[str]] = None, + target: Optional[Path] = None, + force: bool = False, + quiet: bool = False, +) -> Dict: + """ + Creates a text index for searching features in JBrowse 2. + + Args: + tracks: A list of track IDs to index. + assemblies: A list of assembly names to index tracks from. + individual: Index tracks individually rather than aggregating. + attributes: A list of feature attributes to index. + exclude: A list of attributes to exclude from indexing. + target: Path to the JBrowse 2 configuration file or directory. + force: Force re-indexing of all tracks. + quiet: Hide the progress bar. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + command = ["jbrowse", "text-index"] + + if tracks: + command.extend(["--tracks", ",".join(tracks)]) + if assemblies: + command.extend(["--assemblies", ",".join(assemblies)]) + if individual: + command.append("--individual") + if attributes: + command.extend(["--attributes", ",".join(attributes)]) + if exclude: + command.extend(["--exclude", ",".join(exclude)]) + if target: + command.extend(["--target", str(target)]) + if force: + command.append("--force") + if quiet: + command.append("--quiet") + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 text-index failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_set_default_session( + session: Optional[Dict] = None, + view: Optional[str] = None, + tracks: Optional[List[str]] = None, + name: str = "Default Session", + target: Optional[Path] = None, +) -> Dict: + """ + Sets the default session for a JBrowse 2 instance. + + Args: + session: A dictionary representing the session to set as default. + view: The view type to set as default (e.g., 'LinearGenomeView'). + tracks: A list of track IDs to open in the default session. + name: The name for the default session. + target: Path to the JBrowse 2 configuration file or directory. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + command = ["jbrowse", "set-default-session"] + command.extend(["--name", name]) + + if session: + command.extend(["--session", json.dumps(session)]) + if view: + command.extend(["--view", view]) + if tracks: + command.extend(["--tracks", ",".join(tracks)]) + if target: + command.extend(["--target", str(target)]) + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 set-default-session failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_upgrade( + local_path: Optional[Path] = None, + tag: str = "latest", + list_versions: bool = False, +) -> Dict: + """ + Upgrades a JBrowse 2 instance to the latest or a specified version. + + Args: + local_path: Path to the JBrowse 2 instance to upgrade. Defaults to current dir. + tag: The version of JBrowse 2 to upgrade to. + list_versions: List available versions of JBrowse 2 instead of upgrading. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + command = ["jbrowse", "upgrade"] + + if local_path: + command.append(str(local_path)) + if tag: + command.extend(["--tag", tag]) + if list_versions: + command.append("--list") + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 upgrade failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_sort_gff( + input_gff: Path, + output_gff: Path, +) -> Dict: + """ + Sorts a GFF3 file. This is a simple wrapper around a gff3sort script. + + Args: + input_gff: The input GFF3 file to sort. + output_gff: The path for the sorted output GFF3 file. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output file path. + """ + if not input_gff.is_file(): + raise FileNotFoundError(f"Input GFF file not found: {input_gff}") + + command = ["jbrowse", "sort-gff", str(input_gff), "--out", str(output_gff)] + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"sorted_gff": str(output_gff)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 sort-gff failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_make_paf( + input_maf: Path, + output_paf: Path, +) -> Dict: + """ + Converts a MAF (Multiple Alignment Format) file to a PAF (Pairwise mApping Format) file. + + Args: + input_maf: The input MAF file. + output_paf: The path for the output PAF file. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output file path. + """ + if not input_maf.is_file(): + raise FileNotFoundError(f"Input MAF file not found: {input_maf}") + + command = ["jbrowse", "make-paf", str(input_maf), "--out", str(output_paf)] + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"output_paf": str(output_paf)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 make-paf failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_admin_server( + port: int = 8999, + body_size_limit: str = "100mb", + root: Optional[Path] = None, +) -> Dict: + """ + Starts a small admin server for JBrowse 2 configuration. + Note: This is a long-running process. Execution may need to be managed (e.g., with a timeout). + + Args: + port: The port to run the server on. + body_size_limit: Maximum body size for requests (e.g., '10mb', '1gb'). + root: Path to the JBrowse 2 installation directory. + + Returns: + A dictionary containing the command executed, stdout, and stderr. + """ + command = ["jbrowse", "admin-server"] + command.extend(["--port", str(port)]) + command.extend(["--body_size_limit", body_size_limit]) + + if root: + if not root.is_dir(): raise NotADirectoryError(f"Root path is not a directory: {root}") + command.extend(["--root", str(root)]) + + try: + # This command starts a server, so it might not exit. + # A timeout might be appropriate in a real-world scenario. + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + timeout=30 # Example timeout + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {} + } + except subprocess.TimeoutExpired as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout.decode() if e.stdout else "", + "stderr": e.stderr.decode() if e.stderr else "", + "error": "JBrowse 2 admin-server started but timed out.", + "output_files": {} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 admin-server failed with exit code {e.returncode}", + "output_files": {} + } + +@mcp.tool() +def jbrowse_set_up( + tag: str = "latest", + force: bool = False, + out_dir: Path = Path("jbrowse"), +) -> Dict: + """ + Downloads and installs the latest JBrowse Web code. + + Args: + tag: The version of JBrowse 2 to install. + force: Overwrite existing files. + out_dir: Path to install JBrowse 2 in. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output directory. + """ + command = ["jbrowse", "set-up"] + command.extend(["--tag", tag]) + command.extend(["--out", str(out_dir)]) + + if force: + command.append("--force") + + try: + process = subprocess.run( + command, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(command), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"jbrowse_web_dir": str(out_dir)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"JBrowse 2 set-up failed with exit code {e.returncode}", + "output_files": {} + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4c2af9bc27476af0d4e18e88381d106c88d0cb0c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/jbrowse2_server.py') +SERVER_NAME = 'biosci_jbrowse2' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..601600b1816ff2d0f15e5faa4188bc9a6d3753be --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-jbrowse2: + build: . + image: mcp-jbrowse2:latest + container_name: mcp-jbrowse2 + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=jbrowse2 + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f0dae3d588d40473568d88c2624f6ee9e0d5b97b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - jbrowse2 + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_jbrowse2/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e78a2d7a1f6cf1e5bbc56c5606c41daa80bbfaf7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install kaiju via conda (e.g., from bioconda) +RUN conda install -c bioconda kaiju -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/kaiju_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/kaiju_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/kaiju_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_server.py new file mode 100644 index 0000000000000000000000000000000000000000..921c8d2b605d8103a878832a18d62a6f9592ef3e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_server.py @@ -0,0 +1,854 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Literal, Union +import os +import tempfile + +# Helper function for running commands +def _run_command(cmd: List[str], cwd: Optional[str] = None) -> dict: + """ + Executes a shell command and returns its stdout, stderr, and exit code. + """ + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + cwd=cwd, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "returncode": e.returncode, + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": f"Error: Command '{cmd[0]}' not found. Please ensure Kaiju and its sub-tools are installed and in your PATH.", + "error": "Command not found", + "returncode": 127, + "output_files": [], + } + +# Helper for path validation +def _validate_input_file(file_path: Path, param_name: str): + if not file_path.exists(): + raise ValueError(f"Input file for '{param_name}' not found: {file_path}") + if not file_path.is_file(): + raise ValueError(f"Input path for '{param_name}' is not a file: {file_path}") + +def _validate_output_file(file_path: Path, param_name: str): + if file_path.exists() and not file_path.is_file(): + raise ValueError(f"Output path for '{param_name}' exists but is not a file: {file_path}") + if not file_path.parent.exists(): + # Attempt to create parent directory if it doesn't exist + try: + file_path.parent.mkdir(parents=True, exist_ok=True) + except OSError as e: + raise ValueError(f"Could not create output directory for '{param_name}': {file_path.parent}. Error: {e}") + if not os.access(file_path.parent, os.W_OK): + raise ValueError(f"Output directory for '{param_name}' is not writable: {file_path.parent}") + +def _validate_directory(dir_path: Path, param_name: str, must_exist: bool = True, must_be_writable: bool = False): + if must_exist and not dir_path.exists(): + raise ValueError(f"Directory for '{param_name}' not found: {dir_path}") + if dir_path.exists() and not dir_path.is_dir(): + raise ValueError(f"Path for '{param_name}' is not a directory: {dir_path}") + if not dir_path.exists(): + try: + dir_path.mkdir(parents=True, exist_ok=True) + except OSError as e: + raise ValueError(f"Could not create directory for '{param_name}': {dir_path}. Error: {e}") + if must_be_writable and not os.access(dir_path, os.W_OK): + raise ValueError(f"Directory for '{param_name}' is not writable: {dir_path}") + + +@mcp.tool() +def kaiju_classify( + nodes_dmp_file: Path, + fmi_file: Path, + input_file: Path, + second_input_file: Optional[Path] = None, + output_file: Optional[Path] = None, + threads: int = 1, + mismatches: int = 3, + e_value: float = 0.01, + min_match_len: int = 11, + min_match_score: int = 65, + run_mode: Literal["greedy", "mem"] = "greedy", + protein_input: bool = False, + enable_seg_filter: bool = True, + verbose_output: bool = False, +) -> dict: + """ + Performs fast and sensitive taxonomic classification of high-throughput sequencing reads. + + Args: + nodes_dmp_file: Path to the NCBI taxonomy nodes.dmp file. + fmi_file: Path to the Kaiju database index (.fmi) file. + input_file: Path to the input FASTQ/FASTA file for single-end reads or first mate of paired-end reads. + second_input_file: Optional path to the second input FASTQ/FASTA file for paired-end reads. + output_file: Optional path to the output file. If not provided, output will be printed to STDOUT. + threads: Number of parallel threads to use. Must be >= 1. + mismatches: Number of allowed mismatches in Greedy mode. Must be >= 0. + e_value: E-value threshold for classification in Greedy mode. Must be > 0. + min_match_len: Minimum required match length in MEM mode. Must be >= 1. + min_match_score: Minimum required match score in Greedy mode. Must be >= 0. + run_mode: The classification run mode, either 'greedy' or 'mem'. + protein_input: If True, input sequences are treated as protein sequences (disables translation). + enable_seg_filter: If True, enables filtering of query sequences containing low-complexity regions using SEG. + Enabled by default. Set to False to disable. + verbose_output: If True, enables verbose output with additional columns. + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + # Input validation + _validate_input_file(nodes_dmp_file, "nodes_dmp_file") + _validate_input_file(fmi_file, "fmi_file") + _validate_input_file(input_file, "input_file") + if second_input_file: + _validate_input_file(second_input_file, "second_input_file") + if output_file: + _validate_output_file(output_file, "output_file") + + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + if mismatches < 0: + raise ValueError("Number of mismatches must be non-negative.") + if e_value <= 0: + raise ValueError("E-value must be greater than 0.") + if min_match_len < 1: + raise ValueError("Minimum match length must be at least 1.") + if min_match_score < 0: + raise ValueError("Minimum match score must be non-negative.") + + cmd = [ + "kaiju", + "-t", str(nodes_dmp_file), + "-f", str(fmi_file), + "-i", str(input_file), + "-z", str(threads), + ] + + if second_input_file: + cmd.extend(["-j", str(second_input_file)]) + if output_file: + cmd.extend(["-o", str(output_file)]) + + # Run mode specific options + if run_mode == "greedy": + cmd.extend(["-e", str(mismatches)]) + cmd.extend(["-E", str(e_value)]) + cmd.extend(["-s", str(min_match_score)]) + elif run_mode == "mem": + cmd.extend(["-a", "mem"]) + cmd.extend(["-m", str(min_match_len)]) + + if protein_input: + cmd.append("-p") + + # SEG filter: -x enables, -X disables. It's enabled by default. + # So, only add -X if enable_seg_filter is False. + if not enable_seg_filter: + cmd.append("-X") + + if verbose_output: + cmd.append("-v") + + result = _run_command(cmd) + if output_file and "error" not in result: + result["output_files"].append(str(output_file)) + return result + + +@mcp.tool() +def kaiju_makedb( + source_database: Literal[ + "refseq", "refseq_nr", "refseq_ref", "progenomes", "viruses", + "plasmids", "fungi", "nr", "nr_euk", "rvdb" + ], + output_dir: Path, + threads: int = 5, +) -> dict: + """ + Downloads reference databases and builds Kaiju's database index. + + Args: + source_database: The name of the reference database to download and build. + Available options: 'refseq', 'refseq_nr', 'refseq_ref', + 'progenomes', 'viruses', 'plasmids', 'fungi', 'nr', 'nr_euk', 'rvdb'. + output_dir: Directory where the database files and index will be created. + Requires at least 500 GB of free space for large databases. + threads: Number of parallel threads for index construction. A higher number + increases memory usage during construction. Must be >= 1. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + _validate_directory(output_dir, "output_dir", must_exist=False, must_be_writable=True) + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + + cmd = [ + "kaiju-makedb", + "-s", source_database, + "-t", str(threads), + ] + + # Run the command in the specified output directory + result = _run_command(cmd, cwd=str(output_dir)) + + if "error" not in result: + # Identify expected output files. + # The docs state that for "-s refseq", the index is "refseq/kaiju_db_refseq.fmi". + # This implies a subdirectory named after the source database. + db_subdir = output_dir / source_database + fmi_file = db_subdir / f"kaiju_db_{source_database}.fmi" + nodes_file = output_dir / "nodes.dmp" + names_file = output_dir / "names.dmp" + + # Check if they exist before adding + if fmi_file.exists(): + result["output_files"].append(str(fmi_file)) + if nodes_file.exists(): + result["output_files"].append(str(nodes_file)) + if names_file.exists(): + result["output_files"].append(str(names_file)) + + return result + + +@mcp.tool() +def kaiju_mkbwt( + input_fasta: Path, + output_prefix: str, + threads: int = 5, + alphabet: str = "ACDEFGHIKLMNPQRSTVWY", +) -> dict: + """ + Builds the Burrows-Wheeler Transform (BWT) for a custom protein database. + This is the first step in creating a custom Kaiju index. + + Args: + input_fasta: Path to the input FASTA file containing protein sequences. + Headers must be numeric NCBI taxon identifiers, optionally prefixed by an identifier and underscore. + output_prefix: Prefix for the output BWT and SA files (e.g., 'proteins' will create proteins.bwt, proteins.sa). + threads: Number of parallel threads to use. Must be >= 1. + alphabet: The alphabet of protein sequences. Defaults to standard 20 amino acids. + Only uppercase characters are allowed. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + _validate_input_file(input_fasta, "input_fasta") + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + if not alphabet.isupper() or not alphabet.isalpha(): + raise ValueError("Alphabet must contain only uppercase alphabetic characters.") + if not output_prefix: + raise ValueError("Output prefix cannot be empty.") + + cmd = [ + "kaiju-mkbwt", + "-n", str(threads), + "-a", alphabet, + "-o", output_prefix, + str(input_fasta), + ] + + result = _run_command(cmd) + if "error" not in result: + # kaiju-mkbwt creates .bwt and .sa files + bwt_file = Path(f"{output_prefix}.bwt") + sa_file = Path(f"{output_prefix}.sa") + if bwt_file.exists(): + result["output_files"].append(str(bwt_file)) + if sa_file.exists(): + result["output_files"].append(str(sa_file)) + return result + + +@mcp.tool() +def kaiju_mkfmi( + input_prefix: str, +) -> dict: + """ + Builds the FM-index from BWT and SA files created by kaiju-mkbwt. + This is the second step in creating a custom Kaiju index. + + Args: + input_prefix: The prefix used for the BWT and SA files (e.g., 'proteins' + if kaiju-mkbwt created proteins.bwt and proteins.sa). + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + if not input_prefix: + raise ValueError("Input prefix cannot be empty.") + + # Check if intermediate files exist + bwt_file = Path(f"{input_prefix}.bwt") + sa_file = Path(f"{input_prefix}.sa") + if not bwt_file.exists(): + raise ValueError(f"Required BWT file not found: {bwt_file}. Run kaiju_mkbwt first.") + if not sa_file.exists(): + raise ValueError(f"Required SA file not found: {sa_file}. Run kaiju_mkbwt first.") + + cmd = [ + "kaiju-mkfmi", + input_prefix, + ] + + result = _run_command(cmd) + if "error" not in result: + # kaiju-mkfmi creates the .fmi file + fmi_file = Path(f"{input_prefix}.fmi") + if fmi_file.exists(): + result["output_files"].append(str(fmi_file)) + return result + + +@mcp.tool() +def kaiju_multi_classify( + nodes_dmp_file: Path, + fmi_file: Path, + input_files: List[Path], + second_input_files: Optional[List[Path]] = None, + output_files: Optional[List[Path]] = None, + threads: int = 1, + mismatches: int = 3, + e_value: float = 0.01, + min_match_len: int = 11, + min_match_score: int = 65, + run_mode: Literal["greedy", "mem"] = "greedy", + protein_input: bool = False, + enable_seg_filter: bool = True, + verbose_output: bool = False, +) -> dict: + """ + Performs fast and sensitive taxonomic classification for multiple samples simultaneously. + + Args: + nodes_dmp_file: Path to the NCBI taxonomy nodes.dmp file. + fmi_file: Path to the Kaiju database index (.fmi) file. + input_files: A list of paths to input FASTQ/FASTA files for single-end reads + or first mates of paired-end reads. + second_input_files: Optional list of paths to second input FASTQ/FASTA files + for paired-end reads. If provided, its length must match `input_files`. + output_files: Optional list of paths to output files. If not provided, output will be + printed to STDOUT (merged if multiple inputs). If provided, its length + must match `input_files`. + threads: Number of parallel threads to use. Must be >= 1. + mismatches: Number of allowed mismatches in Greedy mode. Must be >= 0. + e_value: E-value threshold for classification in Greedy mode. Must be > 0. + min_match_len: Minimum required match length in MEM mode. Must be >= 1. + min_match_score: Minimum required match score in Greedy mode. Must be >= 0. + run_mode: The classification run mode, either 'greedy' or 'mem'. + protein_input: If True, input sequences are treated as protein sequences (disables translation). + enable_seg_filter: If True, enables filtering of query sequences containing low-complexity regions using SEG. + Enabled by default. Set to False to disable. + verbose_output: If True, enables verbose output with additional columns. + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + # Input validation + _validate_input_file(nodes_dmp_file, "nodes_dmp_file") + _validate_input_file(fmi_file, "fmi_file") + + if not input_files: + raise ValueError("At least one input file must be provided.") + for f in input_files: + _validate_input_file(f, "input_files") + + if second_input_files: + if len(input_files) != len(second_input_files): + raise ValueError("Number of first input files must match number of second input files.") + for f in second_input_files: + _validate_input_file(f, "second_input_files") + + if output_files: + if len(input_files) != len(output_files): + raise ValueError("Number of input files must match number of output files.") + for f in output_files: + _validate_output_file(f, "output_files") + + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + if mismatches < 0: + raise ValueError("Number of mismatches must be non-negative.") + if e_value <= 0: + raise ValueError("E-value must be greater than 0.") + if min_match_len < 1: + raise ValueError("Minimum match length must be at least 1.") + if min_match_score < 0: + raise ValueError("Minimum match score must be non-negative.") + + cmd = [ + "kaiju-multi", + "-t", str(nodes_dmp_file), + "-f", str(fmi_file), + "-i", ",".join(str(p) for p in input_files), + "-z", str(threads), + ] + + if second_input_files: + cmd.extend(["-j", ",".join(str(p) for p in second_input_files)]) + if output_files: + cmd.extend(["-o", ",".join(str(p) for p in output_files)]) + + # Run mode specific options + if run_mode == "greedy": + cmd.extend(["-e", str(mismatches)]) + cmd.extend(["-E", str(e_value)]) + cmd.extend(["-s", str(min_match_score)]) + elif run_mode == "mem": + cmd.extend(["-a", "mem"]) + cmd.extend(["-m", str(min_match_len)]) + + if protein_input: + cmd.append("-p") + + if not enable_seg_filter: + cmd.append("-X") + + if verbose_output: + cmd.append("-v") + + result = _run_command(cmd) + if output_files and "error" not in result: + result["output_files"].extend([str(f) for f in output_files]) + return result + + +@mcp.tool() +def kaiju2krona( + nodes_dmp_file: Path, + names_dmp_file: Path, + input_kaiju_output: Path, + output_krona_file: Path, + print_full_taxon_path: bool = False, +) -> dict: + """ + Converts Kaiju's tab-separated output file into a Krona-compatible text file. + + Args: + nodes_dmp_file: Path to the NCBI taxonomy nodes.dmp file. + names_dmp_file: Path to the NCBI taxonomy names.dmp file. + input_kaiju_output: Path to the Kaiju classification output file. + output_krona_file: Path to the output Krona-compatible text file. + print_full_taxon_path: If True, print the full taxon path instead of just the taxon name. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + _validate_input_file(nodes_dmp_file, "nodes_dmp_file") + _validate_input_file(names_dmp_file, "names_dmp_file") + _validate_input_file(input_kaiju_output, "input_kaiju_output") + _validate_output_file(output_krona_file, "output_krona_file") + + cmd = [ + "kaiju2krona", + "-t", str(nodes_dmp_file), + "-n", str(names_dmp_file), + "-i", str(input_kaiju_output), + "-o", str(output_krona_file), + ] + + if print_full_taxon_path: + cmd.append("-l") # The doc says -l for kaiju2krona prints full path. + + result = _run_command(cmd) + if "error" not in result: + result["output_files"].append(str(output_krona_file)) + return result + + +@mcp.tool() +def kaiju2table( + nodes_dmp_file: Path, + names_dmp_file: Path, + taxonomic_rank: str, + output_summary_file: Path, + input_kaiju_outputs: List[Path], + min_percentage: float = 0.0, + min_count: int = 0, + exclude_unclassified: bool = False, + print_full_taxon_path: bool = False, + specific_ranks_for_path: Optional[List[str]] = None, +) -> dict: + """ + Converts Kaiju's output file(s) into a summary table for a given taxonomic rank. + + Args: + nodes_dmp_file: Path to the NCBI taxonomy nodes.dmp file. + names_dmp_file: Path to the NCBI taxonomy names.dmp file. + taxonomic_rank: The taxonomic rank for which to create the summary table (e.g., 'genus', 'species'). + output_summary_file: Path to the output summary table file (TSV format). + input_kaiju_outputs: A list of paths to one or more Kaiju classification output files. + min_percentage: Minimum percentage of total reads for a taxon to be included in the summary. Must be >= 0.0. + min_count: Minimum absolute read count for a taxon to be included in the summary. Must be >= 0. + exclude_unclassified: If True, unclassified reads are not counted towards the total + when calculating percentages. + print_full_taxon_path: If True, print the full taxon path instead of just the taxon name. + specific_ranks_for_path: Optional list of specific ranks to print in the taxon path + (e.g., ['superkingdom', 'phylum', 'class']). Overrides `print_full_taxon_path` if set. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + _validate_input_file(nodes_dmp_file, "nodes_dmp_file") + _validate_input_file(names_dmp_file, "names_dmp_file") + _validate_output_file(output_summary_file, "output_summary_file") + if not input_kaiju_outputs: + raise ValueError("At least one Kaiju output file must be provided.") + for f in input_kaiju_outputs: + _validate_input_file(f, "input_kaiju_outputs") + + if min_percentage < 0.0: + raise ValueError("Minimum percentage must be non-negative.") + if min_count < 0: + raise ValueError("Minimum count must be non-negative.") + if not taxonomic_rank: + raise ValueError("Taxonomic rank cannot be empty.") + + cmd = [ + "kaiju2table", + "-t", str(nodes_dmp_file), + "-n", str(names_dmp_file), + "-r", taxonomic_rank, + "-o", str(output_summary_file), + ] + cmd.extend([str(f) for f in input_kaiju_outputs]) + + if min_percentage > 0.0: + cmd.extend(["-m", str(min_percentage)]) + if min_count > 0: + cmd.extend(["-c", str(min_count)]) + if exclude_unclassified: + cmd.append("-u") + + if specific_ranks_for_path: + cmd.extend(["-l", ",".join(specific_ranks_for_path)]) + elif print_full_taxon_path: + cmd.append("-p") + + result = _run_command(cmd) + if "error" not in result: + result["output_files"].append(str(output_summary_file)) + return result + + +@mcp.tool() +def kaiju_add_taxon_names( + nodes_dmp_file: Path, + names_dmp_file: Path, + input_kaiju_output: Path, + output_file_with_names: Path, + omit_unclassified_reads: bool = False, + print_full_taxon_path: bool = False, + specific_ranks_for_path: Optional[List[str]] = None, +) -> dict: + """ + Appends taxon names or full taxon paths to Kaiju's output file. + + Args: + nodes_dmp_file: Path to the NCBI taxonomy nodes.dmp file. + names_dmp_file: Path to the NCBI taxonomy names.dmp file. + input_kaiju_output: Path to the Kaiju classification output file. + output_file_with_names: Path to the output file with appended taxon names/paths. + omit_unclassified_reads: If True, unclassified reads will be omitted from the output. + print_full_taxon_path: If True, print the full taxon path instead of just the taxon name. + specific_ranks_for_path: Optional list of specific ranks to print in the path + (e.g., ['phylum', 'genus']). Overrides `print_full_taxon_path` if set. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + _validate_input_file(nodes_dmp_file, "nodes_dmp_file") + _validate_input_file(names_dmp_file, "names_dmp_file") + _validate_input_file(input_kaiju_output, "input_kaiju_output") + _validate_output_file(output_file_with_names, "output_file_with_names") + + cmd = [ + "kaiju-addTaxonNames", + "-t", str(nodes_dmp_file), + "-n", str(names_dmp_file), + "-i", str(input_kaiju_output), + "-o", str(output_file_with_names), + ] + + if omit_unclassified_reads: + cmd.append("-u") + + if specific_ranks_for_path: + cmd.extend(["-r", ",".join(specific_ranks_for_path)]) + elif print_full_taxon_path: + cmd.append("-p") + + result = _run_command(cmd) + if "error" not in result: + result["output_files"].append(str(output_file_with_names)) + return result + + +@mcp.tool() +def kaiju_merge_outputs( + input_file1: Path, + input_file2: Path, + output_merged_file: Path, + verbose_output: bool = False, + conflict_strategy: Literal["1", "2", "lca", "lowest"] = "lca", + nodes_dmp_file: Optional[Path] = None, + precedence_by_score: bool = False, +) -> dict: + """ + Merges two tab-separated output files (Kaiju or Kraken format) based on read names. + Input files must be sorted by read name (e.g., using `sort -k2,2`). + + Args: + input_file1: Path to the first sorted input file. + input_file2: Path to the second sorted input file. + output_merged_file: Path to the output merged file. + verbose_output: If True, prints all columns from input files (otherwise only first three). + conflict_strategy: Strategy to resolve conflicting taxon identifiers for a classified read: + '1': Use taxon identifier from the first input file. + '2': Use taxon identifier from the second input file. + 'lca': Use the least common ancestor of the taxon identifiers (default). + 'lowest': Use the lowest ranking of the two taxon identifiers if they are + within the same lineage, otherwise use LCA. + nodes_dmp_file: Path to the NCBI taxonomy nodes.dmp file. Required if `conflict_strategy` + is 'lca' or 'lowest'. + precedence_by_score: If True, gives precedence to the classification result with the higher score + (requires 4th column in input files). + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + _validate_input_file(input_file1, "input_file1") + _validate_input_file(input_file2, "input_file2") + _validate_output_file(output_merged_file, "output_merged_file") + + if conflict_strategy in ["lca", "lowest"] and not nodes_dmp_file: + raise ValueError(f"nodes_dmp_file is required when conflict_strategy is '{conflict_strategy}'.") + if nodes_dmp_file: + _validate_input_file(nodes_dmp_file, "nodes_dmp_file") + + cmd = [ + "kaiju-mergeOutputs", + "-i", str(input_file1), + "-j", str(input_file2), + "-o", str(output_merged_file), + "-c", conflict_strategy, + ] + + if nodes_dmp_file: + cmd.extend(["-t", str(nodes_dmp_file)]) + if verbose_output: + cmd.append("-v") + if precedence_by_score: + cmd.append("-s") + + result = _run_command(cmd) + if "error" not in result: + result["output_files"].append(str(output_merged_file)) + return result + + +@mcp.tool() +def kaijux_search( + fmi_file: Path, + input_file: Path, + second_input_file: Optional[Path] = None, + output_file: Optional[Path] = None, + threads: int = 1, + mismatches: int = 3, + e_value: float = 0.01, + min_match_len: int = 11, + min_match_score: int = 65, + run_mode: Literal["greedy", "mem"] = "greedy", + enable_seg_filter: bool = True, + verbose_output: bool = False, +) -> dict: + """ + Searches translated nucleotide reads against a protein database without taxonomic classification. + Prints the name of the best matching database sequence. + + Args: + fmi_file: Path to the Kaiju database index (.fmi) file. + input_file: Path to the input FASTQ/FASTA file for single-end reads or first mate of paired-end reads. + (Nucleotide sequences). + second_input_file: Optional path to the second input FASTQ/FASTA file for paired-end reads. + output_file: Optional path to the output file. If not provided, output will be printed to STDOUT. + threads: Number of parallel threads to use. Must be >= 1. + mismatches: Number of allowed mismatches in Greedy mode. Must be >= 0. + e_value: E-value threshold for classification in Greedy mode. Must be > 0. + min_match_len: Minimum required match length in MEM mode. Must be >= 1. + min_match_score: Minimum required match score in Greedy mode. Must be >= 0. + run_mode: The classification run mode, either 'greedy' or 'mem'. + enable_seg_filter: If True, enables filtering of query sequences containing low-complexity regions using SEG. + Enabled by default. Set to False to disable. + verbose_output: If True, enables verbose output with additional columns. + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + # Input validation + _validate_input_file(fmi_file, "fmi_file") + _validate_input_file(input_file, "input_file") + if second_input_file: + _validate_input_file(second_input_file, "second_input_file") + if output_file: + _validate_output_file(output_file, "output_file") + + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + if mismatches < 0: + raise ValueError("Number of mismatches must be non-negative.") + if e_value <= 0: + raise ValueError("E-value must be greater than 0.") + if min_match_len < 1: + raise ValueError("Minimum match length must be at least 1.") + if min_match_score < 0: + raise ValueError("Minimum match score must be non-negative.") + + cmd = [ + "kaijux", + "-f", str(fmi_file), + "-i", str(input_file), + "-z", str(threads), + ] + + if second_input_file: + cmd.extend(["-j", str(second_input_file)]) + if output_file: + cmd.extend(["-o", str(output_file)]) + + # Run mode specific options + if run_mode == "greedy": + cmd.extend(["-e", str(mismatches)]) + cmd.extend(["-E", str(e_value)]) + cmd.extend(["-s", str(min_match_score)]) + elif run_mode == "mem": + cmd.extend(["-a", "mem"]) + cmd.extend(["-m", str(min_match_len)]) + + if not enable_seg_filter: + cmd.append("-X") + + if verbose_output: + cmd.append("-v") + + result = _run_command(cmd) + if output_file and "error" not in result: + result["output_files"].append(str(output_file)) + return result + + +@mcp.tool() +def kaijup_search( + fmi_file: Path, + input_file: Path, + second_input_file: Optional[Path] = None, + output_file: Optional[Path] = None, + threads: int = 1, + mismatches: int = 3, + e_value: float = 0.01, + min_match_len: int = 11, + min_match_score: int = 65, + run_mode: Literal["greedy", "mem"] = "greedy", + enable_seg_filter: bool = True, + verbose_output: bool = False, +) -> dict: + """ + Searches protein queries against a protein database without taxonomic classification. + Prints the name of the best matching database sequence. + + Args: + fmi_file: Path to the Kaiju database index (.fmi) file. + input_file: Path to the input FASTA file for single-end protein queries or first mate of paired-end. + second_input_file: Optional path to the second input FASTA file for paired-end protein queries. + output_file: Optional path to the output file. If not provided, output will be printed to STDOUT. + threads: Number of parallel threads to use. Must be >= 1. + mismatches: Number of allowed mismatches in Greedy mode. Must be >= 0. + e_value: E-value threshold for classification in Greedy mode. Must be > 0. + min_match_len: Minimum required match length in MEM mode. Must be >= 1. + min_match_score: Minimum required match score in Greedy mode. Must be >= 0. + run_mode: The classification run mode, either 'greedy' or 'mem'. + enable_seg_filter: If True, enables filtering of query sequences containing low-complexity regions using SEG. + Enabled by default. Set to False to disable. + verbose_output: If True, enables verbose output with additional columns. + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + # Input validation + _validate_input_file(fmi_file, "fmi_file") + _validate_input_file(input_file, "input_file") + if second_input_file: + _validate_input_file(second_input_file, "second_input_file") + if output_file: + _validate_output_file(output_file, "output_file") + + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + if mismatches < 0: + raise ValueError("Number of mismatches must be non-negative.") + if e_value <= 0: + raise ValueError("E-value must be greater than 0.") + if min_match_len < 1: + raise ValueError("Minimum match length must be at least 1.") + if min_match_score < 0: + raise ValueError("Minimum match score must be non-negative.") + + cmd = [ + "kaijup", + "-f", str(fmi_file), + "-i", str(input_file), + "-z", str(threads), + ] + + if second_input_file: + cmd.extend(["-j", str(second_input_file)]) + if output_file: + cmd.extend(["-o", str(output_file)]) + + # Run mode specific options + if run_mode == "greedy": + cmd.extend(["-e", str(mismatches)]) + cmd.extend(["-E", str(e_value)]) + cmd.extend(["-s", str(min_match_score)]) + elif run_mode == "mem": + cmd.extend(["-a", "mem"]) + cmd.extend(["-m", str(min_match_len)]) + + if not enable_seg_filter: + cmd.append("-X") + + if verbose_output: + cmd.append("-v") + + result = _run_command(cmd) + if output_file and "error" not in result: + result["output_files"].append(str(output_file)) + return result \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1b0cfc2940a9a769329c10e2090661504521d0bc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/kaiju_server.py') +SERVER_NAME = 'biosci_kaiju' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..a1ad5b20456123671a7101563711cad806372e4c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-kaiju: + build: . + image: mcp-kaiju:latest + container_name: mcp-kaiju + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=kaiju + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..68716f85534f2bc339b296d5dad3f29d3b5c87be --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - kaiju + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kaiju/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d817ef4d35cdea14a55f427149a015850feb8d09 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install kalign2 via conda (e.g., from bioconda) +RUN conda install -c bioconda kalign2 -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/kalign2_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/kalign2_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/kalign2_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_server.py new file mode 100644 index 0000000000000000000000000000000000000000..52dee0aaf5f8ac8ffd35aa92e7d3dbdec7cff5f9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_server.py @@ -0,0 +1,110 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def kalign2_align( + input_fasta: Path, + output_fasta: Path, +) -> Dict[str, Any]: + """ + Performs multiple sequence alignment using kalign2. + + This function aligns protein or DNA/RNA sequences from an input FASTA file + and writes the alignment to an output FASTA file. + + NOTE: The provided documentation for kalign2 (web docs extract and conda info) + did not include detailed command-line help or manual pages. Therefore, this + implementation assumes the most basic usage pattern: `kalign2 ` + which typically prints the alignment to standard output. The output is then + redirected to the specified `output_fasta` file. + + No specific parameters for gap penalties, scoring matrices, sequence type, + or output format could be extracted from the provided documentation. + A more comprehensive MCP tool would require the full `--help` output + or a detailed manual page for kalign2 to expose these options. + + Args: + input_fasta: Path to the input FASTA file containing sequences to align. + This file must exist and be readable. + output_fasta: Path to the output FASTA file where the aligned sequences + will be written. This file will be created or overwritten. + The parent directory will be created if it does not exist. + + Returns: + A dictionary containing the command executed, stdout, stderr, and + a list of generated output files. + + Raises: + ValueError: If `input_fasta` does not exist or is not a file. + subprocess.CalledProcessError: If kalign2 execution fails with a non-zero exit code. + FileNotFoundError: If the `kalign2` executable is not found in the system's PATH. + """ + # Input validation + if not isinstance(input_fasta, Path): + raise TypeError(f"input_fasta must be a Path object, got {type(input_fasta)}") + if not input_fasta.is_file(): + raise ValueError(f"Input FASTA file not found or is not a file: {input_fasta}") + + if not isinstance(output_fasta, Path): + raise TypeError(f"output_fasta must be a Path object, got {type(output_fasta)}") + + # Ensure output directory exists + output_fasta.parent.mkdir(parents=True, exist_ok=True) + + command = ["kalign2", str(input_fasta)] + + stdout_content = "" + stderr_content = "" + output_files: List[Path] = [] + + try: + # Execute kalign2. Assuming it prints the alignment to stdout by default. + # Redirect stdout to the specified output_fasta file. + with open(output_fasta, "w") as outfile: + process = subprocess.run( + command, + stdout=outfile, # Redirect stdout to the output file + stderr=subprocess.PIPE, + check=True, + text=True, + encoding="utf-8", + ) + + # Since stdout is redirected, process.stdout will be empty. + # We provide a descriptive message for stdout_content. + stdout_content = f"Alignment successfully written to {output_fasta}" + stderr_content = process.stderr + output_files.append(output_fasta) + + except FileNotFoundError: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": "kalign2 executable not found. Please ensure it is installed and in your system's PATH.", + "output_files": [], + "error": "kalign2 executable not found.", + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, # This will be empty if stdout was redirected + "stderr": e.stderr, + "output_files": [], + "error": f"kalign2 execution failed with exit code {e.returncode}. Stderr: {e.stderr}", + } + except Exception as e: + return { + "command_executed": " ".join(command), + "stdout": stdout_content, + "stderr": stderr_content, + "output_files": [], + "error": f"An unexpected error occurred during kalign2 execution: {str(e)}", + } + + return { + "command_executed": " ".join(command), + "stdout": stdout_content, + "stderr": stderr_content, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8ce228b12b389a72f4e8534688a9097d2590c1b5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/kalign2_server.py') +SERVER_NAME = 'biosci_kalign2' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d051ea54c55891614f7f2b8586113f748cf13278 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-kalign2: + build: . + image: mcp-kalign2:latest + container_name: mcp-kalign2 + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=kalign2 + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8cb94499dd106cee9e6d985c91ed3388171d77ee --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - kalign2 + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_kalign2/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_khipu-metabolomics/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_khipu-metabolomics/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..82f3ae22a998036c0e2f660e5682de2a2f16ea3d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_khipu-metabolomics/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - khipu-metabolomics + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_khipu-metabolomics/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_khipu-metabolomics/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_khipu-metabolomics/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..24b807ae1a0c5e40854b89954683c231446d5cf4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install meme via conda (e.g., from bioconda) +RUN conda install -c bioconda meme -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/meme_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/meme_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/meme_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_server.py new file mode 100644 index 0000000000000000000000000000000000000000..845ce492e8b854744db31a3f1da0e9729698ad46 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_server.py @@ -0,0 +1,291 @@ +import subprocess +import tempfile +from pathlib import Path +import shutil +from typing import Optional, List + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +def tool(func): + def wrapper(*args, **kwargs): + return func(*args, **kwargs) + return wrapper + +mcp = type('mcp', (), {'tool': tool}) + + +@mcp.tool() +def meme( + dataset: Path, + output_dir: Optional[Path] = None, + clobber: bool = False, + background_file: Optional[Path] = None, + alphabet_file: Optional[Path] = None, + fafasta: Optional[Path] = None, + consensus_sequence: Optional[str] = None, + count_file: Optional[Path] = None, + prior_file: Optional[Path] = None, + prior_library: Optional[Path] = None, + beta: Optional[float] = None, + use_llr: bool = False, + negative_seq_file: Optional[Path] = None, + revcomp: bool = False, + sequence_type: Optional[str] = None, + time_limit: Optional[int] = None, + max_dataset_size: Optional[int] = None, + max_iterations: Optional[int] = None, + no_status: bool = False, + brief: bool = False, + print_fasta_max: Optional[int] = None, + print_pred_max: Optional[int] = None, + print_full_pred_seqs: bool = False, + print_helices: bool = False, + print_pvals: bool = False, + print_reasons: bool = False, + print_residues: bool = False, + print_starts: bool = False, + print_strands: bool = False, + print_uniform: bool = False, + print_version: bool = False, + psp_file: Optional[Path] = None, + pssm_file: Optional[Path] = None, + fimo_format: bool = False, + mast_format: bool = False, + mod: str = "zoops", + nmotifs: Optional[int] = None, + evt: Optional[float] = None, + w: Optional[int] = None, + minw: Optional[int] = None, + maxw: Optional[int] = None, + ws: Optional[int] = None, + no_w_in_log: bool = False, + wg: Optional[int] = None, + w_dist: Optional[Path] = None, + nsites: Optional[int] = None, + minsites: Optional[int] = None, + maxsites: Optional[int] = None, + pal: bool = False, + nomatrim: bool = False, + noendgaps: bool = False, + wg_dist: Optional[Path] = None, + wns: Optional[float] = None, + wpen: Optional[float] = None, + spmap: Optional[str] = None, + spfuzz: Optional[float] = None, + cons_dist: Optional[Path] = None, + heapsize: Optional[int] = None, + seed: Optional[int] = None, + tcm_file: Optional[Path] = None, + markov_order: int = 0, + p: Optional[int] = None, + host: Optional[str] = None, +): + """ + Runs the MEME tool for motif discovery in a set of sequences. + + MEME discovers ungapped motifs in a group of related DNA, RNA, or protein sequences. + It represents motifs as position-dependent letter-probability matrices. + + Args: + dataset: Path to the input FASTA file containing sequences. + output_dir: Directory to save output files. If not provided, a temporary directory is used. + clobber: If True, allows overwriting the contents of an existing output directory. + background_file: Path to a file containing a 0-order background model. + alphabet_file: Path to a file defining a custom alphabet. + fafasta: Use FASTA format for sequence ids in count file. + consensus_sequence: Use a consensus sequence for starting point. + count_file: Use a count file for starting point. + prior_file: Path to a file containing position-specific priors (PSPs). + prior_library: Path to a directory containing a library of PSPs. + beta: Beta value for Dirichlet mixture prior. + use_llr: Use LLR for prior. + negative_seq_file: Path to a FASTA file of negative sequences for discriminative motif discovery. + revcomp: Allow motifs to occur on the reverse complement strand of DNA sequences. + sequence_type: Type of sequences. Must be one of 'dna', 'rna', or 'protein'. + time_limit: Maximum running time in seconds. + max_dataset_size: Maximum dataset size in characters. + max_iterations: Maximum number of EM iterations. + no_status: Do not print progress reports. + brief: Brief output. + print_fasta_max: Maximum number of sequences to print in FASTA format. + print_pred_max: Maximum number of predicted sites to print. + print_full_pred_seqs: Print full predicted sequences. + print_helices: Print helix probabilities. + print_pvals: Print p-values. + print_reasons: Print reasons for stopping. + print_residues: Print residue counts. + print_starts: Print start sites. + print_strands: Print strand information. + print_uniform: Print uniform background. + print_version: Print version and exit. + psp_file: Path to a file with position-specific priors. + pssm_file: Path to a file with a position-specific scoring matrix. + fimo_format: Output in FIMO format. + mast_format: Output in MAST format. + mod: Distribution of motifs. One of 'oops', 'zoops', 'anr'. + nmotifs: Number of motifs to find. + evt: E-value threshold for reporting motifs. + w: Exact width of motifs to find. + minw: Minimum width of motifs to find. + maxw: Maximum width of motifs to find. + ws: Site width for ANR model. + no_w_in_log: Do not include width in log-likelihood. + wg: Gap width for ANR model. + w_dist: Path to a file with width distribution. + nsites: Exact number of sites for each motif. + minsites: Minimum number of sites for each motif. + maxsites: Maximum number of sites for each motif. + pal: Force motifs to be palindromic (DNA/RNA only). + nomatrim: Do not perform matrix trimming. + noendgaps: Do not allow end gaps. + wg_dist: Path to a file with gap width distribution. + wns: Probability of no site. + wpen: Width penalty. + spmap: Starting point map type. One of 'uni', 'pam'. + spfuzz: Starting point fuzziness. + cons_dist: Path to a file with consensus distribution. + heapsize: Heap size for ANR model. + seed: Random seed for reproducible results. + tcm_file: Path to a file with a transition count matrix. + markov_order: Order of the Markov background model. + p: Number of processors to use for parallel execution. + host: Hostname for parallel execution. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output file paths. + """ + # --- Input Validation --- + if not dataset.is_file(): + raise FileNotFoundError(f"Input dataset file not found: {dataset}") + + for file_path in [ + background_file, alphabet_file, fafasta, count_file, prior_file, + negative_seq_file, psp_file, pssm_file, w_dist, wg_dist, cons_dist, tcm_file + ]: + if file_path and not Path(file_path).is_file(): + raise FileNotFoundError(f"Input file not found: {file_path}") + + if prior_library and not Path(prior_library).is_dir(): + raise NotADirectoryError(f"Prior library directory not found: {prior_library}") + + if sequence_type and sequence_type not in ["dna", "rna", "protein"]: + raise ValueError("sequence_type must be one of 'dna', 'rna', or 'protein'.") + + if mod not in ["oops", "zoops", "anr"]: + raise ValueError("mod must be one of 'oops', 'zoops', or 'anr'.") + + if spmap and spmap not in ["uni", "pam"]: + raise ValueError("spmap must be one of 'uni' or 'pam'.") + + if w is not None and (minw is not None or maxw is not None): + raise ValueError("Specify 'w', or 'minw' and 'maxw', but not both.") + if (minw is not None and maxw is None) or (minw is None and maxw is not None): + raise ValueError("'minw' and 'maxw' must be specified together.") + + if nsites is not None and (minsites is not None or maxsites is not None): + raise ValueError("Specify 'nsites', or 'minsites' and 'maxsites', but not both.") + if (minsites is not None and maxsites is None) or (minsites is None and maxsites is not None): + raise ValueError("'minsites' and 'maxsites' must be specified together.") + + # --- Command Construction --- + meme_executable = "meme" + if not shutil.which(meme_executable): + raise RuntimeError(f"{meme_executable} executable not found in PATH.") + + cmd = [meme_executable, str(dataset)] + + # Handle output directory + temp_dir_manager = None + if output_dir: + final_output_dir = output_dir + else: + temp_dir_manager = tempfile.TemporaryDirectory() + final_output_dir = Path(temp_dir_manager.name) + + if clobber: + cmd.extend(["-oc", str(final_output_dir)]) + else: + cmd.extend(["-o", str(final_output_dir)]) + + # Add optional arguments + arg_map = { + "bfile": background_file, "alph": alphabet_file, "fafasta": fafasta, + "cons": consensus_sequence, "ctf": count_file, "prior": prior_file, + "plib": prior_library, "b": beta, "neg": negative_seq_file, + "time": time_limit, "maxsize": max_dataset_size, "maxiter": max_iterations, + "print_fasta_max": print_fasta_max, "print_pred_max": print_pred_max, + "psp": psp_file, "pssm": pssm_file, "mod": mod, "nmotifs": nmotifs, + "evt": evt, "w": w, "minw": minw, "maxw": maxw, "ws": ws, "wg": wg, + "w_dist": w_dist, "nsites": nsites, "minsites": minsites, "maxsites": maxsites, + "wg_dist": wg_dist, "wns": wns, "wpen": wpen, "spmap": spmap, + "spfuzz": spfuzz, "cons_dist": cons_dist, "heapsize": heapsize, + "seed": seed, "tcm": tcm_file, "markov_order": markov_order, + "p": p, "host": host + } + for flag, value in arg_map.items(): + if value is not None and value != "zoops" and value != 0: # Exclude defaults + cmd.extend([f"-{flag}", str(value)]) + + # Add boolean flags + bool_flags = { + "use_llr": use_llr, "revcomp": revcomp, "nostatus": no_status, + "brief": brief, "print_full_pred_seqs": print_full_pred_seqs, + "print_helices": print_helices, "print_pvals": print_pvals, + "print_reasons": print_reasons, "print_residues": print_residues, + "print_starts": print_starts, "print_strands": print_strands, + "print_uniform": print_uniform, "print_version": print_version, + "fimo_format": fimo_format, "mast_format": mast_format, + "no_w_in_log": no_w_in_log, "pal": pal, "nomatrim": nomatrim, + "noendgaps": noendgaps + } + for flag, value in bool_flags.items(): + if value: + cmd.append(f"-{flag}") + + if sequence_type: + cmd.append(f"-{sequence_type}") + + # --- Subprocess Execution --- + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + output_files = { + "html_report": final_output_dir / "meme.html", + "text_report": final_output_dir / "meme.txt", + "xml_report": final_output_dir / "meme.xml", + "gff_report": final_output_dir / "meme.gff", + "output_directory": final_output_dir + } + + # Keep only existing files + existing_output_files = { + key: str(path) for key, path in output_files.items() if path.exists() + } + + result = { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": existing_output_files, + "return_code": process.returncode + } + + except subprocess.CalledProcessError as e: + result = { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error_message": f"MEME failed with return code {e.returncode}", + "return_code": e.returncode, + "output_files": {} + } + finally: + if temp_dir_manager: + temp_dir_manager.cleanup() + + return result \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..901c8819e4badb6d7db97f46f0e99b480875580c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/meme_server.py') +SERVER_NAME = 'biosci_meme' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5530eeefa0d19f3edd38466a220e67f4bcb99816 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-meme: + build: . + image: mcp-meme:latest + container_name: mcp-meme + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=meme + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b013bd9e2751b4ce8edcf9428f597ce812ad3568 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - meme + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_meme/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d30352ce436d33f4866cc0ec9cc718e88d91e6d0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install miniasm via conda (e.g., from bioconda) +RUN conda install -c bioconda miniasm -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/miniasm_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/miniasm_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/miniasm_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9e7badaee199ca55d5971909ef35370c90e3620d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_server.py @@ -0,0 +1,206 @@ +import subprocess +import re +from pathlib import Path +from typing import Optional, List, Literal + +# Assuming mcp is available in the execution environment +# import mcp + +class mcp: + """A mock mcp class for standalone development and testing.""" + @staticmethod + def tool(): + def decorator(func): + return func + return decorator + +@mcp.tool() +def run_miniasm( + in_paf: Path, + reads_file: Optional[Path] = None, + output_file: Optional[Path] = None, + min_reads_unitig: int = 3, + min_match_len: int = 100, + min_identity: float = 0.05, + min_span: int = 2000, + min_coverage: int = 10, + max_drop_off: int = 2000, + small_bubble_threshold: int = 4, + max_short_overlap_fraction: float = 0.8, + hpc_kmer_len: int = 10, + drop_ratio: str = "0.5,0.8", + max_gap_diff: int = 1000, + min_approx_map_identity: float = 0.8, + skip_1pass: bool = False, + skip_2pass: bool = False, + output_format: Literal["gfa", "paf"] = "gfa", + heap_sort: Literal["yes", "no"] = "no", +) -> dict: + """ + Run the miniasm de novo assembler for noisy long reads. + + miniasm is a fast OLC-based de novo assembler. It takes an all-vs-all read + self-mapping file in PAF format and outputs an assembly in GFA format. + + Args: + in_paf: Input file with overlaps in PAF format. + reads_file: Read sequences from this file. If not provided, reads are taken from in_paf. + output_file: Output assembly to this file. If not provided, output is sent to stdout. + min_reads_unitig: Minimum number of reads in a unitig. + min_match_len: Minimum match length. + min_identity: Minimum identity for an overlap. + min_span: Minimum span of an overlap. + min_coverage: Minimum coverage of a unitig. + max_drop_off: Maximum drop-off length for a unitig. + small_bubble_threshold: Threshold for small bubble detection. + max_short_overlap_fraction: Maximum fraction of short overlaps. + hpc_kmer_len: Homopolymer-compressed k-mer length. + drop_ratio: Drop shorter overlaps with this ratio to the longest (e.g., '0.5' or '0.5,0.8'). + max_gap_diff: Maximum gap differences. + min_approx_map_identity: Minimum identity for approximate mapping. + skip_1pass: Skip the 1-pass read selection. + skip_2pass: Skip the 2-pass read selection. + output_format: Output format ('gfa' or 'paf'). + heap_sort: Use introsort if 'no', or binary heap sort if 'yes'. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # Input validation + if not in_paf.is_file(): + raise FileNotFoundError(f"Input PAF file not found: {in_paf}") + if reads_file and not reads_file.is_file(): + raise FileNotFoundError(f"Reads file not found: {reads_file}") + + # Validate numeric parameters + if min_reads_unitig < 0: + raise ValueError("min_reads_unitig must be non-negative.") + if min_match_len < 0: + raise ValueError("min_match_len must be non-negative.") + if not (0.0 <= min_identity <= 1.0): + raise ValueError("min_identity must be between 0.0 and 1.0.") + if min_span < 0: + raise ValueError("min_span must be non-negative.") + if min_coverage < 0: + raise ValueError("min_coverage must be non-negative.") + if max_drop_off < 0: + raise ValueError("max_drop_off must be non-negative.") + if small_bubble_threshold < 0: + raise ValueError("small_bubble_threshold must be non-negative.") + if not (0.0 <= max_short_overlap_fraction <= 1.0): + raise ValueError("max_short_overlap_fraction must be between 0.0 and 1.0.") + if hpc_kmer_len < 0: + raise ValueError("hpc_kmer_len must be non-negative.") + if max_gap_diff < 0: + raise ValueError("max_gap_diff must be non-negative.") + if not (0.0 <= min_approx_map_identity <= 1.0): + raise ValueError("min_approx_map_identity must be between 0.0 and 1.0.") + + # Validate drop_ratio format + if not re.match(r"^\d+(\.\d+)?(,\d+(\.\d+)?)?$", drop_ratio): + raise ValueError("drop_ratio must be one or two floats separated by a comma (e.g., '0.5' or '0.5,0.8').") + + # Command construction + cmd = ["miniasm"] + + if output_file: + cmd.extend(["-o", str(output_file)]) + if reads_file: + cmd.extend(["-f", str(reads_file)]) + + # Add parameters that differ from their defaults for a cleaner command + if min_reads_unitig != 3: cmd.extend(["-n", str(min_reads_unitig)]) + if min_match_len != 100: cmd.extend(["-m", str(min_match_len)]) + if min_identity != 0.05: cmd.extend(["-i", str(min_identity)]) + if min_span != 2000: cmd.extend(["-s", str(min_span)]) + if min_coverage != 10: cmd.extend(["-c", str(min_coverage)]) + if max_drop_off != 2000: cmd.extend(["-d", str(max_drop_off)]) + if small_bubble_threshold != 4: cmd.extend(["-e", str(small_bubble_threshold)]) + if max_short_overlap_fraction != 0.8: cmd.extend(["-F", str(max_short_overlap_fraction)]) + if hpc_kmer_len != 10: cmd.extend(["-h", str(hpc_kmer_len)]) + if drop_ratio != "0.5,0.8": cmd.extend(["-r", drop_ratio]) + if max_gap_diff != 1000: cmd.extend(["-g", str(max_gap_diff)]) + if min_approx_map_identity != 0.8: cmd.extend(["-I", str(min_approx_map_identity)]) + if skip_1pass: cmd.append("-1") + if skip_2pass: cmd.append("-2") + if output_format != "gfa": cmd.extend(["-p", output_format]) + if heap_sort != "no": cmd.append(f"--heap-sort={heap_sort}") + + cmd.append(str(in_paf)) + command_executed = " ".join(cmd) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + output_files = [str(output_file)] if output_file else [] + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except FileNotFoundError: + raise RuntimeError("miniasm not found. Please ensure it is installed and in your PATH.") + except subprocess.CalledProcessError as e: + # Provide a structured error message + error_message = ( + f"miniasm execution failed with exit code {e.returncode}.\n" + f"Command: {e.cmd}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) + raise RuntimeError(error_message) from e + +@mcp.tool() +def miniasm_version() -> dict: + """ + Get the version of the miniasm tool. + + Returns: + A dictionary containing the command executed and the version information. + """ + cmd = ["miniasm", "--version"] + command_executed = " ".join(cmd) + + try: + # miniasm can print version to stderr and exit with non-zero code + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=False # Do not check for non-zero exit code initially + ) + + # Version info is typically in stderr + output = result.stderr.strip() if result.stderr else result.stdout.strip() + + if result.returncode != 0 and not output: + raise subprocess.CalledProcessError( + returncode=result.returncode, + cmd=cmd, + output=result.stdout, + stderr=result.stderr + ) + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "version": output + } + except FileNotFoundError: + raise RuntimeError("miniasm not found. Please ensure it is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"miniasm version check failed with exit code {e.returncode}.\n" + f"Command: {e.cmd}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) + raise RuntimeError(error_message) from e \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..cb5a0b3d49fa9fe5f84e82f4c6b123377286d85c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/miniasm_server.py') +SERVER_NAME = 'biosci_miniasm' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ee5827bc9a64a5cbd0c8c52b73ebd35005a2b12d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-miniasm: + build: . + image: mcp-miniasm:latest + container_name: mcp-miniasm + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=miniasm + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d9cbeb62e4e3f8b5c0fd385bfd6ead2ca551b2a0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - miniasm + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_miniasm/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mlst/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mlst/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mlst/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..44d71624d49838180014274694cc1fa7cf3e0f9a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install mmseqs2 via conda (e.g., from bioconda) +RUN conda install -c bioconda mmseqs2 -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/mmseqs2_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/mmseqs2_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/mmseqs2_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/__pycache__/mmseqs2_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/__pycache__/mmseqs2_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73b94e044c9f12353cdfbe89e1b996d6b642ee69 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/__pycache__/mmseqs2_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_server.py new file mode 100644 index 0000000000000000000000000000000000000000..40da74eeae411174fd06934e897633edb7358ff6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_server.py @@ -0,0 +1,432 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union +import tempfile + +def run_command(command: List[str]) -> dict: + """Helper to execute subprocess commands and return structured output.""" + try: + result = subprocess.run( + command, + check=True, + capture_output=True, + text=True + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "status": "error", + "error_message": str(e) + } + +@mcp.tool() +def mmseqs_createdb( + input_fasta: str, + output_db: str, + db_type: int = 0, + shuffle: bool = True, + createdb_mode: int = 0, + write_lookup: int = 1, + v: int = 3 +): + """ + Create an MMseqs2 database from a FASTA/FASTQ file. + db_type: 0: auto, 1: amino acid, 2: nucleotides. + """ + input_path = Path(input_fasta) + if not input_path.exists(): + raise FileNotFoundError(f"Input file {input_fasta} not found.") + + cmd = [ + "mmseqs", "createdb", + str(input_path), + output_db, + "--dbtype", str(db_type), + "--shuffle", str(int(shuffle)), + "--createdb-mode", str(createdb_mode), + "--write-lookup", str(write_lookup), + "-v", str(v) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_search( + query_db: str, + target_db: str, + result_db: str, + tmp_dir: str, + s: float = 5.7, + threads: int = 1, + v: int = 3, + max_seqs: int = 300, + min_seq_id: float = 0.0, + c: float = 0.0, + cov_mode: int = 0, + alignment_mode: int = 3, + e: float = 0.001 +): + """ + Search a query database against a target database. + s: sensitivity (higher is slower but more sensitive). + c: coverage threshold. + cov_mode: 0: coverage of query and target, 1: coverage of query, 2: coverage of target. + """ + for db in [query_db, target_db]: + if not Path(db).exists(): + raise FileNotFoundError(f"Database {db} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "search", + query_db, + target_db, + result_db, + tmp_dir, + "-s", str(s), + "--threads", str(threads), + "-v", str(v), + "--max-seqs", str(max_seqs), + "--min-seq-id", str(min_seq_id), + "-c", str(c), + "--cov-mode", str(cov_mode), + "--alignment-mode", str(alignment_mode), + "-e", str(e) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_cluster( + input_db: str, + result_db: str, + tmp_dir: str, + min_seq_id: float = 0.0, + c: float = 0.8, + cov_mode: int = 0, + cluster_mode: int = 0, + threads: int = 1, + v: int = 3, + s: float = 1.2 +): + """ + Cluster sequences in a database. + cluster_mode: 0: Set cover, 1: Connected component, 2: Greedy clustering, 3: Greedy clustering (CD-HIT style). + """ + if not Path(input_db).exists(): + raise FileNotFoundError(f"Input database {input_db} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "cluster", + input_db, + result_db, + tmp_dir, + "--min-seq-id", str(min_seq_id), + "-c", str(c), + "--cov-mode", str(cov_mode), + "--cluster-mode", str(cluster_mode), + "--threads", str(threads), + "-v", str(v), + "-s", str(s) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_easy_search( + query_fasta: str, + target_fasta: str, + output_alignment: str, + tmp_dir: str, + s: float = 5.7, + min_seq_id: float = 0.0, + c: float = 0.0, + cov_mode: int = 0, + threads: int = 1, + v: int = 3 +): + """ + One-step search from FASTA files to an alignment result. + """ + if not Path(query_fasta).exists(): + raise FileNotFoundError(f"Query file {query_fasta} not found.") + if not Path(target_fasta).exists(): + raise FileNotFoundError(f"Target file {target_fasta} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "easy-search", + query_fasta, + target_fasta, + output_alignment, + tmp_dir, + "-s", str(s), + "--min-seq-id", str(min_seq_id), + "-c", str(c), + "--cov-mode", str(cov_mode), + "--threads", str(threads), + "-v", str(v) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_easy_cluster( + input_fasta: str, + output_prefix: str, + tmp_dir: str, + min_seq_id: float = 0.0, + c: float = 0.8, + cov_mode: int = 0, + cluster_mode: int = 0, + threads: int = 1, + v: int = 3 +): + """ + One-step clustering from a FASTA file. + """ + if not Path(input_fasta).exists(): + raise FileNotFoundError(f"Input file {input_fasta} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "easy-cluster", + input_fasta, + output_prefix, + tmp_dir, + "--min-seq-id", str(min_seq_id), + "-c", str(c), + "--cov-mode", str(cov_mode), + "--cluster-mode", str(cluster_mode), + "--threads", str(threads), + "-v", str(v) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_easy_linclust( + input_fasta: str, + output_prefix: str, + tmp_dir: str, + min_seq_id: float = 0.0, + c: float = 0.8, + cov_mode: int = 0, + threads: int = 1, + v: int = 3 +): + """ + Linear time clustering for very large datasets. + """ + if not Path(input_fasta).exists(): + raise FileNotFoundError(f"Input file {input_fasta} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "easy-linclust", + input_fasta, + output_prefix, + tmp_dir, + "--min-seq-id", str(min_seq_id), + "-c", str(c), + "--cov-mode", str(cov_mode), + "--threads", str(threads), + "-v", str(v) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_convertalis( + query_db: str, + target_db: str, + result_db: str, + output_file: str, + format_mode: int = 0, + format_output: str = "query,target,pident,alnlen,mismatch,gapopen,qstart,qend,tstart,tend,evalue,bits", + threads: int = 1 +): + """ + Convert alignment results into TSV or other formats. + format_mode: 0: BLAST-TAB, 1: SAM, 2: BLAST-TAB + header, 3: BLAST-XML, 4: BLAST-TAB + query/target seqs. + """ + for db in [query_db, target_db, result_db]: + if not Path(db).exists(): + raise FileNotFoundError(f"Database {db} not found.") + + cmd = [ + "mmseqs", "convertalis", + query_db, + target_db, + result_db, + output_file, + "--format-mode", str(format_mode), + "--format-output", format_output, + "--threads", str(threads) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_createtsv( + input_db: str, + output_tsv: str, + threads: int = 1, + first_seq_id: bool = False +): + """ + Convert a database to a TSV file. + """ + if not Path(input_db).exists(): + raise FileNotFoundError(f"Input database {input_db} not found.") + + cmd = [ + "mmseqs", "createtsv", + input_db, + output_tsv, + "--threads", str(threads), + "--first-seq-id", str(int(first_seq_id)) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_taxonomy( + query_db: str, + target_db: str, + result_db: str, + tmp_dir: str, + tax_db: str, + threads: int = 1, + v: int = 3, + lca_mode: int = 3 +): + """ + Assign taxonomy to sequences using a reference database. + lca_mode: 1: LCA, 2: Top hit, 3: Weighted LCA. + """ + for db in [query_db, target_db, tax_db]: + if not Path(db).exists(): + raise FileNotFoundError(f"Database {db} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "taxonomy", + query_db, + target_db, + result_db, + tmp_dir, + tax_db, + "--threads", str(threads), + "-v", str(v), + "--lca-mode", str(lca_mode) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_align( + query_db: str, + target_db: str, + result_db: str, + output_db: str, + threads: int = 1, + v: int = 3, + a: bool = False, + alignment_mode: int = 3 +): + """ + Align two databases. + a: add backtrace (needed for alignment output). + """ + for db in [query_db, target_db, result_db]: + if not Path(db).exists(): + raise FileNotFoundError(f"Database {db} not found.") + + cmd = [ + "mmseqs", "align", + query_db, + target_db, + result_db, + output_db, + "--threads", str(threads), + "-v", str(v), + "-a", str(int(a)), + "--alignment-mode", str(alignment_mode) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_createindex( + input_db: str, + tmp_dir: str, + threads: int = 1, + v: int = 3, + check_compatible: int = 0 +): + """ + Create an index for a database to speed up searches. + """ + if not Path(input_db).exists(): + raise FileNotFoundError(f"Input database {input_db} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "createindex", + input_db, + tmp_dir, + "--threads", str(threads), + "-v", str(v), + "--check-compatible", str(check_compatible) + ] + + return run_command(cmd) + +@mcp.tool() +def mmseqs_map( + query_db: str, + target_db: str, + result_db: str, + tmp_dir: str, + threads: int = 1, + v: int = 3, + min_seq_id: float = 0.0 +): + """ + Map sequences (fast search for high identity). + """ + for db in [query_db, target_db]: + if not Path(db).exists(): + raise FileNotFoundError(f"Database {db} not found.") + + Path(tmp_dir).mkdir(parents=True, exist_ok=True) + + cmd = [ + "mmseqs", "map", + query_db, + target_db, + result_db, + tmp_dir, + "--threads", str(threads), + "-v", str(v), + "--min-seq-id", str(min_seq_id) + ] + + return run_command(cmd) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4516db1925b0245f20ee4761d4ac4cfc68cb16b1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/mmseqs2_server.py') +SERVER_NAME = 'biosci_mmseqs2' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c072ba4b94d8c08a472c3c3eab5b91d60f66c5fa --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-mmseqs2: + build: . + image: mcp-mmseqs2:latest + container_name: mcp-mmseqs2 + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=mmseqs2 + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4d931e69d4083932b3202a27c380b85a957ad25c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - mmseqs2 + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_mmseqs2/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ad5aff6b96df0a3426fba674be243f74f2fb8145 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_server.py @@ -0,0 +1,490 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +def run_command(cmd: List[str]): + """Helper to run subprocess and handle errors""" + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "status": "error", + "error_message": str(e) + } + +@mcp.tool() +def msstitch_storespectra( + spectra: List[str], + setnames: List[str], + output_db: str, + dbfile: Optional[str] = None, +): + """ + Store mzML spectra data in an SQLite file for lookup. + """ + cmd = ["msstitch", "storespectra", "--spectra"] + spectra + ["--setnames"] + setnames + ["-o", output_db] + if dbfile: + cmd.extend(["--dbfile", dbfile]) + + for s in spectra: + if not Path(s).exists(): + return {"error": f"Spectra file {s} not found"} + + return run_command(cmd) + +@mcp.tool() +def msstitch_storequant( + dbfile: str, + spectra: List[str], + mztol: float = 10.0, + mztoltype: str = "ppm", + rttol: float = 10.0, + dinosaur: Optional[List[str]] = None, + kronik: Optional[List[str]] = None, + isobaric: Optional[List[str]] = None, + apex: bool = False, +): + """ + Store quantification data (Dinosaur, Kronik, or isobaric) in an existing SQLite lookup. + """ + if not Path(dbfile).exists(): + return {"error": f"Database file {dbfile} not found"} + + cmd = ["msstitch", "storequant", "--dbfile", dbfile, "--spectra"] + spectra + cmd.extend(["--mztol", str(mztol), "--mztoltype", mztoltype, "--rttol", str(rttol)]) + + if dinosaur: + cmd.extend(["--dinosaur"] + dinosaur) + if kronik: + cmd.extend(["--kronik"] + kronik) + if isobaric: + cmd.extend(["--isobaric"] + isobaric) + if apex: + cmd.append("--apex") + + return run_command(cmd) + +@mcp.tool() +def msstitch_makedecoy( + fasta: str, + out_fasta: str, + scramble: str = "tryp_rev", + maxshuffle: int = 10, + ignore_target_hits: bool = False, + keep_target: bool = False, +): + """ + Create a decoy database where peptides are reversed or shuffled. + """ + if not Path(fasta).exists(): + return {"error": f"Fasta file {fasta} not found"} + + cmd = ["msstitch", "makedecoy", fasta, "-o", out_fasta, "--scramble", scramble, "--maxshuffle", str(maxshuffle)] + if ignore_target_hits: + cmd.append("--ignore-target-hits") + if keep_target: + cmd.append("--keep-target") + + return run_command(cmd) + +@mcp.tool() +def msstitch_perco2psm( + input_psm: str, + perco: str, + mzid: Optional[str] = None, + filtpsm: float = 0.01, + filtpep: float = 0.01, + output: Optional[str] = None, + qvalitypsms: Optional[str] = None, + qvalitypeps: Optional[str] = None, +): + """ + Add percolator data (svm-score, q-value, PEP) to a PSM table and filter on FDR. + """ + if not Path(input_psm).exists(): + return {"error": f"PSM file {input_psm} not found"} + + cmd = ["msstitch", "perco2psm", "-i", input_psm, "--perco", perco, "--filtpsm", str(filtpsm), "--filtpep", str(filtpep)] + if mzid: + cmd.extend(["--mzid", mzid]) + if output: + cmd.extend(["-o", output]) + if qvalitypsms: + cmd.extend(["--qvalitypsms", qvalitypsms]) + if qvalitypeps: + cmd.extend(["--qvalitypeps", qvalitypeps]) + + return run_command(cmd) + +@mcp.tool() +def msstitch_concat( + input_files: List[str], + output: str, +): + """ + Concatenate multiple PSM tables. + """ + cmd = ["msstitch", "concat", "-i"] + input_files + ["-o", output] + return run_command(cmd) + +@mcp.tool() +def msstitch_split( + input_file: str, + splitcol: str, +): + """ + Split a table based on a specific column (e.g., TD for Target/Decoy or bioset). + """ + if not Path(input_file).exists(): + return {"error": f"Input file {input_file} not found"} + cmd = ["msstitch", "split", "-i", input_file, "--splitcol", splitcol] + return run_command(cmd) + +@mcp.tool() +def msstitch_psmtable( + input_psm: str, + output: str, + fasta: str, + dbfile: str, + addmiscleav: bool = False, + addbioset: bool = False, + ms1quant: bool = False, + isobaric: bool = False, + min_precursor_purity: float = 0.0, + proteingroup: bool = False, + genes: bool = False, + in_memory: bool = False, +): + """ + Refine PSM tables by adding information from SQLite DB and FASTA (quant, protein groups, genes). + """ + if not Path(input_psm).exists(): + return {"error": f"Input PSM file {input_psm} not found"} + + cmd = ["msstitch", "psmtable", "-i", input_psm, "-o", output, "--fasta", fasta, "--dbfile", dbfile] + if addmiscleav: cmd.append("--addmiscleav") + if addbioset: cmd.append("--addbioset") + if ms1quant: cmd.append("--ms1quant") + if isobaric: cmd.append("--isobaric") + if min_precursor_purity > 0: cmd.extend(["--min-precursor-purity", str(min_precursor_purity)]) + if proteingroup: cmd.append("--proteingroup") + if genes: cmd.append("--genes") + if in_memory: cmd.append("--in-memory") + + return run_command(cmd) + +@mcp.tool() +def msstitch_peptides( + input_psm: str, + output: str, + scorecolpattern: str, + modelqvals: bool = False, + ms1quant: bool = False, + isobquantcolpattern: Optional[str] = None, + denompatterns: Optional[List[str]] = None, + mediansweep: bool = False, + logisoquant: bool = False, + median_normalize: bool = False, + medianintensity: bool = False, + minint: float = 0.0, + keep_psms_na_quant: bool = False, + totalproteome: Optional[str] = None, + normalization_factors_table: Optional[str] = None, +): + """ + Create a peptide table from a PSM table, summarizing quantification and scores. + """ + cmd = ["msstitch", "peptides", "-i", input_psm, "-o", output, "--scorecolpattern", scorecolpattern] + if modelqvals: cmd.append("--modelqvals") + if ms1quant: cmd.append("--ms1quant") + if isobquantcolpattern: cmd.extend(["--isobquantcolpattern", isobquantcolpattern]) + if denompatterns: cmd.extend(["--denompatterns"] + denompatterns) + if mediansweep: cmd.append("--mediansweep") + if logisoquant: cmd.append("--logisoquant") + if median_normalize: cmd.append("--median-normalize") + if medianintensity: cmd.append("--medianintensity") + if minint > 0: cmd.extend(["--minint", str(minint)]) + if keep_psms_na_quant: cmd.append("--keep-psms-na-quant") + if totalproteome: cmd.extend(["--totalproteome", totalproteome]) + if normalization_factors_table: cmd.extend(["--normalization-factors-table", normalization_factors_table]) + + return run_command(cmd) + +@mcp.tool() +def msstitch_proteins( + input_peptides: str, + decoyfn: str, + psmtable: str, + output: str, + scorecolpattern: str, + logscore: bool = False, + ms1quant: bool = False, + isobquantcolpattern: Optional[str] = None, + denompatterns: Optional[List[str]] = None, + summarize_average: bool = False, + logisoquant: bool = False, + median_normalize: bool = False, +): + """ + Create a protein table from a peptide table. + """ + cmd = ["msstitch", "proteins", "-i", input_peptides, "--decoyfn", decoyfn, "--psmtable", psmtable, "-o", output, "--scorecolpattern", scorecolpattern] + if logscore: cmd.append("--logscore") + if ms1quant: cmd.append("--ms1quant") + if isobquantcolpattern: cmd.extend(["--isobquantcolpattern", isobquantcolpattern]) + if denompatterns: cmd.extend(["--denompatterns"] + denompatterns) + if summarize_average: cmd.append("--summarize-average") + if logisoquant: cmd.append("--logisoquant") + if median_normalize: cmd.append("--median-normalize") + + return run_command(cmd) + +@mcp.tool() +def msstitch_genes( + input_peptides: str, + decoyfn: str, + psmtable: str, + output: str, + scorecolpattern: str, + logscore: bool = False, + fdrtype: str = "picked", + targetfasta: Optional[str] = None, + decoyfasta: Optional[str] = None, + ms1quant: bool = False, + isobquantcolpattern: Optional[str] = None, + mediansweep: bool = False, + keep_psms_na_quant: bool = False, +): + """ + Create a gene table from a peptide table. + """ + cmd = ["msstitch", "genes", "-i", input_peptides, "--decoyfn", decoyfn, "--psmtable", psmtable, "-o", output, "--scorecolpattern", scorecolpattern] + cmd.extend(["--fdrtype", fdrtype]) + if logscore: cmd.append("--logscore") + if targetfasta: cmd.extend(["--targetfasta", targetfasta]) + if decoyfasta: cmd.extend(["--decoyfasta", decoyfasta]) + if ms1quant: cmd.append("--ms1quant") + if isobquantcolpattern: cmd.extend(["--isobquantcolpattern", isobquantcolpattern]) + if mediansweep: cmd.append("--mediansweep") + if keep_psms_na_quant: cmd.append("--keep-psms-na-quant") + + return run_command(cmd) + +@mcp.tool() +def msstitch_ensg( + input_peptides: str, + decoyfn: str, + psmtable: str, + output: str, + scorecolpattern: str, + logscore: bool = False, + ms1quant: bool = False, + isobquantcolpattern: Optional[str] = None, + medianintensity: bool = False, + median_normalize: bool = False, +): + """ + Create an ENSG table from a peptide table. + """ + cmd = ["msstitch", "ensg", "-i", input_peptides, "--decoyfn", decoyfn, "--psmtable", psmtable, "-o", output, "--scorecolpattern", scorecolpattern] + if logscore: cmd.append("--logscore") + if ms1quant: cmd.append("--ms1quant") + if isobquantcolpattern: cmd.extend(["--isobquantcolpattern", isobquantcolpattern]) + if medianintensity: cmd.append("--medianintensity") + if median_normalize: cmd.append("--median-normalize") + + return run_command(cmd) + +@mcp.tool() +def msstitch_merge( + input_files: List[str], + output: str, + setnames: List[str], + dbfile: str, + fdrcolpattern: str, + mergecutoff: float = 0.01, + ms1quantcolpattern: Optional[str] = None, + isobquantcolpattern: Optional[str] = None, +): + """ + Merge multiple sets of proteins/genes/ENSG into a single output. + """ + cmd = ["msstitch", "merge", "-i"] + input_files + ["-o", output, "--setnames"] + setnames + ["--dbfile", dbfile, "--fdrcolpattern", fdrcolpattern, "--mergecutoff", str(mergecutoff)] + if ms1quantcolpattern: cmd.extend(["--ms1quantcolpattern", ms1quantcolpattern]) + if isobquantcolpattern: cmd.extend(["--isobquantcolpattern", isobquantcolpattern]) + + return run_command(cmd) + +@mcp.tool() +def msstitch_trypsinize( + input_fasta: str, + output: str, + minlen: int = 7, + cutproline: bool = False, + miscleav: int = 0, + nterm_meth_loss: bool = False, + ignore_stop_codons: bool = False, +): + """ + Trypsinize a FASTA file into peptides. + """ + cmd = ["msstitch", "trypsinize", "-i", input_fasta, "-o", output, "--minlen", str(minlen), "--miscleav", str(miscleav)] + if cutproline: cmd.append("--cutproline") + if nterm_meth_loss: cmd.append("--nterm-meth-loss") + if ignore_stop_codons: cmd.append("--ignore-stop-codons") + + return run_command(cmd) + +@mcp.tool() +def msstitch_storeseq( + input_fasta: str, + output_db: str, + cutproline: bool = False, + minlen: int = 7, + miscleav: int = 0, + insourcefrag: bool = False, + nterm_meth_loss: bool = False, + fullprotein: bool = False, + map_accessions: bool = False, +): + """ + Create an SQLite file with tryptic or full protein sequences for filtering. + """ + cmd = ["msstitch", "storeseq", "-i", input_fasta, "-o", output_db, "--minlen", str(minlen)] + if not fullprotein: + cmd.extend(["--miscleav", str(miscleav)]) + if cutproline: cmd.append("--cutproline") + if insourcefrag: cmd.append("--insourcefrag") + if nterm_meth_loss: cmd.append("--nterm-meth-loss") + else: + cmd.append("--fullprotein") + + if map_accessions: cmd.append("--map-accessions") + + return run_command(cmd) + +@mcp.tool() +def msstitch_filterperco( + input_perco: str, + dbfile: str, + output: str, + insourcefrag: int = 0, + deamidate: bool = False, + fullprotein: bool = False, + minlen: Optional[int] = None, +): + """ + Filter a percolator output file using a sequence SQLite database. + """ + cmd = ["msstitch", "filterperco", "-i", input_perco, "--dbfile", dbfile, "-o", output] + if insourcefrag > 0: cmd.extend(["--insourcefrag", str(insourcefrag)]) + if deamidate: cmd.append("--deamidate") + if fullprotein: cmd.append("--fullprotein") + if minlen is not None: cmd.extend(["--minlen", str(minlen)]) + + return run_command(cmd) + +@mcp.tool() +def msstitch_seqfilt( + input_psm: str, + dbfile: str, + output: str, + insourcefrag: int = 0, + deamidate: bool = False, + fullprotein: bool = False, + minlen: Optional[int] = None, +): + """ + Filter a PSM file using a sequence SQLite database. + """ + cmd = ["msstitch", "seqfilt", "-i", input_psm, "--dbfile", dbfile, "-o", output] + if insourcefrag > 0: cmd.extend(["--insourcefrag", str(insourcefrag)]) + if deamidate: cmd.append("--deamidate") + if fullprotein: cmd.append("--fullprotein") + if minlen is not None: cmd.extend(["--minlen", str(minlen)]) + + return run_command(cmd) + +@mcp.tool() +def msstitch_seqmatch( + input_psm: str, + dbfile: str, + matchcolname: str, + output: str, + insourcefrag: int = 0, + deamidate: bool = False, + minlen: Optional[int] = None, + fullprotein: bool = False, + enforce_tryptic: bool = False, +): + """ + Annotate a PSM file with sequence matches from an SQLite database. + """ + cmd = ["msstitch", "seqmatch", "-i", input_psm, "--dbfile", dbfile, "--matchcolname", matchcolname, "-o", output] + if insourcefrag > 0: cmd.extend(["--insourcefrag", str(insourcefrag)]) + if deamidate: cmd.append("--deamidate") + if minlen is not None: cmd.extend(["--minlen", str(minlen)]) + if fullprotein: cmd.append("--fullprotein") + if enforce_tryptic: cmd.append("--enforce-tryptic") + + return run_command(cmd) + +@mcp.tool() +def msstitch_splitperco( + input_perco: str, + protheaders: List[str], +): + """ + Split a percolator file into multiple files based on protein headers. + """ + cmd = ["msstitch", "splitperco", "-i", input_perco, "--protheaders"] + protheaders + return run_command(cmd) + +@mcp.tool() +def msstitch_dedupperco( + input_perco: str, + output: str, +): + """ + Remove duplicate peptides from percolator output. + """ + cmd = ["msstitch", "dedupperco", "-i", input_perco, "-o", output] + return run_command(cmd) + +@mcp.tool() +def msstitch_deduppsms( + input_psm: str, + peptidecolpattern: str, + output: str, +): + """ + Remove duplicate PSMs from a PSM table. + """ + cmd = ["msstitch", "deduppsms", "-i", input_psm, "--peptidecolpattern", peptidecolpattern, "-o", output] + return run_command(cmd) + +@mcp.tool() +def msstitch_isosummarize( + input_psm: str, + featcol: int, + isobquantcolpattern: str, + denompatterns: List[str], + split_multi_entries: bool = False, +): + """ + Create an isobaric ratio table by summarizing PSMs by a specific column. + """ + cmd = ["msstitch", "isosummarize", "-i", input_psm, "--featcol", str(featcol), "--isobquantcolpattern", isobquantcolpattern, "--denompatterns"] + denompatterns + if split_multi_entries: + cmd.append("--split-multi-entries") + + return run_command(cmd) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..459ef884df7a5cc0e3da0fe22af1c4e1564b831e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/msstitch_server.py') +SERVER_NAME = 'biosci_msstitch' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_msstitch/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..1fbfe947a264c574723d5e98f1b1e2e3a1ed0ad7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install ncbi-genome-download via conda (e.g., from bioconda) +RUN conda install -c bioconda ncbi-genome-download -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/ncbi-genome-download_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/ncbi-genome-download_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/ncbi-genome-download_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_server.py new file mode 100644 index 0000000000000000000000000000000000000000..be1bfd023931fb72c2772008a113bd77f116c990 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_server.py @@ -0,0 +1,158 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, Dict, Any, List + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +def tool(): + def decorator(f): + return f + return decorator + +mcp = type("mcp", (), {"tool": tool})() + + +@mcp.tool() +def ncbi_genome_download( + group: str, + section: str = 'refseq', + formats: str = 'genbank', + assembly_levels: Optional[str] = None, + refseq_categories: Optional[str] = None, + genera: Optional[str] = None, + species_taxids: Optional[str] = None, + taxids: Optional[str] = None, + type_materials: Optional[str] = None, + output_folder: Optional[Path] = None, + parallel: int = 1, + fuzzy_genus: bool = False, + human_readable: bool = False, + dry_run: bool = False, + no_cache: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Downloads genome files from the NCBI FTP server based on specified criteria. + + Args: + group: Taxonomic group to download (e.g., 'bacteria', 'viral', 'fungi', or a comma-separated list). 'all' can be used to check all groups. + section: Section of the NCBI FTP site to download from (e.g., 'refseq', 'genbank'). + formats: Comma-separated list of file formats to download (e.g., 'fasta', 'genbank', 'assembly-report'). 'all' downloads all available formats. + assembly_levels: Comma-separated list of assembly levels to download (e.g., 'complete', 'chromosome', 'scaffold', 'contig'). + refseq_categories: Comma-separated list of RefSeq categories to download (e.g., 'reference', 'representative'). + genera: Comma-separated list of genera to download, or a path to a file with one genus per line. + species_taxids: Comma-separated list of NCBI species taxonomy IDs to download, or a path to a file with one ID per line. + taxids: Comma-separated list of NCBI taxonomy IDs to download, or a path to a file with one ID per line. + type_materials: Filter by relation to type material. Comma-separated list of values: 'any', 'all', 'type', 'reference', 'synonym', 'proxytype', 'neotype'. + output_folder: The directory where downloaded files will be stored. If not provided, a temporary directory will be created. + parallel: Number of parallel downloads to run. + fuzzy_genus: Use fuzzy matching for the '--genera' option. + human_readable: Create a human-readable directory structure using symlinks. + dry_run: Show which accessions would be downloaded without actually downloading. + no_cache: Disable the use of cached assembly summary files. + verbose: Increase the verbosity of the output. + + Returns: + A dictionary containing the execution details, including the command, stdout, stderr, and the output directory. + """ + # --- Input Validation --- + if parallel <= 0: + raise ValueError("The 'parallel' parameter must be a positive integer.") + + if type_materials: + allowed_materials = {"any", "all", "type", "reference", "synonym", "proxytype", "neotype"} + materials_list = {item.strip() for item in type_materials.split(',')} + if not materials_list.issubset(allowed_materials): + invalid_materials = materials_list - allowed_materials + raise ValueError(f"Invalid values for 'type_materials': {', '.join(invalid_materials)}. " + f"Allowed values are: {', '.join(allowed_materials)}") + + # --- File Handling --- + if output_folder: + output_dir = Path(output_folder) + output_dir.mkdir(parents=True, exist_ok=True) + temp_dir_manager = None + else: + temp_dir_manager = tempfile.TemporaryDirectory() + output_dir = Path(temp_dir_manager.name) + + # --- Command Construction --- + cmd = ["ncbi-genome-download"] + + if verbose: + cmd.append("-v") + if no_cache: + cmd.append("--no-cache") + if dry_run: + cmd.append("--dry-run") + if human_readable: + cmd.append("--human-readable") + if fuzzy_genus: + cmd.append("--fuzzy-genus") + + # Add options with values + cmd.extend(["--section", section]) + cmd.extend(["--formats", formats]) + cmd.extend(["-o", str(output_dir)]) + + if parallel > 1: + cmd.extend(["--parallel", str(parallel)]) + if assembly_levels: + cmd.extend(["--assembly-levels", assembly_levels]) + if refseq_categories: + cmd.extend(["--refseq-categories", refseq_categories]) + if genera: + cmd.extend(["--genera", genera]) + if species_taxids: + cmd.extend(["--species-taxids", species_taxids]) + if taxids: + cmd.extend(["--taxids", taxids]) + if type_materials: + cmd.extend(["--type-materials", type_materials]) + + # Add positional argument + cmd.append(group) + + command_executed = " ".join(cmd) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + # List the contents of the output directory + # The tool creates subdirectories, so we return the main output directory path. + output_files = [str(p) for p in output_dir.rglob('*')] + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_directory": str(output_dir), + "output_files": output_files, + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'ncbi-genome-download' command not found. Please ensure it is installed and in your PATH.", + "error": "Command not found", + "return_code": -1, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Tool execution failed", + "return_code": e.returncode, + } + finally: + # Clean up the temporary directory if one was created + if temp_dir_manager: + temp_dir_manager.cleanup() diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..da0d87509d663593181510617279bd23569050d8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/ncbi-genome-download_server.py') +SERVER_NAME = 'biosci_ncbi_genome_download' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..aef0ed06bd94c51b01f198bfb2be025208bf5754 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-ncbi-genome-download: + build: . + image: mcp-ncbi-genome-download:latest + container_name: mcp-ncbi-genome-download + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=ncbi-genome-download + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fc4f384fba4b8a032f449169f1f725a87ebd3dfc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - ncbi-genome-download + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-genome-download/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6c574c3c17e3fbaa385c6f6d5c3ac7b792378dcf --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install ncbi-ngs-sdk via conda (e.g., from bioconda) +RUN conda install -c bioconda ncbi-ngs-sdk -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/ncbi-ngs-sdk_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/ncbi-ngs-sdk_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/ncbi-ngs-sdk_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_server.py new file mode 100644 index 0000000000000000000000000000000000000000..905e3661f0a98f45fc2d337dc4c9b0231166e514 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_server.py @@ -0,0 +1,48 @@ +import logging +from typing import List + +# In a real MCP environment, the mcp module would be available. +# For demonstration purposes, a dummy class is defined to mimic the decorator. +class MCP: + def tool(self): + def decorator(f): + return f + return decorator + +mcp = MCP() + +@mcp.tool() +def ngs_sdk_info(): + """ + Provides information about the ncbi-ngs-sdk package. + + The 'ncbi-ngs-sdk' is a Software Development Kit (SDK), not a standalone + command-line tool. It provides libraries and Application Programming Interfaces (APIs) + for C++, Java, and Python to access Next Generation Sequencing (NGS) data from + the NCBI Sequence Read Archive (SRA). + + As it is not an executable with command-line arguments, this function does not + execute any subprocess. It serves as an informational placeholder, confirming the + nature of the package and noting that it has been superseded by and integrated into + the 'sra-tools' suite. For command-line access to SRA data, tools from the + 'sra-tools' package (like fastq-dump, sam-dump) should be used instead. + """ + logging.warning( + "ncbi-ngs-sdk is a library/SDK and not a command-line tool. " + "No command was executed." + ) + + info_message = ( + "The 'ncbi-ngs-sdk' package is a Software Development Kit (SDK) and does not " + "provide a direct command-line executable. It is a collection of libraries " + "used by other tools to access NGS data. The project has been merged into " + "the 'sra-tools' repository. Please use tools from the 'sra-tools' package " + "for command-line operations." + ) + + return { + "command_executed": "N/A (ncbi-ngs-sdk is a library)", + "stdout": info_message, + "stderr": "", + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..faf4d1893677e2a8357264c083ba97079bc363d0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/ncbi-ngs-sdk_server.py') +SERVER_NAME = 'biosci_ncbi_ngs_sdk' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..246ec5a490393f3cf50c15cc7dcdc0b25073e44d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-ncbi-ngs-sdk: + build: . + image: mcp-ncbi-ngs-sdk:latest + container_name: mcp-ncbi-ngs-sdk + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=ncbi-ngs-sdk + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bcb01608dfcc0d0778708e7d07ef3304226407be --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - ncbi-ngs-sdk + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ncbi-ngs-sdk/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..63b3c104360048b9b73d38b4f96f7f9760c6f74a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install novoalign via conda (e.g., from bioconda) +RUN conda install -c bioconda novoalign -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/novoalign_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/novoalign_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/novoalign_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0f8433f989edb6560d90dd5c4814caff2bff78e0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_server.py @@ -0,0 +1,256 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Literal + +# MCP decorator is omitted as per instructions, but would be present in a real implementation. +# @mcp.tool() +def novoalign_index( + index_file: Path, + fasta_files: List[Path], + kmer_length: int = 14, + kmer_step_size: int = 1, +): + """ + Creates a novoalign index from one or more reference FASTA files. + + This is a prerequisite for running the novoalign_align tool. + + Args: + index_file: The path for the output index file. + fasta_files: A list of one or more reference genome FASTA files. + kmer_length: The k-mer length for the index (default: 14). + kmer_step_size: The step size for the k-mer (default: 1). + + Returns: + A dictionary containing the command executed, stdout, stderr, and output file path. + """ + # --- Input Validation --- + if not fasta_files: + raise ValueError("At least one FASTA file must be provided in fasta_files.") + for f in fasta_files: + if not Path(f).exists(): + raise FileNotFoundError(f"Input FASTA file not found: {f}") + if kmer_length <= 0: + raise ValueError("kmer_length must be a positive integer.") + if kmer_step_size <= 0: + raise ValueError("kmer_step_size must be a positive integer.") + + # --- Command Construction --- + cmd = [ + "novoindex", + "-k", str(kmer_length), + "-s", str(kmer_step_size), + str(index_file), + ] + cmd.extend([str(f) for f in fasta_files]) + + command_executed = " ".join(cmd) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": {"index_file": str(index_file)} + } + except FileNotFoundError: + raise RuntimeError("novoindex command not found. Please ensure the novoalign suite is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"novoindex execution failed with exit code {e.returncode}.\n" + f"Command: {command_executed}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}\n" + "Note: The novoalign suite requires a valid license to run. This error may be due to a missing or expired license." + ) + raise RuntimeError(error_message) from e + +# @mcp.tool() +def novoalign_align( + database: Path, + read_files: List[Path], + output_file: Optional[Path] = None, + output_format: Literal["SAM", "BAM", "Native"] = "SAM", + cores: int = 1, + read_group_id: Optional[str] = None, + read_group_library: Optional[str] = None, + read_group_sample: Optional[str] = None, + read_group_platform: Optional[str] = None, + read_group_platform_unit: Optional[str] = None, + read_group_center: Optional[str] = None, + insert_size_mean: Optional[int] = None, + insert_size_stdev: Optional[int] = None, + paired_end_orientation: Literal["FR", "RF", "FF", "RR"] = "FR", + alignment_threshold: Optional[int] = None, + gap_open_penalty: int = 40, + gap_extend_penalty: int = 6, + report_mode: Literal["All", "Random", "None"] = "Random", + report_repeats: Optional[int] = None, + soft_clip: bool = False, + adapter1: Optional[str] = None, + adapter2: Optional[str] = None, + headcrop: int = 0, + tailcrop: int = 0, + quality_trim_threshold: int = 20, + bisulfite_mode: Literal["Off", "F", "R", "Both"] = "Off", + mirna_mode: bool = False, + input_format: Optional[Literal["FA", "FQ", "STDFQ", "ILM1.3", "ILM1.8", "BAM"]] = None, +): + """ + Aligns short reads to a reference genome using novoalign. + + Args: + database: Path to the novoalign index file created by novoalign_index. + read_files: A list of one (single-end) or two (paired-end) read files. + output_file: Path to the output alignment file. If not provided, output is captured. + output_format: The format of the output alignment (SAM, BAM, Native). + cores: Number of CPU cores to use. Multi-threading requires a commercial license. + read_group_id: Read Group ID (ID tag). + read_group_library: Read Group Library (LB tag). + read_group_sample: Read Group Sample (SM tag). + read_group_platform: Read Group Platform (PL tag). + read_group_platform_unit: Read Group Platform Unit (PU tag). + read_group_center: Read Group Center (CN tag). + insert_size_mean: Mean insert size for paired-end reads. Required for PE. + insert_size_stdev: Standard deviation of insert size for paired-end reads. Required for PE. + paired_end_orientation: Orientation of paired-end reads. + alignment_threshold: Alignment score threshold. + gap_open_penalty: Penalty for opening a gap. + gap_extend_penalty: Penalty for extending a gap. + report_mode: Mode for reporting alignments ('All', 'Random', 'None'). + report_repeats: Report repeat alignments up to this many times. + soft_clip: Use soft clipping for alignments. + adapter1: Sequence of the 3' adapter to be trimmed for read 1. + adapter2: Sequence of the 3' adapter to be trimmed for read 2 (if paired-end). + headcrop: Number of bases to crop from the 5' end of reads. + tailcrop: Number of bases to crop from the 3' end of reads. + quality_trim_threshold: Quality score threshold for trimming. + bisulfite_mode: Enable bisulfite alignment mode. + mirna_mode: Enable miRNA alignment mode. + input_format: Specify the format of the input read files. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output file path. + """ + # --- Input Validation --- + if not database.exists(): + raise FileNotFoundError(f"Database file not found: {database}") + if not read_files: + raise ValueError("At least one read file must be provided.") + for f in read_files: + if not Path(f).exists(): + raise FileNotFoundError(f"Read file not found: {f}") + if len(read_files) > 2: + raise ValueError("A maximum of two read files (for paired-end) is supported.") + + is_paired_end = len(read_files) == 2 + pe_params_provided = [p is not None for p in [insert_size_mean, insert_size_stdev]] + if any(pe_params_provided) and not is_paired_end: + raise ValueError("Insert size parameters can only be used with paired-end reads (2 read files).") + if is_paired_end and not all(pe_params_provided): + raise ValueError("For paired-end reads, both insert_size_mean and insert_size_stdev must be provided.") + + if cores < 1: + raise ValueError("Number of cores must be at least 1.") + if headcrop < 0 or tailcrop < 0 or quality_trim_threshold < 0: + raise ValueError("Trimming and crop values cannot be negative.") + + # --- Command Construction --- + cmd = [ + "novoalign", + "-d", str(database), + "-f", *[str(f) for f in read_files], + "-o", output_format, + "-c", str(cores), + "-g", str(gap_open_penalty), + "-x", str(gap_extend_penalty), + "-r", report_mode, + "-h", str(headcrop), + "-l", str(tailcrop), + "-q", str(quality_trim_threshold), + ] + + if read_group_id: cmd.extend(["--rgid", read_group_id]) + if read_group_library: cmd.extend(["--rglb", read_group_library]) + if read_group_sample: cmd.extend(["--rgsm", read_group_sample]) + if read_group_platform: cmd.extend(["--rgpl", read_group_platform]) + if read_group_platform_unit: cmd.extend(["--rgpu", read_group_platform_unit]) + if read_group_center: cmd.extend(["--rgcn", read_group_center]) + + if is_paired_end and all(pe_params_provided): + cmd.extend(["-i", f"PE{insert_size_mean},{insert_size_stdev},{paired_end_orientation}"]) + + if alignment_threshold is not None: + cmd.extend(["-t", str(alignment_threshold)]) + if report_repeats is not None: + cmd.extend(["-R", str(report_repeats)]) + if soft_clip: + cmd.extend(["-s", "4"]) + if adapter1: + adapter_args = ["-a", adapter1] + if adapter2: + adapter_args.append(adapter2) + cmd.extend(adapter_args) + if bisulfite_mode != "Off": + cmd.extend(["-b", bisulfite_mode]) + if mirna_mode: + cmd.append("-m") + if input_format: + cmd.extend(["-F", input_format]) + + command_executed = " ".join(cmd) + output_files_dict = {} + + # --- Subprocess Execution --- + try: + if output_file: + output_files_dict["alignment_output"] = str(output_file) + with open(output_file, "w") as f_out: + result = subprocess.run( + cmd, + stdout=f_out, + capture_output=True, + text=True, + check=True + ) + stdout_content = f"Output successfully written to {output_file}" + else: + # Use a temporary file for large outputs if no file is specified + with tempfile.NamedTemporaryFile(mode="w+", delete=False, suffix=f".{output_format.lower()}") as tmp_out: + result = subprocess.run( + cmd, + stdout=tmp_out, + capture_output=True, + text=True, + check=True + ) + tmp_out.seek(0) + # For simplicity, we don't read the large output back into memory + stdout_content = f"Output written to temporary file: {tmp_out.name}" + output_files_dict["alignment_output"] = tmp_out.name + + return { + "command_executed": command_executed, + "stdout": stdout_content, + "stderr": result.stderr, + "output_files": output_files_dict + } + except FileNotFoundError: + raise RuntimeError("novoalign command not found. Please ensure the novoalign suite is installed and in your PATH.") + except subprocess.CalledProcessError as e: + error_message = ( + f"novoalign execution failed with exit code {e.returncode}.\n" + f"Command: {command_executed}\n" + f"Stdout: {e.stdout}\n" + f"Stderr: {e.stderr}\n" + "Note: The novoalign suite requires a valid license to run. This error may be due to a missing or expired license." + ) + raise RuntimeError(error_message) from e \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3bfcebe3f17f2363ddb2cefe7e05abc3cfea82b8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/novoalign_server.py') +SERVER_NAME = 'biosci_novoalign' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..13ad5516e1557a4a01f2606b349282e00c5d0059 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-novoalign: + build: . + image: mcp-novoalign:latest + container_name: mcp-novoalign + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=novoalign + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..18056ee95d4f023b9eb1e222f3b28b47c3126f43 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - novoalign + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_novoalign/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..fc554a21a81111e5096f6b4981acd25a0c8438f8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install ont-fast5-api via conda (e.g., from bioconda) +RUN conda install -c bioconda ont-fast5-api -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/ont-fast5-api_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/ont-fast5-api_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/ont-fast5-api_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_server.py new file mode 100644 index 0000000000000000000000000000000000000000..720126062eec81aadf57c825f4fc294d77427f23 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_server.py @@ -0,0 +1,368 @@ +import subprocess +import os +from pathlib import Path +from typing import List, Optional, Dict, Any + +# Note: mcp is not imported as per instructions. +# The @mcp.tool decorator is used conceptually. + +class ToolExecutionError(Exception): + """Custom exception for tool execution errors.""" + def __init__(self, message: str, command: str, stdout: str, stderr: str, returncode: int): + super().__init__(message) + self.command = command + self.stdout = stdout + self.stderr = stderr + self.returncode = returncode + + def to_dict(self) -> Dict[str, Any]: + return { + "message": str(self), + "command_executed": self.command, + "stdout": self.stdout, + "stderr": self.stderr, + "returncode": self.returncode, + } + +def _run_command(cmd: List[str]) -> Dict[str, Any]: + """ + Helper function to run a shell command and handle its output. + """ + command_str = " ".join(map(str, cmd)) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + env=os.environ # Inherit environment variables + ) + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], # Specific output files will be added by individual tools + } + except subprocess.CalledProcessError as e: + raise ToolExecutionError( + f"Command failed with exit code {e.returncode}", + command_str, + e.stdout, + e.stderr, + e.returncode + ) + except FileNotFoundError: + raise ToolExecutionError( + f"Tool '{cmd[0]}' not found. Please ensure ont-fast5-api is installed and in your PATH.", + command_str, + "", + f"Error: Command '{cmd[0]}' not found.", + 127 + ) + +@mcp.tool() +def single_to_multi_fast5( + input_path: Path, + save_path: Path, + threads: int = 1, + filename_base: str = "batch", + batch_size: int = 4000, + recursive: bool = False, +) -> Dict[str, Any]: + """ + Converts folders containing single_read_fast5 files into multi_read_fast5_files. + + Args: + input_path: Path to the folder containing single_read_fast5 files. + save_path: Path to the folder where multi_read fast5 files will be output. + threads: Number of CPU threads to use. Must be a positive integer. + filename_base: Base name for new multi_read files (e.g., "batch" yields batch_0.fast5). + batch_size: Number of single_reads to include in each multi_read file. Must be a positive integer. + recursive: If True, recursively search sub-directories for single_read files. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + if not input_path.is_dir(): + raise ValueError(f"Input path '{input_path}' must be an existing directory.") + if not input_path.exists(): + raise ValueError(f"Input path '{input_path}' does not exist.") + + save_path.mkdir(parents=True, exist_ok=True) + if not save_path.is_dir(): + raise ValueError(f"Save path '{save_path}' could not be created or is not a directory.") + + if threads < 1: + raise ValueError("Number of threads must be a positive integer.") + if batch_size < 1: + raise ValueError("Batch size must be a positive integer.") + if not filename_base: + raise ValueError("Filename base cannot be empty.") + + cmd = [ + "single_to_multi_fast5", + "-i", str(input_path), + "-s", str(save_path), + "-t", str(threads), + "-f", filename_base, + "-n", str(batch_size), + ] + if recursive: + cmd.append("--recursive") + + try: + result = _run_command(cmd) + result["output_files"].append(str(save_path)) + return result + except ToolExecutionError as e: + return e.to_dict() + +@mcp.tool() +def multi_to_single_fast5( + input_path: Path, + save_path: Path, + threads: int = 1, + recursive: bool = False, +) -> Dict[str, Any]: + """ + Converts folders containing multi_read_fast5 files into single_read_fast5 files. + + Args: + input_path: Path to the folder containing multi_read_fast5 files. + save_path: Path to the folder where single_read fast5 files will be output. + threads: Number of CPU threads to use. Must be a positive integer. + recursive: If True, recursively search sub-directories for multi_read files. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + if not input_path.is_dir(): + raise ValueError(f"Input path '{input_path}' must be an existing directory.") + if not input_path.exists(): + raise ValueError(f"Input path '{input_path}' does not exist.") + + save_path.mkdir(parents=True, exist_ok=True) + if not save_path.is_dir(): + raise ValueError(f"Save path '{save_path}' could not be created or is not a directory.") + + if threads < 1: + raise ValueError("Number of threads must be a positive integer.") + + cmd = [ + "multi_to_single_fast5", + "-i", str(input_path), + "-s", str(save_path), + "-t", str(threads), + ] + if recursive: + cmd.append("--recursive") + + try: + result = _run_command(cmd) + result["output_files"].append(str(save_path)) + return result + except ToolExecutionError as e: + return e.to_dict() + +@mcp.tool() +def fast5_subset( + input_path: Path, + save_path: Path, + read_id_list: Path, + filename_base: str = "batch", + batch_size: int = 4000, + recursive: bool = False, +) -> Dict[str, Any]: + """ + Extracts reads from multi_read_fast5_file(s) based on a list of read_ids. + + Args: + input_path: Path to a folder containing multi_read_fast5 files or an individual multi_read_fast5 file. + save_path: Path to the folder where multi_read fast5 files will be output. + read_id_list: Path to a file containing a list of read_ids (one per line) or a sequencing_summary.txt file. + filename_base: Base name for new multi_read files (e.g., "batch" yields batch_0.fast5). + batch_size: Number of single_reads to include in each multi_read file. Must be a positive integer. + recursive: If True, recursively search sub-directories for multi_read files. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + if not input_path.exists(): + raise ValueError(f"Input path '{input_path}' does not exist.") + if not (input_path.is_dir() or input_path.is_file()): + raise ValueError(f"Input path '{input_path}' must be an existing file or directory.") + + save_path.mkdir(parents=True, exist_ok=True) + if not save_path.is_dir(): + raise ValueError(f"Save path '{save_path}' could not be created or is not a directory.") + + if not read_id_list.is_file(): + raise ValueError(f"Read ID list file '{read_id_list}' does not exist or is not a file.") + + if batch_size < 1: + raise ValueError("Batch size must be a positive integer.") + if not filename_base: + raise ValueError("Filename base cannot be empty.") + + cmd = [ + "fast5_subset", + "-i", str(input_path), + "-s", str(save_path), + "-l", str(read_id_list), + "-f", filename_base, + "-n", str(batch_size), + ] + if recursive: + cmd.append("--recursive") + + try: + result = _run_command(cmd) + result["output_files"].append(str(save_path)) + return result + except ToolExecutionError as e: + return e.to_dict() + +@mcp.tool() +def demux_fast5( + input_path: Path, + save_path: Path, + summary_file: Path, + read_id_column: str = "read_id", + demultiplex_column: str = "barcoding_arrangement", + filename_base: str = "batch", + batch_size: int = 4000, + threads: int = 1, + recursive: bool = False, + ignore_symlinks: bool = False, + compression: Optional[str] = None, +) -> Dict[str, Any]: + """ + Demultiplexes reads from multi_read_fast5_file(s) into multiple directories + based on column value in a summary file. + + Args: + input_path: Path to a Fast5 file or directory of Fast5 files. + save_path: Directory to output MultiRead subsets. + summary_file: TSV file containing read_id and demultiplex columns. + read_id_column: Name of the read_id column in the summary file. + demultiplex_column: Name of the column for demultiplexing in the summary file. + filename_base: Root of output filename (e.g., 'batch' -> 'batch_0.fast5'). + batch_size: Number of reads per multi-read file. Must be a positive integer. + threads: Maximum number of processes to use. Must be a positive integer. + recursive: Flag to search recursively through input directory for MultiRead fast5 files. + ignore_symlinks: Ignore symlinks when searching recursively for fast5 files. + compression: Target output compression type. Valid options: 'vbz', 'vbz_legacy_v0', 'gzip', None. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + if not input_path.exists(): + raise ValueError(f"Input path '{input_path}' does not exist.") + if not (input_path.is_dir() or input_path.is_file()): + raise ValueError(f"Input path '{input_path}' must be an existing file or directory.") + + save_path.mkdir(parents=True, exist_ok=True) + if not save_path.is_dir(): + raise ValueError(f"Save path '{save_path}' could not be created or is not a directory.") + + if not summary_file.is_file(): + raise ValueError(f"Summary file '{summary_file}' does not exist or is not a file.") + + if batch_size < 1: + raise ValueError("Batch size must be a positive integer.") + if threads < 1: + raise ValueError("Number of threads must be a positive integer.") + if not filename_base: + raise ValueError("Filename base cannot be empty.") + + valid_compressions = {"vbz", "vbz_legacy_v0", "gzip", None} + if compression not in valid_compressions: + raise ValueError(f"Invalid compression type: '{compression}'. Must be one of {valid_compressions}.") + + cmd = [ + "demux_fast5", + "-i", str(input_path), + "-s", str(save_path), + "-l", str(summary_file), + "--read_id_column", read_id_column, + "--demultiplex_column", demultiplex_column, + "-f", filename_base, + "-n", str(batch_size), + "-t", str(threads), + ] + if recursive: + cmd.append("-r") + if ignore_symlinks: + cmd.append("--ignore_symlinks") + if compression is not None: + cmd.extend(["-c", compression]) + + try: + result = _run_command(cmd) + result["output_files"].append(str(save_path)) + return result + except ToolExecutionError as e: + return e.to_dict() + +@mcp.tool() +def compress_fast5( + input_path: Path, + save_path: Path, + compression: str, + threads: int = 1, + recursive: bool = False, + sanitize: bool = False, +) -> Dict[str, Any]: + """ + Copies and converts raw data between vbz and gzip compression formats. + + Args: + input_path: Path to the folder containing multi_read_fast5 files. + save_path: Path to the folder where compressed fast5 files will be output. + compression: Target compression format. Valid options: 'vbz', 'gzip'. + threads: Number of CPU threads to use. Must be a positive integer. + recursive: If True, recursively search sub-directories for fast5 files. + sanitize: If True, remove optional groups (such as basecalling and modified base information). + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # Input validation + if not input_path.is_dir(): + raise ValueError(f"Input path '{input_path}' must be an existing directory.") + if not input_path.exists(): + raise ValueError(f"Input path '{input_path}' does not exist.") + + save_path.mkdir(parents=True, exist_ok=True) + if not save_path.is_dir(): + raise ValueError(f"Save path '{save_path}' could not be created or is not a directory.") + + valid_compressions = {"vbz", "gzip"} + if compression not in valid_compressions: + raise ValueError(f"Invalid compression type: '{compression}'. Must be one of {valid_compressions}.") + + if threads < 1: + raise ValueError("Number of threads must be a positive integer.") + + cmd = [ + "compress_fast5", + "-i", str(input_path), + "-s", str(save_path), + "-c", compression, + "-t", str(threads), + ] + if recursive: + cmd.append("--recursive") + if sanitize: + cmd.append("--sanitize") + + try: + result = _run_command(cmd) + result["output_files"].append(str(save_path)) + return result + except ToolExecutionError as e: + return e.to_dict() \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..56578ea2eb91d817c05202490acfcd0fd8d97386 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/ont-fast5-api_server.py') +SERVER_NAME = 'biosci_ont_fast5_api' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..375dc45cd36f07032b35279ad8bdef5c4646f79f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-ont-fast5-api: + build: . + image: mcp-ont-fast5-api:latest + container_name: mcp-ont-fast5-api + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=ont-fast5-api + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..52252e03b41517368b751ef476547fc397f6ff08 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - ont-fast5-api + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ont-fast5-api/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..faff7c7e52b3d033c8717c00bf56f0a912804eeb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install pairix via conda (e.g., from bioconda) +RUN conda install -c bioconda pairix -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/pairix_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/pairix_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/pairix_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5ccadeb272b1a60267f316fc7fe6b7e4d2dcc3f8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_server.py @@ -0,0 +1,377 @@ +import subprocess +import logging +from pathlib import Path +from typing import Optional, List + +# NOTE: The @mcp.tool decorator is a placeholder for the Model Context Protocol (MCP) framework. +# This code is designed to be used within an MCP server environment. +# To run this code standalone, you would need to define or remove the decorator. + +# Configure logging +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') + +class mcp: + """A mock mcp class for standalone validation.""" + @staticmethod + def tool(): + def decorator(func): + return func + return decorator + +@mcp.tool() +def pairix_index( + input_file: Path, + preset: Optional[str] = None, + seq1: Optional[int] = None, + beg1: Optional[int] = None, + end1: Optional[int] = None, + seq2: Optional[int] = None, + beg2: Optional[int] = None, + end2: Optional[int] = None, + comment_char: Optional[str] = None, + delimiter: Optional[str] = None, + force: bool = False, + tabix_mode: bool = False, + uncompressed: bool = False, + auto_offset: bool = False, +): + """ + Creates a .px2 index for a bgzipped pairs file using pairix. + + Args: + input_file: Path to the input pairs file (usually bgzipped). + preset: Preset for column numbers (gff, pairs, sam, vcf, bed, psltbl). + seq1: Sequence name column for the first mate (1-based). + beg1: Start column for the first mate (1-based). + end1: End column for the first mate (1-based). + seq2: Sequence name column for the second mate (1-based). + beg2: Start column for the second mate (1-based). + end2: End column for the second mate (1-based). + comment_char: Skip lines starting with this character. + delimiter: The delimiter character (default is tab). + force: Overwrite the index file if it exists. + tabix_mode: Use tabix mode (no second mate). + uncompressed: Input file is uncompressed. + auto_offset: Automatically detect column numbers for pairs format. + """ + # Input validation + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + VALID_PRESETS = {"gff", "pairs", "sam", "vcf", "bed", "psltbl"} + if preset and preset not in VALID_PRESETS: + raise ValueError(f"Invalid preset '{preset}'. Must be one of {VALID_PRESETS}") + + if comment_char and len(comment_char) != 1: + raise ValueError("comment_char must be a single character.") + + if delimiter and len(delimiter) != 1: + raise ValueError("delimiter must be a single character.") + + cmd = ["pairix"] + + if preset: + cmd.extend(["-p", preset]) + if seq1 is not None: + cmd.extend(["-s", str(seq1)]) + if beg1 is not None: + cmd.extend(["-b", str(beg1)]) + if end1 is not None: + cmd.extend(["-e", str(end1)]) + if seq2 is not None: + cmd.extend(["-S", str(seq2)]) + if beg2 is not None: + cmd.extend(["-B", str(beg2)]) + if end2 is not None: + cmd.extend(["-E", str(end2)]) + if comment_char: + cmd.extend(["-c", comment_char]) + if delimiter: + cmd.extend(["-d", delimiter]) + if force: + cmd.append("-f") + if tabix_mode: + cmd.append("-T") + if uncompressed: + cmd.append("-u") + if auto_offset: + cmd.append("-a") + + cmd.append(str(input_file)) + + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + output_index_file = Path(f"{input_file}.px2") + if not output_index_file.is_file(): + raise FileNotFoundError(f"Index file was not created: {output_index_file}. Stderr: {result.stderr}") + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_index_file)] + } + except FileNotFoundError: + raise RuntimeError("pairix command not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"pairix indexing failed with return code {e.returncode}: {e.stderr}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Pairix indexing failed.", + "return_code": e.returncode + } + +@mcp.tool() +def pairix_query( + indexed_file: Path, + region1: Optional[str] = None, + region2: Optional[str] = None, + query_file: Optional[Path] = None, + uncompressed: bool = False, +): + """ + Queries a pairix-indexed file for specific genomic regions. + + Args: + indexed_file: Path to the indexed pairs file. + region1: The first query region (e.g., "chr1:100-200"). + region2: The second query region. + query_file: A file containing query regions, one per line. + uncompressed: Input file is uncompressed. + """ + # Input validation + if not indexed_file.is_file(): + raise FileNotFoundError(f"Indexed file not found: {indexed_file}") + + index_file = Path(f"{indexed_file}.px2") + if not index_file.is_file(): + raise FileNotFoundError(f"Index file not found for {indexed_file}. Expected at {index_file}") + + if not region1 and not query_file: + raise ValueError("Either 'region1' or 'query_file' must be provided for querying.") + + if region1 and query_file: + raise ValueError("'region1' and 'query_file' are mutually exclusive.") + + if query_file and not query_file.is_file(): + raise FileNotFoundError(f"Query file not found: {query_file}") + + cmd = ["pairix"] + if uncompressed: + cmd.append("-u") + + cmd.append(str(indexed_file)) + + if query_file: + cmd.extend(["-q", str(query_file)]) + elif region1: + cmd.append(region1) + if region2: + cmd.append(region2) + + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except FileNotFoundError: + raise RuntimeError("pairix command not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"pairix query failed with return code {e.returncode}: {e.stderr}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Pairix query failed.", + "return_code": e.returncode + } + +@mcp.tool() +def pairix_merge( + input_files: List[Path], + output_file: Path, + threads: int = 1, + print_merge_log: bool = False, +): + """ + Merges multiple bgzipped and pairix-indexed files. + + Args: + input_files: A list of paths to the input files to merge. + output_file: Path to the merged output file. + threads: Number of threads for merging. + print_merge_log: Print a log of merged lines during merging to stderr. + """ + # Input validation + if not input_files: + raise ValueError("At least one input file must be provided for merging.") + + for f in input_files: + if not f.is_file(): + raise FileNotFoundError(f"Input file not found: {f}") + + if threads < 1: + raise ValueError("Number of threads must be at least 1.") + + output_file.parent.mkdir(parents=True, exist_ok=True) + + cmd = ["pairix"] + + if print_merge_log: + cmd.append("-M") + + if threads > 1: + cmd.extend(["-t", str(threads)]) + + file_list_str = ",".join(map(str, input_files)) + cmd.extend(["-m", file_list_str]) + + command_executed = " ".join(cmd) + f" > {output_file}" + logging.info(f"Executing command: {command_executed}") + + try: + with open(output_file, "w") as f_out: + result = subprocess.run( + cmd, + stdout=f_out, + stderr=subprocess.PIPE, + text=True, + check=True + ) + + return { + "command_executed": command_executed, + "stdout": f"Output successfully written to {output_file}", + "stderr": result.stderr, + "output_files": [str(output_file)] + } + except FileNotFoundError: + raise RuntimeError("pairix command not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"pairix merge failed with return code {e.returncode}: {e.stderr}") + return { + "command_executed": command_executed, + "stdout": e.stdout or "", + "stderr": e.stderr, + "error": "Pairix merge failed.", + "return_code": e.returncode + } + +@mcp.tool() +def pairix_list_chroms( + indexed_file: Path, +): + """ + Lists chromosome names from a pairix index file. + + Args: + indexed_file: Path to the indexed pairs file. + """ + # Input validation + if not indexed_file.is_file(): + raise FileNotFoundError(f"Indexed file not found: {indexed_file}") + + index_file = Path(f"{indexed_file}.px2") + if not index_file.is_file(): + raise FileNotFoundError(f"Index file not found for {indexed_file}. Expected at {index_file}") + + cmd = ["pairix", "-l", str(indexed_file)] + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except FileNotFoundError: + raise RuntimeError("pairix command not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"pairix list-chroms failed with return code {e.returncode}: {e.stderr}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Pairix list-chroms failed.", + "return_code": e.returncode + } + +@mcp.tool() +def pairix_line_count( + indexed_file: Path, +): + """ + Prints the number of pairs in a pairix-indexed file. + + Args: + indexed_file: Path to the indexed pairs file. + """ + # Input validation + if not indexed_file.is_file(): + raise FileNotFoundError(f"Indexed file not found: {indexed_file}") + + index_file = Path(f"{indexed_file}.px2") + if not index_file.is_file(): + raise FileNotFoundError(f"Index file not found for {indexed_file}. Expected at {index_file}") + + cmd = ["pairix", "-n", str(indexed_file)] + command_executed = " ".join(cmd) + logging.info(f"Executing command: {command_executed}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except FileNotFoundError: + raise RuntimeError("pairix command not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + logging.error(f"pairix line-count failed with return code {e.returncode}: {e.stderr}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Pairix line-count failed.", + "return_code": e.returncode + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3c356cc9bb48e335213a088da98dfc437568b3bb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/pairix_server.py') +SERVER_NAME = 'biosci_pairix' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..7f0a905a9bda6f5e81efd5c35dd3accced41c2db --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-pairix: + build: . + image: mcp-pairix:latest + container_name: mcp-pairix + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=pairix + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee5161e1a13a57aff2565e457aa05a89b70ccf2f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - pairix + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pairix/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b1162bb7feb6661ab228d212a8843d21b6cd63f6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-bio-asn1-entrezgene: + build: . + image: mcp-perl-bio-asn1-entrezgene:latest + container_name: mcp-perl-bio-asn1-entrezgene + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-bio-asn1-entrezgene + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ae50b3b95a7f05a0b5956447212b343c13acbe90 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-asn1-entrezgene/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-bio-asn1-entrezgene + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7065393702d321f29c3038fd11f14c5df445316e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-bio-tools-run-alignment-tcoffee via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-bio-tools-run-alignment-tcoffee -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-bio-tools-run-alignment-tcoffee_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-bio-tools-run-alignment-tcoffee_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-bio-tools-run-alignment-tcoffee_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/__pycache__/perl-bio-tools-run-alignment-tcoffee_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/__pycache__/perl-bio-tools-run-alignment-tcoffee_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c2704ad586b73ee79db9b85c0ddc33cc0945128 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/__pycache__/perl-bio-tools-run-alignment-tcoffee_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1b144977b9f2926fd48b0d6536f95a71525f41ff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_server.py @@ -0,0 +1,227 @@ +import logging +import subprocess +from pathlib import Path +from typing import List, Literal, Optional + +# It is assumed that the mcp package is available in the execution environment. +# from mcp import mcp + +# Mock mcp decorator for standalone development and testing. +# In a real MCP environment, the 'from mcp import mcp' line would be used. +class mcp: + @staticmethod + def tool(): + def decorator(f): + return f + return decorator + +log = logging.getLogger(__name__) + +@mcp.tool() +def run_tcoffee( + in_file: Path, + output_dir: Path, + output_filename: Optional[str] = None, + run_name: Optional[str] = None, + outorder: Optional[Literal["input", "aligned"]] = None, + output_format: Optional[List[str]] = None, + mode: Optional[str] = None, + method: Optional[str] = None, + seq_type: Literal["protein", "dna", "auto"] = "auto", + n_core: int = 1, + quiet: bool = True, + param_file: Optional[Path] = None, + matrix_file: Optional[Path] = None, + gapopen: Optional[int] = None, + gapext: Optional[int] = None, + weight: Optional[str] = None, + usetree: Optional[Path] = None, + template_file: Optional[Path] = None, + pdb_dir: Optional[Path] = None, + blast_server: Optional[str] = None, + cache_dir: Optional[Path] = None, + no_cache: bool = False, + max_n_seq: Optional[int] = None, + max_len: Optional[int] = None, + out_lib_filename: Optional[str] = None, + in_lib: Optional[Path] = None, + other_pg: Optional[str] = None, +) -> dict: + """ + Runs the T-Coffee multiple sequence alignment tool. + + This tool serves as a wrapper for the 't_coffee' command-line program. + It requires 't_coffee' to be installed and accessible in the system's PATH. + All output files generated by T-Coffee will be placed in the specified output directory. + + Args: + in_file: Path to the input sequence file (e.g., in FASTA format). + output_dir: Path to the directory where all output files will be stored. + output_filename: Name for the main output alignment file. If not provided, T-Coffee determines the name. + run_name: Base name for all output files generated by T-Coffee. + outorder: Order of sequences in the output alignment ('input' or 'aligned'). + output_format: A list of desired output formats (e.g., ['clustalw', 'msf']). + mode: T-Coffee alignment mode (e.g., 'regular', 'expresso', 'mcoffee'). + method: Specific alignment method to use (e.g., 't_coffee_msa'). + seq_type: The type of sequences being aligned ('protein', 'dna', or 'auto' for detection). + n_core: Number of CPU cores to use for the alignment. + quiet: Suppress progress messages and other non-essential output from T-Coffee. + param_file: Path to a T-Coffee parameter file. + matrix_file: Path to a custom substitution matrix file. + gapopen: Gap opening penalty. + gapext: Gap extension penalty. + weight: Sequence weighting method. + usetree: Path to a user-provided guide tree file. + template_file: Path to a template file for structural alignments (e.g., in Expresso mode). + pdb_dir: Path to a directory containing PDB files for structural alignments. + blast_server: BLAST server to use for fetching sequences or templates. + cache_dir: Path to a directory for caching T-Coffee results. + no_cache: If True, disables the use of the cache. + max_n_seq: Maximum number of sequences to include in the alignment. + max_len: Maximum length of sequences to include. + out_lib_filename: Filename for the output library file. + in_lib: Path to a pre-computed library file to use as input. + other_pg: Command for an alternative alignment program to be used by T-Coffee. + + Returns: + A dictionary containing the execution details and results: + - command_executed: The full command line that was run. + - stdout: The standard output from T-Coffee. + - stderr: The standard error from T-Coffee. + - output_files: A list of absolute paths to all files generated in the output directory. + - error: (Optional) An error message if the execution failed. + """ + # 1. Input Validation + if not in_file.is_file(): + raise FileNotFoundError(f"Input sequence file not found: {in_file}") + if n_core <= 0: + raise ValueError("n_core must be a positive integer.") + + # Validate optional input file paths + optional_paths = { + "param_file": param_file, + "matrix_file": matrix_file, + "usetree": usetree, + "template_file": template_file, + "in_lib": in_lib, + } + for name, path in optional_paths.items(): + if path and not path.is_file(): + raise FileNotFoundError(f"Optional input file for '{name}' not found: {path}") + + optional_dirs = {"pdb_dir": pdb_dir, "cache_dir": cache_dir} + for name, path in optional_dirs.items(): + if path and not path.is_dir(): + raise NotADirectoryError(f"Optional directory for '{name}' not found: {path}") + + # 2. Prepare output directory + output_dir.mkdir(parents=True, exist_ok=True) + + # 3. Build command + cmd = ["t_coffee"] + + # Since we change the working directory, all input paths must be absolute + cmd.extend(["-in", str(in_file.resolve())]) + + if output_filename: + cmd.extend(["-outfile", output_filename]) + if run_name: + cmd.extend(["-run_name", run_name]) + if outorder: + cmd.extend(["-outorder", outorder]) + if output_format: + for fmt in output_format: + cmd.extend(["-output", fmt]) + if mode: + cmd.extend(["-mode", mode]) + if method: + cmd.extend(["-method", method]) + if seq_type in ["protein", "dna"]: + cmd.append(f"-{seq_type}") + + cmd.extend(["-n_core", str(n_core)]) + + if quiet: + cmd.append("-quiet") + if no_cache: + cmd.append("-no_cache") + + # Add optional file/directory paths + if param_file: + cmd.extend(["-param", str(param_file.resolve())]) + if matrix_file: + cmd.extend(["-matrix", str(matrix_file.resolve())]) + if usetree: + cmd.extend(["-usetree", str(usetree.resolve())]) + if template_file: + cmd.extend(["-template_file", str(template_file.resolve())]) + if pdb_dir: + cmd.extend(["-pdb", str(pdb_dir.resolve())]) + if cache_dir: + cmd.extend(["-cache", str(cache_dir.resolve())]) + if in_lib: + cmd.extend(["-in_lib", str(in_lib.resolve())]) + + # Add other optional parameters + if gapopen is not None: + cmd.extend(["-gapopen", str(gapopen)]) + if gapext is not None: + cmd.extend(["-gapext", str(gapext)]) + if weight: + cmd.extend(["-weight", weight]) + if blast_server: + cmd.extend(["-blast_server", blast_server]) + if max_n_seq is not None: + cmd.extend(["-max_n_seq", str(max_n_seq)]) + if max_len is not None: + cmd.extend(["-max_len", str(max_len)]) + if out_lib_filename: + cmd.extend(["-out_lib", out_lib_filename]) + if other_pg: + cmd.extend(["-other_pg", other_pg]) + + command_executed = " ".join(cmd) + log.info(f"Executing command: {command_executed}") + + # 4. Execute command + try: + process = subprocess.run( + cmd, + cwd=str(output_dir), + check=True, + capture_output=True, + text=True, + ) + except FileNotFoundError: + error_msg = "t_coffee executable not found. Please ensure it is installed and in your PATH." + log.error(error_msg) + return { + "command_executed": command_executed, + "stdout": "", + "stderr": error_msg, + "output_files": [], + "error": "Executable not found", + } + except subprocess.CalledProcessError as e: + log.error(f"T-Coffee execution failed with return code {e.returncode}") + log.error(f"Stderr: {e.stderr}") + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": "T-Coffee process failed", + } + + # 5. Collect output files + output_files = [ + str(p.resolve()) for p in output_dir.glob("**/*") if p.is_file() + ] + + # 6. Return structured result + return { + "command_executed": command_executed, + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..18ae24676cd94cf79641de5d8bddb7a6fa612a2e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/perl-bio-tools-run-alignment-tcoffee_server.py') +SERVER_NAME = 'biosci_perl_bio_tools_run_alignment_tcoffee' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..41b1ae1a00d2825828cc0edfd56b2e1f06b11d2a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-bio-tools-run-alignment-tcoffee: + build: . + image: mcp-perl-bio-tools-run-alignment-tcoffee:latest + container_name: mcp-perl-bio-tools-run-alignment-tcoffee + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-bio-tools-run-alignment-tcoffee + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7252256b756bc38020c72bd77620c5f7660420f9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-bio-tools-run-alignment-tcoffee + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bio-tools-run-alignment-tcoffee/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bioperl/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bioperl/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-bioperl/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..18a01e8d5078b2a1edb35db6092e2986d351a73f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-convert-binary-c via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-convert-binary-c -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-convert-binary-c_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-convert-binary-c_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-convert-binary-c_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_server.py new file mode 100644 index 0000000000000000000000000000000000000000..159a8b9e50e894ef45108abf33bf72ee73820b45 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_server.py @@ -0,0 +1,211 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# MCP decorator is omitted as per instructions. +# @mcp.tool() +def run_perl( + programfile: Optional[Path] = None, + one_liner: Optional[str] = None, + one_liner_extended: Optional[str] = None, + args: Optional[List[str]] = None, + record_separator: Optional[str] = None, + autosplit: bool = False, + split_pattern: Optional[str] = None, + unicode_features: Optional[str] = None, + syntax_check_only: bool = False, + enable_debugger: bool = False, + debugger_module: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + in_place_edit_extension: Optional[str] = None, + include_dirs: Optional[List[Path]] = None, + line_ending_processing: Optional[str] = None, + use_modules: Optional[List[str]] = None, + use_modules_no_import: Optional[List[str]] = None, + no_modules: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + parse_switches: bool = False, + search_path: bool = False, + taint_warnings: bool = False, + taint_checks: bool = False, + dump_core: bool = False, + unsafe_operations: bool = False, + print_version: bool = False, + print_config: bool = False, + print_config_variable: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + disable_all_warnings: bool = False, + extract_script: bool = False, + extract_dir: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Executes a Perl script or one-liner using the Perl interpreter. + + This tool is a wrapper for the `perl` command. The `perl-convert-binary-c` + package provides a Perl module, not a standalone executable. This tool allows + you to run any Perl script, which can in turn use the `Convert::Binary::C` module + if it is available in the execution environment. + """ + # --- Input Validation --- + script_sources = sum(p is not None for p in [programfile, one_liner, one_liner_extended]) + action_flags = sum([print_version, print_config]) + + if action_flags > 0: + if script_sources > 0: + raise ValueError("Cannot provide a script source (programfile, one_liner) when using action flags like --print-version or --print-config.") + elif script_sources == 0: + raise ValueError("You must provide a script source (programfile, one_liner, or one_liner_extended) or an action flag (--print-version, --print-config).") + elif script_sources > 1: + raise ValueError("Only one script source (programfile, one_liner, or one_liner_extended) can be specified at a time.") + + if programfile and not programfile.is_file(): + raise FileNotFoundError(f"The specified program file does not exist: {programfile}") + + if split_pattern and not autosplit: + raise ValueError("The 'split_pattern' option requires 'autosplit' to be enabled.") + + if debugger_module and not enable_debugger: + raise ValueError("The 'debugger_module' option requires 'enable_debugger' to be enabled.") + + if loop_around_program and loop_and_print: + raise ValueError("The 'loop_around_program' (-n) and 'loop_and_print' (-p) options are mutually exclusive.") + + if sum([enable_warnings, enable_all_warnings, disable_all_warnings]) > 1: + raise ValueError("Warning flags -w, -W, and -X are mutually exclusive.") + + if print_config_variable and not print_config: + raise ValueError("The 'print_config_variable' option requires 'print_config' to be enabled.") + + if extract_dir and not extract_script: + raise ValueError("The 'extract_dir' option requires 'extract_script' to be enabled.") + + # --- Command Construction --- + cmd = ["perl"] + + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if syntax_check_only: + cmd.append("-c") + + if enable_debugger: + if debugger_module: + cmd.append(f"-d:{debugger_module}") + else: + cmd.append("-d") + + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if in_place_edit_extension is not None: + cmd.append(f"-i{in_place_edit_extension}") + if include_dirs: + for directory in include_dirs: + cmd.extend(["-I", str(directory)]) + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + + if use_modules: + for module in use_modules: + cmd.append(f"-M{module}") + if use_modules_no_import: + for module in use_modules_no_import: + cmd.append(f"-m{module}") + if no_modules: + for module in no_modules: + cmd.append(f"-M-{module}") + + if loop_around_program: + cmd.append("-n") + if loop_and_print: + cmd.append("-p") + if parse_switches: + cmd.append("-s") + if search_path: + cmd.append("-S") + if taint_warnings: + cmd.append("-t") + if taint_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + + if print_config: + if print_config_variable: + cmd.append(f"-V:{print_config_variable}") + else: + cmd.append("-V") + + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if disable_all_warnings: + cmd.append("-X") + + if extract_script: + if extract_dir: + cmd.append(f"-x{str(extract_dir)}") + else: + cmd.append("-x") + + # --- Add Script Source and Arguments --- + if one_liner is not None: + cmd.extend(["-e", one_liner]) + elif one_liner_extended is not None: + cmd.extend(["-E", one_liner_extended]) + elif programfile: + cmd.append(str(programfile)) + + if args: + cmd.extend(args) + + # --- Subprocess Execution --- + command_executed = " ".join(cmd) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + stdout = result.stdout + stderr = result.stderr + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "error": "Perl execution failed." + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "The 'perl' command was not found. Please ensure Perl is installed and in the system's PATH.", + "return_code": 1, + "error": "Command not found." + } + + # --- Return Structured Output --- + # As this is a generic script runner, output files are not predictable. + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..99201b3fe87c783c9c8b05a669e8c3c4d6fed9ad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/perl-convert-binary-c_server.py') +SERVER_NAME = 'biosci_perl_convert_binary_c' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3c2d2a2cc613b7e8236d1b565e86f6308026ee76 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-convert-binary-c: + build: . + image: mcp-perl-convert-binary-c:latest + container_name: mcp-perl-convert-binary-c + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-convert-binary-c + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7a45189bdc22da82edd16ead87813bf89ffd2410 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-convert-binary-c + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-convert-binary-c/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..152d132755024911908cab1df4fb118b92484429 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-data-stag via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-data-stag -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-data-stag_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-data-stag_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-data-stag_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/__pycache__/perl-data-stag_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/__pycache__/perl-data-stag_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ac55671e1eb312ee7bfd117a93bc10ea0b3df72f Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/__pycache__/perl-data-stag_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c57aec2d73cf0d7b8726e714515b1bf96fe523ad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_server.py @@ -0,0 +1,476 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union + +@mcp.tool() +def stag_parse( + input_file: str, + parser: Optional[str] = None, + writer: Optional[str] = None, + output_file: Optional[str] = None, +): + """ + Parses a file using a Data::Stag parser and outputs in a specified format. + + Args: + input_file: Path to the input file to parse. + parser: Input format (e.g., 'xml', 'sxpr', 'itext', 'perl', or a custom perl module). + writer: Output format (e.g., 'xml', 'sxpr', 'itext', 'perl', 'indent'). + output_file: Optional path to save the output. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-parse"] + if parser: + cmd.extend(["-p", parser]) + if writer: + cmd.extend(["-w", writer]) + if output_file: + cmd.extend(["-o", output_file]) + + cmd.append(str(input_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output_file] if output_file and Path(output_file).exists() else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Process failed with exit code {e.returncode}" + } + +@mcp.tool() +def stag_grep( + node: str, + regex: str, + input_file: str, + parser: Optional[str] = None, + writer: Optional[str] = None, +): + """ + Filters nodes from a stag file based on a regular expression. + + Args: + node: The name of the node/element to filter. + regex: The regular expression to match against the node's value. + input_file: Path to the input stag file. + parser: Input format (e.g., 'xml', 'sxpr'). + writer: Output format (e.g., 'xml', 'sxpr'). + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-grep"] + if parser: + cmd.extend(["-p", parser]) + if writer: + cmd.extend(["-w", writer]) + + cmd.extend([node, regex, str(input_path)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_mung( + input_file: str, + module: Optional[str] = None, + script: Optional[str] = None, + parser: Optional[str] = None, + writer: Optional[str] = None, +): + """ + Transforms a stag file using a Perl module or script. + + Args: + input_file: Path to the input stag file. + module: Perl module name to use for transformation. + script: Path to a Perl script to use for transformation. + parser: Input format. + writer: Output format. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-mung"] + if parser: + cmd.extend(["-p", parser]) + if writer: + cmd.extend(["-w", writer]) + if module: + cmd.extend(["-m", module]) + if script: + cmd.extend(["-s", script]) + + cmd.append(str(input_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_diff( + file1: str, + file2: str, + parser: Optional[str] = None, + top_node: Optional[str] = None, +): + """ + Compares two stag files and reports differences. + + Args: + file1: Path to the first stag file. + file2: Path to the second stag file. + parser: Input format for both files. + top_node: The top-level node to start the comparison from. + """ + p1 = Path(file1) + p2 = Path(file2) + if not p1.exists() or not p2.exists(): + return {"error": "One or both input files not found."} + + cmd = ["stag-diff"] + if parser: + cmd.extend(["-p", parser]) + if top_node: + cmd.extend(["-t", top_node]) + + cmd.extend([str(p1), str(p2)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_flatten( + input_file: str, + format: str = "csv", + columns: Optional[str] = None, + parser: Optional[str] = None, +): + """ + Flattens a stag file into a tabular format (CSV or TSV). + + Args: + input_file: Path to the input stag file. + format: Output format ('csv' or 'tsv'). Defaults to 'csv'. + columns: Comma-separated list of column names to extract. + parser: Input format. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-flatten"] + if parser: + cmd.extend(["-p", parser]) + if format: + cmd.extend(["-f", format]) + if columns: + cmd.extend(["-c", columns]) + + cmd.append(str(input_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_findsubtree( + node: str, + input_file: str, + parser: Optional[str] = None, + writer: Optional[str] = None, +): + """ + Finds and extracts all subtrees of a specific node type. + + Args: + node: The name of the node to find. + input_file: Path to the input stag file. + parser: Input format. + writer: Output format. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-findsubtree"] + if parser: + cmd.extend(["-p", parser]) + if writer: + cmd.extend(["-w", writer]) + + cmd.extend([node, str(input_path)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_join( + file1: str, + file2: str, + key1: str, + key2: str, + parser1: Optional[str] = None, + parser2: Optional[str] = None, +): + """ + Performs a relational-style join between two stag files. + + Args: + file1: Path to the first stag file. + file2: Path to the second stag file. + key1: Join key for the first file. + key2: Join key for the second file. + parser1: Input format for file 1. + parser2: Input format for file 2. + """ + p1 = Path(file1) + p2 = Path(file2) + if not p1.exists() or not p2.exists(): + return {"error": "One or both input files not found."} + + cmd = ["stag-join"] + if parser1: + cmd.extend(["-p1", parser1]) + if parser2: + cmd.extend(["-p2", parser2]) + + cmd.extend(["-k1", key1, "-k2", key2, str(p1), str(p2)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_autoschema( + input_file: str, + format: str = "xml", + parser: Optional[str] = None, +): + """ + Infers a schema (DTD or XML Schema) from a stag file. + + Args: + input_file: Path to the input stag file. + format: Schema format ('xml' or 'dtd'). Defaults to 'xml'. + parser: Input format. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-autoschema"] + if parser: + cmd.extend(["-p", parser]) + if format: + cmd.extend(["-f", format]) + + cmd.append(str(input_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def stag_drawtree( + input_file: str, + parser: Optional[str] = None, +): + """ + Draws an ASCII representation of the stag tree structure. + + Args: + input_file: Path to the input stag file. + parser: Input format. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["stag-drawtree"] + if parser: + cmd.extend(["-p", parser]) + + cmd.append(str(input_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def perl_interpreter( + program_file: Optional[str] = None, + one_liner: Optional[str] = None, + args: Optional[List[str]] = None, + include_path: Optional[str] = None, + module: Optional[str] = None, + warnings: bool = False, + all_warnings: bool = False, + syntax_check: bool = False, + autosplit: bool = False, + assume_loop: bool = False, + assume_print_loop: bool = False, +): + """ + Executes the Perl interpreter with specified options. + + Args: + program_file: Path to the Perl script to execute. + one_liner: One line of program (passed via -e). + args: Arguments to pass to the program. + include_path: Directory to add to @INC (passed via -I). + module: Module to execute before the program (passed via -m). + warnings: Enable many useful warnings (-w). + all_warnings: Enable all warnings (-W). + syntax_check: Check syntax only (-c). + autosplit: Autosplit mode with -n or -p (-a). + assume_loop: Assume "while (<>) { ... }" loop around program (-n). + assume_print_loop: Assume loop like -n but print line also (-p). + """ + cmd = ["perl"] + + if warnings: + cmd.append("-w") + if all_warnings: + cmd.append("-W") + if syntax_check: + cmd.append("-c") + if autosplit: + cmd.append("-a") + if assume_loop: + cmd.append("-n") + if assume_print_loop: + cmd.append("-p") + if include_path: + cmd.append(f"-I{include_path}") + if module: + cmd.append(f"-m{module}") + + if one_liner: + cmd.extend(["-e", one_liner]) + elif program_file: + p = Path(program_file) + if not p.exists(): + return {"error": f"Program file {program_file} not found."} + cmd.append(str(p)) + + if args: + cmd.extend(args) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e23eefe76b4c778a5a66afc27029f273873df7d2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/perl-data-stag_server.py') +SERVER_NAME = 'biosci_perl_data_stag' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..2d234e64eb4dc1df9c911b0216238eb2fe319efc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-data-stag: + build: . + image: mcp-perl-data-stag:latest + container_name: mcp-perl-data-stag + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-data-stag + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..88d9597d208ddeabd755d47be32e469c6f6c498c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-data-stag + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-data-stag/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-globaldestruction/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-globaldestruction/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-globaldestruction/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6821ac145187d3987cf1972ac5b4c69d88a204f9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-devel-overloadinfo via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-devel-overloadinfo -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-devel-overloadinfo_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-devel-overloadinfo_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-devel-overloadinfo_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_server.py new file mode 100644 index 0000000000000000000000000000000000000000..be16bd4c125606c6fde05674e6699950db646d20 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_server.py @@ -0,0 +1,149 @@ +import subprocess +import shlex +import re +from typing import Dict, Any, List, Optional +from pathlib import Path + +# In a real MCP environment, the @mcp.tool decorator would be provided. +# For the purpose of this exercise, we assume it exists and works as intended. +# from mcp import tool as mcp_tool +# +# As per the instructions, we will not define a dummy decorator. +# We will just use @mcp.tool() as if it were imported. + +# This is a placeholder for the decorator. +class mcp: + @staticmethod + def tool(): + def decorator(f): + return f + return decorator + +@mcp.tool() +def introspect_overload(class_name: str) -> Dict[str, Any]: + """ + Introspects a Perl class to get information about its overloaded operators. + + This tool uses the Devel::OverloadInfo Perl module to inspect a given + Perl class and report on which operators it overloads. The tool requires + Perl and the 'Devel::OverloadInfo' CPAN module to be installed. + + Args: + class_name: The name of the Perl class to inspect (e.g., 'Math::BigInt'). + + Returns: + A dictionary containing the execution details. The stdout will contain + a JSON object with the overload information. + """ + # 1. Input validation + if not class_name or not class_name.strip(): + raise ValueError("The 'class_name' parameter cannot be empty or contain only whitespace.") + + # A Perl package name must start with an uppercase letter and can contain + # letters, numbers, underscores, and '::' as a separator. + if not re.match(r'^[A-Z][a-zA-Z0-9_]*(?:::[A-Z][a-zA-Z0-9_]*)*$', class_name): + raise ValueError( + f"Invalid Perl class name format: '{class_name}'. " + "It must be a valid package name (e.g., 'My::Module')." + ) + + # 2. Dynamically create a Perl script to use the library. + # This script is designed to be robust: + # - It checks for its own dependencies (Devel::OverloadInfo, JSON::PP). + # - It reports user errors (e.g., class not found) within the JSON output + # and exits with status 0, allowing for clean parsing. + # - It exits with a non-zero status only for unexpected/environmental errors. + perl_script = f""" + use strict; + use warnings; + + # Gracefully handle missing dependencies and report via JSON + my $json_pp_loaded = eval {{ require JSON::PP; JSON::PP->import(qw(encode_json)); 1; }}; + unless ($json_pp_loaded) {{ + print qq({{"error": "Internal dependency error: Perl module JSON::PP not found."}}); + exit 1; + }} + + my $overload_info_loaded = eval {{ require Devel::OverloadInfo; Devel::OverloadInfo->import(qw(overload_info)); 1; }}; + unless ($overload_info_loaded) {{ + print encode_json({{ error => "Tool dependency error: Perl module Devel::OverloadInfo not found. Please install it (e.g., 'cpanm Devel::OverloadInfo')." }}); + exit 0; # Exit 0 because this is a reportable error, not a crash + }} + + my $class_name = '{class_name}'; + my %result; + + # Suppress warnings about module loading during the 'eval' for the target class + local $SIG{{'__WARN__'}} = sub {{}}; + + # Attempt to load the specified class + my $loaded = eval "require $class_name; 1"; + if (!$loaded) {{ + # Remove trailing newline from error message for cleaner JSON + my $error_msg = $@; + chomp $error_msg; + $result{{'error'}} = "Could not load class '$class_name': $error_msg"; + print encode_json(\\%result); + exit 0; # Exit gracefully, the error is in the JSON output + }} + + my $info = overload_info($class_name); + + if (defined $info && ref $info eq 'HASH' && %{{$info}}) {{ + $result{{'class'}} = $class_name; + $result{{'overloads'}} = $info; + }} else {{ + $result{{'class'}} = $class_name; + $result{{'overloads'}} = {{}}; + $result{{'message'}} = "Class '$class_name' does not overload any operators or is not a valid class for introspection."; + }} + + # Print the result as a JSON object + print encode_json(\\%result); + """ + + # 3. Subprocess execution + command = ["perl", "-e", perl_script] + command_executed = shlex.join(command) + + try: + # Use check=True. The Perl script is designed to exit non-zero only on + # unexpected errors (like a syntax error in the script itself). + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + + # 4. Structured result return for success + return { + "command_executed": command_executed, + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [] + } + + except FileNotFoundError: + # This error occurs if 'perl' is not in the system's PATH + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Perl executable not found. Please ensure Perl is installed and in your system's PATH.", + "output_files": [] + } + except subprocess.CalledProcessError as e: + # This catches unexpected failures in the Perl script itself. + # The script is designed to avoid this, so it indicates a deeper problem. + stderr_message = ( + f"The Perl wrapper script failed unexpectedly with exit code {e.returncode}.\n" + f"This may indicate a problem with the Perl installation or the script itself.\n" + f"Captured stdout: {e.stdout.strip()}\n" + f"Captured stderr: {e.stderr.strip()}" + ) + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": stderr_message, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1cbb823619c72ac831abf24ce7ed7bab38b88fc4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/perl-devel-overloadinfo_server.py') +SERVER_NAME = 'biosci_perl_devel_overloadinfo' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..879623eeb3e51239d64875c4060c63f5b78c6445 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-devel-overloadinfo: + build: . + image: mcp-perl-devel-overloadinfo:latest + container_name: mcp-perl-devel-overloadinfo + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-devel-overloadinfo + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..125c01887062762509bdce552d5c13d1e7214b88 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-devel-overloadinfo + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-devel-overloadinfo/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-dynaloader/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-dynaloader/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-dynaloader/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..93e59e9a3e57549f3e18be34f41dee86273a4f99 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-exporter via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-exporter -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-exporter_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-exporter_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-exporter_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e87c077e87a19b88f7bc5d894d228a073c23ab90 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_server.py @@ -0,0 +1,232 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Dict, Any + +@mcp.tool() +def perl_run( + program_file: Optional[str] = None, + script_args: Optional[List[str]] = None, + e_code: Optional[List[str]] = None, + E_code: Optional[List[str]] = None, + modules: Optional[List[str]] = None, + modules_no_import: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, + autosplit: bool = False, + warnings: bool = False, + all_warnings: bool = False, + no_warnings: bool = False, + loop_n: bool = False, + loop_p: bool = False, + taint_check: bool = False, + taint_warn: bool = False, + inplace_ext: Optional[str] = None, + split_pattern: Optional[str] = None, + record_sep: Optional[str] = None, + line_ending: Optional[str] = None, + unicode_features: Optional[str] = None, + debugger: Optional[str] = None, + debug_flags: Optional[str] = None, + switch_parsing: bool = False, + path_search: bool = False, + dump_core: bool = False, + unsafe: bool = False, + ignore_text_dir: Optional[str] = None, +) -> Dict[str, Any]: + """ + Execute a Perl program or one-liner. This tool is provided by the perl-exporter environment. + + Args: + program_file: Path to the Perl script to execute. + script_args: Arguments to pass to the Perl script. + e_code: One line of program (several allowed). + E_code: Like -e, but enables all optional features. + modules: Execute "use module..." before executing program (-M). + modules_no_import: Execute "use module ()..." before executing program (-m). + include_dirs: Specify @INC/#include directories (-I). + autosplit: Autosplit mode with -n or -p (splits $_ into @F) (-a). + warnings: Enable many useful warnings (-w). + all_warnings: Enable all warnings (-W). + no_warnings: Disable all warnings (-X). + loop_n: Assume "while (<>) { ... }" loop around program (-n). + loop_p: Assume loop like -n but print line also (-p). + taint_check: Enable tainting checks (-T). + taint_warn: Enable tainting warnings (-t). + inplace_ext: Edit <> files in place, optionally making backup with extension (-i). + split_pattern: split() pattern for -a switch (-F). + record_sep: Specify record separator (-0). + line_ending: Enable line ending processing, specifies line terminator (-l). + unicode_features: Enables the listed Unicode features (-C). + debugger: Run program under debugger (-d). + debug_flags: Set debugging flags (-D). + switch_parsing: Enable rudimentary parsing for switches after programfile (-s). + path_search: Look for programfile using PATH environment variable (-S). + dump_core: Dump core after parsing program (-u). + unsafe: Allow unsafe operations (-U). + ignore_text_dir: Ignore text before #!perl line, optionally cd to directory (-x). + """ + cmd = ["perl"] + + # Flags + if autosplit: cmd.append("-a") + if warnings: cmd.append("-w") + if all_warnings: cmd.append("-W") + if no_warnings: cmd.append("-X") + if loop_n: cmd.append("-n") + if loop_p: cmd.append("-p") + if taint_check: cmd.append("-T") + if taint_warn: cmd.append("-t") + if switch_parsing: cmd.append("-s") + if path_search: cmd.append("-S") + if dump_core: cmd.append("-u") + if unsafe: cmd.append("-U") + + # Parameters with values + if record_sep is not None: + cmd.append(f"-0{record_sep}") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if debugger is not None: + cmd.append(f"-d{debugger}" if debugger else "-d") + if debug_flags is not None: + cmd.append(f"-D{debug_flags}") + if inplace_ext is not None: + cmd.append(f"-i{inplace_ext}" if inplace_ext else "-i") + if line_ending is not None: + cmd.append(f"-l{line_ending}" if line_ending else "-l") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if ignore_text_dir is not None: + cmd.append(f"-x{ignore_text_dir}" if ignore_text_dir else "-x") + + # Multi-value parameters + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + if modules: + for m in modules: + cmd.append(f"-M{m}") + if modules_no_import: + for m in modules_no_import: + cmd.append(f"-m{m}") + if e_code: + for e in e_code: + cmd.extend(["-e", e]) + if E_code: + for E in E_code: + cmd.extend(["-E", E]) + + # Program file and arguments + if program_file: + prog_path = Path(program_file) + if not prog_path.exists(): + return {"error": f"Program file not found: {program_file}"} + cmd.append(str(prog_path)) + + if script_args: + cmd.extend(script_args) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "return_code": result.returncode + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "error": str(e) + } + +@mcp.tool() +def perl_check_syntax( + program_file: str, + modules: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, +) -> Dict[str, Any]: + """ + Check the syntax of a Perl program without executing it (runs BEGIN and CHECK blocks). + + Args: + program_file: Path to the Perl script to check. + modules: Execute "use module..." before checking (-M). + include_dirs: Specify @INC/#include directories (-I). + """ + prog_path = Path(program_file) + if not prog_path.exists(): + return {"error": f"Program file not found: {program_file}"} + + cmd = ["perl", "-c"] + + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + if modules: + for m in modules: + cmd.append(f"-M{m}") + + cmd.append(str(prog_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "Syntax OK" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Syntax check failed" + } + +@mcp.tool() +def perl_get_version() -> Dict[str, Any]: + """ + Print the Perl version, patchlevel, and license information. + """ + cmd = ["perl", "-v"] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e) + } + +@mcp.tool() +def perl_get_config( + variable: Optional[str] = None +) -> Dict[str, Any]: + """ + Print Perl configuration summary or a single Config.pm variable. + + Args: + variable: Specific Config.pm variable to print (e.g., 'installsitelib'). + """ + arg = f"-V:{variable}" if variable else "-V" + cmd = ["perl", arg] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..30d0c3bf42258c1b90557272a0fc975fa922e55b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/perl-exporter_server.py') +SERVER_NAME = 'biosci_perl_exporter' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..20d62ea013a84fe99baf65b35722a440601144ed --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-exporter: + build: . + image: mcp-perl-exporter:latest + container_name: mcp-perl-exporter + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-exporter + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4fd2ea2c2395806b6807d15ed01bdbfad56cc56e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-exporter + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-exporter/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..25278da21a01b3804782d142378504c69d6030c6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-extutils-cbuilder via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-extutils-cbuilder -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-extutils-cbuilder_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-extutils-cbuilder_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-extutils-cbuilder_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6987047f84bafa2a9e3be1067128dd942029b714 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_server.py @@ -0,0 +1,254 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def perl_interpreter( + program_file: Optional[str] = None, + arguments: Optional[List[str]] = None, + execute_string: Optional[str] = None, + check_syntax_only: bool = False, + print_version: bool = False, + include_directories: Optional[List[str]] = None, + use_modules: Optional[List[str]] = None, + enable_warnings: bool = False, + taint_check: bool = False, +) -> Dict[str, Any]: + """ + Executes the Perl interpreter with specified options and script. + + Args: + program_file: Path to the Perl script to execute. + arguments: List of command-line arguments to pass to the script. + execute_string: A string of Perl code to execute (equivalent to -e). + check_syntax_only: If True, only check the syntax of the script without executing it. + print_version: If True, print the Perl version and exit. + include_directories: List of paths to add to @INC for module searching. + use_modules: List of modules to load (equivalent to -M). + enable_warnings: If True, enable useful warnings (equivalent to -w). + taint_check: If True, enable taint checks (equivalent to -T). + """ + cmd = ["perl"] + + if print_version: + cmd.append("-v") + if check_syntax_only: + cmd.append("-c") + if enable_warnings: + cmd.append("-w") + if taint_check: + cmd.append("-T") + + if include_directories: + for directory in include_directories: + cmd.append(f"-I{directory}") + + if use_modules: + for module in use_modules: + cmd.append(f"-M{module}") + + if execute_string: + cmd.extend(["-e", execute_string]) + elif program_file: + prog_path = Path(program_file) + if not prog_path.exists(): + raise FileNotFoundError(f"Program file not found: {program_file}") + cmd.append(str(prog_path)) + elif not print_version: + return { + "command_executed": "perl", + "stdout": "", + "stderr": "Error: No program file or execution string provided.", + "output_files": [] + } + + if arguments: + cmd.extend(arguments) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def cbuilder_compile_c( + source_file: str, + output_file: Optional[str] = None, + include_dirs: Optional[List[str]] = None, + extra_compiler_flags: Optional[List[str]] = None, +) -> Dict[str, Any]: + """ + Compiles a C source file into an object file using Perl's ExtUtils::CBuilder. + + Args: + source_file: Path to the .c source file. + output_file: Optional path for the resulting object file. + include_dirs: List of directories to search for header files. + extra_compiler_flags: Additional flags to pass to the C compiler. + """ + src_path = Path(source_file) + if not src_path.exists(): + raise FileNotFoundError(f"Source file not found: {source_file}") + + # Construct the Perl one-liner to use ExtUtils::CBuilder + perl_code = [ + "use ExtUtils::CBuilder;", + "my $b = ExtUtils::CBuilder->new();", + f"my $obj = $b->compile(source => '{str(src_path)}'" + ] + + if output_file: + perl_code.append(f", output => '{output_file}'") + + if include_dirs: + dirs_str = ", ".join([f"'{d}'" for d in include_dirs]) + perl_code.append(f", include_dirs => [{dirs_str}]") + + if extra_compiler_flags: + flags_str = " ".join(extra_compiler_flags) + perl_code.append(f", extra_compiler_flags => '{flags_str}'") + + perl_code.append(");") + perl_code.append("print $obj;") + + full_perl_script = "".join(perl_code) + cmd = ["perl", "-MExtUtils::CBuilder", "-e", full_perl_script] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + generated_file = result.stdout.strip() + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [generated_file] if generated_file and Path(generated_file).exists() else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def cbuilder_link_shared_library( + objects: List[str], + module_name: str, + output_file: Optional[str] = None, + extra_linker_flags: Optional[List[str]] = None, +) -> Dict[str, Any]: + """ + Links object files into a dynamic/shared library using Perl's ExtUtils::CBuilder. + + Args: + objects: List of paths to object files (.o or .obj). + module_name: The name of the Perl module this library is for. + output_file: Optional path for the resulting shared library. + extra_linker_flags: Additional flags to pass to the linker. + """ + for obj in objects: + if not Path(obj).exists(): + raise FileNotFoundError(f"Object file not found: {obj}") + + obj_list_str = ", ".join([f"'{o}'" for o in objects]) + + perl_code = [ + "use ExtUtils::CBuilder;", + "my $b = ExtUtils::CBuilder->new();", + f"my $lib = $b->link(objects => [{obj_list_str}], module_name => '{module_name}'" + ] + + if output_file: + perl_code.append(f", lib_file => '{output_file}'") + + if extra_linker_flags: + flags_str = " ".join(extra_linker_flags) + perl_code.append(f", extra_linker_flags => '{flags_str}'") + + perl_code.append(");") + perl_code.append("print $lib;") + + full_perl_script = "".join(perl_code) + cmd = ["perl", "-MExtUtils::CBuilder", "-e", full_perl_script] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + generated_file = result.stdout.strip() + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [generated_file] if generated_file and Path(generated_file).exists() else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + +@mcp.tool() +def cbuilder_have_compiler() -> Dict[str, Any]: + """ + Checks if a usable C compiler is available on the system via ExtUtils::CBuilder. + """ + perl_script = "use ExtUtils::CBuilder; print ExtUtils::CBuilder->new->have_compiler ? 'YES' : 'NO'" + cmd = ["perl", "-MExtUtils::CBuilder", "-e", perl_script] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + has_compiler = result.stdout.strip() == "YES" + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "has_compiler": has_compiler, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "has_compiler": False, + "output_files": [] + } + +@mcp.tool() +def cbuilder_get_config() -> Dict[str, Any]: + """ + Retrieves the configuration variables used by ExtUtils::CBuilder for the current platform. + """ + # We use Data::Dumper to output the config hash + perl_script = "use ExtUtils::CBuilder; use Data::Dumper; my $b = ExtUtils::CBuilder->new(); print Dumper($b);" + cmd = ["perl", "-MExtUtils::CBuilder", "-MData::Dumper", "-e", perl_script] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0d7474223bc56d03c91060626c90e1818f6b7a62 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/perl-extutils-cbuilder_server.py') +SERVER_NAME = 'biosci_perl_extutils_cbuilder' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4c32923b29d2dce93fa3284c789fe659d2fd1f4a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-extutils-cbuilder: + build: . + image: mcp-perl-extutils-cbuilder:latest + container_name: mcp-perl-extutils-cbuilder + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-extutils-cbuilder + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c9c453898e769ce60884a0bd4ab20e81f829923b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-extutils-cbuilder + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-extutils-cbuilder/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0125d3455f512f75cd7293a240bb35ba1c20914d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-ffi-checklib via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-ffi-checklib -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-ffi-checklib_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-ffi-checklib_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-ffi-checklib_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_server.py new file mode 100644 index 0000000000000000000000000000000000000000..44f1352e6999d41a006ddf0a1423b899d8bd4e45 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_server.py @@ -0,0 +1,565 @@ +import subprocess +import json +import os +from pathlib import Path +from typing import List, Optional, Union, Dict, Any +import tempfile + +# Helper to build Perl arguments string for FFI::CheckLib functions +def _build_perl_args( + lib: Optional[Union[str, List[str]]] = None, + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, +) -> str: + """ + Constructs a Perl hash argument string from Python parameters. + """ + args = [] + + def format_list(items: List[str]) -> str: + """Formats a Python list into a Perl array string.""" + return f"[{', '.join(f'{repr(item)}' for item in items)}]" + + if lib is not None: + if isinstance(lib, list): + args.append(f"lib => {format_list(lib)}") + else: + args.append(f"lib => {repr(lib)}") + + if libpath is not None: + if isinstance(libpath, list): + args.append(f"libpath => {format_list(libpath)}") + else: + args.append(f"libpath => {repr(libpath)}") + + if systempath is not None: + if isinstance(systempath, list): + args.append(f"systempath => {format_list(systempath)}") + else: + args.append(f"systempath => {repr(systempath)}") + + if symbol is not None: + if isinstance(symbol, list): + args.append(f"symbol => {format_list(symbol)}") + else: + args.append(f"symbol => {repr(symbol)}") + + if recursive: + args.append("recursive => 1") + + if try_linker_script: + args.append("try_linker_script => 1") + + if alien is not None: + if isinstance(alien, list): + args.append(f"alien => {format_list(alien)}") + else: + args.append(f"alien => {repr(alien)}") + + return ', '.join(args) + +# Helper to run Perl script and parse JSON output +def _run_perl_ffi_checklib_script( + perl_code: str, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Executes a Perl script using FFI::CheckLib and captures its output. + Attempts to parse stdout as JSON. + """ + temp_script_path = None + try: + with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.pl', encoding='utf-8') as temp_script: + temp_script.write(perl_code) + temp_script_path = Path(temp_script.name) + + command = ["perl", str(temp_script_path)] + env = os.environ.copy() + if ffi_checklib_package: + env["FFI_CHECKLIB_PACKAGE"] = ffi_checklib_package + if ffi_checklib_path: + env["FFI_CHECKLIB_PATH"] = ffi_checklib_path + + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + env=env + ) + stdout = process.stdout.strip() + stderr = process.stderr.strip() + + parsed_output = None + if stdout: + try: + parsed_output = json.loads(stdout) + except json.JSONDecodeError: + # If stdout is not JSON, return it as raw string + parsed_output = stdout + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output": parsed_output, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout.strip(), + "stderr": e.stderr.strip(), + "error": f"Perl script failed with exit code {e.returncode}", + "output_files": [], + } + finally: + if temp_script_path and temp_script_path.exists(): + os.unlink(temp_script_path) + +# Helper for validating FFI_CHECKLIB_PACKAGE +def _validate_ffi_checklib_package(ffi_checklib_package: Optional[str]): + if ffi_checklib_package is not None: + allowed_packages = ["none", "homebrew", "macports"] + packages = [p.strip() for p in ffi_checklib_package.split(',')] + if not all(p in allowed_packages for p in packages): + raise ValueError( + f"Invalid value for ffi_checklib_package. Allowed values: " + f"{', '.join(allowed_packages)}, comma-separated." + ) + +@mcp.tool() +def find_lib( + lib: Union[str, List[str]], + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Finds dynamic libraries available for FFI. + + Returns a list of full paths to dynamic libraries found, or an empty list if none were found. + Note: The 'verify' argument (a Perl code reference) is not supported in this MCP tool. + """ + if not lib: + raise ValueError("The 'lib' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_args_str = _build_perl_args( + lib=lib, + libpath=libpath, + systempath=systempath, + symbol=symbol, + recursive=recursive, + try_linker_script=try_linker_script, + alien=alien, + ) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my @found_libs = FFI::CheckLib::find_lib({perl_args_str}); +print to_json(\\@found_libs); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + if isinstance(result.get("output"), list): + result["output"] = [Path(item) for item in result["output"] if isinstance(item, str)] + elif isinstance(result.get("output"), str) and result["output"]: + result["output"] = [Path(result["output"])] + else: + result["output"] = [] + + return result + +@mcp.tool() +def assert_lib( + lib: Union[str, List[str]], + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Asserts that a dynamic library is available for FFI. + + Behaves exactly like `find_lib`, but throws an exception (Perl `die`) if no libraries are found. + Returns a list of full paths to dynamic libraries found on success. + Note: The 'verify' argument (a Perl code reference) is not supported in this MCP tool. + """ + if not lib: + raise ValueError("The 'lib' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_args_str = _build_perl_args( + lib=lib, + libpath=libpath, + systempath=systempath, + symbol=symbol, + recursive=recursive, + try_linker_script=try_linker_script, + alien=alien, + ) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my @found_libs = FFI::CheckLib::assert_lib({perl_args_str}); +print to_json(\\@found_libs); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + if isinstance(result.get("output"), list): + result["output"] = [Path(item) for item in result["output"] if isinstance(item, str)] + elif isinstance(result.get("output"), str) and result["output"]: + result["output"] = [Path(result["output"])] + else: + result["output"] = [] + + return result + +@mcp.tool() +def check_lib_or_exit( + lib: Union[str, List[str]], + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Checks if a dynamic library is available for FFI and exits if not found. + + Intended for use in build scripts. If the library is not found, it will warn + and exit the Perl script with a non-zero status. On success, it returns a confirmation. + Note: The 'verify' argument (a Perl code reference) is not supported in this MCP tool. + """ + if not lib: + raise ValueError("The 'lib' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_args_str = _build_perl_args( + lib=lib, + libpath=libpath, + systempath=systempath, + symbol=symbol, + recursive=recursive, + try_linker_script=try_linker_script, + alien=alien, + ) + + perl_code = f""" +use FFI::CheckLib; +FFI::CheckLib::check_lib_or_exit({perl_args_str}); +print "Library check successful."; +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" not in result: + result["output"] = "Library check successful." + else: + result["output"] = "Library check failed." + + return result + +@mcp.tool() +def find_lib_or_exit( + lib: Union[str, List[str]], + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Finds dynamic libraries and exits with a diagnostic if not found. + + Behaves exactly like `find_lib`, but if the library is not found, it will call + exit with an appropriate diagnostic. Returns a list of full paths to dynamic libraries found on success. + Note: The 'verify' argument (a Perl code reference) is not supported in this MCP tool. + """ + if not lib: + raise ValueError("The 'lib' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_args_str = _build_perl_args( + lib=lib, + libpath=libpath, + systempath=systempath, + symbol=symbol, + recursive=recursive, + try_linker_script=try_linker_script, + alien=alien, + ) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my @found_libs = FFI::CheckLib::find_lib_or_exit({perl_args_str}); +print to_json(\\@found_libs); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + if isinstance(result.get("output"), list): + result["output"] = [Path(item) for item in result["output"] if isinstance(item, str)] + elif isinstance(result.get("output"), str) and result["output"]: + result["output"] = [Path(result["output"])] + else: + result["output"] = [] + + return result + +@mcp.tool() +def find_lib_or_die( + lib: Union[str, List[str]], + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Finds dynamic libraries and dies with a diagnostic if not found. + + Behaves exactly like `find_lib`, but if the library is not found, it will die + with an appropriate diagnostic. Returns a list of full paths to dynamic libraries found on success. + Note: The 'verify' argument (a Perl code reference) is not supported in this MCP tool. + """ + if not lib: + raise ValueError("The 'lib' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_args_str = _build_perl_args( + lib=lib, + libpath=libpath, + systempath=systempath, + symbol=symbol, + recursive=recursive, + try_linker_script=try_linker_script, + alien=alien, + ) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my @found_libs = FFI::CheckLib::find_lib_or_die({perl_args_str}); +print to_json(\\@found_libs); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + if isinstance(result.get("output"), list): + result["output"] = [Path(item) for item in result["output"] if isinstance(item, str)] + elif isinstance(result.get("output"), str) and result["output"]: + result["output"] = [Path(result["output"])] + else: + result["output"] = [] + + return result + +@mcp.tool() +def check_lib( + lib: Union[str, List[str]], + libpath: Optional[Union[str, List[str]]] = None, + systempath: Optional[Union[str, List[str]]] = None, + symbol: Optional[Union[str, List[str]]] = None, + recursive: bool = False, + try_linker_script: bool = False, + alien: Optional[Union[str, List[str]]] = None, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Checks if a dynamic library is available for FFI. + + Returns true (1) if the appropriate libraries are found, or false (0) otherwise. + Note: The 'verify' argument (a Perl code reference) is not supported in this MCP tool. + """ + if not lib: + raise ValueError("The 'lib' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_args_str = _build_perl_args( + lib=lib, + libpath=libpath, + systempath=systempath, + symbol=symbol, + recursive=recursive, + try_linker_script=try_linker_script, + alien=alien, + ) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my $bool_result = FFI::CheckLib::check_lib({perl_args_str}); +print to_json($bool_result ? \1 : \0); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + output = result.get("output") + result["output"] = bool(output) + + return result + +@mcp.tool() +def which( + name: str, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Returns the path to the first dynamic library that matches the given name. + """ + if not name: + raise ValueError("The 'name' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my $path = FFI::CheckLib::which({repr(name)}); +print to_json($path); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + output = result.get("output") + if isinstance(output, str) and output: + result["output"] = Path(output) + else: + result["output"] = None + + return result + +@mcp.tool() +def where( + name: str, + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Returns the paths to all dynamic libraries that match the given name. + """ + if not name: + raise ValueError("The 'name' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my @paths = FFI::CheckLib::where({repr(name)}); +print to_json(\\@paths); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + if isinstance(result.get("output"), list): + result["output"] = [Path(item) for item in result["output"] if isinstance(item, str)] + else: + result["output"] = [] + + return result + +@mcp.tool() +def has_symbols( + path: Path, + symbol_names: List[str], + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Checks if all specified symbols can be found in the dynamic library located at the given path. + """ + if not path.is_file(): + raise FileNotFoundError(f"Library file not found at: {path}") + if not symbol_names: + raise ValueError("The 'symbol_names' parameter cannot be empty.") + _validate_ffi_checklib_package(ffi_checklib_package) + + symbol_list_str = ', '.join(f"{repr(s)}" for s in symbol_names) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my $bool_result = FFI::CheckLib::has_symbols({repr(str(path))}, {symbol_list_str}); +print to_json($bool_result ? \1 : \0); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + output = result.get("output") + result["output"] = bool(output) + + return result + +@mcp.tool() +def system_path( + ffi_checklib_package: Optional[str] = None, + ffi_checklib_path: Optional[str] = None, +) -> Dict[str, Any]: + """ + Returns the system path as a list of directories where dynamic libraries are searched. + """ + _validate_ffi_checklib_package(ffi_checklib_package) + + perl_code = f""" +use FFI::CheckLib; +use JSON; +my $path_ref = FFI::CheckLib::system_path(); +print to_json($path_ref); +""" + result = _run_perl_ffi_checklib_script(perl_code, ffi_checklib_package, ffi_checklib_path) + + if "error" in result: + return result + + if isinstance(result.get("output"), list): + result["output"] = [Path(item) for item in result["output"] if isinstance(item, str)] + else: + result["output"] = [] + + return result \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3843223ab32b38cfc9f40f35dcdaee0c50dcc991 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/perl-ffi-checklib_server.py') +SERVER_NAME = 'biosci_perl_ffi_checklib' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..85e6af84643eec569195b50775817ff9453b29f2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-ffi-checklib: + build: . + image: mcp-perl-ffi-checklib:latest + container_name: mcp-perl-ffi-checklib + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-ffi-checklib + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..de5049454375ae348ded8fa5140a99475d09f7d4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-ffi-checklib + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ffi-checklib/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f656ba35012a616a163c4b4280dde02a809e78cd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-file-spec via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-file-spec -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-file-spec_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-file-spec_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-file-spec_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6b42912f949c97613357d3e7afea920ea1799dd8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_server.py @@ -0,0 +1,234 @@ +import subprocess +import shlex +from pathlib import Path +from typing import Optional, List, Dict, Any + +# This is a mock decorator. In a real MCP environment, this would be provided by the MCP framework. +def tool(func): + def wrapper(*args, **kwargs): + return func(*args, **kwargs) + return wrapper + +mcp = type("mcp", (), {"tool": tool}) + +@mcp.tool +def perl_interpreter( + programfile: Optional[Path] = None, + arguments: Optional[List[str]] = None, + execute_program: Optional[List[str]] = None, + execute_program_extended: Optional[List[str]] = None, + check_syntax_only: bool = False, + print_version: bool = False, + print_config: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + disable_all_warnings: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + allow_unsafe: bool = False, + dump_core: bool = False, + no_sitecustomize: bool = False, + search_path: bool = False, + parse_switches: bool = False, + loop_around_program: bool = False, + loop_and_print: bool = False, + autosplit: bool = False, + split_pattern: Optional[str] = None, + record_separator: Optional[str] = None, + line_ending_processing: Optional[str] = None, + edit_in_place: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + use_module: Optional[List[str]] = None, + no_module: Optional[List[str]] = None, + require_module: Optional[List[str]] = None, + no_require_module: Optional[List[str]] = None, + run_under_debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + unicode_features: Optional[str] = None, + ignore_text_before_hashbang: bool = False, + cd_to_directory_for_x: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Executes a Perl program using the 'perl' interpreter. + + This tool provides a comprehensive wrapper around the 'perl' command-line interface, + allowing for the execution of scripts from files or strings, with full control over + Perl's numerous switches and options. + + Args: + programfile: Path to the Perl program file to execute. + arguments: A list of arguments to pass to the program file. + execute_program: One or more lines of a program to be executed (-e). Omit programfile. + execute_program_extended: Like -e, but enables all optional features (-E). Omit programfile. + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks) (-c). + print_version: Print version, patchlevel, and license (-v). + print_config: Print configuration summary or a single Config.pm variable (-V[:variable]). + enable_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + disable_all_warnings: Disable all warnings (-X). + tainting_warnings: Enable tainting warnings (-t). + tainting_checks: Enable tainting checks (-T). + allow_unsafe: Allow unsafe operations (-U). + dump_core: Dump core after parsing program (-u). + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup (-f). + search_path: Look for programfile using the PATH environment variable (-S). + parse_switches: Enable rudimentary parsing for switches after programfile (-s). + loop_around_program: Assume "while (<>) { ... }" loop around program (-n). + loop_and_print: Assume loop like -n but also print line, like sed (-p). + autosplit: Autosplit mode with -n or -p (splits $_ into @F) (-a). + split_pattern: split() pattern for -a switch (-F/pattern/). + record_separator: Specify record separator (-0[octal]). + line_ending_processing: Enable line ending processing, specifies line terminator (-l[octal]). + edit_in_place: Edit <> files in place. Makes a backup if an extension is supplied (-i[extension]). + include_directories: Specify @INC/#include directory. Several -I's allowed (-I). + use_module: Execute "use module..." before executing the program (-Mmodule). + no_module: Execute "no module..." before executing the program (-M-module). + require_module: Execute "use module..." before executing the program (-mmodule). + no_require_module: Execute "no module..." before executing the program (-m-module). + run_under_debugger: Run program under the specified debugger (-d[:debugger]). + debugging_flags: Set debugging flags (-D[number/list]). + unicode_features: Enable the listed Unicode features (-C[number/list]). + ignore_text_before_hashbang: Ignore text before #!perl line (-x). + cd_to_directory_for_x: Change to this directory before executing for use with -x (-x[directory]). + + Returns: + A dictionary containing the command executed, stdout, stderr, and return code. + """ + # --- Input Validation --- + source_count = sum([ + 1 if programfile else 0, + 1 if bool(execute_program) else 0, + 1 if bool(execute_program_extended) else 0 + ]) + if source_count == 0 and not print_version and print_config is None: + raise ValueError("A source for the program must be provided via 'programfile', 'execute_program', or 'execute_program_extended'.") + if source_count > 1: + raise ValueError("Only one of 'programfile', 'execute_program', or 'execute_program_extended' can be used at a time.") + + if programfile and not programfile.is_file(): + raise FileNotFoundError(f"Program file not found: {programfile}") + + if include_directories: + for d in include_directories: + if not d.is_dir(): + raise NotADirectoryError(f"Include directory not found: {d}") + + if cd_to_directory_for_x and not ignore_text_before_hashbang: + raise ValueError("'cd_to_directory_for_x' requires 'ignore_text_before_hashbang' to be True.") + + # --- Command Construction --- + cmd = ["perl"] + + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if run_under_debugger is not None: + cmd.append(f"-d{run_under_debugger}") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if edit_in_place is not None: + cmd.append(f"-i{edit_in_place}") + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if loop_around_program: + cmd.append("-n") + if loop_and_print: + cmd.append("-p") + if parse_switches: + cmd.append("-s") + if search_path: + cmd.append("-S") + if tainting_warnings: + cmd.append("-t") + if tainting_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config is not None: + cmd.append(f"-V{print_config}") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if disable_all_warnings: + cmd.append("-X") + + if cd_to_directory_for_x: + cmd.append(f"-x{cd_to_directory_for_x}") + elif ignore_text_before_hashbang: + cmd.append("-x") + + if include_directories: + for d in include_directories: + cmd.extend(["-I", str(d)]) + + if use_module: + for mod in use_module: + cmd.append(f"-M{mod}") + if no_module: + for mod in no_module: + cmd.append(f"-M-{mod}") + if require_module: + for mod in require_module: + cmd.append(f"-m{mod}") + if no_require_module: + for mod in no_require_module: + cmd.append(f"-m-{mod}") + + if execute_program: + for prog_line in execute_program: + cmd.extend(["-e", prog_line]) + if execute_program_extended: + for prog_line in execute_program_extended: + cmd.extend(["-E", prog_line]) + + if programfile: + cmd.append(str(programfile)) + if arguments: + cmd.extend(arguments) + + # --- Subprocess Execution --- + command_executed = shlex.join(cmd) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "return_code": result.returncode, + "output_files": [] # Perl scripts can create files, but the wrapper cannot know them beforehand. + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "error": "Perl execution failed." + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "return_code": 1, + "error": "Command not found." + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0635f1a52959587211e1c56f88a115522a40233a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/perl-file-spec_server.py') +SERVER_NAME = 'biosci_perl_file_spec' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfb683885757ef8a4096b93d7c5d0dfb08084f20 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-file-spec: + build: . + image: mcp-perl-file-spec:latest + container_name: mcp-perl-file-spec + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-file-spec + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..434ed60e31696b027ea3cdc011d70121b4760d4d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-file-spec + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-file-spec/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9f30323d3796e9a0898230914fe2270952b47a31 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-graphviz via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-graphviz -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-graphviz_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-graphviz_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-graphviz_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1cfc565b82915750998a4bdee476bb5bceba1991 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_server.py @@ -0,0 +1,229 @@ +import subprocess +import tempfile +import json +from pathlib import Path +from typing import Optional, List, Dict, Any + +def _escape_dot_string(s: str) -> str: + """Escapes a string for use as a quoted ID in a DOT file.""" + return '"' + s.replace('\\', '\\\\').replace('"', '\\"') + '"' + +def _format_attributes(attrs: Dict[str, Any]) -> str: + """Formats a dictionary of attributes into a DOT language string.""" + if not attrs: + return "" + parts = [] + for key, value in attrs.items(): + if isinstance(value, (int, float)): + parts.append(f"{key}={value}") + else: + # Safest to quote all non-numeric values + parts.append(f"{key}={_escape_dot_string(str(value))}") + return f"[{', '.join(parts)}]" + +@mcp.tool() +def render_graph( + nodes: str, + edges: str, + layout: str = "dot", + output_format: str = "png", + directed: bool = True, + graph_name: str = "g", + rankdir: Optional[str] = None, + width: Optional[float] = None, + height: Optional[float] = None, + pagewidth: Optional[float] = None, + pageheight: Optional[float] = None, + concentrate: bool = False, + orientation: Optional[float] = None, + random_start: bool = False, + epsilon: Optional[float] = None, + overlap: Optional[str] = None, + ratio: Optional[str] = None, + bgcolor: Optional[str] = None, + global_graph_attrs: Optional[str] = None, + global_node_attrs: Optional[str] = None, + global_edge_attrs: Optional[str] = None, +) -> Dict[str, Any]: + """ + Renders a graph using a Graphviz layout engine (dot, neato, etc.). + + This tool mimics the functionality of the perl-graphviz library by programmatically + constructing a DOT file from node and edge definitions and then calling a + Graphviz layout engine to generate an image or other output format. + + Args: + nodes: A JSON string representing a list of nodes. Each node is a dictionary + with a required 'name' key and optional attribute keys (e.g., 'label', 'shape'). + Example: '[{"name": "A", "label": "Node A"}, {"name": "B"}]' + edges: A JSON string representing a list of edges. Each edge is a dictionary + with required 'from' and 'to' keys (referencing node names) and optional + attribute keys (e.g., 'label', 'color'). + Example: '[{"from": "A", "to": "B", "label": "connects"}]' + layout: The layout algorithm to use. Corresponds to a Graphviz command. + Valid options: 'dot', 'neato', 'twopi', 'circo', 'fdp'. + output_format: The format of the output file (e.g., 'png', 'svg', 'jpg', 'pdf', 'ps', 'dot'). + directed: If True, creates a directed graph (digraph) with arrows. + If False, creates an undirected graph (graph) with lines. + graph_name: The name of the graph in the DOT source. Defaults to 'g'. + rankdir: For 'dot' layout, sets the direction of graph layout. + Valid options: 'TB' (top to bottom), 'BT' (bottom to top), + 'LR' (left to right), 'RL' (right to left). + width: Width of the drawing in inches. + height: Height of the drawing in inches. + pagewidth: For PostScript output, sets the page width in inches for pagination. + pageheight: For PostScript output, sets the page height in inches for pagination. + concentrate: If True, enables edge merging in directed graphs to reduce clutter. + orientation: Angle, in degrees, to rotate polygon node shapes. + random_start: For undirected graphs, requests an initial random placement. + epsilon: For undirected graphs, controls how long the solver runs. + Lower values mean longer run time but potentially better layout. + overlap: How to handle node overlaps. Valid options: 'true', 'scale', 'false', + 'scalexy', 'orthoxy', 'orthxy', 'compress'. + ratio: Sets the aspect ratio (height/width). Can be a number or one of + 'fill', 'compress', 'expand', 'auto'. + bgcolor: Background color for the drawing (e.g., 'white', 'transparent', 'blue'). + global_graph_attrs: A JSON string of a dictionary for global graph attributes. + Example: '{"fontsize": "10"}' + global_node_attrs: A JSON string of a dictionary for global node attributes. + Example: '{"shape": "box", "style": "filled"}' + global_edge_attrs: A JSON string of a dictionary for global edge attributes. + Example: '{"color": "blue"}' + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + valid_layouts = ["dot", "neato", "twopi", "circo", "fdp"] + if layout not in valid_layouts: + raise ValueError(f"Invalid layout '{layout}'. Must be one of {valid_layouts}.") + + if rankdir and rankdir not in ["TB", "BT", "LR", "RL"]: + raise ValueError(f"Invalid rankdir '{rankdir}'. Must be one of 'TB', 'BT', 'LR', 'RL'.") + + if overlap and overlap not in ['true', 'scale', 'false', 'scalexy', 'orthoxy', 'orthxy', 'compress']: + raise ValueError(f"Invalid overlap value '{overlap}'.") + + try: + nodes_list: List[Dict[str, Any]] = json.loads(nodes) + if not isinstance(nodes_list, list): + raise TypeError("Nodes JSON must be a list of objects.") + except (json.JSONDecodeError, TypeError) as e: + raise ValueError(f"Invalid JSON for 'nodes': {e}") + + try: + edges_list: List[Dict[str, Any]] = json.loads(edges) + if not isinstance(edges_list, list): + raise TypeError("Edges JSON must be a list of objects.") + except (json.JSONDecodeError, TypeError) as e: + raise ValueError(f"Invalid JSON for 'edges': {e}") + + def parse_json_attrs(json_str: Optional[str], name: str) -> Dict[str, Any]: + if not json_str: + return {} + try: + attrs = json.loads(json_str) + if not isinstance(attrs, dict): + raise TypeError(f"{name} JSON must be an object.") + return attrs + except (json.JSONDecodeError, TypeError) as e: + raise ValueError(f"Invalid JSON for '{name}': {e}") + + graph_attrs = parse_json_attrs(global_graph_attrs, "global_graph_attrs") + node_attrs = parse_json_attrs(global_node_attrs, "global_node_attrs") + edge_attrs = parse_json_attrs(global_edge_attrs, "global_edge_attrs") + + # --- DOT File Generation --- + dot_lines = [] + graph_type = "digraph" if directed else "graph" + edge_op = "->" if directed else "--" + + dot_lines.append(f"{graph_type} {_escape_dot_string(graph_name)} {{") + + # Add global graph attributes from parameters + if rankdir: graph_attrs['rankdir'] = rankdir + if width is not None: graph_attrs['width'] = width + if height is not None: graph_attrs['height'] = height + if pagewidth is not None: graph_attrs['pagewidth'] = pagewidth + if pageheight is not None: graph_attrs['pageheight'] = pageheight + if concentrate: graph_attrs['concentrate'] = 'true' + if orientation is not None: graph_attrs['orientation'] = orientation + if random_start: graph_attrs['random_start'] = 'true' + if epsilon is not None: graph_attrs['epsilon'] = epsilon + if overlap: graph_attrs['overlap'] = overlap + if ratio: graph_attrs['ratio'] = ratio + if bgcolor: graph_attrs['bgcolor'] = bgcolor + + if graph_attrs: + dot_lines.append(f" graph {_format_attributes(graph_attrs)};") + if node_attrs: + dot_lines.append(f" node {_format_attributes(node_attrs)};") + if edge_attrs: + dot_lines.append(f" edge {_format_attributes(edge_attrs)};") + + for node in nodes_list: + if 'name' not in node: + raise ValueError("Each node in the 'nodes' list must have a 'name' key.") + node_name = node['name'] + attributes = {k: v for k, v in node.items() if k != 'name'} + dot_lines.append(f" {_escape_dot_string(str(node_name))} {_format_attributes(attributes)};") + + for edge in edges_list: + if 'from' not in edge or 'to' not in edge: + raise ValueError("Each edge in the 'edges' list must have 'from' and 'to' keys.") + from_node = edge['from'] + to_node = edge['to'] + attributes = {k: v for k, v in edge.items() if k not in ['from', 'to']} + dot_lines.append(f" {_escape_dot_string(str(from_node))} {edge_op} {_escape_dot_string(str(to_node))} {_format_attributes(attributes)};") + + dot_lines.append("}") + dot_content = "\n".join(dot_lines) + + # --- Subprocess Execution --- + with tempfile.NamedTemporaryFile(mode='w', suffix='.dot', delete=False, encoding='utf-8') as tmp_dot_file: + tmp_dot_path = Path(tmp_dot_file.name) + tmp_dot_file.write(dot_content) + + output_filename = f"graph_output.{output_format}" + output_path = Path(output_filename) + + cmd = [layout, f"-T{output_format}", "-o", str(output_path), str(tmp_dot_path)] + command_executed = " ".join(cmd) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=False) + + if result.returncode != 0: + raise subprocess.CalledProcessError( + result.returncode, cmd, output=result.stdout, stderr=result.stderr + ) + + output_files = [str(output_path)] if output_path.exists() and output_path.stat().st_size > 0 else [] + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + + except FileNotFoundError: + raise RuntimeError( + f"The command '{layout}' was not found. " + "Please ensure the 'graphviz' package is installed and in the system's PATH." + ) + except subprocess.CalledProcessError as e: + error_message = ( + f"Graphviz command failed with exit code {e.returncode}. " + f"Check stderr for details from the layout engine. " + f"Generated DOT content:\n{dot_content}" + ) + return { + "command_executed": command_executed, + "stdout": e.stdout or "", + "stderr": e.stderr or error_message, + "output_files": [] + } + finally: + if tmp_dot_path.exists(): + tmp_dot_path.unlink() \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..32e3d8183b59af352716ca6caafeb36283a56f48 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/perl-graphviz_server.py') +SERVER_NAME = 'biosci_perl_graphviz' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..deca62c6ffdb98731485ca94cf0e6a180a0bb91d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-graphviz: + build: . + image: mcp-perl-graphviz:latest + container_name: mcp-perl-graphviz + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-graphviz + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ea1e35978acabdbd80b0f2b8413e594c40ed545 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-graphviz/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-graphviz + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c535c70f6e8641cd8932946e6c70af144097939e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-html-parser via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-html-parser -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-html-parser_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-html-parser_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-html-parser_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..72ba75ed47a4e714625f00232f3e470231a00c9b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-html-parser/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-html-parser: + build: . + image: mcp-perl-html-parser:latest + container_name: mcp-perl-html-parser + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-html-parser + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e85541f17667c010fbbaada30c170c150858da9f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-image-size via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-image-size -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-image-size_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-image-size_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-image-size_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_server.py new file mode 100644 index 0000000000000000000000000000000000000000..da5781bf93a3735081bd6289a9e39226f46187c8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_server.py @@ -0,0 +1,114 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Dict, Any, Optional + +# from mcp import mcp + +@mcp.tool() +def image_size( + image_file: Path +) -> Dict[str, Any]: + """ + Determines the width and height of an image file using the Perl Image::Size library. + + This tool acts as a wrapper around the Perl 'Image::Size' module, which does not + provide a direct command-line executable. It dynamically creates and executes a + Perl script to extract the dimensions from the specified image file. + + Args: + image_file: The path to the input image file (e.g., JPG, PNG, GIF, etc.). + + Returns: + A dictionary containing the command executed, stdout, stderr, and the + parsed width and height of the image. + """ + # 1. Input validation + if not image_file.is_file(): + raise FileNotFoundError(f"Input file not found: {image_file}") + + # 2. Perl script content + # This script uses the Image::Size module to get dimensions and prints them + # to stdout in a "width,height" format for easy parsing. + perl_script_content = r""" + use strict; + use warnings; + use Image::Size; + + # Get the image file path from the command line arguments + my $file = shift @ARGV; + + # Basic validation within the script + die "Usage: $0 \n" unless defined $file; + die "File not found or is not a regular file: $file\n" unless -f $file; + + # Get the image size + my ($width, $height) = imgsize($file); + + # Print the result in a machine-readable format if successful + if (defined $width && defined $height) { + print "$width,$height\n"; + } else { + # Print a descriptive error message to stderr if size could not be determined + my $error_msg = Image::Size::errormsg(); + print STDERR "Could not determine size for '$file': $error_msg\n"; + exit 1; + } + """ + + command_to_run = [] + try: + # 3. Create a temporary file for the Perl script + with tempfile.NamedTemporaryFile(mode='w', delete=True, suffix=".pl", encoding='utf-8') as tmp_script: + tmp_script.write(perl_script_content) + tmp_script.flush() # Ensure all content is written to disk + + command_to_run = ['perl', tmp_script.name, str(image_file)] + + # 4. Subprocess execution + process = subprocess.run( + command_to_run, + capture_output=True, + text=True, + check=True + ) + + # 5. Parse the output + stdout_clean = process.stdout.strip() + if not stdout_clean: + raise ValueError("Perl script produced no output to stdout.") + + width_str, height_str = stdout_clean.split(',') + width = int(width_str) + height = int(height_str) + + # 6. Return structured result + return { + "command_executed": " ".join(command_to_run), + "stdout": process.stdout, + "stderr": process.stderr, + "width": width, + "height": height, + "output_files": [] + } + + except FileNotFoundError: + raise RuntimeError("The 'perl' command was not found. Is Perl installed and in your system's PATH?") + except subprocess.CalledProcessError as e: + # This catches errors when the Perl script returns a non-zero exit code + return { + "command_executed": " ".join(command_to_run), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Perl script execution failed with a non-zero exit code.", + "output_files": [] + } + except (ValueError, IndexError) as e: + # This catches errors if the stdout format is not "width,height" + return { + "command_executed": " ".join(command_to_run), + "stdout": process.stdout if 'process' in locals() else "", + "stderr": process.stderr if 'process' in locals() else "", + "error": f"Failed to parse Perl script output. Expected 'width,height', got '{stdout_clean}'. Details: {e}", + "output_files": [] + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..7482dbe5f10b8cc0f202e65791230bd618d9aeac --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/perl-image-size_server.py') +SERVER_NAME = 'biosci_perl_image_size' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ea360db949a356123325255905d6a1df2c49c518 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-image-size: + build: . + image: mcp-perl-image-size:latest + container_name: mcp-perl-image-size + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-image-size + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..957f2faa5f1ec2947f7e6cd91f6db1fb23184444 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-image-size + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-image-size/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e21e934802aaef34656fed68839e1e5f53b1ca62 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-importer via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-importer -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-importer_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-importer_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-importer_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_server.py new file mode 100644 index 0000000000000000000000000000000000000000..102ce12d0de381d066ed0f060c678c61b7cc8e70 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_server.py @@ -0,0 +1,237 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def install_perl_module( + module_name: str, + notest: bool = True, + force: bool = False, + local_lib: Optional[str] = None, + sudo: bool = False, +): + """ + Installs Perl modules using cpanm (App::cpanminus), a common requirement for + bioinformatics pipelines (e.g., BioPerl, VCFtools). + """ + # Input validation + if not module_name: + return {"error": "Module name must be provided"} + + command = [] + if sudo: + command.append("sudo") + + command.extend(["cpanm", module_name]) + + if notest: + command.append("--notest") + if force: + command.append("--force") + if local_lib: + lib_path = Path(local_lib) + command.extend(["-l", str(lib_path.absolute())]) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Installation failed with exit code {e.returncode}" + } + except FileNotFoundError: + return {"error": "cpanm is not installed on the system. Please install App::cpanminus."} + +@mcp.tool() +def execute_perl_script( + script_path: str, + args: Optional[List[str]] = None, + perl5lib: Optional[str] = None, + include_path: Optional[str] = None, + warnings: bool = True, +): + """ + Executes a Perl script with specified arguments and environment variables. + Commonly used for running BioPerl scripts or custom bioinformatics parsers. + """ + script = Path(script_path) + if not script.exists(): + return {"error": f"Script not found at {script_path}"} + + command = ["perl"] + if warnings: + command.append("-w") + if include_path: + command.extend(["-I", include_path]) + + command.append(str(script.absolute())) + + if args: + command.extend(args) + + env = {} + if perl5lib: + env["PERL5LIB"] = perl5lib + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + env=env if env else None + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] # Perl scripts often output to stdout unless redirected + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Script execution failed with exit code {e.returncode}" + } + +@mcp.tool() +def check_perl_syntax( + script_path: str, + include_path: Optional[str] = None, +): + """ + Performs a syntax check on a Perl script (perl -c). + Useful for validating bioinformatics scripts before long-running pipeline execution. + """ + script = Path(script_path) + if not script.exists(): + return {"error": f"Script not found at {script_path}"} + + command = ["perl", "-c"] + if include_path: + command.extend(["-I", include_path]) + command.append(str(script.absolute())) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "valid": True + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "valid": False, + "error": "Syntax check failed" + } + +@mcp.tool() +def list_installed_perl_modules( + search_term: Optional[str] = None, +): + """ + Lists installed Perl modules or searches for a specific module. + Helps verify if bioinformatics dependencies like Bio::Seq or Bio::DB::Fasta are available. + """ + # Using perldoc -l is a reliable way to find module paths + if search_term: + command = ["perldoc", "-l", search_term] + else: + # Fallback to listing all modules via instmodsh (part of ExtUtils::Installed) + # This is a bit complex in shell, so we use a perl one-liner + command = ["perl", "-MExtUtils::Installed", "-e", "print join('\\n', ExtUtils::Installed->new()->modules())"] + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(command), + "installed_modules": result.stdout.splitlines(), + "stdout": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stderr": e.stderr, + "error": "Could not retrieve module list. Ensure ExtUtils::Installed is available." + } + +@mcp.tool() +def bioperl_load_gff( + gff_file: str, + database_name: str, + db_type: str = "sqlite", + create: bool = True, + user: Optional[str] = None, + password: Optional[str] = None, +): + """ + Specialized importer tool for BioPerl's bp_seqfeature_load.pl. + Imports GFF3/GTF files into a SeqFeature database (SQLite, MySQL, or PostgreSQL). + """ + gff_path = Path(gff_file) + if not gff_path.exists(): + return {"error": f"GFF file not found: {gff_file}"} + + # Constructing the bp_seqfeature_load.pl command + command = ["bp_seqfeature_load.pl", "-d", database_name, "-f", db_type] + + if create: + command.append("-c") + if user: + command.extend(["-u", user]) + if password: + command.extend(["-p", password]) + + command.append(str(gff_path.absolute())) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "database": database_name, + "status": "Import completed" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"BioPerl GFF import failed: {e.stderr}" + } + except FileNotFoundError: + return {"error": "bp_seqfeature_load.pl not found. Is BioPerl installed?"} \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..84653a6bf5148647b48f5b2fbdd2b8ebad452605 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/perl-importer_server.py') +SERVER_NAME = 'biosci_perl_importer' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c7567e20b08ae22c47460f9f6c83554e2dc65c3f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-importer: + build: . + image: mcp-perl-importer:latest + container_name: mcp-perl-importer + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-importer + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dadb85fc3ebe13a606226fe218ba4cde9de05a44 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-importer + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-importer/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..89d3c482c3ba55f7d1334e2163d7c54cea9ad674 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-io-html via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-io-html -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-io-html_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-io-html_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-io-html_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f8025ab5c8ca377b4a6afd432832e723906c2aed --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_server.py @@ -0,0 +1,165 @@ +import subprocess +from pathlib import Path +from typing import Optional, Dict, Any + +@mcp.tool() +def io_html_get_encoding( + file_path: str, +) -> Dict[str, Any]: + """ + Detects the character encoding of an HTML file using the HTML5 sniffing algorithm. + This is equivalent to the IO::HTML::html_file_and_encoding function. + + Args: + file_path: Path to the HTML file to analyze. + """ + path = Path(file_path) + if not path.exists(): + return {"error": f"File not found: {file_path}"} + if not path.is_file(): + return {"error": f"Path is not a file: {file_path}"} + + # Perl script to extract encoding and BOM status + # html_file_and_encoding returns ($filehandle, $encoding, $bom) + perl_cmd = [ + "perl", + "-MIO::HTML", + "-e", + 'my ($fh, $enc, $bom) = IO::HTML::html_file_and_encoding($ARGV[0]); ' + 'print "encoding:$enc\\n"; ' + 'print "bom:" . ($bom ? "true" : "false") . "\\n";', + str(path) + ] + + try: + result = subprocess.run(perl_cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(perl_cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "detected_info": result.stdout.strip().split('\n') + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(perl_cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def io_html_read_content( + file_path: str, +) -> Dict[str, Any]: + """ + Opens an HTML file with the correctly detected encoding and returns its content. + This ensures that the HTML is read using the charset specified in the tags or BOM. + + Args: + file_path: Path to the HTML file to read. + """ + path = Path(file_path) + if not path.exists(): + return {"error": f"File not found: {file_path}"} + + # Perl script to open file with IO::HTML and print content to stdout + # We use binmode STDOUT :utf8 to ensure the output is passed correctly to the shell + perl_cmd = [ + "perl", + "-MIO::HTML", + "-e", + 'my $fh = IO::HTML::html_file($ARGV[0]); ' + 'binmode(STDOUT, ":utf8"); ' + 'while(<$fh>){ print $_; }', + str(path) + ] + + try: + result = subprocess.run(perl_cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(perl_cmd), + "content": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(perl_cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def io_html_sniff_encoding( + html_content: str, +) -> Dict[str, Any]: + """ + Sniffs the encoding from a string of HTML content. + Useful for detecting encoding of HTML data already in memory or from a stream. + + Args: + html_content: The raw HTML string/bytes to analyze for encoding. + """ + # We pass the content via a temporary file or stdin to avoid shell argument length limits + # Here we use a simple perl one-liner that takes the string as an argument + perl_cmd = [ + "perl", + "-MIO::HTML", + "-e", + 'my $encoding = IO::HTML::sniff_encoding($ARGV[0]); ' + 'print $encoding;', + html_content + ] + + try: + result = subprocess.run(perl_cmd, capture_output=True, text=True, check=True) + return { + "command_executed": "perl -MIO::HTML -e '...sniff_encoding...'", + "detected_encoding": result.stdout.strip(), + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": "perl -MIO::HTML -e '...sniff_encoding...'", + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def io_html_check_compatibility( + file_path: str, +) -> Dict[str, Any]: + """ + Checks if the IO::HTML module is correctly installed and can process the target file. + This is a diagnostic tool for the environment. + + Args: + file_path: Path to a sample HTML file. + """ + path = Path(file_path) + + perl_cmd = [ + "perl", + "-MIO::HTML", + "-e", + 'print "IO::HTML version: $IO::HTML::VERSION\\n"; ' + 'eval { IO::HTML::html_file($ARGV[0]) }; ' + 'if ($@) { print "Error: $@"; exit 1; } else { print "Status: OK\\n"; }', + str(path) if path.exists() else "" + ] + + try: + result = subprocess.run(perl_cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(perl_cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(perl_cmd), + "error": "Module IO::HTML might not be installed or file is inaccessible.", + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c98d8db73ac65e4d292dee2e347084b53269f4bd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/perl-io-html_server.py') +SERVER_NAME = 'biosci_perl_io_html' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..e8d588e44df8502d977f5fa6820119ac52ee8318 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-io-html: + build: . + image: mcp-perl-io-html:latest + container_name: mcp-perl-io-html + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-io-html + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cac91f069c11d84b42c72b87cfe6d73303945a06 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-io-html + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-io-html/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6054beb464bb28305abca1b0e1a23494e1b59af0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-ipc-cmd via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-ipc-cmd -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-ipc-cmd_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-ipc-cmd_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-ipc-cmd_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5b38787fd18f6464c6408bc11ef30d45396bb0ad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_server.py @@ -0,0 +1,215 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# This is a placeholder for the MCP decorator. +# In a real environment, it would be imported. +class mcp: + def tool(name: Optional[str] = None, description: Optional[str] = None): + def decorator(f): + return f + return decorator + +@mcp.tool(name="perl-ipc-cmd.perl", description="Run the Perl interpreter with specified options and scripts.") +def perl( + programfile: Optional[Path] = None, + arguments: Optional[List[str]] = None, + execute_lines: Optional[List[str]] = None, + execute_lines_with_features: Optional[List[str]] = None, + record_separator_octal: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + run_under_debugger: bool = False, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + autosplit_pattern: Optional[str] = None, + inplace_edit_extension: Optional[str] = None, + include_dirs: Optional[List[Path]] = None, + use_module_M: Optional[List[str]] = None, + use_module_m: Optional[List[str]] = None, + no_module_M: Optional[List[str]] = None, + no_module_m: Optional[List[str]] = None, + assume_loop: bool = False, + assume_loop_and_print: bool = False, + parse_switches_after_program: bool = False, + search_path_for_program: bool = False, + taint_warnings: bool = False, + taint_checks: bool = False, + dump_core: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config_summary: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_pre_shebang_text: Optional[str] = None, + disable_all_warnings: bool = False +) -> Dict[str, Any]: + """ + Executes the Perl interpreter. This tool wraps the `perl` command-line interface. + + Args: + programfile: Path to the Perl program file to execute. + arguments: A list of arguments to be passed to the program file. + execute_lines: Specifies one or more lines of a program using -e. Omit programfile. + execute_lines_with_features: Like -e, but enables all optional features (-E). Omit programfile. + record_separator_octal: Specify record separator (-0[octal]). + autosplit: Enable autosplit mode with -n or -p (-a). + unicode_features: Enable listed Unicode features (-C[number/list]). + check_syntax_only: Check syntax only; runs BEGIN and CHECK blocks (-c). + run_under_debugger: Run the program under the debugger (-d). + debugging_flags: Set debugging flags (-D[number/list]). + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup (-f). + autosplit_pattern: Specify the split() pattern for the -a switch (-F/pattern/). + inplace_edit_extension: Edit <> files in place (-i[extension]). Makes a backup if an extension is supplied. + include_dirs: Specify @INC/#include directories (-I). + use_module_M: Execute "use module..." before executing the program (-Mmodule). + use_module_m: Execute "use module..." before executing the program (-mmodule). + no_module_M: Execute "no module..." before executing the program (-M-module). + no_module_m: Execute "no module..." before executing the program (-m-module). + assume_loop: Assume a "while (<>) { ... }" loop around the program (-n). + assume_loop_and_print: Assume a loop like -n but also print the line (-p). + parse_switches_after_program: Enable rudimentary parsing for switches after the programfile (-s). + search_path_for_program: Look for the programfile using the PATH environment variable (-S). + taint_warnings: Enable tainting warnings (-t). + taint_checks: Enable tainting checks (-T). + dump_core: Dump core after parsing the program (-u). + allow_unsafe_operations: Allow unsafe operations (-U). + print_version: Print version, patchlevel, and license (-v). + print_config_summary: Print configuration summary (-V[:variable]). Provide an empty string for the full summary. + enable_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + ignore_pre_shebang_text: Ignore text before #!perl line, optionally cd to a directory (-x[directory]). + disable_all_warnings: Disable all warnings (-X). + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if (execute_lines or execute_lines_with_features) and programfile: + raise ValueError("Cannot specify both 'programfile' and 'execute_lines'/'execute_lines_with_features'.") + + if not (execute_lines or execute_lines_with_features or programfile or print_version or print_config_summary is not None): + raise ValueError("Either a 'programfile', 'execute_lines', 'execute_lines_with_features', 'print_version', or 'print_config_summary' must be provided.") + + if programfile and not programfile.exists(): + raise FileNotFoundError(f"The specified program file does not exist: {programfile}") + + if autosplit_pattern and not autosplit: + raise ValueError("'autosplit_pattern' (-F) can only be used with 'autosplit' (-a).") + + if assume_loop and assume_loop_and_print: + raise ValueError("'assume_loop' (-n) and 'assume_loop_and_print' (-p) are mutually exclusive. -p implies -n.") + + # --- Command Construction --- + cmd = ["perl"] + + if record_separator_octal is not None: + cmd.append(f"-0{record_separator_octal}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if run_under_debugger: + cmd.append("-d") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if no_sitecustomize: + cmd.append("-f") + if autosplit_pattern is not None: + cmd.append(f"-F{autosplit_pattern}") + if inplace_edit_extension is not None: + cmd.append(f"-i{inplace_edit_extension}") + if include_dirs: + for directory in include_dirs: + cmd.extend(["-I", str(directory)]) + if use_module_M: + for module in use_module_M: + cmd.append(f"-M{module}") + if use_module_m: + for module in use_module_m: + cmd.append(f"-m{module}") + if no_module_M: + for module in no_module_M: + cmd.append(f"-M-{module}") + if no_module_m: + for module in no_module_m: + cmd.append(f"-m-{module}") + if assume_loop: + cmd.append("-n") + if assume_loop_and_print: + cmd.append("-p") + if parse_switches_after_program: + cmd.append("-s") + if search_path_for_program: + cmd.append("-S") + if taint_warnings: + cmd.append("-t") + if taint_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config_summary is not None: + if print_config_summary: + cmd.append(f"-V:{print_config_summary}") + else: + cmd.append("-V") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if ignore_pre_shebang_text is not None: + cmd.append(f"-x{ignore_pre_shebang_text}") + if disable_all_warnings: + cmd.append("-X") + + if execute_lines: + for line in execute_lines: + cmd.extend(["-e", line]) + if execute_lines_with_features: + for line in execute_lines_with_features: + cmd.extend(["-E", line]) + + if programfile: + cmd.append(str(programfile)) + + if arguments: + if programfile or execute_lines or execute_lines_with_features: + cmd.append("--") + cmd.extend(arguments) + + # --- Subprocess Execution --- + command_executed = " ".join(cmd) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..217ba02d990aa0f15a55eb4d9d1d3bb5ff9ade1c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/perl-ipc-cmd_server.py') +SERVER_NAME = 'biosci_perl_ipc_cmd' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..231f624cbd35f89e90b153d9b95d77a03a8208ab --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-ipc-cmd: + build: . + image: mcp-perl-ipc-cmd:latest + container_name: mcp-perl-ipc-cmd + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-ipc-cmd + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dacba3d974c3dcd08afaf6920241321eb6602b8a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-ipc-cmd + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ipc-cmd/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json-xs/app/perl-json-xs_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json-xs/app/perl-json-xs_server.py new file mode 100644 index 0000000000000000000000000000000000000000..00133085937e09d3f1c91d0687793eaba3a72fd4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json-xs/app/perl-json-xs_server.py @@ -0,0 +1,223 @@ +from pathlib import Path +import subprocess +from typing import Optional, List, Dict, Any + +@mcp.tool() +def json_xs( + input_file: str, + from_format: str = "json", + to_format: str = "json", + expression: str = "", + verbose: bool = False, + output_file: str = "", +): + """ + JSON::XS command line utility for converting, filtering, and transforming JSON data. + This tool allows you to convert between various formats and apply Perl transformations. + + Args: + input_file: Path to the input file to process. + from_format: The format of the input file. + Options: json, storable, clojure, eval, yaml, cbor, string. + to_format: The format of the output. + Options: json, json-utf8, json-ascii, json-pretty, storable, + storable-file, clojure, eval, yaml, cbor, string, none. + expression: Perl code to evaluate on the data (the data is stored in $_). + verbose: Enable verbose output from the json_xs utility. + output_file: Optional path to save the output. If not provided, output is returned in stdout. + """ + # Input validation + input_path = Path(input_file) + if not input_path.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + valid_from = ["json", "storable", "clojure", "eval", "yaml", "cbor", "string"] + valid_to = ["json", "json-utf8", "json-ascii", "json-pretty", "storable", + "storable-file", "clojure", "eval", "yaml", "cbor", "string", "none"] + + if from_format not in valid_from: + raise ValueError(f"Invalid from_format '{from_format}'. Must be one of: {', '.join(valid_from)}") + if to_format not in valid_to: + raise ValueError(f"Invalid to_format '{to_format}'. Must be one of: {', '.join(valid_to)}") + + # Construct command + cmd = ["json_xs"] + if verbose: + cmd.append("-v") + + cmd.extend(["-f", from_format]) + cmd.extend(["-t", to_format]) + + if expression: + cmd.extend(["-e", expression]) + + cmd.append(str(input_path)) + + try: + # Subprocess execution + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + output_content = result.stdout + + # Handle output file + output_files = [] + if output_file: + out_path = Path(output_file) + out_path.write_text(output_content) + output_files.append(str(out_path)) + + return { + "command_executed": " ".join(cmd), + "stdout": output_content, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Command failed with return code {e.returncode}" + } + +@mcp.tool() +def perl_json_xs_oo_process( + input_file: str, + pretty: bool = False, + ascii: bool = False, + latin1: bool = False, + utf8: bool = True, + canonical: bool = False, + relaxed: bool = False, + allow_nonref: bool = True, + space_before: bool = False, + space_after: bool = False, + indent: bool = False, + output_file: str = "", +): + """ + Process JSON using the JSON::XS Object-Oriented interface for fine-grained control over + encoding and decoding flags. This exposes the internal configuration methods of the module. + + Args: + input_file: Path to the JSON input file. + pretty: Enable all formatting flags (indent, space_before, space_after). + ascii: Escape Unicode characters outside the 0..127 range. + latin1: Encode resulting JSON text as ISO-8859-1. + utf8: Encode/decode JSON result into/from UTF-8. + canonical: Sort object keys alphabetically. + relaxed: Accept extensions like trailing commas and shell-style comments. + allow_nonref: Allow non-references (scalars) at the top level. + space_before: Add a space before the colon in objects. + space_after: Add a space after the colon and comma. + indent: Use a multiline format with indentation. + output_file: Optional path to save the processed JSON. + """ + input_path = Path(input_file) + if not input_path.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + # Construct Perl one-liner to use the OO interface + # We build the coder object by chaining the mutators + perl_script = ( + "use JSON::XS; " + "local $/; " + "my $raw = <>; " + "my $coder = JSON::XS->new" + f"->ascii({1 if ascii else 0})" + f"->latin1({1 if latin1 else 0})" + f"->utf8({1 if utf8 else 0})" + f"->pretty({1 if pretty else 0})" + f"->canonical({1 if canonical else 0})" + f"->relaxed({1 if relaxed else 0})" + f"->allow_nonref({1 if allow_nonref else 0})" + f"->space_before({1 if space_before else 0})" + f"->space_after({1 if space_after else 0})" + f"->indent({1 if indent else 0}); " + "my $data = $coder->decode($raw); " + "print $coder->encode($data);" + ) + + cmd = ["perl", "-MJSON::XS", "-e", perl_script, str(input_path)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + output_content = result.stdout + output_files = [] + if output_file: + out_path = Path(output_file) + out_path.write_text(output_content) + output_files.append(str(out_path)) + + return { + "command_executed": " ".join(cmd), + "stdout": output_content, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Perl execution failed: {e.stderr}" + } + +@mcp.tool() +def perl_json_xs_version(): + """ + Check the installed version of the JSON::XS Perl module and the json_xs utility. + """ + try: + # Check module version + perl_ver_cmd = ["perl", "-MJSON::XS", "-e", "print $JSON::XS::VERSION"] + perl_res = subprocess.run(perl_ver_cmd, capture_output=True, text=True, check=True) + + # Check CLI utility version + cli_ver_cmd = ["json_xs", "-v"] + # json_xs -v usually prints to stderr and might exit with 0 or 1 depending on version + cli_res = subprocess.run(cli_ver_cmd, capture_output=True, text=True) + + return { + "module_version": perl_res.stdout.strip(), + "cli_info": cli_res.stderr.strip() if cli_res.stderr else cli_res.stdout.strip(), + "status": "success" + } + except Exception as e: + return { + "error": str(e), + "status": "failed" + } + +@mcp.tool() +def perl_json_xs_validate(input_file: str): + """ + Validate a JSON file using JSON::XS. This is a convenience wrapper around the + decode_json functional interface. + + Args: + input_file: Path to the JSON file to validate. + """ + input_path = Path(input_file) + if not input_path.exists(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + # Use decode_json which is the fastest functional interface + perl_script = "use JSON::XS; local $/; my $raw = <>; eval { decode_json($raw) }; if ($@) { die $@ } else { print 'Valid JSON' }" + cmd = ["perl", "-MJSON::XS", "-e", perl_script, str(input_path)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "is_valid": True, + "stdout": result.stdout.strip(), + "command_executed": " ".join(cmd) + } + except subprocess.CalledProcessError as e: + return { + "is_valid": False, + "stderr": e.stderr.strip(), + "command_executed": " ".join(cmd), + "error": "JSON validation failed" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/perl-json_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/perl-json_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..67071ac1c73375cc40e8de539948c456d622dc0c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/perl-json_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/perl-json_server.py') +SERVER_NAME = 'biosci_perl_json' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-json/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7feffc1fda0d7e7b3b726533c493697fdfe86478 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-libwww-perl via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-libwww-perl -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-libwww-perl_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-libwww-perl_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-libwww-perl_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d3832e40f89d33bd921092a3486928823e4cd224 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_server.py @@ -0,0 +1,298 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +def _run_command(cmd: List[str], input_data: Optional[str] = None) -> Dict[str, Any]: + """Helper to run subprocess commands and return structured output.""" + try: + process = subprocess.run( + cmd, + input=input_data.encode() if input_data else None, + capture_output=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout.decode(), + "stderr": process.stderr.decode(), + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout.decode(), + "stderr": e.stderr.decode(), + "error": str(e), + "status": "error" + } + +@mcp.tool() +def lwp_request( + url: str, + method: str = "GET", + timeout: int = 180, + content_type: Optional[str] = None, + headers: Optional[List[str]] = None, + proxy: Optional[str] = None, + credentials: Optional[str] = None, + base_url: Optional[str] = None, + if_modified_since: Optional[str] = None, + show_headers: bool = False, + show_status_chain: bool = False, + no_content: bool = False, + force: bool = False, + output_format: Optional[str] = None, + input_data: Optional[str] = None, +) -> Dict[str, Any]: + """ + Execute an HTTP request using lwp-request (libwww-perl). + + Args: + url: The URL to request. + method: HTTP method (GET, POST, HEAD, PUT, DELETE). + timeout: Timeout in seconds (default 180). + content_type: Set the Content-Type header for the request (-c). + headers: List of additional headers in 'Header: Value' format (-H). + proxy: Proxy URL to use (-p). + credentials: User credentials in 'user:pass' format (-C). + base_url: Base URL for relative links (-b). + if_modified_since: If-Modified-Since time (-i). + show_headers: Display response headers (-e). + show_status_chain: Show the response status chain (-S). + no_content: Do not display the response content (-d). + force: Force the request (-f). + output_format: Output format (e.g., 'html', 'text', 'ps', 'dump') (-o). + input_data: Data to be sent in the request body (for POST/PUT). + """ + if not url: + raise ValueError("URL is required") + if timeout <= 0: + raise ValueError("Timeout must be a positive integer") + + cmd = ["lwp-request", "-m", method.upper(), "-t", str(timeout)] + + if content_type: + cmd.extend(["-c", content_type]) + if headers: + for h in headers: + cmd.extend(["-H", h]) + if proxy: + cmd.extend(["-p", proxy]) + if credentials: + cmd.extend(["-C", credentials]) + if base_url: + cmd.extend(["-b", base_url]) + if if_modified_since: + cmd.extend(["-i", if_modified_since]) + if show_headers: + cmd.append("-e") + if show_status_chain: + cmd.append("-S") + if no_content: + cmd.append("-d") + if force: + cmd.append("-f") + if output_format: + cmd.extend(["-o", output_format]) + + cmd.append(url) + + return _run_command(cmd, input_data) + +@mcp.tool() +def lwp_get( + url: str, + timeout: int = 180, + headers: Optional[List[str]] = None, + proxy: Optional[str] = None, + show_headers: bool = False, + no_content: bool = False, +) -> Dict[str, Any]: + """ + Send a GET request using the GET utility (alias for lwp-request). + + Args: + url: The URL to request. + timeout: Timeout in seconds (default 180). + headers: List of additional headers in 'Header: Value' format. + proxy: Proxy URL to use. + show_headers: Display response headers. + no_content: Do not display response content. + """ + if not url: + raise ValueError("URL is required") + + cmd = ["GET", "-t", str(timeout)] + if headers: + for h in headers: + cmd.extend(["-H", h]) + if proxy: + cmd.extend(["-p", proxy]) + if show_headers: + cmd.append("-e") + if no_content: + cmd.append("-d") + + cmd.append(url) + return _run_command(cmd) + +@mcp.tool() +def lwp_post( + url: str, + input_data: str, + content_type: str = "application/x-www-form-urlencoded", + timeout: int = 180, + headers: Optional[List[str]] = None, + proxy: Optional[str] = None, + show_headers: bool = False, +) -> Dict[str, Any]: + """ + Send a POST request using the POST utility (alias for lwp-request). + + Args: + url: The URL to request. + input_data: Data to be sent in the request body. + content_type: Content-Type of the input data (default application/x-www-form-urlencoded). + timeout: Timeout in seconds (default 180). + headers: List of additional headers in 'Header: Value' format. + proxy: Proxy URL to use. + show_headers: Display response headers. + """ + if not url: + raise ValueError("URL is required") + + cmd = ["POST", "-t", str(timeout), "-c", content_type] + if headers: + for h in headers: + cmd.extend(["-H", h]) + if proxy: + cmd.extend(["-p", proxy]) + if show_headers: + cmd.append("-e") + + cmd.append(url) + return _run_command(cmd, input_data) + +@mcp.tool() +def lwp_head( + url: str, + timeout: int = 180, + headers: Optional[List[str]] = None, + proxy: Optional[str] = None, +) -> Dict[str, Any]: + """ + Send a HEAD request using the HEAD utility (alias for lwp-request). + + Args: + url: The URL to request. + timeout: Timeout in seconds (default 180). + headers: List of additional headers in 'Header: Value' format. + proxy: Proxy URL to use. + """ + if not url: + raise ValueError("URL is required") + + cmd = ["HEAD", "-t", str(timeout)] + if headers: + for h in headers: + cmd.extend(["-H", h]) + if proxy: + cmd.extend(["-p", proxy]) + + cmd.append(url) + return _run_command(cmd) + +@mcp.tool() +def lwp_download( + url: str, + output_file: Optional[str] = None, +) -> Dict[str, Any]: + """ + Download a file from a URL using lwp-download. + + Args: + url: The URL to download. + output_file: Optional local filename to save the content. + """ + if not url: + raise ValueError("URL is required") + + cmd = ["lwp-download", url] + if output_file: + out_path = Path(output_file) + if not out_path.parent.exists(): + raise ValueError(f"Parent directory does not exist: {out_path.parent}") + cmd.append(output_file) + + return _run_command(cmd) + +@mcp.tool() +def lwp_mirror( + url: str, + output_file: str, +) -> Dict[str, Any]: + """ + Mirror a URL to a local file using lwp-mirror. + Only downloads if the remote file is newer than the local copy. + + Args: + url: The URL to mirror. + output_file: Local filename to save the content. + """ + if not url: + raise ValueError("URL is required") + if not output_file: + raise ValueError("Output file path is required") + + out_path = Path(output_file) + if not out_path.parent.exists(): + raise ValueError(f"Parent directory does not exist: {out_path.parent}") + + cmd = ["lwp-mirror", url, output_file] + return _run_command(cmd) + +@mcp.tool() +def lwp_dump( + url: str, +) -> Dict[str, Any]: + """ + Dump the structure of a resource using lwp-dump. + + Args: + url: The URL to dump. + """ + if not url: + raise ValueError("URL is required") + + cmd = ["lwp-dump", url] + return _run_command(cmd) + +@mcp.tool() +def lwp_version() -> Dict[str, Any]: + """Get the version of libwww-perl.""" + return _run_command(["lwp-request", "-v"]) + +@mcp.tool() +def perl_lwp_execute( + script_content: str, + args: Optional[List[str]] = None, +) -> Dict[str, Any]: + """ + Execute a Perl script that uses libwww-perl (LWP). + + Args: + script_content: The Perl code to execute. + args: Optional command line arguments for the script. + """ + if not script_content: + raise ValueError("Script content is required") + + # Prepend common LWP modules if not explicitly present in the snippet + if "use LWP" not in script_content: + script_content = "use LWP::UserAgent; use HTTP::Request; use HTTP::Response; " + script_content + + cmd = ["perl", "-e", script_content] + if args: + cmd.extend(args) + + return _run_command(cmd) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ad4e2e03151240befb2cce13a27681323173eb7a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/perl-libwww-perl_server.py') +SERVER_NAME = 'biosci_perl_libwww_perl' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..34c1c90142d2332cc38a74838f37d7c16419ab0c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-libwww-perl: + build: . + image: mcp-perl-libwww-perl:latest + container_name: mcp-perl-libwww-perl + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-libwww-perl + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1a8e865e1f758d15ebd21393f2c36578818a3a6a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-libwww-perl + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-libwww-perl/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5220ae243942ab8f8c33318264b70ce3fd7080b6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-list-moreutils-xs via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-list-moreutils-xs -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-list-moreutils-xs_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-list-moreutils-xs_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-list-moreutils-xs_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_server.py new file mode 100644 index 0000000000000000000000000000000000000000..89252dbadb4120effcc7c11d00ff752f43935436 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_server.py @@ -0,0 +1,262 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union +import os +import tempfile + +# No need to import mcp, as per instructions. + +@mcp.tool() +def run_perl_script( + program_file: Optional[Path] = None, + program_arguments: Optional[List[str]] = None, + record_separator: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger_arg: Optional[str] = None, + debugging_flags: Optional[str] = None, + program_lines: Optional[List[str]] = None, + program_lines_extended: Optional[List[str]] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + edit_in_place_extension: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_terminator: Optional[str] = None, + use_modules: Optional[List[str]] = None, + no_modules: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + rudimentary_switch_parsing: bool = False, + search_path_for_programfile: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + dump_core_on_parse_error: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_text_before_shebang: bool = False, + ignore_text_before_shebang_dir: Optional[Path] = None, + disable_all_warnings: bool = False, +) -> dict: + """ + Executes a Perl script or one-liner with various Perl interpreter switches. + + This tool wraps the 'perl' command, allowing users to run Perl programs + and leverage modules like List::MoreUtils::XS (if available in the environment). + The 'perl-list-moreutils-xs' package provides the List::MoreUtils::XS module, + which can be used within your Perl script (e.g., `use List::MoreUtils::XS;`). + + Args: + program_file: Path to the Perl program file to execute. + program_arguments: Arguments to pass to the Perl program. + record_separator: Specify record separator. Use '0' for NUL, '0777' for paragraph mode, + or an empty string '' for just -0 (NUL). Set to None to disable. + autosplit: Enable autosplit mode with -n or -p (splits $_ into @F). + unicode_features: Enables listed Unicode features (e.g., 'all', 'io,say'). + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). + debugger_arg: Run program under debugger. Use a string like 'MyDebugger' for -d:MyDebugger, + or an empty string '' for just -d. Set to None to disable. + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). + program_lines: One or more lines of Perl program code to execute (for -e). + program_lines_extended: One or more lines of Perl program code, like -e, but enables all optional features (for -E). + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup. + split_pattern: split() pattern for -a switch (e.g., '/\t/'). + edit_in_place_extension: Edit <> files in place. Makes backup if extension supplied (e.g., '.bak'). + Use an empty string '' for no backup (modifies file directly). + Set to None to disable in-place editing. + include_directories: Specify @INC/#include directories. + line_ending_terminator: Enable line ending processing, specifies line terminator. + Use '0' for NUL, '0777' for paragraph mode, or an empty string '' for just -l. + Set to None to disable. + use_modules: Execute 'use module...' before executing program (e.g., ['List::MoreUtils::XS', 'MyModule qw(func)']). + Corresponds to -M or -m. + no_modules: Execute 'no module...' before executing program (e.g., ['MyModule']). Corresponds to -M-. + loop_around_program: Assume "while (<>) { ... }" loop around program (for -n). + loop_and_print: Assume loop like -n but print line also, like sed (for -p). + rudimentary_switch_parsing: Enable rudimentary parsing for switches after programfile. + search_path_for_programfile: Look for programfile using PATH environment variable. + tainting_warnings: Enable tainting warnings. + tainting_checks: Enable tainting checks. + dump_core_on_parse_error: Dump core after parsing program. + allow_unsafe_operations: Allow unsafe operations. + print_version: Print version, patchlevel and license (-v). + print_config: Print configuration summary or a single Config.pm variable (-V). + Use an empty string '' for summary (-V), or a variable name like 'archname' for -V:archname. + Set to None to disable. + enable_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + ignore_text_before_shebang: Ignore text before #!perl line (-x). + ignore_text_before_shebang_dir: Ignore text before #!perl line and optionally cd to directory (-x[directory]). + disable_all_warnings: Disable all warnings (-X). + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + command = ["perl"] + output_files = [] + + # --- Input Validation --- + if program_file: + if not program_file.is_file(): + raise ValueError(f"Program file not found: {program_file}") + + if not program_file and not (program_lines or program_lines_extended): + raise ValueError("Either 'program_file' or at least one of 'program_lines' or 'program_lines_extended' must be provided.") + + if program_file and (program_lines or program_lines_extended): + raise ValueError("Cannot provide both 'program_file' and 'program_lines'/'program_lines_extended'. Choose one method for program input.") + + if loop_around_program and loop_and_print: + raise ValueError("Options 'loop_around_program' (-n) and 'loop_and_print' (-p) are mutually exclusive.") + + if print_version and print_config is not None: + raise ValueError("Option 'print_version' (-v) cannot be combined with '-V' or '-V:variable'.") + + if disable_all_warnings: + if enable_warnings or enable_all_warnings: + raise ValueError("Option 'disable_all_warnings' (-X) cannot be combined with 'enable_warnings' (-w) or 'enable_all_warnings' (-W).") + elif enable_all_warnings: + if enable_warnings: + raise ValueError("Option 'enable_all_warnings' (-W) implies 'enable_warnings' (-w), so they cannot be combined explicitly.") + + if edit_in_place_extension is not None: + if not program_file: + raise ValueError("Option 'edit_in_place_extension' (-i) requires 'program_file' to be specified.") + # The original file is modified. If an extension is provided, a backup is made. + if edit_in_place_extension != "": # If extension is provided, a backup is made + backup_file = Path(str(program_file) + edit_in_place_extension) + output_files.append(str(backup_file)) + output_files.append(str(program_file)) # The original file is modified in place + + if ignore_text_before_shebang and ignore_text_before_shebang_dir: + raise ValueError("Cannot use both -x (no directory) and -x[directory].") + if ignore_text_before_shebang_dir: + if not ignore_text_before_shebang_dir.is_dir(): + raise ValueError(f"Directory for -x not found: {ignore_text_before_shebang_dir}") + if include_directories: + for d in include_directories: + if not d.is_dir(): + raise ValueError(f"Include directory not found: {d}") + + + # --- Build Command --- + + if record_separator is not None: + command.append(f"-0{record_separator}") + if autosplit: + command.append("-a") + if unicode_features: + command.append(f"-C{unicode_features}") + if check_syntax_only: + command.append("-c") + if debugger_arg is not None: + if debugger_arg == "": + command.append("-d") + else: + command.append(f"-d:{debugger_arg}") + if debugging_flags: + command.append(f"-D{debugging_flags}") + if program_lines: + for line in program_lines: + command.extend(["-e", line]) + if program_lines_extended: + for line in program_lines_extended: + command.extend(["-E", line]) + if no_sitecustomize: + command.append("-f") + if split_pattern: + command.append(f"-F{split_pattern}") + if edit_in_place_extension is not None: + command.append(f"-i{edit_in_place_extension}") + if include_directories: + for d in include_directories: + command.extend(["-I", str(d)]) + if line_ending_terminator is not None: + command.append(f"-l{line_ending_terminator}") + + if use_modules: + for module_spec in use_modules: + command.append(f"-M{module_spec}") + if no_modules: + for module_spec in no_modules: + command.append(f"-M-{module_spec}") + + if loop_around_program: + command.append("-n") + if loop_and_print: + command.append("-p") + if rudimentary_switch_parsing: + command.append("-s") + if search_path_for_programfile: + command.append("-S") + if tainting_warnings: + command.append("-t") + if tainting_checks: + command.append("-T") + if dump_core_on_parse_error: + command.append("-u") + if allow_unsafe_operations: + command.append("-U") + if print_version: + command.append("-v") + if print_config is not None: + if print_config == "": + command.append("-V") + else: + command.append(f"-V:{print_config}") + if enable_warnings: + command.append("-w") + if enable_all_warnings: + command.append("-W") + if ignore_text_before_shebang_dir: + command.append(f"-x{ignore_text_before_shebang_dir}") + elif ignore_text_before_shebang: + command.append("-x") + if disable_all_warnings: + command.append("-X") + + # Add program file and its arguments last + if program_file: + command.append(str(program_file)) + if program_arguments: + command.extend(program_arguments) + + # --- Execute Command --- + command_executed = " ".join(str(arg) for arg in command) + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + stdout = process.stdout + stderr = process.stderr + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "returncode": e.returncode, + "output_files": output_files + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'perl' command not found. Ensure Perl is installed and in your PATH.", + "error": "Perl executable not found.", + "returncode": 127, + "output_files": output_files + } + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2691a24d6a7510f8767536161cb09f4dd8a12434 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/perl-list-moreutils-xs_server.py') +SERVER_NAME = 'biosci_perl_list_moreutils_xs' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..bdec36fe3fdc756016140c7439ea6441139be820 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-list-moreutils-xs: + build: . + image: mcp-perl-list-moreutils-xs:latest + container_name: mcp-perl-list-moreutils-xs + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-list-moreutils-xs + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..749ed1ec7787472024efd71738867bcc02c9cf38 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-list-moreutils-xs + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-list-moreutils-xs/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e2420b9059a39b61e9327929d1aea2421e3e3416 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-mailtools via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-mailtools -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-mailtools_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-mailtools_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-mailtools_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mailtools/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8e1c93b29d3e5a1566628158daa83817e3f62e05 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-math-bezier via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-math-bezier -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-math-bezier_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-math-bezier_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-math-bezier_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5c050968eaf67335d144a20582820cd2de87467f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_server.py @@ -0,0 +1,127 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# MCP decorator is omitted as per instructions, but this is an MCP-ready tool. +# import mcp + +@mcp.tool() +def run_perl_script( + programfile: Optional[Path] = None, + program: Optional[str] = None, + arguments: Optional[List[str]] = None, + include_dirs: Optional[List[Path]] = None, + modules: Optional[List[str]] = None, + check_syntax_only: bool = False, + enable_warnings: bool = False, + disable_warnings: bool = False, + enable_all_warnings: bool = False, + enable_taint_checks: bool = False, + enable_optional_features_for_program: bool = False, +) -> dict: + """ + Executes a Perl script using the Perl interpreter. + + This tool serves as a generic wrapper for the `perl` command-line interpreter. + The `perl-math-bezier` package is a library and does not provide a direct executable. + To use it, you must provide a Perl script or a one-liner that utilizes the library's modules (e.g., via the -M flag or 'use Math::Bezier;' in the script). + + Args: + programfile: Path to the Perl program file to execute. + program: A one-liner string of a Perl program to execute (uses -e or -E). + arguments: A list of arguments to pass to the program file. + include_dirs: A list of directories to add to Perl's @INC search path (uses -I). + modules: A list of Perl modules to load before executing the program (uses -M). + Example: ["Math::Bezier"] + check_syntax_only: If True, checks the syntax of the script without executing it (uses -c). + enable_warnings: If True, enables many useful warnings (uses -w). + disable_warnings: If True, disables all warnings (uses -X). This overrides other warning flags. + enable_all_warnings: If True, enables all warnings (uses -W). This is overridden by disable_warnings. + enable_taint_checks: If True, enables tainting checks for security (uses -T). + enable_optional_features_for_program: If True and `program` is specified, enables all optional features (uses -E instead of -e). + + Returns: + A dictionary containing the executed command, stdout, and stderr. + """ + # --- Input Validation --- + if not programfile and not program: + raise ValueError("Either 'programfile' or 'program' must be provided.") + if programfile and program: + raise ValueError("'programfile' and 'program' are mutually exclusive.") + + if programfile and not programfile.is_file(): + raise FileNotFoundError(f"The program file '{programfile}' does not exist.") + + if enable_optional_features_for_program and not program: + raise ValueError("'enable_optional_features_for_program' can only be True when 'program' is specified.") + + if include_dirs: + for directory in include_dirs: + if not directory.is_dir(): + raise FileNotFoundError(f"The include directory '{directory}' does not exist.") + + # --- Command Construction --- + cmd = ["perl"] + + # Handle warning flags (priority: -X > -W > -w) + if disable_warnings: + cmd.append("-X") + elif enable_all_warnings: + cmd.append("-W") + elif enable_warnings: + cmd.append("-w") + + if check_syntax_only: + cmd.append("-c") + + if enable_taint_checks: + cmd.append("-T") + + if include_dirs: + for directory in include_dirs: + cmd.extend(["-I", str(directory)]) + + if modules: + for module in modules: + cmd.extend(["-M", module]) + + # Handle program source + if program: + if enable_optional_features_for_program: + cmd.extend(["-E", program]) + else: + cmd.extend(["-e", program]) + elif programfile: + cmd.append(str(programfile)) + + # Add script arguments + if arguments: + cmd.extend(arguments) + + command_executed = " ".join(cmd) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] # This tool does not explicitly create output files + } + except FileNotFoundError: + raise RuntimeError("Perl executable not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Perl script execution failed with return code {e.returncode}", + "output_files": [] + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d1009f07bf93097bae339d647a6b1bfd81b07fce --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/perl-math-bezier_server.py') +SERVER_NAME = 'biosci_perl_math_bezier' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..bcbe4db6c3bb16a4727957bd9bf6c56430ffdb2f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-math-bezier: + build: . + image: mcp-perl-math-bezier:latest + container_name: mcp-perl-math-bezier + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-math-bezier + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c7fb857c5b0096c00dc149299eb0d2fc44ae908d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-math-bezier + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-bezier/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f65e692434c73f1aa389475f19cd01851794b062 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-math-spline via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-math-spline -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-math-spline_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-math-spline_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-math-spline_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2a643636295c70195f1ce87d3ffe3ae81ecbe179 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_server.py @@ -0,0 +1,158 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Dict, List, Optional + +# The mcp.tool decorator is assumed to be available in the execution environment. +# from mcp import tool as mcp + +@mcp.tool() +def math_spline_interpolate( + input_data: Path, + query_points: Path, + output_file: Optional[Path] = None, +) -> Dict: + """ + Performs cubic spline interpolation using the Perl Math::Spline library. + + This tool acts as a wrapper around the 'perl-math-spline' library, which does not + provide a direct command-line interface. It dynamically creates and executes a + Perl script to perform the interpolation. + + Args: + input_data: Path to a file containing the known data points. The file should + have two whitespace-separated columns: x and y values. + query_points: Path to a file containing the x-values for which to interpolate + y-values. Each x-value should be on a new line. + output_file: Optional path to save the interpolation results. If not provided, + results are returned in stdout. The output will be a two-column, + tab-separated file of query-x and interpolated-y values. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list + of output files generated. + """ + # --- Input Validation --- + if not input_data.is_file(): + raise FileNotFoundError(f"Input data file not found: {input_data}") + if not query_points.is_file(): + raise FileNotFoundError(f"Query points file not found: {query_points}") + if output_file and not output_file.parent.is_dir(): + raise NotADirectoryError(f"Output directory does not exist: {output_file.parent}") + + # --- Perl Wrapper Script --- + # This script reads the data, creates a spline, and evaluates it at query points. + perl_script_content = f""" + #!/usr/bin/env perl + + use strict; + use warnings; + use Math::Spline; + + # Ensure correct number of arguments + if (@ARGV != 2) {{ + die "Usage: $0 \\n"; + }} + + my ($input_data_file, $query_points_file) = @ARGV; + + # Read known X and Y data points + my (@x, @y); + open my $data_fh, '<', $input_data_file or die "Could not open $input_data_file: $!"; + while (my $line = <$data_fh>) {{ + chomp $line; + next if $line =~ /^\\s*$/; # Skip empty lines + my ($x_val, $y_val) = split /\\s+/, $line; + push @x, $x_val; + push @y, $y_val; + }} + close $data_fh; + + # Check if we have enough data points for interpolation + if (@x < 2) {{ + die "Error: At least 2 data points are required for spline interpolation.\\n"; + }} + + # Create the spline object + my $spline; + eval {{ + $spline = Math::Spline->new(\\@x, \\@y); + }}; + if ($@) {{ + die "Error creating spline object: $@"; + }} + + # Read query points and perform interpolation + open my $query_fh, '<', $query_points_file or die "Could not open $query_points_file: $!"; + while (my $query_x = <$query_fh>) {{ + chomp $query_x; + next if $query_x =~ /^\\s*$/; # Skip empty lines + my $interp_y = $spline->evaluate($query_x); + print "$query_x\\t$interp_y\\n"; + }} + close $query_fh; + """ + + output_files: List[str] = [] + command_executed = "" + + try: + with tempfile.NamedTemporaryFile( + mode="w", delete=False, suffix=".pl" + ) as tmp_script: + tmp_script.write(perl_script_content) + tmp_script.flush() + tmp_script_path = Path(tmp_script.name) + + # --- Command Construction --- + cmd = [ + "perl", + str(tmp_script_path), + str(input_data), + str(query_points), + ] + command_executed = " ".join(cmd) + + # --- Subprocess Execution --- + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + stdout_str = result.stdout + stderr_str = result.stderr + + # --- Output Handling --- + if output_file: + output_file.write_text(stdout_str) + output_files.append(str(output_file)) + + except FileNotFoundError: + # This error is caught if 'perl' is not in the system's PATH + return { + "command_executed": "perl ...", + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "output_files": [], + } + except subprocess.CalledProcessError as e: + # This handles errors from the Perl script itself (e.g., file not found, not enough data points) + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": output_files, + } + finally: + # Ensure temporary script is cleaned up + if 'tmp_script_path' in locals() and tmp_script_path.exists(): + tmp_script_path.unlink() + + # --- Structured Result Return --- + return { + "command_executed": command_executed, + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5b30b12ae1cad365226bae7d9e6a97ea38646e26 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/perl-math-spline_server.py') +SERVER_NAME = 'biosci_perl_math_spline' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3db92fca86f0596702e09e56191f890e24455f07 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-math-spline: + build: . + image: mcp-perl-math-spline:latest + container_name: mcp-perl-math-spline + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-math-spline + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b022697aea26aab714283873cdf92c4f7a58d9ba --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-math-spline + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-math-spline/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cdb9f30ee85a0d49bada42196d0894cbe5cd5d33 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-mime-types via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-mime-types -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-mime-types_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-mime-types_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-mime-types_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_server.py new file mode 100644 index 0000000000000000000000000000000000000000..208c692b02ef23eebc4325012545d7feaf3713ec --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_server.py @@ -0,0 +1,183 @@ +import subprocess +import shlex +from pathlib import Path +from typing import Optional, List, Dict + +# MCP decorator is not needed for the final code, as per instructions. +# Assuming @mcp.tool() is available in the execution environment. + +# @mcp.tool() +def run_perl( + programfile: Optional[Path] = None, + arguments: Optional[List[str]] = None, + execute_program: Optional[List[str]] = None, + execute_program_extended: Optional[List[str]] = None, + record_separator: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + run_under_debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + in_place_edit: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + enable_line_ending_processing: Optional[str] = None, + use_module: Optional[List[str]] = None, + use_module_no_import: Optional[List[str]] = None, + no_module: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + enable_switch_parsing: bool = False, + search_path_for_program: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + dump_core: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_pre_hashbang_text: bool = False, + change_to_directory_x: Optional[Path] = None, + disable_all_warnings: bool = False, +) -> Dict[str, any]: + """ + Executes the Perl interpreter with specified switches and a program file or one-liner. + + This tool wraps the `perl` command-line interpreter. The `perl-mime-types` package + is a library and does not provide a direct executable. You can use this tool to run + Perl scripts that may utilize the `perl-mime-types` library. + """ + # --- Input Validation --- + if programfile and (execute_program or execute_program_extended): + raise ValueError("Cannot specify both a 'programfile' and an 'execute_program' or 'execute_program_extended' one-liner.") + if not programfile and not execute_program and not execute_program_extended and not print_version and print_config is None: + raise ValueError("Must provide a 'programfile', 'execute_program', 'execute_program_extended', 'print_version', or 'print_config'.") + if programfile and not programfile.is_file(): + raise FileNotFoundError(f"Program file not found: {programfile}") + if change_to_directory_x and not change_to_directory_x.is_dir(): + raise NotADirectoryError(f"Directory specified for -x not found: {change_to_directory_x}") + + # --- Command Construction --- + cmd = ["perl"] + + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if run_under_debugger is not None: + cmd.append(f"-d:{run_under_debugger}" if run_under_debugger else "-d") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if in_place_edit is not None: + cmd.append(f"-i{in_place_edit}") + if include_directories: + for directory in include_directories: + cmd.extend(["-I", str(directory)]) + if enable_line_ending_processing is not None: + cmd.append(f"-l{enable_line_ending_processing}") + if use_module: + for module in use_module: + cmd.append(f"-M{module}") + if use_module_no_import: + for module in use_module_no_import: + cmd.append(f"-m{module}") + if no_module: + for module in no_module: + cmd.append(f"-M-{module}") + if loop_around_program: + cmd.append("-n") + if loop_and_print: + cmd.append("-p") + if enable_switch_parsing: + cmd.append("-s") + if search_path_for_program: + cmd.append("-S") + if tainting_warnings: + cmd.append("-t") + if tainting_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config is not None: + cmd.append(f"-V:{print_config}" if print_config else "-V") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if change_to_directory_x: + cmd.append(f"-x{change_to_directory_x}") + elif ignore_pre_hashbang_text: + cmd.append("-x") + if disable_all_warnings: + cmd.append("-X") + + if execute_program: + for prog_line in execute_program: + cmd.extend(["-e", prog_line]) + if execute_program_extended: + for prog_line in execute_program_extended: + cmd.extend(["-E", prog_line]) + + if programfile: + cmd.append(str(programfile)) + + if arguments: + cmd.extend(arguments) + + # --- Subprocess Execution --- + command_executed = shlex.join(cmd) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + stdout = result.stdout + stderr = result.stderr + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [] + } + + # --- Structured Result Return --- + output_files = [] + if in_place_edit is not None and programfile: + # The original file is modified in place. + output_files.append(str(programfile)) + # A backup file might be created. + if in_place_edit: + backup_file = Path(f"{programfile}{in_place_edit}") + if backup_file.exists(): + output_files.append(str(backup_file)) + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..49615336511dbcbfc22545c0a70c750f059337c2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/perl-mime-types_server.py') +SERVER_NAME = 'biosci_perl_mime_types' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..84bc80de9d55ee188aa8eb7ef7e7d44f32e584da --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-mime-types: + build: . + image: mcp-perl-mime-types:latest + container_name: mcp-perl-mime-types + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-mime-types + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9a4ef1d9e6cb5659c05d4bbd4b15bffa6a9849bd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-mime-types + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-mime-types/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-module-load-conditional/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-module-load-conditional/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-module-load-conditional/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-module-load-conditional/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-module-load-conditional/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..324df456d09bee71c32c59a9e44110a83614df53 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-module-load-conditional/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-module-load-conditional + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7139289a40a4222e610016961dec2d808edbb423 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-moose via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-moose -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-moose_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-moose_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-moose_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5bc93d0dbdb32d68f17b7f1422cd97d8ba964c7e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_server.py @@ -0,0 +1,202 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def perl_interpreter( + programfile: Optional[Path] = None, + arguments: Optional[List[str]] = None, + execute_program: Optional[List[str]] = None, + execute_program_extended: Optional[List[str]] = None, + record_separator: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + in_place_edit: Optional[str] = None, + include_dirs: Optional[List[Path]] = None, + line_ending_processing: Optional[str] = None, + modules: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + enable_switch_parsing: bool = False, + search_path_for_program: bool = False, + taint_warnings: bool = False, + taint_checks: bool = False, + dump_core: bool = False, + allow_unsafe: bool = False, + print_version: bool = False, + print_config: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + extract_from_text: Optional[str] = None, + disable_all_warnings: bool = False, +) -> Dict[str, Any]: + """ + Executes a script using the Perl interpreter. + + This tool is a wrapper for the `perl` command-line executable. It can run any + Perl script, including those that use modules like Moose. + + Args: + programfile: Path to the Perl program file to execute. + arguments: A list of arguments to pass to the program file. + execute_program: One or more lines of a program passed as a string (-e). + execute_program_extended: Like -e, but enables all optional features (-E). + record_separator: Specify record separator, e.g., '777' for octal (-0). + autosplit: Enable autosplit mode with -n or -p (-a). + unicode_features: Enable listed Unicode features, e.g., 'A' or '8' (-C). + check_syntax_only: Check syntax only; does not execute the program (-c). + debugger: Run program under the specified debugger, e.g., 'Deparse' (-d). + debugging_flags: Set debugging flags, e.g., 'p' or '14' (-D). + no_sitecustomize: Don't run $sitelib/sitecustomize.pl at startup (-f). + split_pattern: Specify the split() pattern for the -a switch (-F). + in_place_edit: Edit files in place. Provide an extension for backups, e.g., '.bak' (-i). + include_dirs: List of directories to add to @INC search path (-I). + line_ending_processing: Enable line ending processing; can specify octal terminator (-l). + modules: List of modules to use/no, e.g., ["-Mstrict", "-mwarnings", "-M-CGI"]. + loop_around_program: Assume a "while (<>) { ... }" loop around the program (-n). + loop_and_print: Like -n, but also prints the line, similar to sed (-p). + enable_switch_parsing: Enable rudimentary parsing for switches after programfile (-s). + search_path_for_program: Look for programfile using the PATH environment variable (-S). + taint_warnings: Enable tainting warnings (-t). + taint_checks: Enable tainting checks (-T). + dump_core: Dump core after parsing the program (-u). + allow_unsafe: Allow unsafe operations (-U). + print_version: Print Perl version, patchlevel, and license (-v). + print_config: Print configuration summary or a single variable, e.g., 'archname' (-V). + enable_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + extract_from_text: Ignore text before #!perl line; optionally cd to a directory (-x). + disable_all_warnings: Disable all warnings (-X). + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # --- Input Validation --- + source_provided = any([ + programfile, + execute_program, + execute_program_extended, + print_version, + print_config is not None + ]) + if not source_provided: + raise ValueError( + "No program source provided. You must specify 'programfile', " + "'execute_program', 'execute_program_extended', 'print_version', " + "or 'print_config'." + ) + + if programfile and not programfile.is_file(): + raise FileNotFoundError(f"The specified program file does not exist: {programfile}") + + if loop_around_program and loop_and_print: + raise ValueError("The flags '-n' (loop_around_program) and '-p' (loop_and_print) are mutually exclusive.") + + warning_flags = [enable_warnings, enable_all_warnings, disable_all_warnings] + if sum(warning_flags) > 1: + raise ValueError("Warning flags '-w' (enable_warnings), '-W' (enable_all_warnings), and '-X' (disable_all_warnings) are mutually exclusive.") + + # --- Command Construction --- + cmd = ["perl"] + + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d:{debugger}" if debugger else "-d") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if in_place_edit is not None: + cmd.append(f"-i{in_place_edit}") + if include_dirs: + for directory in include_dirs: + if not directory.is_dir(): + raise NotADirectoryError(f"Include directory does not exist or is not a directory: {directory}") + cmd.extend(["-I", str(directory)]) + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if modules: + for mod in modules: + if not (mod.startswith("-M") or mod.startswith("-m")): + raise ValueError(f"Invalid module string '{mod}'. Must start with '-M' or '-m'.") + cmd.extend(modules) + if loop_around_program: + cmd.append("-n") + if loop_and_print: + cmd.append("-p") + if enable_switch_parsing: + cmd.append("-s") + if search_path_for_program: + cmd.append("-S") + if taint_warnings: + cmd.append("-t") + if taint_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config is not None: + cmd.append(f"-V:{print_config}" if print_config else "-V") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if extract_from_text is not None: + cmd.append(f"-x{extract_from_text}") + if disable_all_warnings: + cmd.append("-X") + + if execute_program: + for prog_line in execute_program: + cmd.extend(["-e", prog_line]) + if execute_program_extended: + for prog_line in execute_program_extended: + cmd.extend(["-E", prog_line]) + + if programfile: + cmd.append(str(programfile)) + + if arguments: + cmd.extend(arguments) + + # --- Subprocess Execution --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except FileNotFoundError: + raise RuntimeError("`perl` command not found. Please ensure Perl is installed and in your PATH.") + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Perl execution failed with return code {e.returncode}", + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..74908e6e9a92ba777e97c292114aa915ec8d9ef7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/perl-moose_server.py') +SERVER_NAME = 'biosci_perl_moose' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..ea5ead0b736ccc6d790844e6bef0d388547d315a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-moose: + build: . + image: mcp-perl-moose:latest + container_name: mcp-perl-moose + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-moose + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1c33b8a778306043ae6cc792b3b0c93f53a5fa74 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-moose + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-moose/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f9ec26503ae19d0dea8bf9eb2d40b8f0d558a466 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-ole-storage_lite via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-ole-storage_lite -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-ole-storage_lite_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-ole-storage_lite_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-ole-storage_lite_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_server.py new file mode 100644 index 0000000000000000000000000000000000000000..28155771ccba37d8c333138b93574d4e4ab0e280 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_server.py @@ -0,0 +1,248 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union +import tempfile +import os + +@mcp.tool() +def run_perl_script( + program_file: Optional[Path] = None, + program_string: Optional[List[str]] = None, + program_string_extended: Optional[List[str]] = None, + program_arguments: Optional[List[str]] = None, + record_separator_octal: Optional[str] = None, + autosplit_mode: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + edit_in_place_extension: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_processing: Optional[str] = None, + use_module: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + rudimentary_parsing_switches: bool = False, + look_for_programfile_in_path: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + dump_core: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config_summary: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_text_before_perl_line: Optional[Path] = None, + disable_all_warnings: bool = False, +) -> dict: + """ + Executes a Perl script or one-liner using the Perl interpreter, providing access + to its full range of command-line switches. This tool can be used to run Perl + scripts that utilize modules like OLE-Storage_Lite, which is a Perl module + for reading and writing OLE storage files. + + Args: + program_file: Path to the Perl program file to execute. + program_string: One or more lines of Perl program code to execute. + Can be specified multiple times via -e. + program_string_extended: One or more lines of Perl program code to execute, + like -e, but enables all optional features. + Can be specified multiple times via -E. + program_arguments: Arguments to pass to the Perl program. These are passed + after the program file/string. + record_separator_octal: Specify record separator (e.g., '0' for null, '0777' for paragraph mode). + If an empty string is provided, the flag is used without an argument ('-0'). + autosplit_mode: Enable autosplit mode with -n or -p (splits $_ into @F). + unicode_features: Enables the listed Unicode features (e.g., 'all', 'io', 'say'). + If an empty string is provided, the flag is used without an argument ('-C'). + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). + debugger: Run program under debugger. Optionally specify debugger name (e.g., ':ptkdb'). + If an empty string is provided, the flag is used without an argument ('-d'). + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). + If an empty string is provided, the flag is used without an argument ('-D'). + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup. + split_pattern: split() pattern for -a switch (e.g., '/\s+/'). '//'s are optional. + If an empty string is provided, the flag is used without an argument ('-F'). + edit_in_place_extension: Edit <> files in place. Makes backup if extension supplied (e.g., '.bak'). + If an empty string is provided, the flag is used without an argument ('-i'). + include_directories: Specify @INC/#include directory. Can be specified multiple times. + line_ending_processing: Enable line ending processing. Optionally specifies line terminator (e.g., '012' for LF). + If an empty string is provided, the flag is used without an argument ('-l'). + use_module: Execute "use/no module..." before executing program. + Format: '[m|M][-]module_name'. 'm' for 'use', 'M' for 'use strict', '-' for 'no'. + Can be specified multiple times. + loop_around_program: Assume "while (<>) { ... }" loop around program. + loop_and_print: Assume loop like -n but print line also, like sed. + rudimentary_parsing_switches: Enable rudimentary parsing for switches after programfile. + look_for_programfile_in_path: Look for programfile using PATH environment variable. + tainting_warnings: Enable tainting warnings. + tainting_checks: Enable tainting checks. + dump_core: Dump core after parsing program. + allow_unsafe_operations: Allow unsafe operations. + print_version: Print version, patchlevel and license. + print_config_summary: Print configuration summary. Optionally specify a single Config.pm variable. + If an empty string is provided, the flag is used without an argument ('-V'). + enable_warnings: Enable many useful warnings. + enable_all_warnings: Enable all warnings. + ignore_text_before_perl_line: Ignore text before #!perl line. Optionally cd to directory. + If Path('.') is provided, the flag is used without a specific directory ('-x'). + disable_all_warnings: Disable all warnings. + """ + command = ["perl"] + output_files: List[Path] = [] + + # Input validation for program_file + if program_file: + if not program_file.is_file(): + return { + "command_executed": "", + "stdout": "", + "stderr": f"Error: Program file '{program_file}' does not exist.", + "output_files": [], + } + + # Add switches + if record_separator_octal is not None: + command.append(f"-0{record_separator_octal}") + if autosplit_mode: + command.append("-a") + if unicode_features is not None: + command.append(f"-C{unicode_features}") + if check_syntax_only: + command.append("-c") + if debugger is not None: + command.append(f"-d{debugger}") + if debugging_flags is not None: + command.append(f"-D{debugging_flags}") + if program_string: + for p_str in program_string: + command.extend(["-e", p_str]) + if program_string_extended: + for p_str_ext in program_string_extended: + command.extend(["-E", p_str_ext]) + if no_sitecustomize: + command.append("-f") + if split_pattern is not None: + command.append(f"-F{split_pattern}") + if edit_in_place_extension is not None: + command.append(f"-i{edit_in_place_extension}") + if include_directories: + for inc_dir in include_directories: + if not inc_dir.is_dir(): + return { + "command_executed": "", + "stdout": "", + "stderr": f"Error: Include directory '{inc_dir}' does not exist or is not a directory.", + "output_files": [], + } + command.extend(["-I", str(inc_dir)]) + if line_ending_processing is not None: + command.append(f"-l{line_ending_processing}") + if use_module: + for module_spec in use_module: + # Basic validation for module_spec format + if not (module_spec.startswith('m') or module_spec.startswith('M') or module_spec.startswith('-')): + return { + "command_executed": "", + "stdout": "", + "stderr": f"Error: Invalid module specification '{module_spec}'. Must start with 'm', 'M', or '-'.", + "output_files": [], + } + command.append(f"-{module_spec}") + if loop_around_program: + command.append("-n") + if loop_and_print: + command.append("-p") + if rudimentary_parsing_switches: + command.append("-s") + if look_for_programfile_in_path: + command.append("-S") + if tainting_warnings: + command.append("-t") + if tainting_checks: + command.append("-T") + if dump_core: + command.append("-u") + if allow_unsafe_operations: + command.append("-U") + if print_version: + command.append("-v") + if print_config_summary is not None: + command.append(f"-V:{print_config_summary}") + if enable_warnings: + command.append("-w") + if enable_all_warnings: + command.append("-W") + if ignore_text_before_perl_line is not None: + # If Path('.') is passed, it means -x without a specific directory argument. + # Otherwise, validate the directory. + if str(ignore_text_before_perl_line) != ".": + if not ignore_text_before_perl_line.is_dir(): + return { + "command_executed": "", + "stdout": "", + "stderr": f"Error: Directory for -x '{ignore_text_before_perl_line}' does not exist or is not a directory.", + "output_files": [], + } + command.append(f"-x{ignore_text_before_perl_line}") + if disable_all_warnings: + command.append("-X") + + # Add program file and arguments + if program_file: + command.append(str(program_file)) + if program_arguments: + command.extend(program_arguments) + + # If no program file or string is provided, and no version/config info is requested, + # Perl will just wait for input or exit. This might not be the intended use. + # This check ensures that at least some action is specified for the Perl interpreter. + if len(command) == 1 and not (print_version or print_config_summary is not None or check_syntax_only): + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": "Error: No Perl program file, program string, or informational flag (-v, -V, -c) provided. " + "The 'perl' command would run without arguments, potentially waiting for STDIN.", + "output_files": [], + } + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + encoding="utf-8" + ) + stdout = process.stdout + stderr = process.stderr + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "output_files": [], + } + except Exception as e: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": f"An unexpected error occurred: {str(e)}", + "output_files": [], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b5708c17ddbc17c222a869157881b6ac82b769a7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/perl-ole-storage_lite_server.py') +SERVER_NAME = 'biosci_perl_ole_storage_lite' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..aedb207f7bc7a93da7b717ea41778d9fd3b49f79 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-ole-storage_lite: + build: . + image: mcp-perl-ole-storage_lite:latest + container_name: mcp-perl-ole-storage_lite + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-ole-storage_lite + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8bd5d5a0e7ea9b8cd5f819aa5d89d9c6f067bd77 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-ole-storage_lite + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-ole-storage_lite/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3af430154bf05a30b6074467f39f82a6574f3da4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-package-deprecationmanager via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-package-deprecationmanager -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-package-deprecationmanager_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-package-deprecationmanager_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-package-deprecationmanager_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5fb77f9dcc29ace8974ed8c1a7223174887063bc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_server.py @@ -0,0 +1,32 @@ +import subprocess +from typing import Dict + +# @mcp.tool() +def package_deprecationmanager_info() -> Dict[str, str]: + """ + Provides information about the perl-package-deprecationmanager library. + + This package is a Perl library and not a command-line tool. It is intended + to be used by developers within their Perl code to manage deprecation + warnings for their distributions. As it has no executable or command-line + interface, this function returns informational text instead of executing a + command. + """ + + # This is a library, so there is no command to execute. + # The return structure is provided for consistency with the MCP framework. + command_executed = "N/A (This is a Perl library, not an executable)" + + stdout_message = ( + "Tool 'perl-package-deprecationmanager' is a Perl library for managing " + "deprecation warnings within Perl code. It does not have a command-line " + "interface and cannot be executed directly. To use it, you must 'use' " + "it in your own Perl scripts." + ) + + return { + "command_executed": command_executed, + "stdout": stdout_message, + "stderr": "", + "output_files": [] + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8fcf7e41bcb48949c83360d770c6666f1ac18cf4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/perl-package-deprecationmanager_server.py') +SERVER_NAME = 'biosci_perl_package_deprecationmanager' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5616a754b3976e3ef2db624966a6da968a7e9483 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-package-deprecationmanager: + build: . + image: mcp-perl-package-deprecationmanager:latest + container_name: mcp-perl-package-deprecationmanager + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-package-deprecationmanager + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..869a174516e040f5a6c0d0ce1f52b79dfbe21736 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-package-deprecationmanager + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-deprecationmanager/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..85a2acc966d94d28fcb5484238c0b57e3021d170 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-package-stash-xs via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-package-stash-xs -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-package-stash-xs_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-package-stash-xs_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-package-stash-xs_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/__pycache__/perl-package-stash-xs_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/__pycache__/perl-package-stash-xs_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9bdef39c82b42d4ec62a4f25c9233475e608c39f Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/__pycache__/perl-package-stash-xs_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b3b5ba2b9850360bf137444a77ecd640f585afec --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_server.py @@ -0,0 +1,313 @@ +import subprocess +import os +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def package_stash_get_info( + perl5lib: Optional[str] = None +) -> Dict[str, Any]: + """ + Returns information about the Package::Stash environment, confirming if the + XS (accelerated) version is active and which version is installed. + + Args: + perl5lib: Optional path to add to PERL5LIB for finding modules. + """ + env = os.environ.copy() + if perl5lib: + path_obj = Path(perl5lib) + if path_obj.exists(): + env["PERL5LIB"] = str(path_obj.absolute()) + (os.pathsep + env.get("PERL5LIB", "") if env.get("PERL5LIB") else "") + + perl_code = ( + "use Package::Stash; " + "print \"Implementation: $Package::Stash::IMPLEMENTATION\\n\"; " + "eval { require Package::Stash::XS; print \"XS_Version: $Package::Stash::XS::VERSION\\n\"; }; " + "print \"Stash_Version: $Package::Stash::VERSION\\n\";" + ) + + cmd = ["perl", "-e", perl_code] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True, env=env) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "error": f"Failed to retrieve Package::Stash info: {e.stderr}", + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def package_stash_list_symbols( + package_name: str, + perl5lib: Optional[str] = None +) -> Dict[str, Any]: + """ + Lists all symbols defined in a specific Perl package namespace. + Useful for inspecting the contents of bioinformatics modules (e.g., Bio::Seq). + + Args: + package_name: The name of the Perl package to inspect (e.g., 'Package::Stash'). + perl5lib: Optional path to add to PERL5LIB for finding modules. + """ + if not package_name: + raise ValueError("package_name is required") + + env = os.environ.copy() + if perl5lib: + path_obj = Path(perl5lib) + if path_obj.exists(): + env["PERL5LIB"] = str(path_obj.absolute()) + (os.pathsep + env.get("PERL5LIB", "") if env.get("PERL5LIB") else "") + + # Perl script to load the package and list symbols + perl_code = ( + "use Package::Stash; " + "my $pkg = $ARGV[0]; " + "eval \"require $pkg\" or die \"Could not load package $pkg: $@\"; " + "my $s = Package::Stash->new($pkg); " + "print \"$_\n\" for sort $s->list_all_symbols;" + ) + + cmd = ["perl", "-e", perl_code, "--", package_name] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True, env=env) + symbols = result.stdout.strip().split("\n") if result.stdout.strip() else [] + return { + "command_executed": " ".join(cmd), + "package": package_name, + "symbols": symbols, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "error": f"Failed to list symbols for {package_name}: {e.stderr}", + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def package_stash_has_symbol( + package_name: str, + symbol_name: str, + perl5lib: Optional[str] = None +) -> Dict[str, Any]: + """ + Checks if a specific symbol exists in a Perl package's namespace. + + Args: + package_name: The name of the Perl package. + symbol_name: The name of the symbol to check (e.g., 'new' or '$VERSION'). + perl5lib: Optional path to add to PERL5LIB. + """ + if not package_name or not symbol_name: + raise ValueError("Both package_name and symbol_name are required") + + env = os.environ.copy() + if perl5lib: + path_obj = Path(perl5lib) + if path_obj.exists(): + env["PERL5LIB"] = str(path_obj.absolute()) + (os.pathsep + env.get("PERL5LIB", "") if env.get("PERL5LIB") else "") + + perl_code = ( + "use Package::Stash; " + "my ($pkg, $sym) = @ARGV; " + "eval \"require $pkg\"; " + "my $s = Package::Stash->new($pkg); " + "if ($s->has_symbol($sym)) { print \"EXISTS\"; exit 0; } " + "else { print \"NOT_FOUND\"; exit 1; }" + ) + + cmd = ["perl", "-e", perl_code, "--", package_name, symbol_name] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, env=env) + exists = result.stdout.strip() == "EXISTS" + return { + "command_executed": " ".join(cmd), + "package": package_name, + "symbol": symbol_name, + "exists": exists, + "stdout": result.stdout, + "stderr": result.stderr + } + except Exception as e: + return {"error": str(e)} + +@mcp.tool() +def package_stash_get_symbols_by_type( + package_name: str, + symbol_type: str = "code", + perl5lib: Optional[str] = None +) -> Dict[str, Any]: + """ + Returns all symbols of a specific type from a Perl package. + + Args: + package_name: The name of the Perl package. + symbol_type: The type of symbols to list. Must be one of: 'scalar', 'array', 'hash', 'code', 'io'. + perl5lib: Optional path to add to PERL5LIB. + """ + valid_types = ["scalar", "array", "hash", "code", "io"] + if symbol_type not in valid_types: + raise ValueError(f"symbol_type must be one of {valid_types}") + + env = os.environ.copy() + if perl5lib: + path_obj = Path(perl5lib) + if path_obj.exists(): + env["PERL5LIB"] = str(path_obj.absolute()) + (os.pathsep + env.get("PERL5LIB", "") if env.get("PERL5LIB") else "") + + perl_code = ( + "use Package::Stash; " + "my ($pkg, $type) = @ARGV; " + "eval \"require $pkg\"; " + "my $s = Package::Stash->new($pkg); " + "my $syms = $s->get_all_symbols($type); " + "print \"$_\n\" for sort keys %$syms;" + ) + + cmd = ["perl", "-e", perl_code, "--", package_name, symbol_type] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True, env=env) + symbols = result.stdout.strip().split("\n") if result.stdout.strip() else [] + return { + "command_executed": " ".join(cmd), + "package": package_name, + "type": symbol_type, + "symbols": symbols, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": f"Failed to get symbols by type: {e.stderr}", + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def package_stash_remove_symbol( + package_name: str, + symbol_name: str, + perl5lib: Optional[str] = None +) -> Dict[str, Any]: + """ + Removes a symbol from a Perl package's symbol table. + Warning: This modifies the Perl environment for the duration of the execution. + + Args: + package_name: The name of the Perl package. + symbol_name: The name of the symbol to remove. + perl5lib: Optional path to add to PERL5LIB. + """ + if not package_name or not symbol_name: + raise ValueError("Both package_name and symbol_name are required") + + env = os.environ.copy() + if perl5lib: + path_obj = Path(perl5lib) + if path_obj.exists(): + env["PERL5LIB"] = str(path_obj.absolute()) + (os.pathsep + env.get("PERL5LIB", "") if env.get("PERL5LIB") else "") + + perl_code = ( + "use Package::Stash; " + "my ($pkg, $sym) = @ARGV; " + "eval \"require $pkg\"; " + "my $s = Package::Stash->new($pkg); " + "if ($s->has_symbol($sym)) { " + " $s->remove_symbol($sym); " + " print \"REMOVED\"; " + "} else { " + " print \"NOT_FOUND\"; " + "}" + ) + + cmd = ["perl", "-e", perl_code, "--", package_name, symbol_name] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True, env=env) + return { + "command_executed": " ".join(cmd), + "package": package_name, + "symbol": symbol_name, + "status": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": f"Failed to remove symbol: {e.stderr}", + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def package_stash_add_scalar_symbol( + package_name: str, + symbol_name: str, + value: str, + perl5lib: Optional[str] = None +) -> Dict[str, Any]: + """ + Adds a scalar symbol with a specific string value to a Perl package. + + Args: + package_name: The name of the Perl package. + symbol_name: The name of the symbol (without the $ prefix). + value: The string value to assign to the scalar. + perl5lib: Optional path to add to PERL5LIB. + """ + if not package_name or not symbol_name: + raise ValueError("Both package_name and symbol_name are required") + + env = os.environ.copy() + if perl5lib: + path_obj = Path(perl5lib) + if path_obj.exists(): + env["PERL5LIB"] = str(path_obj.absolute()) + (os.pathsep + env.get("PERL5LIB", "") if env.get("PERL5LIB") else "") + + perl_code = ( + "use Package::Stash; " + "my ($pkg, $sym, $val) = @ARGV; " + "eval \"require $pkg\"; " + "my $s = Package::Stash->new($pkg); " + "my $val_ref = \\$val; " + "$s->add_symbol('$' . $sym, $val_ref); " + "print \"ADDED\";" + ) + + cmd = ["perl", "-e", perl_code, "--", package_name, symbol_name, value] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True, env=env) + return { + "command_executed": " ".join(cmd), + "package": package_name, + "symbol": f"${symbol_name}", + "value": value, + "status": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": f"Failed to add symbol: {e.stderr}", + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c2f2ef3e30ed8ff1722666147afe33d9b3e9bc94 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/perl-package-stash-xs_server.py') +SERVER_NAME = 'biosci_perl_package_stash_xs' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..21642a14637eb07d1c47c856e203a8ae3e0fc3b1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-package-stash-xs: + build: . + image: mcp-perl-package-stash-xs:latest + container_name: mcp-perl-package-stash-xs + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-package-stash-xs + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6b84cf6c15be775363ebf5bab1746f8846367866 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-package-stash-xs + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-package-stash-xs/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8a248b85f423abad7b4be76017571a372d9c653e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-pathtools via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-pathtools -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-pathtools_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-pathtools_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-pathtools_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/__pycache__/perl-pathtools_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/__pycache__/perl-pathtools_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae35b2ece4978108e901c248a6e136829a00cf66 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/__pycache__/perl-pathtools_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b24d1e619023229704255fd50cd0f867c8761ac9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_server.py @@ -0,0 +1,257 @@ +import subprocess +from typing import Optional, List +from pathlib import Path + +@mcp.tool() +def pathtools_canonpath(path: str): + """ + No-op cleanup of a path. Logical cleanup of a path, such as eliminating + successive path separators and directory traversals (e.g., /foo/../bar -> /bar). + """ + try: + cmd = ["perl", "-MFile::Spec", "-e", "print File::Spec->canonpath($ARGV[0])", path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "canonical_path": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_catdir(directories: List[str]): + """ + Concatenate two or more directory names to form a complete path ending with a directory. + In Perl: File::Spec->catdir(@directories) + """ + if not directories: + return {"error": "The directories list cannot be empty."} + + try: + cmd = ["perl", "-MFile::Spec", "-e", "print File::Spec->catdir(@ARGV)"] + directories + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "directory_path": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_catfile(directories: List[str], filename: str): + """ + Concatenate one or more directory names and a filename to form a complete path. + In Perl: File::Spec->catfile(@directories, $filename) + """ + try: + args = directories + [filename] + cmd = ["perl", "-MFile::Spec", "-e", "print File::Spec->catfile(@ARGV)"] + args + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "file_path": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_abs2rel(path: str, base: Optional[str] = None): + """ + Takes a destination path and an optional base path and returns a relative path + from the base to the destination. + """ + try: + perl_code = "print File::Spec->abs2rel($ARGV[0], $ARGV[1])" + args = [path, base] if base else [path, ""] + + cmd = ["perl", "-MFile::Spec", "-e", perl_code] + args + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "relative_path": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_rel2abs(path: str, base: Optional[str] = None): + """ + Converts a relative path to an absolute path. + If base is not specified, the current working directory is used. + """ + try: + perl_code = "print File::Spec->rel2abs($ARGV[0], $ARGV[1])" + args = [path, base] if base else [path, ""] + + cmd = ["perl", "-MFile::Spec", "-e", perl_code] + args + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "absolute_path": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_splitpath(path: str, no_file: bool = False): + """ + Splits a path into volume, directory, and filename portions. + On systems with no concept of volume, returns an empty string for volume. + """ + try: + # Perl splitpath returns (volume, directory, file) + # no_file=True means the path is a directory and the file part will be empty + no_file_int = 1 if no_file else 0 + perl_code = f"my @res = File::Spec->splitpath($ARGV[0], {no_file_int}); print join('|', @res)" + + cmd = ["perl", "-MFile::Spec", "-e", perl_code, path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + parts = result.stdout.strip().split('|') + return { + "command_executed": " ".join(cmd), + "volume": parts[0] if len(parts) > 0 else "", + "directory": parts[1] if len(parts) > 1 else "", + "file": parts[2] if len(parts) > 2 else "", + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_cwd(): + """ + Gets the current working directory using the Cwd module. + """ + try: + cmd = ["perl", "-MCwd", "-e", "print Cwd::cwd()"] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "cwd": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_abs_path(path: str): + """ + Returns the canonicalized absolute pathname. + This resolves all symbolic links, extra ``/'' characters, and references + to /./ and /../ in the input path. + """ + # Validate path exists for abs_path as it usually requires physical existence + path_obj = Path(path) + + try: + cmd = ["perl", "-MCwd", "-e", "print Cwd::abs_path($ARGV[0])", path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "absolute_path": result.stdout.strip(), + "exists": path_obj.exists(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_file_name_is_absolute(path: str): + """ + Takes as argument a path and returns true if it is an absolute path. + """ + try: + # Perl returns 1 for true, empty string for false + cmd = ["perl", "-MFile::Spec", "-e", "print File::Spec->file_name_is_absolute($ARGV[0]) ? 'true' : 'false'", path] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + is_absolute = result.stdout.strip() == "true" + + return { + "command_executed": " ".join(cmd), + "is_absolute": is_absolute, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def pathtools_tmpdir(): + """ + Returns a string representation of the first writable directory found + which is suitable for temporary files. + """ + try: + cmd = ["perl", "-MFile::Spec", "-e", "print File::Spec->tmpdir()"] + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + return { + "command_executed": " ".join(cmd), + "tmpdir": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..35522d432f314adcc08e82664d46979189ced9c1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/perl-pathtools_server.py') +SERVER_NAME = 'biosci_perl_pathtools' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..75ea5e6e510e975f45e2657e1c399bf8798efa1a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-pathtools: + build: . + image: mcp-perl-pathtools:latest + container_name: mcp-perl-pathtools + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-pathtools + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2189f90b16b4827b5c9325fb19f8b24200b26355 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-pathtools + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pathtools/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5e527cb3f3a8a472beaeba9d181b867d20073881 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-perlio-gzip via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-perlio-gzip -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-perlio-gzip_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-perlio-gzip_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-perlio-gzip_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/__pycache__/perl-perlio-gzip_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/__pycache__/perl-perlio-gzip_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d72300a138e32f8d5d14878f7486196fb2c16d8 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/__pycache__/perl-perlio-gzip_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_server.py new file mode 100644 index 0000000000000000000000000000000000000000..28622a061fece4ae7eb8c10046e5e2ae2d69fbf9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_server.py @@ -0,0 +1,176 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# In a real MCP environment, this would be imported. +# This is a placeholder for the actual decorator. +class mcp: + @staticmethod + def tool(): + def decorator(func): + return func + return decorator + +@mcp.tool() +def run_perl_script( + program_file: Optional[Path] = None, + program_string: Optional[str] = None, + program_string_extended: Optional[str] = None, + arguments: Optional[List[str]] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + autosplit_mode: bool = False, + split_pattern: Optional[str] = None, + in_place_edit_backup_ext: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + enable_line_ending_processing: bool = False, + use_modules: Optional[List[str]] = None, + no_modules: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + enable_switch_parsing: bool = False, + search_path: bool = False, + enable_tainting_warnings: bool = False, + enable_tainting_checks: bool = False, + allow_unsafe_operations: bool = False, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + disable_all_warnings: bool = False, + print_version: bool = False, + print_config: Optional[str] = None, +) -> Dict[str, Any]: + """ + Executes a Perl script using the perl interpreter. + + This tool is a wrapper for the 'perl' command-line interpreter. The 'perl-perlio-gzip' + package is a Perl module, not a standalone executable. It provides an I/O layer for + handling gzip/gunzip compression within a Perl script (e.g., by using 'use PerlIO::gzip;'). + To use it, provide a Perl script via 'program_file' or 'program_string' that utilizes this module. + + Args: + program_file: Path to the Perl program file to execute. + program_string: A one-line Perl program to execute (passed via -e). + program_string_extended: Like 'program_string', but enables all optional features (passed via -E). + arguments: A list of arguments to pass to the Perl script. + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). Corresponds to -c. + debugger: Run the program under the specified debugger. Pass an empty string for the default debugger (-d). + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). Corresponds to -D. + autosplit_mode: Enable autosplit mode with -n or -p (splits $_ into @F). Corresponds to -a. + split_pattern: The pattern to use for splitting in autosplit mode. Requires 'autosplit_mode'. Corresponds to -F. + in_place_edit_backup_ext: Edit files in place. If an extension is supplied (e.g., '.bak'), a backup is made. Corresponds to -i. + include_directories: A list of directories to add to @INC. Corresponds to -I. + enable_line_ending_processing: Enable line ending processing. Corresponds to -l. + use_modules: A list of modules to 'use' before executing the program. Corresponds to -M. + no_modules: A list of modules to 'no' before executing the program. Corresponds to -m. + loop_around_program: Assume a "while (<>) { ... }" loop around the program. Corresponds to -n. + loop_and_print: Assume a loop like -n but also print the line. Corresponds to -p. + enable_switch_parsing: Enable rudimentary parsing for switches after the program file. Corresponds to -s. + search_path: Look for the program file using the PATH environment variable. Corresponds to -S. + enable_tainting_warnings: Enable tainting warnings. Corresponds to -t. + enable_tainting_checks: Enable tainting checks. Corresponds to -T. + allow_unsafe_operations: Allow unsafe operations. Corresponds to -U. + enable_warnings: Enable many useful warnings. Corresponds to -w. + enable_all_warnings: Enable all warnings. Corresponds to -W. + disable_all_warnings: Disable all warnings. Corresponds to -X. + print_version: Print version, patchlevel, and license. Corresponds to -v. + print_config: Print configuration summary. Pass a variable name to see a single Config.pm variable, or an empty string for the full summary. Corresponds to -V. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + source_options = [program_file, program_string, program_string_extended, print_version, print_config is not None] + if sum(1 for opt in source_options if opt) > 1: + raise ValueError("Only one of 'program_file', 'program_string', 'program_string_extended', 'print_version', or 'print_config' can be specified.") + if not any(source_options): + raise ValueError("One of 'program_file', 'program_string', 'program_string_extended', 'print_version', or 'print_config' must be provided.") + + if program_file and not program_file.is_file(): + raise FileNotFoundError(f"Program file not found: {program_file}") + + if include_directories: + for directory in include_directories: + if not directory.is_dir(): + raise NotADirectoryError(f"Include directory not found: {directory}") + + if split_pattern and not autosplit_mode: + raise ValueError("'split_pattern' can only be used when 'autosplit_mode' is True.") + + if loop_around_program and loop_and_print: + raise ValueError("'loop_around_program' (-n) and 'loop_and_print' (-p) are mutually exclusive.") + + # --- Command Construction --- + cmd = ["perl"] + + if check_syntax_only: cmd.append("-c") + if debugger is not None: cmd.append(f"-d:{debugger}" if debugger else "-d") + if debugging_flags: cmd.append(f"-D{debugging_flags}") + if autosplit_mode: cmd.append("-a") + if split_pattern: cmd.extend(["-F", split_pattern]) + if in_place_edit_backup_ext is not None: cmd.append(f"-i{in_place_edit_backup_ext}") + if include_directories: + for directory in include_directories: cmd.extend(["-I", str(directory)]) + if enable_line_ending_processing: cmd.append("-l") + if use_modules: + for module in use_modules: cmd.append(f"-M{module}") + if no_modules: + for module in no_modules: cmd.append(f"-m{module}") + if loop_around_program: cmd.append("-n") + if loop_and_print: cmd.append("-p") + if enable_switch_parsing: cmd.append("-s") + if search_path: cmd.append("-S") + if enable_tainting_warnings: cmd.append("-t") + if enable_tainting_checks: cmd.append("-T") + if allow_unsafe_operations: cmd.append("-U") + if enable_warnings: cmd.append("-w") + if enable_all_warnings: cmd.append("-W") + if disable_all_warnings: cmd.append("-X") + if print_version: cmd.append("-v") + if print_config is not None: cmd.append(f"-V:{print_config}" if print_config else "-V") + + if program_string: cmd.extend(["-e", program_string]) + elif program_string_extended: cmd.extend(["-E", program_string_extended]) + elif program_file: cmd.append(str(program_file)) + + if arguments: + cmd.extend(arguments) + + # --- Subprocess Execution --- + command_executed = " ".join(cmd) + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=False, # Perl scripts can exit with non-zero status on success (e.g., die) + ) + stdout = result.stdout + stderr = result.stderr + + if result.returncode != 0 and not check_syntax_only: + # For syntax check, non-zero can mean failure. For regular runs, it might be intended. + # We will return the output but let the user decide if it's an error. + # A more robust solution might check specific error patterns in stderr. + pass + + except FileNotFoundError: + raise RuntimeError("Perl executable not found. Please ensure 'perl' is in your system's PATH.") + except subprocess.CalledProcessError as e: + # This block is less likely to be hit with check=False, but kept for robustness. + return { + "error": "Perl script execution failed.", + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } + + # --- Structured Result Return --- + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "return_code": result.returncode, + "output_files": [] # Perl scripts might create files, but we can't know them beforehand. + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0efbc5312bcbf514eaf3e46405f413944857b78d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/perl-perlio-gzip_server.py') +SERVER_NAME = 'biosci_perl_perlio_gzip' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..bb5ea14fd375728aef216960210463ecbee62d6c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-perlio-gzip: + build: . + image: mcp-perl-perlio-gzip:latest + container_name: mcp-perl-perlio-gzip + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-perlio-gzip + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2cf4fd920c48edbdca6a64e0f46653a7e2bb32c7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-perlio-gzip + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-perlio-gzip/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c66f8434c32382a3c2b5da7ec45dccbc31b4872e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-pod-usage via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-pod-usage -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-pod-usage_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-pod-usage_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-pod-usage_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a67d45b16329ce2e72000057fa1869a68224eb7e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_server.py @@ -0,0 +1,132 @@ +import subprocess +from pathlib import Path +from typing import Optional, Dict, Any + +# In a real MCP environment, the @mcp.tool decorator would be provided by the framework. +# This is a placeholder for demonstration. +def tool(*args, **kwargs): + def decorator(f): + return f + return decorator + +class mcp: + tool = tool + +@mcp.tool() +def pod_usage( + input_file: Path, + message: Optional[str] = None, + verbose: int = 1, + sections: Optional[str] = None, + no_perldoc: bool = False, + output_to_stderr: bool = False, +) -> Dict[str, Any]: + """ + Extracts and prints a usage message from POD (Plain Old Documentation) + embedded within a Perl script. This tool is a wrapper around Perl's + Pod::Usage module, which is provided by the 'perl-pod-usage' conda package. + + Args: + input_file: Path to the Perl script containing POD documentation. + message: An optional message to print before the usage text. + verbose: Verbosity level of the usage message. + 0: Prints only the SYNOPSIS section. + 1: Prints SYNOPSIS and OPTIONS sections (default). + 2: Prints the entire man page. + 99: Used with the 'sections' parameter to specify custom sections. + sections: A pipe-delimited string of POD section titles to display + (e.g., "SYNOPSIS|OPTIONS"). Requires 'verbose' to be 99. + no_perldoc: If True, do not use the 'perldoc' command to format the + output, even for high verbosity levels. + output_to_stderr: If True, directs the usage message to stderr. + Otherwise, it goes to stdout. + + Returns: + A dictionary containing the command executed, stdout, stderr, + and a list of output files (always empty for this tool). + """ + # 1. Input validation + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + if verbose not in [0, 1, 2, 99]: + raise ValueError("The 'verbose' parameter must be one of 0, 1, 2, or 99.") + + if sections and verbose != 99: + raise ValueError("The 'sections' parameter can only be used when 'verbose' is set to 99.") + + # 2. Command construction + # We build a list of arguments for the pod2usage function in Perl. + perl_args = [] + perl_args.append(f"'-input' => '{str(input_file)}'") + perl_args.append(f"'-verbose' => {verbose}") + + # The pod2usage function exits by default. We use 'NOEXIT' to prevent this + # and allow us to capture the output from the subprocess call. + perl_args.append("'-exitval' => 'NOEXIT'") + + if message: + # Escape single quotes for the Perl string literal + escaped_message = message.replace("'", "\\'") + perl_args.append(f"'-msg' => '{escaped_message}'") + + if output_to_stderr: + perl_args.append("'-output' => \\*STDERR") + else: + perl_args.append("'-output' => \\*STDOUT") + + if sections: + escaped_sections = sections.replace("'", "\\'") + perl_args.append(f"'-sections' => '{escaped_sections}'") + + if no_perldoc: + perl_args.append("'-noperldoc' => 1") + + perl_hash_str = ", ".join(perl_args) + perl_script = f"use Pod::Usage; pod2usage({{{perl_hash_str}}});" + + command = ["perl", "-e", perl_script] + command_str = " ".join(command) + + # 3. Subprocess execution and error handling + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=False, # Manually check return code for better error reporting + ) + + if result.returncode != 0: + # Pod::Usage can fail if the input file has no POD, for example. + # The error message goes to stderr. + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "error": f"Perl execution failed with return code {result.returncode}.", + "output_files": [], + } + + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": command_str, + "stdout": "", + "stderr": "Error: 'perl' command not found. Is Perl installed and in the system's PATH?", + "error": "Command not found.", + "output_files": [], + } + except Exception as e: + return { + "command_executed": command_str, + "stdout": "", + "stderr": str(e), + "error": "An unexpected error occurred during subprocess execution.", + "output_files": [], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..55ca2985b336ba195d29359d351ddadb0080a92f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/perl-pod-usage_server.py') +SERVER_NAME = 'biosci_perl_pod_usage' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3052599ef8b79ab1571aba5e57408d64b5473214 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-pod-usage: + build: . + image: mcp-perl-pod-usage:latest + container_name: mcp-perl-pod-usage + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-pod-usage + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..442396d815afccf5484cc0b3194f67b42034c8a1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-pod-usage + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-pod-usage/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..30507aa71b79a8c29a679ef431080e2278aec72c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-scalar-list-utils via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-scalar-list-utils -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-scalar-list-utils_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-scalar-list-utils_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-scalar-list-utils_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/__pycache__/perl-scalar-list-utils_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/__pycache__/perl-scalar-list-utils_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15f5adb8c8cad23493a0b45316faf7d59a8b0ae1 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/__pycache__/perl-scalar-list-utils_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f0306c161d58b67d0cc6d1677149a7257559b45e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_server.py @@ -0,0 +1,319 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Union, Dict, Any +from pydantic import Field, validate_call + +# No need to import mcp as per instructions. + +def _build_perl_command( + program_file: Optional[Path], + script_arguments: List[str], + record_separator_octal: Optional[str], + autosplit: bool, + unicode_features: Optional[Union[int, str]], + check_syntax_only: bool, + debugger: Optional[str], + debugging_flags: Optional[Union[int, str]], + execute_program_lines: List[str], + execute_program_lines_extended: List[str], + no_site_customize: bool, + split_pattern: Optional[str], + in_place_edit_extension: Optional[str], + include_directories: List[Path], + line_terminator_octal: Optional[str], + use_modules: List[str], + use_modules_import_semantics: List[str], + no_modules: List[str], + no_modules_import_semantics: List[str], + loop_around_program: bool, + loop_and_print: bool, + rudimentary_switch_parsing: bool, + search_path_for_program: bool, + tainting_warnings: bool, + tainting_checks: bool, + dump_core: bool, + allow_unsafe_operations: bool, + print_version: bool, + print_config_variable: Optional[str], + enable_warnings: bool, + enable_all_warnings: bool, + ignore_text_before_shebang: bool, + cd_to_directory_for_shebang: Optional[Path], + disable_all_warnings: bool, +) -> List[str]: + """ + Helper function to construct the Perl command based on provided parameters. + """ + cmd = ["perl"] + + if record_separator_octal is not None: + cmd.append(f"-0{record_separator_octal}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d{':' + debugger if debugger else ''}") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + for line in execute_program_lines: + cmd.extend(["-e", line]) + for line in execute_program_lines_extended: + cmd.extend(["-E", line]) + if no_site_customize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if in_place_edit_extension is not None: + cmd.append(f"-i{in_place_edit_extension}") + for inc_dir in include_directories: + cmd.extend(["-I", str(inc_dir)]) + if line_terminator_octal is not None: + cmd.append(f"-l{line_terminator_octal}") + for module in use_modules: + cmd.extend(["-m", module]) + for module in use_modules_import_semantics: + cmd.extend(["-M", module]) + for module in no_modules: + cmd.extend(["-m-", module]) + for module in no_modules_import_semantics: + cmd.extend(["-M-", module]) + if loop_around_program: + cmd.append("-n") + if loop_and_print: + cmd.append("-p") + if rudimentary_switch_parsing: + cmd.append("-s") + if search_path_for_program: + cmd.append("-S") + if tainting_warnings: + cmd.append("-t") + if tainting_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config_variable is not None: + cmd.append(f"-V{':' + print_config_variable if print_config_variable else ''}") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if ignore_text_before_shebang: + if cd_to_directory_for_shebang: + cmd.append(f"-x{str(cd_to_directory_for_shebang)}") + else: + cmd.append("-x") + if disable_all_warnings: + cmd.append("-X") + + if program_file: + cmd.append(str(program_file)) + + if script_arguments: + cmd.extend(script_arguments) + + return cmd + +@mcp.tool() +@validate_call +def run_perl_script( + program_file: Optional[Path] = Field(None, description="Path to the Perl script to execute. Can be omitted if program lines are provided via -e or -E."), + script_arguments: List[str] = Field(default_factory=list, description="Arguments to pass to the Perl script."), + record_separator_octal: Optional[str] = Field(None, description="Specify the input record separator. If an empty string is provided, it defaults to '\\0' (e.g., '123' for -0123, or '' for -0)."), + autosplit: bool = Field(False, description="Enables autosplit mode, typically used with -n or -p, splitting $_ into @F."), + unicode_features: Optional[Union[int, str]] = Field(None, description="Enables specific Unicode features. Can be an integer bitmask or a string list (e.g., 1 for -C1, or 'all' for -Call)."), + check_syntax_only: bool = Field(False, description="Checks the script's syntax without executing it, running BEGIN and CHECK blocks."), + debugger: Optional[str] = Field(None, description="Runs the program under a debugger. If an empty string, uses the default debugger (e.g., 'MyDebugger' for -d:MyDebugger, or '' for -d)."), + debugging_flags: Optional[Union[int, str]] = Field(None, description="Set debugging flags (argument is a bit mask or alphabets). E.g., 1 for -D1, or 't' for -Dt."), + execute_program_lines: List[str] = Field(default_factory=list, description="One line of program to execute (can be specified multiple times)."), + execute_program_lines_extended: List[str] = Field(default_factory=list, description="Like -e, but enables all optional features (can be specified multiple times)."), + no_site_customize: bool = Field(False, description="Prevents the loading of $sitelib/sitecustomize.pl at startup."), + split_pattern: Optional[str] = Field(None, description="Specifies the pattern for the split() function when -a is used (e.g., '/\\s+/')."), + in_place_edit_extension: Optional[str] = Field(None, description="Edit <> files in place. If an empty string, no backup is made. If a string (e.g., '.bak'), a backup is created with that extension (e.g., '.bak' for -i.bak, or '' for -i)."), + include_directories: List[Path] = Field(default_factory=list, description="Specify @INC/#include directory (can be specified multiple times)."), + line_terminator_octal: Optional[str] = Field(None, description="Enable line ending processing and specifies the line terminator. If an empty string, enables processing with the default terminator (e.g., '012' for -l012, or '' for -l)."), + use_modules: List[str] = Field(default_factory=list, description="Execute 'use module;' before executing program (e.g., 'strict' for -mstrict)."), + use_modules_import_semantics: List[str] = Field(default_factory=list, description="Execute 'use module;' with import semantics (e.g., 'CGI' for -MCGI)."), + no_modules: List[str] = Field(default_factory=list, description="Execute 'no module;' before executing program (e.g., 'warnings' for -m-warnings)."), + no_modules_import_semantics: List[str] = Field(default_factory=list, description="Execute 'no module;' with import semantics (e.g., 'strict' for -M-strict)."), + loop_around_program: bool = Field(False, description="Assume 'while (<>) { ... }' loop around program (-n)."), + loop_and_print: bool = Field(False, description="Assume loop like -n but print line also, like sed (-p)."), + rudimentary_switch_parsing: bool = Field(False, description="Enable rudimentary parsing for switches after programfile (-s)."), + search_path_for_program: bool = Field(False, description="Look for programfile using PATH environment variable (-S)."), + tainting_warnings: bool = Field(False, description="Enable tainting warnings (-t)."), + tainting_checks: bool = Field(False, description="Enable tainting checks (-T)."), + dump_core: bool = Field(False, description="Dump core after parsing program (-u)."), + allow_unsafe_operations: bool = Field(False, description="Allow unsafe operations (-U)."), + print_version: bool = Field(False, description="Print Perl version, patchlevel, and license (-v)."), + print_config_variable: Optional[str] = Field(None, description="Print configuration summary or a single Config.pm variable. If an empty string, prints the full summary (e.g., 'archname' for -V:archname, or '' for -V)."), + enable_warnings: bool = Field(False, description="Enable many useful warnings (-w)."), + enable_all_warnings: bool = Field(False, description="Enable all warnings (-W)."), + ignore_text_before_shebang: bool = Field(False, description="Ignore text before the '#!perl' line (-x)."), + cd_to_directory_for_shebang: Optional[Path] = Field(None, description="Optionally change to this directory when -x is used (e.g., Path('/tmp') for -x/tmp). Requires 'ignore_text_before_shebang' to be True."), + disable_all_warnings: bool = Field(False, description="Disable all warnings (-X)."), +) -> Dict[str, Any]: + """ + Executes a Perl script with various interpreter options. + + This tool wraps the 'perl' interpreter, allowing execution of Perl scripts + with fine-grained control over its command-line switches. While the context + is 'perl-scalar-list-utils', this tool directly interfaces with the 'perl' + executable, making the 'Scalar::List::Utils' module available if installed + in the Perl environment. + + Parameters: + program_file: Path to the Perl script to execute. Can be omitted if program lines are provided via -e or -E. + script_arguments: A list of arguments to pass directly to the Perl script. + record_separator_octal: Specify the input record separator. If an empty string is provided, it defaults to '\\0'. + autosplit: Enables autosplit mode, typically used with -n or -p, splitting $_ into @F. + unicode_features: Enables specific Unicode features. Can be an integer bitmask or a string list (e.g., 'all'). + check_syntax_only: Checks the script's syntax without executing it, running BEGIN and CHECK blocks. + debugger: Runs the program under a debugger. If an empty string, uses the default debugger. + debugging_flags: Sets debugging flags. Can be an integer bitmask or a string of alphabets. + execute_program_lines: A list of Perl code lines to execute. Each string in the list corresponds to a separate -e switch. + execute_program_lines_extended: Similar to -e, but enables all optional features for each line. + no_site_customize: Prevents the loading of $sitelib/sitecustomize.pl at startup. + split_pattern: Specifies the pattern for the split() function when -a is used (e.g., '/\\s+/'). + in_place_edit_extension: Edits files in place. If an empty string, no backup is made. If a string (e.g., '.bak'), a backup is created with that extension. + include_directories: A list of directories to add to @INC for module searching. Each Path corresponds to a separate -I switch. + line_terminator_octal: Enables line ending processing and specifies the line terminator. If an empty string, enables processing with the default terminator. + use_modules: A list of module names to 'use' before execution (e.g., 'strict'). Each string corresponds to a separate -m switch. + use_modules_import_semantics: A list of module names to 'use' with import semantics (e.g., 'CGI'). Each string corresponds to a separate -M switch. + no_modules: A list of module names to 'no' (disable) before execution (e.g., 'warnings'). Each string corresponds to a separate -m- switch. + no_modules_import_semantics: A list of module names to 'no' (disable) with import semantics (e.g., 'strict'). Each string corresponds to a separate -M- switch. + loop_around_program: Assumes a 'while (<>) { ... }' loop around program (-n). + loop_and_print: Assumes a loop like -n but also prints each line, similar to 'sed' (-p). + rudimentary_switch_parsing: Enables rudimentary parsing for switches that appear after the program file (-s). + search_path_for_program: Looks for the program file using the PATH environment variable (-S). + tainting_warnings: Enables warnings related to data tainting (-t). + tainting_checks: Enables full tainting checks, which are stricter than warnings (-T). + dump_core: Dumps a core file after parsing the program (-u). + allow_unsafe_operations: Allows unsafe operations (-U). + print_version: Prints the Perl version, patchlevel, and license information (-v). + print_config_variable: Prints a configuration summary or the value of a specific Config.pm variable. If an empty string, prints the full summary. + enable_warnings: Enables many useful warnings (-w). + enable_all_warnings: Enables all warnings (-W). + ignore_text_before_shebang: Ignores text before the '#!perl' line (-x). + cd_to_directory_for_shebang: Optionally change to this directory when -x is used (e.g., Path('/tmp') for -x/tmp). Requires 'ignore_text_before_shebang' to be True. + disable_all_warnings: Disables all warnings (-X). + """ + # Input validation + if not program_file and not (execute_program_lines or execute_program_lines_extended): + raise ValueError("Either 'program_file' or at least one 'execute_program_line'/'execute_program_line_extended' must be provided.") + + if program_file and not program_file.is_file(): + raise FileNotFoundError(f"Program file not found: {program_file}") + + for inc_dir in include_directories: + if not inc_dir.is_dir(): + raise NotADirectoryError(f"Include directory not found or is not a directory: {inc_dir}") + + if cd_to_directory_for_shebang: + if not ignore_text_before_shebang: + raise ValueError("cd_to_directory_for_shebang can only be used when ignore_text_before_shebang is True (-x option).") + if not cd_to_directory_for_shebang.is_dir(): + raise NotADirectoryError(f"Directory for -x option not found or is not a directory: {cd_to_directory_for_shebang}") + + # Mutually exclusive warnings options + warning_flags_count = sum([enable_warnings, enable_all_warnings, disable_all_warnings]) + if warning_flags_count > 1: + raise ValueError("Only one of -w, -W, or -X can be enabled at a time.") + + # Mutually exclusive loop options + if loop_around_program and loop_and_print: + raise ValueError("Only one of -n or -p can be enabled at a time.") + + command = _build_perl_command( + program_file=program_file, + script_arguments=script_arguments, + record_separator_octal=record_separator_octal, + autosplit=autosplit, + unicode_features=unicode_features, + check_syntax_only=check_syntax_only, + debugger=debugger, + debugging_flags=debugging_flags, + execute_program_lines=execute_program_lines, + execute_program_lines_extended=execute_program_lines_extended, + no_site_customize=no_site_customize, + split_pattern=split_pattern, + in_place_edit_extension=in_place_edit_extension, + include_directories=include_directories, + line_terminator_octal=line_terminator_octal, + use_modules=use_modules, + use_modules_import_semantics=use_modules_import_semantics, + no_modules=no_modules, + no_modules_import_semantics=no_modules_import_semantics, + loop_around_program=loop_around_program, + loop_and_print=loop_and_print, + rudimentary_switch_parsing=rudimentary_switch_parsing, + search_path_for_program=search_path_for_program, + tainting_warnings=tainting_warnings, + tainting_checks=tainting_checks, + dump_core=dump_core, + allow_unsafe_operations=allow_unsafe_operations, + print_version=print_version, + print_config_variable=print_config_variable, + enable_warnings=enable_warnings, + enable_all_warnings=enable_all_warnings, + ignore_text_before_shebang=ignore_text_before_shebang, + cd_to_directory_for_shebang=cd_to_directory_for_shebang, + disable_all_warnings=disable_all_warnings, + ) + + stdout_data = "" + stderr_data = "" + output_files: List[Path] = [] + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + stdout_data = process.stdout + stderr_data = process.stderr + + # The -i switch modifies files in place that are processed by the Perl script's + # <> operator (typically command-line arguments after the program file). + # Without knowing the specific input files passed to the script, we cannot + # reliably list them as output_files. Therefore, this list remains empty. + + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": f"Perl script execution failed with exit code {e.returncode}", + } + except FileNotFoundError: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": "Error: 'perl' executable not found. Please ensure Perl is installed and in your PATH.", + "output_files": [], + "error": "Perl executable not found.", + } + except Exception as e: + return { + "command_executed": " ".join(command), + "stdout": stdout_data, + "stderr": stderr_data, + "output_files": [], + "error": f"An unexpected error occurred: {str(e)}", + } + + return { + "command_executed": " ".join(command), + "stdout": stdout_data, + "stderr": stderr_data, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..18703186d49263ce80572eec20e2a6a8b777d899 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/perl-scalar-list-utils_server.py') +SERVER_NAME = 'biosci_perl_scalar_list_utils' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..b1d7df7d2e4c819fb3e40d027bff1ad512c88c48 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/app/requirements.txt @@ -0,0 +1 @@ +pydantic==2.13.3 diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b250c460fd34b7952c4ac9abb2ca6bbe43ba7557 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-scalar-list-utils: + build: . + image: mcp-perl-scalar-list-utils:latest + container_name: mcp-perl-scalar-list-utils + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-scalar-list-utils + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..17f522203d4d70a3bae31c877548510795248451 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-scalar-list-utils + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..789aa886bf8bd292297707f78435d515c716853d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-scalar-list-utils/requirements.txt @@ -0,0 +1,3 @@ +pydantic==2.13.3 +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4a31d52f12e79e4bf101df5121d804b94b96d5fc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-sereal-decoder via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-sereal-decoder -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-sereal-decoder_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-sereal-decoder_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-sereal-decoder_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3bafb6dce949db1fd8f049617ee922308881e953 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_server.py @@ -0,0 +1,216 @@ +import subprocess +import json +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def sereal_decode( + input_file: str, + output_file: Optional[str] = None, + mode: str = "standard", + offset: int = 0, + refuse_snappy: bool = False, + refuse_objects: bool = False, + no_bless_objects: bool = False, + no_thaw_objects: bool = False, + validate_utf8: bool = False, + max_recursion_depth: int = 10000, + max_num_hash_entries: int = 0, + max_num_array_entries: int = 0, + max_string_length: int = 0, + max_uncompressed_size: int = 0, + incremental: bool = False, + alias_smallint: bool = False, +): + """ + Decodes a Sereal-encoded binary file into a JSON-formatted structure. + + This tool wraps the Sereal::Decoder Perl module, providing access to its + high-performance binary deserialization capabilities. + + Args: + input_file: Path to the Sereal-encoded binary file. + output_file: Optional path to save the decoded JSON output. If not provided, output is returned in stdout. + mode: Decoding mode. Options: 'standard' (decode data), 'with_header' (decode data and header), 'only_header' (decode only header). + offset: Byte offset to start decoding from within the file. + refuse_snappy: If true, refuse Snappy-compressed input data. + refuse_objects: If true, refuse deserializing any objects in the input stream. + no_bless_objects: If true, deserialize objects without blessing them into Perl classes. + no_thaw_objects: If true, deserialize frozen objects as raw arguments instead of calling THAW. + validate_utf8: If true, refuse invalid UTF-8 byte sequences. + max_recursion_depth: Limit on the depth of nested structures (default 10000). + max_num_hash_entries: Maximum number of hash entries allowed (0 for no limit). + max_num_array_entries: Maximum number of array entries allowed (0 for no limit). + max_string_length: Maximum string length allowed (0 for no limit). + max_uncompressed_size: Maximum size of uncompressed blobs (0 for no limit). + incremental: If true, destructively parse documents out of the input. + alias_smallint: If true, alias small integers for memory efficiency. + """ + # Input validation + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file not found: {input_file}"} + + if mode not in ["standard", "with_header", "only_header"]: + return {"error": "Invalid mode. Must be 'standard', 'with_header', or 'only_header'."} + + if max_recursion_depth < 0: + max_recursion_depth = 10000 + + # Construct Perl script + # We use JSON::PP (core Perl) to output the decoded structure as JSON + perl_script = f""" +use Sereal::Decoder; +use JSON::PP; +use Fcntl qw(:seek); + +my $decoder = Sereal::Decoder->new({{ + refuse_snappy => {1 if refuse_snappy else 0}, + refuse_objects => {1 if refuse_objects else 0}, + no_bless_objects => {1 if no_bless_objects else 0}, + no_thaw_objects => {1 if no_thaw_objects else 0}, + validate_utf8 => {1 if validate_utf8 else 0}, + max_recursion_depth => {max_recursion_depth}, + max_num_hash_entries => {max_num_hash_entries}, + max_num_array_entries => {max_num_array_entries}, + max_string_length => {max_string_length}, + max_uncompressed_size => {max_uncompressed_size}, + incremental => {1 if incremental else 0}, + alias_smallint => {1 if alias_smallint else 0}, +}}); + +my $filename = '{input_file}'; +open my $fh, '<:raw', $filename or die "Could not open $filename: $!"; +my $blob; +{{ local $/; $blob = <$fh>; }} +close $fh; + +my ($data, $header); +my $mode = '{mode}'; +my $offset = {offset}; + +if ($mode eq 'only_header') {{ + $header = $decoder->decode_only_header_with_offset($blob, $offset); +}} elsif ($mode eq 'with_header') {{ + ($header, $data) = $decoder->decode_with_header_and_offset($blob, $offset); +}} else {{ + $data = $decoder->decode_with_offset($blob, $offset); +}} + +my $bytes_consumed = $decoder->bytes_consumed(); + +my $result = {{ + header => $header, + data => $data, + bytes_consumed => $bytes_consumed +}}; + +print JSON::PP->new->utf8->canonical->encode($result); +""" + + try: + # Execute Perl one-liner + process = subprocess.run( + ["perl", "-e", perl_script], + capture_output=True, + text=True, + check=True + ) + + decoded_json = process.stdout + + if output_file: + output_path = Path(output_file) + output_path.parent.mkdir(parents=True, exist_ok=True) + output_path.write_text(decoded_json) + return { + "command_executed": f"perl -e '...Sereal::Decoder logic...'", + "stdout": "Output written to file.", + "stderr": process.stderr, + "output_files": [str(output_path)] + } + else: + return { + "command_executed": f"perl -e '...Sereal::Decoder logic...'", + "stdout": decoded_json, + "stderr": process.stderr, + "output_files": [] + } + + except subprocess.CalledProcessError as e: + return { + "command_executed": e.cmd, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Perl execution failed. Ensure perl-sereal-decoder is installed." + } + +@mcp.tool() +def sereal_looks_like_sereal(input_file: str): + """ + Performs a quick check to see if a file appears to be a valid Sereal document. + + This is not a full validation but checks for a reasonable Sereal header. + + Args: + input_file: Path to the file to check. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file not found: {input_file}"} + + perl_script = f""" +use Sereal::Decoder; +my $filename = '{input_file}'; +open my $fh, '<:raw', $filename or die $!; +read($fh, my $buffer, 1024); +close $fh; +my $res = Sereal::Decoder->looks_like_sereal($buffer); +print $res ? "true" : "false"; +""" + + try: + process = subprocess.run( + ["perl", "-e", perl_script], + capture_output=True, + text=True, + check=True + ) + + is_sereal = process.stdout.strip() == "true" + + return { + "command_executed": "Sereal::Decoder->looks_like_sereal()", + "is_sereal": is_sereal, + "stdout": process.stdout, + "stderr": process.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": e.cmd, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Validation check failed." + } + +@mcp.tool() +def sereal_get_version(): + """ + Returns the version information for the installed Sereal::Decoder module. + """ + try: + process = subprocess.run( + ["perl", "-MSereal::Decoder", "-e", "print $Sereal::Decoder::VERSION"], + capture_output=True, + text=True, + check=True + ) + return { + "sereal_decoder_version": process.stdout.strip(), + "command_executed": "perl -MSereal::Decoder -e 'print $Sereal::Decoder::VERSION'" + } + except subprocess.CalledProcessError as e: + return { + "error": "Could not determine Sereal::Decoder version. Is it installed?", + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1de66585d6ed6d549366a38e0ef3a40473bbbc54 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/perl-sereal-decoder_server.py') +SERVER_NAME = 'biosci_perl_sereal_decoder' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f4f9a5950fbb5a750c98b82e5919bb97635214be --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-sereal-decoder: + build: . + image: mcp-perl-sereal-decoder:latest + container_name: mcp-perl-sereal-decoder + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-sereal-decoder + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6d066bd07d2b78eb3077580795823d5a5b995a2c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-sereal-decoder + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sereal-decoder/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-socket/app/__pycache__/perl-socket_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-socket/app/__pycache__/perl-socket_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a0c145acfb28d54772cdacd5b1f2c25a91026bb Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-socket/app/__pycache__/perl-socket_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-socket/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-socket/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ffdd4ed4de1c37747f2b6f1c25a5cf7eccc441ff --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-socket/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-socket + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..889dd321e2be8b6e49e4905db643661f3c5fdc9b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-statistics-descriptive via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-statistics-descriptive -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-statistics-descriptive_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-statistics-descriptive_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-statistics-descriptive_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/__pycache__/perl-statistics-descriptive_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/__pycache__/perl-statistics-descriptive_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f25bcb021fdea33fad0fb4979cf2995436519c35 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/__pycache__/perl-statistics-descriptive_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a5cc96cd9e16d0e77466cc8a5257d404b1c6da71 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_server.py @@ -0,0 +1,170 @@ +import subprocess +import tempfile +import json +from pathlib import Path +from typing import Optional, Dict, Any + +# The user specified "NO NEED to import mcp", so this is a placeholder. +# In a real MCP environment, you would use `from mcp import tool`. +class McpPlaceholder: + def tool(self, *args, **kwargs): + def decorator(func): + return func + return decorator + +mcp = McpPlaceholder() + +# This Perl script uses the Statistics::Descriptive module to perform calculations. +# It reads numbers from an input file and prints results as a JSON object to stdout. +_PERL_SCRIPT_TEMPLATE = """ +use strict; +use warnings; +use Statistics::Descriptive; +use JSON; + +# Ensure the script receives exactly one argument: the input file path. +if (@ARGV != 1) { + die "Usage: $0 \\n"; +} +my $input_file = $ARGV[0]; + +# Open the input file for reading, with error handling. +open(my $fh, '<', $input_file) or die "Error: Could not open file '$input_file' for reading: $!\\n"; + +# Read all numbers from the file, skipping any non-numeric lines. +my @data; +while (my $line = <$fh>) { + chomp $line; + # A robust regex to match integers and floating-point numbers (including scientific notation). + if ($line =~ /^-?[\d.]+(?:e-?\d+)?$/i) { + push @data, $line; + } +} +close $fh; + +# Check if any valid numeric data was found in the file. +if (@data == 0) { + die "Error: No numeric data found in '$input_file'\\n"; +} + +# Create a full statistics object. +my $stat = Statistics::Descriptive::Full->new(); + +# Add the collected data to the stats object. +$stat->add_data(@data); + +# Calculate a comprehensive set of descriptive statistics. +# Using eval blocks to handle cases where a statistic cannot be calculated (e.g., mode for unique data). +my %results = ( + count => $stat->count(), + mean => $stat->mean(), + median => $stat->median(), + mode => eval { $stat->mode() }, + sum => $stat->sum(), + variance => $stat->variance(), + standard_deviation => $stat->standard_deviation(), + min => $stat->min(), + max => $stat->max(), + sample_range => $stat->sample_range(), + skewness => $stat->skewness(), + kurtosis => $stat->kurtosis(), + percentile_25 => $stat->percentile(25), + percentile_50 => $stat->percentile(50), + percentile_75 => $stat->percentile(75) +); + +# Convert the results hash to a JSON string and print it to STDOUT. +print encode_json(\\%results); +""" + +@mcp.tool() +def calculate_descriptive_statistics( + input_file: Path, + output_file: Optional[Path] = None +) -> Dict[str, Any]: + """ + Calculates descriptive statistics for a list of numbers using the Perl Statistics::Descriptive module. + + This tool reads numbers from an input file (one per line), ignoring any non-numeric lines. + It computes various statistics like mean, median, standard deviation, etc., and returns them. + + Args: + input_file: Path to the input file containing numbers, one per line. + output_file: Optional path to save the calculated statistics in JSON format. + + Returns: + A dictionary containing the command executed, stdout, stderr, a dictionary of the + calculated statistics, and the path to the output file if generated. + """ + # 1. Input validation + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + output_files = [] + if output_file: + # Ensure parent directory exists for the output file + output_file.parent.mkdir(parents=True, exist_ok=True) + output_files.append(str(output_file)) + + # 2. Create and write the Perl script to a temporary file + script_path = None + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".pl", delete=False) as tmp_script: + script_path = Path(tmp_script.name) + tmp_script.write(_PERL_SCRIPT_TEMPLATE) + + # 3. Construct and execute the command + cmd = [ + "perl", + str(script_path), + str(input_file.resolve()) + ] + command_executed = " ".join(cmd) + + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + # 4. Process the successful result + stdout_str = result.stdout.strip() + statistics_results = json.loads(stdout_str) + + if output_file: + with open(output_file, 'w') as f_out: + json.dump(statistics_results, f_out, indent=4) + + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "statistics": statistics_results, + "output_files": output_files + } + + except subprocess.CalledProcessError as e: + # Handle errors from the Perl script execution + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Perl script execution failed with return code {e.returncode}.", + "statistics": {}, + "output_files": [] + } + except json.JSONDecodeError as e: + # Handle errors if the script output is not valid JSON + return { + "command_executed": command_executed, + "stdout": result.stdout, + "stderr": result.stderr, + "error": f"Failed to parse JSON output from Perl script: {e}", + "statistics": {}, + "output_files": [] + } + finally: + # 5. Clean up the temporary script file + if script_path and script_path.exists(): + script_path.unlink() diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f6376f8f157242ab51d94292d7a4ba7479cac6a2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/perl-statistics-descriptive_server.py') +SERVER_NAME = 'biosci_perl_statistics_descriptive' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f42ab55dc6e5c756c28da6bd35f27d02bfb94a9e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-statistics-descriptive: + build: . + image: mcp-perl-statistics-descriptive:latest + container_name: mcp-perl-statistics-descriptive + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-statistics-descriptive + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..48efaf1768b01e4c1731cde6abf47ed6020d1ebf --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-statistics-descriptive + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-statistics-descriptive/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..bc003e9a1a13fd6b9afce6b9ad9bcb7cd35696a2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-sub-exporter via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-sub-exporter -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-sub-exporter_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-sub-exporter_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-sub-exporter_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f86213faee16622a692c140a9f1c08845b6d78e5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_server.py @@ -0,0 +1,272 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +@mcp.tool() +def perl_run_script( + script_path: str, + args: Optional[List[str]] = None, + modules: Optional[List[str]] = None, + modules_no_import: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, + warnings: bool = False, + all_warnings: bool = False, + disable_warnings: bool = False, + taint_checks: bool = False, + taint_warnings: bool = False, + loop_n: bool = False, + loop_p: bool = False, + autosplit: bool = False, + split_pattern: Optional[str] = None, + inplace_extension: Optional[str] = None, + record_separator: Optional[str] = None, + line_ending_processing: Optional[str] = None, + unicode_features: Optional[str] = None, + debug_flags: Optional[str] = None, + debugger: Optional[str] = None, + no_site_customize: bool = False, + switch_parsing: bool = False, + search_path: bool = False, + unsafe_operations: bool = False, + extract_directory: Optional[str] = None, +): + """ + Executes a Perl script with the specified switches and arguments. + This environment includes the 'Sub::Exporter' module for sophisticated routine exporting. + """ + script = Path(script_path) + if not script.exists(): + return {"error": f"Script file not found: {script_path}"} + + cmd = ["perl"] + + # Boolean switches + if warnings: cmd.append("-w") + if all_warnings: cmd.append("-W") + if disable_warnings: cmd.append("-X") + if taint_checks: cmd.append("-T") + if taint_warnings: cmd.append("-t") + if loop_n: cmd.append("-n") + if loop_p: cmd.append("-p") + if autosplit: cmd.append("-a") + if no_site_customize: cmd.append("-f") + if switch_parsing: cmd.append("-s") + if search_path: cmd.append("-S") + if unsafe_operations: cmd.append("-U") + + # Parameterized switches + if modules: + for m in modules: + cmd.extend(["-M", m]) + if modules_no_import: + for m in modules_no_import: + cmd.extend(["-m", m]) + if include_dirs: + for d in include_dirs: + cmd.extend(["-I", d]) + if split_pattern: + cmd.append(f"-F{split_pattern}") + if inplace_extension is not None: + cmd.append(f"-i{inplace_extension}") + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if unicode_features: + cmd.append(f"-C{unicode_features}") + if debug_flags: + cmd.append(f"-D{debug_flags}") + if debugger: + cmd.append(f"-d{debugger}") + if extract_directory: + cmd.append(f"-x{extract_directory}") + + cmd.append(str(script)) + if args: + cmd.extend(args) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": args if inplace_extension is not None else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "exit_code": e.returncode, + "error": "Perl script execution failed" + } + +@mcp.tool() +def perl_run_one_liner( + code: str, + use_extended_features: bool = False, + args: Optional[List[str]] = None, + modules: Optional[List[str]] = None, + modules_no_import: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, + warnings: bool = False, + all_warnings: bool = False, + disable_warnings: bool = False, + taint_checks: bool = False, + taint_warnings: bool = False, + loop_n: bool = False, + loop_p: bool = False, + autosplit: bool = False, + split_pattern: Optional[str] = None, + inplace_extension: Optional[str] = None, + record_separator: Optional[str] = None, + line_ending_processing: Optional[str] = None, + unicode_features: Optional[str] = None, + no_site_customize: bool = False, +): + """ + Executes a one-line Perl program using the -e or -E switch. + Useful for quick tasks or testing Sub::Exporter functionality. + """ + cmd = ["perl"] + + # Use -E for extended features, -e for standard + exec_switch = "-E" if use_extended_features else "-e" + + if warnings: cmd.append("-w") + if all_warnings: cmd.append("-W") + if disable_warnings: cmd.append("-X") + if taint_checks: cmd.append("-T") + if taint_warnings: cmd.append("-t") + if loop_n: cmd.append("-n") + if loop_p: cmd.append("-p") + if autosplit: cmd.append("-a") + if no_site_customize: cmd.append("-f") + + if modules: + for m in modules: + cmd.extend(["-M", m]) + if modules_no_import: + for m in modules_no_import: + cmd.extend(["-m", m]) + if include_dirs: + for d in include_dirs: + cmd.extend(["-I", d]) + if split_pattern: + cmd.append(f"-F{split_pattern}") + if inplace_extension is not None: + cmd.append(f"-i{inplace_extension}") + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if unicode_features: + cmd.append(f"-C{unicode_features}") + + cmd.extend([exec_switch, code]) + if args: + cmd.extend(args) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": args if inplace_extension is not None else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "exit_code": e.returncode, + "error": "Perl one-liner execution failed" + } + +@mcp.tool() +def perl_check_syntax( + script_path: str, + modules: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, +): + """ + Checks the syntax of a Perl script without executing it (runs BEGIN and CHECK blocks). + """ + script = Path(script_path) + if not script.exists(): + return {"error": f"Script file not found: {script_path}"} + + cmd = ["perl", "-c"] + + if modules: + for m in modules: + cmd.extend(["-M", m]) + if include_dirs: + for d in include_dirs: + cmd.extend(["-I", d]) + + cmd.append(str(script)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "Syntax OK" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "exit_code": e.returncode, + "status": "Syntax Error" + } + +@mcp.tool() +def perl_get_version(): + """ + Prints the Perl version, patchlevel, and license information. + """ + cmd = ["perl", "-v"] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "Failed to retrieve Perl version" + } + +@mcp.tool() +def perl_get_config( + variable: Optional[str] = None, +): + """ + Prints the Perl configuration summary or a single Config.pm variable. + """ + cmd = ["perl"] + if variable: + cmd.append(f"-V:{variable}") + else: + cmd.append("-V") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": f"Failed to retrieve Perl configuration for {variable if variable else 'all'}" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..21a1e941664d9cc2e4e617d53d0476b5fd6314e5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/perl-sub-exporter_server.py') +SERVER_NAME = 'biosci_perl_sub_exporter' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..99c71a73b0bdb593c3e3b0668141f85bf8729b97 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-sub-exporter: + build: . + image: mcp-perl-sub-exporter:latest + container_name: mcp-perl-sub-exporter + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-sub-exporter + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2af72aa92102087096e4c789fe954280e0955855 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-sub-exporter + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-sub-exporter/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..50e08d6ce5355538398752c7b3555452b9c3da38 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-svg-graph via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-svg-graph -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-svg-graph_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-svg-graph_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-svg-graph_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/perl-svg-graph_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/perl-svg-graph_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a71033269202b9310ffeafec7ed7770a3056b279 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/perl-svg-graph_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/perl-svg-graph_server.py') +SERVER_NAME = 'biosci_perl_svg_graph' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d6a8bdbafcf13e63694cc2b4c072343992482869 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-svg-graph: + build: . + image: mcp-perl-svg-graph:latest + container_name: mcp-perl-svg-graph + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-svg-graph + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cd9a0838fd5d4404559292ea6fd3adcb1ba1a2ec --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-svg-graph + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-svg-graph/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..97443f51d7f6cc1b4a6438d3d77fdfde3e8876b6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-term-table via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-term-table -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-term-table_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-term-table_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-term-table_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/__pycache__/perl-term-table_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/__pycache__/perl-term-table_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab4f16153fa42d5919490d8530f263bb2dd0b897 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/__pycache__/perl-term-table_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6e6d62d05d6424e11e6e590579cbdf1912172db2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_server.py @@ -0,0 +1,57 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# Analysis of the provided documentation for 'perl-term-table': +# The documentation describes 'perl-term-table' as a Perl module (Term::Table) +# for formatting tables. It lists dependencies and package metadata from `conda search`. +# +# Crucially, the provided information *does not contain any details* about: +# - Command-line arguments +# - Subcommands +# - Usage examples for direct execution from the shell +# - A `--help` output or manual page content for a command-line executable. +# +# The `home_url` points to a CPAN page for the Perl module, which typically +# describes the module's API for use within Perl scripts, not a standalone +# command-line interface. The extract from this URL also indicates client-side +# issues preventing full access. +# +# Therefore, based on the provided documentation, 'perl-term-table' appears +# to be a Perl library/module intended for programmatic use within Perl scripts, +# rather than a standalone command-line executable with its own set of +# parameters and subcommands. +# +# Without any documented command-line interface, it is impossible to +# extract parameters, their types, default values, or constraints, +# and thus, impossible to create an MCP tool function that wraps a +# non-existent command-line interface. + +@mcp.tool() +def perl_term_table_cli_not_found() -> Dict[str, Any]: + """ + Indicates that no command-line interface was found for perl-term-table. + + The provided documentation for 'perl-term-table' describes it as a Perl module + (Term::Table) for formatting tables, but it does not specify any command-line + arguments, subcommands, or direct executable usage. Perl modules are typically + integrated into custom Perl scripts rather than being run directly from the + command line with their own set of parameters. + + Therefore, a functional MCP tool cannot be generated as there is no documented + command-line interface to wrap. This function serves as a placeholder to + communicate this limitation. + """ + # As there's no documented CLI, we cannot construct or execute any command. + # We return an error message explaining the situation. + return { + "command_executed": "No command could be constructed or executed because 'perl-term-table' " + "does not appear to have a documented command-line interface.", + "stdout": "", + "stderr": "Error: The provided documentation for 'perl-term-table' describes it as a Perl module " + "(Term::Table) but does not include any information about a command-line interface, " + "subcommands, or parameters for direct execution. " + "To create an MCP tool, explicit command-line usage details are required. " + "Please provide documentation for a specific command-line wrapper script if one exists.", + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ca9ef6071c254c18c6857308de93bcf553df7b8d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/perl-term-table_server.py') +SERVER_NAME = 'biosci_perl_term_table' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..9d85988c596fef0a834d7fd0bb6f7dccd079297b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-term-table: + build: . + image: mcp-perl-term-table:latest + container_name: mcp-perl-term-table + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-term-table + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6608152f491a9d5b15f3413bd47494b8860fe2f5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-term-table + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-term-table/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ea1c5d7d00b5ff552e5f01fe3ef90c20341ff063 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-test-differences via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-test-differences -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-test-differences_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-test-differences_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-test-differences_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2f654f00da13e5e873f3e536427c2dede994042e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_server.py @@ -0,0 +1,212 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any +import json + +@mcp.tool() +def perl_test_differences_text( + got: str, + expected: str, + name: str = "text_comparison", + style: str = "table", + context: int = 3, +) -> Dict[str, Any]: + """ + Compare two strings using Perl's Test::Differences and show the differences. + Useful for identifying exact discrepancies between multi-line strings or command outputs. + + Args: + got: The actual string received. + expected: The expected string. + name: A label for the comparison test. + style: The diff style to use ('table', 'unified', 'context', or 'oldstyle'). + context: Number of lines of context to show around differences (for 'unified' or 'context' styles). + """ + # Validate style + valid_styles = ["table", "unified", "context", "oldstyle"] + if style not in valid_styles: + style = "table" + + # Construct Perl one-liner + # We use Test::More to provide the test harness and Test::Differences for the diff logic + perl_script = ( + "use Test::More; " + "use Test::Differences; " + "plan tests => 1; " + f"eq_or_diff($ARGV[0], $ARGV[1], $ARGV[2], {{ style => '{style}', context => {context} }});" + ) + + cmd = ["perl", "-MTest::More", "-MTest::Differences", "-e", perl_script, "--", got, expected, name] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=False) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "test_passed": result.returncode == 0, + "output_files": [] + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": str(e), + "test_passed": False, + "output_files": [] + } + +@mcp.tool() +def perl_test_differences_files( + file_path_1: str, + file_path_2: str, + name: str = "file_comparison", + style: str = "table", + context: int = 3, +) -> Dict[str, Any]: + """ + Compare the contents of two files using Perl's Test::Differences. + Commonly used in bioinformatics to verify that a tool's output matches a reference file. + + Args: + file_path_1: Path to the first file (actual). + file_path_2: Path to the second file (expected). + name: A label for the comparison test. + style: The diff style to use ('table', 'unified', 'context', or 'oldstyle'). + context: Number of lines of context to show around differences. + """ + path1 = Path(file_path_1) + path2 = Path(file_path_2) + + if not path1.exists(): + return {"error": f"File not found: {file_path_1}"} + if not path2.exists(): + return {"error": f"File not found: {file_path_2}"} + + # Read file contents + try: + content1 = path1.read_text() + content2 = path2.read_text() + except Exception as e: + return {"error": f"Failed to read files: {str(e)}"} + + # Validate style + valid_styles = ["table", "unified", "context", "oldstyle"] + if style not in valid_styles: + style = "table" + + perl_script = ( + "use Test::More; " + "use Test::Differences; " + "plan tests => 1; " + f"eq_or_diff($ARGV[0], $ARGV[1], $ARGV[2], {{ style => '{style}', context => {context} }});" + ) + + cmd = ["perl", "-MTest::More", "-MTest::Differences", "-e", perl_script, "--", content1, content2, name] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=False) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "test_passed": result.returncode == 0, + "output_files": [] + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": str(e), + "test_passed": False, + "output_files": [] + } + +@mcp.tool() +def perl_test_differences_data( + got_json: str, + expected_json: str, + name: str = "data_structure_comparison", + style: str = "table", +) -> Dict[str, Any]: + """ + Compare two complex data structures (provided as JSON strings) using Perl's Test::Differences. + This tool decodes the JSON and compares the underlying structures (hashes, arrays). + + Args: + got_json: The actual data structure in JSON format. + expected_json: The expected data structure in JSON format. + name: A label for the comparison test. + style: The diff style to use ('table', 'unified', 'context', or 'oldstyle'). + """ + # Validate JSON inputs + try: + json.loads(got_json) + json.loads(expected_json) + except json.JSONDecodeError as e: + return {"error": f"Invalid JSON input: {str(e)}"} + + # Validate style + valid_styles = ["table", "unified", "context", "oldstyle"] + if style not in valid_styles: + style = "table" + + # Perl script that uses JSON::PP (core module) to decode strings into Perl structures + # then compares them using eq_or_diff + perl_script = ( + "use Test::More; " + "use Test::Differences; " + "use JSON::PP; " + "my $json = JSON::PP->new; " + "my $data_got = $json->decode($ARGV[0]); " + "my $data_exp = $json->decode($ARGV[1]); " + "plan tests => 1; " + f"eq_or_diff($data_got, $data_exp, $ARGV[2], {{ style => '{style}' }});" + ) + + cmd = ["perl", "-MTest::More", "-MTest::Differences", "-MJSON::PP", "-e", perl_script, "--", got_json, expected_json, name] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=False) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "test_passed": result.returncode == 0, + "output_files": [] + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": str(e), + "test_passed": False, + "output_files": [] + } + +@mcp.tool() +def perl_test_differences_version() -> Dict[str, Any]: + """ + Check the installed version of the Test::Differences Perl module. + """ + perl_script = "use Test::Differences; print $Test::Differences::VERSION;" + cmd = ["perl", "-MTest::Differences", "-e", perl_script] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "version": result.stdout.strip(), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Test::Differences module not found or perl execution failed." + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b5c4c6c1bd0b710ef1cf45c3b2822d729e39121a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/perl-test-differences_server.py') +SERVER_NAME = 'biosci_perl_test_differences' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..da2ae77c047f4b0d68f469f632ce6958f71311a8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-test-differences: + build: . + image: mcp-perl-test-differences:latest + container_name: mcp-perl-test-differences + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-test-differences + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a8f7f65557547303244bf741ebf9da6d0df06435 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-test-differences + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-differences/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-fatal/app/perl-test-fatal_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-fatal/app/perl-test-fatal_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b7083c7c7b07862abadfaa85d074ec8ffe7ebb8d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-fatal/app/perl-test-fatal_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-fatal/app/perl-test-fatal_server.py') +SERVER_NAME = 'biosci_perl_test_fatal' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d765b9484846a581d773fb302d84c6e7b66fc273 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-test-leaktrace via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-test-leaktrace -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-test-leaktrace_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-test-leaktrace_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-test-leaktrace_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/__pycache__/perl-test-leaktrace_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/__pycache__/perl-test-leaktrace_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..015ad04eba0d4a34cc6944fe3e53eee7b3cc6fee Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/__pycache__/perl-test-leaktrace_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8954869cb517abcef50620758061dcc738f6a9ca --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_server.py @@ -0,0 +1,241 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +@mcp.tool() +def perl_leaktrace( + script_path: Optional[str] = None, + code: Optional[str] = None, + code_with_features: Optional[str] = None, + include_dirs: Optional[List[str]] = None, + script_args: Optional[List[str]] = None, + warnings: bool = False, + all_warnings: bool = False, + disable_warnings: bool = False, + taint_check: bool = False, + taint_warnings: bool = False, + syntax_check_only: bool = False, + autosplit: bool = False, + split_pattern: Optional[str] = None, + inplace_extension: Optional[str] = None, + loop_n: bool = False, + loop_p: bool = False, + record_separator: Optional[str] = None, + unicode_features: Optional[str] = None, + debug_flags: Optional[str] = None, + line_ending_processing: bool = False, + switch_parsing: bool = False, + use_path_env: bool = False, + unsafe_operations: bool = False, +): + """ + Executes Perl with the Test::LeakTrace module to trace memory leaks. + Test::LeakTrace provides several functions (like leaktrace, leaked_info, no_leaks_ok) + to help detect memory leaks in Perl code. + + Args: + script_path: Path to the Perl script file to execute. + code: One line of program to execute (equivalent to perl -e). + code_with_features: Like 'code', but enables all optional features (equivalent to perl -E). + include_dirs: List of directories to add to @INC for module searching (equivalent to perl -I). + script_args: Arguments to pass to the Perl script. + warnings: Enable many useful warnings (equivalent to perl -w). + all_warnings: Enable all warnings (equivalent to perl -W). + disable_warnings: Disable all warnings (equivalent to perl -X). + taint_check: Enable taint checks (equivalent to perl -T). + taint_warnings: Enable taint warnings (equivalent to perl -t). + syntax_check_only: Check syntax only without executing (equivalent to perl -c). + autosplit: Enable autosplit mode with -n or -p (equivalent to perl -a). + split_pattern: Pattern for autosplit (equivalent to perl -F). + inplace_extension: Edit files in place, optionally making a backup (equivalent to perl -i). + loop_n: Assume 'while (<>) { ... }' loop around program (equivalent to perl -n). + loop_p: Like -n but print line also (equivalent to perl -p). + record_separator: Specify record separator (equivalent to perl -0). + unicode_features: Enable listed Unicode features (equivalent to perl -C). + debug_flags: Set debugging flags (equivalent to perl -D). + line_ending_processing: Enable line ending processing (equivalent to perl -l). + switch_parsing: Enable rudimentary parsing for switches after programfile (equivalent to perl -s). + use_path_env: Look for programfile using PATH environment variable (equivalent to perl -S). + unsafe_operations: Allow unsafe operations (equivalent to perl -U). + """ + + # Initialize command with the perl interpreter and the Test::LeakTrace module + cmd = ["perl", "-MTest::LeakTrace"] + + # Handle Boolean Switches + if warnings: + cmd.append("-w") + if all_warnings: + cmd.append("-W") + if disable_warnings: + cmd.append("-X") + if taint_check: + cmd.append("-T") + if taint_warnings: + cmd.append("-t") + if syntax_check_only: + cmd.append("-c") + if autosplit: + cmd.append("-a") + if loop_n: + cmd.append("-n") + if loop_p: + cmd.append("-p") + if line_ending_processing: + cmd.append("-l") + if switch_parsing: + cmd.append("-s") + if use_path_env: + cmd.append("-S") + if unsafe_operations: + cmd.append("-U") + + # Handle Optional String/Value Parameters + if record_separator is not None: + cmd.append(f"-0{record_separator}") + + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + + if debug_flags is not None: + cmd.append(f"-D{debug_flags}") + + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + + if inplace_extension is not None: + cmd.append(f"-i{inplace_extension}") + + # Handle Include Directories (-I) + if include_dirs: + for directory in include_dirs: + cmd.append(f"-I{directory}") + + # Handle Code Execution (-e or -E) + # Note: Perl allows multiple -e, but for simplicity we handle one primary snippet + if code: + cmd.extend(["-e", code]) + elif code_with_features: + cmd.extend(["-E", code_with_features]) + + # Handle Script Path + if script_path: + path_obj = Path(script_path) + if not path_obj.exists(): + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": f"Error: Script file not found at {script_path}", + "output_files": [] + } + cmd.append(str(path_obj)) + + # Handle Script Arguments + if script_args: + cmd.extend(script_args) + + # Validation: Must provide either code or a script path unless just checking version/config + if not code and not code_with_features and not script_path: + # If no execution target is provided, we default to showing version to ensure tool is working + cmd.append("-v") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "output_files": [] + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": str(e), + "output_files": [] + } + +@mcp.tool() +def perl_leaktrace_version(): + """ + Returns the version information for the Perl interpreter and checks if Test::LeakTrace is available. + """ + cmd = ["perl", "-MTest::LeakTrace", "-e", "print \"Test::LeakTrace version: $Test::LeakTrace::VERSION\\n\";", "-v"] + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Failed to retrieve version. Ensure perl-test-leaktrace is installed.", + "output_files": [] + } + +@mcp.tool() +def perl_leaktrace_check_syntax( + script_path: str, + include_dirs: Optional[List[str]] = None +): + """ + Performs a syntax check on a Perl script while ensuring Test::LeakTrace is available. + + Args: + script_path: Path to the Perl script to check. + include_dirs: Optional list of directories to add to @INC. + """ + path_obj = Path(script_path) + if not path_obj.exists(): + return {"error": f"File {script_path} not found."} + + cmd = ["perl", "-MTest::LeakTrace", "-c", str(path_obj)] + + if include_dirs: + for d in include_dirs: + cmd.insert(2, f"-I{d}") + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "Syntax OK" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "status": "Syntax Check Failed" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..805004a16d59fe2c12baba69863bffb6a32fc145 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/perl-test-leaktrace_server.py') +SERVER_NAME = 'biosci_perl_test_leaktrace' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..2784b1f625ae768fdaaf19999fc7aa4c6fb63ade --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-test-leaktrace: + build: . + image: mcp-perl-test-leaktrace:latest + container_name: mcp-perl-test-leaktrace + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-test-leaktrace + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4f0b6e7803dc94e4262fe44b0e1265249d442681 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-test-leaktrace + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-leaktrace/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..35a3c41d86cdd718ec759d9bd6c70b97674da217 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-test-more via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-test-more -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-test-more_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-test-more_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-test-more_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/__pycache__/perl-test-more_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/__pycache__/perl-test-more_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73fea88d891309b5dcf184d7de1a7918b16fee49 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/__pycache__/perl-test-more_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8fa45993481bfb807d2a451df4e0429244a2206c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_server.py @@ -0,0 +1,306 @@ +from typing import Optional, List +import subprocess +from pathlib import Path + +@mcp.tool() +def perl_execute_script( + script_path: str, + arguments: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, + modules: Optional[List[str]] = None, + warning_level: str = "standard", + taint_mode: str = "none", + unicode_features: Optional[str] = None, + record_separator: Optional[str] = None, + line_ending_processing: bool = False, + inplace_extension: Optional[str] = None, + path_search: bool = False, + no_site_customize: bool = False, +): + """ + Execute a Perl script or test file (e.g., .pl or .t). + This is the primary way to run tests using the Test::More library. + + Args: + script_path: Path to the Perl script or test file. + arguments: List of arguments to pass to the script. + include_dirs: Directories to add to @INC (Perl's include path). Corresponds to -I. + modules: List of modules to load before execution. Corresponds to -M. + warning_level: Warning level to use. Options: 'none' (-X), 'standard' (-w), 'all' (-W). + taint_mode: Taint checking mode. Options: 'none', 'warnings' (-t), 'check' (-T). + unicode_features: Enable Unicode features. Corresponds to -C. + record_separator: Specify record separator. Corresponds to -0. + line_ending_processing: Enable line ending processing. Corresponds to -l. + inplace_extension: Edit files in place, optionally providing a backup extension. Corresponds to -i. + path_search: Look for programfile using PATH environment variable. Corresponds to -S. + no_site_customize: Don't do $sitelib/sitecustomize.pl at startup. Corresponds to -f. + """ + cmd = ["perl"] + + # Handle warning levels + if warning_level == "none": + cmd.append("-X") + elif warning_level == "all": + cmd.append("-W") + else: + cmd.append("-w") + + # Handle taint mode + if taint_mode == "warnings": + cmd.append("-t") + elif taint_mode == "check": + cmd.append("-T") + + # Handle include directories + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + + # Handle modules + if modules: + for m in modules: + cmd.append(f"-M{m}") + + # Handle other flags + if unicode_features: + cmd.append(f"-C{unicode_features}") + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if line_ending_processing: + cmd.append("-l") + if inplace_extension is not None: + cmd.append(f"-i{inplace_extension}") + if path_search: + cmd.append("-S") + if no_site_customize: + cmd.append("-f") + + # Validate script path + path_obj = Path(script_path) + if not path_search and not path_obj.exists(): + return {"error": f"Script file not found: {script_path}"} + + cmd.append(script_path) + + # Add script arguments + if arguments: + cmd.extend(arguments) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def perl_execute_inline( + code: str, + use_extended_features: bool = True, + loop_mode: str = "none", + autosplit: bool = False, + split_pattern: Optional[str] = None, + include_dirs: Optional[List[str]] = None, + modules: Optional[List[str]] = None, + warning_level: str = "standard", +): + """ + Execute a one-line Perl program. + + Args: + code: The Perl code to execute. + use_extended_features: Use -E (enables all optional features) instead of -e. + loop_mode: Loop behavior. 'none', 'n' (while(<>)), or 'p' (while(<>) { print }). + autosplit: Enable autosplit mode (-a) with -n or -p. + split_pattern: Pattern for autosplit (-F). + include_dirs: Directories to add to @INC. + modules: Modules to load before execution. + warning_level: Warning level ('none', 'standard', 'all'). + """ + cmd = ["perl"] + + if warning_level == "none": + cmd.append("-X") + elif warning_level == "all": + cmd.append("-W") + else: + cmd.append("-w") + + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + + if modules: + for m in modules: + cmd.append(f"-M{m}") + + if loop_mode == "n": + cmd.append("-n") + elif loop_mode == "p": + cmd.append("-p") + + if autosplit: + cmd.append("-a") + if split_pattern: + cmd.append(f"-F{split_pattern}") + + if use_extended_features: + cmd.extend(["-E", code]) + else: + cmd.extend(["-e", code]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def perl_check_syntax( + script_path: str, + include_dirs: Optional[List[str]] = None, + modules: Optional[List[str]] = None, +): + """ + Check the syntax of a Perl script without executing it (runs BEGIN and CHECK blocks). + + Args: + script_path: Path to the Perl script. + include_dirs: Directories to add to @INC. + modules: Modules to load before checking. + """ + path_obj = Path(script_path) + if not path_obj.exists(): + return {"error": f"File not found: {script_path}"} + + cmd = ["perl", "-c"] + + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + + if modules: + for m in modules: + cmd.append(f"-M{m}") + + cmd.append(script_path) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "syntax_ok" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Syntax check failed", + "status": "syntax_error" + } + +@mcp.tool() +def perl_get_info( + config_variable: Optional[str] = None, + show_all_config: bool = False, +): + """ + Get Perl version and configuration information. + + Args: + config_variable: Print a single Config.pm variable. Corresponds to -V:variable. + show_all_config: Print configuration summary. Corresponds to -V. + """ + if config_variable: + cmd = ["perl", f"-V:{config_variable}"] + elif show_all_config: + cmd = ["perl", "-V"] + else: + cmd = ["perl", "-v"] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stderr": e.stderr + } + +@mcp.tool() +def perl_debug_script( + script_path: str, + debugger: Optional[str] = None, + debug_flags: Optional[str] = None, +): + """ + Run a Perl script under the debugger or with specific debugging flags. + + Args: + script_path: Path to the Perl script. + debugger: Run program under debugger. Corresponds to -d[:debugger]. + debug_flags: Set debugging flags (bit mask or alphabets). Corresponds to -D. + """ + path_obj = Path(script_path) + if not path_obj.exists(): + return {"error": f"File not found: {script_path}"} + + cmd = ["perl"] + + if debugger: + cmd.append(f"-d:{debugger}") + else: + cmd.append("-d") + + if debug_flags: + cmd.append(f"-D{debug_flags}") + + cmd.append(script_path) + + try: + # Debugging often requires interactive input, but in this context we capture output + result = subprocess.run(cmd, capture_output=True, text=True, timeout=30) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "note": "Debugger may have timed out if it expected interactive input." + } + except subprocess.TimeoutExpired: + return {"error": "Debugger execution timed out (likely waiting for interactive input)."} + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..25e7b692b4bb402b066146c5e92c3db6461da199 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/app/perl-test-more_server.py') +SERVER_NAME = 'biosci_perl_test_more' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-more/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f8ed908e8e26d6d2f3baee392a26ded2afbafead --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-test-requiresinternet via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-test-requiresinternet -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-test-requiresinternet_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-test-requiresinternet_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-test-requiresinternet_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/__pycache__/perl-test-requiresinternet_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/__pycache__/perl-test-requiresinternet_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..59abeb6348aed06cae81780f103de1c4747f4997 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/__pycache__/perl-test-requiresinternet_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6e57b7a5b7d35e9f8ceaf454f1643c6cb9bddce4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_server.py @@ -0,0 +1,113 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Dict, Any, List + +@mcp.tool() +def check_internet_connectivity() -> Dict[str, Any]: + """ + Checks for internet connectivity using the Perl Test::RequiresInternet module. + + This tool executes a small, temporary Perl script that utilizes the + Test::RequiresInternet module to determine if network connectivity is available. + The module is primarily designed for Perl testing frameworks (like Test::More) + to skip tests that require internet if a connection is not present or if the + NO_NETWORK_TESTING environment variable is set. + + The tool interprets a successful (non-skipped) test as an indication of + internet availability, and a skipped test as an indication of unavailability + (either no connection or NO_NETWORK_TESTING is active). + + Returns: + Dict[str, Any]: A dictionary containing: + - "command_executed" (str): The command executed. + - "stdout" (str): Standard output from the command. + - "stderr" (str): Standard error from the command. + - "internet_available" (bool): True if internet connectivity is detected, False otherwise. + - "output_files" (List[str]): List of any output files generated (empty in this case). + """ + # Perl script content that uses Test::RequiresInternet within a Test::More context. + # If internet is not available, Test::RequiresInternet will cause the test to be skipped. + # If NO_NETWORK_TESTING is set, it will also cause the test to be skipped. + # We interpret any skip as "internet not available for testing purposes". + perl_script_content = """ +use strict; +use warnings; +use Test::More; +use Test::RequiresInternet; + +plan tests => 1; + +# Test::RequiresInternet::requires_internet() is implicitly called by Test::More +# when a test is declared within its scope and Test::RequiresInternet is loaded. +# If internet is not available, or NO_NETWORK_TESTING is set, +# Test::RequiresInternet will cause this test to be skipped. +ok(1, "Internet connectivity check"); +""" + + tmp_script_path: Optional[Path] = None + try: + # Create a temporary Perl script file + with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix=".pl") as tmp_script: + tmp_script.write(perl_script_content) + tmp_script_path = Path(tmp_script.name) + + command = ["perl", str(tmp_script_path)] + + # Execute the Perl script + # We use check=False because a skipped test (due to no internet) might + # result in a non-zero exit code, which we want to parse, not treat as an error. + process = subprocess.run( + command, + capture_output=True, + text=True, + check=False + ) + stdout = process.stdout + stderr = process.stderr + + # Determine internet availability by parsing Test::More output. + # A successful test without "# SKIP" indicates internet is available. + # Any output containing "# SKIP" indicates the test was skipped (no internet or NO_NETWORK_TESTING). + internet_available = False + if "ok 1 - Internet connectivity check" in stdout and "# SKIP" not in stdout: + internet_available = True + else: + internet_available = False + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "internet_available": internet_available, + "output_files": [], + } + + except FileNotFoundError: + return { + "command_executed": " ".join(command) if 'command' in locals() else "perl ", + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "internet_available": False, + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command) if 'command' in locals() else "perl ", + "stdout": e.stdout, + "stderr": e.stderr, + "internet_available": False, + "output_files": [], + } + except Exception as e: + return { + "command_executed": " ".join(command) if 'command' in locals() else "perl ", + "stdout": "", + "stderr": f"An unexpected error occurred: {str(e)}", + "internet_available": False, + "output_files": [], + } + finally: + # Clean up the temporary script file + if tmp_script_path and tmp_script_path.exists(): + tmp_script_path.unlink(missing_ok=True) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3df75bf7171ce98850fd4b0bf4d5e172df75cd33 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/perl-test-requiresinternet_server.py') +SERVER_NAME = 'biosci_perl_test_requiresinternet' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..050601fd43ea19288648874747c1889c67be70ad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-test-requiresinternet: + build: . + image: mcp-perl-test-requiresinternet:latest + container_name: mcp-perl-test-requiresinternet + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-test-requiresinternet + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e48913bff3444291c0d3bb4f753a7a7229fda6a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-test-requiresinternet + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-test-requiresinternet/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6961d86f5df5613b64f38ecd55e865d9067909cd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-text-format via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-text-format -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-text-format_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-text-format_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-text-format_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/__pycache__/perl-text-format_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/__pycache__/perl-text-format_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d3385205a02a9a31ccf57b37627c5d460ec92e1b Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/__pycache__/perl-text-format_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_server.py new file mode 100644 index 0000000000000000000000000000000000000000..bec2a3a504821d08526f0687032070b38625a143 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_server.py @@ -0,0 +1,255 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Dict, Union + +@mcp.tool() +def run_perl_script( + program_file: Optional[Path] = None, + inline_program: Optional[List[str]] = None, + inline_program_extended: Optional[List[str]] = None, + program_arguments: Optional[List[str]] = None, + record_separator_octal: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + edit_in_place_extension: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_processing_terminator: Optional[str] = None, + use_module: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + rudimentary_parsing_for_switches: bool = False, + look_for_programfile_in_path: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + dump_core_after_parsing: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config_summary_variable: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_text_before_shebang_cd_to_directory: Optional[Path] = None, + disable_all_warnings: bool = False, +) -> Dict[str, Union[str, List[str], int]]: + """ + Executes a Perl script with various interpreter options. + + This tool wraps the 'perl' interpreter, allowing the execution of a Perl + script file or inline code with a comprehensive set of Perl command-line + switches. The 'perl-text-format' package is a Perl module and not a + standalone executable; this tool provides the general Perl execution + environment where such modules can be utilized within a script. + + Args: + program_file: Path to the Perl script file to execute. + Cannot be used with `inline_program` or `inline_program_extended`. + inline_program: One or more lines of Perl program code to execute directly. + Cannot be used with `program_file` or `inline_program_extended`. + Multiple `-e` switches are supported by providing a list of strings. + inline_program_extended: One or more lines of Perl program code to execute, + like `inline_program`, but enables all optional features. + Cannot be used with `program_file` or `inline_program`. + Multiple `-E` switches are supported by providing a list of strings. + program_arguments: Arguments to pass to the Perl script. These will be available + in the script via @ARGV. + record_separator_octal: Specify record separator (e.g., '0' for NUL, or an octal string). + Corresponds to Perl's `-0` switch. + autosplit: Enable autosplit mode with -n or -p (splits $_ into @F). + Corresponds to Perl's `-a` switch. + unicode_features: Enables the listed Unicode features (number or list). + Corresponds to Perl's `-C` switch. + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). + Corresponds to Perl's `-c` switch. + debugger: Run program under debugger. Provide an optional debugger name (e.g., 'GDB'). + Corresponds to Perl's `-d[:debugger]` switch. + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). + Corresponds to Perl's `-D` switch. + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup. + Corresponds to Perl's `-f` switch. + split_pattern: split() pattern for -a switch (e.g., '/\s+/'). + Corresponds to Perl's `-F` switch. + edit_in_place_extension: Edit <> files in place (makes backup if extension supplied). + Provide the extension (e.g., '.bak') or an empty string for no backup. + Corresponds to Perl's `-i` switch. + include_directories: Specify @INC/#include directories. Multiple -I's are supported. + Corresponds to Perl's `-I` switch. + line_ending_processing_terminator: Enable line ending processing, specifies line terminator (e.g., '0' for NUL). + Corresponds to Perl's `-l` switch. + use_module: Execute "use/no module..." before executing program. + Provide module names (e.g., 'Text::Format', 'no strict'). + Corresponds to Perl's `-[mM][-]module` switch. + loop_around_program: Assume "while (<>) { ... }" loop around program. + Corresponds to Perl's `-n` switch. + loop_and_print: Assume loop like -n but print line also, like sed. + Corresponds to Perl's `-p` switch. + rudimentary_parsing_for_switches: Enable rudimentary parsing for switches after programfile. + Corresponds to Perl's `-s` switch. + look_for_programfile_in_path: Look for programfile using PATH environment variable. + Corresponds to Perl's `-S` switch. + tainting_warnings: Enable tainting warnings. Corresponds to Perl's `-t` switch. + tainting_checks: Enable tainting checks. Corresponds to Perl's `-T` switch. + dump_core_after_parsing: Dump core after parsing program. Corresponds to Perl's `-u` switch. + allow_unsafe_operations: Allow unsafe operations. Corresponds to Perl's `-U` switch. + print_version: Print version, patchlevel and license. Corresponds to Perl's `-v` switch. + print_config_summary_variable: Print configuration summary (or a single Config.pm variable). + Corresponds to Perl's `-V[:variable]` switch. + enable_warnings: Enable many useful warnings. Corresponds to Perl's `-w` switch. + enable_all_warnings: Enable all warnings. Corresponds to Perl's `-W` switch. + ignore_text_before_shebang_cd_to_directory: Ignore text before #!perl line (optionally cd to directory). + Corresponds to Perl's `-x[directory]` switch. + disable_all_warnings: Disable all warnings. Corresponds to Perl's `-X` switch. + """ + + cmd = ["perl"] + output_files: List[str] = [] + + # Input validation for program source + program_source_count = sum([ + 1 if program_file is not None else 0, + 1 if inline_program is not None else 0, + 1 if inline_program_extended is not None else 0, + ]) + + if program_source_count > 1: + raise ValueError( + "Only one of 'program_file', 'inline_program', or 'inline_program_extended' can be specified." + ) + if program_source_count == 0 and not (print_version or print_config_summary_variable): + raise ValueError( + "Either 'program_file', 'inline_program', 'inline_program_extended' must be specified, " + "or 'print_version'/'print_config_summary_variable' must be true." + ) + + if program_file: + if not program_file.is_file(): + raise FileNotFoundError(f"Perl script file not found: {program_file}") + + # Add switches + if record_separator_octal is not None: + cmd.append(f"-0{record_separator_octal}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d:{debugger}" if debugger else "-d") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if edit_in_place_extension is not None: + cmd.append(f"-i{edit_in_place_extension}") + if include_directories: + for inc_dir in include_directories: + if not inc_dir.is_dir(): + raise NotADirectoryError(f"Include directory not found: {inc_dir}") + cmd.append(f"-I{inc_dir}") + if line_ending_processing_terminator is not None: + cmd.append(f"-l{line_ending_processing_terminator}") + if use_module: + for module_spec in use_module: + if module_spec.lower().startswith("no "): + module_name = module_spec[3:].strip() # Remove "no " prefix + if not module_name: + raise ValueError("Module name cannot be empty after 'no ' prefix for -M- switch.") + cmd.append(f"-M-{module_name}") # For 'no module;' + else: + cmd.append(f"-M{module_spec}") # For 'use module;' + if loop_around_program: + cmd.append("-n") + if loop_and_print: + cmd.append("-p") + if rudimentary_parsing_for_switches: + cmd.append("-s") + if look_for_programfile_in_path: + cmd.append("-S") + if tainting_warnings: + cmd.append("-t") + if tainting_checks: + cmd.append("-T") + if dump_core_after_parsing: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config_summary_variable is not None: + cmd.append(f"-V:{print_config_summary_variable}" if print_config_summary_variable else "-V") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if ignore_text_before_shebang_cd_to_directory is not None: + if ignore_text_before_shebang_cd_to_directory and not ignore_text_before_shebang_cd_to_directory.is_dir(): + raise NotADirectoryError(f"Directory for -x not found: {ignore_text_before_shebang_cd_to_directory}") + cmd.append(f"-x{ignore_text_before_shebang_cd_to_directory}" if ignore_text_before_shebang_cd_to_directory else "-x") + if disable_all_warnings: + cmd.append("-X") + + # Add inline program code + if inline_program: + for code_line in inline_program: + cmd.extend(["-e", code_line]) + if inline_program_extended: + for code_line in inline_program_extended: + cmd.extend(["-E", code_line]) + + # Add program file or arguments for inline code, with '--' separator + if program_file: + # Add '--' to explicitly separate Perl interpreter options from the script file and its arguments. + cmd.append("--") + cmd.append(str(program_file)) + if program_arguments: + cmd.extend(program_arguments) + elif (inline_program or inline_program_extended) and program_arguments: + # If inline code is used and there are program arguments, + # the arguments are passed directly to perl after the -e/-E options. + # Add '--' to explicitly separate Perl interpreter options (including -e/-E) + # from the arguments that follow. + cmd.append("--") + cmd.extend(program_arguments) + + command_executed = " ".join(map(str, cmd)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + stdout = result.stdout + stderr = result.stderr + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "returncode": e.returncode, + "output_files": output_files, + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'perl' command not found. Please ensure Perl is installed and in your PATH.", + "error": "Perl executable not found.", + "returncode": 127, + "output_files": output_files, + } + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..7a2c059bd5b2f0d2dedd0622b436f5506f9c1e5d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/perl-text-format_server.py') +SERVER_NAME = 'biosci_perl_text_format' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..2254dd9f1adfeab4b28dafa6f9e672b3e75a0d21 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-text-format: + build: . + image: mcp-perl-text-format:latest + container_name: mcp-perl-text-format + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-text-format + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3b4883289a7c10f21926a5895a8675acbb1f2d16 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-text-format + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-text-format/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d04cdb80a58c5fbdf1dd66eb56b0344c58c6645c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-time-hires via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-time-hires -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-time-hires_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-time-hires_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-time-hires_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c584959d07960b81d706952762f255ce195b3b38 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_server.py @@ -0,0 +1,393 @@ +from typing import Optional, List +import subprocess +from pathlib import Path + +@mcp.tool() +def usleep(microseconds: int): + """ + Sleeps for the number of microseconds (millionths of a second) specified. + Returns the number of microseconds actually slept. + """ + if microseconds < 0: + return {"error": "microseconds must be a non-negative integer"} + + cmd = ["perl", "-MTime::HiRes=usleep", "-e", "print usleep($ARGV[0])", str(microseconds)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "microseconds_slept": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def nanosleep(nanoseconds: int): + """ + Sleeps for the number of nanoseconds (1e9ths of a second) specified. + Returns the number of nanoseconds actually slept (accurate only to microseconds). + """ + if nanoseconds < 0: + return {"error": "nanoseconds must be a non-negative integer"} + + cmd = ["perl", "-MTime::HiRes=nanosleep", "-e", "print nanosleep($ARGV[0])", str(nanoseconds)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "nanoseconds_slept": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def ualarm(microseconds: int, interval_microseconds: int = 0): + """ + Issues a ualarm call. The interval_microseconds is optional (defaults to 0). + Returns the remaining time in the alarm in microseconds. + """ + if microseconds < 0 or interval_microseconds < 0: + return {"error": "Parameters must be non-negative integers"} + + cmd = ["perl", "-MTime::HiRes=ualarm", "-e", "print ualarm($ARGV[0], $ARGV[1])", str(microseconds), str(interval_microseconds)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "remaining_microseconds": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def gettimeofday(): + """ + Returns the seconds and microseconds since the epoch as a comma-separated string. + """ + cmd = ["perl", "-MTime::HiRes=gettimeofday", "-e", "print join(',', gettimeofday())"] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "time_data": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def tv_interval(sec1: int, usec1: int, sec2: Optional[int] = None, usec2: Optional[int] = None): + """ + Returns the floating seconds between two times (sec1, usec1) and (sec2, usec2). + If the second time is omitted, the current time is used. + """ + if sec2 is not None and usec2 is not None: + perl_code = f"print tv_interval([{sec1}, {usec1}], [{sec2}, {usec2}])" + else: + perl_code = f"print tv_interval([{sec1}, {usec1}])" + + cmd = ["perl", "-MTime::HiRes=tv_interval", "-e", perl_code] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "interval_seconds": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_time(): + """ + Returns floating seconds since the epoch with microsecond resolution. + """ + cmd = ["perl", "-MTime::HiRes=time", "-e", "printf('%.6f', time())"] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "current_time": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_sleep(seconds: float): + """ + Sleeps for the specified amount of floating point seconds. + Returns the number of seconds actually slept. + """ + if seconds < 0: + return {"error": "seconds must be a non-negative float"} + + cmd = ["perl", "-MTime::HiRes=sleep", "-e", "print sleep($ARGV[0])", str(seconds)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "seconds_slept": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_alarm(seconds: float, interval: float = 0.0): + """ + Sets an alarm for the specified floating point seconds. + Returns the remaining time in the alarm in seconds. + """ + if seconds < 0 or interval < 0: + return {"error": "Parameters must be non-negative floats"} + + cmd = ["perl", "-MTime::HiRes=alarm", "-e", "print alarm($ARGV[0], $ARGV[1])", str(seconds), str(interval)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "remaining_seconds": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_stat(file_path: str): + """ + Performs a high-resolution stat on a file. + Returns a comma-separated list of stat fields (dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, blocks). + """ + path = Path(file_path) + if not path.exists(): + return {"error": f"File not found: {file_path}"} + + cmd = ["perl", "-MTime::HiRes=stat", "-e", "print join(',', stat($ARGV[0]))", str(file_path)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "stat_fields": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_lstat(file_path: str): + """ + Performs a high-resolution lstat on a symbolic link or file. + Returns a comma-separated list of stat fields. + """ + path = Path(file_path) + if not path.exists() and not path.is_symlink(): + return {"error": f"File or link not found: {file_path}"} + + cmd = ["perl", "-MTime::HiRes=lstat", "-e", "print join(',', lstat($ARGV[0]))", str(file_path)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "lstat_fields": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_utime(atime: float, mtime: float, files: List[str]): + """ + Sets high-resolution access and modification times for a list of files. + Returns the number of files successfully updated. + """ + for f in files: + if not Path(f).exists(): + return {"error": f"File not found: {f}"} + + cmd = ["perl", "-MTime::HiRes=utime", "-e", "$a=shift; $m=shift; print utime($a, $m, @ARGV)", str(atime), str(mtime)] + files + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "files_updated": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def clock_gettime(clock_id: str = "CLOCK_REALTIME"): + """ + Returns the current time of the specified clock (e.g., CLOCK_REALTIME, CLOCK_MONOTONIC). + """ + cmd = ["perl", "-MTime::HiRes=:all", "-e", "print clock_gettime(eval($ARGV[0]))", clock_id] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "clock_time": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def clock_getres(clock_id: str = "CLOCK_REALTIME"): + """ + Returns the resolution of the specified clock. + """ + cmd = ["perl", "-MTime::HiRes=:all", "-e", "print clock_getres(eval($ARGV[0]))", clock_id] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "clock_resolution": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def clock_nanosleep(nanoseconds: int, clock_id: str = "CLOCK_REALTIME", flags: int = 0): + """ + Sleeps for the specified nanoseconds using the specified clock. + Flags can be TIMER_ABSTIME (1) or 0. + """ + if nanoseconds < 0: + return {"error": "nanoseconds must be non-negative"} + + cmd = ["perl", "-MTime::HiRes=:all", "-e", "print clock_nanosleep(eval($ARGV[1]), $ARGV[0], $ARGV[2])", str(nanoseconds), clock_id, str(flags)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "nanoseconds_slept": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def hires_clock(): + """ + Returns the process time (user + system) in seconds with high resolution. + """ + cmd = ["perl", "-MTime::HiRes=clock", "-e", "print clock()"] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "process_time": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..06c1f06ae786a6706b485a737a97ea96e0270509 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/perl-time-hires_server.py') +SERVER_NAME = 'biosci_perl_time_hires' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..99e2b434733b7c74e3d8984e4fc7f075151f30d3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-time-hires: + build: . + image: mcp-perl-time-hires:latest + container_name: mcp-perl-time-hires + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-time-hires + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..32c6d05fb886e826b264e96e0ac8aa3a9751a744 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-time-hires + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-time-hires/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-timedate/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-timedate/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-timedate/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..aeb20b22ae3ce8e60d3d01066a7b76ea5bc2da56 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-type-tiny via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-type-tiny -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-type-tiny_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-type-tiny_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-type-tiny_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/__pycache__/perl-type-tiny_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/__pycache__/perl-type-tiny_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6fd55d7d746da1e412c5b5e3f5cbe899d6d8470 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/__pycache__/perl-type-tiny_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e0fb82822284bb7c1df538a2bd6add233463cf0e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_server.py @@ -0,0 +1,313 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +# Helper function to build command arguments +def _build_perl_command( + record_separator_octal: Optional[str], + autosplit_mode: bool, + unicode_features: Optional[str], + check_syntax_only: bool, + debugger: Optional[str], + debugging_flags: Optional[str], + program_code_e: Optional[List[str]], + program_code_E: Optional[List[str]], + no_sitecustomize: bool, + split_pattern: Optional[str], + edit_in_place_extension: Optional[str], + include_directories: Optional[List[Path]], + line_ending_processing_octal: Optional[str], + use_modules: Optional[List[str]], + no_modules: Optional[List[str]], + assume_loop_n: bool, + assume_loop_p: bool, + rudimentary_switch_parsing: bool, + search_path_for_programfile: bool, + tainting_warnings: bool, + tainting_checks: bool, + dump_core: bool, + allow_unsafe_operations: bool, + print_version: bool, + print_config_variable: Optional[str], + enable_warnings: bool, + enable_all_warnings: bool, + ignore_text_before_shebang_dir: Optional[Path], + disable_all_warnings: bool, + program_file: Optional[Path], + script_arguments: Optional[List[str]], +) -> List[str]: + """Constructs the command list for perl.""" + cmd = ["perl"] + + if record_separator_octal is not None: + cmd.append(f"-0{record_separator_octal}") + if autosplit_mode: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d:{debugger}") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if program_code_e: + for code in program_code_e: + cmd.extend(["-e", code]) + if program_code_E: + for code in program_code_E: + cmd.extend(["-E", code]) + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if edit_in_place_extension is not None: + cmd.append(f"-i{edit_in_place_extension}") + if include_directories: + for inc_dir in include_directories: + cmd.extend(["-I", str(inc_dir)]) + if line_ending_processing_octal is not None: + cmd.append(f"-l{line_ending_processing_octal}") + if use_modules: + for module in use_modules: + cmd.extend(["-M", module]) # -M is common for 'use' + if no_modules: + for module in no_modules: + cmd.extend(["-M-", module]) # -M- for 'no' + if assume_loop_n: + cmd.append("-n") + if assume_loop_p: + cmd.append("-p") + if rudimentary_switch_parsing: + cmd.append("-s") + if search_path_for_programfile: + cmd.append("-S") + if tainting_warnings: + cmd.append("-t") + if tainting_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config_variable is not None: + cmd.append(f"-V:{print_config_variable}") + if enable_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if ignore_text_before_shebang_dir is not None: + cmd.append(f"-x{ignore_text_before_shebang_dir}") + if disable_all_warnings: + cmd.append("-X") + + # Add program file and script arguments + if program_file: + if not program_file.is_file(): + raise FileNotFoundError(f"Program file not found: {program_file}") + cmd.append(str(program_file)) + + # Add '--' to separate perl options from script arguments if necessary + # This is important if script_arguments might start with '-' and be misinterpreted as perl options. + # It's generally good practice when passing arguments to a script. + if script_arguments: + # Add '--' if a program file is specified, or if no -e/-E code is provided + # (meaning script_arguments are for a script read from stdin or implied by other options). + # If only -e/-E code is provided, script arguments follow directly. + if program_file or (not program_code_e and not program_code_E): + cmd.append("--") + cmd.extend(script_arguments) + + return cmd + +@mcp.tool() +def execute_perl_program( + program_file: Optional[Path] = None, + program_code_e: Optional[List[str]] = None, + program_code_E: Optional[List[str]] = None, + script_arguments: Optional[List[str]] = None, + record_separator_octal: Optional[str] = None, + autosplit_mode: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + edit_in_place_extension: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_processing_octal: Optional[str] = None, + use_modules: Optional[List[str]] = None, + no_modules: Optional[List[str]] = None, + assume_loop_n: bool = False, + assume_loop_p: bool = False, + rudimentary_switch_parsing: bool = False, + search_path_for_programfile: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + dump_core: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config_variable: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_text_before_shebang_dir: Optional[Path] = None, + disable_all_warnings: bool = False, +) -> dict: + """ + Executes a Perl program or one-liner with various interpreter options. + + This tool wraps the 'perl' interpreter, allowing users to run Perl scripts + or provide one-liners with fine-grained control over Perl's execution + environment and features. It supports all command-line switches + documented by 'perl -h'. The 'perl-type-tiny' module would be available + within the Perl environment managed by conda. + + Args: + program_file: Path to the Perl script file to execute. + program_code_e: List of Perl code strings to execute as one-liners (-e). + Can be specified multiple times. Code is executed before `program_file`. + program_code_E: List of Perl code strings to execute as one-liners (-E), + enabling all optional features. Can be specified multiple times. + Code is executed before `program_file`. + script_arguments: List of arguments to pass to the Perl script. These will be available + in the Perl script via the @ARGV array. + record_separator_octal: Specify record separator (e.g., '0' for NUL, '0777' for paragraph mode). + If no argument, defaults to '\0'. + autosplit_mode: Enable autosplit mode with -n or -p (splits $_ into @F). + unicode_features: Enable listed Unicode features (e.g., 'a' for all, 'l' for locale). + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). + debugger: Run program under debugger. Optionally specify debugger (e.g., 'ptkdb'). + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup. + split_pattern: split() pattern for -a switch (e.g., '/\s+/'). + edit_in_place_extension: Edit <> files in place. Makes backup if extension supplied (e.g., '.bak'). + include_directories: List of directories to specify for @INC/#include. Can be specified multiple times. + line_ending_processing_octal: Enable line ending processing, specifies line terminator (e.g., '012' for LF). + use_modules: List of modules to 'use' before executing program (e.g., 'strict', 'warnings'). + Corresponds to -M module. + no_modules: List of modules to 'no' before executing program (e.g., 'strict'). + Corresponds to -M- module. + assume_loop_n: Assume "while (<>) { ... }" loop around program. + assume_loop_p: Assume loop like -n but print line also, like sed. + rudimentary_switch_parsing: Enable rudimentary parsing for switches after programfile. + search_path_for_programfile: Look for programfile using PATH environment variable. + tainting_warnings: Enable tainting warnings. + tainting_checks: Enable tainting checks. + dump_core: Dump core after parsing program. + allow_unsafe_operations: Allow unsafe operations. + print_version: Print version, patchlevel and license. + print_config_variable: Print configuration summary or a single Config.pm variable (e.g., 'archname'). + enable_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + ignore_text_before_shebang_dir: Ignore text before #!perl line. Optionally cd to directory. + disable_all_warnings: Disable all warnings (-X). + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + # Input validation + if not program_file and not (program_code_e or program_code_E) and not print_version and not print_config_variable: + raise ValueError( + "Either 'program_file', 'program_code_e', 'program_code_E', " + "'print_version', or 'print_config_variable' must be provided " + "to specify an action for Perl." + ) + + if include_directories: + for d in include_directories: + if not d.is_dir(): + raise NotADirectoryError(f"Include directory not found: {d}") + + if ignore_text_before_shebang_dir: + if not ignore_text_before_shebang_dir.is_dir(): + raise NotADirectoryError(f"Directory for -x option not found: {ignore_text_before_shebang_dir}") + + # Build the command + cmd = _build_perl_command( + record_separator_octal=record_separator_octal, + autosplit_mode=autosplit_mode, + unicode_features=unicode_features, + check_syntax_only=check_syntax_only, + debugger=debugger, + debugging_flags=debugging_flags, + program_code_e=program_code_e, + program_code_E=program_code_E, + no_sitecustomize=no_sitecustomize, + split_pattern=split_pattern, + edit_in_place_extension=edit_in_place_extension, + include_directories=include_directories, + line_ending_processing_octal=line_ending_processing_octal, + use_modules=use_modules, + no_modules=no_modules, + assume_loop_n=assume_loop_n, + assume_loop_p=assume_loop_p, + rudimentary_switch_parsing=rudimentary_switch_parsing, + search_path_for_programfile=search_path_for_programfile, + tainting_warnings=tainting_warnings, + tainting_checks=tainting_checks, + dump_core=dump_core, + allow_unsafe_operations=allow_unsafe_operations, + print_version=print_version, + print_config_variable=print_config_variable, + enable_warnings=enable_warnings, + enable_all_warnings=enable_all_warnings, + ignore_text_before_shebang_dir=ignore_text_before_shebang_dir, + disable_all_warnings=disable_all_warnings, + program_file=program_file, + script_arguments=script_arguments, + ) + + command_executed = " ".join(map(str, cmd)) + stdout = "" + stderr = "" + output_files: List[Path] = [] + + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + encoding="utf-8" + ) + stdout = process.stdout + stderr = process.stderr + + # If -i is used, the original file is backed up and the new content is written to the original path. + # The backup file would be an output file. + if edit_in_place_extension and program_file: + backup_file = program_file.with_suffix(program_file.suffix + edit_in_place_extension) + if backup_file.exists(): + output_files.append(backup_file) + + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: perl command not found. Please ensure Perl is installed and in your PATH.", + "output_files": [], + } + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + } + except Exception as e: + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": f"An unexpected error occurred: {e}", + "output_files": [], + } + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c683f431f2ae71de6d6516b8db1104354fbde59b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/perl-type-tiny_server.py') +SERVER_NAME = 'biosci_perl_type_tiny' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4e4aeba0a5dbea92926fe16cd424e894992e673f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-type-tiny: + build: . + image: mcp-perl-type-tiny:latest + container_name: mcp-perl-type-tiny + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-type-tiny + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..280753baca65a58896aa7a454f8cc7bd9b90095f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-type-tiny + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-type-tiny/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..359b1738eb16f881b7fe89a8c1fa4cb888618943 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-url-encode via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-url-encode -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-url-encode_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-url-encode_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-url-encode_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4dbf208fabe9f99dbb632f050068fa233e7633fd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_server.py @@ -0,0 +1,188 @@ +import subprocess +import json +from typing import Optional, Dict, List, Any +from pathlib import Path + +@mcp.tool() +def url_encode(text: str) -> Dict[str, Any]: + """ + Encodes a string into application/x-www-form-urlencoded format. + + Args: + text: The string to be URL encoded. + """ + cmd = ["perl", "-MURL::Encode=url_encode", "-e", "print url_encode($ARGV[0])", "--", text] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "encoded_string": result.stdout, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def url_decode(text: str) -> Dict[str, Any]: + """ + Decodes an application/x-www-form-urlencoded encoded string. + + Args: + text: The URL encoded string to decode. + """ + cmd = ["perl", "-MURL::Encode=url_decode", "-e", "print url_decode($ARGV[0])", "--", text] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "decoded_string": result.stdout, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def url_encode_utf8(text: str) -> Dict[str, Any]: + """ + Encodes a Unicode string into application/x-www-form-urlencoded format (UTF-8). + + Args: + text: The Unicode string to be URL encoded. + """ + cmd = ["perl", "-MURL::Encode=url_encode_utf8", "-e", "print url_encode_utf8($ARGV[0])", "--", text] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "encoded_string": result.stdout, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def url_decode_utf8(text: str) -> Dict[str, Any]: + """ + Decodes an application/x-www-form-urlencoded encoded string into a Unicode string (UTF-8). + + Args: + text: The URL encoded string to decode. + """ + cmd = ["perl", "-MURL::Encode=url_decode_utf8", "-e", "print url_decode_utf8($ARGV[0])", "--", text] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "decoded_string": result.stdout, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def url_params_decode(query_string: str) -> Dict[str, Any]: + """ + Decodes a URL query string into a key-value structure. + Note: Returns a list of pairs to handle multiple values for the same key. + + Args: + query_string: The query string (e.g., 'a=1&b=2&a=3'). + """ + # We use Perl to decode and then format as JSON for easy parsing in Python + perl_script = """ + use URL::Encode qw(url_params_decode); + use JSON; + my $params = url_params_decode($ARGV[0]); + print encode_json($params); + """ + cmd = ["perl", "-MURL::Encode", "-MJSON", "-e", perl_script, "--", query_string] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "decoded_params": json.loads(result.stdout), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + except json.JSONDecodeError: + return { + "command_executed": " ".join(cmd), + "error": "Failed to parse Perl output as JSON. Ensure 'perl-json' is installed.", + "stdout": result.stdout, + "stderr": result.stderr + } + +@mcp.tool() +def url_params_encode(params_json: str) -> Dict[str, Any]: + """ + Encodes a JSON object/dictionary of key-value pairs into a URL query string. + + Args: + params_json: A JSON string representing the dictionary of parameters to encode. + Example: '{"name": "John Doe", "city": "New York"}' + """ + # Validate JSON input + try: + json.loads(params_json) + except json.JSONDecodeError as e: + return {"error": f"Invalid JSON input: {str(e)}"} + + perl_script = """ + use URL::Encode qw(url_params_encode); + use JSON; + my $hashref = decode_json($ARGV[0]); + print url_params_encode($hashref); + """ + cmd = ["perl", "-MURL::Encode", "-MJSON", "-e", perl_script, "--", params_json] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "encoded_query_string": result.stdout, + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9cae2bdaa84b07014e5a0c306770eeee25ee7930 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/perl-url-encode_server.py') +SERVER_NAME = 'biosci_perl_url_encode' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..4f270e3e4c23542022656c19ca62d7744ab19285 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-url-encode: + build: . + image: mcp-perl-url-encode:latest + container_name: mcp-perl-url-encode + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-url-encode + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b1b6523a0cc50970804c1a7b5a3150a2155a7203 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-url-encode + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-url-encode/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..526415173f2b617c51918aef3bbd0ad6bdb17881 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-xml-filter-buffertext via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-xml-filter-buffertext -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-xml-filter-buffertext_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-xml-filter-buffertext_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-xml-filter-buffertext_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5615b28f62900e04f8ff37a3e93bf498fb980c4a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_server.py @@ -0,0 +1,230 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Dict, Any + +# No need to import mcp, as per instructions. + +@mcp.tool() +def run_perl_xml_filter_buffertext( + input_xml: Path, + output_xml: Path, + record_separator: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debug_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_processing: Optional[str] = None, + additional_modules_to_load: Optional[List[str]] = None, + rudimentary_switch_parsing: bool = False, + search_path_for_program: bool = False, + enable_tainting_warnings: bool = False, + enable_tainting_checks: bool = False, + dump_core_on_parse_error: bool = False, + allow_unsafe_operations: bool = False, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + disable_all_warnings: bool = False, + ignore_text_before_perl: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Processes an XML file using the perl-xml-filter-buffertext module to buffer + character data events. + + This tool wraps the Perl interpreter to execute a dynamically generated script + that utilizes XML::Filter::BufferText and XML::SAX::Writer. It reads an input + XML file, applies the buffering filter, and writes the processed XML to an + output file. Various Perl interpreter options are exposed for fine-grained + control over the execution environment of the generated script. + + Args: + input_xml: Path to the input XML file to be filtered. + output_xml: Path where the filtered XML output will be written. + record_separator: Specifies the input record separator (e.g., '\\0'). Corresponds to perl -0. + autosplit: Enables autosplit mode with -n or -p (splits $_ into @F). Corresponds to perl -a. + unicode_features: Enables listed Unicode features (e.g., 'all', 'io'). Corresponds to perl -C. + check_syntax_only: Checks syntax only (runs BEGIN and CHECK blocks) for the generated script. Corresponds to perl -c. + debugger: Runs the program under the specified debugger. Corresponds to perl -d[:debugger]. + debug_flags: Sets debugging flags (argument is a bit mask or alphabets). Corresponds to perl -D. + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup. Corresponds to perl -f. + split_pattern: Specifies the split() pattern for -a switch (e.g., '/\s+/'). Corresponds to perl -F. + include_directories: List of directories to add to @INC for module searching. Corresponds to perl -I. + line_ending_processing: Enables line ending processing, specifies line terminator (e.g., '\\n'). Corresponds to perl -l. + additional_modules_to_load: List of additional modules to execute "use/no module..." before program. Corresponds to perl -m/-M. + rudimentary_switch_parsing: Enables rudimentary parsing for switches after programfile. Corresponds to perl -s. + search_path_for_program: Looks for programfile using PATH environment variable. Corresponds to perl -S. + enable_tainting_warnings: Enables tainting warnings. Corresponds to perl -t. + enable_tainting_checks: Enables tainting checks. Corresponds to perl -T. + dump_core_on_parse_error: Dumps core after parsing program. Corresponds to perl -u. + allow_unsafe_operations: Allows unsafe operations. Corresponds to perl -U. + enable_warnings: Enables many useful warnings (-w). Mutually exclusive with enable_all_warnings and disable_all_warnings. + enable_all_warnings: Enables all warnings (-W). Mutually exclusive with enable_warnings and disable_all_warnings. + disable_all_warnings: Disables all warnings (-X). Mutually exclusive with enable_warnings and enable_all_warnings. + ignore_text_before_perl: Ignores text before #!perl line (optionally cd to directory). Corresponds to perl -x. + + Returns: + A dictionary containing the command executed, stdout, stderr, and output files. + """ + # 1. Input validation + if not input_xml.is_file(): + raise FileNotFoundError(f"Input XML file not found: {input_xml}") + + # Ensure output directory exists + output_xml.parent.mkdir(parents=True, exist_ok=True) + + # Validate mutually exclusive warning flags + warning_flags_count = sum([enable_warnings, enable_all_warnings, disable_all_warnings]) + if warning_flags_count > 1: + raise ValueError("Only one of -w, -W, or -X (enable_warnings, enable_all_warnings, disable_all_warnings) can be specified.") + + # Validate include_directories + if include_directories: + for d in include_directories: + if not d.is_dir(): + raise NotADirectoryError(f"Include directory not found: {d}") + + # Validate ignore_text_before_perl directory + if ignore_text_before_perl is not None and not ignore_text_before_perl.is_dir(): + raise NotADirectoryError(f"Directory for -x option not found: {ignore_text_before_perl}") + + command = ["perl"] + + # Add perl interpreter options based on parameters + if record_separator is not None: + command.append(f"-0{record_separator}") + if autosplit: + command.append("-a") + if unicode_features is not None: + command.append(f"-C{unicode_features}") + if check_syntax_only: + command.append("-c") + if debugger is not None: + command.append(f"-d:{debugger}") + if debug_flags is not None: + command.append(f"-D{debug_flags}") + if no_sitecustomize: + command.append("-f") + if split_pattern is not None: + command.append(f"-F{split_pattern}") + if include_directories: + for d in include_directories: + command.append(f"-I{d}") + if line_ending_processing is not None: + command.append(f"-l{line_ending_processing}") + + # Add additional modules specified by the user via -M + if additional_modules_to_load: + for module in additional_modules_to_load: + command.append(f"-M{module}") + + if rudimentary_switch_parsing: + command.append("-s") + if search_path_for_program: + command.append("-S") + if enable_tainting_warnings: + command.append("-t") + if enable_tainting_checks: + command.append("-T") + if dump_core_on_parse_error: + command.append("-u") + if allow_unsafe_operations: + command.append("-U") + if enable_warnings: + command.append("-w") + if enable_all_warnings: + command.append("-W") + if disable_all_warnings: + command.append("-X") + if ignore_text_before_perl is not None: + command.append(f"-x{ignore_text_before_perl}") + + # 2. Create a temporary Perl script to use XML::Filter::BufferText + # The script explicitly uses 'strict' for good practice. + # 'warnings' is omitted from the script to allow CLI flags (-w, -W, -X) + # to fully control warning behavior without potential conflicts. + perl_script_content = f""" + use strict; + use XML::SAX::ParserFactory; + use XML::Filter::BufferText; + use XML::SAX::Writer; + + my $input_file = shift @ARGV; + my $output_file = shift @ARGV; + + die "Usage: $0 \\n" unless defined $input_file && defined $output_file; + + open my $OUT, '>', $output_file or die "Cannot open $output_file: $!\\n"; + + my $writer = XML::SAX::Writer->new( Output => $OUT ); + my $filter = XML::Filter::BufferText->new( Handler => $writer ); + my $parser = XML::SAX::ParserFactory->parser( Handler => $filter ); + + eval {{ + $parser->parse_uri($input_file); + }}; + if ($@) {{ + warn "Error parsing XML: $@\\n"; + exit 1; + }} + + close $OUT; + exit 0; + """ + + stdout = "" + stderr = "" + output_files: List[Path] = [] + temp_script_path: Optional[Path] = None + + try: + # Write the Perl script to a temporary file + with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".pl") as temp_script_file: + temp_script_file.write(perl_script_content) + temp_script_path = Path(temp_script_file.name) + + # Append the temporary script path and input/output files as arguments + command.append(str(temp_script_path)) + command.append(str(input_xml)) + command.append(str(output_xml)) + + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, # Raise CalledProcessError for non-zero exit codes + ) + stdout = process.stdout + stderr = process.stderr + output_files.append(output_xml) + + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(e.cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Perl command failed with exit code {e.returncode}", + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": "Error: 'perl' command not found. Is Perl installed and in your PATH?", + "error": "Perl interpreter not found.", + "output_files": [], + } + finally: + # Clean up the temporary script file + if temp_script_path and temp_script_path.exists(): + temp_script_path.unlink() + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..8b299a761b7bbf3b09c1e9e8dcaacc23b3e6d465 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/perl-xml-filter-buffertext_server.py') +SERVER_NAME = 'biosci_perl_xml_filter_buffertext' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b1b6b4fbb25dd74912cfa05f98b1abecbfff9b18 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-xml-filter-buffertext: + build: . + image: mcp-perl-xml-filter-buffertext:latest + container_name: mcp-perl-xml-filter-buffertext + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-xml-filter-buffertext + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..679261cb5ca0f826a1f653e7d9eadadc285fd2e6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-xml-filter-buffertext + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-filter-buffertext/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0a7aca7ccbcc120265bc3debc46dd9557889966b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-xml-libxml via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-xml-libxml -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-xml-libxml_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-xml-libxml_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-xml-libxml_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1f5b6a370ab96e88c4bd3baf5dfe954e7bb46de7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_server.py @@ -0,0 +1,268 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union + +@mcp.tool() +def perl_xml_libxml_validate( + xml_path: str, + schema_path: Optional[str] = None, + schema_type: str = "xsd", +): + """ + Validates an XML file using perl-xml-libxml. Can check for well-formedness or + validate against an XSD or DTD. + + Args: + xml_path: Path to the XML file to validate. + schema_path: Optional path to a schema file (XSD or DTD). + schema_type: Type of schema provided ('xsd' or 'dtd'). Defaults to 'xsd'. + """ + xml_file = Path(xml_path) + if not xml_file.exists(): + return {"error": f"XML file not found: {xml_path}"} + + # Construct Perl one-liner for validation + perl_script = [ + "use XML::LibXML;", + "my $xml = shift;", + "my $schema_file = shift;", + "my $type = shift;", + "my $parser = XML::LibXML->new();", + "eval {", + " if ($schema_file) {", + " if ($type eq 'xsd') {", + " my $schema = XML::LibXML::Schema->new(location => $schema_file);", + " my $doc = $parser->parse_file($xml);", + " $schema->validate($doc);", + " } elsif ($type eq 'dtd') {", + " $parser->validation(1);", + " $parser->parse_file($xml);", + " }", + " } else {", + " $parser->parse_file($xml);", + " }", + "};", + "if ($@) { die \"Validation failed: $@\"; } else { print \"Validation successful\\n\"; }", + ] + + cmd = ["perl", "-MXML::LibXML", "-e", "".join(perl_script), str(xml_file)] + if schema_path: + s_path = Path(schema_path) + if not s_path.exists(): + return {"error": f"Schema file not found: {schema_path}"} + cmd.append(str(s_path)) + cmd.append(schema_type) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Validation failed" + } + +@mcp.tool() +def perl_xml_libxml_xpath( + xml_path: str, + expression: str, + output_format: str = "string", +): + """ + Extracts data from an XML file using an XPath expression via XML::LibXML. + + Args: + xml_path: Path to the XML file. + expression: XPath expression to evaluate. + output_format: How to return results ('string' for text content, 'xml' for raw XML nodes). + """ + xml_file = Path(xml_path) + if not xml_file.exists(): + return {"error": f"XML file not found: {xml_path}"} + + # Construct Perl one-liner for XPath + perl_script = [ + "use XML::LibXML;", + "my $xml = shift;", + "my $xpath = shift;", + "my $fmt = shift;", + "my $dom = XML::LibXML->load_xml(location => $xml);", + "for my $node ($dom->findnodes($xpath)) {", + " if ($fmt eq 'xml') { print $node->toString(), \"\\n\"; }", + " else { print $node->textContent(), \"\\n\"; }", + "}" + ] + + cmd = ["perl", "-MXML::LibXML", "-e", "".join(perl_script), str(xml_file), expression, output_format] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "results": result.stdout.splitlines() + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "XPath query failed" + } + +@mcp.tool() +def perl_xml_libxml_format( + xml_path: str, + indent: int = 1, + no_blanks: bool = True, +): + """ + Pretty-prints/formats an XML file using XML::LibXML. + + Args: + xml_path: Path to the XML file to format. + indent: Indentation level (0, 1, or 2). Defaults to 1. + no_blanks: If True, removes existing whitespace before re-formatting. Defaults to True. + """ + xml_file = Path(xml_path) + if not xml_file.exists(): + return {"error": f"XML file not found: {xml_path}"} + + if indent < 0 or indent > 2: + return {"error": "Indent must be 0, 1, or 2"} + + blanks_flag = 1 if no_blanks else 0 + + perl_script = [ + "use XML::LibXML;", + "my $xml = shift;", + "my $ind = shift;", + "my $nb = shift;", + "my $dom = XML::LibXML->load_xml(location => $xml, no_blanks => $nb);", + "print $dom->toString($ind);" + ] + + cmd = ["perl", "-MXML::LibXML", "-e", "".join(perl_script), str(xml_file), str(indent), str(blanks_flag)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "formatted_xml": result.stdout + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Formatting failed" + } + +@mcp.tool() +def perl_xml_libxml_execute( + script_path: Optional[str] = None, + one_liner: Optional[str] = None, + input_files: Optional[List[str]] = None, + warnings: bool = True, + taint_check: bool = False, + include_dirs: Optional[List[str]] = None, + autosplit: bool = False, + loop_n: bool = False, + loop_p: bool = False, +): + """ + General purpose Perl execution tool with XML::LibXML pre-loaded. + Allows running custom scripts or one-liners that utilize the library. + + Args: + script_path: Path to a .pl script to execute. + one_liner: A string containing Perl code to execute (equivalent to -e). + input_files: List of files to pass as arguments to the script. + warnings: Enable many useful warnings (-w). Defaults to True. + taint_check: Enable tainting checks (-T). Defaults to False. + include_dirs: List of directories to add to @INC (-I). + autosplit: Enable autosplit mode (-a) with -n or -p. + loop_n: Assume "while (<>) { ... }" loop around program (-n). + loop_p: Assume loop like -n but print line also (-p). + """ + cmd = ["perl", "-MXML::LibXML"] + + if warnings: + cmd.append("-w") + if taint_check: + cmd.append("-T") + if autosplit: + cmd.append("-a") + if loop_n: + cmd.append("-n") + if loop_p: + cmd.append("-p") + + if include_dirs: + for d in include_dirs: + cmd.extend(["-I", d]) + + if one_liner: + cmd.extend(["-e", one_liner]) + elif script_path: + s_path = Path(script_path) + if not s_path.exists(): + return {"error": f"Script not found: {script_path}"} + cmd.append(str(s_path)) + else: + return {"error": "Either script_path or one_liner must be provided."} + + if input_files: + for f in input_files: + f_path = Path(f) + if f_path.exists(): + cmd.append(str(f_path)) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "exit_code": e.returncode, + "error": "Perl execution failed" + } + +@mcp.tool() +def perl_xml_libxml_info(): + """ + Returns version information for the perl-xml-libxml installation and the underlying libxml2 library. + """ + perl_script = "use XML::LibXML; printf('XML::LibXML Version: %s\\nLibXML2 Version: %s\\n', $XML::LibXML::VERSION, XML::LibXML::LIBXML_DOTTED_VERSION);" + cmd = ["perl", "-e", perl_script] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Failed to retrieve version info" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..41ec9b8ff7e8ff11fd724e67ce476991644beda5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/perl-xml-libxml_server.py') +SERVER_NAME = 'biosci_perl_xml_libxml' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..1414450d5cab98c47adcf029be3d8009ab5161cb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-xml-libxml: + build: . + image: mcp-perl-xml-libxml:latest + container_name: mcp-perl-xml-libxml + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-xml-libxml + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8f9a178635543090a48cafd5b83741825cb5031f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-xml-libxml + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-libxml/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..fe812e7864e2670c70fde10769364b33c4937c53 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-xml-parser via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-xml-parser -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-xml-parser_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-xml-parser_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-xml-parser_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_server.py new file mode 100644 index 0000000000000000000000000000000000000000..04db9f02c2242d70f85935aa863a838e679f143b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_server.py @@ -0,0 +1,231 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union + +# No need to import mcp, as per instructions. + +# Helper function for common subprocess execution logic +def _execute_command(cmd: List[str]) -> dict: + """ + Executes a shell command and returns structured output. + """ + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": [], # This will be populated by specific tools if needed + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "returncode": e.returncode, + "output_files": [], + } + except FileNotFoundError: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": f"Error: The command '{cmd[0]}' was not found. " + "Please ensure Perl is installed and in your PATH.", + "error": "Executable not found", + "returncode": 127, + "output_files": [], + } + +@mcp.tool() +def run_perl_script( + program_file: Optional[Path] = None, + program_string: Optional[str] = None, + program_string_extended: bool = False, + program_arguments: Optional[List[str]] = None, + record_separator: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + no_sitecustomize: bool = False, + split_pattern: Optional[str] = None, + edit_in_place_extension: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_processing: Optional[str] = None, + modules_to_use: Optional[List[str]] = None, + loop_around_program: bool = False, + loop_and_print: bool = False, + rudimentary_parsing: bool = False, + search_path: bool = False, + tainting_warnings: bool = False, + tainting_checks: bool = False, + dump_core: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config_summary: Optional[str] = None, + enable_warnings: bool = False, + enable_all_warnings: bool = False, + disable_all_warnings: bool = False, + ignore_text_before_shebang_dir: Optional[Path] = None, +) -> dict: + """ + Executes a Perl script or one-liner, providing access to various Perl interpreter switches. + + This tool allows running Perl programs, potentially utilizing modules like XML::Parser + (which is expected to be available in the execution environment), by passing a script file + or a program string along with interpreter options. + + Args: + program_file: Path to the Perl script file to execute. Mutually exclusive with `program_string`. + program_string: A one-line Perl program string to execute. Mutually exclusive with `program_file`. + program_string_extended: If `program_string` is used, enables all optional features (uses -E instead of -e). + program_arguments: A list of strings to be passed as arguments to the Perl script. + record_separator: Specify record separator (e.g., '0' for null, '0777' for paragraph mode). + autosplit: Enable autosplit mode with -n or -p (splits $_ into @F). + unicode_features: Enables listed Unicode features (e.g., 'all', 'io', 'say'). + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). + debugger: Run program under debugger (e.g., 'perl -d' or 'perl -d:MyDebugger'). + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). + no_sitecustomize: Don't do $sitelib/sitecustomize.pl at startup. + split_pattern: split() pattern for -a switch (e.g., '/\\s+/'). Must start and end with '/'. + edit_in_place_extension: Edit <> files in place. If extension is supplied, makes backup (e.g., '.bak'). + include_directories: List of directories to add to @INC/#include path. + line_ending_processing: Enable line ending processing, specifies line terminator (e.g., '0' for null). + modules_to_use: List of modules to execute "use/no module..." before executing program. + Prefix with '-' for 'no module' (e.g., ['strict', '-warnings']). + loop_around_program: Assume "while (<>) { ... }" loop around program (-n). + loop_and_print: Assume loop like -n but print line also, like sed (-p). + rudimentary_parsing: Enable rudimentary parsing for switches after programfile (-s). + search_path: Look for programfile using PATH environment variable (-S). + tainting_warnings: Enable tainting warnings (-t). + tainting_checks: Enable tainting checks (-T). + dump_core: Dump core after parsing program (-u). + allow_unsafe_operations: Allow unsafe operations (-U). + print_version: Print Perl version, patchlevel, and license (-v). + print_config_summary: Print configuration summary (or a single Config.pm variable) (-V[:variable]). + enable_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + disable_all_warnings: Disable all warnings (-X). + ignore_text_before_shebang_dir: Ignore text before #!perl line (optionally cd to directory) (-x[directory]). + """ + cmd = ["perl"] + output_files: List[Path] = [] + + # Input validation + if program_file and program_string: + raise ValueError("Cannot specify both 'program_file' and 'program_string'. Choose one.") + + # If no program file/string, then -v or -V must be active + if not program_file and not program_string and not print_version and print_config_summary is None: + raise ValueError("Either 'program_file' or 'program_string' must be provided, " + "unless 'print_version' or 'print_config_summary' is true.") + + if program_file: + if not program_file.is_file(): + raise FileNotFoundError(f"Program file not found: {program_file}") + + # Handle mutually exclusive warning flags + if disable_all_warnings and (enable_warnings or enable_all_warnings): + raise ValueError("Cannot use 'disable_all_warnings' (-X) with 'enable_warnings' (-w) or 'enable_all_warnings' (-W).") + # Note: -W implies -w, so if both enable_warnings and enable_all_warnings are true, -W will take precedence. + + # Add switches + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d:{debugger}" if debugger else "-d") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if program_string: + if program_string_extended: + cmd.append("-E") + else: + cmd.append("-e") + cmd.append(program_string) + if no_sitecustomize: + cmd.append("-f") + if split_pattern is not None: + if not (split_pattern.startswith('/') and split_pattern.endswith('/')): + raise ValueError("split_pattern must start and end with '/' (e.g., '/\\s+/').") + cmd.append(f"-F{split_pattern}") + if edit_in_place_extension is not None: + cmd.append(f"-i{edit_in_place_extension}") + # If a backup is made (e.g., -i.bak), the backup file would be an output. + # However, the exact name depends on the input file(s) processed by the Perl script, + # which is not directly known by this generic wrapper. + # The primary "output" is the modified input file itself. + if include_directories: + for inc_dir in include_directories: + if not inc_dir.is_dir(): + raise NotADirectoryError(f"Include directory not found: {inc_dir}") + cmd.append(f"-I{inc_dir}") + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if modules_to_use: + for module in modules_to_use: + # Perl's -mmodule and -Mmodule are for 'use module', -m-module and -M-module are for 'no module'. + # We'll use -m for 'use' and -M for 'no' for clarity, though Perl often treats them similarly. + if module.startswith('-'): # For 'no module' + cmd.append(f"-M{module}") # e.g., -M-warnings + else: # For 'use module' + cmd.append(f"-m{module}") # e.g., -mstrict + if loop_and_print: # -p implies -n, so if both are set, -p takes precedence. + cmd.append("-p") + elif loop_around_program: + cmd.append("-n") + if rudimentary_parsing: + cmd.append("-s") + if search_path: + cmd.append("-S") + if tainting_warnings: + cmd.append("-t") + if tainting_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config_summary is not None: + cmd.append(f"-V:{print_config_summary}" if print_config_summary else "-V") + if disable_all_warnings: + cmd.append("-X") + elif enable_all_warnings: # -W implies -w, so if -W is set, no need for -w + cmd.append("-W") + elif enable_warnings: + cmd.append("-w") + if ignore_text_before_shebang_dir is not None: + if not ignore_text_before_shebang_dir.is_dir(): + raise NotADirectoryError(f"Directory for -x not found: {ignore_text_before_shebang_dir}") + cmd.append(f"-x{ignore_text_before_shebang_dir}") + + # Add program file if provided and not using -e/-E + if program_file and not program_string: + cmd.append(str(program_file)) + + # Add program arguments, separated by '--' if a program file is present and arguments are given + # This ensures that arguments are passed to the script, not interpreted as perl switches. + if program_arguments: + if program_file and not program_string: # Only add '--' if a script file is being executed + cmd.append("--") + cmd.extend(program_arguments) + + # Execute the command + result = _execute_command(cmd) + result["output_files"] = output_files # Ensure output_files is always present + + return result \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..57462fb43d3e96ee6d74e852829849321e215ccd --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/perl-xml-parser_server.py') +SERVER_NAME = 'biosci_perl_xml_parser' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..fdbede1ca7da14dc2b6eb726021302b3d53e52d9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-xml-parser: + build: . + image: mcp-perl-xml-parser:latest + container_name: mcp-perl-xml-parser + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-xml-parser + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e72efa35b9c852f50a0f1c9b562aa24c0929245f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-xml-parser + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-parser/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2d10f06824700eb4504b231de66270b64d60fcad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-xml-sax-base via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-xml-sax-base -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-xml-sax-base_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-xml-sax-base_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-xml-sax-base_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e6bd3e3a7d492a1de509042fdc1807b6e2260cf6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_server.py @@ -0,0 +1,228 @@ +from typing import Optional, List +import subprocess +from pathlib import Path + +@mcp.tool() +def perl_xml_sax_base_run( + program_file: Optional[str] = None, + one_liner: Optional[str] = None, + arguments: Optional[List[str]] = None, + record_separator: Optional[str] = None, + autosplit: bool = False, + unicode_features: Optional[str] = None, + syntax_check: bool = False, + debugger: Optional[str] = None, + debug_flags: Optional[str] = None, + one_liner_all_features: Optional[str] = None, + no_site_customize: bool = False, + split_pattern: Optional[str] = None, + inplace_extension: Optional[str] = None, + include_dirs: Optional[List[str]] = None, + line_ending_processing: Optional[str] = None, + modules: Optional[List[str]] = None, + loop_n: bool = False, + loop_p: bool = False, + switch_parsing: bool = False, + path_search: bool = False, + taint_warnings: bool = False, + taint_checks: bool = False, + dump_core: bool = False, + unsafe_operations: bool = False, + print_version: bool = False, + config_summary: Optional[str] = None, + warnings: bool = False, + all_warnings: bool = False, + extract_directory: Optional[str] = None, + disable_all_warnings: bool = False, +): + """ + Executes the Perl interpreter with the XML::SAX::Base environment. + This tool provides access to the Perl CLI switches as defined in the perl-xml-sax-base package environment. + + Args: + program_file: Path to the Perl script to execute. + one_liner: One line of program (several -e's allowed, but here as a single string). + arguments: Arguments passed to the programfile. + record_separator: Specify record separator (-0). + autosplit: Autosplit mode with -n or -p (-a). + unicode_features: Enables the listed Unicode features (-C). + syntax_check: Check syntax only (-c). + debugger: Run program under debugger (-d). + debug_flags: Set debugging flags (-D). + one_liner_all_features: Like -e, but enables all optional features (-E). + no_site_customize: Don't do $sitelib/sitecustomize.pl at startup (-f). + split_pattern: split() pattern for -a switch (-F). + inplace_extension: Edit <> files in place, makes backup if extension supplied (-i). + include_dirs: Specify @INC/#include directory (-I). + line_ending_processing: Enable line ending processing, specifies line terminator (-l). + modules: Execute "use module..." before executing program (-M). + loop_n: Assume "while (<>) { ... }" loop around program (-n). + loop_p: Assume loop like -n but print line also (-p). + switch_parsing: Enable rudimentary parsing for switches after programfile (-s). + path_search: Look for programfile using PATH environment variable (-S). + taint_warnings: Enable tainting warnings (-t). + taint_checks: Enable tainting checks (-T). + dump_core: Dump core after parsing program (-u). + unsafe_operations: Allow unsafe operations (-U). + print_version: Print version, patchlevel and license (-v). + config_summary: Print configuration summary or a single Config.pm variable (-V). + warnings: Enable many useful warnings (-w). + all_warnings: Enable all warnings (-W). + extract_directory: Ignore text before #!perl line, optionally cd to directory (-x). + disable_all_warnings: Disable all warnings (-X). + """ + cmd = ["perl"] + + # Handle switches + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if syntax_check: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d{debugger}") + if debug_flags is not None: + cmd.append(f"-D{debug_flags}") + if one_liner is not None: + cmd.extend(["-e", one_liner]) + if one_liner_all_features is not None: + cmd.extend(["-E", one_liner_all_features]) + if no_site_customize: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if inplace_extension is not None: + cmd.append(f"-i{inplace_extension}") + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if modules: + for m in modules: + cmd.append(f"-M{m}") + if loop_n: + cmd.append("-n") + if loop_p: + cmd.append("-p") + if switch_parsing: + cmd.append("-s") + if path_search: + cmd.append("-S") + if taint_warnings: + cmd.append("-t") + if taint_checks: + cmd.append("-T") + if dump_core: + cmd.append("-u") + if unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if config_summary is not None: + cmd.append(f"-V:{config_summary}" if config_summary else "-V") + if warnings: + cmd.append("-w") + if all_warnings: + cmd.append("-W") + if extract_directory is not None: + cmd.append(f"-x{extract_directory}") + if disable_all_warnings: + cmd.append("-X") + + # Handle program file and arguments + if program_file: + prog_path = Path(program_file) + if not prog_path.exists(): + return {"error": f"Program file not found: {program_file}"} + cmd.append(str(prog_path)) + + if arguments: + cmd.extend(arguments) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "error" + } + +@mcp.tool() +def perl_xml_sax_base_check_version(): + """ + Checks the installed version of the XML::SAX::Base Perl module. + This is useful to verify that the library is correctly installed in the environment. + """ + cmd = ["perl", "-MXML::SAX::Base", "-e", "print $XML::SAX::Base::VERSION"] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "module": "XML::SAX::Base", + "version": result.stdout.strip(), + "command_executed": " ".join(cmd), + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "error": "XML::SAX::Base module not found or failed to load.", + "stderr": e.stderr, + "command_executed": " ".join(cmd), + "status": "error" + } + +@mcp.tool() +def perl_xml_sax_base_validate_xml_structure( + xml_file: str, +): + """ + Uses XML::SAX::Base to perform a basic parse of an XML file to check for well-formedness. + Note: XML::SAX::Base is a base class; this tool uses it to verify the SAX parsing chain. + + Args: + xml_file: Path to the XML file to validate. + """ + xml_path = Path(xml_file) + if not xml_path.exists(): + return {"error": f"XML file not found: {xml_file}"} + + # Perl one-liner to attempt parsing using the SAX Base logic + # It uses XML::SAX::ParserFactory to find an available parser that inherits from Base + perl_code = ( + "use XML::SAX::ParserFactory; " + "my $handler = XML::SAX::Base->new(); " + "my $parser = XML::SAX::ParserFactory->parser(Handler => $handler); " + "eval { $parser->parse_uri($ARGV[0]) }; " + "if ($@) { die $@; }" + ) + + cmd = ["perl", "-e", perl_code, str(xml_path)] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "message": f"XML file {xml_file} is well-formed according to SAX parser.", + "stdout": result.stdout, + "command_executed": " ".join(cmd), + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "error": f"Validation failed for {xml_file}", + "stderr": e.stderr, + "command_executed": " ".join(cmd), + "status": "error" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d3caa4501ccd0a35a6fc89bf9591636fbd9cf87d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/perl-xml-sax-base_server.py') +SERVER_NAME = 'biosci_perl_xml_sax_base' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..1a9a1e4ddd94a241df31aeca32c89f9a39b8d36a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-xml-sax-base: + build: . + image: mcp-perl-xml-sax-base:latest + container_name: mcp-perl-xml-sax-base + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-xml-sax-base + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d358461587267c837158b1577f9423c6a24b72df --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-xml-sax-base + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-sax-base/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..aed3e876b512be9a7de4296215185bfaaeac68f9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-xml-simple via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-xml-simple -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-xml-simple_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-xml-simple_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-xml-simple_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/__pycache__/perl-xml-simple_server.cpython-310.pyc b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/__pycache__/perl-xml-simple_server.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f15782459f205ea03d2467ca6ecbb3bd4c1fac80 Binary files /dev/null and b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/__pycache__/perl-xml-simple_server.cpython-310.pyc differ diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_server.py new file mode 100644 index 0000000000000000000000000000000000000000..24821b19422f71de0326a98b39e8eb9db8d54da7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_server.py @@ -0,0 +1,248 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union, Dict, Any +import tempfile + +# No need to import mcp as per instructions + +@mcp.tool() +def run_perl_script( + program_file: Optional[Path] = None, + program_arguments: Optional[List[str]] = None, + program_code: Optional[List[str]] = None, + record_separator: Optional[Union[str, int]] = None, + autosplit_mode: bool = False, + unicode_features: Optional[str] = None, + check_syntax_only: bool = False, + debugger: Optional[str] = None, + debugging_flags: Optional[str] = None, + enable_all_features_code: Optional[List[str]] = None, + no_sitelib_startup: bool = False, + split_pattern: Optional[str] = None, + edit_in_place_extension: Optional[str] = None, + include_directories: Optional[List[Path]] = None, + line_ending_processing: Optional[Union[str, int]] = None, + use_modules: Optional[List[str]] = None, + use_strict_modules: Optional[List[str]] = None, + loop_around_program: bool = False, + print_and_loop: bool = False, + rudimentary_switch_parsing: bool = False, + look_for_programfile_in_path: bool = False, + enable_tainting_warnings: bool = False, + enable_tainting_checks: bool = False, + dump_core_after_parsing: bool = False, + allow_unsafe_operations: bool = False, + print_version: bool = False, + print_config_variable: Optional[str] = None, + enable_useful_warnings: bool = False, + enable_all_warnings: bool = False, + ignore_text_before_perl_line_flag: bool = False, + ignore_text_before_perl_line_dir: Optional[Path] = None, + disable_all_warnings: bool = False, +) -> Dict[str, Any]: + """ + Executes a Perl script with various interpreter options. + + This tool wraps the 'perl' interpreter, allowing users to run Perl programs + with fine-grained control over execution environment, debugging, and warnings. + It can execute a Perl script from a file, or directly from provided code strings. + It is suitable for running scripts that utilize Perl modules like XML::Simple + if they are available in the Perl environment. + + Args: + program_file: Path to the Perl script file to execute. + program_arguments: List of arguments to pass to the Perl script. + program_code: List of Perl code lines to execute via the -e switch. + Multiple -e switches are allowed. + record_separator: Specify record separator (e.g., '0' for NUL, or an octal value). + If an empty string is provided, it defaults to '\0'. + autosplit_mode: Enable autosplit mode with -n or -p (splits $_ into @F). + unicode_features: Enables listed Unicode features (e.g., 'all', 'io', 'say'). + check_syntax_only: Check syntax only (runs BEGIN and CHECK blocks). + debugger: Run program under debugger (e.g., 'ptkdb'). + debugging_flags: Set debugging flags (argument is a bit mask or alphabets). + enable_all_features_code: List of Perl code lines to execute via the -E switch. + Like -e, but enables all optional features. + no_sitelib_startup: Don't do $sitelib/sitecustomize.pl at startup. + split_pattern: split() pattern for -a switch (e.g., '/\s+/'). + edit_in_place_extension: Edit <> files in place. If an extension is supplied + (e.g., '.bak'), a backup file is made. If an empty + string is supplied, no backup is made. + include_directories: List of directories to specify for @INC/#include. + Multiple -I switches are allowed. + line_ending_processing: Enable line ending processing, specifies line terminator + (e.g., '0' for NUL, or an octal value). + use_modules: List of modules to execute 'use module...' before program. + Each string should be the module name (e.g., 'XML::Simple') + or '-module_name' to 'no module_name'. + use_strict_modules: List of modules to execute 'use module...' before program, + enabling all optional features. Each string should be the + module name (e.g., 'strict') or '-module_name' to 'no module_name'. + loop_around_program: Assume "while (<>) { ... }" loop around program. + print_and_loop: Assume loop like -n but print line also, like sed. + rudimentary_switch_parsing: Enable rudimentary parsing for switches after programfile. + look_for_programfile_in_path: Look for programfile using PATH environment variable. + enable_tainting_warnings: Enable tainting warnings. + enable_tainting_checks: Enable tainting checks. + dump_core_after_parsing: Dump core after parsing program. + allow_unsafe_operations: Allow unsafe operations. + print_version: Print Perl version, patchlevel and license. + print_config_variable: Print configuration summary. If an empty string is provided, + it prints the full summary (-V). If a variable name is provided + (e.g., 'archname'), it prints that specific Config.pm variable (-V:variable). + enable_useful_warnings: Enable many useful warnings (-w). + enable_all_warnings: Enable all warnings (-W). + ignore_text_before_perl_line_flag: Ignore text before #!perl line (-x without directory). + ignore_text_before_perl_line_dir: Ignore text before #!perl line and optionally cd to directory (-x directory). + disable_all_warnings: Disable all warnings (-X). + + Returns: + A dictionary containing the command executed, stdout, stderr, and any output files. + """ + # Input validation + if program_file and not program_file.is_file(): + raise ValueError(f"Program file not found: {program_file}") + + if ignore_text_before_perl_line_dir and not ignore_text_before_perl_line_dir.is_dir(): + raise ValueError(f"Directory for -x option not found: {ignore_text_before_perl_line_dir}") + + if include_directories: + for inc_dir in include_directories: + if not inc_dir.is_dir(): + raise ValueError(f"Include directory not found: {inc_dir}") + + # Build the command + cmd = ["perl"] + + if record_separator is not None: + cmd.append(f"-0{record_separator}") + if autosplit_mode: + cmd.append("-a") + if unicode_features is not None: + cmd.append(f"-C{unicode_features}") + if check_syntax_only: + cmd.append("-c") + if debugger is not None: + cmd.append(f"-d:{debugger}") + if debugging_flags is not None: + cmd.append(f"-D{debugging_flags}") + if program_code: + for code_line in program_code: + cmd.extend(["-e", code_line]) + if enable_all_features_code: + for code_line in enable_all_features_code: + cmd.extend(["-E", code_line]) + if no_sitelib_startup: + cmd.append("-f") + if split_pattern is not None: + cmd.append(f"-F{split_pattern}") + if edit_in_place_extension is not None: + cmd.append(f"-i{edit_in_place_extension}") + if include_directories: + for inc_dir in include_directories: + cmd.append(f"-I{inc_dir}") + if line_ending_processing is not None: + cmd.append(f"-l{line_ending_processing}") + if use_modules: + for module_spec in use_modules: + cmd.append(f"-m{module_spec}") + if use_strict_modules: + for module_spec in use_strict_modules: + cmd.append(f"-M{module_spec}") + if loop_around_program: + cmd.append("-n") + if print_and_loop: + cmd.append("-p") + if rudimentary_switch_parsing: + cmd.append("-s") + if look_for_programfile_in_path: + cmd.append("-S") + if enable_tainting_warnings: + cmd.append("-t") + if enable_tainting_checks: + cmd.append("-T") + if dump_core_after_parsing: + cmd.append("-u") + if allow_unsafe_operations: + cmd.append("-U") + if print_version: + cmd.append("-v") + if print_config_variable is not None: + if print_config_variable == "": + cmd.append("-V") # For -V (summary) + else: + cmd.append(f"-V:{print_config_variable}") # For -V:variable + if enable_useful_warnings: + cmd.append("-w") + if enable_all_warnings: + cmd.append("-W") + if ignore_text_before_perl_line_dir: + cmd.append(f"-x{ignore_text_before_perl_line_dir}") + elif ignore_text_before_perl_line_flag: + cmd.append("-x") + if disable_all_warnings: + cmd.append("-X") + + # Program file and its arguments + if program_file: + cmd.append(str(program_file)) + if program_arguments: + cmd.extend(program_arguments) + + # Ensure at least one action is specified, otherwise perl might just hang or do nothing useful. + if not program_file and not program_code and not enable_all_features_code and not print_version and print_config_variable is None: + raise ValueError( + "Either 'program_file', 'program_code', 'enable_all_features_code', " + "or a flag like 'print_version' or 'print_config_variable' must be provided to execute Perl." + ) + + command_executed = " ".join(str(arg) for arg in cmd) + stdout = "" + stderr = "" + output_files: List[Path] = [] + + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True + ) + stdout = process.stdout + stderr = process.stderr + + # Handle -i option for in-place editing and backup files + if edit_in_place_extension is not None and program_file: + # The original file is modified + output_files.append(program_file) + # If an extension was provided, a backup file is created + if edit_in_place_extension != "": + backup_file = Path(str(program_file) + edit_in_place_extension) + if backup_file.exists(): + output_files.append(backup_file) + + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "returncode": e.returncode, + "output_files": output_files, + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "Error: 'perl' command not found. Ensure Perl is installed and in your PATH.", + "error": "Perl executable not found", + "returncode": 127, + "output_files": output_files, + } + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0477aa9b4d00b9c0ca5559db7703b3ebd12a3e00 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/perl-xml-simple_server.py') +SERVER_NAME = 'biosci_perl_xml_simple' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..14e1624bcf9301057a0256c51b7aaef94e7b8abe --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-xml-simple: + build: . + image: mcp-perl-xml-simple:latest + container_name: mcp-perl-xml-simple + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-xml-simple + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0ec7070d15b71913655da2e74ef3bba8272c909e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-xml-simple + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xml-simple/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0a4fc2c43d740bef87ad7e10defb1ad1daa75d76 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install perl-xsloader via conda (e.g., from bioconda) +RUN conda install -c bioconda perl-xsloader -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/perl-xsloader_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/perl-xsloader_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/perl-xsloader_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ba7acb3285b5ae3fe86a83f19dc4e1ecab6d7504 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_server.py @@ -0,0 +1,212 @@ +from typing import Optional, List +import subprocess +from pathlib import Path + +@mcp.tool() +def perl_execute( + program_file: Optional[str] = None, + one_liner: Optional[str] = None, + arguments: Optional[List[str]] = None, + modules: Optional[List[str]] = None, + include_dirs: Optional[List[str]] = None, + autosplit: bool = False, + check_syntax: bool = False, + warnings: bool = False, + all_warnings: bool = False, + disable_warnings: bool = False, + loop_n: bool = False, + loop_p: bool = False, + taint_checks: bool = False, + taint_warnings: bool = False, + inplace_extension: Optional[str] = None, + record_separator: Optional[str] = None, + split_pattern: Optional[str] = None, + unicode_features: Optional[str] = None, + use_all_features: bool = False, +): + """ + Execute the Perl interpreter with various switches. This tool provides access to the + Perl execution environment required by perl-xsloader and other Perl modules. + + Args: + program_file: Path to the Perl script to execute. + one_liner: One line of program (maps to -e). + arguments: Arguments passed to the programfile. + modules: List of modules to execute "use module..." before the program (maps to -M). + include_dirs: List of directories to add to @INC (maps to -I). + autosplit: Enable autosplit mode with -n or -p (maps to -a). + check_syntax: Check syntax only, runs BEGIN and CHECK blocks (maps to -c). + warnings: Enable many useful warnings (maps to -w). + all_warnings: Enable all warnings (maps to -W). + disable_warnings: Disable all warnings (maps to -X). + loop_n: Assume "while (<>) { ... }" loop around program (maps to -n). + loop_p: Assume loop like -n but print line also (maps to -p). + taint_checks: Enable tainting checks (maps to -T). + taint_warnings: Enable tainting warnings (maps to -t). + inplace_extension: Edit files in place, optionally making backup with extension (maps to -i). + record_separator: Specify record separator (maps to -0). + split_pattern: split() pattern for -a switch (maps to -F). + unicode_features: Enables the listed Unicode features (maps to -C). + use_all_features: Like -e, but enables all optional features (maps to -E). + """ + cmd = ["perl"] + + # Handle switches + if record_separator is not None: + cmd.append(f"-0{record_separator}") + + if autosplit: + cmd.append("-a") + + if unicode_features: + cmd.append(f"-C{unicode_features}") + + if check_syntax: + cmd.append("-c") + + if use_all_features and one_liner: + cmd.append("-E") + cmd.append(one_liner) + elif one_liner: + cmd.append("-e") + cmd.append(one_liner) + + if split_pattern: + cmd.append(f"-F{split_pattern}") + + if inplace_extension is not None: + cmd.append(f"-i{inplace_extension}") + + if include_dirs: + for d in include_dirs: + cmd.append(f"-I{d}") + + if modules: + for m in modules: + cmd.append(f"-M{m}") + + if loop_n: + cmd.append("-n") + + if loop_p: + cmd.append("-p") + + if taint_warnings: + cmd.append("-t") + + if taint_checks: + cmd.append("-T") + + if warnings: + cmd.append("-w") + + if all_warnings: + cmd.append("-W") + + if disable_warnings: + cmd.append("-X") + + # Handle program file and arguments + if program_file: + prog_path = Path(program_file) + if not prog_path.exists(): + return {"error": f"Program file not found: {program_file}"} + cmd.append(str(prog_path)) + + if arguments: + cmd.extend(arguments) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "return_code": result.returncode + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + "error": "Perl execution failed" + } + +@mcp.tool() +def perl_xsloader_version(): + """ + Print the Perl version, patchlevel, and license information. + Equivalent to running 'perl -v'. + """ + cmd = ["perl", "-v"] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Failed to retrieve Perl version" + } + +@mcp.tool() +def perl_config_summary(variable: Optional[str] = None): + """ + Print configuration summary or a single Config.pm variable. + Equivalent to running 'perl -V[:variable]'. + + Args: + variable: Optional specific configuration variable to query. + """ + arg = "-V" + if variable: + arg = f"-V:{variable}" + + cmd = ["perl", arg] + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": "Failed to retrieve Perl configuration" + } + +@mcp.tool() +def perl_check_module_available(module_name: str): + """ + Check if a specific Perl module (like XSLoader) is available in the current environment. + + Args: + module_name: The name of the Perl module to check (e.g., 'XSLoader'). + """ + # Using -Mmodule=999 is a common trick to check for module existence + # as it will fail with a version error if found, or a 'locate' error if not. + # However, 'perl -MModule -e 1' is cleaner. + cmd = ["perl", f"-M{module_name}", "-e", "1"] + + try: + subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "module_found": True, + "message": f"Module '{module_name}' is available.", + "command_executed": " ".join(cmd) + } + except subprocess.CalledProcessError: + return { + "module_found": False, + "message": f"Module '{module_name}' was not found or failed to load.", + "command_executed": " ".join(cmd) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d5af96f12dc53a08441c654297978612c7ad8f49 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/perl-xsloader_server.py') +SERVER_NAME = 'biosci_perl_xsloader' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..44ba9a24c9ec4773e4a905a92bf5e80d5554c811 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-perl-xsloader: + build: . + image: mcp-perl-xsloader:latest + container_name: mcp-perl-xsloader + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=perl-xsloader + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f295eefd8d71a9dea906dd234004eac1dc11c08d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - perl-xsloader + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_perl-xsloader/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7972ea59ebf14c82242100cdd714f95b359f1179 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install prodigal via conda (e.g., from bioconda) +RUN conda install -c bioconda prodigal -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/prodigal_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/prodigal_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/prodigal_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9c8293569398619464d3f16302cc2e204f1c1796 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_server.py @@ -0,0 +1,139 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def prodigal( + input_file: str, + output_file: Optional[str] = None, + trans_file: Optional[str] = None, + nuc_file: Optional[str] = None, + output_type: str = "gbk", + tr_table: int = 11, + closed_ends: bool = False, + mask_n: bool = False, + bypass_sd_trainer: bool = False, + procedure: str = "single", + quiet: bool = False, + start_file: Optional[str] = None, + training_file: Optional[str] = None, +) -> Dict[str, Any]: + """ + Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program. + + Args: + input_file: Path to the FASTA/Genbank input file. + output_file: Write output to this file (default is stdout). + trans_file: Write protein translations to this file. + nuc_file: Write nucleotide sequences of genes to this file. + output_type: Output format (gbk, gff, or sco). Default is gbk. + tr_table: Translation table to use (default 11). + closed_ends: Do not allow genes to run off edges. + mask_n: Treat runs of N's as masked sequence; don't build genes across them. + bypass_sd_trainer: Bypass Shine-Dalgarno trainer and force a scan for the motif. + procedure: Select procedure (single or meta). Default is single. + quiet: Run quietly (suppress stderr output). + start_file: Write all potential genes (with scores) to this file. + training_file: Write a training file (or read from one if it exists). + """ + # Input validation + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file not found: {input_file}"} + + if output_type not in ["gbk", "gff", "sco"]: + return {"error": f"Invalid output_type '{output_type}'. Must be 'gbk', 'gff', or 'sco'."} + + if procedure not in ["single", "meta"]: + return {"error": f"Invalid procedure '{procedure}'. Must be 'single' or 'meta'."} + + # Build command + cmd = ["prodigal", "-i", str(input_path)] + + if output_file: + cmd.extend(["-o", output_file]) + + if trans_file: + cmd.extend(["-a", trans_file]) + + if nuc_file: + cmd.extend(["-d", nuc_file]) + + cmd.extend(["-f", output_type]) + cmd.extend(["-g", str(tr_table)]) + cmd.extend(["-p", procedure]) + + if closed_ends: + cmd.append("-c") + + if mask_n: + cmd.append("-m") + + if bypass_sd_trainer: + cmd.append("-n") + + if quiet: + cmd.append("-q") + + if start_file: + cmd.extend(["-s", start_file]) + + if training_file: + cmd.extend(["-t", training_file]) + + try: + # Subprocess execution + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + # Identify output files created + output_files_created = [] + for f in [output_file, trans_file, nuc_file, start_file, training_file]: + if f and Path(f).exists(): + output_files_created.append(str(Path(f).absolute())) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files_created, + "status": "success" + } + + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Prodigal failed with return code {e.returncode}", + "status": "error" + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "status": "error" + } + +@mcp.tool() +def prodigal_version() -> Dict[str, Any]: + """ + Print the version number of Prodigal. + """ + cmd = ["prodigal", "-v"] + try: + # Prodigal often prints version to stderr and exits with an error code for -v in some versions, + # or just prints to stderr. We capture both. + result = subprocess.run(cmd, capture_output=True, text=True) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "version_info": result.stderr.strip() if result.stderr else result.stdout.strip() + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "status": "error" + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..dfcc9ab3bea68f918365a7a715d88164fd9dfaaf --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/prodigal_server.py') +SERVER_NAME = 'biosci_prodigal' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..9bfbe26c428410af9a46242c7e391ef15dd67db2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-prodigal: + build: . + image: mcp-prodigal:latest + container_name: mcp-prodigal + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=prodigal + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..374069e5c2385e1eb831dca62d49ebbf119f730f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - prodigal + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prodigal/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..443c6d043f42012619f02ffc4cd880c647d1e9e3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install prokka via conda (e.g., from bioconda) +RUN conda install -c bioconda prokka -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/prokka_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/prokka_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/prokka_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/prokka_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/prokka_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6f51e6d7455f14cd644bd1d9094567c51f3dd259 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/prokka_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/prokka_server.py') +SERVER_NAME = 'biosci_prokka' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c48449fae4b9782510718469c813b8b2b06a135a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-prokka: + build: . + image: mcp-prokka:latest + container_name: mcp-prokka + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=prokka + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..83daef5ceee45d4b6fc70d477eaf7917548f5c19 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - prokka + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_prokka/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5aed52ffb2fd45384fe91f5b0c566261207dd108 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install proteinortho via conda (e.g., from bioconda) +RUN conda install -c bioconda proteinortho -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/proteinortho_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/proteinortho_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/proteinortho_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0f8c1eff13c9d7d7d73a43382001d9d90af97657 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_server.py @@ -0,0 +1,283 @@ +from typing import List, Optional, Union +import subprocess +from pathlib import Path + +@mcp.tool() +def proteinortho( + fasta_files: List[str], + project: str = "myproject", + cpus: int = 1, + p: str = "diamond", + e: float = 1e-05, + cov: int = 50, + identity: int = 25, + sim: float = 0.95, + singles: bool = False, + selfblast: bool = False, + clean: bool = True, + step: int = 0, + force: bool = False, + keep: bool = False, + check_dependencies: bool = False, +): + """ + Proteinortho is a tool to detect orthologous genes within different species. + It handles the full pipeline from sequence comparison (BLAST/Diamond) to clustering. + + Args: + fasta_files: List of FASTA files (proteins or DNA) to compare. + project: Prefix for all output files. + cpus: Number of processors to use. + p: Search engine to use (diamond, blastp, blastn, blastp+, blastn+, mmseqs, lastp). + e: E-value threshold for the search engine. + cov: Minimum coverage of the best alignment in % (default: 50). + identity: Minimum identity of the best alignment in % (default: 25). + sim: Minimum bit-score similarity (0..1) (default: 0.95). + singles: Report genes without orthologs (singletons). + selfblast: Perform self-comparisons within species. + clean: Remove temporary files after completion. + step: Start at a specific step (1: blast, 2: clustering, 3: orthology). 0 runs all. + force: Force recalculation even if results exist. + keep: Keep all temporary files. + check_dependencies: Check if all required dependencies are installed. + """ + # Input validation + if not fasta_files: + return {"error": "At least one FASTA file must be provided."} + + valid_fasta = [] + for f in fasta_files: + path = Path(f) + if not path.exists(): + return {"error": f"Input file not found: {f}"} + valid_fasta.append(str(path.absolute())) + + # Build command + cmd = ["proteinortho"] + cmd.append(f"-project={project}") + cmd.append(f"-cpus={cpus}") + cmd.append(f"-p={p}") + cmd.append(f"-e={e}") + cmd.append(f"-cov={cov}") + cmd.append(f"-identity={identity}") + cmd.append(f"-sim={sim}") + + if singles: cmd.append("-singles") + if selfblast: cmd.append("-selfblast") + if clean: cmd.append("-clean") + if force: cmd.append("-force") + if keep: cmd.append("-keep") + if check_dependencies: cmd.append("-check") + if step > 0: cmd.append(f"-step={step}") + + cmd.extend(valid_fasta) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + # Identify expected output files + output_extensions = [".proteinortho", ".proteinortho-graph", ".blast-graph", ".summary"] + found_outputs = [] + for ext in output_extensions: + out_path = Path(f"{project}{ext}") + if out_path.exists(): + found_outputs.append(str(out_path.absolute())) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": found_outputs + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def proteinortho_grab_proteins( + ortho_file: str, + fasta_files: List[str], + group_ids: Optional[List[str]] = None, + species_names: Optional[List[str]] = None, + out_prefix: str = "grabbed_proteins", +): + """ + Extract protein sequences from orthology groups identified by proteinortho. + + Args: + ortho_file: The .proteinortho output file from a proteinortho run. + fasta_files: The original FASTA files used in the proteinortho run. + group_ids: Specific group IDs to extract (e.g., ['0', '1']). + species_names: Specific species names to extract. + out_prefix: Prefix for the output FASTA files. + """ + ortho_path = Path(ortho_file) + if not ortho_path.exists(): + return {"error": f"Orthology file not found: {ortho_file}"} + + valid_fasta = [] + for f in fasta_files: + path = Path(f) + if not path.exists(): + return {"error": f"FASTA file not found: {f}"} + valid_fasta.append(str(path.absolute())) + + # proteinortho_grab_proteins.pl [options] group_ids file.proteinortho file1.fa ... + cmd = ["proteinortho_grab_proteins.pl"] + + if species_names: + cmd.append(f"-species={','.join(species_names)}") + + cmd.append(f"-to={out_prefix}") + + # If no group IDs provided, the tool usually expects a '-' or specific IDs + if group_ids: + cmd.append(",".join(group_ids)) + else: + cmd.append("-") # Extract all + + cmd.append(str(ortho_path.absolute())) + cmd.extend(valid_fasta) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "info": f"Sequences extracted with prefix: {out_prefix}" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def proteinortho_summary( + ortho_file: str, +): + """ + Generate a summary of a proteinortho run. + + Args: + ortho_file: The .proteinortho output file. + """ + ortho_path = Path(ortho_file) + if not ortho_path.exists(): + return {"error": f"Orthology file not found: {ortho_file}"} + + cmd = ["proteinortho_summary.pl", str(ortho_path.absolute())] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def proteinortho_clustering( + blast_graph_file: str, + cpus: int = 1, + connectivity: float = 0.1, + sim: float = 0.95, + e_value: float = 1e-05, + verbose: bool = False, +): + """ + The standalone clustering engine of proteinortho. + Useful if you already have a .blast-graph file and want to re-cluster with different parameters. + + Args: + blast_graph_file: The .blast-graph file containing pairwise similarities. + cpus: Number of processors to use. + connectivity: Minimum connectivity (0..1) (default: 0.1). + sim: Minimum bit-score similarity (0..1) (default: 0.95). + e_value: E-value threshold. + verbose: Enable verbose output. + """ + graph_path = Path(blast_graph_file) + if not graph_path.exists(): + return {"error": f"Blast graph file not found: {blast_graph_file}"} + + cmd = ["proteinortho_clustering"] + cmd.append(f"-cpus={cpus}") + cmd.append(f"-p={connectivity}") + cmd.append(f"-m={sim}") + cmd.append(f"-e={e_value}") + if verbose: cmd.append("-v") + + cmd.append(str(graph_path.absolute())) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "info": "Clustering completed. Check stdout for group definitions." + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def proteinortho_format( + blast_files: List[str], + cpus: int = 1, + verbose: bool = False, +): + """ + Formats raw BLAST/Diamond output files into the proteinortho graph format. + + Args: + blast_files: List of raw output files from the search engine. + cpus: Number of processors to use. + verbose: Enable verbose output. + """ + valid_files = [] + for f in blast_files: + path = Path(f) + if not path.exists(): + return {"error": f"Blast file not found: {f}"} + valid_files.append(str(path.absolute())) + + cmd = ["proteinortho_format"] + cmd.append(f"-cpus={cpus}") + if verbose: cmd.append("-v") + cmd.extend(valid_files) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "info": "Formatting completed. Output is usually directed to stdout or a graph file." + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1e14b024f7c6813324057b6a6cb0af1272239139 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/proteinortho_server.py') +SERVER_NAME = 'biosci_proteinortho' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b62e1071ff9d7f5d78acd65780c528790824ad8e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-proteinortho: + build: . + image: mcp-proteinortho:latest + container_name: mcp-proteinortho + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=proteinortho + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..55b0be18f2ee33c88b15e417d08c1de3f7377708 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - proteinortho + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_proteinortho/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pybiolib/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pybiolib/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pybiolib/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..80b76ccbf2a98077416e7790faa3f27d530fc3c0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install pyhmmer via conda (e.g., from bioconda) +RUN conda install -c bioconda pyhmmer -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/pyhmmer_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/pyhmmer_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/pyhmmer_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/app/pyhmmer_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/app/pyhmmer_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a6edaf99c1326b981db7d0561a58d1d1dbf6fcac --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/app/pyhmmer_server.py @@ -0,0 +1,763 @@ +import pyhmmer +from pathlib import Path +import tempfile +from typing import Optional, List, Dict, Any, Iterable, Literal + +# --- Helper functions for writing pyhmmer results to files --- + +def _write_hits_to_tblout(hits_iterable: Iterable[pyhmmer.plan7.TopHits], output_path: Path): + """ + Writes an iterable of pyhmmer.plan7.TopHits objects to a simplified tabular + output file, similar to HMMER's --tblout format. + """ + with open(output_path, "w") as f: + f.write("# target name\ttarget accession\tquery name\tquery accession\tE-value\tscore\tbias\t# of domains\n") + for hits in hits_iterable: + query_name = hits.query.name.decode() if hits.query.name else "N/A" + query_acc = hits.query.accession.decode() if hits.query.accession else "N/A" + for hit in hits: + target_name = hit.name.decode() if hit.name else "N/A" + target_acc = hit.accession.decode() if hit.accession else "N/A" + f.write( + f"{target_name}\t{target_acc}\t" + f"{query_name}\t{query_acc}\t" + f"{hit.evalue:.2e}\t{hit.score:.1f}\t{hit.bias:.1f}\t" + f"{len(hit.domains)}\n" + ) + +def _write_hits_to_domtblout(hits_iterable: Iterable[pyhmmer.plan7.TopHits], output_path: Path): + """ + Writes an iterable of pyhmmer.plan7.TopHits objects to a simplified domain + tabular output file, similar to HMMER's --domtblout format. + """ + with open(output_path, "w") as f: + f.write("# target name\ttarget accession\tquery name\tquery accession\t" + "domain E-value\tdomain score\tdomain bias\t" + "hmm_from\thmm_to\tali_from\tali_to\tenv_from\tenv_to\n") + for hits in hits_iterable: + query_name = hits.query.name.decode() if hits.query.name else "N/A" + query_acc = hits.query.accession.decode() if hits.query.accession else "N/A" + for hit in hits: + target_name = hit.name.decode() if hit.name else "N/A" + target_acc = hit.accession.decode() if hit.accession else "N/A" + for domain in hit.domains: + f.write( + f"{target_name}\t{target_acc}\t" + f"{query_name}\t{query_acc}\t" + f"{domain.evalue:.2e}\t{domain.score:.1f}\t{domain.bias:.1f}\t" + f"{domain.hmm_from}\t{domain.hmm_to}\t" + f"{domain.ali_from}\t{domain.ali_to}\t" + f"{domain.env_from}\t{domain.env_to}\n" + ) + +def _write_alignment_to_file(alignment: pyhmmer.easel.Alignment, output_path: Path, output_format: str): + """ + Writes a pyhmmer.easel.Alignment object to a file in the specified format. + """ + # pyhmmer.easel.Alignment.write expects a file-like object opened in binary mode ('wb') + with open(output_path, "wb") as f: + alignment.write(f, format=output_format) + +# --- MCP Tool Definitions --- + +@mcp.tool() +def hmmsearch( + hmm_file: Path, + sequence_file: Path, + cpus: int = 1, + e_value_cutoff: Optional[float] = None, + dom_e_value_cutoff: Optional[float] = None, + bit_score_cutoff: Optional[float] = None, + max_target_seqs: Optional[int] = None, + cut_ga: bool = False, + cut_nc: bool = False, + cut_tc: bool = False, + bias_filter: bool = False, + output_tblout: Optional[Path] = None, + output_domtblout: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Searches a sequence database against one or more profile HMMs using pyhmmer.hmmsearch. + + This function wraps the pyhmmer.hmmsearch API, which provides Python bindings + to HMMER3's hmmsearch functionality. It searches protein sequences against + a database of profile HMMs. + + Args: + hmm_file: Path to the HMM database file (e.g., in HMMER3 text format). + sequence_file: Path to the target sequence database file (e.g., FASTA format). + cpus: Number of CPU threads to use for parallel processing. Must be a positive integer. + e_value_cutoff: E-value threshold for reporting hits. Hits with E-value > this are not reported. + dom_e_value_cutoff: E-value threshold for reporting domains. Domains with E-value > this are not reported. + bit_score_cutoff: Bit score threshold for reporting hits. Hits with score < this are not reported. + max_target_seqs: Maximum number of target sequences to report per query HMM. + cut_ga: Use the HMM's trusted gathering cutoff (GA) to set score thresholds. + cut_nc: Use the HMM's noise cutoff (NC) to set score thresholds. + cut_tc: Use the HMM's trusted cutoff (TC) to set score thresholds. + bias_filter: Turn on the bias filter (default is off). + output_tblout: Optional path to write the tabular summary of hits. If not provided, a temporary file will be created. + output_domtblout: Optional path to write the tabular summary of domain hits. If not provided, a temporary file will be created. + + Returns: + A dictionary containing: + - "command_executed": A string representing the pyhmmer API call. + - "stdout": Standard output (empty for pyhmmer API calls unless explicitly captured). + - "stderr": Standard error (empty for pyhmmer API calls unless explicitly captured). + - "output_files": A list of paths to generated output files (e.g., tabular hit files). + """ + # Input validation + if not hmm_file.is_file(): + raise FileNotFoundError(f"HMM file not found: {hmm_file}") + if not sequence_file.is_file(): + raise FileNotFoundError(f"Sequence file not found: {sequence_file}") + if cpus < 1: + raise ValueError("Number of CPUs must be a positive integer.") + if e_value_cutoff is not None and e_value_cutoff <= 0: + raise ValueError("E-value cutoff must be positive.") + if dom_e_value_cutoff is not None and dom_e_value_cutoff <= 0: + raise ValueError("Domain E-value cutoff must be positive.") + if bit_score_cutoff is not None and bit_score_cutoff < 0: + raise ValueError("Bit score cutoff must be non-negative.") + if max_target_seqs is not None and max_target_seqs < 1: + raise ValueError("Max target sequences must be a positive integer.") + + # Prepare output files + temp_output_tblout = False + if output_tblout is None: + output_tblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".tblout").name) + temp_output_tblout = True + + temp_output_domtblout = False + if output_domtblout is None: + output_domtblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".domtblout").name) + temp_output_domtblout = True + + output_files: List[Path] = [] + stdout_buffer = [] + stderr_buffer = [] + + try: + # Load HMMs and sequences + with pyhmmer.plan7.HMMFile(hmm_file) as hmms_reader: + hmms = list(hmms_reader) # Load all HMMs into memory + + with pyhmmer.easel.SequenceFile(sequence_file, digital=True) as seqs_reader: + sequences = seqs_reader.read_block() # Load sequences into memory + + # Construct pyhmmer.hmmsearch arguments + search_kwargs = { + "cpus": cpus, + "cut_ga": cut_ga, + "cut_nc": cut_nc, + "cut_tc": cut_tc, + "bias_filter": bias_filter, + } + if e_value_cutoff is not None: + search_kwargs["E"] = e_value_cutoff + if dom_e_value_cutoff is not None: + search_kwargs["domE"] = dom_e_value_cutoff + if bit_score_cutoff is not None: + search_kwargs["T"] = bit_score_cutoff + if max_target_seqs is not None: + search_kwargs["max_target_seqs"] = max_target_seqs + + # Execute hmmsearch and collect results (pyhmmer.hmmsearch returns a generator) + all_hits = list(pyhmmer.hmmsearch(hmms, sequences, **search_kwargs)) + + # Write results to output files + _write_hits_to_tblout(all_hits, output_tblout) + output_files.append(output_tblout) + + _write_hits_to_domtblout(all_hits, output_domtblout) + output_files.append(output_domtblout) + + except Exception as e: + stderr_buffer.append(f"Error during pyhmmer.hmmsearch execution: {e}") + # Clean up temporary files if an error occurred + if temp_output_tblout and output_tblout.exists(): + output_tblout.unlink() + if temp_output_domtblout and output_domtblout.exists(): + output_domtblout.unlink() + return { + "command_executed": f"pyhmmer.hmmsearch(hmms={hmm_file.name}, sequences={sequence_file.name}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": [], + } + + return { + "command_executed": f"pyhmmer.hmmsearch(hmms={hmm_file.name}, sequences={sequence_file.name}, cpus={cpus}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": output_files, + } + +@mcp.tool() +def hmmscan( + sequence_file: Path, + hmm_file: Path, + cpus: int = 1, + e_value_cutoff: Optional[float] = None, + dom_e_value_cutoff: Optional[float] = None, + bit_score_cutoff: Optional[float] = None, + max_target_seqs: Optional[int] = None, + cut_ga: bool = False, + cut_nc: bool = False, + cut_tc: bool = False, + bias_filter: bool = False, + output_tblout: Optional[Path] = None, + output_domtblout: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Searches a sequence (or sequences) against a profile HMM database using pyhmmer.hmmscan. + + This function wraps the pyhmmer.hmmscan API, which provides Python bindings + to HMMER3's hmmscan functionality. It searches protein sequences against + a database of profile HMMs. + + Args: + sequence_file: Path to the query sequence file (e.g., FASTA format). + hmm_file: Path to the HMM database file (e.g., in HMMER3 text format). + cpus: Number of CPU threads to use for parallel processing. Must be a positive integer. + e_value_cutoff: E-value threshold for reporting hits. Hits with E-value > this are not reported. + dom_e_value_cutoff: E-value threshold for reporting domains. Domains with E-value > this are not reported. + bit_score_cutoff: Bit score threshold for reporting hits. Hits with score < this are not reported. + max_target_seqs: Maximum number of target sequences to report per query sequence. + cut_ga: Use the HMM's trusted gathering cutoff (GA) to set score thresholds. + cut_nc: Use the HMM's noise cutoff (NC) to set score thresholds. + cut_tc: Use the HMM's trusted cutoff (TC) to set score thresholds. + bias_filter: Turn on the bias filter (default is off). + output_tblout: Optional path to write the tabular summary of hits. If not provided, a temporary file will be created. + output_domtblout: Optional path to write the tabular summary of domain hits. If not provided, a temporary file will be created. + + Returns: + A dictionary containing: + - "command_executed": A string representing the pyhmmer API call. + - "stdout": Standard output (empty for pyhmmer API calls unless explicitly captured). + - "stderr": Standard error (empty for pyhmmer API calls unless explicitly captured). + - "output_files": A list of paths to generated output files (e.g., tabular hit files). + """ + # Input validation + if not hmm_file.is_file(): + raise FileNotFoundError(f"HMM file not found: {hmm_file}") + if not sequence_file.is_file(): + raise FileNotFoundError(f"Sequence file not found: {sequence_file}") + if cpus < 1: + raise ValueError("Number of CPUs must be a positive integer.") + if e_value_cutoff is not None and e_value_cutoff <= 0: + raise ValueError("E-value cutoff must be positive.") + if dom_e_value_cutoff is not None and dom_e_value_cutoff <= 0: + raise ValueError("Domain E-value cutoff must be positive.") + if bit_score_cutoff is not None and bit_score_cutoff < 0: + raise ValueError("Bit score cutoff must be non-negative.") + if max_target_seqs is not None and max_target_seqs < 1: + raise ValueError("Max target sequences must be a positive integer.") + + # Prepare output files + temp_output_tblout = False + if output_tblout is None: + output_tblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".tblout").name) + temp_output_tblout = True + + temp_output_domtblout = False + if output_domtblout is None: + output_domtblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".domtblout").name) + temp_output_domtblout = True + + output_files: List[Path] = [] + stdout_buffer = [] + stderr_buffer = [] + + try: + # Load HMMs and sequences + with pyhmmer.plan7.HMMFile(hmm_file) as hmms_reader: + hmms = list(hmms_reader) # Load all HMMs into memory + + with pyhmmer.easel.SequenceFile(sequence_file, digital=True) as seqs_reader: + sequences = seqs_reader.read_block() # Load sequences into memory + + # Construct pyhmmer.hmmscan arguments + search_kwargs = { + "cpus": cpus, + "cut_ga": cut_ga, + "cut_nc": cut_nc, + "cut_tc": cut_tc, + "bias_filter": bias_filter, + } + if e_value_cutoff is not None: + search_kwargs["E"] = e_value_cutoff + if dom_e_value_cutoff is not None: + search_kwargs["domE"] = dom_e_value_cutoff + if bit_score_cutoff is not None: + search_kwargs["T"] = bit_score_cutoff + if max_target_seqs is not None: + search_kwargs["max_target_seqs"] = max_target_seqs + + # Execute hmmscan and collect results (pyhmmer.hmmscan returns a generator) + all_hits = list(pyhmmer.hmmscan(sequences, hmms, **search_kwargs)) + + # Write results to output files + _write_hits_to_tblout(all_hits, output_tblout) + output_files.append(output_tblout) + + _write_hits_to_domtblout(all_hits, output_domtblout) + output_files.append(output_domtblout) + + except Exception as e: + stderr_buffer.append(f"Error during pyhmmer.hmmscan execution: {e}") + # Clean up temporary files if an error occurred + if temp_output_tblout and output_tblout.exists(): + output_tblout.unlink() + if temp_output_domtblout and output_domtblout.exists(): + output_domtblout.unlink() + return { + "command_executed": f"pyhmmer.hmmscan(sequences={sequence_file.name}, hmms={hmm_file.name}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": [], + } + + return { + "command_executed": f"pyhmmer.hmmscan(sequences={sequence_file.name}, hmms={hmm_file.name}, cpus={cpus}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": output_files, + } + +@mcp.tool() +def nhmmer( + hmm_file: Path, + sequence_file: Path, + cpus: int = 1, + e_value_cutoff: Optional[float] = None, + dom_e_value_cutoff: Optional[float] = None, + bit_score_cutoff: Optional[float] = None, + max_target_seqs: Optional[int] = None, + bias_filter: bool = False, + output_tblout: Optional[Path] = None, + output_domtblout: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Searches a DNA/RNA sequence database against one or more profile HMMs using pyhmmer.nhmmer. + + This function wraps the pyhmmer.nhmmer API, which provides Python bindings + to HMMER3's nhmmer functionality. It searches nucleic acid sequences against + a database of profile HMMs. + + Args: + hmm_file: Path to the HMM database file (e.g., in HMMER3 text format). This HMM should be nucleic. + sequence_file: Path to the target nucleic acid sequence database file (e.g., FASTA format). + cpus: Number of CPU threads to use for parallel processing. Must be a positive integer. + e_value_cutoff: E-value threshold for reporting hits. Hits with E-value > this are not reported. + dom_e_value_cutoff: E-value threshold for reporting domains. Domains with E-value > this are not reported. + bit_score_cutoff: Bit score threshold for reporting hits. Hits with score < this are not reported. + max_target_seqs: Maximum number of target sequences to report per query HMM. + bias_filter: Turn on the bias filter (default is off). + output_tblout: Optional path to write the tabular summary of hits. If not provided, a temporary file will be created. + output_domtblout: Optional path to write the tabular summary of domain hits. If not provided, a temporary file will be created. + + Returns: + A dictionary containing: + - "command_executed": A string representing the pyhmmer API call. + - "stdout": Standard output (empty for pyhmmer API calls unless explicitly captured). + - "stderr": Standard error (empty for pyhmmer API calls unless explicitly captured). + - "output_files": A list of paths to generated output files (e.g., tabular hit files). + """ + # Input validation + if not hmm_file.is_file(): + raise FileNotFoundError(f"HMM file not found: {hmm_file}") + if not sequence_file.is_file(): + raise FileNotFoundError(f"Sequence file not found: {sequence_file}") + if cpus < 1: + raise ValueError("Number of CPUs must be a positive integer.") + if e_value_cutoff is not None and e_value_cutoff <= 0: + raise ValueError("E-value cutoff must be positive.") + if dom_e_value_cutoff is not None and dom_e_value_cutoff <= 0: + raise ValueError("Domain E-value cutoff must be positive.") + if bit_score_cutoff is not None and bit_score_cutoff < 0: + raise ValueError("Bit score cutoff must be non-negative.") + if max_target_seqs is not None and max_target_seqs < 1: + raise ValueError("Max target sequences must be a positive integer.") + + # Prepare output files + temp_output_tblout = False + if output_tblout is None: + output_tblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".tblout").name) + temp_output_tblout = True + + temp_output_domtblout = False + if output_domtblout is None: + output_domtblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".domtblout").name) + temp_output_domtblout = True + + output_files: List[Path] = [] + stdout_buffer = [] + stderr_buffer = [] + + try: + # Load HMMs (nhmmer expects nucleic alphabet HMMs) + with pyhmmer.plan7.HMMFile(hmm_file) as hmms_reader: + hmms = list(hmms_reader) + + # For nhmmer, sequences should be nucleic. Explicitly use DNA alphabet. + # pyhmmer.easel.Alphabet.dna() can be used for both DNA and RNA, + # as HMMER's nhmmer typically handles both. + nucleic_alphabet = pyhmmer.easel.Alphabet.dna() + with pyhmmer.easel.SequenceFile(sequence_file, digital=True, alphabet=nucleic_alphabet) as seqs_reader: + sequences = seqs_reader.read_block() + + # Construct pyhmmer.nhmmer arguments + search_kwargs = { + "cpus": cpus, + "bias_filter": bias_filter, + } + if e_value_cutoff is not None: + search_kwargs["E"] = e_value_cutoff + if dom_e_value_cutoff is not None: + search_kwargs["domE"] = dom_e_value_cutoff + if bit_score_cutoff is not None: + search_kwargs["T"] = bit_score_cutoff + if max_target_seqs is not None: + search_kwargs["max_target_seqs"] = max_target_seqs + + # Execute nhmmer and collect results (pyhmmer.nhmmer returns a generator) + all_hits = list(pyhmmer.nhmmer(hmms, sequences, **search_kwargs)) + + # Write results to output files + _write_hits_to_tblout(all_hits, output_tblout) + output_files.append(output_tblout) + + _write_hits_to_domtblout(all_hits, output_domtblout) + output_files.append(output_domtblout) + + except Exception as e: + stderr_buffer.append(f"Error during pyhmmer.nhmmer execution: {e}") + # Clean up temporary files if an error occurred + if temp_output_tblout and output_tblout.exists(): + output_tblout.unlink() + if temp_output_domtblout and output_domtblout.exists(): + output_domtblout.unlink() + return { + "command_executed": f"pyhmmer.nhmmer(hmms={hmm_file.name}, sequences={sequence_file.name}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": [], + } + + return { + "command_executed": f"pyhmmer.nhmmer(hmms={hmm_file.name}, sequences={sequence_file.name}, cpus={cpus}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": output_files, + } + +@mcp.tool() +def phmmer( + query_sequence_file: Path, + target_sequence_file: Path, + cpus: int = 1, + e_value_cutoff: Optional[float] = None, + bit_score_cutoff: Optional[float] = None, + max_target_seqs: Optional[int] = None, + bias_filter: bool = False, + output_tblout: Optional[Path] = None, + output_domtblout: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Searches a protein sequence against a protein sequence database using pyhmmer.phmmer. + + This function wraps the pyhmmer.phmmer API, which provides Python bindings + to HMMER3's phmmer functionality. It performs sequence-vs-sequence searches + using HMMER's acceleration heuristics. + + Args: + query_sequence_file: Path to the query protein sequence file (e.g., FASTA format). + target_sequence_file: Path to the target protein sequence database file (e.g., FASTA format). + cpus: Number of CPU threads to use for parallel processing. Must be a positive integer. + e_value_cutoff: E-value threshold for reporting hits. Hits with E-value > this are not reported. + bit_score_cutoff: Bit score threshold for reporting hits. Hits with score < this are not reported. + max_target_seqs: Maximum number of target sequences to report per query sequence. + bias_filter: Turn on the bias filter (default is off). + output_tblout: Optional path to write the tabular summary of hits. If not provided, a temporary file will be created. + output_domtblout: Optional path to write the tabular summary of domain hits. If not provided, a temporary file will be created. + + Returns: + A dictionary containing: + - "command_executed": A string representing the pyhmmer API call. + - "stdout": Standard output (empty for pyhmmer API calls unless explicitly captured). + - "stderr": Standard error (empty for pyhmmer API calls unless explicitly captured). + - "output_files": A list of paths to generated output files (e.g., tabular hit files). + """ + # Input validation + if not query_sequence_file.is_file(): + raise FileNotFoundError(f"Query sequence file not found: {query_sequence_file}") + if not target_sequence_file.is_file(): + raise FileNotFoundError(f"Target sequence file not found: {target_sequence_file}") + if cpus < 1: + raise ValueError("Number of CPUs must be a positive integer.") + if e_value_cutoff is not None and e_value_cutoff <= 0: + raise ValueError("E-value cutoff must be positive.") + if bit_score_cutoff is not None and bit_score_cutoff < 0: + raise ValueError("Bit score cutoff must be non-negative.") + if max_target_seqs is not None and max_target_seqs < 1: + raise ValueError("Max target sequences must be a positive integer.") + + # Prepare output files + temp_output_tblout = False + if output_tblout is None: + output_tblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".tblout").name) + temp_output_tblout = True + + temp_output_domtblout = False + if output_domtblout is None: + output_domtblout = Path(tempfile.NamedTemporaryFile(delete=False, suffix=".domtblout").name) + temp_output_domtblout = True + + output_files: List[Path] = [] + stdout_buffer = [] + stderr_buffer = [] + + try: + # Load query and target sequences (phmmer expects protein alphabet) + protein_alphabet = pyhmmer.easel.Alphabet.amino() + with pyhmmer.easel.SequenceFile(query_sequence_file, digital=True, alphabet=protein_alphabet) as query_seqs_reader: + query_sequences = query_seqs_reader.read_block() + + with pyhmmer.easel.SequenceFile(target_sequence_file, digital=True, alphabet=protein_alphabet) as target_seqs_reader: + target_sequences = target_seqs_reader.read_block() + + # Construct pyhmmer.phmmer arguments + search_kwargs = { + "cpus": cpus, + "bias_filter": bias_filter, + } + if e_value_cutoff is not None: + search_kwargs["E"] = e_value_cutoff + if bit_score_cutoff is not None: + search_kwargs["T"] = bit_score_cutoff + if max_target_seqs is not None: + search_kwargs["max_target_seqs"] = max_target_seqs + + # Execute phmmer and collect results (pyhmmer.phmmer returns a generator) + all_hits = list(pyhmmer.phmmer(query_sequences, target_sequences, **search_kwargs)) + + # Write results to output files + _write_hits_to_tblout(all_hits, output_tblout) + output_files.append(output_tblout) + + _write_hits_to_domtblout(all_hits, output_domtblout) + output_files.append(output_domtblout) + + except Exception as e: + stderr_buffer.append(f"Error during pyhmmer.phmmer execution: {e}") + # Clean up temporary files if an error occurred + if temp_output_tblout and output_tblout.exists(): + output_tblout.unlink() + if temp_output_domtblout and output_domtblout.exists(): + output_domtblout.unlink() + return { + "command_executed": f"pyhmmer.phmmer(query_sequences={query_sequence_file.name}, target_sequences={target_sequence_file.name}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": [], + } + + return { + "command_executed": f"pyhmmer.phmmer(query_sequences={query_sequence_file.name}, target_sequences={target_sequence_file.name}, cpus={cpus}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": output_files, + } + +@mcp.tool() +def hmmbuild( + alignment_file: Path, + output_hmm_file: Path, + alphabet_type: Literal["amino", "dna", "rna"], + name: Optional[str] = None, + accession: Optional[str] = None, + hand_model: bool = True, # Corresponds to HMMER's default 'hand' model construction + symfrac: float = 0.5, + fragsc: float = 0.0, + fast: bool = False, +) -> Dict[str, Any]: + """ + Builds a profile HMM from a multiple sequence alignment using pyhmmer.hmmbuild. + + This function wraps the pyhmmer.hmmbuild API, which provides Python bindings + to HMMER3's hmmbuild functionality. + + Args: + alignment_file: Path to the multiple sequence alignment file (e.g., Stockholm, FASTA, Clustal). + output_hmm_file: Path to write the output HMM file. + alphabet_type: The type of alphabet for the sequences in the alignment ("amino", "dna", or "rna"). + name: Optional name for the HMM. + accession: Optional accession for the HMM. + hand_model: If True, use the 'hand' model construction algorithm (default). If False, use 'wbl' (WBL model). + Note: pyhmmer.hmmbuild takes `builder` argument, which defaults to `pyhmmer.plan7.HMM.hand()`. + For simplicity, this parameter exposes a boolean for the common 'hand' vs 'wbl' choice. + symfrac: Minimum fraction of residues required to be non-gap in a column for it to be considered a match state. + (0.0 to 1.0, default 0.5). + fragsc: Fragment score. (default 0.0). + fast: Use a faster, less accurate algorithm for model construction. + + Returns: + A dictionary containing: + - "command_executed": A string representing the pyhmmer API call. + - "stdout": Standard output (empty for pyhmmer API calls unless explicitly captured). + - "stderr": Standard error (empty for pyhmmer API calls unless explicitly captured). + - "output_files": A list of paths to generated output files (e.g., the HMM file). + """ + # Input validation + if not alignment_file.is_file(): + raise FileNotFoundError(f"Alignment file not found: {alignment_file}") + if not (0.0 <= symfrac <= 1.0): + raise ValueError("symfrac must be between 0.0 and 1.0.") + + output_files: List[Path] = [] + stdout_buffer = [] + stderr_buffer = [] + + try: + # Determine alphabet + if alphabet_type == "amino": + alphabet = pyhmmer.easel.Alphabet.amino() + elif alphabet_type == "dna": + alphabet = pyhmmer.easel.Alphabet.dna() + elif alphabet_type == "rna": + alphabet = pyhmmer.easel.Alphabet.rna() + else: + raise ValueError(f"Invalid alphabet type: {alphabet_type}") + + # Load alignment + with pyhmmer.easel.AlignmentFile(alignment_file, alphabet=alphabet) as alignment_reader: + alignment = alignment_reader.read() + + # Construct HMM builder + builder = pyhmmer.plan7.HMM.hand() if hand_model else pyhmmer.plan7.HMM.wbl() + + # Construct pyhmmer.hmmbuild arguments + build_kwargs = { + "builder": builder, + "symfrac": symfrac, + "fragsc": fragsc, + "fast": fast, + } + if name: + build_kwargs["name"] = name.encode() # pyhmmer expects bytes + if accession: + build_kwargs["accession"] = accession.encode() # pyhmmer expects bytes + + # Execute hmmbuild + hmm = pyhmmer.hmmbuild(alignment, **build_kwargs) + + # Write HMM to file + with open(output_hmm_file, "wb") as f: + hmm.write(f) + output_files.append(output_hmm_file) + + except Exception as e: + stderr_buffer.append(f"Error during pyhmmer.hmmbuild execution: {e}") + if output_hmm_file.exists(): + output_hmm_file.unlink() + return { + "command_executed": f"pyhmmer.hmmbuild(alignment={alignment_file.name}, alphabet_type='{alphabet_type}', ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": [], + } + + return { + "command_executed": f"pyhmmer.hmmbuild(alignment={alignment_file.name}, alphabet_type='{alphabet_type}', name='{name or 'N/A'}', ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": output_files, + } + +@mcp.tool() +def hmmalign( + hmm_file: Path, + sequence_file: Path, + output_alignment_file: Path, + alphabet_type: Literal["amino", "dna", "rna"], + output_format: Literal["stockholm", "fasta", "clustal", "a2m"] = "stockholm", + cpus: int = 1, +) -> Dict[str, Any]: + """ + Aligns sequences to a profile HMM using pyhmmer.hmmalign. + + This function wraps the pyhmmer.hmmalign API, which provides Python bindings + to HMMER3's hmmalign functionality. + + Args: + hmm_file: Path to the profile HMM file. + sequence_file: Path to the sequences to align (e.g., FASTA format). + output_alignment_file: Path to write the output multiple sequence alignment file. + alphabet_type: The type of alphabet for the sequences and HMM ("amino", "dna", or "rna"). + output_format: Format for the output alignment ("stockholm", "fasta", "clustal", or "a2m"). + cpus: Number of CPU threads to use for parallel processing. Must be a positive integer. + + Returns: + A dictionary containing: + - "command_executed": A string representing the pyhmmer API call. + - "stdout": Standard output (empty for pyhmmer API calls unless explicitly captured). + - "stderr": Standard error (empty for pyhmmer API calls unless explicitly captured). + - "output_files": A list of paths to generated output files (e.g., the alignment file). + """ + # Input validation + if not hmm_file.is_file(): + raise FileNotFoundError(f"HMM file not found: {hmm_file}") + if not sequence_file.is_file(): + raise FileNotFoundError(f"Sequence file not found: {sequence_file}") + if cpus < 1: + raise ValueError("Number of CPUs must be a positive integer.") + if output_format not in ["stockholm", "fasta", "clustal", "a2m"]: + raise ValueError(f"Invalid output format: {output_format}. Must be one of 'stockholm', 'fasta', 'clustal', 'a2m'.") + + output_files: List[Path] = [] + stdout_buffer = [] + stderr_buffer = [] + + try: + # Determine alphabet + if alphabet_type == "amino": + alphabet = pyhmmer.easel.Alphabet.amino() + elif alphabet_type == "dna": + alphabet = pyhmmer.easel.Alphabet.dna() + elif alphabet_type == "rna": + alphabet = pyhmmer.easel.Alphabet.rna() + else: + raise ValueError(f"Invalid alphabet type: {alphabet_type}") + + # Load HMM (hmmalign expects a single HMM) + with pyhmmer.plan7.HMMFile(hmm_file) as hmm_reader: + hmm = hmm_reader.read() + + # Load sequences + with pyhmmer.easel.SequenceFile(sequence_file, digital=True, alphabet=alphabet) as seqs_reader: + sequences = seqs_reader.read_block() + + # Execute hmmalign + alignment = pyhmmer.hmmalign(hmm, sequences, cpus=cpus) + + # Write alignment to file + _write_alignment_to_file(alignment, output_alignment_file, output_format) + output_files.append(output_alignment_file) + + except Exception as e: + stderr_buffer.append(f"Error during pyhmmer.hmmalign execution: {e}") + if output_alignment_file.exists(): + output_alignment_file.unlink() + return { + "command_executed": f"pyhmmer.hmmalign(hmm={hmm_file.name}, sequences={sequence_file.name}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": [], + } + + return { + "command_executed": f"pyhmmer.hmmalign(hmm={hmm_file.name}, sequences={sequence_file.name}, cpus={cpus}, ...)", + "stdout": "\n".join(stdout_buffer), + "stderr": "\n".join(stderr_buffer), + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..f380eeefe98e7ee5cedaa02ab7925e0042d17a28 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/app/requirements.txt @@ -0,0 +1 @@ +pyhmmer==0.12.0 diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..a5c383474f9b7ae4ddef5a395114f2e691db2980 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-pyhmmer: + build: . + image: mcp-pyhmmer:latest + container_name: mcp-pyhmmer + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=pyhmmer + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..d1de2c99250251e1750b7ddd161435e73286276a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyhmmer/requirements.txt @@ -0,0 +1,3 @@ +pyhmmer==0.12.0 +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..21d1c07b2ea3cc48c8af72ab26f74591f3e29681 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install pyrodigal via conda (e.g., from bioconda) +RUN conda install -c bioconda pyrodigal -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/pyrodigal_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/pyrodigal_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/pyrodigal_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_server.py new file mode 100644 index 0000000000000000000000000000000000000000..7e3db8eebbfcf47a48e31bc3005b2765c570ccc9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_server.py @@ -0,0 +1,197 @@ +import subprocess +from pathlib import Path +from typing import Optional, Literal, List + +@mcp.tool() +def pyrodigal_find_orfs( + input_file: Path, + output_file: Optional[Path] = None, + trans_file: Optional[Path] = None, + nuc_file: Optional[Path] = None, + start_file: Optional[Path] = None, + training_file: Optional[Path] = None, + closed_ends: bool = False, + output_format: Literal["gff", "gbk", "tbl", "sco"] = "gff", + translation_table: int = 11, + mask_regions: bool = False, + force_full_motif_scan: bool = False, + mode: Literal["single", "meta"] = "single", + jobs: int = 1, + min_gene_length: int = 90, + min_edge_gene_length: int = 60, + max_overlap: int = 60, + no_stop_codon_translation: bool = False, + pool_type: Literal["thread", "process"] = "thread", +) -> dict: + """ + Finds open reading frames (ORFs) in microbial sequences using Pyrodigal. + + This tool provides Python bindings to Prodigal, an ORF finder for microbial + sequences, allowing for flexible gene prediction with various output options + and parallel processing capabilities. + + Args: + input_file: Path to the FASTA input file containing nucleotide sequences. + output_file: Optional path to write the main output (e.g., GFF, GenBank). + If not provided, output will be written to stdout. + trans_file: Optional path to write protein translations in FASTA format. + nuc_file: Optional path to write nucleotide sequences of genes in FASTA format. + start_file: Optional path to write all potential genes with scores in tabular format. + training_file: Optional path to a training file. If the file does not exist, + Pyrodigal will write training data to it. If it exists, it will + read and use the specified training file. + closed_ends: If True, do not allow genes to run off sequence edges. + output_format: Select the output format for the main output file. + Supported formats: 'gff', 'gbk', 'tbl', 'sco'. + translation_table: Specify a translation table ID to use (e.g., 11 for bacterial). + Must be a positive integer. + mask_regions: If True, treat runs of 'N' as masked sequence and do not build + genes across them. + force_full_motif_scan: If True, bypass Shine-Dalgarno trainer and force a full motif scan. + mode: Select the procedure for gene finding. 'single' uses a training sequence, + 'meta' uses pre-trained data for metagenomic sequences. + jobs: The number of threads or processes to use if input contains multiple sequences. + Must be a positive integer. + min_gene_length: The minimum length for a predicted gene in nucleotides. + Must be a positive integer. + min_edge_gene_length: The minimum length for a gene predicted at the edge of a sequence. + Must be a positive integer. + max_overlap: The maximum number of nucleotides that can overlap between two genes + on the same strand. Must be non-negative and less than or equal to + `min_gene_length`. + no_stop_codon_translation: If True, disables translation of stop codons into star + characters (*) for complete genes. + pool_type: The sort of pool to use for parallel processing. 'thread' or 'process'. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of + generated output files. + + Raises: + ValueError: If any input parameter is invalid. + subprocess.CalledProcessError: If the pyrodigal command fails. + """ + # Input validation + if not input_file.is_file(): + raise ValueError(f"Input file not found: {input_file}") + + output_files_generated: List[Path] = [] + cmd = ["pyrodigal"] + + # Handle output files and ensure parent directories exist + if trans_file: + if not trans_file.parent.is_dir(): + raise ValueError(f"Parent directory for trans_file does not exist: {trans_file.parent}") + cmd.extend(["-a", str(trans_file)]) + output_files_generated.append(trans_file) + + if nuc_file: + if not nuc_file.parent.is_dir(): + raise ValueError(f"Parent directory for nuc_file does not exist: {nuc_file.parent}") + cmd.extend(["-d", str(nuc_file)]) + output_files_generated.append(nuc_file) + + if output_file: + if not output_file.parent.is_dir(): + raise ValueError(f"Parent directory for output_file does not exist: {output_file.parent}") + cmd.extend(["-o", str(output_file)]) + output_files_generated.append(output_file) + + if start_file: + if not start_file.parent.is_dir(): + raise ValueError(f"Parent directory for start_file does not exist: {start_file.parent}") + cmd.extend(["-s", str(start_file)]) + output_files_generated.append(start_file) + + if training_file: + if not training_file.parent.is_dir(): + raise ValueError(f"Parent directory for training_file does not exist: {training_file.parent}") + cmd.extend(["-t", str(training_file)]) + # Add to output_files as it might be written if it doesn't exist + output_files_generated.append(training_file) + + # Add required input file + cmd.extend(["-i", str(input_file)]) + + # Boolean flags + if closed_ends: + cmd.append("-c") + if mask_regions: + cmd.append("-m") + if force_full_motif_scan: + cmd.append("-n") + if no_stop_codon_translation: + cmd.append("--no-stop-codon") + + # Parameters with specific values + cmd.extend(["-f", output_format]) + + if translation_table < 1: + raise ValueError(f"Translation table ID must be a positive integer, got {translation_table}") + cmd.extend(["-g", str(translation_table)]) + + # Literal type validation is implicitly handled by type checker, but explicit check adds robustness + if mode not in ["single", "meta"]: + raise ValueError(f"Invalid mode: {mode}. Must be 'single' or 'meta'.") + cmd.extend(["-p", mode]) + + if jobs < 1: + raise ValueError(f"Number of jobs must be a positive integer, got {jobs}") + cmd.extend(["-j", str(jobs)]) + + if min_gene_length < 1: + raise ValueError(f"Minimum gene length must be a positive integer, got {min_gene_length}") + cmd.extend(["--min-gene", str(min_gene_length)]) + + if min_edge_gene_length < 1: + raise ValueError(f"Minimum edge gene length must be a positive integer, got {min_edge_gene_length}") + cmd.extend(["--min-edge-gene", str(min_edge_gene_length)]) + + if max_overlap < 0: + raise ValueError(f"Maximum overlap must be a non-negative integer, got {max_overlap}") + if max_overlap > min_gene_length: + raise ValueError(f"Maximum overlap ({max_overlap}) cannot be greater than minimum gene length ({min_gene_length})") + cmd.extend(["--max-overlap", str(max_overlap)]) + + # Literal type validation is implicitly handled by type checker, but explicit check adds robustness + if pool_type not in ["thread", "process"]: + raise ValueError(f"Invalid pool type: {pool_type}. Must be 'thread' or 'process'.") + cmd.extend(["--pool", pool_type]) + + command_executed = " ".join(map(str, cmd)) + stdout = "" + stderr = "" + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + encoding="utf-8" + ) + stdout = process.stdout + stderr = process.stderr + except subprocess.CalledProcessError as e: + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"Pyrodigal command failed with exit code {e.returncode}", + "output_files": [] + } + except FileNotFoundError: + return { + "command_executed": command_executed, + "stdout": "", + "stderr": "pyrodigal command not found. Please ensure it is installed and in your PATH.", + "error": "Tool not found", + "output_files": [] + } + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": [str(f) for f in output_files_generated] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..677f386d40ddaa0edf520d24dde23b1303a25d79 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/pyrodigal_server.py') +SERVER_NAME = 'biosci_pyrodigal' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f029259c9561bdb95600ceb10a303b502464847 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-pyrodigal: + build: . + image: mcp-pyrodigal:latest + container_name: mcp-pyrodigal + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=pyrodigal + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cc5875aea82d2df024ddf0e8fe7ccf7e56df4c43 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - pyrodigal + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_pyrodigal/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_quast/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_quast/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_quast/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..1e6058c7194b4d1ae80eba7c56f67638ea04448b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install r-flanders via conda (e.g., from bioconda) +RUN conda install -c bioconda r-flanders -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/r-flanders_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/r-flanders_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/r-flanders_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_server.py new file mode 100644 index 0000000000000000000000000000000000000000..b45e0190eb134143289a9f80b88e0abf365969d7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_server.py @@ -0,0 +1,273 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Dict, Any + +# Helper function to run R scripts +def _run_r_script(r_script_content: str, output_files: Optional[List[Path]] = None) -> Dict[str, Any]: + """ + Executes an R script and captures its output. + + Args: + r_script_content: The R script code as a string. + output_files: An optional list of expected output file paths to check for existence. + + Returns: + A dictionary containing command execution details, stdout, stderr, and output files. + """ + with tempfile.NamedTemporaryFile(mode="w", suffix=".R", delete=False) as temp_r_script: + temp_r_script.write(r_script_content) + temp_r_script_path = Path(temp_r_script.name) + + command = ["Rscript", str(temp_r_script_path)] + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + stdout = process.stdout + stderr = process.stderr + + final_output_files = [] + if output_files: + for f in output_files: + if f.exists(): + final_output_files.append(str(f)) + else: + # If an expected output file is missing, it indicates a potential issue + # but we don't want to fail the entire tool if R didn't explicitly error. + # This could be logged or handled based on specific tool requirements. + pass + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": final_output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"R script execution failed with exit code {e.returncode}", + "output_files": [], + } + finally: + # Clean up the temporary R script + if temp_r_script_path.exists(): + temp_r_script_path.unlink() + + +@mcp.tool() +def finemap2anndata( + finemap_files: List[Path], + phenotype_ids: List[str], + study_ids: List[str], + output_anndata_path: Path, +) -> Dict[str, Any]: + """ + Converts a set of finemapping .rds files into a single AnnData object with credible set metadata. + + This function takes multiple finemapping output .rds files, along with corresponding + phenotype and study IDs, and merges them into a unified AnnData object. The resulting + AnnData object can then be used for downstream colocalization analysis. + + Args: + finemap_files: A list of paths to finemapping .rds files. Each file should be an + output from a finemapping pipeline (e.g., nf-flanders). + phenotype_ids: A list of phenotype identifiers, where each element corresponds + to a file in `finemap_files`. The length of this list must match + `finemap_files`. + study_ids: A list of study identifiers, where each element corresponds to a file + in `finemap_files`. The length of this list must match `finemap_files`. + output_anndata_path: The desired path to write the resulting AnnData object + in H5AD format (.h5ad extension is required). + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of + generated output files. + + Raises: + ValueError: If input validation fails (e.g., empty file list, mismatched lengths, + incorrect file extensions, or non-existent files). + """ + # Input validation + if not finemap_files: + raise ValueError("finemap_files cannot be empty.") + for f in finemap_files: + if not f.is_file(): + raise ValueError(f"Finemap file '{f}' does not exist.") + if f.suffix != ".rds": + raise ValueError(f"Finemap file '{f}' must have a .rds extension.") + + if not (len(finemap_files) == len(phenotype_ids) == len(study_ids)): + raise ValueError( + "finemap_files, phenotype_ids, and study_ids must have the same length. " + f"Lengths: {len(finemap_files)}, {len(phenotype_ids)}, {len(study_ids)}" + ) + if output_anndata_path.suffix != ".h5ad": + raise ValueError(f"output_anndata_path '{output_anndata_path}' must have a .h5ad extension.") + + # Prepare R vectors from Python lists + r_finemap_files = 'c(' + ', '.join([f'"{str(f)}"' for f in finemap_files]) + ')' + r_phenotype_ids = 'c(' + ', '.join([f'"{pid}"' for pid in phenotype_ids]) + ')' + r_study_ids = 'c(' + ', '.join([f'"{sid}"' for sid in study_ids]) + ')' + + r_script = f""" + library(flanders) + library(data.table) # Dependency for flanders, often used for data manipulation + library(dplyr) # Dependency for flanders, often used for data manipulation + library(anndata) # Required for writing AnnData objects to h5ad + + finemap_files <- {r_finemap_files} + phenotype_id <- {r_phenotype_ids} + study_id <- {r_study_ids} + + # Ensure the output directory exists + output_dir <- dirname("{str(output_anndata_path)}") + if (!dir.exists(output_dir)) {{ + dir.create(output_dir, recursive = TRUE) + }} + + ad <- finemap2anndata( + finemap_files = finemap_files, + phenotype_id = phenotype_id, + study_id = study_id + ) + + # Write the AnnData object to disk + ad$write_h5ad("{str(output_anndata_path)}") + """ + + return _run_r_script(r_script, output_files=[output_anndata_path]) + + +@mcp.tool() +def anndata2coloc_input( + input_anndata_path: Path, + output_coloc_input_path: Path, +) -> Dict[str, Any]: + """ + Generates a data frame specifying pairs of credible sets for colocalization tests. + + This function takes an existing AnnData object (typically generated by `finemap2anndata`) + and processes it to create an input table suitable for colocalization testing. This + table defines the pairs of credible sets that will be tested for colocalization. + + Args: + input_anndata_path: Path to an existing AnnData object (.h5ad) containing + credible set metadata. + output_coloc_input_path: The desired path to write the resulting colocalization + input table in CSV format (.csv extension is required). + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of + generated output files. + + Raises: + ValueError: If input validation fails (e.g., non-existent input file, + incorrect file extensions). + """ + # Input validation + if not input_anndata_path.is_file(): + raise ValueError(f"Input AnnData file '{input_anndata_path}' does not exist.") + if input_anndata_path.suffix != ".h5ad": + raise ValueError(f"input_anndata_path '{input_anndata_path}' must be an .h5ad file.") + if output_coloc_input_path.suffix != ".csv": + raise ValueError(f"output_coloc_input_path '{output_coloc_input_path}' must have a .csv extension.") + + r_script = f""" + library(zellkonverter) + library(SingleCellExperiment) + library(scRNAseq) # Often loaded in contexts using zellkonverter/SingleCellExperiment + library(flanders) + library(data.table) # Required for fwrite + + # Ensure the output directory exists + output_dir <- dirname("{str(output_coloc_input_path)}") + if (!dir.exists(output_dir)) {{ + dir.create(output_dir, recursive = TRUE) + }} + + sce <- readH5AD("{str(input_anndata_path)}", reader = "R") + coloc_input <- anndata2coloc_input(sce) + fwrite(coloc_input, file = "{str(output_coloc_input_path)}") + """ + + return _run_r_script(r_script, output_files=[output_coloc_input_path]) + + +@mcp.tool() +def anndata2coloc( + input_anndata_path: Path, + input_coloc_input_path: Path, + output_coloc_results_path: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Performs colocalization tests using the provided AnnData object and trait-pair table. + + This function executes pairwise colocalization tests based on an AnnData object + (containing finemapping results) and a pre-generated colocalization input table. + The results can either be printed to standard output or saved to a specified CSV file. + + Args: + input_anndata_path: Path to an existing AnnData object (.h5ad) containing + credible set metadata. + input_coloc_input_path: Path to the colocalization input table (.csv) + generated by `anndata2coloc_input`. This table specifies + which credible set pairs to test. + output_coloc_results_path: Optional path to write the colocalization results + table in CSV format (.csv extension is required if provided). + If not provided, the results will be printed to stdout. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of + generated output files. + + Raises: + ValueError: If input validation fails (e.g., non-existent input files, + incorrect file extensions). + """ + # Input validation + if not input_anndata_path.is_file(): + raise ValueError(f"Input AnnData file '{input_anndata_path}' does not exist.") + if input_anndata_path.suffix != ".h5ad": + raise ValueError(f"input_anndata_path '{input_anndata_path}' must be an .h5ad file.") + + if not input_coloc_input_path.is_file(): + raise ValueError(f"Input colocalization input file '{input_coloc_input_path}' does not exist.") + if input_coloc_input_path.suffix != ".csv": + raise ValueError(f"input_coloc_input_path '{input_coloc_input_path}' must be a .csv file.") + + if output_coloc_results_path and output_coloc_results_path.suffix != ".csv": + raise ValueError(f"output_coloc_results_path '{output_coloc_results_path}' must have a .csv extension if provided.") + + r_script_lines = [ + "library(zellkonverter)", + "library(SingleCellExperiment)", + "library(scRNAseq)", # Often loaded in contexts using zellkonverter/SingleCellExperiment + "library(flanders)", + "library(data.table)", # Required for fread and fwrite + "", + f'sce <- readH5AD("{str(input_anndata_path)}", reader = "R")', + f'coloc_input <- fread("{str(input_coloc_input_path)}")', + "coloc_results <- anndata2coloc(sce, coloc_input)", + ] + + output_files_to_check = [] + if output_coloc_results_path: + # Ensure the output directory exists + r_script_lines.append(f'output_dir <- dirname("{str(output_coloc_results_path)}")') + r_script_lines.append('if (!dir.exists(output_dir)) { dir.create(output_dir, recursive = TRUE) }') + r_script_lines.append(f'fwrite(coloc_results, file = "{str(output_coloc_results_path)}")') + output_files_to_check.append(output_coloc_results_path) + else: + r_script_lines.append("print(coloc_results)") + + r_script = "\n".join(r_script_lines) + + return _run_r_script(r_script, output_files=output_files_to_check) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d7a9f41d8bc7cf3f6fb91685c24e76e6859f0cec --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/r-flanders_server.py') +SERVER_NAME = 'biosci_r_flanders' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..a175064158b5acf2bdc30af56b54ae776471343d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-r-flanders: + build: . + image: mcp-r-flanders:latest + container_name: mcp-r-flanders + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=r-flanders + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7b27db9c59039267ea0618da7f321cde3f19d266 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - r-flanders + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-flanders/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6978c0fced048acb8a49efa97ed9ff1a8f0858e3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install r-mams via conda (e.g., from bioconda) +RUN conda install -c bioconda r-mams -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/r-mams_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/r-mams_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/r-mams_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f2d9932e3217b0a5276e2f788a5a7294f65b7919 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_server.py @@ -0,0 +1,144 @@ +import subprocess +from pathlib import Path +from typing import Optional, List +import os + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +class mcp: + @staticmethod + def tool(func): + return func + +@mcp.tool +def r_mams( + input_file: Path, + output_dir: Path, + param_file: Optional[Path] = None, + ppm: float = 5.0, + rt_tol: float = 30.0, + min_peak_height: float = 1000.0, + min_peak_width: float = 5.0, + max_peak_width: float = 60.0, + sn_thresh: float = 10.0, + prefilter_intensity: float = 100.0, + noise_intensity: float = 100.0, + threads: int = 1, + verbose: bool = False, +) -> dict: + """ + Executes the r-mams tool for metabolomics data processing. + + This tool performs peak picking and feature detection on mass spectrometry data. + It requires an input file with at least 'mz' and 'rt' columns and generates + output files in the specified directory. + + Args: + input_file: Path to the input file. A tab-separated file with at least 'mz' and 'rt' columns. + output_dir: Path to the output directory where results will be stored. + param_file: Optional path to a JSON file with MAMS parameters. + ppm: Mass tolerance in parts-per-million (ppm). Must be positive. + rt_tol: Retention time tolerance in seconds. Must be non-negative. + min_peak_height: Minimum peak height. Must be non-negative. + min_peak_width: Minimum peak width in seconds. Must be positive. + max_peak_width: Maximum peak width in seconds. Must be greater than min_peak_width. + sn_thresh: Signal-to-noise ratio threshold. Must be non-negative. + prefilter_intensity: Prefilter intensity threshold. Must be non-negative. + noise_intensity: Noise intensity threshold. Must be non-negative. + threads: Number of threads to use for processing. Must be at least 1. + verbose: Enable verbose output. + + Returns: + A dictionary containing the executed command, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not input_file.is_file(): + raise FileNotFoundError(f"Input file not found: {input_file}") + + if param_file and not param_file.is_file(): + raise FileNotFoundError(f"Parameter file not found: {param_file}") + + if ppm <= 0: + raise ValueError("ppm must be a positive number.") + if rt_tol < 0: + raise ValueError("rt_tol cannot be negative.") + if min_peak_height < 0: + raise ValueError("min_peak_height cannot be negative.") + if min_peak_width <= 0: + raise ValueError("min_peak_width must be a positive number.") + if max_peak_width <= min_peak_width: + raise ValueError("max_peak_width must be greater than min_peak_width.") + if sn_thresh < 0: + raise ValueError("sn_thresh cannot be negative.") + if prefilter_intensity < 0: + raise ValueError("prefilter_intensity cannot be negative.") + if noise_intensity < 0: + raise ValueError("noise_intensity cannot be negative.") + if threads < 1: + raise ValueError("threads must be at least 1.") + + # --- File Path Handling --- + try: + output_dir.mkdir(parents=True, exist_ok=True) + except OSError as e: + raise OSError(f"Could not create output directory {output_dir}: {e}") + + # --- Command Construction --- + cmd = [ + "r-mams", + "--input_file", str(input_file), + "--output_dir", str(output_dir), + "--ppm", str(ppm), + "--rt_tol", str(rt_tol), + "--min_peak_height", str(min_peak_height), + "--min_peak_width", str(min_peak_width), + "--max_peak_width", str(max_peak_width), + "--sn_thresh", str(sn_thresh), + "--prefilter_intensity", str(prefilter_intensity), + "--noise_intensity", str(noise_intensity), + "--threads", str(threads), + ] + + if param_file: + cmd.extend(["--param_file", str(param_file)]) + + if verbose: + cmd.append("--verbose") + + command_executed = " ".join(cmd) + + # --- Subprocess Execution & Error Handling --- + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + stdout = result.stdout + stderr = result.stderr + except FileNotFoundError: + raise RuntimeError("r-mams executable not found. Please ensure it is in your system's PATH.") + except subprocess.CalledProcessError as e: + # In case of an error, return a structured error message + return { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"r-mams failed with exit code {e.returncode}", + "output_files": [] + } + + # --- Structured Result Return --- + try: + output_files = [str(f) for f in output_dir.glob("**/*") if f.is_file()] + except Exception as e: + output_files = [] + stderr += f"\nWarning: Could not list output files in {output_dir}. Error: {e}" + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..1de6bf96680b229c684a9748a226b39b0e6e776d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/r-mams_server.py') +SERVER_NAME = 'biosci_r_mams' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..0215d12b56a637868ef49a1c1e760504cdb80050 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-r-mams: + build: . + image: mcp-r-mams:latest + container_name: mcp-r-mams + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=r-mams + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7ee49bff10b0e03fc56f62fe58b6c7f5f1d0b89a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - r-mams + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-mams/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3c1f7338c4e8de5ce0eb67cbeb826d86db0d78db --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install r-redeemr via conda (e.g., from bioconda) +RUN conda install -c bioconda r-redeemr -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/r-redeemr_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/r-redeemr_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/r-redeemr_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5672eaf062bd02e86ea45df9e0bcd1d04b2f0c0c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_server.py @@ -0,0 +1,137 @@ +import subprocess +import tempfile +import shlex +from pathlib import Path +from typing import Optional, List, Dict, Any + +# Assuming mcp is available in the environment as per the instructions. +# from mcp import tool as mcp.tool + +@mcp.tool() +def redeemr( + genome: Path, + species: str, + output_dir: Optional[Path] = None, + nproc: int = 1, + repeatmasker_dir: Optional[Path] = None, + repeatmodeler_dir: Optional[Path] = None, + trf_dir: Optional[Path] = None, + rmblast_dir: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Runs the redeemr pipeline for REpeats DE-novo Estimation and Masking in R. + + This tool serves as a wrapper for the `redeemr::redeem()` R function, which + automates the process of de-novo repeat identification and masking using + RepeatModeler and RepeatMasker. + + Args: + genome: Path to the input genome file in FASTA format. + species: The species name to be used by RepeatMasker (e.g., "homo_sapiens"). + output_dir: Directory to save the output files. If not provided, a temporary directory will be created. + nproc: Number of processors to use for the analysis. + repeatmasker_dir: Optional path to the RepeatMasker installation directory. + repeatmodeler_dir: Optional path to the RepeatModeler installation directory. + trf_dir: Optional path to the Tandem Repeats Finder (TRF) installation directory. + rmblast_dir: Optional path to the RMBlast (a modified version of NCBI BLAST) installation directory. + + Returns: + A dictionary containing the execution details, including the command, + stdout, stderr, and paths to the output directory and files. + """ + # 1. Input Validation + if not genome.is_file(): + raise FileNotFoundError(f"Input genome file not found at: {genome}") + if not species.strip(): + raise ValueError("Species name cannot be empty.") + if nproc <= 0: + raise ValueError(f"Number of processors (nproc) must be a positive integer, but got {nproc}.") + + for optional_path in [repeatmasker_dir, repeatmodeler_dir, trf_dir, rmblast_dir]: + if optional_path and not optional_path.is_dir(): + raise NotADirectoryError(f"Provided path is not a valid directory: {optional_path}") + + # 2. Output Directory Handling + # If an output directory is not specified, create a temporary one. + # This is a safe practice for server environments. + temp_dir_obj = None + if output_dir: + final_output_dir = output_dir + else: + temp_dir_obj = tempfile.TemporaryDirectory(prefix="redeemr_output_") + final_output_dir = Path(temp_dir_obj.name) + + final_output_dir.mkdir(parents=True, exist_ok=True) + + # 3. R Script Generation + # Building an R script dynamically is safer than complex command-line strings. + r_args = [ + f'genome = "{genome.resolve()}"', + f'species = "{species}"', + f'outputDir = "{final_output_dir.resolve()}"', + f'nproc = {nproc}' + ] + + def format_r_path(name: str, path: Optional[Path]) -> str: + """Helper to format optional paths for the R script (path or NULL).""" + if path: + return f'{name} = "{path.resolve()}"' + return f'{name} = NULL' + + r_args.append(format_r_path('RepeatMasker_dir', repeatmasker_dir)) + r_args.append(format_r_path('RepeatModeler_dir', repeatmodeler_dir)) + r_args.append(format_r_path('TRF_dir', trf_dir)) + r_args.append(format_r_path('RMBlast_dir', rmblast_dir)) + + r_code = f"library(redeemr)\nredeemr::redeem({', '.join(r_args)})" + + # 4. Subprocess Execution + script_file = None + command_executed = "" + try: + with tempfile.NamedTemporaryFile(mode='w', suffix=".R", delete=False, dir=final_output_dir) as fp: + script_file = Path(fp.name) + fp.write(r_code) + + cmd = ["Rscript", str(script_file)] + command_executed = " ".join(shlex.quote(c) for c in cmd) + + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + cwd=final_output_dir # Execute from the output directory + ) + + # 5. Collect Output Files + output_files = [str(p) for p in final_output_dir.rglob('*') if p.is_file()] + + return { + "command_executed": command_executed, + "r_script_content": r_code, + "stdout": result.stdout, + "stderr": result.stderr, + "output_directory": str(final_output_dir), + "output_files": output_files + } + + except FileNotFoundError: + raise RuntimeError("`Rscript` command not found. Please ensure R is installed and in the system's PATH.") + except subprocess.CalledProcessError as e: + # Structured error return + return { + "command_executed": command_executed, + "r_script_content": r_code, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "r-redeemr execution failed with a non-zero exit code.", + "return_code": e.returncode + } + finally: + # Cleanup the temporary R script + if script_file and script_file.exists(): + script_file.unlink() + # Cleanup the temporary directory object if it was created + if temp_dir_obj: + temp_dir_obj.cleanup() \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a181ff95879a7caa3c0ed97d16637a584eedb998 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/r-redeemr_server.py') +SERVER_NAME = 'biosci_r_redeemr' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..da7308bfd1fd8ecef5ac7487ca4610a6351c8ec5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-r-redeemr: + build: . + image: mcp-r-redeemr:latest + container_name: mcp-r-redeemr + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=r-redeemr + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3797808281b0dabf1ec3fff525d74d1a722cbe01 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - r-redeemr + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-redeemr/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d15d7d5b039b69fd02218f95022a6e6b64eb2d32 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install r-seurat-disk via conda (e.g., from bioconda) +RUN conda install -c bioconda r-seurat-disk -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/r-seurat-disk_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/r-seurat-disk_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/r-seurat-disk_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3c196e6cda95848c1bb6e5bc7573b8cfe8e2a7fb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_server.py @@ -0,0 +1,361 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import Optional, List + +# @mcp.tool() - This decorator is commented out as per the instructions not to import mcp +def convert_h5seurat_to_h5ad( + source_h5seurat: Path, + dest_h5ad: Path, + assay: str = "RNA", + overwrite: bool = False, +): + """ + Converts a .h5seurat file to an AnnData .h5ad file using SeuratDisk. + + This tool wraps the SeuratDisk::Convert function to facilitate interoperability + between Seurat and Scanpy/AnnData workflows. + + Args: + source_h5seurat: Path to the input .h5seurat file. + dest_h5ad: Path for the output .h5ad file. + assay: The name of the assay from the Seurat object to store in the X slot of the AnnData object. + overwrite: If True, allows overwriting the destination file if it already exists. + """ + # Input validation + if not source_h5seurat.is_file(): + raise FileNotFoundError(f"Input file not found: {source_h5seurat}") + if not source_h5seurat.name.endswith(".h5seurat"): + raise ValueError("Input file must be a .h5seurat file.") + if dest_h5ad.exists() and not overwrite: + raise FileExistsError( + f"Output file {dest_h5ad} already exists. Use overwrite=True to replace it." + ) + dest_h5ad.parent.mkdir(parents=True, exist_ok=True) + + # R script content + r_script_content = f""" + # Suppress package startup messages + suppressPackageStartupMessages(library(SeuratDisk)) + + # Use tryCatch for robust error handling + tryCatch({{ + cat("Starting conversion from .h5seurat to .h5ad...\\n") + SeuratDisk::Convert( + source = '{source_h5seurat.resolve()}', + dest = '{dest_h5ad.resolve()}', + assay = '{assay}', + overwrite = {'TRUE' if overwrite else 'FALSE'} + ) + cat("Conversion successful.\\n") + }}, error = function(e) {{ + # Print error message to stderr and exit with a non-zero status + cat(paste("Error during conversion:", e$message, "\\n"), file = stderr()) + quit(status = 1) + }}) + """ + + # Execute the R script + command = [] + stdout_str = "" + stderr_str = "" + try: + with tempfile.NamedTemporaryFile( + mode="w", delete=True, suffix=".R", dir="." + ) as r_script: + r_script.write(r_script_content) + r_script.flush() + command = ["Rscript", r_script.name] + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + stdout_str = process.stdout + stderr_str = process.stderr + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"R script execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(command)}\n" + f"Stderr: {e.stderr}" + ) from e + + return { + "command_executed": " ".join(command), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": [str(dest_h5ad.resolve())], + } + + +# @mcp.tool() - This decorator is commented out as per the instructions not to import mcp +def convert_h5ad_to_h5seurat( + source_h5ad: Path, + dest_h5seurat: Path, + assay: str = "RNA", + overwrite: bool = False, +): + """ + Converts an AnnData .h5ad file to a .h5seurat file using SeuratDisk. + + This tool wraps the SeuratDisk::Convert function to facilitate interoperability + between Scanpy/AnnData and Seurat workflows. + + Args: + source_h5ad: Path to the input .h5ad file. + dest_h5seurat: Path for the output .h5seurat file. + assay: The name for the assay to be created in the Seurat object. + overwrite: If True, allows overwriting the destination file if it already exists. + """ + # Input validation + if not source_h5ad.is_file(): + raise FileNotFoundError(f"Input file not found: {source_h5ad}") + if not source_h5ad.name.endswith(".h5ad"): + raise ValueError("Input file must be a .h5ad file.") + if dest_h5seurat.exists() and not overwrite: + raise FileExistsError( + f"Output file {dest_h5seurat} already exists. Use overwrite=True to replace it." + ) + dest_h5seurat.parent.mkdir(parents=True, exist_ok=True) + + # R script content + r_script_content = f""" + # Suppress package startup messages + suppressPackageStartupMessages(library(SeuratDisk)) + + # Use tryCatch for robust error handling + tryCatch({{ + cat("Starting conversion from .h5ad to .h5seurat...\\n") + SeuratDisk::Convert( + source = '{source_h5ad.resolve()}', + dest = '{dest_h5seurat.resolve()}', + assay = '{assay}', + overwrite = {'TRUE' if overwrite else 'FALSE'} + ) + cat("Conversion successful.\\n") + }}, error = function(e) {{ + # Print error message to stderr and exit with a non-zero status + cat(paste("Error during conversion:", e$message, "\\n"), file = stderr()) + quit(status = 1) + }}) + """ + + # Execute the R script + command = [] + stdout_str = "" + stderr_str = "" + try: + with tempfile.NamedTemporaryFile( + mode="w", delete=True, suffix=".R", dir="." + ) as r_script: + r_script.write(r_script_content) + r_script.flush() + command = ["Rscript", r_script.name] + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + stdout_str = process.stdout + stderr_str = process.stderr + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"R script execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(command)}\n" + f"Stderr: {e.stderr}" + ) from e + + return { + "command_executed": " ".join(command), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": [str(dest_h5seurat.resolve())], + } + + +# @mcp.tool() - This decorator is commented out as per the instructions not to import mcp +def save_h5seurat( + source_rds: Path, dest_h5seurat: Path, overwrite: bool = False +): + """ + Saves a Seurat object from an .rds file to the .h5seurat format. + + This tool loads a Seurat object (saved in .rds format) and uses the + SeuratDisk::SaveH5Seurat function to write it to the HDF5-based + .h5seurat format. + + Args: + source_rds: Path to the input Seurat object saved as an .rds file. + dest_h5seurat: Path for the output .h5seurat file. + overwrite: If True, allows overwriting the destination file if it already exists. + """ + # Input validation + if not source_rds.is_file(): + raise FileNotFoundError(f"Input file not found: {source_rds}") + if not source_rds.name.endswith(".rds"): + raise ValueError("Input file must be an .rds file.") + if dest_h5seurat.exists() and not overwrite: + raise FileExistsError( + f"Output file {dest_h5seurat} already exists. Use overwrite=True to replace it." + ) + dest_h5seurat.parent.mkdir(parents=True, exist_ok=True) + + # R script content + r_script_content = f""" + # Suppress package startup messages + suppressPackageStartupMessages(library(SeuratDisk)) + suppressPackageStartupMessages(library(SeuratObject)) + + # Use tryCatch for robust error handling + tryCatch({{ + cat("Loading Seurat object from .rds file...\\n") + seurat_object <- readRDS('{source_rds.resolve()}') + cat("Saving Seurat object to .h5seurat format...\\n") + SeuratDisk::SaveH5Seurat( + object = seurat_object, + filename = '{dest_h5seurat.resolve()}', + overwrite = {'TRUE' if overwrite else 'FALSE'} + ) + cat("Save successful.\\n") + }}, error = function(e) {{ + # Print error message to stderr and exit with a non-zero status + cat(paste("Error during save:", e$message, "\\n"), file = stderr()) + quit(status = 1) + }}) + """ + + # Execute the R script + command = [] + stdout_str = "" + stderr_str = "" + try: + with tempfile.NamedTemporaryFile( + mode="w", delete=True, suffix=".R", dir="." + ) as r_script: + r_script.write(r_script_content) + r_script.flush() + command = ["Rscript", r_script.name] + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + stdout_str = process.stdout + stderr_str = process.stderr + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"R script execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(command)}\n" + f"Stderr: {e.stderr}" + ) from e + + return { + "command_executed": " ".join(command), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": [str(dest_h5seurat.resolve())], + } + + +# @mcp.tool() - This decorator is commented out as per the instructions not to import mcp +def load_h5seurat( + source_h5seurat: Path, + dest_rds: Path, + assays: Optional[str] = None, + reductions: Optional[str] = None, + graphs: Optional[str] = None, + images: Optional[str] = None, + load_misc: bool = True, +): + """ + Loads data from a .h5seurat file and saves it as a Seurat object in .rds format. + + This tool uses SeuratDisk::LoadH5Seurat to read an .h5seurat file, with options + to selectively load specific data components (assays, reductions, etc.), and then + saves the resulting Seurat object to an .rds file for use in R. + + Args: + source_h5seurat: Path to the input .h5seurat file. + dest_rds: Path for the output .rds file. + assays: Optional comma-separated string of assay names to load. If None, loads all. + reductions: Optional comma-separated string of reduction names to load. If None, loads all. + graphs: Optional comma-separated string of graph names to load. If None, loads all. + images: Optional comma-separated string of image names to load. If None, loads all. + load_misc: If True, loads miscellaneous data stored in the object. + """ + # Input validation + if not source_h5seurat.is_file(): + raise FileNotFoundError(f"Input file not found: {source_h5seurat}") + if not source_h5seurat.name.endswith(".h5seurat"): + raise ValueError("Input file must be a .h5seurat file.") + dest_rds.parent.mkdir(parents=True, exist_ok=True) + + # Helper function to convert Python string list to R character vector string + def to_r_vector(s: Optional[str]) -> str: + if s is None: + return "NULL" + items = [f'"{item.strip()}"' for item in s.split(",")] + return f"c({', '.join(items)})" + + # R script content + r_script_content = f""" + # Suppress package startup messages + suppressPackageStartupMessages(library(SeuratDisk)) + suppressPackageStartupMessages(library(SeuratObject)) + + # Use tryCatch for robust error handling + tryCatch({{ + cat("Loading data from .h5seurat file...\\n") + seurat_object <- SeuratDisk::LoadH5Seurat( + filename = '{source_h5seurat.resolve()}', + assays = {to_r_vector(assays)}, + reductions = {to_r_vector(reductions)}, + graphs = {to_r_vector(graphs)}, + images = {to_r_vector(images)}, + misc = {'TRUE' if load_misc else 'FALSE'} + ) + cat("Saving loaded Seurat object to .rds file...\\n") + saveRDS(seurat_object, file = '{dest_rds.resolve()}') + cat("Save successful.\\n") + }}, error = function(e) {{ + # Print error message to stderr and exit with a non-zero status + cat(paste("Error during load:", e$message, "\\n"), file = stderr()) + quit(status = 1) + }}) + """ + + # Execute the R script + command = [] + stdout_str = "" + stderr_str = "" + try: + with tempfile.NamedTemporaryFile( + mode="w", delete=True, suffix=".R", dir="." + ) as r_script: + r_script.write(r_script_content) + r_script.flush() + command = ["Rscript", r_script.name] + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + ) + stdout_str = process.stdout + stderr_str = process.stderr + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"R script execution failed with exit code {e.returncode}.\n" + f"Command: {' '.join(command)}\n" + f"Stderr: {e.stderr}" + ) from e + + return { + "command_executed": " ".join(command), + "stdout": stdout_str, + "stderr": stderr_str, + "output_files": [str(dest_rds.resolve())], + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3c265bc5ae300439522861dd93aef85f8f065d65 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/r-seurat-disk_server.py') +SERVER_NAME = 'biosci_r_seurat_disk' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..a53c011d0b347864e42d99d68c7039e9921755f4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-r-seurat-disk: + build: . + image: mcp-r-seurat-disk:latest + container_name: mcp-r-seurat-disk + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=r-seurat-disk + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..65b4da10eec77fe7f4db0f6f14a8b149c7c51bb7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - r-seurat-disk + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_r-seurat-disk/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..04af583eaf090ea69ddac2acf23fe0ecbd56c27b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install raxml via conda (e.g., from bioconda) +RUN conda install -c bioconda raxml -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/raxml_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/raxml_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/raxml_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3a6aa4d78d4dc72784cd9296dd6e83355db5bd32 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_server.py @@ -0,0 +1,282 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union +import os + +@mcp.tool() +def raxml_rapid_bootstrap( + alignment_file: str, + model: str, + output_name: str, + parsimony_seed: int = 12345, + bootstrap_seed: int = 12345, + num_replicates: int = 100, + partition_file: Optional[str] = None, + outgroup: Optional[str] = None, + working_dir: Optional[str] = None, + threads: int = 1 +) -> dict: + """ + Perform a full analysis (Rapid Bootstrap + Best-scoring ML tree search) using the -f a algorithm. + + Args: + alignment_file: Path to the input alignment file (PHYLIP or FASTA). + model: Substitution model (e.g., GTRGAMMA, GTRCAT, PROTGAMMALG). + output_name: Suffix for output files. + parsimony_seed: Random number seed for the initial parsimony inferences. + bootstrap_seed: Random number seed for the rapid bootstrapping. + num_replicates: Number of bootstrap replicates or 'autoMRE' for convergence test. + partition_file: Optional path to a partition file. + outgroup: Name of the outgroup taxon (or comma-separated list). + working_dir: Directory to save output files. + threads: Number of threads to use (requires PTHREADS version of RAxML). + """ + # Input validation + align_path = Path(alignment_file) + if not align_path.exists(): + return {"error": f"Alignment file not found: {alignment_file}"} + + if parsimony_seed <= 0 or bootstrap_seed <= 0: + return {"error": "Seeds must be positive integers."} + + # Determine executable (prefer PTHREADS if threads > 1) + executable = "raxmlHPC-PTHREADS" if threads > 1 else "raxmlHPC" + + # Build command + cmd = [ + executable, + "-f", "a", + "-s", str(align_path), + "-m", model, + "-n", output_name, + "-p", str(parsimony_seed), + "-x", str(bootstrap_seed), + "-N", str(num_replicates) + ] + + if threads > 1: + cmd.extend(["-T", str(threads)]) + + if partition_file: + part_path = Path(partition_file) + if not part_path.exists(): + return {"error": f"Partition file not found: {partition_file}"} + cmd.extend(["-q", str(part_path)]) + + if outgroup: + cmd.extend(["-o", outgroup]) + + if working_dir: + work_path = Path(working_dir) + work_path.mkdir(parents=True, exist_ok=True) + cmd.extend(["-w", str(work_path.absolute())]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + # Identify output files based on suffix + output_prefix = working_dir if working_dir else "." + expected_files = list(Path(output_prefix).glob(f"RAxML_*{output_name}")) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(f) for f in expected_files] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "RAxML execution failed", + "stdout": e.stdout, + "stderr": e.stderr + } + except FileNotFoundError: + return {"error": f"RAxML executable '{executable}' not found in PATH."} + +@mcp.tool() +def raxml_standard_ml( + alignment_file: str, + model: str, + output_name: str, + parsimony_seed: int = 12345, + num_runs: int = 10, + partition_file: Optional[str] = None, + starting_tree: Optional[str] = None, + threads: int = 1 +) -> dict: + """ + Perform a standard ML tree search (algorithm -f d). + + Args: + alignment_file: Path to the input alignment file. + model: Substitution model. + output_name: Suffix for output files. + parsimony_seed: Random number seed for parsimony. + num_runs: Number of ML searches from different starting trees. + partition_file: Optional path to a partition file. + starting_tree: Optional path to a user-defined starting tree (Newick). + threads: Number of threads to use. + """ + align_path = Path(alignment_file) + if not align_path.exists(): + return {"error": f"Alignment file not found: {alignment_file}"} + + executable = "raxmlHPC-PTHREADS" if threads > 1 else "raxmlHPC" + + cmd = [ + executable, + "-f", "d", + "-s", str(align_path), + "-m", model, + "-n", output_name, + "-p", str(parsimony_seed), + "-N", str(num_runs) + ] + + if threads > 1: + cmd.extend(["-T", str(threads)]) + if partition_file: + cmd.extend(["-q", partition_file]) + if starting_tree: + cmd.extend(["-t", starting_tree]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + expected_files = list(Path(".").glob(f"RAxML_*{output_name}")) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(f) for f in expected_files] + } + except subprocess.CalledProcessError as e: + return {"command_executed": " ".join(cmd), "error": e.stderr, "stdout": e.stdout} + +@mcp.tool() +def raxml_bootstrap_convergence( + bootstrap_trees_file: str, + output_name: str, + criterion: str = "autoMRE", + model: str = "GTRGAMMA" +) -> dict: + """ + Test for bootstrap convergence using the -f I algorithm. + + Args: + bootstrap_trees_file: Path to a file containing multiple bootstrap trees. + output_name: Suffix for output files. + criterion: Convergence criterion: 'autoMRE' (extended majority rule), 'autoMR', 'autoFC'. + model: A model must be specified even if not used for this algorithm. + """ + tree_path = Path(bootstrap_trees_file) + if not tree_path.exists(): + return {"error": f"Bootstrap trees file not found: {bootstrap_trees_file}"} + + if criterion not in ["autoMRE", "autoMR", "autoFC", "autoMRE_IGN"]: + return {"error": "Invalid criterion. Choose from autoMRE, autoMR, autoFC, autoMRE_IGN."} + + cmd = [ + "raxmlHPC", + "-f", "I", + "-z", str(tree_path), + "-m", model, + "-n", output_name, + "-I", criterion + ] + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"command_executed": " ".join(cmd), "error": e.stderr} + +@mcp.tool() +def raxml_site_likelihoods( + alignment_file: str, + tree_file: str, + model: str, + output_name: str, + partition_file: Optional[str] = None +) -> dict: + """ + Compute per-site log likelihoods for a given tree (algorithm -f g). + + Args: + alignment_file: Path to the input alignment. + tree_file: Path to the tree file. + model: Substitution model. + output_name: Suffix for output files. + partition_file: Optional partition file. + """ + if not Path(alignment_file).exists() or not Path(tree_file).exists(): + return {"error": "Input alignment or tree file missing."} + + cmd = [ + "raxmlHPC", + "-f", "g", + "-s", alignment_file, + "-t", tree_file, + "-m", model, + "-n", output_name + ] + + if partition_file: + cmd.extend(["-q", partition_file]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + expected_files = list(Path(".").glob(f"RAxML_perSiteLLs.{output_name}")) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "output_files": [str(f) for f in expected_files] + } + except subprocess.CalledProcessError as e: + return {"command_executed": " ".join(cmd), "error": e.stderr} + +@mcp.tool() +def raxml_generic_custom( + alignment_file: str, + model: str, + output_name: str, + algorithm: str, + parsimony_seed: int = 12345, + extra_args: Optional[List[str]] = None +) -> dict: + """ + A generic wrapper for RAxML to handle advanced or less common flags. + + Args: + alignment_file: Path to the input alignment. + model: Substitution model. + output_name: Suffix for output files. + algorithm: The -f flag value (e.g., 'b', 'c', 'e'). + parsimony_seed: Random seed. + extra_args: List of additional command line arguments (e.g., ["-o", "Outgroup", "-c", "25"]). + """ + cmd = [ + "raxmlHPC", + "-f", algorithm, + "-s", alignment_file, + "-m", model, + "-n", output_name, + "-p", str(parsimony_seed) + ] + + if extra_args: + cmd.extend(extra_args) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"command_executed": " ".join(cmd), "error": e.stderr, "stdout": e.stdout} \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6e4239ff34be66e202fa1f46627b5153ca7d98a6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/raxml_server.py') +SERVER_NAME = 'biosci_raxml' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..204ce4e2ce0031c5c027d730ae71578026c5cbe3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-raxml: + build: . + image: mcp-raxml:latest + container_name: mcp-raxml + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=raxml + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..02d98431f54f35c978c5741609ad7b90b549a4e9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - raxml + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_raxml/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_recognizer/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_recognizer/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_recognizer/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c0526599d4bc010e82c296a62f8b2d7e82ed4877 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install rseqc via conda (e.g., from bioconda) +RUN conda install -c bioconda rseqc -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/rseqc_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/rseqc_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/rseqc_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_server.py new file mode 100644 index 0000000000000000000000000000000000000000..c2b618e965dbf2ea410c710f93381ef79b00cb20 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_server.py @@ -0,0 +1,651 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Union +import os + +@mcp.tool() +def rseqc_bam2fq( + input_file: str, + out_prefix: str, + single_end: bool = False, + compress: bool = False, +): + """ + Convert alignments in BAM or SAM format into fastq format. + + :param input_file: Alignment file in BAM or SAM format. + :param out_prefix: Prefix of output fastq files(s). + :param single_end: Specify for single-end sequencing. + :param compress: Compress output fastq file(s) using 'gzip' command. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} does not exist."} + + cmd = ["bam2fq.py", "-i", str(input_path), "-o", out_prefix] + if single_end: + cmd.append("-s") + if compress: + cmd.append("-c") + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}*")) + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def rseqc_bam2wig( + input_file: str, + chrom_size: str, + out_prefix: str, + wigsum: Optional[int] = None, + skip_multi_hits: bool = False, + strand: str = "none", + mapq: int = 30, +): + """ + Convert BAM file into wig/bigWig format. BAM must be sorted and indexed. + + :param input_file: Alignment file in BAM format. + :param chrom_size: Chromosome size file (2 columns: name, size). + :param out_prefix: Prefix of output wiggle files(s). + :param wigsum: Specified wigsum for normalization (e.g., 1000000000). + :param skip_multi_hits: Skip non-unique hit reads. + :param strand: Strand rule (e.g., '1++,1--,2+-,2-+'). Run infer_experiment.py if unsure. + :param mapq: Minimum mapping quality for an alignment to be called 'uniquely mapped'. + """ + input_path = Path(input_file) + chrom_path = Path(chrom_size) + if not input_path.exists(): + return {"error": f"Input BAM {input_file} not found."} + if not chrom_path.exists(): + return {"error": f"Chromosome size file {chrom_size} not found."} + + cmd = ["bam2wig.py", "-i", str(input_path), "-s", str(chrom_path), "-o", out_prefix, "-q", str(mapq), "-d", strand] + if wigsum is not None: + cmd.extend(["-t", str(wigsum)]) + if skip_multi_hits: + cmd.append("-u") + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_bam_stat( + input_file: str, + mapq: int = 30, +): + """ + Summarizing mapping statistics of a BAM or SAM file. + + :param input_file: Alignment file in BAM or SAM format. + :param mapq: Minimum mapping quality to determine uniquely mapped read. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["bam_stat.py", "-i", str(input_path), "-q", str(mapq)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_clipping_profile( + input_file: str, + out_prefix: str, + mapq: int = 30, + sequencing: str = "SE", +): + """ + Calculate the distributions of clipped nucleotides across reads. + + :param input_file: Alignment file in BAM or SAM format. + :param out_prefix: Prefix of output files(s). + :param mapq: Minimum mapping quality for 'uniquely mapped'. + :param sequencing: Sequencing layout. 'SE' (single-end) or 'PE' (pair-end). + """ + if sequencing not in ["SE", "PE"]: + return {"error": "sequencing must be 'SE' or 'PE'"} + + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["clipping_profile.py", "-i", str(input_path), "-o", out_prefix, "-q", str(mapq), "-s", sequencing] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.clipping_profile.*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_deletion_profile( + input_bam: str, + read_align_length: int, + out_prefix: str, + read_num: int = 1000000, + mapq: int = 30, +): + """ + Calculate the distributions of deletions across reads. + + :param input_bam: Input BAM file. + :param read_align_length: Alignment length of read (usually original read length). + :param out_prefix: Prefix of output files(s). + :param read_num: Number of aligned reads with mismatches used. + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_bam) + if not input_path.exists(): + return {"error": f"Input BAM {input_bam} not found."} + + cmd = [ + "deletion_profile.py", + "-i", str(input_path), + "-l", str(read_align_length), + "-o", out_prefix, + "-n", str(read_num), + "-q", str(mapq) + ] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.deletion_profile.*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_divide_bam( + input_file: str, + subset_num: int, + out_prefix: str, + skip_unmap: bool = False, +): + """ + Equally divide BAM file into n parts. + + :param input_file: Alignment file in BAM format (sorted and indexed). + :param subset_num: Number of small BAM files to create. + :param out_prefix: Prefix of output BAM files. + :param skip_unmap: Skip unmapped reads. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input BAM {input_file} not found."} + + cmd = ["divide_bam.py", "-i", str(input_path), "-n", str(subset_num), "-o", out_prefix] + if skip_unmap: + cmd.append("-s") + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}_*.bam")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_fpkm_count( + input_file: str, + refgene_bed: str, + out_prefix: str, + strand: str = "none", + skip_multi_hits: bool = False, + only_exonic: bool = False, + mapq: int = 30, + single_read: float = 1.0, +): + """ + Calculate raw read count, FPM and FPKM for each gene in BED file. + + :param input_file: Alignment file in BAM format (SAM not supported). + :param refgene_bed: Reference gene model in BED format. + :param out_prefix: Prefix of output files(s). + :param strand: Strand rule (e.g., '1++,1--,2+-,2-+'). + :param skip_multi_hits: Skip multiple hits reads. + :param only_exonic: Only use exonic reads for total count. + :param mapq: Minimum mapping quality. + :param single_read: How to count single-end mapped pairs (0, 0.5, or 1). + """ + input_path = Path(input_file) + bed_path = Path(refgene_bed) + if not input_path.exists() or not bed_path.exists(): + return {"error": "Input BAM or BED file not found."} + + cmd = [ + "FPKM_count.py", + "-i", str(input_path), + "-r", str(bed_path), + "-o", out_prefix, + "-d", strand, + "-q", str(mapq), + "-s", str(single_read) + ] + if skip_multi_hits: + cmd.append("-u") + if only_exonic: + cmd.append("-e") + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [f"{out_prefix}.FPKM.xls"] + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_fpkm_uq( + bam_file: str, + gtf_file: str, + info_file: str, + output_prefix: str, + log2: bool = False, +): + """ + Calculate count, FPKM, and FPKM-UQ values defined by TCGA. Requires HTSeq. + + :param bam_file: Alignment file in BAM format (sorted and indexed). + :param gtf_file: Gene model in GTF format. + :param info_file: Gene model information file (TSV). + :param output_prefix: Prefix of the output file. + :param log2: Convert values into log2(x+1) scale. + """ + bam_path = Path(bam_file) + gtf_path = Path(gtf_file) + info_path = Path(info_file) + + if not all(p.exists() for p in [bam_path, gtf_path, info_path]): + return {"error": "One or more input files (BAM, GTF, Info) not found."} + + cmd = [ + "FPKM-UQ.py", + "--bam", str(bam_path), + "--gtf", str(gtf_path), + "--info", str(info_path), + "-o", output_prefix + ] + if log2: + cmd.append("--log2") + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{output_prefix}*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_genebody_coverage( + input_files: str, + refgene_bed: str, + out_prefix: str, +): + """ + Calculate the RNA-seq reads coverage over gene body. + + :param input_files: BAM file(s). Can be a single BAM, comma-separated BAMs, a text file containing BAM paths, or a directory. + :param refgene_bed: Reference gene model in BED format. + :param out_prefix: Prefix of output files(s). + """ + bed_path = Path(refgene_bed) + if not bed_path.exists(): + return {"error": f"BED file {refgene_bed} not found."} + + cmd = ["geneBody_coverage.py", "-i", input_files, "-r", str(bed_path), "-o", out_prefix] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.geneBodyCoverage.*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_infer_experiment( + input_file: str, + refgene_bed: str, + sample_size: int = 200000, + mapq: int = 30, +): + """ + Infer the strand specificity of RNA-seq data. + + :param input_file: Alignment file in BAM or SAM format. + :param refgene_bed: Reference gene model in BED format. + :param sample_size: Number of reads to sample. + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_file) + bed_path = Path(refgene_bed) + if not input_path.exists() or not bed_path.exists(): + return {"error": "Input BAM or BED file not found."} + + cmd = ["infer_experiment.py", "-i", str(input_path), "-r", str(bed_path), "-s", str(sample_size), "-q", str(mapq)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_inner_distance( + input_file: str, + refgene_bed: str, + out_prefix: str, + sample_size: int = 1000000, + mapq: int = 30, + lower_bound: int = -250, + upper_bound: int = 250, + step: int = 5, +): + """ + Calculate the inner distance (or insert size) between read pairs. + + :param input_file: Alignment file in BAM or SAM format. + :param refgene_bed: Reference gene model in BED format. + :param out_prefix: Prefix of output files(s). + :param sample_size: Number of reads to sample. + :param mapq: Minimum mapping quality. + :param lower_bound: Lower bound of inner distance. + :param upper_bound: Upper bound of inner distance. + :param step: Step size for histogram. + """ + input_path = Path(input_file) + bed_path = Path(refgene_bed) + if not input_path.exists() or not bed_path.exists(): + return {"error": "Input BAM or BED file not found."} + + cmd = [ + "inner_distance.py", "-i", str(input_path), "-r", str(bed_path), "-o", out_prefix, + "-s", str(sample_size), "-q", str(mapq), "-l", str(lower_bound), "-u", str(upper_bound), "-k", str(step) + ] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.inner_distance*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_junction_annotation( + input_file: str, + refgene_bed: str, + out_prefix: str, + mapq: int = 30, +): + """ + Compare detected splice junctions to reference gene model. + + :param input_file: Alignment file in BAM or SAM format. + :param refgene_bed: Reference gene model in BED format. + :param out_prefix: Prefix of output files(s). + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_file) + bed_path = Path(refgene_bed) + if not input_path.exists() or not bed_path.exists(): + return {"error": "Input BAM or BED file not found."} + + cmd = ["junction_annotation.py", "-i", str(input_path), "-r", str(bed_path), "-o", out_prefix, "-q", str(mapq)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.junction*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_read_distribution( + input_file: str, + refgene_bed: str, +): + """ + Calculate how mapped reads are distributed over genome features (CDS, UTR, Intron, etc). + + :param input_file: Alignment file in BAM or SAM format. + :param refgene_bed: Reference gene model in BED format. + """ + input_path = Path(input_file) + bed_path = Path(refgene_bed) + if not input_path.exists() or not bed_path.exists(): + return {"error": "Input BAM or BED file not found."} + + cmd = ["read_distribution.py", "-i", str(input_path), "-r", str(bed_path)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_read_duplication( + input_file: str, + out_prefix: str, + mapq: int = 30, +): + """ + Calculate read duplication rate. + + :param input_file: Alignment file in BAM or SAM format. + :param out_prefix: Prefix of output files(s). + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["read_duplication.py", "-i", str(input_path), "-o", out_prefix, "-q", str(mapq)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_tin( + input_file: str, + refgene_bed: str, + min_coverage: int = 10, + sample_size: int = 100, +): + """ + Calculate Transcript Integrity Number (TIN) for each gene. + + :param input_file: Alignment file in BAM format (sorted and indexed). + :param refgene_bed: Reference gene model in BED format. + :param min_coverage: Minimum coverage to calculate TIN. + :param sample_size: Number of genes to sample for summary statistics. + """ + input_path = Path(input_file) + bed_path = Path(refgene_bed) + if not input_path.exists() or not bed_path.exists(): + return {"error": "Input BAM or BED file not found."} + + cmd = ["tin.py", "-i", str(input_path), "-r", str(bed_path), "-c", str(min_coverage), "-n", str(sample_size)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob("*.tin.xls")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_sc_bam_stat( + input_file: str, + mapq: int = 30, +): + """ + QC scRNA-seq data: Summarizing mapping statistics. + + :param input_file: Alignment file in BAM format. + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_file) + if not input_path.exists(): + return {"error": f"Input file {input_file} not found."} + + cmd = ["sc_bamStat.py", "-i", str(input_path), "-q", str(mapq)] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_mismatch_profile( + input_bam: str, + read_align_length: int, + out_prefix: str, + read_num: int = 1000000, + mapq: int = 30, +): + """ + Calculate the distributions of mismatches across reads. + + :param input_bam: Input BAM file. + :param read_align_length: Alignment length of read. + :param out_prefix: Prefix of output files(s). + :param read_num: Number of aligned reads used. + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_bam) + if not input_path.exists(): + return {"error": f"Input BAM {input_bam} not found."} + + cmd = [ + "mismatch_profile.py", + "-i", str(input_path), + "-l", str(read_align_length), + "-o", out_prefix, + "-n", str(read_num), + "-q", str(mapq) + ] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.mismatch_profile.*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} + +@mcp.tool() +def rseqc_insertion_profile( + input_bam: str, + read_align_length: int, + out_prefix: str, + read_num: int = 1000000, + mapq: int = 30, +): + """ + Calculate the distributions of insertions across reads. + + :param input_bam: Input BAM file. + :param read_align_length: Alignment length of read. + :param out_prefix: Prefix of output files(s). + :param read_num: Number of aligned reads used. + :param mapq: Minimum mapping quality. + """ + input_path = Path(input_bam) + if not input_path.exists(): + return {"error": f"Input BAM {input_bam} not found."} + + cmd = [ + "insertion_profile.py", + "-i", str(input_path), + "-l", str(read_align_length), + "-o", out_prefix, + "-n", str(read_num), + "-q", str(mapq) + ] + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": list(Path().glob(f"{out_prefix}.insertion_profile.*")) + } + except subprocess.CalledProcessError as e: + return {"error": str(e), "stderr": e.stderr} \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..3177a554622eb7038226870217251f35b2fc7656 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/app/rseqc_server.py') +SERVER_NAME = 'biosci_rseqc' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..e430e4a1f2c736e1cefdcaab60ef4d628a6962e0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-rseqc: + build: . + image: mcp-rseqc:latest + container_name: mcp-rseqc + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=rseqc + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..968c27ee2d0b3dbd3d35cef261748043b0a7634d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - rseqc + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_rseqc/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c3466c3e1924a54976d282de13c5f020d8406c5b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install samtools via conda (e.g., from bioconda) +RUN conda install -c bioconda samtools -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/samtools_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/samtools_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/samtools_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_server.py new file mode 100644 index 0000000000000000000000000000000000000000..0df92f47d8a2399b96d72f3941f8bf23a5718091 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_server.py @@ -0,0 +1,938 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Union + +# This is a placeholder for the MCP decorator. +# In a real MCP environment, this would be provided by the MCP framework. +def tool(func): + def wrapper(*args, **kwargs): + return func(*args, **kwargs) + return wrapper + +mcp = type("mcp", (), {"tool": tool}) + + +@mcp.tool() +def samtools_view( + in_path: Path, + region: Optional[str] = None, + output_path: Optional[Path] = None, + output_format: Optional[str] = None, + output_format_option: Optional[List[str]] = None, + threads: int = 1, + uncompressed: bool = False, + header: bool = False, + header_only: bool = False, + count: bool = False, + min_mapq: int = 0, + library: Optional[str] = None, + read_group: Optional[str] = None, + read_group_file: Optional[Path] = None, + subsample: Optional[float] = None, + subsample_seed: int = 0, + bed_file: Optional[Path] = None, + tag_list_file: Optional[Path] = None, + reference: Optional[Path] = None, + input_format: Optional[str] = None, + input_format_option: Optional[List[str]] = None, + cram_ignore_md5: bool = False, + require_flags: Optional[Union[int, str]] = None, + exclude_flags: Optional[Union[int, str]] = None, + custom_tag: Optional[str] = None, + no_pg: bool = False, + long_qnames: bool = False, + fast_bam_compression: bool = False, + remove_header: bool = False, + verbosity: int = 3, +) -> dict: + """ + Views and converts SAM/BAM/CRAM files. + + Args: + in_path: Input alignment file. Use "-" for stdin. + region: Optional region to view, e.g., 'chr1:100-200'. + output_path: Output file path. If not specified, output is to stdout. + output_format: Output format (sam, bam, cram). + output_format_option: List of key=value options for output format. + threads: Number of processing threads. + uncompressed: Output uncompressed BAM. This option is preferred over -b -u. + header: Include the header in the output. + header_only: Output the header only. + count: Print only the count of matching records. + min_mapq: Skip alignments with MAPQ smaller than this value. + library: Only output alignments in specified library. + read_group: Only output alignments in specified read group. + read_group_file: Only output alignments with read groups listed in this file. + subsample: Subsample reads. e.g., 0.8 for 80% of reads. + subsample_seed: Subsampling seed. + bed_file: Output only alignments overlapping the BED file. + tag_list_file: Output only alignments with tags listed in this file. + reference: Reference sequence file for CRAM I/O. + input_format: Input format (sam, bam, cram). + input_format_option: List of key=value options for input format. + cram_ignore_md5: Ignore MD5 checksums on CRAM input. + require_flags: Required flags (integer or string). + exclude_flags: Filtering flags (integer or string). + custom_tag: Output a custom tag, e.g., 'X0:i:10'. + no_pg: Do not add a @PG line to the header. + long_qnames: Use long qnames for CRAM output. + fast_bam_compression: Use fast BAM compression (level 1). + remove_header: Remove header from output. + verbosity: Set verbosity level. + """ + if not in_path.exists() and str(in_path) != "-": + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "view"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if output_format: + cmd.extend(["-O", output_format]) + if output_format_option: + cmd.extend(["--output-fmt-option", ",".join(output_format_option)]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + if uncompressed: + cmd.append("-u") + if header: + cmd.append("-h") + if header_only: + cmd.append("-H") + if count: + cmd.append("-c") + if min_mapq > 0: + cmd.extend(["-q", str(min_mapq)]) + if library: + cmd.extend(["-l", library]) + if read_group: + cmd.extend(["-r", read_group]) + if read_group_file: + cmd.extend(["-R", str(read_group_file)]) + if subsample: + cmd.extend(["-s", str(subsample)]) + if subsample_seed != 0: + cmd.extend(["--subsample-seed", str(subsample_seed)]) + if bed_file: + cmd.extend(["-L", str(bed_file)]) + if tag_list_file: + cmd.extend(["-d", str(tag_list_file)]) + if reference: + cmd.extend(["-T", str(reference)]) + if input_format: + cmd.extend(["-I", input_format]) + if input_format_option: + cmd.extend(["--input-fmt-option", ",".join(input_format_option)]) + if cram_ignore_md5: + cmd.append("--cram-ignore-md5") + if require_flags is not None: + cmd.extend(["-f", str(require_flags)]) + if exclude_flags is not None: + cmd.extend(["-F", str(exclude_flags)]) + if custom_tag: + cmd.extend(["-x", custom_tag]) + if no_pg: + cmd.append("--no-pg") + if long_qnames: + cmd.append("--long-qnames") + if fast_bam_compression: + cmd.append("-1") + if remove_header: + cmd.append("--remove-header") + if verbosity != 3: + cmd.extend(["--verbosity", str(verbosity)]) + + cmd.append(str(in_path)) + if region: + cmd.append(region) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools view failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_sort( + in_path: Path, + output_path: Optional[Path] = None, + threads: int = 1, + memory_per_thread: str = "768M", + name_sort: bool = False, + tag_sort: Optional[str] = None, + prefix: Optional[Path] = None, + compression_level: int = 1, + output_format: Optional[str] = None, + no_pg: bool = False, +) -> dict: + """ + Sorts a SAM/BAM/CRAM file. + + Args: + in_path: Input alignment file. Use "-" for stdin. + output_path: Output file path. If not specified, output is to stdout. + threads: Number of sorting and compression threads. + memory_per_thread: Memory per thread (e.g., 2G, 768M). + name_sort: Sort by read name. + tag_sort: Sort by tag value (e.g., RG). + prefix: Use a specified path for temporary files. + compression_level: Compression level (0-9) for BAM output. + output_format: Output format (sam, bam, cram). + no_pg: Do not add a @PG line to the header. + """ + if not in_path.exists() and str(in_path) != "-": + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "sort"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + if memory_per_thread != "768M": + cmd.extend(["-m", memory_per_thread]) + if name_sort: + cmd.append("-n") + if tag_sort: + cmd.extend(["-t", tag_sort]) + if prefix: + cmd.extend(["-T", str(prefix)]) + if compression_level != 1: + cmd.extend(["-l", str(compression_level)]) + if output_format: + cmd.extend(["-O", output_format]) + if no_pg: + cmd.append("--no-pg") + + cmd.append(str(in_path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools sort failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_index( + in_path: Path, + output_path: Optional[Path] = None, + index_format: Optional[str] = None, + threads: int = 0, +) -> dict: + """ + Indexes a sorted alignment file for fast access. + + Args: + in_path: Sorted alignment file to be indexed. + output_path: Output index file path. Defaults to .bai or .csi. + index_format: Index format. 'bai' or 'csi'. + threads: Number of threads to use. 0 means use all available. + """ + if not in_path.exists(): + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "index"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if index_format: + if index_format.lower() == "csi": + cmd.append("-c") + elif index_format.lower() == "bai": + pass # BAI is default + else: + raise ValueError("index_format must be 'bai' or 'csi'") + if threads > 0: + cmd.extend(["-@", str(threads)]) + + cmd.append(str(in_path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + # Determine the output file name + if output_path: + final_output_path = output_path + else: + suffix = ".csi" if index_format and index_format.lower() == "csi" else ".bai" + final_output_path = in_path.with_suffix(in_path.suffix + suffix) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(final_output_path)], + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools index failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_faidx( + in_fasta: Path, + output_file: Optional[Path] = None, + region_file: Optional[Path] = None, + continue_after_fail: bool = False, + fastq_format: bool = False, +) -> dict: + """ + Indexes or queries a FASTA file. + + Args: + in_fasta: FASTA file to index or query. + output_file: Write FASTA to file instead of stdout. + region_file: File of regions to extract. + continue_after_fail: Continue after failing to retrieve a region. + fastq_format: Retrieve sequences in FASTQ format. + """ + if not in_fasta.exists(): + raise FileNotFoundError(f"Input FASTA file not found: {in_fasta}") + + cmd = ["samtools", "faidx", str(in_fasta)] + + if output_file: + cmd.extend(["-o", str(output_file)]) + if region_file: + cmd.extend(["-r", str(region_file)]) + if continue_after_fail: + cmd.append("-c") + if fastq_format: + cmd.append("--fastq") + + try: + # If no regions are specified, it creates an index. Otherwise, it extracts sequences. + # The logic here assumes we are either creating an index or extracting, not both in one call. + # The command structure for faidx is `samtools faidx [region1 [...]]` + # For simplicity, this function focuses on index creation. To extract regions, + # you would append them to the command list. + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + + output_files = [] + if output_file: + output_files.append(str(output_file)) + # If no regions are given, an index file is created + elif not region_file: + output_files.append(str(in_fasta) + ".fai") + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools faidx failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_mpileup( + in_bams: List[Path], + output_path: Optional[Path] = None, + reference: Optional[Path] = None, + region: Optional[str] = None, + region_file: Optional[Path] = None, + min_base_quality: int = 13, + min_map_quality: int = 0, + count_orphans: bool = False, + no_baq: bool = False, + adjust_mq: int = 0, + max_depth: int = 8000, + output_bcf: bool = False, + output_vcf: bool = False, + uncompressed: bool = False, + gvcf: Optional[str] = None, + threads: int = 1, +) -> dict: + """ + Generates pileup format from alignment files. + + Args: + in_bams: List of input BAM/CRAM files. + output_path: Output file path. If not specified, output is to stdout. + reference: Reference sequence FASTA file. Required for CRAM and VCF/BCF output. + region: Region to process, e.g., 'chr1:100-200'. + region_file: File containing regions to process. + min_base_quality: Minimum base quality to consider. + min_map_quality: Minimum mapping quality for an alignment to be used. + count_orphans: Do not discard anomalous read pairs. + no_baq: Disable base alignment quality (BAQ) computation. + adjust_mq: Adjust mapping quality. + max_depth: Maximum per-file depth. + output_bcf: Output in BCF format. + output_vcf: Output in VCF format. + uncompressed: Output uncompressed BCF/VCF. + gvcf: Produce gVCF output by calling variants in blocks of size INT. + threads: Number of extra threads to use. + """ + for p in in_bams: + if not p.exists(): + raise FileNotFoundError(f"Input file not found: {p}") + + cmd = ["samtools", "mpileup"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if reference: + cmd.extend(["-f", str(reference)]) + if region: + cmd.extend(["-r", region]) + if region_file: + cmd.extend(["-l", str(region_file)]) + if min_base_quality != 13: + cmd.extend(["-q", str(min_base_quality)]) + if min_map_quality != 0: + cmd.extend(["-Q", str(min_map_quality)]) + if count_orphans: + cmd.append("-A") + if no_baq: + cmd.append("-B") + if adjust_mq != 0: + cmd.extend(["-C", str(adjust_mq)]) + if max_depth != 8000: + cmd.extend(["-d", str(max_depth)]) + if output_bcf: + cmd.append("-g") + if output_vcf: + cmd.append("-v") + if uncompressed: + cmd.append("-u") + if gvcf: + cmd.extend(["--gvcf", gvcf]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + + cmd.extend([str(p) for p in in_bams]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools mpileup failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_flagstat( + in_path: Path, + output_path: Optional[Path] = None, + threads: int = 1, +) -> dict: + """ + Generates simple statistics on a SAM/BAM/CRAM file. + + Args: + in_path: Input alignment file. + output_path: Output file path for the statistics. If not set, prints to stdout. + threads: Number of threads to use. + """ + if not in_path.exists(): + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "flagstat"] + + if output_path: + cmd.extend(["-O", "file", "--output-fmt-option", f"file={output_path}"]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + + cmd.append(str(in_path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools flagstat failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_stats( + in_path: Path, + output_path: Optional[Path] = None, + reference: Optional[Path] = None, + threads: int = 1, + target_regions: Optional[Path] = None, + coverage_min: int = 1, + coverage_max: int = 1000, + coverage_step: int = 1, +) -> dict: + """ + Collects comprehensive statistics from alignment files. + + Args: + in_path: Input alignment file. + output_path: Output file path for statistics. If not set, prints to stdout. + reference: Reference sequence file. + threads: Number of threads to use. + target_regions: File of target regions. + coverage_min: Minimum coverage for coverage distribution. + coverage_max: Maximum coverage for coverage distribution. + coverage_step: Step size for coverage distribution. + """ + if not in_path.exists(): + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "stats"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if reference: + cmd.extend(["-r", str(reference)]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + if target_regions: + cmd.extend(["-t", str(target_regions)]) + if coverage_min != 1 or coverage_max != 1000 or coverage_step != 1: + cmd.extend(["-c", f"{coverage_min},{coverage_max},{coverage_step}"]) + + cmd.append(str(in_path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools stats failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_merge( + in_paths: List[Path], + output_path: Path, + threads: int = 1, + region: Optional[str] = None, + uncompressed: bool = False, + compress_level: int = 1, + no_pg: bool = False, + combine_rg: bool = False, + combine_pg: bool = False, + headers_file: Optional[Path] = None, + reference: Optional[Path] = None, +) -> dict: + """ + Merges multiple sorted alignment files. + + Args: + in_paths: List of input sorted alignment files. + output_path: Output alignment file. + threads: Number of threads. + region: Region to merge. + uncompressed: Output uncompressed BAM. + compress_level: Compression level for BAM output. + no_pg: Do not add a @PG line to the header. + combine_rg: Combine @RG headers with the same ID. + combine_pg: Combine @PG headers with the same ID. + headers_file: Use headers from this file. + reference: Reference sequence file. + """ + for p in in_paths: + if not p.exists(): + raise FileNotFoundError(f"Input file not found: {p}") + if len(in_paths) < 1: + raise ValueError("At least one input file must be provided.") + + cmd = ["samtools", "merge"] + + if threads > 1: + cmd.extend(["-@", str(threads)]) + if region: + cmd.extend(["-r", region]) + if uncompressed: + cmd.append("-u") + if compress_level != 1: + cmd.extend(["-l", str(compress_level)]) + if no_pg: + cmd.append("--no-pg") + if combine_rg: + cmd.append("-c") + if combine_pg: + cmd.append("-p") + if headers_file: + cmd.extend(["-h", str(headers_file)]) + if reference: + cmd.extend(["-t", str(reference)]) + + cmd.append(str(output_path)) + cmd.extend([str(p) for p in in_paths]) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_path)], + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools merge failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_markdup( + in_path: Path, + output_path: Path, + remove_duplicates: bool = False, + stats_file: Optional[Path] = None, + threads: int = 1, + mode: Optional[str] = None, + include_fails: bool = False, + tagging_policy: Optional[str] = None, + clear_dups: bool = False, +) -> dict: + """ + Marks duplicate alignments in a sorted file. + + Args: + in_path: Input sorted and name-collated alignment file. + output_path: Output alignment file with duplicates marked. + remove_duplicates: Remove duplicate reads instead of just marking them. + stats_file: Write duplicate statistics to this file. + threads: Number of threads. + mode: Optical duplicate detection mode ('t' for template, 's' for subject). + include_fails: Include QC-failed reads. + tagging_policy: Policy for setting tags on duplicates ('all', 'primary-only'). + clear_dups: Clear existing duplicate flags before running. + """ + if not in_path.exists(): + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "markdup"] + + if remove_duplicates: + cmd.append("-r") + if stats_file: + cmd.extend(["-s", str(stats_file)]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + if mode: + cmd.extend(["-m", mode]) + if include_fails: + cmd.append("-f") + if tagging_policy: + cmd.extend(["-T", tagging_policy]) + if clear_dups: + cmd.append("-c") + + cmd.append(str(in_path)) + cmd.append(str(output_path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] + if stats_file: + output_files.append(str(stats_file)) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools markdup failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_depth( + in_path: Path, + output_path: Optional[Path] = None, + all_positions: bool = False, + bed_file: Optional[Path] = None, + min_map_quality: int = 0, + min_base_quality: int = 0, + region: Optional[str] = None, +) -> dict: + """ + Computes the depth at each position or region. + + Args: + in_path: Input alignment file. + output_path: Output file for depth information. Defaults to stdout. + all_positions: Output depth at all positions, including zero-coverage sites. + bed_file: Calculate depth in specified BED regions. + min_map_quality: Minimum mapping quality for a read to be counted. + min_base_quality: Minimum base quality for a base to be counted. + region: Region to compute depth for. + """ + if not in_path.exists(): + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "depth"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if all_positions: + cmd.append("-a") + if bed_file: + cmd.extend(["-b", str(bed_file)]) + if min_map_quality > 0: + cmd.extend(["-q", str(min_map_quality)]) + if min_base_quality > 0: + cmd.extend(["-Q", str(min_base_quality)]) + + cmd.append(str(in_path)) + + if region: + cmd.append(region) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools depth failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_reheader( + in_header: Path, + in_bam: Path, + output_path: Optional[Path] = None, + no_pg: bool = False, + threads: int = 1, +) -> dict: + """ + Replaces the header in a BAM/SAM/CRAM file. + + Args: + in_header: New header file (SAM format). + in_bam: Input BAM/SAM/CRAM file whose header is to be replaced. + output_path: Output file. If not provided, output is to stdout. + no_pg: Do not add a @PG line to the header. + threads: Number of threads. + """ + if not in_header.exists(): + raise FileNotFoundError(f"Header file not found: {in_header}") + if not in_bam.exists(): + raise FileNotFoundError(f"Input BAM file not found: {in_bam}") + + cmd = ["samtools", "reheader"] + + if output_path: + cmd.extend(["-o", str(output_path)]) + if no_pg: + cmd.append("-P") + if threads > 1: + cmd.extend(["-@", str(threads)]) + + cmd.append(str(in_header)) + cmd.append(str(in_bam)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [str(output_path)] if output_path else [] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools reheader failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e + + +@mcp.tool() +def samtools_fastq( + in_path: Path, + output_path_1: Optional[Path] = None, + output_path_2: Optional[Path] = None, + output_single_end: Optional[Path] = None, + threads: int = 1, + include_flags: Optional[Union[int, str]] = None, + exclude_flags: Optional[Union[int, str]] = None, + copy_tags: Optional[str] = None, +) -> dict: + """ + Converts a BAM/CRAM file to FASTQ format. + + Args: + in_path: Input alignment file. + output_path_1: Output file for first reads in a pair. + output_path_2: Output file for second reads in a pair. + output_single_end: Output file for single-end or unpaired reads. + threads: Number of threads. + include_flags: Required flags for reads to be included. + exclude_flags: Flags for reads to be excluded. + copy_tags: Comma-separated list of tags to copy to the FASTQ header. + """ + if not in_path.exists(): + raise FileNotFoundError(f"Input file not found: {in_path}") + + cmd = ["samtools", "fastq"] + + if output_path_1: + cmd.extend(["-1", str(output_path_1)]) + if output_path_2: + cmd.extend(["-2", str(output_path_2)]) + if output_single_end: + cmd.extend(["-s", str(output_single_end)]) + if threads > 1: + cmd.extend(["-@", str(threads)]) + if include_flags is not None: + cmd.extend(["-f", str(include_flags)]) + if exclude_flags is not None: + cmd.extend(["-F", str(exclude_flags)]) + if copy_tags: + cmd.extend(["-T", copy_tags]) + + cmd.append(str(in_path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + ) + output_files = [] + if output_path_1: + output_files.append(str(output_path_1)) + if output_path_2: + output_files.append(str(output_path_2)) + if output_single_end: + output_files.append(str(output_single_end)) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + raise RuntimeError( + f"samtools fastq failed with exit code {e.returncode}\n" + f"Stderr: {e.stderr}\n" + f"Stdout: {e.stdout}" + ) from e \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..e951ddb5769e8d24cf427b213221fd660dd99461 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/app/samtools_server.py') +SERVER_NAME = 'biosci_samtools' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f9f04a0472441a8d98331fc909defa24d3a7bb82 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-samtools: + build: . + image: mcp-samtools:latest + container_name: mcp-samtools + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=samtools + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..863d9f9be5842148dc7d8b005e221928749232c5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - samtools + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_samtools/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e897e014239181ef3fe77a8eca5d9ee99e5f9d39 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install scib via conda (e.g., from bioconda) +RUN conda install -c bioconda scib -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY scib_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/scib_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/scib_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9834b68142e2dbbd11ef80945753ead41f612f53 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_server.py @@ -0,0 +1,281 @@ +import subprocess +import tempfile +import textwrap +from pathlib import Path +from typing import List, Literal, Optional + +# NOTE: @mcp.tool decorator is not imported but is assumed to be present +# in the execution environment, as per the instructions. + +SUPPORTED_METHODS = [ + "scanorama", "harmony", "combat", "scvi", "trvae", "scgen", + "bbknn", "mnn", "desc", "saucie" +] + +Organism = Literal["human", "mouse"] +HvgFlavor = Literal["seurat", "cell_ranger", "seurat_v3"] +Method = Literal[ + "scanorama", "harmony", "combat", "scvi", "trvae", "scgen", + "bbknn", "mnn", "desc", "saucie" +] + +@mcp.tool() +def run_scib_benchmark( + adata_path: Path, + method: Method, + batch_key: str, + label_key: str, + organism: Organism, + hvg_flavor: HvgFlavor = "seurat_v3", + n_top_genes: int = 2000, + run_silhouette: bool = True, + run_hvg_score: bool = True, + run_graph_connectivity: bool = True, + run_pcr: bool = True, + run_cell_cycle: bool = True, + run_isolated_labels_f1: bool = True, + run_isolated_labels_asw: bool = True, + run_clisi: bool = True, + run_ilisi: bool = True, + run_kbet: bool = True, + output_adata_filename: str = "integrated_adata.h5ad", + output_metrics_filename: str = "scib_metrics.csv", +) -> dict: + """ + Runs a full scib benchmarking workflow on a single-cell dataset. + + This tool performs preprocessing, applies a specified integration method, + and computes a comprehensive set of benchmarking metrics to evaluate the + integration quality. It wraps the functionality of the `scib` Python library. + + Args: + adata_path: Path to the input AnnData object file (.h5ad). + method: The integration method to use. + batch_key: The key in `adata.obs` that identifies the batch. + label_key: The key in `adata.obs` that identifies the cell type or label. + organism: The organism of the data ('human' or 'mouse'), required for some methods like scGen. + hvg_flavor: Flavor for identifying highly variable genes. + n_top_genes: Number of highly variable genes to select. + run_silhouette: Whether to compute silhouette score metrics (ASW). + run_hvg_score: Whether to compute the HVG conservation score. + run_graph_connectivity: Whether to compute the graph connectivity metric. + run_pcr: Whether to compute the principal component regression metric. + run_cell_cycle: Whether to compute the cell cycle conservation score. + run_isolated_labels_f1: Whether to compute the F1 score for isolated labels. + run_isolated_labels_asw: Whether to compute the ASW for isolated labels. + run_clisi: Whether to compute the cell-type LISI score on the graph. + run_ilisi: Whether to compute the batch LISI score on the graph. + run_kbet: Whether to compute the kBET metric. + output_adata_filename: Filename for the output integrated AnnData object. + output_metrics_filename: Filename for the output metrics CSV file. + + Returns: + A dictionary containing the command executed, stdout, stderr, and paths to output files. + """ + # --- Input Validation --- + if not adata_path.is_file(): + raise FileNotFoundError(f"Input file not found: {adata_path}") + + if method not in SUPPORTED_METHODS: + raise ValueError(f"Unsupported method '{method}'. Must be one of {SUPPORTED_METHODS}") + + if n_top_genes <= 0: + raise ValueError("n_top_genes must be a positive integer.") + + runner_script = textwrap.dedent(f""" + import argparse + import sys + import warnings + import pandas as pd + import scanpy as sc + import scib + + # Suppress verbose warnings for cleaner output + warnings.filterwarnings('ignore', category=FutureWarning) + warnings.filterwarnings('ignore', category=UserWarning) + + def main(): + parser = argparse.ArgumentParser(description='scib runner script') + parser.add_argument('--adata_path', type=str, required=True) + parser.add_argument('--method', type=str, required=True) + parser.add_argument('--batch_key', type=str, required=True) + parser.add_argument('--label_key', type=str, required=True) + parser.add_argument('--organism', type=str, required=True) + parser.add_argument('--hvg_flavor', type=str, default='seurat_v3') + parser.add_argument('--n_top_genes', type=int, default=2000) + # Metric flags + parser.add_argument('--run_silhouette', action='store_true') + parser.add_argument('--run_hvg_score', action='store_true') + parser.add_argument('--run_graph_connectivity', action='store_true') + parser.add_argument('--run_pcr', action='store_true') + parser.add_argument('--run_cell_cycle', action='store_true') + parser.add_argument('--run_isolated_labels_f1', action='store_true') + parser.add_argument('--run_isolated_labels_asw', action='store_true') + parser.add_argument('--run_clisi', action='store_true') + parser.add_argument('--run_ilisi', action='store_true') + parser.add_argument('--run_kbet', action='store_true') + # Output paths + parser.add_argument('--output_adata_path', type=str, required=True) + parser.add_argument('--output_metrics_path', type=str, required=True) + + args = parser.parse_args() + + print(f"Loading data from {{args.adata_path}}...") + adata = sc.read(args.adata_path) + adata_pre = adata.copy() + + # --- 1. Preprocessing --- + print("Preprocessing data...") + sc.pp.normalize_total(adata_pre, target_sum=1e4) + sc.pp.log1p(adata_pre) + scib.pp.hvg_batch( + adata_pre, + batch_key=args.batch_key, + target_genes=args.n_top_genes, + flavor=args.hvg_flavor, + n_bins=20, + adataOut=True + ) + sc.pp.scale(adata_pre, max_value=10) + + # --- 2. Integration --- + print(f"Running integration with method: {{args.method}}...") + if args.method == 'scanorama': + adata_int = scib.ig.scanorama(adata_pre, batch=args.batch_key) + elif args.method == 'harmony': + adata_int = scib.ig.harmony(adata_pre, batch=args.batch_key) + elif args.method == 'combat': + adata_int = scib.ig.combat(adata_pre, batch=args.batch_key) + elif args.method == 'scvi': + adata_int = scib.ig.scvi(adata_pre, batch=args.batch_key) + elif args.method == 'trvae': + adata_int = scib.ig.trvae(adata_pre, batch=args.batch_key) + elif args.method == 'scgen': + adata_int = scib.ig.scgen(adata_pre, batch=args.batch_key, cell_type=args.label_key, organism=args.organism) + elif args.method == 'bbknn': + adata_int = scib.ig.bbknn(adata_pre, batch=args.batch_key) + elif args.method == 'mnn': + adata_int = scib.ig.mnn(adata_pre, batch=args.batch_key) + elif args.method == 'desc': + adata_int = scib.ig.desc(adata_pre, batch=args.batch_key, cell_type=args.label_key) + elif args.method == 'saucie': + adata_int = scib.ig.saucie(adata_pre, batch=args.batch_key, cell_type=args.label_key) + else: + raise NotImplementedError(f"Method {{args.method}} not implemented in runner.") + + # --- 3. Post-integration processing for metrics --- + print("Post-processing integrated data...") + # Some methods don't compute a PCA, so we do it if needed + if 'X_pca' not in adata_int.obsm: + sc.pp.pca(adata_int) + + # Use the embedding generated by the method, default to 'X_emb' + embedding_key = 'X_emb' if 'X_emb' in adata_int.obsm else 'X_pca' + print(f"Using embedding '{{embedding_key}}' for nearest neighbor graph.") + sc.pp.neighbors(adata_int, use_rep=embedding_key) + sc.tl.umap(adata_int) + sc.tl.leiden(adata_int, key_added='leiden') + + # --- 4. Metrics --- + print("Calculating metrics...") + # The un-integrated, but preprocessed object is needed for some metrics + adata_unintegrated = adata_pre.copy() + sc.pp.pca(adata_unintegrated) + sc.pp.neighbors(adata_unintegrated) + sc.tl.leiden(adata_unintegrated, key_added='leiden') + + results_df = scib.me.metrics( + adata_unintegrated, + adata_int, + batch_key=args.batch_key, + label_key=args.label_key, + cluster_key='leiden', + embed=embedding_key, + organism=args.organism, + silhouette_=args.run_silhouette, + hvg_score_=args.run_hvg_score, + graph_conn_=args.run_graph_connectivity, + pcr_=args.run_pcr, + cell_cycle_=args.run_cell_cycle, + isolated_labels_f1_=args.run_isolated_labels_f1, + isolated_labels_asw_=args.run_isolated_labels_asw, + clisi_graph_=args.run_clisi, + ilisi_graph_=args.run_ilisi, + kbet_=args.run_kbet, + nmi_=True, # Always compute NMI/ARI as they are standard + ari_=True, + ) + + # --- 5. Save outputs --- + print(f"Saving integrated AnnData to {{args.output_adata_path}}...") + adata_int.write(args.output_adata_path) + + print(f"Saving metrics to {{args.output_metrics_path}}...") + results_df.to_csv(args.output_metrics_path) + + print("scib benchmark finished successfully.") + + if __name__ == '__main__': + main() + """) + + with tempfile.TemporaryDirectory() as temp_dir: + temp_dir_path = Path(temp_dir) + script_path = temp_dir_path / "run_scib.py" + with open(script_path, "w") as f: + f.write(runner_script) + + output_adata_path = temp_dir_path / output_adata_filename + output_metrics_path = temp_dir_path / output_metrics_filename + + cmd = [ + "python", str(script_path), + "--adata_path", str(adata_path.resolve()), + "--method", method, + "--batch_key", batch_key, + "--label_key", label_key, + "--organism", organism, + "--hvg_flavor", hvg_flavor, + "--n_top_genes", str(n_top_genes), + "--output_adata_path", str(output_adata_path), + "--output_metrics_path", str(output_metrics_path), + ] + + # Add boolean flags if they are True + if run_silhouette: cmd.append("--run_silhouette") + if run_hvg_score: cmd.append("--run_hvg_score") + if run_graph_connectivity: cmd.append("--run_graph_connectivity") + if run_pcr: cmd.append("--run_pcr") + if run_cell_cycle: cmd.append("--run_cell_cycle") + if run_isolated_labels_f1: cmd.append("--run_isolated_labels_f1") + if run_isolated_labels_asw: cmd.append("--run_isolated_labels_asw") + if run_clisi: cmd.append("--run_clisi") + if run_ilisi: cmd.append("--run_ilisi") + if run_kbet: cmd.append("--run_kbet") + + try: + process = subprocess.run( + cmd, + capture_output=True, + text=True, + check=True, + cwd=temp_dir_path + ) + + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": { + "integrated_adata": str(output_adata_path), + "metrics_csv": str(output_metrics_path) + } + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"scib execution failed with return code {e.returncode}", + "output_files": {} + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..5bbfac460ce5e2f3e72691e9372a8851d25dfccb --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/app/scib_server.py') +SERVER_NAME = 'biosci_scib' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..3d4538e6a2e4aebc0ca576e970cdc9e112f9641d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-scib: + build: . + image: mcp-scib:latest + container_name: mcp-scib + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=scib + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..db8e688a701767952aec43d8aa9cbf13131a88f5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - scib + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_scib/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..39b79be57e49f5946d1ea9f415b04c331a44314c --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install sdeper via conda (e.g., from bioconda) +RUN conda install -c bioconda sdeper -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/sdeper_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/sdeper_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/sdeper_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9425bbac635d524d986d35c546278908878625e7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_server.py @@ -0,0 +1,206 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def run_deconvolution( + spatial_file: str, + ref_file: str, + anno_file: str, + adj_file: Optional[str] = None, + output_dir: str = "./sdeper_results", + n_marker: int = 15, + n_hvgs: int = 2000, + use_all_genes: bool = False, + platform_effect: bool = True, + spatial_loss: bool = True, + sparsity: bool = True, + batch_size: int = 500, + learning_rate: float = 0.001, + epochs: int = 400, + seed: int = 42 +) -> Dict[str, Any]: + """ + Perform cell type deconvolution of spatial transcriptomics data using SDePER. + + SDePER (Spatial Deconvolution method with Platform Effect Removal) deconvolves + spatial barcoding-based transcriptomic data using reference scRNA-seq data. + + Args: + spatial_file: Path to raw nUMI counts of spatial transcriptomics data (spots x genes, CSV). + ref_file: Path to raw nUMI counts of reference scRNA-seq data (cells x genes, CSV). + anno_file: Path to cell type annotations for all cells in scRNA-seq data (cells x 1, CSV). + adj_file: Optional path to adjacency matrix of spots (spots x spots, CSV). + output_dir: Directory to save output files. + n_marker: Number of marker genes for each cell type. + n_hvgs: Number of highly variable genes to use. + use_all_genes: Whether to use all genes for deconvolution instead of markers/HVGs. + platform_effect: Whether to remove platform effects between scRNA-seq and spatial data. + spatial_loss: Whether to consider across-spots spatial correlation. + sparsity: Whether to consider sparsity of cell types per capture spot. + batch_size: Batch size for the CVAE model training. + learning_rate: Learning rate for the CVAE model training. + epochs: Number of epochs for the CVAE model training. + seed: Random seed for reproducibility. + """ + # Input validation + spatial_path = Path(spatial_file) + ref_path = Path(ref_file) + anno_path = Path(anno_file) + + if not spatial_path.exists(): + return {"error": f"Spatial file not found: {spatial_file}"} + if not ref_path.exists(): + return {"error": f"Reference scRNA-seq file not found: {ref_file}"} + if not anno_path.exists(): + return {"error": f"Annotation file not found: {anno_file}"} + + # Create output directory + out_path = Path(output_dir) + out_path.mkdir(parents=True, exist_ok=True) + + # Build command + cmd = [ + "runDeconvolution", + "-q", str(spatial_path), + "-r", str(ref_path), + "-c", str(anno_path), + "-o", str(out_path), + "-n", str(n_marker), + "-m", str(n_hvgs), + "--batch_size", str(batch_size), + "--learning_rate", str(learning_rate), + "--epochs", str(epochs), + "--seed", str(seed) + ] + + if adj_file: + adj_path = Path(adj_file) + if adj_path.exists(): + cmd.extend(["-a", str(adj_path)]) + else: + return {"error": f"Adjacency file not found: {adj_file}"} + + if use_all_genes: + cmd.append("--use_all_genes") + + # SDePER uses flags to DISABLE these if they are False, as they are True by default + if not platform_effect: + cmd.append("--no_platform") + if not spatial_loss: + cmd.append("--no_spatial") + if not sparsity: + cmd.append("--no_sparsity") + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + + # Identify expected output files + output_files = [str(f) for f in out_path.glob("*") if f.is_file()] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + +@mcp.tool() +def run_imputation( + spatial_file: str, + ref_file: str, + anno_file: str, + deconv_file: str, + adj_file: Optional[str] = None, + output_dir: str = "./sdeper_imputation", + n_marker: int = 15, + n_hvgs: int = 2000, + seed: int = 42 +) -> Dict[str, Any]: + """ + Perform cell type composition and gene expression imputation at unmeasured locations. + + This tool uses the results from a previous deconvolution run to enhance resolution + and impute values for missing or unmeasured spots in the tissue map. + + Args: + spatial_file: Path to raw nUMI counts of spatial transcriptomics data (CSV). + ref_file: Path to raw nUMI counts of reference scRNA-seq data (CSV). + anno_file: Path to cell type annotations for scRNA-seq data (CSV). + deconv_file: Path to the cell type proportion file generated by runDeconvolution (CSV). + adj_file: Optional path to adjacency matrix of spots (CSV). + output_dir: Directory to save imputation results. + n_marker: Number of marker genes (should match deconvolution settings). + n_hvgs: Number of highly variable genes (should match deconvolution settings). + seed: Random seed for reproducibility. + """ + # Input validation + spatial_path = Path(spatial_file) + ref_path = Path(ref_file) + anno_path = Path(anno_file) + deconv_path = Path(deconv_file) + + paths_to_check = { + "Spatial": spatial_path, + "Reference": ref_path, + "Annotation": anno_path, + "Deconvolution result": deconv_path + } + + for name, path in paths_to_check.items(): + if not path.exists(): + return {"error": f"{name} file not found: {path}"} + + # Create output directory + out_path = Path(output_dir) + out_path.mkdir(parents=True, exist_ok=True) + + # Build command + cmd = [ + "runImputation", + "-q", str(spatial_path), + "-r", str(ref_path), + "-c", str(anno_path), + "-d", str(deconv_path), + "-o", str(out_path), + "-n", str(n_marker), + "-m", str(n_hvgs), + "--seed", str(seed) + ] + + if adj_file: + adj_path = Path(adj_file) + if adj_path.exists(): + cmd.extend(["-a", str(adj_path)]) + else: + return {"error": f"Adjacency file not found: {adj_file}"} + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + + output_files = [str(f) for f in out_path.glob("*") if f.is_file()] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..00189dbf57a5236651c14fb5ed5c69e4fbeff246 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/app/sdeper_server.py') +SERVER_NAME = 'biosci_sdeper' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..cbc2bb8dc71bbe0481aa5ac6b826b311a571adab --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sdeper/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-sdeper: + build: . + image: mcp-sdeper:latest + container_name: mcp-sdeper + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=sdeper + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_server.py new file mode 100644 index 0000000000000000000000000000000000000000..ec626fa6caecc94f4e58df473cae7d51940c8e91 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_server.py @@ -0,0 +1,685 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union +import tempfile + +def _run_seqkit(args: List[str]): + """Helper function to execute seqkit commands and handle errors.""" + try: + result = subprocess.run( + ["seqkit"] + args, + capture_output=True, + text=True, + check=True + ) + return { + "command_executed": f"seqkit {' '.join(args)}", + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": f"seqkit {' '.join(args)}", + "stdout": e.stdout, + "stderr": e.stderr, + "status": "error", + "error_message": str(e) + } + +def _validate_files(files: List[str]): + """Validates that input files exist.""" + for f in files: + if not Path(f).exists(): + raise FileNotFoundError(f"Input file not found: {f}") + +@mcp.tool() +def seqkit_stats( + input_files: List[str], + all_stats: bool = False, + tabular: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Simple statistics of FASTA/Q files. + + :param input_files: List of FASTA/Q files to analyze. + :param all_stats: Show all statistics including quartiles and N50. + :param tabular: Output in machine-friendly tabular format. + :param threads: Number of CPUs to use. + :param out_file: Output file path. + """ + _validate_files(input_files) + args = ["stats"] + if all_stats: args.append("-a") + if tabular: args.append("-T") + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_seq( + input_files: List[str], + name: bool = False, + seq: bool = False, + reverse: bool = False, + complement: bool = False, + min_len: int = -1, + max_len: int = -1, + remove_gaps: bool = False, + lower_case: bool = False, + upper_case: bool = False, + dna2rna: bool = False, + rna2dna: bool = False, + validate_seq: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Transform sequences (extract ID, filter by length, remove gaps, reverse complement...). + + :param input_files: List of FASTA/Q files. + :param name: Only print names. + :param seq: Only print sequences. + :param reverse: Reverse sequence. + :param complement: Complement sequence. + :param min_len: Minimum sequence length to keep (-1 to disable). + :param max_len: Maximum sequence length to keep (-1 to disable). + :param remove_gaps: Remove gaps. + :param lower_case: Print sequences in lower case. + :param upper_case: Print sequences in upper case. + :param dna2rna: DNA to RNA. + :param rna2dna: RNA to DNA. + :param validate_seq: Validate sequences. + """ + _validate_files(input_files) + args = ["seq"] + if name: args.append("-n") + if seq: args.append("-s") + if reverse: args.append("-r") + if complement: args.append("-p") + if min_len >= 0: args.extend(["-m", str(min_len)]) + if max_len >= 0: args.extend(["-M", str(max_len)]) + if remove_gaps: args.append("-g") + if lower_case: args.append("-l") + if upper_case: args.append("-u") + if dna2rna: args.append("--dna2rna") + if rna2dna: args.append("--rna2dna") + if validate_seq: args.append("-v") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_grep( + input_files: List[str], + pattern: Optional[str] = None, + pattern_file: Optional[str] = None, + use_regexp: bool = False, + ignore_case: bool = False, + invert_match: bool = False, + by_name: bool = False, + by_seq: bool = False, + degenerate: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Search sequences by ID/name/sequence/sequence motifs. + + :param pattern: Search pattern (regular expression if use_regexp is True). + :param pattern_file: File containing patterns (one per line). + :param use_regexp: Use regular expression. + :param ignore_case: Ignore case. + :param invert_match: Invert match (grep -v). + :param by_name: Match by full name instead of just ID. + :param by_seq: Search in sequences instead of IDs. + :param degenerate: Pattern contains degenerate bases. + """ + _validate_files(input_files) + args = ["grep"] + if pattern: args.extend(["-p", pattern]) + if pattern_file: + if not Path(pattern_file).exists(): + raise FileNotFoundError(f"Pattern file not found: {pattern_file}") + args.extend(["-f", pattern_file]) + if use_regexp: args.append("-r") + if ignore_case: args.append("-i") + if invert_match: args.append("-v") + if by_name: args.append("-n") + if by_seq: args.append("-s") + if degenerate: args.append("-d") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_subseq( + input_files: List[str], + region: Optional[str] = None, + gtf: Optional[str] = None, + bed: Optional[str] = None, + feature: Optional[str] = None, + flank: int = 0, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Get subsequences by region/gtf/bed. + + :param region: Region (e.g. 1:10, -100:-1). + :param gtf: GTF file. + :param bed: BED file. + :param feature: Feature type in GTF to extract (e.g. CDS). + :param flank: Flanking sequence length. + """ + _validate_files(input_files) + args = ["subseq"] + if region: args.extend(["-r", region]) + if gtf: args.extend(["--gtf", gtf]) + if bed: args.extend(["--bed", bed]) + if feature: args.extend(["--feature", feature]) + if flank > 0: args.extend(["-f", str(flank)]) + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_fq2fa( + input_files: List[str], + threads: int = 4, + out_file: Optional[str] = None +): + """Convert FASTQ to FASTA.""" + _validate_files(input_files) + args = ["fq2fa"] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_fx2tab( + input_files: List[str], + length: bool = False, + gc: bool = False, + name: bool = False, + only_id: bool = False, + base_content: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Convert FASTA/Q to tabular format. + + :param length: Print sequence length. + :param gc: Print GC content. + :param name: Print full name instead of ID. + :param only_id: Only print ID. + :param base_content: Print base content (A, C, G, T, N). + """ + _validate_files(input_files) + args = ["fx2tab"] + if length: args.append("-l") + if gc: args.append("-g") + if name: args.append("-n") + if only_id: args.append("-i") + if base_content: args.append("-B") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_tab2fx( + input_files: List[str], + threads: int = 4, + out_file: Optional[str] = None +): + """Convert tabular format to FASTA/Q format.""" + _validate_files(input_files) + args = ["tab2fx"] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_translate( + input_files: List[str], + frame: int = 1, + table: int = 1, + trim: bool = False, + clean: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Translate DNA/RNA to protein sequence. + + :param frame: Frame(s) to translate (1, 2, 3, 4, 5, 6 or 0 for all 6 frames). + :param table: Genetic code table ID. + :param trim: Trim stop codon '*' at the end. + :param clean: Transform all non-AA characters to 'X'. + """ + _validate_files(input_files) + args = ["translate"] + args.extend(["-f", str(frame)]) + args.extend(["-l", str(table)]) + if trim: args.append("-T") + if clean: args.append("-c") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_rmdup( + input_files: List[str], + by_id: bool = False, + by_name: bool = False, + by_seq: bool = False, + ignore_case: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Remove duplicated sequences by ID/name/sequence. + + :param by_id: Remove by ID. + :param by_name: Remove by full name. + :param by_seq: Remove by sequence. + :param ignore_case: Ignore case. + """ + _validate_files(input_files) + args = ["rmdup"] + if by_id: args.append("-n") + if by_name: args.append("-N") + if by_seq: args.append("-s") + if ignore_case: args.append("-i") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_sample( + input_files: List[str], + number: int = -1, + proportion: float = -1.0, + seed: int = 11, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Sample sequences by number or proportion. + + :param number: Sample by number. + :param proportion: Sample by proportion (0-1). + :param seed: Random seed. + """ + _validate_files(input_files) + args = ["sample"] + if number > 0: args.extend(["-n", str(number)]) + if proportion > 0: args.extend(["-p", str(proportion)]) + args.extend(["-s", str(seed)]) + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_sort( + input_files: List[str], + by_id: bool = False, + by_name: bool = False, + by_seq: bool = False, + by_length: bool = False, + reverse: bool = False, + ignore_case: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Sort sequences by id/name/sequence/length. + + :param by_id: Sort by ID. + :param by_name: Sort by full name. + :param by_seq: Sort by sequence. + :param by_length: Sort by length. + :param reverse: Reverse order. + :param ignore_case: Ignore case. + """ + _validate_files(input_files) + args = ["sort"] + if by_id: args.append("-n") + if by_name: args.append("-N") + if by_seq: args.append("-s") + if by_length: args.append("-l") + if reverse: args.append("-r") + if ignore_case: args.append("-i") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_split2( + input_files: List[str], + size: int = -1, + parts: int = -1, + out_dir: str = "split_out", + threads: int = 4 +): + """ + Split sequences into files by size or parts (FASTA, PE/SE FASTQ). + + :param size: Split by number of records per file. + :param parts: Split into N parts. + :param out_dir: Output directory. + """ + _validate_files(input_files) + args = ["split2"] + if size > 0: args.extend(["-s", str(size)]) + if parts > 0: args.extend(["-p", str(parts)]) + args.extend(["-O", out_dir]) + + args.extend(["-j", str(threads)]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_locate( + input_files: List[str], + pattern: Optional[str] = None, + pattern_file: Optional[str] = None, + max_mismatch: int = 0, + ignore_case: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Locate subsequences/motifs, mismatch allowed. + + :param pattern: Search pattern. + :param pattern_file: File containing patterns. + :param max_mismatch: Max mismatch. + :param ignore_case: Ignore case. + """ + _validate_files(input_files) + args = ["locate"] + if pattern: args.extend(["-p", pattern]) + if pattern_file: args.extend(["-f", pattern_file]) + args.extend(["-m", str(max_mismatch)]) + if ignore_case: args.append("-i") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_replace( + input_files: List[str], + pattern: str, + replacement: str, + by_name: bool = False, + by_seq: bool = False, + ignore_case: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Replace name/sequence by regular expression. + + :param pattern: Regular expression pattern. + :param replacement: Replacement string (supports capture groups like $1). + :param by_name: Replace in full name. + :param by_seq: Replace in sequence. + :param ignore_case: Ignore case. + """ + _validate_files(input_files) + args = ["replace", "-p", pattern, "-r", replacement] + if by_name: args.append("-n") + if by_seq: args.append("-s") + if ignore_case: args.append("-i") + + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_faidx( + input_files: List[str], + subsequences: Optional[List[str]] = None, + bed: Optional[str] = None, + out_file: Optional[str] = None +): + """ + Create the FASTA index file and extract subsequences. + + :param input_files: FASTA files. + :param subsequences: List of sequence IDs or regions (e.g. "chr1:1-10"). + :param bed: BED file for extraction. + """ + _validate_files(input_files) + args = ["faidx"] + if bed: args.extend(["--bed", bed]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + if subsequences: args.extend(subsequences) + + return _run_seqkit(args) + +@mcp.tool() +def seqkit_sliding( + input_files: List[str], + step: int = 1, + window: int = 100, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Extract subsequences in sliding windows. + + :param step: Step size. + :param window: Window size. + """ + _validate_files(input_files) + args = ["sliding", "-s", str(step), "-W", str(window)] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_common( + input_files: List[str], + by_id: bool = True, + by_name: bool = False, + by_seq: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Find common/shared sequences of multiple files by id/name/sequence. + """ + _validate_files(input_files) + args = ["common"] + if by_id: args.append("-n") + if by_name: args.append("-N") + if by_seq: args.append("-s") + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_duplicate( + input_files: List[str], + times: int = 2, + threads: int = 4, + out_file: Optional[str] = None +): + """Duplicate sequences N times.""" + _validate_files(input_files) + args = ["duplicate", "-n", str(times)] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_head( + input_files: List[str], + number: int = 10, + threads: int = 4, + out_file: Optional[str] = None +): + """Print the first N FASTA/Q records.""" + _validate_files(input_files) + args = ["head", "-n", str(number)] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_pair( + input_file1: str, + input_file2: str, + out_dir: str = "paired_out", + threads: int = 4 +): + """Match up paired-end reads from two fastq files.""" + _validate_files([input_file1, input_file2]) + args = ["pair", "-1", input_file1, "-2", input_file2, "-O", out_dir] + args.extend(["-j", str(threads)]) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_mutate( + input_files: List[str], + point_mutation: Optional[str] = None, + insertion: Optional[str] = None, + deletion: Optional[str] = None, + threads: int = 4, + out_file: Optional[str] = None +): + """ + Edit sequence (point mutation, insertion, deletion). + Example point_mutation: "1:A" (position 1 to A). + """ + _validate_files(input_files) + args = ["mutate"] + if point_mutation: args.extend(["-p", point_mutation]) + if insertion: args.extend(["-i", insertion]) + if deletion: args.extend(["-d", deletion]) + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_sum( + input_files: List[str], + threads: int = 4 +): + """Compute message digest (MD5/SHA1/SHA256) for all sequences.""" + _validate_files(input_files) + args = ["sum"] + args.extend(["-j", str(threads)]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_bam( + input_files: List[str], + threads: int = 4 +): + """Monitoring and online histograms of BAM record features.""" + _validate_files(input_files) + args = ["bam"] + args.extend(["-j", str(threads)]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_sana( + input_files: List[str], + threads: int = 4, + out_file: Optional[str] = None +): + """Sanitize broken single line FASTQ files.""" + _validate_files(input_files) + args = ["sana"] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_shuffle( + input_files: List[str], + seed: int = 11, + threads: int = 4, + out_file: Optional[str] = None +): + """Shuffle sequences.""" + _validate_files(input_files) + args = ["shuffle", "-s", str(seed)] + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_convert( + input_files: List[str], + to_sanger: bool = False, + to_illumina: bool = False, + to_solexa: bool = False, + threads: int = 4, + out_file: Optional[str] = None +): + """Convert FASTQ quality encoding between Sanger, Solexa and Illumina.""" + _validate_files(input_files) + args = ["convert"] + if to_sanger: args.append("--to-sanger") + if to_illumina: args.append("--to-illumina") + if to_solexa: args.append("--to-solexa") + args.extend(["-j", str(threads)]) + if out_file: args.extend(["-o", out_file]) + args.extend(input_files) + return _run_seqkit(args) + +@mcp.tool() +def seqkit_version(): + """Print version information.""" + return _run_seqkit(["version"]) \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..228543cca66ec79adb4cc16b7754a46a65dd7338 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_seqkit/app/seqkit_server.py') +SERVER_NAME = 'biosci_seqkit' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f4e4b4a46547cee15060efbc75086b222635927d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install simo-omics via conda (e.g., from bioconda) +RUN conda install -c bioconda simo-omics -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/simo-omics_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/simo-omics_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/simo-omics_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_server.py new file mode 100644 index 0000000000000000000000000000000000000000..6fe2f64e60fb467ff3ebc68a74a97e28edb3efe9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_server.py @@ -0,0 +1,204 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# The mcp.tool decorator is assumed to be available in the environment. +# To make this code runnable, you would need to install the MCP framework. +# For demonstration, we assume a decorator `@mcp.tool()` exists. +class mcp: + def tool(func): + return func + +@mcp.tool +def run( + spatial_adata_path: Path, + scrna_adata_path: Path, + output_prefix: str, + n_top_genes: int = 3000, + n_pcs: int = 50, + n_neighbors: int = 30, + T: float = 0.01, + beta: float = 1.0, + beta2: float = 1.0, + lambda_g: float = 1.0, + lambda_d: float = 1.0, + lambda_ot: float = 1.0, + epochs: int = 500, + lr: float = 0.001, + w_pc: float = 1.0, + w_ge: float = 1.0, + w_da: float = 1.0, + w_ot: float = 1.0, +) -> dict: + """ + Integrates spatial and scRNA-seq datasets using the SIMO (Spatial Integration of Multi-Omics) library. + + SIMO is a computational method that performs spatial integration of multi-omics single-cell + datasets through probabilistic alignment. This tool wraps the simo-omics Python library. + + Args: + spatial_adata_path: Path to the input spatial AnnData file (.h5ad). + scrna_adata_path: Path to the input single-cell RNA-seq AnnData file (.h5ad). + output_prefix: Prefix for the output files. The main output will be named '{output_prefix}_integrated.h5ad'. + n_top_genes: Number of highly variable genes to use. + n_pcs: Number of principal components to compute. + n_neighbors: Number of neighbors to use for graph construction. + T: Temperature parameter for the model. + beta: Weight for graph regularization. + beta2: Weight for domain adversarial regularization. + lambda_g: Weight for gene expression reconstruction loss. + lambda_d: Weight for domain adversarial loss. + lambda_ot: Weight for optimal transport loss. + epochs: Number of training epochs. + lr: Learning rate for the optimizer. + w_pc: Weight for PC alignment. + w_ge: Weight for gene expression alignment. + w_da: Weight for domain adversarial alignment. + w_ot: Weight for optimal transport alignment. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # --- Input Validation --- + if not spatial_adata_path.is_file(): + raise FileNotFoundError(f"Input spatial AnnData file not found: {spatial_adata_path}") + if not scrna_adata_path.is_file(): + raise FileNotFoundError(f"Input scRNA-seq AnnData file not found: {scrna_adata_path}") + if not output_prefix: + raise ValueError("output_prefix cannot be empty.") + + # Validate numerical parameters + if n_top_genes <= 0: + raise ValueError("n_top_genes must be a positive integer.") + if n_pcs <= 0: + raise ValueError("n_pcs must be a positive integer.") + if n_neighbors <= 0: + raise ValueError("n_neighbors must be a positive integer.") + if epochs <= 0: + raise ValueError("epochs must be a positive integer.") + if lr <= 0: + raise ValueError("lr (learning rate) must be positive.") + if T <= 0: + raise ValueError("T (temperature) must be positive.") + + # Validate non-negative weight parameters + for param_name, param_value in { + "beta": beta, "beta2": beta2, "lambda_g": lambda_g, "lambda_d": lambda_d, + "lambda_ot": lambda_ot, "w_pc": w_pc, "w_ge": w_ge, "w_da": w_da, "w_ot": w_ot + }.items(): + if param_value < 0: + raise ValueError(f"{param_name} must be non-negative.") + + with tempfile.TemporaryDirectory() as temp_dir_str: + temp_dir = Path(temp_dir_str) + script_path = temp_dir / "run_simo_script.py" + # Define output path in the current working directory + output_adata_path = Path.cwd() / f"{output_prefix}_integrated.h5ad" + + # --- Script Generation --- + # This script will be executed in a separate Python process to isolate dependencies. + # It loads the data, runs the SIMO workflow, and saves the result. + script_content = f""" +import sys +import warnings +import scanpy as sc +import simo + +# Suppress warnings from the library for cleaner output +warnings.filterwarnings('ignore') + +try: + # Load data + spatial_data = sc.read_h5ad(r'{spatial_adata_path.resolve()}') + scrna_data = sc.read_h5ad(r'{scrna_adata_path.resolve()}') + + # Initialize SIMO object + simo_model = simo.SIMO(spatial_data, scrna_data) + + # Preprocess data + simo_model.preprocess( + n_top_genes={n_top_genes}, + n_pcs={n_pcs}, + n_neighbors={n_neighbors} + ) + + # Train the model + simo_model.train( + T={T}, + beta={beta}, + beta2={beta2}, + lambda_g={lambda_g}, + lambda_d={lambda_d}, + lambda_ot={lambda_ot}, + epochs={epochs}, + lr={lr}, + w_pc={w_pc}, + w_ge={w_ge}, + w_da={w_da}, + w_ot={w_ot} + ) + + # Get results and save + integrated_adata = simo_model.get_results() + integrated_adata.write_h5ad(r'{output_adata_path.resolve()}') + + print(f"Successfully integrated data and saved to {{str(output_adata_path.resolve())}}") + +except Exception as e: + print(f"An error occurred during SIMO execution: {{e}}", file=sys.stderr) + sys.exit(1) +""" + with open(script_path, "w") as f: + f.write(script_content) + + # --- Subprocess Execution --- + command = ["python", str(script_path)] + command_str = " ".join(command) + + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True, + cwd=Path.cwd(), + ) + + if not output_adata_path.is_file(): + # This case is important if the script runs without error but fails to produce the file. + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "error": "SIMO script completed, but the output file was not created.", + "return_code": 1, + "output_files": [] + } + + return { + "command_executed": command_str, + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(output_adata_path)], + } + except subprocess.CalledProcessError as e: + # This catches errors from within the executed script (e.g., Python exceptions that cause a non-zero exit code) + return { + "command_executed": command_str, + "stdout": e.stdout, + "stderr": e.stderr, + "error": "SIMO execution failed with a non-zero exit code.", + "return_code": e.returncode, + "output_files": [] + } + except FileNotFoundError: + # This catches an error if 'python' is not in the system's PATH + return { + "command_executed": command_str, + "stdout": "", + "stderr": "Error: The 'python' interpreter was not found in the system's PATH.", + "error": "Python interpreter not found.", + "return_code": 1, + "output_files": [] + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..70447e70bb315d5eb153f9ba807dd9c51d3ce55f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/app/simo-omics_server.py') +SERVER_NAME = 'biosci_simo_omics' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..dcdd4f34ad0e589c6b405cb49928e5660b93a398 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-simo-omics: + build: . + image: mcp-simo-omics:latest + container_name: mcp-simo-omics + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=simo-omics + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..11c88f273b92a5d3816c0683a0489d2d024ca0db --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - simo-omics + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_simo-omics/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e079e3f88fbaad22b22c41b0d553ac76a0b1fc04 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install snakemake via conda (e.g., from bioconda) +RUN conda install -c bioconda snakemake -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/snakemake_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/snakemake_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/snakemake_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_server.py new file mode 100644 index 0000000000000000000000000000000000000000..113fe23215eacfd8a7789912229474bd4c8c1501 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_server.py @@ -0,0 +1,306 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict +import os + +@mcp.tool() +def snakemake_run( + snakefile: Optional[str] = None, + cores: int = 1, + targets: Optional[List[str]] = None, + dryrun: bool = False, + use_conda: bool = False, + use_singularity: bool = False, + config: Optional[List[str]] = None, + configfiles: Optional[List[str]] = None, + workdir: Optional[str] = None, + forceall: bool = False, + keep_going: bool = False, + printshellcmds: bool = True, + reason: bool = False, + latency_wait: int = 5, + rerun_incomplete: bool = True, +): + """ + Execute a Snakemake workflow. + + Args: + snakefile: Path to the Snakemake file (default: Snakefile). + cores: Number of CPU cores to use (required for execution). + targets: Specific files or rules to build. + dryrun: If True, only show what would be done. + use_conda: If True, use Conda to deploy software dependencies. + use_singularity: If True, use Singularity containers. + config: Set or overwrite configuration variables (list of "key=value"). + configfiles: List of configuration files to use. + workdir: Set the working directory. + forceall: Force the execution of all rules. + keep_going: Go on with independent jobs if a job fails. + printshellcmds: Print out the shell commands that will be executed. + reason: Print the reason for each executed rule. + latency_wait: Wait given seconds if an output file of a job is not present after the job finished. + rerun_incomplete: Re-run jobs that have been interrupted. + """ + cmd = ["snakemake", "--cores", str(cores)] + + if snakefile: + path_sf = Path(snakefile) + if not path_sf.exists(): + return {"error": f"Snakefile not found: {snakefile}"} + cmd.extend(["--snakefile", str(path_sf)]) + + if dryrun: + cmd.append("--dry-run") + if use_conda: + cmd.append("--use-conda") + if use_singularity: + cmd.append("--use-singularity") + if forceall: + cmd.append("--forceall") + if keep_going: + cmd.append("--keep-going") + if printshellcmds: + cmd.append("--printshellcmds") + if reason: + cmd.append("--reason") + if rerun_incomplete: + cmd.append("--rerun-incomplete") + + cmd.extend(["--latency-wait", str(latency_wait)]) + + if workdir: + cmd.extend(["--directory", workdir]) + + if config: + cmd.append("--config") + cmd.extend(config) + + if configfiles: + cmd.append("--configfiles") + cmd.extend(configfiles) + + if targets: + cmd.extend(targets) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + +@mcp.tool() +def snakemake_info( + snakefile: Optional[str] = None, + mode: str = "list", +): + """ + Get information about the Snakemake workflow without executing it. + + Args: + snakefile: Path to the Snakemake file. + mode: Information mode: 'list' (list rules), 'summary' (table of rules/files), 'lint' (check code quality). + """ + cmd = ["snakemake"] + + if snakefile: + cmd.extend(["--snakefile", snakefile]) + + if mode == "list": + cmd.append("--list") + elif mode == "summary": + cmd.append("--summary") + elif mode == "lint": + cmd.append("--lint") + else: + return {"error": f"Invalid mode: {mode}. Choose from 'list', 'summary', 'lint'."} + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def snakemake_visualize( + snakefile: Optional[str] = None, + graph_type: str = "dag", + output_file: str = "workflow.dot", + targets: Optional[List[str]] = None, +): + """ + Generate a visualization of the workflow (DAG or Rulegraph) in DOT format. + + Args: + snakefile: Path to the Snakemake file. + graph_type: Type of graph: 'dag' (Directed Acyclic Graph of jobs) or 'rulegraph' (Graph of rules). + output_file: Path to save the .dot file. + targets: Specific files or rules to include in the graph. + """ + cmd = ["snakemake"] + + if snakefile: + cmd.extend(["--snakefile", snakefile]) + + if graph_type == "dag": + cmd.append("--dag") + elif graph_type == "rulegraph": + cmd.append("--rulegraph") + else: + return {"error": "graph_type must be 'dag' or 'rulegraph'"} + + if targets: + cmd.extend(targets) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + + output_path = Path(output_file) + output_path.write_text(result.stdout) + + return { + "command_executed": " ".join(cmd), + "output_file": str(output_path.absolute()), + "message": f"Graph saved to {output_file}. Use 'dot -Tpdf {output_file} > graph.pdf' to render." + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def snakemake_report( + snakefile: Optional[str] = None, + report_path: str = "report.html", + config: Optional[List[str]] = None, +): + """ + Create an HTML report containing results and statistics. + + Args: + snakefile: Path to the Snakemake file. + report_path: Path where the HTML report should be saved. + config: Set or overwrite configuration variables (list of "key=value"). + """ + cmd = ["snakemake", "--report", report_path] + + if snakefile: + cmd.extend(["--snakefile", snakefile]) + + if config: + cmd.append("--config") + cmd.extend(config) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(Path(report_path).absolute())] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stderr": e.stderr, + "error": str(e) + } + +@mcp.tool() +def snakemake_management( + snakefile: Optional[str] = None, + unlock: bool = False, + cleanup_metadata: Optional[List[str]] = None, + cleanup_shadow: bool = False, +): + """ + Perform maintenance tasks on the Snakemake working directory. + + Args: + snakefile: Path to the Snakemake file. + unlock: Remove a lock on the working directory. + cleanup_metadata: Cleanup the metadata of given files. + cleanup_shadow: Cleanup old shadow directories. + """ + cmd = ["snakemake"] + + if snakefile: + cmd.extend(["--snakefile", snakefile]) + + if unlock: + cmd.append("--unlock") + elif cleanup_metadata: + cmd.append("--cleanup-metadata") + cmd.extend(cleanup_metadata) + elif cleanup_shadow: + cmd.append("--cleanup-shadow") + else: + return {"error": "No management action specified (unlock, cleanup_metadata, or cleanup_shadow)."} + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "status": "success" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stderr": e.stderr, + "error": str(e), + "status": "failed" + } + +@mcp.tool() +def snakemake_archive( + output_file: str, + snakefile: Optional[str] = None, +): + """ + Archive the workflow into a tarball, including all input files and software environment. + + Args: + output_file: Path to the output archive (e.g., workflow.tar.gz). + snakefile: Path to the Snakemake file. + """ + cmd = ["snakemake", "--archive", output_file] + + if snakefile: + cmd.extend(["--snakefile", snakefile]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [str(Path(output_file).absolute())] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stderr": e.stderr, + "error": str(e) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a37853bc9333872aab29f1991ec7e450d2aa8ec7 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/app/snakemake_server.py') +SERVER_NAME = 'biosci_snakemake' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..06457ecd8749d433ab983eff3cc1dbed6121b260 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-snakemake: + build: . + image: mcp-snakemake:latest + container_name: mcp-snakemake + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=snakemake + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8b397091e44e26bf726ec2926ccb3db895f108a4 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - snakemake + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_snakemake/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..517328aacda6a9b32488e23d0efe1cbc8d36a446 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install sourmash via conda (e.g., from bioconda) +RUN conda install -c bioconda sourmash -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/sourmash_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/sourmash_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/sourmash_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_server.py new file mode 100644 index 0000000000000000000000000000000000000000..51317bd6fd5bdcdfc435560280aeb58d25dd2cf9 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_server.py @@ -0,0 +1,376 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Union +import os + +@mcp.tool() +def sourmash_sketch_dna( + input_files: List[str], + output: str, + ksize: int = 31, + scaled: int = 1000, + name: Optional[str] = None, + singleton: bool = False, + merge: Optional[str] = None, + param_string: Optional[str] = None, +): + """ + Create DNA signatures (sketches) from genomic or metagenomic sequences. + + Args: + input_files: List of paths to FASTA/FASTQ files (can be gzipped). + output: Path to save the resulting .sig or .zip signature file. + ksize: K-mer size to use (default 31). + scaled: Compression ratio (default 1000). + name: Name to give to the signature(s). + singleton: Create a separate signature for each sequence in the input files. + merge: Merge all input files into a single signature with this name. + param_string: Advanced parameter string (e.g., 'k=21,k=31,scaled=1000'). + """ + # Input validation + for f in input_files: + if not Path(f).exists(): + return {"error": f"Input file not found: {f}"} + + cmd = ["sourmash", "sketch", "dna"] + + for f in input_files: + cmd.append(f) + + cmd.extend(["-o", output]) + cmd.extend(["--param-string", f"k={ksize},scaled={scaled}"]) + + if name: + cmd.extend(["--name", name]) + if singleton: + cmd.append("--singleton") + if merge: + cmd.extend(["--merge", merge]) + if param_string: + # Overwrites the default k/scaled if provided + cmd.extend(["--param-string", param_string]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output] if Path(output).exists() else [] + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": e.stderr, + "stdout": e.stdout + } + +@mcp.tool() +def sourmash_compare( + signatures: List[str], + output: str, + ksize: int = 31, + ignore_abundance: bool = False, + containment: bool = False, + processes: int = 1, +): + """ + Compare multiple signatures to create a similarity or containment matrix. + + Args: + signatures: List of paths to signature files (.sig, .zip, or directories). + output: Path to save the comparison matrix. + ksize: K-mer size to use for comparison (default 31). + ignore_abundance: Do not use k-mer abundances if present. + containment: Calculate containment instead of Jaccard similarity. + processes: Number of processes to use for parallelization. + """ + for s in signatures: + if not Path(s).exists(): + return {"error": f"Signature file not found: {s}"} + + cmd = ["sourmash", "compare"] + cmd.extend(signatures) + cmd.extend(["-o", output, "-k", str(ksize)]) + + if ignore_abundance: + cmd.append("--ignore-abundance") + if containment: + cmd.append("--containment") + if processes > 1: + cmd.extend(["--processes", str(processes)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # sourmash compare creates a binary matrix file and often a .labels.txt file + output_files = [output] + labels_file = f"{output}.labels.txt" + if Path(labels_file).exists(): + output_files.append(labels_file) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} + +@mcp.tool() +def sourmash_gather( + query: str, + databases: List[str], + output: Optional[str] = None, + threshold_bp: int = 50000, + ksize: int = 31, + save_unassigned: Optional[str] = None, + num_results: Optional[int] = None, +): + """ + Search a metagenome signature against a database to find the minimum set of genomes that cover it. + + Args: + query: Path to the query signature file. + databases: List of paths to database signatures or SBT/LCA indexes. + output: Path to save the results in CSV format. + threshold_bp: Minimum number of base pairs in common to report a match (default 50,000). + ksize: K-mer size to use (default 31). + save_unassigned: Path to save unassigned k-mers as a signature. + num_results: Stop after finding this many matches. + """ + if not Path(query).exists(): + return {"error": f"Query file not found: {query}"} + + cmd = ["sourmash", "gather", query] + cmd.extend(databases) + cmd.extend(["-k", str(ksize), "--threshold-bp", str(threshold_bp)]) + + if output: + cmd.extend(["-o", output]) + if save_unassigned: + cmd.extend(["--save-unassigned", save_unassigned]) + if num_results: + cmd.extend(["--num-results", str(num_results)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [] + if output and Path(output).exists(): + output_files.append(output) + if save_unassigned and Path(save_unassigned).exists(): + output_files.append(save_unassigned) + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} + +@mcp.tool() +def sourmash_search( + query: str, + databases: List[str], + output: Optional[str] = None, + threshold: float = 0.08, + ksize: int = 31, + containment: bool = False, + num_results: int = 3, +): + """ + Search a query signature against a database for similar signatures. + + Args: + query: Path to the query signature file. + databases: List of paths to database signatures or indexes. + output: Path to save results in CSV format. + threshold: Minimum similarity/containment to report (default 0.08). + ksize: K-mer size to use (default 31). + containment: Search for containment instead of Jaccard similarity. + num_results: Number of results to return (default 3). + """ + if not Path(query).exists(): + return {"error": f"Query file not found: {query}"} + + cmd = ["sourmash", "search", query] + cmd.extend(databases) + cmd.extend(["-k", str(ksize), "--threshold", str(threshold), "-n", str(num_results)]) + + if output: + cmd.extend(["-o", output]) + if containment: + cmd.append("--containment") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output] if output and Path(output).exists() else [] + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} + +@mcp.tool() +def sourmash_plot( + matrix: str, + output_prefix: str, + labels: bool = False, + indices: bool = False, + vmax: float = 1.0, + vmin: float = 0.0, +): + """ + Visualize a comparison matrix created by 'sourmash compare'. + + Args: + matrix: Path to the matrix file created by 'sourmash compare'. + output_prefix: Prefix for the output plot files (.png, .pdf). + labels: Show signature names on the plot (requires .labels.txt file). + indices: Show matrix indices on the plot. + vmax: Maximum value for the color scale (default 1.0). + vmin: Minimum value for the color scale (default 0.0). + """ + if not Path(matrix).exists(): + return {"error": f"Matrix file not found: {matrix}"} + + cmd = ["sourmash", "plot", matrix, "--output-dir", os.path.dirname(output_prefix) or "."] + + # sourmash plot uses the matrix filename to find labels, but we can specify prefix + # Note: sourmash plot usually outputs {matrix}.matrix.png + + if labels: + cmd.append("--labels") + if indices: + cmd.append("--indices") + cmd.extend(["--vmax", str(vmax), "--vmin", str(vmin)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + # Identify generated files + base = Path(matrix).name + output_files = [str(f) for f in Path(".").glob(f"{base}*") if f.suffix in ['.png', '.pdf', '.matrix.png']] + + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} + +@mcp.tool() +def sourmash_tax_metagenome( + gather_csv: List[str], + taxonomy_csv: List[str], + output_prefix: str, + rank: str = "species", + force: bool = False, +): + """ + Summarize 'sourmash gather' results using taxonomic information. + + Args: + gather_csv: List of CSV files from 'sourmash gather'. + taxonomy_csv: List of CSV files containing taxonomic information (e.g., GTDB or NCBI). + output_prefix: Prefix for the output summary files. + rank: Taxonomic rank to summarize at (default 'species'). + force: Force overwrite of existing files. + """ + for f in gather_csv + taxonomy_csv: + if not Path(f).exists(): + return {"error": f"Input file not found: {f}"} + + cmd = ["sourmash", "tax", "metagenome"] + cmd.extend(["--gather-results"]) + cmd.extend(gather_csv) + cmd.extend(["--taxonomy"]) + cmd.extend(taxonomy_csv) + cmd.extend(["--output-prefix", output_prefix, "--rank", rank]) + + if force: + cmd.append("--force") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [f"{output_prefix}.summarized.csv"] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [f for f in output_files if Path(f).exists()] + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} + +@mcp.tool() +def sourmash_sig_merge( + signatures: List[str], + output: str, + ksize: Optional[int] = None, + flatten: bool = False, +): + """ + Merge multiple signatures into a single signature file. + + Args: + signatures: List of signature files to merge. + output: Path to the output signature file. + ksize: Filter by k-mer size before merging. + flatten: Remove abundance information (set all counts to 1). + """ + for s in signatures: + if not Path(s).exists(): + return {"error": f"Signature file not found: {s}"} + + cmd = ["sourmash", "sig", "merge"] + cmd.extend(signatures) + cmd.extend(["-o", output]) + + if ksize: + cmd.extend(["-k", str(ksize)]) + if flatten: + cmd.append("--flatten") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": [output] if Path(output).exists() else [] + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} + +@mcp.tool() +def sourmash_sig_describe( + signatures: List[str], +): + """ + Provide a human-readable summary of the contents of signature files. + + Args: + signatures: List of signature files to describe. + """ + for s in signatures: + if not Path(s).exists(): + return {"error": f"Signature file not found: {s}"} + + cmd = ["sourmash", "sig", "describe"] + cmd.extend(signatures) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr + } + except subprocess.CalledProcessError as e: + return {"error": e.stderr, "command_executed": " ".join(cmd)} \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..2db0ee418b444f075f709eb2485107df4f9ab953 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/app/sourmash_server.py') +SERVER_NAME = 'biosci_sourmash' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b163b34254d72f5261702b8546bd29767ef1b46d --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-sourmash: + build: . + image: mcp-sourmash:latest + container_name: mcp-sourmash + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=sourmash + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..749ba7b7fd416595e392aef0a7b338bd6b9e63fc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - sourmash + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sourmash/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2306cd89a3e9bbe428c275d0c156ca4ad77ed07b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install sra-tools via conda (e.g., from bioconda) +RUN conda install -c bioconda sra-tools -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/sra-tools_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/sra-tools_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/sra-tools_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_server.py new file mode 100644 index 0000000000000000000000000000000000000000..4fb18e987814b81531efe672a1f4e2ed4fba9c1f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_server.py @@ -0,0 +1,394 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# Helper function for running SRA tools +def _run_sra_tool(command: List[str], tool_name: str, output_dir: Optional[Path] = None) -> Dict[str, Any]: + """ + Helper function to execute an SRA Toolkit command and return structured output. + """ + try: + result = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + output_files: List[str] = [] + + # Attempt to infer output files if an output_dir was specified and the command was successful. + # This is a heuristic; a more robust solution would involve parsing the tool's stdout + # for specific filenames or requiring the user to specify expected output patterns. + if output_dir and output_dir.is_dir(): + try: + output_files = [str(f) for f in output_dir.iterdir() if f.is_file()] + except Exception as e: + # If directory listing fails, include a warning in stderr. + result.stderr += f"\nWarning: Could not list output directory contents: {e}" + + return { + "command_executed": " ".join(command), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files, + } + except FileNotFoundError: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": f"Error: {tool_name} command not found. Is SRA Toolkit installed and in PATH?", + "output_files": [], + "error": "ToolNotFound" + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": "CalledProcessError", + "returncode": e.returncode + } + except Exception as e: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": f"An unexpected error occurred: {str(e)}", + "output_files": [], + "error": "UnexpectedError" + } + +# The @mcp.tool() decorator is assumed to be available in the environment. + +@mcp.tool() +def prefetch( + accession_id: str, + output_directory: Optional[Path] = None, + eliminate_quals: bool = False, + force: bool = False, + verbose: bool = False, + ngc_file: Optional[Path] = None, +) -> Dict[str, Any]: + """ + Downloads SRA data (runs or cart files) from NCBI. + + Args: + accession_id: SRA accession (e.g., SRR123456) or path to a cart file. + output_directory: Optional path to the directory where downloaded files will be saved. + If not specified, files are saved in the current working directory. + eliminate_quals: If True, prefer SRA Lite data with simplified quality scores + to reduce download size and time. (Introduced in SRA Toolkit 3.1.0+) + force: If True, overwrite existing files without prompting. (Common inferred flag) + verbose: If True, enable verbose output. (Common inferred flag) + ngc_file: Optional path to an NCBI Generated Key (NGC) file for accessing dbGaP data. + (Support for NGC files mentioned in SRA Toolkit 3.0.5+) + + Returns: + A dictionary containing command execution details, stdout, stderr, and output files. + """ + if not accession_id: + raise ValueError("accession_id cannot be empty.") + + command = ["prefetch", accession_id] + + if output_directory: + output_directory.mkdir(parents=True, exist_ok=True) + command.extend(["-O", str(output_directory)]) + + if eliminate_quals: + command.append("--eliminate-quals") + + if force: + command.append("--force") + + if verbose: + command.append("--verbose") + + if ngc_file: + if not ngc_file.is_file(): + raise FileNotFoundError(f"NGC file not found at: {ngc_file}") + command.extend(["--ngc", str(ngc_file)]) # Inferred flag for NGC file + + return _run_sra_tool(command, "prefetch", output_dir=output_directory) + + +@mcp.tool() +def fasterq_dump( + accession_id: str, + output_directory: Optional[Path] = None, + threads: int = 1, + split_files: bool = False, + include_technical: bool = False, + fasta: bool = False, + fasta_unsorted: bool = False, + temp_directory: Optional[Path] = None, + force: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Converts SRA objects into FASTQ or FASTA files. This tool is multi-threaded and + optimized for large-scale conversions. (Introduced in SRA Toolkit 2.9.1+) + + Args: + accession_id: SRA accession (e.g., SRR123456). + output_directory: Optional path to the directory where output files will be saved. + If not specified, files are saved in the current working directory. + threads: Number of CPU threads to use for the conversion. Must be 1 or greater. + (Inferred flag: -e, common for SRA tools) + split_files: If True, split reads into separate files (e.g., for paired-end data, + creates _1.fastq and _2.fastq files). Automatically enabled if + `include_technical` is True. + include_technical: If True, include technical reads in the output. This automatically + enables `split_files`. (Mentioned in SRA Toolkit 3.0.6+) + fasta: If True, output in FASTA format instead of FASTQ. Cannot be used with `fasta_unsorted`. + (Mentioned in SRA Toolkit 2.11.3+) + fasta_unsorted: If True, output in unsorted FASTA format. Cannot be used with `fasta`. + (Mentioned in SRA Toolkit 2.11.3+) + temp_directory: Optional path to a directory for temporary files. + (Inferred flag: -t, common for SRA tools) + force: If True, overwrite existing output files without prompting. (Common inferred flag) + verbose: If True, enable verbose output. (Common inferred flag) + + Returns: + A dictionary containing command execution details, stdout, stderr, and output files. + """ + if not accession_id: + raise ValueError("accession_id cannot be empty.") + if threads < 1: + raise ValueError("threads must be 1 or greater.") + if fasta and fasta_unsorted: + raise ValueError("Cannot use both 'fasta' and 'fasta_unsorted' simultaneously.") + + command = ["fasterq-dump", accession_id] + + if output_directory: + output_directory.mkdir(parents=True, exist_ok=True) + command.extend(["-O", str(output_directory)]) + + if threads > 1: # Only add if > 1, as 1 is often default and might not need explicit flag + command.extend(["-e", str(threads)]) + + # include_technical implies split_files as per documentation + if include_technical: + command.append("--include-technical") + if not split_files: # Avoid adding --split-files twice if user already set it + command.append("--split-files") + elif split_files: # Only add if not already handled by include_technical + command.append("--split-files") + + if fasta: + command.append("--fasta") + elif fasta_unsorted: + command.append("--fasta-unsorted") + + if temp_directory: + temp_directory.mkdir(parents=True, exist_ok=True) + command.extend(["-t", str(temp_directory)]) + + if force: + command.append("--force") + + if verbose: + command.append("--verbose") + + return _run_sra_tool(command, "fasterq-dump", output_dir=output_directory) + + +@mcp.tool() +def fastq_dump( + accession_id: str, + output_directory: Optional[Path] = None, + split_files: bool = False, + fasta: bool = False, + fasta_unsorted: bool = False, + gzip: bool = False, + bzip2: bool = False, + force: bool = False, + verbose: bool = False, +) -> Dict[str, Any]: + """ + (DEPRECATED) Converts SRA objects into FASTQ or FASTA files. This is an older, single-threaded + tool. `fasterq_dump` is generally preferred for performance. + + Args: + accession_id: SRA accession (e.g., SRR123456). + output_directory: Optional path to the directory where output files will be saved. + If not specified, files are saved in the current working directory. + split_files: If True, split reads into separate files (e.g., for paired-end data). + (Common inferred flag) + fasta: If True, output in FASTA format instead of FASTQ. Cannot be used with `fasta_unsorted`. + (Common inferred flag) + fasta_unsorted: If True, output in unsorted FASTA format. Cannot be used with `fasta`. + (Common inferred flag) + gzip: If True, compress the output files with gzip. Cannot be used with `bzip2`. + (Common inferred flag) + bzip2: If True, compress the output files with bzip2. Cannot be used with `gzip`. + (Common inferred flag) + force: If True, overwrite existing output files without prompting. (Common inferred flag) + verbose: If True, enable verbose output. (Common inferred flag) + + Returns: + A dictionary containing command execution details, stdout, stderr, and output files. + """ + if not accession_id: + raise ValueError("accession_id cannot be empty.") + if fasta and fasta_unsorted: + raise ValueError("Cannot use both 'fasta' and 'fasta_unsorted' simultaneously.") + if gzip and bzip2: + raise ValueError("Cannot use both 'gzip' and 'bzip2' simultaneously.") + + command = ["fastq-dump", accession_id] + + if output_directory: + output_directory.mkdir(parents=True, exist_ok=True) + command.extend(["-O", str(output_directory)]) + + if split_files: + command.append("--split-files") + + if fasta: + command.append("--fasta") + elif fasta_unsorted: + command.append("--fasta-unsorted") + + if gzip: + command.append("--gzip") + elif bzip2: + command.append("--bzip2") + + if force: + command.append("--force") + + if verbose: + command.append("--verbose") + + return _run_sra_tool(command, "fastq-dump", output_dir=output_directory) + + +@mcp.tool() +def vdb_config( + set_preference: Optional[str] = None, + aws_access_key_id: Optional[str] = None, + aws_secret_access_key: Optional[str] = None, + aws_session_token: Optional[str] = None, + gcp_access_token: Optional[str] = None, + reset: bool = False, + list_config: bool = False, + interactive: bool = False, +) -> Dict[str, Any]: + """ + Configures SRA Toolkit settings, including cloud credentials and preferences. + Note: Interactive mode is generally not recommended for automated scripts. + + Args: + set_preference: A string in 'key=value' format to set a specific configuration preference. + Example: 'prefer_sra_lite=true'. (Inferred flag: --set-pref, based on wiki) + aws_access_key_id: AWS access key ID for cloud access. (Inferred flag: --aws-id, based on "improve AWS credential interface") + aws_secret_access_key: AWS secret access key for cloud access. (Inferred flag: --aws-secret) + aws_session_token: AWS session token for temporary credentials. (Inferred flag: --aws-token) + gcp_access_token: GCP access token for cloud access. (Inferred flag: --gcp-token, based on "supports the latest GCP access tokens") + reset: If True, reset the SRA Toolkit configuration to its default settings. + (Inferred flag: --reset, common for config tools) + list_config: If True, list the current SRA Toolkit configuration. + (Inferred flag: --list, common for config tools) + interactive: If True, run vdb-config in interactive mode. (Flag inferred, though interactive + requirement was removed in SRA Toolkit 3.0.1) + + Returns: + A dictionary containing command execution details, stdout, stderr. + """ + command = ["vdb-config"] + action_specified = False + + if reset: + command.append("--reset") + action_specified = True + if list_config: + command.append("--list") + action_specified = True + if interactive: + command.append("--interactive") + action_specified = True + if set_preference: + command.extend(["--set-pref", set_preference]) + action_specified = True + if aws_access_key_id: + command.extend(["--aws-id", aws_access_key_id]) + action_specified = True + if aws_secret_access_key: + command.extend(["--aws-secret", aws_secret_access_key]) + action_specified = True + if aws_session_token: + command.extend(["--aws-token", aws_session_token]) + action_specified = True + if gcp_access_token: + command.extend(["--gcp-token", gcp_access_token]) + action_specified = True + + if not action_specified: + raise ValueError("No action specified for vdb-config. Please provide a preference to set, " + "credentials, or use reset=True, list_config=True, or interactive=True.") + + return _run_sra_tool(command, "vdb-config") + + +@mcp.tool() +def sra_stat( + accession_id: str, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Provides statistics about SRA runs. (SRA Toolkit 3.0.3 fixed a regression in this tool) + + Args: + accession_id: SRA accession (e.g., SRR123456). + verbose: If True, enable verbose output. (Common inferred flag) + + Returns: + A dictionary containing command execution details, stdout, stderr. + """ + if not accession_id: + raise ValueError("accession_id cannot be empty.") + + command = ["sra-stat", accession_id] + + if verbose: + command.append("--verbose") + + return _run_sra_tool(command, "sra-stat") + + +@mcp.tool() +def vdb_validate( + path_to_sra_file: Path, + check_checksums: bool = True, + verbose: bool = False, +) -> Dict[str, Any]: + """ + Validates SRA/VDB files for integrity. + + Args: + path_to_sra_file: Path to the SRA file to validate. + check_checksums: If True, vdb-validate will report an error if data (blob) checksums are missing. + This is the default behavior of the tool as per documentation ("vdb-validate + will report an error if data (blob) checksums are missing."), so no explicit + flag is added for `check_checksums=True` unless a `--no-checksums` flag + were known to exist. + verbose: If True, enable verbose output. (Common inferred flag) + + Returns: + A dictionary containing command execution details, stdout, stderr. + """ + if not path_to_sra_file.is_file(): + raise FileNotFoundError(f"SRA file not found at: {path_to_sra_file}") + + command = ["vdb-validate", str(path_to_sra_file)] + + # As per documentation, "vdb-validate will report an error if data (blob) checksums are missing." + # This implies checksum checking is default. No flag is added for `check_checksums=True`. + # If a flag to disable checksums existed (e.g., --no-checksums), it would be added here if check_checksums was False. + + if verbose: + command.append("--verbose") + + return _run_sra_tool(command, "vdb-validate") \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..cfafd11c5341bae1f2459fd2522a60503b15fe17 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/app/sra-tools_server.py') +SERVER_NAME = 'biosci_sra_tools' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..b673aa81bb7546ee17d4dbf742f2b7877437ee44 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-sra-tools: + build: . + image: mcp-sra-tools:latest + container_name: mcp-sra-tools + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=sra-tools + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..839473e094e3d1f1b5751f87404a90c0aba48bae --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - sra-tools + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_sra-tools/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_star-fusion/app/star-fusion_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_star-fusion/app/star-fusion_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..cf05ffa82bc1f79fc3c38bf57f7b58ae022e52d2 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_star-fusion/app/star-fusion_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_star-fusion/app/star-fusion_server.py') +SERVER_NAME = 'biosci_star_fusion' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_server.py new file mode 100644 index 0000000000000000000000000000000000000000..da39b0f9fe7e9a1e0dc620b3f66686c193134a4f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_server.py @@ -0,0 +1,365 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +# Note: mcp is not imported as per instructions, but @mcp.tool is used for clarity. + +@mcp.tool() +def infer_timetree( + alignment_file: Path, + tree_file: Path, + dates_file: Path, + output_dir: Path, + dry_run: bool = False, +) -> Dict[str, Any]: + """ + Infers a time tree, ancestral sequences, a GTR model, and optionally confidence intervals + and coalescent models using the main treetime command. + + Args: + alignment_file: Path to the input alignment file (e.g., FASTA or PHYLIP format). + tree_file: Path to the input tree file (e.g., Newick, Nexus, or PHYLIP format). + dates_file: Path to the dates metadata file (CSV or TSV format). This file must + contain a 'name', 'accession', or 'strain' column matching tree tips, + and a 'date' column for sampling dates. + output_dir: Directory where all generated output files will be stored. This directory + will be created if it does not exist. + dry_run: If True, the command will be printed to stderr and returned without execution. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + If an error occurs, an 'error' key will be present with the exception message. + """ + # Input validation + if not alignment_file.is_file(): + raise FileNotFoundError(f"Input alignment file not found: {alignment_file}") + if not tree_file.is_file(): + raise FileNotFoundError(f"Input tree file not found: {tree_file}") + if not dates_file.is_file(): + raise FileNotFoundError(f"Input dates file not found: {dates_file}") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "treetime", + "--aln", str(alignment_file), + "--tree", str(tree_file), + "--dates", str(dates_file), + "--outdir", str(output_dir) + ] + + if dry_run: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": "Dry run: Command not executed.", + "output_files": [] + } + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(f.resolve()) for f in output_dir.rglob("*") if f.is_file()] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": str(e) + } + + +@mcp.tool() +def analyze_clock_signal( + tree_file: Path, + dates_file: Path, + output_dir: Path, + alignment_file: Optional[Path] = None, + sequence_length: Optional[int] = None, + reroot_method: Optional[str] = None, + dry_run: bool = False, +) -> Dict[str, Any]: + """ + Explores the temporal signal in the data and estimates the substitution rate using + the 'treetime clock' subcommand. + + Args: + tree_file: Path to the input tree file (e.g., Newick, Nexus, or PHYLIP format). + dates_file: Path to the dates metadata file (CSV or TSV format). + output_dir: Directory where all generated output files will be stored. This directory + will be created if it does not exist. + alignment_file: Optional path to the input alignment file (e.g., FASTA or PHYLIP format). + Either `alignment_file` or `sequence_length` must be provided. + sequence_length: Optional sequence length. Can be provided instead of an alignment file. + Either `alignment_file` or `sequence_length` must be provided. + Must be a positive integer if provided. + reroot_method: Optional rerooting method. For example, 'least-squares'. + dry_run: If True, the command will be printed to stderr and returned without execution. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + If an error occurs, an 'error' key will be present with the exception message. + """ + # Input validation + if not tree_file.is_file(): + raise FileNotFoundError(f"Input tree file not found: {tree_file}") + if not dates_file.is_file(): + raise FileNotFoundError(f"Input dates file not found: {dates_file}") + + if alignment_file and not alignment_file.is_file(): + raise FileNotFoundError(f"Input alignment file not found: {alignment_file}") + + if not alignment_file and sequence_length is None: + raise ValueError("Either 'alignment_file' or 'sequence_length' must be provided.") + if alignment_file and sequence_length is not None: + raise ValueError("Cannot provide both 'alignment_file' and 'sequence_length'. Choose one.") + if sequence_length is not None and sequence_length <= 0: + raise ValueError("Sequence length must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "treetime", "clock", + "--tree", str(tree_file), + "--dates", str(dates_file), + "--outdir", str(output_dir) + ] + + if alignment_file: + cmd.extend(["--aln", str(alignment_file)]) + elif sequence_length is not None: + cmd.extend(["--sequence-length", str(sequence_length)]) + + if reroot_method: + cmd.extend(["--reroot", reroot_method]) + + if dry_run: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": "Dry run: Command not executed.", + "output_files": [] + } + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(f.resolve()) for f in output_dir.rglob("*") if f.is_file()] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": str(e) + } + + +@mcp.tool() +def reconstruct_ancestral_sequences( + alignment_file: Path, + tree_file: Path, + output_dir: Path, + dry_run: bool = False, +) -> Dict[str, Any]: + """ + Reconstructs ancestral sequences at internal nodes of the input tree using + the 'treetime ancestral' subcommand. + + Args: + alignment_file: Path to the input alignment file (e.g., FASTA or PHYLIP format). + tree_file: Path to the input tree file (e.g., Newick, Nexus, or PHYLIP format). + output_dir: Directory where all generated output files will be stored. This directory + will be created if it does not exist. + dry_run: If True, the command will be printed to stderr and returned without execution. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + If an error occurs, an 'error' key will be present with the exception message. + """ + # Input validation + if not alignment_file.is_file(): + raise FileNotFoundError(f"Input alignment file not found: {alignment_file}") + if not tree_file.is_file(): + raise FileNotFoundError(f"Input tree file not found: {tree_file}") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "treetime", "ancestral", + "--aln", str(alignment_file), + "--tree", str(tree_file), + "--outdir", str(output_dir) + ] + + if dry_run: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": "Dry run: Command not executed.", + "output_files": [] + } + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(f.resolve()) for f in output_dir.rglob("*") if f.is_file()] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": str(e) + } + + +@mcp.tool() +def analyze_homoplasy( + alignment_file: Path, + tree_file: Path, + output_dir: Path, + dry_run: bool = False, +) -> Dict[str, Any]: + """ + Detects and quantifies homoplasies or recurrent mutations in the data using + the 'treetime homoplasy' subcommand. + + Args: + alignment_file: Path to the input alignment file (e.g., FASTA or PHYLIP format). + tree_file: Path to the input tree file (e.g., Newick, Nexus, or PHYLIP format). + output_dir: Directory where all generated output files will be stored. This directory + will be created if it does not exist. + dry_run: If True, the command will be printed to stderr and returned without execution. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + If an error occurs, an 'error' key will be present with the exception message. + """ + # Input validation + if not alignment_file.is_file(): + raise FileNotFoundError(f"Input alignment file not found: {alignment_file}") + if not tree_file.is_file(): + raise FileNotFoundError(f"Input tree file not found: {tree_file}") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "treetime", "homoplasy", + "--aln", str(alignment_file), + "--tree", str(tree_file), + "--outdir", str(output_dir) + ] + + if dry_run: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": "Dry run: Command not executed.", + "output_files": [] + } + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(f.resolve()) for f in output_dir.rglob("*") if f.is_file()] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": str(e) + } + + +@mcp.tool() +def infer_mugration_model( + tree_file: Path, + states_file: Path, + attribute_field: str, + output_dir: Path, + dry_run: bool = False, +) -> Dict[str, Any]: + """ + Infers mugration models for discrete state transitions (e.g., geographic regions, + host switching) using the 'treetime mugration' subcommand. + + Args: + tree_file: Path to the input tree file (e.g., Newick, Nexus, or PHYLIP format). + states_file: Path to the states metadata file (CSV or TSV format). This file must + contain a 'name', 'accession', or 'strain' column matching tree tips. + attribute_field: The relevant column name in the `states_file` that specifies + the discrete states for mugration analysis (e.g., 'country'). + output_dir: Directory where all generated output files will be stored. This directory + will be created if it does not exist. + dry_run: If True, the command will be printed to stderr and returned without execution. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + If an error occurs, an 'error' key will be present with the exception message. + """ + # Input validation + if not tree_file.is_file(): + raise FileNotFoundError(f"Input tree file not found: {tree_file}") + if not states_file.is_file(): + raise FileNotFoundError(f"Input states file not found: {states_file}") + if not attribute_field: + raise ValueError("Attribute field cannot be empty.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "treetime", "mugration", + "--tree", str(tree_file), + "--states", str(states_file), + "--attribute", attribute_field, + "--outdir", str(output_dir) + ] + + if dry_run: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": "Dry run: Command not executed.", + "output_files": [] + } + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + output_files = [str(f.resolve()) for f in output_dir.rglob("*") if f.is_file()] + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_files": output_files + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": str(e) + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..9c9c7dcc43aef5c1eb0e2c7b4b21156494166131 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_treetime/app/treetime_server.py') +SERVER_NAME = 'biosci_treetime' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/trim-galore_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/trim-galore_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..264a22a22f3377d7d21ab20a54bc5f46c14744cf --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/trim-galore_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trim-galore/app/trim-galore_server.py') +SERVER_NAME = 'biosci_trim_galore' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d5add988a337bffd9172c19c3687c5bb4f1a7b93 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install trimadap via conda (e.g., from bioconda) +RUN conda install -c bioconda trimadap -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/trimadap_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/trimadap_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/trimadap_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_server.py new file mode 100644 index 0000000000000000000000000000000000000000..f4c30feba0bb301aa8069383b05249f30dd5dd63 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_server.py @@ -0,0 +1,100 @@ +from pathlib import Path +from typing import Optional +import subprocess + +@mcp.tool() +def trimadap( + input_fastq: str, + output_fastq: str, + adapter_5: Optional[str] = None, + adapter_3: Optional[str] = None, + min_match_len: int = 15, + max_error_rate: float = 0.10, + min_read_len: int = 20, + threads: int = 1, +): + """ + Fast but inaccurate adapter trimmer for Illumina reads. + + Args: + input_fastq: Path to the input FASTQ file (can be gzipped). + output_fastq: Path where the trimmed FASTQ output will be saved. + adapter_5: 5'-end adapter sequence to trim. + adapter_3: 3'-end adapter sequence to trim. + min_match_len: Minimum match length for an adapter to be trimmed (default: 15). + max_error_rate: Maximum allowed error rate for adapter matching (default: 0.10). + min_read_len: Minimum length of reads to keep after trimming (default: 20). + threads: Number of threads to use (default: 1). + """ + # Input validation + input_path = Path(input_fastq) + if not input_path.exists(): + return { + "command_executed": "None", + "stdout": "", + "stderr": f"Error: Input file '{input_fastq}' does not exist.", + "output_files": [] + } + + output_path = Path(output_fastq) + # Ensure output directory exists + output_path.parent.mkdir(parents=True, exist_ok=True) + + # Parameter constraints validation + if min_match_len < 1: + return {"error": "min_match_len must be a positive integer."} + if not (0.0 <= max_error_rate <= 1.0): + return {"error": "max_error_rate must be between 0.0 and 1.0."} + if min_read_len < 0: + return {"error": "min_read_len cannot be negative."} + if threads < 1: + return {"error": "threads must be at least 1."} + + # Construct command + # Usage: trimadap [options] + cmd = ["trimadap"] + + if adapter_5: + cmd.extend(["-5", adapter_5]) + if adapter_3: + cmd.extend(["-3", adapter_3]) + + cmd.extend(["-l", str(min_match_len)]) + cmd.extend(["-e", str(max_error_rate)]) + cmd.extend(["-s", str(min_read_len)]) + cmd.extend(["-p", str(threads)]) + + cmd.append(str(input_path)) + + try: + # trimadap outputs the trimmed reads to stdout + with open(output_path, "w") as f_out: + process = subprocess.run( + cmd, + stdout=f_out, + stderr=subprocess.PIPE, + text=True, + check=True + ) + + return { + "command_executed": " ".join(cmd), + "stdout": f"Trimmed reads successfully written to {output_fastq}", + "stderr": process.stderr, + "output_files": [str(output_path)] + } + + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "stdout": e.stdout, + "stderr": f"Execution failed with return code {e.returncode}: {e.stderr}", + "output_files": [] + } + except Exception as e: + return { + "command_executed": " ".join(cmd), + "stdout": "", + "stderr": f"An unexpected error occurred: {str(e)}", + "output_files": [] + } diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..de9d1d009e8ed7e540b08e4d8f1e7388e17c2fa1 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/app/trimadap_server.py') +SERVER_NAME = 'biosci_trimadap' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..567bf0f89982aa6353607e7c7f15739b4a27bfb3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-trimadap: + build: . + image: mcp-trimadap:latest + container_name: mcp-trimadap + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=trimadap + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c62333ba72bddb2b8bfe7610e48e3ffe281ee74a --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - trimadap + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_trimadap/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_server.py new file mode 100644 index 0000000000000000000000000000000000000000..cfb3cbf787eaf6063fc14c02f0cf4a1f94e778b8 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_server.py @@ -0,0 +1,162 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Dict, Union + +@mcp.tool() +def bed_to_bigbed( + bed_file: Path, + chrom_sizes_file: Path, + output_bigbed_file: Path, + auto_sql_file: Optional[Path] = None, + bed_type: Optional[str] = None, + delimiter: Optional[str] = None, + extra_index_fields: Optional[List[str]] = None, + block_size: int = 256, + items_per_slot: int = 1024, + uncompressed_blocks: bool = False, + udc_directory: Optional[Path] = None, + max_memory: Optional[str] = None, + temp_directory: Optional[Path] = None, + allow_1000g_chrom_names: bool = False, + warn_on_all_errors: bool = False, + verbose_level: int = 1, +) -> Dict[str, Union[str, List[str]]]: + """ + Converts a BED file to a bigBed file using ucsc-bedtobigbed. + + This tool takes a BED file and a chromosome sizes file to create a binary + bigBed file, which is optimized for display in the UCSC Genome Browser. + + Args: + bed_file: Path to the input BED file. Must exist. + chrom_sizes_file: Path to the chromosome sizes file (e.g., hg38.chrom.sizes). + This file should contain two columns: chromosome name and size. Must exist. + output_bigbed_file: Path for the output bigBed file. Its parent directory will be created if it doesn't exist. + auto_sql_file: Optional path to an autoSql (.as) file defining a custom BED format. + Required for BED files with more than 12 fields or custom fields. Must exist if provided. + bed_type: Optional string specifying the BED format (e.g., "bed3", "bed6", "bed9+2"). + If not specified, the tool attempts to infer it. + delimiter: Optional character to use as a field delimiter if not tab. + By default, the tool expects tab-separated input. + extra_index_fields: Optional list of field names to create extra indexes on. + Each string in the list will be passed as a separate -extraIndex argument. + block_size: The number of items that are grouped into a block in the bigBed file. + Default is 256. Must be a positive integer. + items_per_slot: The number of items that are stored in each slot of the bigBed index. + Default is 1024. Must be a positive integer. + uncompressed_blocks: If True, blocks in the bigBed file will not be compressed. + udc_directory: Optional path to a directory for UDC files (e.g., for remote files). + Must exist if provided. + max_memory: Optional string specifying the maximum memory to use (e.g., "1G", "500M"). + temp_directory: Optional path to a directory for temporary files. + Will be created if it doesn't exist. + allow_1000g_chrom_names: If True, allows 1000Genomes style chromosome names + (e.g., "1" instead of "chr1"). + warn_on_all_errors: If True, warns on all errors, not just the first 1000. + verbose_level: Set verbose level. Default is 1. Must be a non-negative integer. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + + Raises: + FileNotFoundError: If required input files or directories do not exist. + ValueError: If invalid parameter values are provided (e.g., non-positive block_size). + subprocess.CalledProcessError: If the ucsc-bedtobigbed command fails. + """ + # Input validation + if not bed_file.is_file(): + raise FileNotFoundError(f"Input BED file not found: {bed_file}") + if not chrom_sizes_file.is_file(): + raise FileNotFoundError(f"Chromosome sizes file not found: {chrom_sizes_file}") + if auto_sql_file and not auto_sql_file.is_file(): + raise FileNotFoundError(f"AutoSql file not found: {auto_sql_file}") + if udc_directory and not udc_directory.is_dir(): + raise FileNotFoundError(f"UDC directory not found: {udc_directory}") + if block_size <= 0: + raise ValueError("block_size must be a positive integer.") + if items_per_slot <= 0: + raise ValueError("items_per_slot must be a positive integer.") + if verbose_level < 0: + raise ValueError("verbose_level cannot be negative.") + + # Ensure output directory exists + output_bigbed_file.parent.mkdir(parents=True, exist_ok=True) + + command = ["bedToBigBed"] + + # Add optional parameters + if auto_sql_file: + command.append(f"-as={auto_sql_file.resolve()}") + if bed_type: + command.append(f"-type={bed_type}") + if delimiter: + command.append(f"-delim={delimiter}") + + if extra_index_fields: + for field in extra_index_fields: + command.append(f"-extraIndex={field}") + + command.append(f"-blockSize={block_size}") + command.append(f"-itemsPerSlot={items_per_slot}") + + if uncompressed_blocks: + command.append("-unc") + + if udc_directory: + command.append(f"-udcDir={udc_directory.resolve()}") + + if max_memory: + command.append(f"-maxMem={max_memory}") + + if temp_directory: + temp_directory.mkdir(parents=True, exist_ok=True) + command.append(f"-tempDir={temp_directory.resolve()}") + + if allow_1000g_chrom_names: + command.append("-allow1000g") + + if warn_on_all_errors: + command.append("-warnOnAllErrors") + + command.append(f"-verbose={verbose_level}") + + # Add positional arguments + command.extend([ + str(bed_file.resolve()), + str(chrom_sizes_file.resolve()), + str(output_bigbed_file.resolve()) + ]) + + try: + process = subprocess.run( + command, + capture_output=True, + text=True, + check=True + ) + stdout = process.stdout + stderr = process.stderr + output_files = [str(output_bigbed_file.resolve())] + + return { + "command_executed": " ".join(command), + "stdout": stdout, + "stderr": stderr, + "output_files": output_files, + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(command), + "stdout": e.stdout, + "stderr": e.stderr, + "output_files": [], + "error": f"bedToBigBed command failed with exit code {e.returncode}", + } + except FileNotFoundError: + return { + "command_executed": " ".join(command), + "stdout": "", + "stderr": "Error: bedToBigBed executable not found. Please ensure it is in your PATH.", + "output_files": [], + "error": "bedToBigBed executable not found.", + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..93d6a4df0015a53113a7f2aac123d679727644e6 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/app/ucsc-bedtobigbed_server.py') +SERVER_NAME = 'biosci_ucsc_bedtobigbed' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..0f62bb91a7bfb557f52f80241dcbf4d06f5bb82b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_ucsc-bedtobigbed/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-ucsc-bedtobigbed: + build: . + image: mcp-ucsc-bedtobigbed:latest + container_name: mcp-ucsc-bedtobigbed + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=ucsc-bedtobigbed + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_umi_tools/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_umi_tools/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_umi_tools/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_upimapi/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_upimapi/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_upimapi/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict-java/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict-java/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2ec170992dd2cf69a7708eb1bbef9f7fa8650bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict-java/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install vardict-java via conda (e.g., from bioconda) +RUN conda install -c bioconda vardict-java -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/vardict-java_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/vardict-java_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/vardict-java_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict-java/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict-java/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict-java/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vardict/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vcflib/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vcflib/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vcflib/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d2cbe1a1fa6cdbc7a4d23930d044e0c8519e8478 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install vpt via conda (e.g., from bioconda) +RUN conda install -c bioconda vpt -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/vpt_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/vpt_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/vpt_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_server.py new file mode 100644 index 0000000000000000000000000000000000000000..bb9f5ceb477dca540e4f943bff5abac9aed03530 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_server.py @@ -0,0 +1,443 @@ +import subprocess +from pathlib import Path +from typing import Optional, List, Dict, Any + +@mcp.tool() +def vpt_run_segmentation( + segmentation_algorithm: str, + input_path: str, + output_path: str, + overwrite: bool = False, + log_level: str = "info", + log_file: Optional[str] = None, +) -> Dict[str, Any]: + """ + Top-level segmentation entrypoint for Vizgen data. + + Args: + segmentation_algorithm: Path to the segmentation specification JSON file. + input_path: Path to the input data directory (MERSCOPE experiment folder). + output_path: Path where the segmentation results will be saved. + overwrite: If True, overwrite existing output files. + log_level: Logging level (debug, info, warning, error). + log_file: Optional path to save logs. + """ + cmd = ["vpt", "run-segmentation"] + + # Path validation + algo_path = Path(segmentation_algorithm) + if not algo_path.exists(): + return {"error": f"Segmentation algorithm file not found: {segmentation_algorithm}"} + + cmd.extend(["--segmentation-algorithm", str(algo_path)]) + cmd.extend(["--input-path", input_path]) + cmd.extend(["--output-path", output_path]) + + if overwrite: + cmd.append("--overwrite") + + cmd.extend(["--log-level", log_level]) + if log_file: + cmd.extend(["--log-file", log_file]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_path": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_prepare_segmentation( + output_path: str, + algorithm_name: str, + parameters: Optional[str] = None, +) -> Dict[str, Any]: + """ + Generates a segmentation specification JSON file template. + + Args: + output_path: Path where the generated JSON file will be saved. + algorithm_name: Name of the segmentation algorithm (e.g., 'cellpose', 'watershed'). + parameters: Optional JSON string containing algorithm-specific parameters. + """ + cmd = ["vpt", "prepare-segmentation"] + cmd.extend(["--output-path", output_path]) + cmd.extend(["--algorithm-name", algorithm_name]) + + if parameters: + cmd.extend(["--parameters", parameters]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_run_segmentation_on_tile( + segmentation_algorithm: str, + input_path: str, + output_path: str, + tile_index: int, + z_index: int = 0, + overwrite: bool = False, +) -> Dict[str, Any]: + """ + Runs a segmentation algorithm for a specific image tile. + + Args: + segmentation_algorithm: Path to the segmentation specification JSON file. + input_path: Path to the input data directory. + output_path: Path where the tile segmentation results will be saved. + tile_index: The index of the tile to process. + z_index: The Z-plane index to process. + overwrite: If True, overwrite existing output files. + """ + cmd = ["vpt", "run-segmentation-on-tile"] + cmd.extend(["--segmentation-algorithm", segmentation_algorithm]) + cmd.extend(["--input-path", input_path]) + cmd.extend(["--output-path", output_path]) + cmd.extend(["--tile-index", str(tile_index)]) + cmd.extend(["--z-index", str(z_index)]) + + if overwrite: + cmd.append("--overwrite") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_path": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_compile_tile_segmentation( + input_dir: str, + output_path: str, + tile_index_list: Optional[List[int]] = None, + overwrite: bool = False, +) -> Dict[str, Any]: + """ + Combines per-tile outputs into one internally consistent parquet file. + + Args: + input_dir: Directory containing the individual tile segmentation results. + output_path: Path to the output parquet file. + tile_index_list: Optional list of tile indices to include. + overwrite: If True, overwrite existing output files. + """ + cmd = ["vpt", "compile-tile-segmentation"] + cmd.extend(["--input-dir", input_dir]) + cmd.extend(["--output-path", output_path]) + + if tile_index_list: + cmd.extend(["--tile-index-list"] + [str(i) for i in tile_index_list]) + + if overwrite: + cmd.append("--overwrite") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_derive_entity_metadata( + input_boundaries: str, + output_path: str, + overwrite: bool = False, +) -> Dict[str, Any]: + """ + Computes geometric attributes (area, center, etc.) for each segmented entity. + + Args: + input_boundaries: Path to the parquet file containing cell boundaries. + output_path: Path to the output metadata parquet file. + overwrite: If True, overwrite existing output files. + """ + cmd = ["vpt", "derive-entity-metadata"] + cmd.extend(["--input-boundaries", input_boundaries]) + cmd.extend(["--output-path", output_path]) + + if overwrite: + cmd.append("--overwrite") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_partition_transcripts( + input_boundaries: str, + transcripts: str, + output_path: str, + chunk_size: int = 1000000, +) -> Dict[str, Any]: + """ + Assigns each detected transcript to a cell entity based on boundaries. + + Args: + input_boundaries: Path to the parquet file containing cell boundaries. + transcripts: Path to the detected transcripts file (CSV or Parquet). + output_path: Path to the output cell-by-gene matrix or partitioned transcripts. + chunk_size: Number of transcripts to process at once. + """ + cmd = ["vpt", "partition-transcripts"] + cmd.extend(["--input-boundaries", input_boundaries]) + cmd.extend(["--transcripts", transcripts]) + cmd.extend(["--output-path", output_path]) + cmd.extend(["--chunk-size", str(chunk_size)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_sum_signals( + input_boundaries: str, + images: str, + output_path: str, + overwrite: bool = False, +) -> Dict[str, Any]: + """ + Computes image intensity values (e.g., DAPI, PolyT) per segmented entity. + + Args: + input_boundaries: Path to the parquet file containing cell boundaries. + images: Path to the directory containing image tiles or mosaic. + output_path: Path to the output intensity CSV/Parquet file. + overwrite: If True, overwrite existing output files. + """ + cmd = ["vpt", "sum-signals"] + cmd.extend(["--input-boundaries", input_boundaries]) + cmd.extend(["--images", images]) + cmd.extend(["--output-path", output_path]) + + if overwrite: + cmd.append("--overwrite") + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_update_vzg( + vzg_path: str, + boundaries: str, + matrix: str, + output_path: str, +) -> Dict[str, Any]: + """ + Updates an existing VZG file with new boundaries and expression matrix data. + + Args: + vzg_path: Path to the original .vzg file. + boundaries: Path to the new cell boundaries parquet file. + matrix: Path to the new cell-by-gene matrix file. + output_path: Path where the updated .vzg file will be saved. + """ + cmd = ["vpt", "update-vzg"] + cmd.extend(["--vzg-path", vzg_path]) + cmd.extend(["--boundaries", boundaries]) + cmd.extend(["--matrix", matrix]) + cmd.extend(["--output-path", output_path]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_convert_geometry( + input_path: str, + output_path: str, + input_format: str = "geojson", +) -> Dict[str, Any]: + """ + Converts external boundaries (GeoJSON or HDF5) into VPT-compatible parquet format. + + Args: + input_path: Path to the external boundary file. + output_path: Path to the output parquet file. + input_format: Format of the input file ('geojson' or 'hdf5'). + """ + cmd = ["vpt", "convert-geometry"] + cmd.extend(["--input-path", input_path]) + cmd.extend(["--output-path", output_path]) + cmd.extend(["--input-format", input_format]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_path + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_convert_to_ome( + input_image: str, + output_image: str, + pixel_size: float = 0.108, +) -> Dict[str, Any]: + """ + Converts large 16-bit mosaic TIFF images to pyramidal OME-TIFF. + + Args: + input_image: Path to the input TIFF file. + output_image: Path to the output OME-TIFF file. + pixel_size: Pixel size in microns. + """ + cmd = ["vpt", "convert-to-ome"] + cmd.extend(["--input-image", input_image]) + cmd.extend(["--output-image", output_image]) + cmd.extend(["--pixel-size", str(pixel_size)]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_image + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } + +@mcp.tool() +def vpt_convert_to_rgb_ome( + red_image: str, + green_image: str, + blue_image: str, + output_image: str, +) -> Dict[str, Any]: + """ + Converts up to three flat TIFF images into an RGB pyramidal OME-TIFF. + + Args: + red_image: Path to the TIFF for the red channel. + green_image: Path to the TIFF for the green channel. + blue_image: Path to the TIFF for the blue channel. + output_image: Path to the output RGB OME-TIFF file. + """ + cmd = ["vpt", "convert-to-rgb-ome"] + cmd.extend(["--red-image", red_image]) + cmd.extend(["--green-image", green_image]) + cmd.extend(["--blue-image", blue_image]) + cmd.extend(["--output-image", output_image]) + + try: + result = subprocess.run(cmd, capture_output=True, text=True, check=True) + return { + "command_executed": " ".join(cmd), + "stdout": result.stdout, + "stderr": result.stderr, + "output_file": output_image + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": str(e), + "stdout": e.stdout, + "stderr": e.stderr + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..28d3749fc078b9ea6007c6449a381039406e8147 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/app/vpt_server.py') +SERVER_NAME = 'biosci_vpt' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..c7697037a59caceef2d59e916de5678b57a1df86 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-vpt: + build: . + image: mcp-vpt:latest + container_name: mcp-vpt + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=vpt + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b04606155597590e2c448409be725f028728dfad --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - vpt + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_vpt/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e064fa62a303e42f97e65ad3b5a821083b7ec379 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install wasp2 via conda (e.g., from bioconda) +RUN conda install -c bioconda wasp2 -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/wasp2_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/wasp2_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/wasp2_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_server.py new file mode 100644 index 0000000000000000000000000000000000000000..a0436135af4d80033b62a88f9a68a15c5f276c9f --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_server.py @@ -0,0 +1,412 @@ +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional + +# Mock decorator for stand-alone execution +class mcp: + def tool(func): + return func + +# Tool: wasp2 +# summary: Allele-specific analysis of next-generation sequencing data with Rust acceleration + +@mcp.tool +def map_make_reads( + input_bam: Path, + variants_vcf: Path, + output_dir: Path, + samples: Optional[List[str]] = None, + is_paired_end: bool = True, + is_sorted: bool = True, + threads: int = 1, +) -> dict: + """ + Generates FASTQ files with swapped alleles for remapping to correct mapping bias. + + This corresponds to the 'wasp2-map make-reads' command. It identifies reads + overlapping heterozygous SNPs and creates new FASTQ files where the alternate + allele is swapped into the read sequence. These FASTQs are then realigned + to check for mapping bias. + """ + if not input_bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {input_bam}") + if not variants_vcf.is_file(): + raise FileNotFoundError(f"Input VCF file not found: {variants_vcf}") + if threads < 1: + raise ValueError("threads must be a positive integer.") + + output_dir.mkdir(parents=True, exist_ok=True) + + cmd = [ + "wasp2-map", + "make-reads", + str(input_bam), + str(variants_vcf), + "-o", + str(output_dir), + "--threads", + str(threads), + ] + + if samples: + cmd.extend(["-s", ",".join(samples)]) + if not is_paired_end: + cmd.append("--no-paired-end") + if not is_sorted: + cmd.append("--no-sorted") + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + # Output files are generated inside the output_dir, including a key JSON file + output_files = list(output_dir.glob("*")) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": { + "remap_directory": str(output_dir), + "generated_files": [str(f) for f in output_files] + } + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "WASP2 map make-reads failed", + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } + +@mcp.tool +def map_filter_remapped( + remapped_bam: Path, + json_file: Path, + output_bam: Path, +) -> dict: + """ + Filters a remapped BAM file to remove reads with mapping bias. + + This corresponds to the 'wasp2-map filter-remapped' command. It uses the + JSON file from 'make-reads' and the realigned BAM to identify and discard + reads that map inconsistently, thus correcting for reference bias. + """ + if not remapped_bam.is_file(): + raise FileNotFoundError(f"Remapped BAM file not found: {remapped_bam}") + if not json_file.is_file(): + raise FileNotFoundError(f"WASP data JSON file not found: {json_file}") + + output_bam.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "wasp2-map", + "filter-remapped", + str(remapped_bam), + "-j", + str(json_file), + "-o", + str(output_bam), + ] + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"filtered_bam": str(output_bam)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "WASP2 map filter-remapped failed", + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } + +@mcp.tool +def count_variants_bulk( + input_bam: Path, + variants_vcf: Path, + output_file: Path, + samples: Optional[List[str]] = None, + min_mapq: int = 20, + min_baseq: int = 10, + threads: int = 1, +) -> dict: + """ + Counts allele-specific reads from a BAM file for bulk sequencing data. + + This corresponds to the 'wasp2-count count-variants' command. It tallies + reference and alternate allele counts at heterozygous SNP locations for + downstream allelic imbalance analysis. + """ + if not input_bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {input_bam}") + if not variants_vcf.is_file(): + raise FileNotFoundError(f"Input VCF file not found: {variants_vcf}") + if min_mapq < 0: + raise ValueError("min_mapq must be non-negative.") + if min_baseq < 0: + raise ValueError("min_baseq must be non-negative.") + if threads < 1: + raise ValueError("threads must be a positive integer.") + + output_file.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "wasp2-count", + "count-variants", + str(input_bam), + str(variants_vcf), + "-o", + str(output_file), + "--min-mapq", + str(min_mapq), + "--min-baseq", + str(min_baseq), + "--threads", + str(threads), + ] + + if samples: + cmd.extend(["-s", ",".join(samples)]) + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"counts_tsv": str(output_file)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "WASP2 count variants (bulk) failed", + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } + +@mcp.tool +def count_variants_sc( + input_bam: Path, + variants_vcf: Path, + barcodes_tsv: Path, + out_file: Path, + samples: List[str], + feature_gtf: Optional[Path] = None, + barcode_tag: str = "CB", + umi_tag: str = "UB", + min_mapq: int = 20, + min_baseq: int = 10, + threads: int = 1, +) -> dict: + """ + Counts allele-specific reads per cell from a single-cell BAM file. + + This corresponds to the 'wasp2-count count-variants-sc' command. It generates + an AnnData (h5ad) object containing allele counts per cell per variant, + suitable for single-cell allelic imbalance analysis. + """ + if not input_bam.is_file(): + raise FileNotFoundError(f"Input BAM file not found: {input_bam}") + if not variants_vcf.is_file(): + raise FileNotFoundError(f"Input VCF file not found: {variants_vcf}") + if not barcodes_tsv.is_file(): + raise FileNotFoundError(f"Barcodes TSV file not found: {barcodes_tsv}") + if feature_gtf and not feature_gtf.is_file(): + raise FileNotFoundError(f"Feature GTF file not found: {feature_gtf}") + if not samples: + raise ValueError("At least one sample must be provided.") + if min_mapq < 0: + raise ValueError("min_mapq must be non-negative.") + if min_baseq < 0: + raise ValueError("min_baseq must be non-negative.") + if threads < 1: + raise ValueError("threads must be a positive integer.") + + out_file.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "wasp2-count", + "count-variants-sc", + str(input_bam), + str(variants_vcf), + str(barcodes_tsv), + "--out_file", + str(out_file), + "--samples", + ",".join(samples), + "--barcode-tag", + barcode_tag, + "--umi-tag", + umi_tag, + "--min-mapq", + str(min_mapq), + "--min-baseq", + str(min_baseq), + "--threads", + str(threads), + ] + + if feature_gtf: + cmd.extend(["--feature", str(feature_gtf)]) + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"allele_counts_h5ad": str(out_file)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "WASP2 count variants (single-cell) failed", + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } + +@mcp.tool +def analyze_find_imbalance_bulk( + counts_tsv: Path, + output_file: Path, + min_reads: int = 20, + fdr_method: str = "bh", +) -> dict: + """ + Performs statistical tests for allelic imbalance on bulk sequencing count data. + + This corresponds to the 'wasp2-analyze find-imbalance' command. It uses a + beta-binomial likelihood-ratio test to identify significant allelic imbalance + from the counts generated by 'count-variants'. + """ + if not counts_tsv.is_file(): + raise FileNotFoundError(f"Counts TSV file not found: {counts_tsv}") + if min_reads < 1: + raise ValueError("min_reads must be a positive integer.") + + output_file.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "wasp2-analyze", + "find-imbalance", + str(counts_tsv), + "-o", + str(output_file), + "--min-reads", + str(min_reads), + "--fdr-method", + fdr_method, + ] + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"imbalance_results_tsv": str(output_file)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "WASP2 find imbalance (bulk) failed", + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } + +@mcp.tool +def analyze_find_imbalance_sc( + allele_counts_h5ad: Path, + barcode_groups_tsv: Path, + output_file: Path, + sample: str, + min_reads: int = 20, + fdr_method: str = "bh", +) -> dict: + """ + Performs statistical tests for allelic imbalance on single-cell count data. + + This corresponds to the 'wasp2-analyze find-imbalance-sc' command. It aggregates + counts by cell groups (e.g., cell types) and performs tests for allelic + imbalance within each group. + """ + if not allele_counts_h5ad.is_file(): + raise FileNotFoundError(f"Allele counts H5AD file not found: {allele_counts_h5ad}") + if not barcode_groups_tsv.is_file(): + raise FileNotFoundError(f"Barcode groups TSV file not found: {barcode_groups_tsv}") + if not sample: + raise ValueError("A sample name must be provided.") + if min_reads < 1: + raise ValueError("min_reads must be a positive integer.") + + output_file.parent.mkdir(parents=True, exist_ok=True) + + cmd = [ + "wasp2-analyze", + "find-imbalance-sc", + str(allele_counts_h5ad), + str(barcode_groups_tsv), + "-o", + str(output_file), + "--sample", + sample, + "--min-reads", + str(min_reads), + "--fdr-method", + fdr_method, + ] + + try: + process = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + return { + "command_executed": " ".join(cmd), + "stdout": process.stdout, + "stderr": process.stderr, + "output_files": {"imbalance_results_tsv": str(output_file)} + } + except subprocess.CalledProcessError as e: + return { + "command_executed": " ".join(cmd), + "error": "WASP2 find imbalance (single-cell) failed", + "stdout": e.stdout, + "stderr": e.stderr, + "return_code": e.returncode, + } \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..87f720854d0361e39dc24ecfb16007cd0c999d5e --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/app/wasp2_server.py') +SERVER_NAME = 'biosci_wasp2' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d2833564a9d2fb972e51832f202809305ad72acc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-wasp2: + build: . + image: mcp-wasp2:latest + container_name: mcp-wasp2 + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=wasp2 + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..034e7c3a3ee93c5df21ccdecd3f1a6c99883ddc3 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - wasp2 + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_wasp2/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f8dcad7b877ae7fd7d20ef8f91c6ae35a2e2037b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install womtool via conda (e.g., from bioconda) +RUN conda install -c bioconda womtool -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/womtool_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/womtool_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/womtool_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/womtool_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/womtool_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d48a6667ee226bda780bd88cb80d006663450f12 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/womtool_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/app/womtool_server.py') +SERVER_NAME = 'biosci_womtool' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..345d4dfce4c34e2a40740fd1e0ba7a0709695637 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - womtool + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_womtool/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/Dockerfile b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4f9549fc105d7a52e56c12ef90556549a065d976 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/Dockerfile @@ -0,0 +1,40 @@ + +FROM python:3.10-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y default-jre wget curl && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && bash /tmp/miniconda.sh -b -p /opt/conda && rm /tmp/miniconda.sh + +# Add conda to PATH +ENV PATH="/opt/conda/bin:$PATH" + +# Install yacrd via conda (e.g., from bioconda) +RUN conda install -c bioconda yacrd -y && conda clean -a + +# Install Python dependencies +RUN pip install uv +RUN uv pip install --system fastmcp + +# Create app directory +WORKDIR /app + +# Copy your MCP server +COPY app/yacrd_server.py /app/ + +# Create workspace and output directories +RUN mkdir -p /app/workspace /app/output + +# Make sure the server script is executable +RUN chmod +x /app/yacrd_server.py + +# Expose port for MCP over HTTP (optional) +EXPOSE 8000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD python -c "import sys; sys.exit(0)" + +# Default command runs the MCP server via stdio +CMD ["python", "/app/yacrd_server.py"] + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/requirements.txt @@ -0,0 +1 @@ + diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_server.py new file mode 100644 index 0000000000000000000000000000000000000000..d4db1e32a6fe838bee93e1646be6b5c87d8b5d6b --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_server.py @@ -0,0 +1,460 @@ +import subprocess +from pathlib import Path +from typing import List, Optional, Dict, Any +import tempfile +import shutil + +# Placeholder for the ondisk prefix that will be replaced with a safe temporary path +ONDISK_PREFIX_PLACEHOLDER = "__MCP_ONDISK_PREFIX_PLACEHOLDER__" + +def _run_yacrd_command( + command_args: List[str], + output_files: List[Path], + user_ondisk_prefix: Optional[str] = None +) -> Dict[str, Any]: + """ + Helper function to run yacrd commands and handle output. + + Args: + command_args: A list of command-line arguments for yacrd. + output_files: A list of expected output file paths to check for existence. + user_ondisk_prefix: The user-provided prefix for on-disk temporary files. + If provided, a safe temporary directory will be used. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + temp_dir_obj = None + final_command_args = list(command_args) # Work with a mutable copy + + if user_ondisk_prefix: + temp_dir_obj = tempfile.TemporaryDirectory() + temp_dir_path = Path(temp_dir_obj.name) + # yacrd will create files like temp_dir_path/user_ondisk_prefix.0 + # If user_ondisk_prefix contains path separators, yacrd might delete the parent. + # By using temp_dir_path as the parent, we ensure only our temporary directory is affected. + actual_ondisk_path_for_yacrd = str(temp_dir_path / user_ondisk_prefix) + + # Find and replace the placeholder for -d/--ondisk + try: + ondisk_idx = final_command_args.index(ONDISK_PREFIX_PLACEHOLDER) + final_command_args[ondisk_idx] = actual_ondisk_path_for_yacrd + except ValueError: + # This should not happen if _build_base_options is correctly used with ondisk_prefix + pass + + cmd = ["yacrd"] + final_command_args + command_executed = " ".join(map(str, cmd)) + + stdout = "" + stderr = "" + try: + result = subprocess.run( + cmd, + check=True, + capture_output=True, + text=True, + ) + stdout = result.stdout + stderr = result.stderr + except subprocess.CalledProcessError as e: + error_output = { + "command_executed": command_executed, + "stdout": e.stdout, + "stderr": e.stderr, + "error": f"yacrd command failed with exit code {e.returncode}", + "output_files": [] + } + return error_output + except FileNotFoundError: + error_output = { + "command_executed": command_executed, + "stdout": "", + "stderr": "yacrd executable not found. Please ensure it is installed and in your PATH.", + "error": "yacrd executable not found", + "output_files": [] + } + return error_output + finally: + if temp_dir_obj: + temp_dir_obj.cleanup() # Ensure cleanup after success or any error + + return { + "command_executed": command_executed, + "stdout": stdout, + "stderr": stderr, + "output_files": [str(f) for f in output_files if f.exists()] + } + +def _build_base_options( + coverage_threshold: int, + ondisk_prefix: Optional[str], + not_coverage_ratio: float, + ondisk_buffer_size: int, + read_buffer_size: int, + threads: int, +) -> List[str]: + """ + Builds the common base options for yacrd. + + Args: + coverage_threshold: If coverage reaches this value, the region is marked as bad. + ondisk_prefix: The user-provided prefix for on-disk temporary files. + not_coverage_ratio: If the ratio of bad region length on total length is lower than + this value, the read is marked as NotCovered. + ondisk_buffer_size: Buffer size for on-disk mode. + read_buffer_size: Buffer size for reading PAF file. + threads: Number of threads use by yacrd. + + Returns: + A list of command-line arguments for the common yacrd options. + """ + options = [] + + if coverage_threshold < 0: + raise ValueError("Coverage threshold must be non-negative.") + options.extend(["-c", str(coverage_threshold)]) + + if ondisk_prefix is not None: + options.extend(["-d", ONDISK_PREFIX_PLACEHOLDER]) # Add placeholder for later replacement + + if not 0.0 <= not_coverage_ratio <= 1.0: + raise ValueError("Not-coverage ratio must be between 0.0 and 1.0.") + options.extend(["-n", str(not_coverage_ratio)]) + + if ondisk_buffer_size <= 0: + raise ValueError("Ondisk buffer size must be positive.") + options.extend(["--ondisk-buffer-size", str(ondisk_buffer_size)]) + + if read_buffer_size <= 0: + raise ValueError("Read buffer size must be positive.") + options.extend(["--read-buffer-size", str(read_buffer_size)]) + + if threads < 0: + raise ValueError("Number of threads must be non-negative.") + options.extend(["-t", str(threads)]) + + return options + +@mcp.tool() +def yacrd_report( + input_overlap_file: Path, + output_report_file: Path, + coverage_threshold: int = 0, + ondisk_prefix: Optional[str] = None, + not_coverage_ratio: float = 0.8, + ondisk_buffer_size: int = 64000000, + read_buffer_size: int = 8192, + threads: int = 1, +) -> Dict[str, Any]: + """ + Detects chimeric and not-covered regions in long reads based on overlap mapping results + and generates a yacrd report file. + + Args: + input_overlap_file: Path to input overlap file (.paf|.m4|.mhap) or yacrd report (.yacrd). + Format is autodetected and compression is allowed (gz|bzip2|lzma). + output_report_file: Path to the output yacrd report file. + coverage_threshold: If coverage reaches this value, the region is marked as bad. + Default is 0. + ondisk_prefix: yacrd switches to 'ondisk' mode which will reduce memory usage but + increase computation time. The value passed as a parameter is used + as a prefix for the temporary files created by yacrd. If None, + on-disk mode is not used. + not_coverage_ratio: If the ratio of bad region length on total length is lower than + this value, the read is marked as NotCovered. Default is 0.8. + ondisk_buffer_size: With the default value, yacrd in 'ondisk' mode uses around 1 GBytes. + You can increase to reduce runtime but increase memory usage. + Default is 64000000. + read_buffer_size: Control the size of the buffer used to read paf file. Default is 8192. + threads: Number of threads use by yacrd. 0 means all threads available. Default is 1. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # Input validation + if not input_overlap_file.is_file(): + raise FileNotFoundError(f"Input overlap file not found: {input_overlap_file}") + if not output_report_file.parent.is_dir(): + output_report_file.parent.mkdir(parents=True, exist_ok=True) + + base_options = _build_base_options( + coverage_threshold, ondisk_prefix, not_coverage_ratio, + ondisk_buffer_size, read_buffer_size, threads + ) + + command_args = [ + "-i", str(input_overlap_file), + "-o", str(output_report_file), + ] + base_options + + result = _run_yacrd_command(command_args, [output_report_file], user_ondisk_prefix=ondisk_prefix) + return result + +@mcp.tool() +def yacrd_filter( + input_overlap_file: Path, + output_report_file: Path, + input_sequence_file: Path, + output_sequence_file: Path, + coverage_threshold: int = 0, + ondisk_prefix: Optional[str] = None, + not_coverage_ratio: float = 0.8, + ondisk_buffer_size: int = 64000000, + read_buffer_size: int = 8192, + threads: int = 1, +) -> Dict[str, Any]: + """ + Filters a sequence file, removing records marked as Chimeric or NotCovered + based on an internally generated yacrd report. + + Args: + input_overlap_file: Path to input overlap file (.paf|.m4|.mhap). + Used to generate the internal yacrd report. + output_report_file: Path to the intermediate yacrd report file that will be generated. + This file is used internally by the filter subcommand. + input_sequence_file: Path to the input sequence file (.fasta|.fastq). + output_sequence_file: Path to the output filtered sequence file. + coverage_threshold: If coverage reaches this value, the region is marked as bad. + Default is 0. + ondisk_prefix: yacrd switches to 'ondisk' mode which will reduce memory usage but + increase computation time. The value passed as a parameter is used + as a prefix for the temporary files created by yacrd. If None, + on-disk mode is not used. + not_coverage_ratio: If the ratio of bad region length on total length is lower than + this value, the read is marked as NotCovered. Default is 0.8. + ondisk_buffer_size: With the default value, yacrd in 'ondisk' mode uses around 1 GBytes. + You can increase to reduce runtime but increase memory usage. + Default is 64000000. + read_buffer_size: Control the size of the buffer used to read paf file. Default is 8192. + threads: Number of threads use by yacrd. 0 means all threads available. Default is 1. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # Input validation + if not input_overlap_file.is_file(): + raise FileNotFoundError(f"Input overlap file not found: {input_overlap_file}") + if not input_sequence_file.is_file(): + raise FileNotFoundError(f"Input sequence file not found: {input_sequence_file}") + if not output_report_file.parent.is_dir(): + output_report_file.parent.mkdir(parents=True, exist_ok=True) + if not output_sequence_file.parent.is_dir(): + output_sequence_file.parent.mkdir(parents=True, exist_ok=True) + + base_options = _build_base_options( + coverage_threshold, ondisk_prefix, not_coverage_ratio, + ondisk_buffer_size, read_buffer_size, threads + ) + + command_args = [ + "-i", str(input_overlap_file), + "-o", str(output_report_file), + "filter", + "-i", str(input_sequence_file), + "-o", str(output_sequence_file), + ] + base_options + + result = _run_yacrd_command(command_args, [output_report_file, output_sequence_file], user_ondisk_prefix=ondisk_prefix) + return result + +@mcp.tool() +def yacrd_extract( + input_overlap_file: Path, + output_report_file: Path, + input_sequence_file: Path, + output_sequence_file: Path, + coverage_threshold: int = 0, + ondisk_prefix: Optional[str] = None, + not_coverage_ratio: float = 0.8, + ondisk_buffer_size: int = 64000000, + read_buffer_size: int = 8192, + threads: int = 1, +) -> Dict[str, Any]: + """ + Extracts records marked as Chimeric or NotCovered from a sequence file + based on an internally generated yacrd report. + + Args: + input_overlap_file: Path to input overlap file (.paf|.m4|.mhap). + Used to generate the internal yacrd report. + output_report_file: Path to the intermediate yacrd report file that will be generated. + This file is used internally by the extract subcommand. + input_sequence_file: Path to the input sequence file (.fasta|.fastq). + output_sequence_file: Path to the output extracted sequence file. + coverage_threshold: If coverage reaches this value, the region is marked as bad. + Default is 0. + ondisk_prefix: yacrd switches to 'ondisk' mode which will reduce memory usage but + increase computation time. The value passed as a parameter is used + as a prefix for the temporary files created by yacrd. If None, + on-disk mode is not used. + not_coverage_ratio: If the ratio of bad region length on total length is lower than + this value, the read is marked as NotCovered. Default is 0.8. + ondisk_buffer_size: With the default value, yacrd in 'ondisk' mode uses around 1 GBytes. + You can increase to reduce runtime but increase memory usage. + Default is 64000000. + read_buffer_size: Control the size of the buffer used to read paf file. Default is 8192. + threads: Number of threads use by yacrd. 0 means all threads available. Default is 1. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # Input validation + if not input_overlap_file.is_file(): + raise FileNotFoundError(f"Input overlap file not found: {input_overlap_file}") + if not input_sequence_file.is_file(): + raise FileNotFoundError(f"Input sequence file not found: {input_sequence_file}") + if not output_report_file.parent.is_dir(): + output_report_file.parent.mkdir(parents=True, exist_ok=True) + if not output_sequence_file.parent.is_dir(): + output_sequence_file.parent.mkdir(parents=True, exist_ok=True) + + base_options = _build_base_options( + coverage_threshold, ondisk_prefix, not_coverage_ratio, + ondisk_buffer_size, read_buffer_size, threads + ) + + command_args = [ + "-i", str(input_overlap_file), + "-o", str(output_report_file), + "extract", + "-i", str(input_sequence_file), + "-o", str(output_sequence_file), + ] + base_options + + result = _run_yacrd_command(command_args, [output_report_file, output_sequence_file], user_ondisk_prefix=ondisk_prefix) + return result + +@mcp.tool() +def yacrd_split( + input_overlap_file: Path, + output_report_file: Path, + input_sequence_file: Path, + output_sequence_file: Path, + coverage_threshold: int = 0, + ondisk_prefix: Optional[str] = None, + not_coverage_ratio: float = 0.8, + ondisk_buffer_size: int = 64000000, + read_buffer_size: int = 8192, + threads: int = 1, +) -> Dict[str, Any]: + """ + Splits a sequence file, removing bad regions in the middle of reads and + removing NotCovered reads, based on an internally generated yacrd report. + + Args: + input_overlap_file: Path to input overlap file (.paf|.m4|.mhap). + Used to generate the internal yacrd report. + output_report_file: Path to the intermediate yacrd report file that will be generated. + This file is used internally by the split subcommand. + input_sequence_file: Path to the input sequence file (.fasta|.fastq). + output_sequence_file: Path to the output split sequence file. + coverage_threshold: If coverage reaches this value, the region is marked as bad. + Default is 0. + ondisk_prefix: yacrd switches to 'ondisk' mode which will reduce memory usage but + increase computation time. The value passed as a parameter is used + as a prefix for the temporary files created by yacrd. If None, + on-disk mode is not used. + not_coverage_ratio: If the ratio of bad region length on total length is lower than + this value, the read is marked as NotCovered. Default is 0.8. + ondisk_buffer_size: With the default value, yacrd in 'ondisk' mode uses around 1 GBytes. + You can increase to reduce runtime but increase memory usage. + Default is 64000000. + read_buffer_size: Control the size of the buffer used to read paf file. Default is 8192. + threads: Number of threads use by yacrd. 0 means all threads available. Default is 1. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # Input validation + if not input_overlap_file.is_file(): + raise FileNotFoundError(f"Input overlap file not found: {input_overlap_file}") + if not input_sequence_file.is_file(): + raise FileNotFoundError(f"Input sequence file not found: {input_sequence_file}") + if not output_report_file.parent.is_dir(): + output_report_file.parent.mkdir(parents=True, exist_ok=True) + if not output_sequence_file.parent.is_dir(): + output_sequence_file.parent.mkdir(parents=True, exist_ok=True) + + base_options = _build_base_options( + coverage_threshold, ondisk_prefix, not_coverage_ratio, + ondisk_buffer_size, read_buffer_size, threads + ) + + command_args = [ + "-i", str(input_overlap_file), + "-o", str(output_report_file), + "split", + "-i", str(input_sequence_file), + "-o", str(output_sequence_file), + ] + base_options + + result = _run_yacrd_command(command_args, [output_report_file, output_sequence_file], user_ondisk_prefix=ondisk_prefix) + return result + +@mcp.tool() +def yacrd_scrubb( + input_overlap_file: Path, + output_report_file: Path, + input_sequence_file: Path, + output_sequence_file: Path, + coverage_threshold: int = 0, + ondisk_prefix: Optional[str] = None, + not_coverage_ratio: float = 0.8, + ondisk_buffer_size: int = 64000000, + read_buffer_size: int = 8192, + threads: int = 1, +) -> Dict[str, Any]: + """ + Removes all bad regions from reads in a sequence file and removes NotCovered reads, + based on an internally generated yacrd report. + + Args: + input_overlap_file: Path to input overlap file (.paf|.m4|.mhap). + Used to generate the internal yacrd report. + output_report_file: Path to the intermediate yacrd report file that will be generated. + This file is used internally by the scrubb subcommand. + input_sequence_file: Path to the input sequence file (.fasta|.fastq). + output_sequence_file: Path to the output scrubbed sequence file. + coverage_threshold: If coverage reaches this value, the region is marked as bad. + Default is 0. + ondisk_prefix: yacrd switches to 'ondisk' mode which will reduce memory usage but + increase computation time. The value passed as a parameter is used + as a prefix for the temporary files created by yacrd. If None, + on-disk mode is not used. + not_coverage_ratio: If the ratio of bad region length on total length is lower than + this value, the read is marked as NotCovered. Default is 0.8. + ondisk_buffer_size: With the default value, yacrd in 'ondisk' mode uses around 1 GBytes. + You can increase to reduce runtime but increase memory usage. + Default is 64000000. + read_buffer_size: Control the size of the buffer used to read paf file. Default is 8192. + threads: Number of threads use by yacrd. 0 means all threads available. Default is 1. + + Returns: + A dictionary containing the command executed, stdout, stderr, and a list of output files. + """ + # Input validation + if not input_overlap_file.is_file(): + raise FileNotFoundError(f"Input overlap file not found: {input_overlap_file}") + if not input_sequence_file.is_file(): + raise FileNotFoundError(f"Input sequence file not found: {input_sequence_file}") + if not output_report_file.parent.is_dir(): + output_report_file.parent.mkdir(parents=True, exist_ok=True) + if not output_sequence_file.parent.is_dir(): + output_sequence_file.parent.mkdir(parents=True, exist_ok=True) + + base_options = _build_base_options( + coverage_threshold, ondisk_prefix, not_coverage_ratio, + ondisk_buffer_size, read_buffer_size, threads + ) + + command_args = [ + "-i", str(input_overlap_file), + "-o", str(output_report_file), + "scrubb", + "-i", str(input_sequence_file), + "-o", str(output_sequence_file), + ] + base_options + + result = _run_yacrd_command(command_args, [output_report_file, output_sequence_file], user_ondisk_prefix=ondisk_prefix) + return result \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_shim_server.py b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_shim_server.py new file mode 100644 index 0000000000000000000000000000000000000000..840a8be46597c58615f642c712d8d67b81dc9df5 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_shim_server.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import ast +from pathlib import Path + +from mcp.server.fastmcp import FastMCP + + +SOURCE_SERVER = Path('/225040511/project/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/app/yacrd_server.py') +SERVER_NAME = 'biosci_yacrd' + + +class _ShimMCP: + @staticmethod + def tool(): + def _decorator(fn): + return fn + return _decorator + + +def _load_functions(): + code = SOURCE_SERVER.read_text(encoding="utf-8") + tree = ast.parse(code, filename=str(SOURCE_SERVER)) + function_names = [n.name for n in tree.body if isinstance(n, ast.FunctionDef) and not n.name.startswith("_")] + namespace = { + "__name__": "__mcp_source__", + "mcp": _ShimMCP(), + } + exec(compile(code, str(SOURCE_SERVER), "exec"), namespace, namespace) + loaded = [] + for name in function_names: + fn = namespace.get(name) + if callable(fn): + loaded.append(fn) + return loaded + + +mcp = FastMCP(SERVER_NAME) +for _fn in _load_functions(): + mcp.tool()(_fn) + + +if __name__ == "__main__": + mcp.run(transport="stdio") diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/docker-compose.yml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..af8d6bf9b7445d6494ec59e2b7b1fd8e6abe8e20 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + mcp-yacrd: + build: . + image: mcp-yacrd:latest + container_name: mcp-yacrd + ports: + - "8000:8000" + environment: + - MCP_SERVER_NAME=yacrd + volumes: + - ./workspace:/app/workspace + - ./output:/app/output + restart: unless-stopped + healthcheck: + test: ["CMD", "python", "-c", "import sys; sys.exit(0)"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/environment.yaml b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/environment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d1e208d90c43e9cae8eb48e91b1e3d6929a2fe76 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/environment.yaml @@ -0,0 +1,10 @@ + +name: mcp-tool +channels: + - bioconda + - conda-forge + - defaults +dependencies: + - yacrd + - python=3.10 + \ No newline at end of file diff --git a/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/requirements.txt b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc4702c254694b94825ae9800a56d8f68b1bcda0 --- /dev/null +++ b/BioScientist/agent_system/toolbase/mcp_batch_from_manual_txt/mcp_yacrd/requirements.txt @@ -0,0 +1,2 @@ +fastmcp +mcp diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278970/aux_info/ambig_info.tsv b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278970/aux_info/ambig_info.tsv new file mode 100644 index 0000000000000000000000000000000000000000..578f9d8113d729b0004f1b5cc236a1986b6f7686 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278970/aux_info/ambig_info.tsv @@ -0,0 +1,5924 @@ +UniqueCount AmbigCount +811 0 +1327 0 +470 1 +1103 0 +1640 5 +549 0 +4741 0 +2248 1 +302 0 +4868 6 +2107 0 +616 0 +916 0 +1160 0 +107 0 +29 0 +3165 4 +486 0 +2294 1 +2651 1 +1477 1 +3010 0 +144 0 +1732 1 +2238 1 +1232 2 +32 0 +247 0 +19 0 +926 0 +2106 1 +4817 2 +2657 1 +4023 7 +239 1 +1847 0 +2299 1 +245 1 +1 0 +1231 1 +1239 0 +79 1 +258 63 +804 29 +90 0 +1210 0 +2465 9 +8023 2 +2692 4 +1141 0 +687 1 +1982 0 +1881 0 +1031 0 +655 0 +1176 0 +1874 2 +849 0 +646 1 +4279 8 +2901 5 +1376 0 +3 0 +1348 0 +8006 1 +2211 1 +501 0 +1343 3 +11 268 +518 0 +1832 6 +5197 0 +3496 3 +767 0 +596 0 +2149 0 +950 0 +396 0 +2410 1 +868 0 +477 0 +1027 0 +430 0 +1278 1 +0 0 +1180 0 +484 0 +3105 0 +0 0 +5 3 +10371 31 +41 0 +459 0 +694 0 +107 11 +7317 43 +195 0 +996 1 +1484 2 +573 2 +241 0 +3102 13 +639 0 +804 3 +29 0 +314 0 +1399 1 +273 0 +276 0 +8 0 +2401 2 +177 0 +741 0 +577 0 +379 0 +278 0 +167 0 +3671 0 +1473 0 +1986 1 +38 0 +1130 0 +1403 4 +772 0 +3982 3 +143 0 +8629 4 +1530 0 +979 0 +377 0 +1127 0 +1810 1 +134 1 +1279 4 +783 0 +10731 1 +1498 15 +1089 1 +337 0 +2221 2 +2105 1 +999 0 +1020 0 +238 0 +720 0 +2336 1 +745 0 +16308 63 +3122 5 +1708 0 +5690 3 +418 0 +1851 0 +2366 1 +3 0 +2316 1 +3384 1 +702 0 +801 0 +502 0 +2495 3 +0 0 +298 0 +418 0 +3300 1 +616 1 +8 46 +0 32 +0 45 +0 0 +1322 0 +522 0 +739 0 +8412 3 +430 0 +4992 2 +4652 0 +221 985 +1492 0 +2102 0 +1097 0 +2 0 +615 1 +1855 0 +638 0 +6004 14 +6 0 +474 985 +86 0 +114 0 +1524 1 +1025 0 +312 1 +626 0 +2193 1 +9 0 +679 0 +1529 0 +1054 0 +1395 2 +824 0 +243 0 +778 0 +1728 1 +840 0 +1346 1 +26 0 +388 0 +179 0 +8640 4 +617 2 +1756 1 +223 0 +542 0 +437 4 +349 0 +6669 2 +124 0 +4300 2 +7705 2 +121 0 +2354 0 +3006 2 +934 0 +557 0 +1092 0 +854 0 +284 0 +442 0 +104 0 +556 1 +1 0 +278 0 +72 0 +191 0 +1546 1 +3157 0 +398 0 +548 4 +555 0 +1046 0 +2602 1 +1692 4 +1986 0 +3214 3 +10994 6 +1274 1 +3942 3 +1042 0 +2867 3 +8190 4 +5178 4 +1814 0 +315 0 +751 0 +350 0 +7491 2 +532 0 +194 0 +1251 0 +469 0 +1467 0 +206 0 +365 0 +4941 1 +94 0 +1 0 +552 0 +1098 0 +1331 0 +1248 0 +2338 0 +142 0 +1170 0 +411 0 +41 0 +316 0 +654 1 +522 0 +3075 1 +169 0 +718 0 +719 0 +624 0 +1228 0 +12 0 +1013 0 +6560 5 +662 0 +1844 0 +1180 0 +55 0 +3978 2 +239 14 +3688 14 +605 0 +1075 0 +1728 0 +753 0 +2181 2 +826 1 +6883 1 +2620 3 +2366 7 +490 0 +953 2 +5616 2 +338 1 +1167 0 +949 0 +799 0 +602 0 +900 0 +204 0 +98 0 +1081 1 +1056 0 +11 0 +7349 31 +1265 0 +872 0 +1321 2 +73 0 +555 1 +1168 0 +4880 15 +467981 270 +6260 0 +102 0 +576 0 +112 0 +1874 3 +3022 1 +264 0 +1313 0 +9948 3 +2154 0 +13192 21 +2214 17 +1406 1 +2447 2 +708 0 +4071 13 +1683 1 +2426 8 +1439 0 +1083 0 +947 0 +459 0 +2208 1 +557 0 +1558 0 +1412 12 +81 12 +2643 1 +494 0 +619 0 +217 0 +79 0 +667 0 +1805 1 +1169 1 +1126 0 +1775 0 +1317 0 +1335 1 +2058 1 +139 0 +649 0 +994 0 +2100 1 +136 1 +7 26 +598 573 +155 0 +382 0 +3249 1 +3718 0 +3158 1 +1188 0 +107 0 +93 1 +8047 12 +586 1 +832 0 +1034 0 +10571 4 +1562 0 +1153 1 +1221 0 +572 0 +2334 1 +940 0 +3516 3 +1545 0 +619 0 +111 0 +559 0 +2441 0 +2292 1 +5 0 +373 0 +1660 0 +885 1 +11346 8 +222 0 +14 0 +44 0 +4627 2 +387 0 +1168 3 +781 2 +3 0 +1453 0 +299 0 +1118 0 +48 0 +356 0 +57 0 +104 0 +2 0 +1707 0 +2041 0 +9 0 +47 0 +3269 1 +288 3 +1243 0 +5 0 +10 0 +884 0 +94 0 +493 0 +834 0 +8022 17 +4443 2 +232 0 +1496 2 +2947 11 +551 1 +6167 13 +3872 3 +2942 5 +10081 6 +72 0 +1084 0 +754 0 +1486 0 +171 22 +560 1 +63 0 +19 0 +1618 0 +556 0 +1481 0 +331 0 +475 0 +1 102 +5135 3 +0 0 +49 0 +306 0 +1974 4 +500 0 +1053 1 +42 0 +635 0 +655 1 +11 102 +1 0 +507 0 +656 1 +202 0 +1883 0 +1625 0 +2420 1 +11911 2 +557 1 +231 0 +0 0 +58 0 +3614 4 +7594 1 +273 0 +316 0 +1080 1 +792 0 +0 0 +12451 9 +1316 1 +1174 1 +1926 0 +1698 0 +183 0 +3146 0 +968 0 +652 0 +1067 0 +745 0 +185 0 +1265 1 +975 0 +8307 9 +6547 6 +3329 0 +1627 0 +613 0 +566 0 +1320 0 +3101 0 +5234 16 +4400 1 +798 0 +441 0 +1453 0 +1820 0 +48 0 +18080 4 +504 0 +2430 0 +2343 0 +376 1 +570 0 +194 2 +881 0 +655 1 +232 0 +489 0 +711 0 +1190 0 +26 0 +2939 9 +2769 2 +1136 1 +808 0 +272 0 +528 0 +1378 0 +2167 0 +265 0 +4 99 +1344 0 +1131 0 +1009 0 +1510 0 +1283 1 +531 1 +484 0 +4234 0 +1418 0 +1395 0 +1 0 +129 0 +1792 2 +13 3 +2045 164 +508 0 +429 0 +259 0 +632 0 +425 0 +411 3 +97 0 +827 164 +660 0 +0 0 +625 0 +467 0 +501 0 +1466 0 +2347 1 +1125 1 +1158 1 +327 0 +793 0 +354 0 +3891 114 +5 0 +141 0 +1617 1 +1181 1 +4570 3 +1068 2 +0 0 +835 0 +1218 0 +890 1 +244 1 +798 1 +64 0 +11975 8 +10 0 +7 0 +3538 1 +20 0 +146 0 +2028 2 +34 0 +0 0 +0 0 +359 0 +2198 1 +2 0 +2272 2 +777 0 +806 1 +11051 28 +540 0 +2040 0 +1311 0 +749 0 +1681 0 +3364 1 +227 1 +3403 5 +92 0 +133 0 +85 0 +292 1 +11 0 +100 0 +2 0 +89 0 +1160 0 +0 0 +930 0 +267 0 +2295 1 +31 0 +0 0 +610 1 +0 0 +0 0 +1256 0 +2154 1 +722 0 +36 1 +72 1 +12 0 +4 0 +1 0 +4542 2 +2 0 +1338 0 +1542 0 +918 0 +342 0 +341 0 +1408 2 +1741 0 +2270 1 +2667 1 +1295 0 +245 0 +1356 0 +699 0 +90 0 +161 0 +8296 0 +24 0 +10184 4 +937 0 +4065 0 +4567 1 +6622 2 +509 0 +570 0 +273 0 +3469 0 +1319 0 +773 0 +873 0 +306 0 +383 0 +533 0 +342 0 +610 1 +1969 1 +191 0 +1326 1 +1833 0 +2206 1 +789 0 +712 0 +793 0 +379 0 +566 0 +386 0 +10 0 +318 0 +0 0 +3 0 +1896 0 +145 0 +123 22 +43 22 +1510 629 +4241 3 +9419 19 +1005 1 +134 0 +689 0 +535 0 +2237 1 +2162 0 +442 0 +1216 0 +362 1 +971 0 +1878 1 +249 1 +2081 0 +19 0 +537 0 +267 0 +337 0 +639 0 +1935 4 +216 0 +1605 0 +1448 2 +527 1 +174 0 +23 0 +1757 0 +2126 1 +278 0 +421 0 +470 0 +191 0 +641 0 +348 0 +228 0 +751 0 +512 1 +0 0 +1956 0 +799 2 +651 0 +136 0 +54 0 +667 1 +0 0 +828 0 +5848 10 +1404 0 +826 0 +310 0 +575 0 +545 0 +1401 0 +1019 0 +702 0 +2073 3 +127 0 +1111 0 +11177 4 +1998 2 +1108 1 +1315 0 +881 5 +1484 0 +1209 0 +473 0 +2165 2 +425 0 +730 2 +5664 2 +525 0 +151 0 +624 0 +1338 0 +8880 3 +42 0 +624 1 +7408 5 +4245 0 +1506 2 +8007 1 +4742 3 +3040 2 +1031 0 +908 0 +2125 3 +797 0 +746 0 +1062 0 +653 0 +2212 5 +199 0 +776 0 +1200 1 +632 2 +604 0 +4944 4 +71 0 +296 1 +201 0 +0 0 +530 0 +1095 0 +407 0 +3061 0 +85 0 +190 0 +4455 5 +821 0 +454 0 +1220 1 +0 0 +706 0 +405 0 +229 0 +3175 0 +9120 4 +4206 8 +657 2 +1026 0 +1157 0 +606 1 +69 0 +162 0 +6156 1 +2752 0 +1718 0 +12 0 +318 0 +2852 1 +639 0 +1481 0 +922 0 +75 0 +6020 0 +636 0 +649 0 +2272 0 +875 1 +12 0 +92 0 +649 0 +422 0 +200 0 +3856 2 +2462 1 +102 0 +602 4 +1255 0 +717 0 +78 0 +177 0 +485 0 +326 0 +10149 3 +4267 0 +185 0 +2525 4 +236 0 +102 0 +91 0 +851 1 +318 0 +1409 1 +146 0 +1415 0 +910 0 +2379 0 +2 0 +2001 1 +684 0 +2104 1 +42 0 +276 0 +144 0 +789 0 +6724 0 +1695 0 +637 1 +1128 0 +0 0 +1 0 +562 0 +1107 1 +118 0 +586 1 +803 0 +380 1 +576 0 +1505 0 +653 0 +445 0 +9757 4 +364 0 +924 0 +3883 8 +51 0 +853 0 +1211 3 +577 0 +658 0 +1666 1 +2381 6 +777 0 +421 1 +473 0 +1547 2 +145 0 +597 0 +95 0 +627 0 +464 0 +3083 11 +418 0 +1089 0 +1583 1 +1208 1 +3571 3 +1057 0 +1756 1 +1348 0 +18396 5 +2309 1 +122 0 +443 0 +98 0 +567 0 +1746 0 +1293 2 +145 0 +1981 16 +81 0 +321 1 +2324 1 +43 0 +502 0 +771 1 +4254 1 +739 1 +3938 0 +598 0 +330 0 +520 0 +1878 0 +1193 0 +88 5 +1705 0 +140 0 +5083 0 +451 0 +1619 0 +276 0 +370 0 +4020 4 +2443 0 +393 0 +99 0 +323 0 +197 5 +154 0 +779 0 +8 0 +0 9 +14 0 +601 0 +1473 1 +290 0 +1131 0 +670 0 +587 0 +739 0 +1482 1 +1108 0 +0 0 +1351 0 +1044 1 +2477 0 +234 1 +1589 2 +678 1 +1809 1 +700 0 +2151 3 +1096 0 +4873 3 +22607 7 +2096 2 +496 0 +630 0 +328 0 +165 0 +504 0 +1080 0 +1965 1 +675 0 +927 0 +624 0 +1506 0 +898 0 +1472 1 +1640 0 +9078 7 +2718 2 +6297 3 +815 0 +811 0 +1354 1 +1199 0 +265 0 +198 0 +1599 0 +3629 2 +2920 0 +87 0 +1837 0 +420 0 +869 0 +1567 0 +139 0 +343 0 +1255 0 +2002 0 +0 0 +1820 1 +28 0 +3238 0 +66 0 +245 0 +1743 0 +1400 0 +11628 6 +3126 1 +484 0 +208 1 +15941 4 +1386 0 +2731 0 +1299 1 +708 0 +730 0 +1595 0 +3444 0 +692 0 +607 0 +1356 0 +3484 3 +1309 0 +476 1 +2114 0 +1096 1 +1500 1 +822 0 +990 1 +4163 1 +1182 1 +256 0 +2188 0 +96 0 +12 0 +281 50 +35 50 +104 0 +413 0 +398 0 +1662 1 +551 0 +2114 2 +921 0 +300 0 +377 0 +586 1 +723 1 +1183 0 +1020 1 +249 0 +237 0 +531 0 +368 0 +1418 3 +585 0 +3263 15 +271 0 +94 0 +144 1 +14129 2721 +1441 2 +15671 6 +19 1 +2677 1 +254 0 +458 0 +2269 865 +31 7635 +397 0 +760 0 +194 0 +2448 0 +1112 0 +1250 0 +4822 2 +5436 1 +380 0 +212 1 +1989 3 +385 0 +327 0 +4428 1 +1041 3 +388 0 +232 0 +9 0 +1074 1 +882 0 +0 0 +3322 1 +556 0 +497 0 +604 0 +1219 1 +2187 0 +1158 0 +1090 0 +2031 1 +2796 1 +993 1 +8 18 +0 0 +0 0 +821 0 +15 0 +4262 3 +470 0 +315 0 +3523 0 +997 0 +839 0 +10 0 +621 0 +4656 1 +340 0 +2766 3 +2498 1 +1452 0 +2270 0 +489 0 +280 0 +182 0 +669 0 +92 0 +9 18 +0 0 +881 0 +1489 2 +1784 1 +266 0 +100 0 +1770 0 +1429 0 +79 0 +491 0 +2264 1 +424 1 +1665 5 +527 0 +1335 0 +278 0 +919 0 +1109 0 +581 0 +1037 1 +106 0 +717 0 +992 0 +1291 1 +6705 2 +1116 1 +1603 0 +776 0 +2598 1 +268 0 +132 0 +1102 0 +3304 10 +3210 3 +1110 0 +369 0 +4032 1 +1110 0 +591 0 +2854 0 +283 0 +115 1 +140 0 +423 0 +690 0 +956 1 +1053 0 +1048 0 +201 0 +35 0 +645 1 +1210 1 +7727 9 +173 38 +42 779 +719 701 +7 0 +722 1906 +3576 4 +1626 0 +448 0 +107 0 +49 0 +2 156 +1578 0 +1484 0 +488 0 +3335 4 +1056 1 +506 0 +0 156 +271 0 +2 0 +18 0 +9 221 +5883 222 +796 0 +2102 1 +7363 1 +511 0 +3722 2 +1289 1 +749 0 +3707 4 +3652 1 +1649 1 +385 0 +1054 0 +2316 2 +120 0 +162 0 +1512 1 +231 0 +163 0 +12123 5 +909 0 +3796 2 +12237 76 +1287 0 +201 0 +299 0 +439 0 +697 0 +2729 1 +735 0 +1385 1 +1460 0 +906 1 +387 1 +1145 0 +4676 2 +9741 18 +5085 5 +2258 0 +1317 0 +157 701 +1967 2 +438 0 +140 0 +1781 0 +2433 1 +414 0 +579 0 +1278 0 +207 0 +297 0 +0 0 +4023 1 +2116 0 +915 0 +56 0 +246 0 +682 0 +504 0 +1510 0 +531 0 +970 0 +343 0 +879 0 +5526 1 +272 1 +2721 0 +394 0 +490 0 +2872 1 +363 0 +1554 1 +558 1908 +22 779 +228 38 +2287 3 +429 0 +163 1 +9425 1 +746 0 +970 1 +739 0 +1132 0 +1107 0 +2246 1 +6262 3 +926 0 +1625 2 +7547 5 +6773 9 +557 1 +3218 2 +2128 1 +989 1 +1259 0 +1408 0 +299 0 +737 0 +893 1 +5673 4 +1467 0 +113 0 +126 673 +1028 0 +2089 0 +7853 0 +1013 2 +1523 1 +476 0 +59 673 +2880 6036 +1750 0 +583 1 +2911 7 +4644 14 +2298 0 +1750 20 +3 0 +570 0 +3455 0 +295 0 +620 0 +4511 2 +2998 2 +3972 5 +1957 3 +14953 3 +87 0 +2475 2 +26087 7 +1517 4 +370 0 +182 0 +1016 0 +352 0 +794 0 +457 0 +788 1 +905 0 +626 2 +281 0 +410 0 +508 2 +2274 3 +564 0 +619 1 +1290 3 +1932 0 +4911 2 +4110 0 +313 0 +691 0 +4427 1 +374 0 +119 0 +180 9 +1261 0 +2155 2 +909 1 +1884 1 +1315 1 +4454 4 +222 0 +7244 7 +1456 0 +959 1 +653 0 +666 0 +347 1 +1756 1 +1024 0 +108 0 +850 0 +1201 1 +594 0 +405 1 +270 1 +58 0 +108 0 +220 0 +1666 3 +1719 0 +2941 6 +3126 0 +3693 1 +524 1 +1756 0 +557 0 +3364 2 +832 0 +194 0 +17187 9 +3969 0 +7394 5 +5301 14 +4171 4 +1887 2 +252 0 +1824 1 +1881 0 +2470 3 +2792 0 +516 3 +1886 1 +472 0 +637 18114 +1282 0 +1018 1 +751 0 +8752 2 +258 0 +65 0 +523 565 +15 26 +394 0 +713 0 +4 0 +219 0 +1167 0 +241 0 +1105 1 +2553 9 +138 55 +28 55 +24 0 +425 0 +614 0 +746 0 +668 0 +461 0 +1127 2 +47 0 +9681 16 +1988 0 +1679 1 +20205 6 +4265 11 +1391 2 +9989 2 +15 0 +880 0 +2714 0 +709 0 +512 0 +5216 11 +546 0 +580 1 +943 1 +320 0 +1032 1 +1700 1 +1022 0 +740 0 +1238 1 +14210 7 +729 0 +353 1 +260 0 +485 0 +2066 1 +1243 0 +915 0 +424 0 +263 0 +439 0 +1566 2 +1448 1 +810 0 +510 157 +2 64 +473 42 +2 28 +0 157 +35 64 +2 1 +1246 1 +1736 1 +208 0 +9 0 +8 0 +685 1 +287 0 +519 0 +1400 0 +104 35 +4 12 +81 63 +1690 48 +64 0 +1248 0 +3006 6 +1996 0 +2894 0 +1005 0 +283 0 +1866 0 +1386 0 +694 0 +535 0 +1348 1 +1170 1 +5351 6 +450 0 +331 0 +1251 0 +897 3 +117 0 +331 0 +1234 0 +922 0 +1800 1 +261 0 +1552 1 +2397 9 +55 0 +5134 0 +375 0 +3033 1 +198 0 +109 0 +670 0 +766 1 +6515 1 +11 0 +3 0 +1 0 +1059 1 +942 1 +1012 1 +697 1 +1377 0 +1226 1 +1567 0 +25 0 +1701 0 +1640 1 +464 0 +263 1 +2177 0 +1091 0 +262 0 +524 6 +73 0 +97 0 +110 0 +931 7 +433 0 +4277 0 +425 1 +1569 1 +261 0 +2232 1 +1116 0 +1840 3 +1979 6 +1595 0 +92 0 +216 0 +1537 2 +15 0 +187 0 +491 0 +4880 2 +280 0 +401 0 +1843 3 +208 0 +109 0 +5626 7 +508 1 +12 10 +2546 1 +709 3 +1445 0 +584 0 +449 384 +193 0 +501 0 +777 0 +0 0 +30 0 +510 0 +2206 1 +1118 0 +963 2 +1945 1 +5 384 +9 0 +1768 0 +598 1 +771 0 +1019 0 +1686 0 +1066 0 +107 69 +12 799 +20 1060 +475 0 +35 0 +506 1 +540 0 +1442 1 +1061 1 +531 0 +1543 0 +78 0 +447 0 +1957 3 +1386 5 +1240 0 +851 0 +330 0 +803 0 +273 0 +1986 1 +1569 0 +79 0 +5101 0 +1530 2 +11 0 +1523 1 +4149 0 +1832 0 +67 0 +3 90 +1108 0 +1591 3 +11271 3 +6200 8 +942 0 +867 0 +1 0 +385 0 +3950 3 +4569 4 +343 3 +3887 1 +258 0 +144 0 +542 1 +1002 0 +452 1 +847 0 +565 0 +504 1 +187 0 +2161 1 +1136 1 +1212 0 +535 0 +5914 2 +582 1 +864 0 +1327 0 +687 0 +4567 1 +1 0 +1220 0 +497 0 +4364 506 +924 0 +612 0 +741 0 +4213 5 +1908 0 +2193 1 +8630 9 +2724 5 +2271 6 +1561 1 +1277 1 +590 3 +896 0 +82 0 +22018 9 +724 0 +66 0 +27128 8 +1307 0 +1095 0 +390 0 +819 0 +220 0 +1184 0 +4 0 +225 0 +75 1 +63 1 +149 0 +34 0 +54 1 +137 0 +3309 2 +28 0 +9 0 +482 0 +1077 0 +1049 0 +607 0 +1460 2 +177 0 +310 0 +113 0 +912 0 +305 0 +2037 0 +250 0 +2140 1 +855 0 +110 0 +13248 8 +103 0 +881 0 +583 0 +2024 0 +544 0 +722 0 +3674 1 +1036 0 +1107 0 +1886 0 +3532 5 +884 4 +1174 0 +240 0 +734 0 +490 0 +394 0 +147 0 +2715 0 +9 0 +249 2 +412 1 +581 0 +1968 1 +188 0 +641 0 +1740 1 +1567 1 +435 0 +745 0 +1574 0 +3224 15 +6 0 +1087 0 +621 1 +1494 1 +1806 0 +2784 5 +517 1 +1846 0 +887 0 +594 0 +1177 0 +469 0 +306 0 +10825 1 +114 0 +960 0 +199 0 +3910 0 +609 0 +1437 0 +939 0 +8534 6 +2328 1 +366 0 +1809 0 +2531 2 +1628 0 +80 0 +111 0 +591 0 +640 0 +554 0 +809 1 +3579 2 +4463 3 +4852 1 +729 0 +809 0 +303 0 +1111 0 +2564 0 +1729 1 +2577 0 +254 0 +791 1 +256 0 +2330 2 +1707 1 +45 0 +2324 0 +7306 3 +1750 1 +1388 0 +598 0 +704 0 +3325 0 +225 0 +1112 1 +617 0 +115 0 +7206 16 +1381 1 +16719 6 +3159 1 +643 0 +51 0 +3425 16 +11 0 +1543 5 +2229 2 +1879 0 +1029 0 +8 0 +582 1 +711 1 +1307 2 +144 0 +119 0 +3602 1 +1280 0 +334 0 +2249 1 +0 0 +1065 0 +1292 0 +2362 1 +1209 0 +328 0 +3415 3 +436 0 +5796 2 +968 0 +1062 0 +1743 0 +153 0 +3170 0 +15 0 +1291 0 +1437 0 +2939 1 +6221 3 +314 0 +188 0 +383 0 +3708 0 +1449 0 +951 132 +993 1 +539 0 +1461 0 +342 0 +1218 1 +769 0 +1 0 +861 0 +1420 2 +1451 0 +320 0 +128 0 +608 0 +2753 2 +424 0 +961 0 +1186 1 +1752 0 +1563 1 +3406 8 +5439 15 +2790 0 +63 14 +187 14 +21 0 +3036 1 +72 0 +1017 1 +354 0 +1286 0 +1837 2 +1031 0 +31 72 +21 0 +178 72 +11592 4 +1255 0 +70 0 +1655 0 +5398 11 +2100 0 +774 0 +380 0 +883 1 +2102 2 +7628 26 +3643 0 +971 0 +2383 0 +10 0 +307 116 +18 116 +7590 2 +1093 0 +382 0 +1553 0 +616 0 +1348 0 +1415 1 +6698 0 +170 0 +5223 8 +258 0 +1339 3 +759 0 +790 0 +348 0 +2351 1 +380 0 +2246 1 +901 1 +4218 1 +0 0 +1333 0 +432 0 +4636 4 +255 0 +1752 1 +230 0 +1537 0 +635 0 +1260 0 +2145 0 +5352 4 +1010 0 +597 0 +2957 0 +1349 2 +628 0 +1240 0 +202 1 +261 0 +224 0 +16 0 +436 0 +5 0 +215 0 +304 0 +460 0 +1157 0 +3125 2 +353 0 +1294 0 +357 0 +59 0 +1792 2 +2960 1 +264 0 +529 0 +3358 5 +3604 17 +33 0 +1145 0 +589 0 +2148 0 +1153 0 +1003 0 +164 0 +1179 0 +1206 4 +3713 1 +3 0 +1533 0 +1002 1 +1717 1 +552 0 +232 1 +2 0 +10 0 +0 0 +533 0 +284 0 +638 0 +1890 1 +1779 0 +881 0 +6554 4 +1866 0 +722 0 +2676 1 +941 0 +544 0 +199 0 +1492 4 +1138 0 +710 6 +660 0 +879 0 +726 1 +424 0 +171 0 +971 1 +1059 0 +3569 1 +836 4 +1172 0 +926 1 +2526 2 +513 0 +874 0 +3098 2 +873 1 +613 0 +1114 1 +5116 0 +733 1 +0 0 +0 0 +1243 0 +685 1 +1677 0 +1688 1 +918 1 +797 0 +932 0 +0 0 +263 0 +33 0 +2557 3 +223 2085 +69 50 +22 0 +6322 2 +1639 2 +18 0 +4 50 +18 2084 +3664 1 +1472 2 +3237 1 +10848 3 +3022 0 +2054 0 +223 0 +1369 0 +1112 0 +2171 0 +467 0 +2921 2 +2207 2 +640 0 +2391 3 +1188 2 +6420 2 +1606 0 +423 0 +3471 23 +419 0 +154 0 +194 0 +500 0 +467 0 +182 0 +10018 1 +3231 0 +680 0 +99 0 +706 0 +514 0 +533 1 +455 0 +701 0 +897 1 +0 0 +223 0 +231 0 +60 0 +465 1 +7 0 +4969 3 +1148 2 +1272 3 +318 0 +60 0 +393 0 +1788 0 +1270 0 +1090 1 +80 0 +691 0 +1678 1 +230 0 +5320 1 +502 0 +864 0 +2191 0 +1749 8 +753 2 +4229 1 +2187 1 +90 0 +690 0 +793 0 +143 0 +621 0 +346 1 +887 0 +2205 2 +238 1 +756 1 +539 0 +4915 3 +826 0 +1472 3 +1626 1 +2659 6 +1912 2 +1062 0 +1751 1 +1484 0 +259 0 +5 0 +77 0 +76 0 +22 0 +434 0 +556 0 +580 0 +8383 1 +2172 0 +2567 1 +1028 0 +13833 2 +1741 1 +554 0 +2728 1 +1948 1 +475 0 +322 0 +511 0 +572 0 +313 0 +2432 1 +478 1 +1291 1 +1757 0 +4333 1 +355 0 +918 0 +535 0 +13 5267 +992 0 +5950 0 +34 2 +10 5 +244 7 +3691 0 +3106 7 +88 0 +86 5267 +1612 1 +841 2 +899 1 +1753 0 +591 0 +8530 0 +746 0 +784 1 +3125 4 +12 0 +569 0 +4005 1 +163 0 +825 0 +2318 11 +254 0 +1103 0 +3378 1 +1356 0 +237 0 +235 0 +920 0 +1784 0 +441 0 +577 0 +801 0 +1598 0 +535 0 +457 0 +3 0 +444 0 +13824 0 +6763 1 +2570 1 +1576 1 +2046 1 +2970 4 +678 0 +2825 2 +926 2 +0 0 +116 0 +2280 0 +1100 2 +2567 1 +779 0 +860 0 +49 0 +2477 1 +5640 2 +4941 5 +571 1 +1265 0 +1126 2 +336 0 +9707 1 +9404 1 +2811 1 +783 0 +2518 1 +1264 0 +1344 1 +95 0 +899 0 +3014 3 +2381 0 +0 0 +1879 1 +2524 0 +1011 1 +5417 8 +1569 0 +840 9 +1439 1 +1039 1 +737 0 +5667 0 +10 3 +2551 4 +797 0 +5532 0 +637 0 +1175 1 +534 0 +965 0 +670 0 +203 0 +875 0 +502 0 +750 0 +734 0 +1714 1 +56 0 +568 0 +277 0 +702 0 +24 0 +42 0 +22673 7 +379 0 +2269 0 +1800 1 +541 0 +313 0 +4756 0 +964 1 +462 1 +2690 2 +1536 0 +280 0 +645 1 +11284 10 +804 0 +1723 2 +3 528 +12 40 +585 1 +1290 1 +220 0 +596 1 +220 0 +135 0 +7127 1 +375 0 +96 0 +1435 0 +729 0 +2051 1 +2176 3 +1113 0 +1616 1 +1448 0 +385 0 +517 0 +0 40 +16 528 +508 2 +2763 1 +4700 6 +501 0 +2 0 +555 0 +21 0 +341 0 +6388 8 +864 0 +497 0 +7904 9 +806 1 +3 0 +1932 2 +29 0 +1015 0 +3869 1 +2837 1 +1124 1 +864 1 +3274 2 +164 0 +3361 12 +2745 0 +1661 1 +2284 1 +3665 5 +978 0 +1820 3 +984 2 +13580 6 +54 0 +987 0 +3974 1 +3275 2 +799 0 +72 0 +834 0 +1087 0 +960 0 +256 0 +284 0 +721 0 +1238 0 +31 0 +385 0 +1672 0 +1127 0 +17 0 +2537 2 +691 0 +1983 13 +1 0 +1605 1 +1775 0 +8370 12 +986 0 +0 703 +662 0 +3998 0 +6633 4 +1033 2 +696 0 +540 0 +1320 1 +3 0 +5483 5 +3730 0 +65 0 +155 1 +137 0 +85 0 +2719 0 +89 0 +813 0 +508 0 +173 0 +12 703 +281 0 +133 0 +2033 3 +96 0 +1330 0 +1718 1 +1001 0 +12061 4 +1521 2 +1584 0 +571 0 +1322 3 +43 22 +1532 1 +105 0 +354 0 +3182 3 +282 0 +435 28 +38 27 +228 2 +362 0 +5873 6 +5515 3 +174 0 +349 0 +2028 0 +197 2 +3671 2 +1980 1 +1682 0 +155 0 +7561 2 +714 0 +985 0 +752 0 +425 0 +451 0 +820 0 +1508 2 +971 0 +2210 0 +4568 1 +732 0 +623 0 +592 0 +7613 2 +433 0 +1849 0 +1860 1 +9 0 +299 0 +1155 3 +691 0 +3 0 +0 0 +914 0 +221 0 +977 0 +757 2 +230 0 +504 0 +2222 1 +778 0 +3601 9 +273 0 +1911 2 +5437 2 +1332 0 +5119 10 +8 833 +0 0 +990 0 +2103 9 +3039 0 +322 0 +15079 6 +1070 0 +3952 0 +382 0 +725 0 +1151 0 +2317 3 +1075 0 +0 0 +5265 3 +595 0 +565 0 +1110 0 +690 0 +531 0 +853 0 +1056 0 +405 0 +166 0 +347 0 +35 0 +3666 0 +1358 1 +13 0 +3645 3 +187 0 +598 0 +921 1 +460 0 +549 0 +650 0 +84 0 +217 0 +1097 0 +2673 1 +5077 2 +5037 36 +143 0 +158 0 +207 0 +986 1 +1598 4 +2335 2 +2505 0 +1294 44 +1597 2 +240 0 +194 0 +217 0 +80 0 +1760 0 +368 0 +1943 2 +15547 6 +389 0 +1167 0 +2325 0 +1206 0 +292 0 +493 0 +1128 1 +8512 6 +2290 0 +418 0 +1200 0 +88 10 +871 17422 +99 46 +771 0 +6125 1 +114 0 +21662 9 +1739 1 +1877 3 +938 1 +57 0 +405 0 +729 0 +714 0 +13095 5 +873 0 +936 0 +1063 0 +2672 3 +1385 1 +1412 1 +2588 507 +25 0 +3158 6 +2921 8 +1918 1 +859 0 +294 0 +1679 0 +2 0 +268 0 +1517 0 +12 0 +3 0 +960 0 +3926 3 +1355 1 +4726 21 +3 0 +957 0 +291 0 +1406 0 +6333 5 +19670 5 +1540 0 +1748 4 +504 0 +154 1 +720 0 +436 2 +3584 0 +22 0 +417 0 +2995 1 +2272 1 +486 0 +296 1 +919 0 +5941 5 +655 2 +930 0 +90 0 +228 0 +148 0 +518 0 +936 0 +1394 1 +18924 7 +438 0 +1121 1 +944 0 +2730 0 +828 0 +1334 1 +4453 4 +5771 0 +298 0 +1940 12 +0 0 +18 0 +18031 4 +4163 0 +15154 5 +364 0 +186 0 +1484 0 +2594 3 +398 0 +332 1 +1169 3 +180 0 +475 0 +346 0 +4109 1 +1493 0 +2701 2 +5478 4 +5627 3 +164 0 +6381 37 +0 0 +467 0 +94 0 +28 0 +520 1 +787 0 +1603 0 +8 0 +1493 0 +1932 2 +435 0 +38 2 +1552 0 +1755 2 +983 67 +0 66 +680 1 +591 0 +1123 2 +315 1 +4053 2 +1781 1 +329 0 +577 0 +171 0 +174 0 +358 0 +1000 0 +1415 1 +8254 2 +3 0 +123 7 +233 8 +2531 0 +789 0 +610 1 +2686 3 +1399 1 +98 0 +17865 1 +480 0 +733 1 +2318 1 +8008 3 +439 0 +4158 1 +1012 0 +705 0 +63 0 +738 0 +1813 1 +406 0 +71 15 +81 15 +934 1 +534 0 +199 0 +1718 1 +351 0 +902 1 +336 0 +3441 0 +1177 0 +244 0 +1881 0 +808 2 +2063 2 +268 0 +251 0 +3743 60 +922 1 +5549 3 +2 4 +144 4 +4 0 +0 0 +19 0 +142 0 +308 0 +608 0 +2 0 +1 0 +6 0 +10570 1 +791 1 +2176 4 +3123 2 +4 0 +833 0 +589 0 +2646 0 +750 1 +451 0 +2052 0 +2390 1 +432 1 +280 0 +24 0 +696 0 +322 0 +674 1 +2528 10 +2496 0 +0 0 +2075 1 +15 0 +643 0 +663 1 +935 0 +27205 12 +71 0 +8784 0 +1878 0 +3414 2 +227 0 +1894 0 +1264 2 +3984 2 +1359 0 +352 0 +249 0 +249 0 +686 0 +9727 44 +694 1 +2113 0 +323 0 +4 0 +2078 1 +561 0 +1038 1 +1129 0 +857 0 +381 1 +2271 0 +11171 2 +2101 0 +712 1 +968 0 +2284 0 +1438 0 +2675 0 +5760 4 +4 0 +1745 2 +754 0 +13068 27 +404 0 +7 0 +204 0 +558 0 +375 0 +364 0 +232 0 +789 0 +644 0 +570 1 +556 0 +346 0 +20779 22 +2889 0 +831 0 +1372 0 +8 0 +300 0 +1546 0 +71 0 +672 1 +771 0 +1429 0 +15 0 +569 0 +1298 0 +1141 0 +624 0 +2437 1 +3987 0 +1679 1 +564 1 +1280 0 +458 0 +193 0 +917 1 +573 1 +2128 0 +252 0 +1480 1 +487 0 +505 0 +304 0 +914 0 +554 0 +792 0 +240 0 +509 0 +3203 1 +580 0 +1678 1 +19 0 +36 10 +5140 4018 +161 46 +585 0 +941 0 +2625 0 +346 0 +3234 1 +3309 1 +2930 2 +155 0 +871 0 +898 1 +3174 1 +26287 6 +3350 7 +82 0 +463 0 +4165 0 +1022 0 +1416 0 +1064 0 +1497 0 +641 1 +48 1 +1825 0 +1408 0 +803 0 +784 0 +4400 9 +1 0 +23 0 +1485 63 +2557 5 +277 0 +560 1 +579 0 +60 63 +3 82 +90 364 +34 475 +1857 0 +2046 2 +328 0 +716 0 +968 1 +7 0 +382 0 +1641 5 +1092 0 +3176 0 +1291 0 +376 0 +290 0 +896 0 +1369 0 +550 0 +357 0 +1560 0 +2026 1 +2040 0 +158 0 +951 1 +11 475 +3 364 +0 82 +1223 1 +1480 1 +6 0 +432 1 +933 0 +1070 0 +2101 0 +795 0 +1103 1 +698 0 +3351 1 +572 0 +0 0 +92 0 +1176 1 +891 0 +300 4 +105 3 +539 0 +955 0 +10704 6 +3094 1 +917 1 +670 2 +1331 1 +221 0 +1420 2 +192 0 +393 0 +391 0 +606 0 +87 0 +5519 4 +197 0 +344 1 +1844 0 +342 0 +550 0 +569 0 +3030 0 +1637 1 +14596 6 +600 0 +1161 1 +314 0 +641 0 +257 0 +3227 1 +193 0 +182 0 +2507 5 +436 0 +714 1 +1610 0 +48 0 +671 0 +822 0 +216 0 +1 0 +158 0 +5978 0 +3699 0 +2258 7 +1033 2 +441 0 +335 0 +1436 1 +645 1 +1105 2 +662 0 +921 0 +8 0 +1325 0 +186 0 +4 1 +33 410 +1721 1 +5714 19 +549 0 +1083 0 +37 410 +654 2 +738 1 +1891 0 +1857 0 +2385 0 +220 0 +3866 13 +695 0 +402 0 +185 0 +442 1 +759 0 +92 0 +3860 2 +347 0 +1450 9 +949 0 +2832 2 +2685 1 +2250 0 +1913 1 +1236 1 +366 0 +2821 1 +1526 6 +1428 0 +936 1 +12303 5 +7165 2 +4226 3 +357 0 +327 0 +1948 0 +337 0 +641 0 +505 1 +996 1 +2393 0 +1227 0 +380 0 +550 1 +238 0 +608 0 +184 1 +347 0 +139 0 +2301 4 +2633 3 +474 1 +502 0 +1376 1 +2470 0 +376 0 +1336 0 +501 1 +1056 0 +735 2 +513 0 +512 0 +537 0 +415 0 +498 0 +1347 1 +12319 3 +1027 0 +1438 0 +2513 0 +1790 1 +34 0 +451 0 +3617 1 +2212 2 +2211 7 +242 0 +3578 1 +280 1 +428 0 +153 0 +2326 2 +1193 1 +1579 1 +2311 1 +200 0 +7358 7 +688 1 +915 1 +220 0 +697 0 +3080 1 +9 0 +4 0 +13 0 +21 0 +426 0 +5155 0 +67 0 +419 0 +734 0 +3249 0 +68 0 +582 0 +803 0 +711 0 +498 2 +643 0 +2027 1 +473 0 +5271 1 +4611 11 +98 0 +924 0 +920 1 +30 0 +158 39 +378 0 +532 0 +310 1 +2081 1 +45 0 +7284 0 +300 1 +300 0 +630 0 +482 0 +34 7635 +4275 863 +103 0 +566 0 +887 0 +104 0 +5 0 +55 39 +1192 4 +1534 0 +1737 0 +810 0 +239 0 +1521 1 +9300 3 +0 0 +1403 0 +1171 0 +1135 0 +886 0 +439 1 +233 0 +361 0 +472 0 +150 1 +330 4099 +1201 0 +2987 20 +5240 4 +1595 1 +3 0 +70 0 +9245 5 +1052 0 +1717 3 +483 57 +26 57 +7911 1 +4937 3 +154 0 +228 0 +1002 0 +1 0 +151 0 +969 0 +540 0 +4719 0 +279 0 +3670 1 +3076 0 +15 0 +83 0 +1803 0 +1080 0 +635 0 +610 0 +1183 0 +8 0 +18 0 +1038 0 +52 0 +1295 0 +694 0 +3331 1 +216 0 +3 0 +223 0 +1 0 +0 0 +0 0 +980 0 +120 0 +1892 16 +2744 3 +422 0 +335 0 +26 0 +138 1 +27 0 +1451 0 +492 0 +1216 2 +1161 0 +4618 1 +494 0 +431 1 +593 0 +296 0 +380 2 +7198 3 +10966 5 +225 0 +67 0 +470 0 +1171 0 +6 0 +0 0 +46 0 +174 0 +1773 1 +5556 6 +842 0 +3293 1 +1577 1 +1495 0 +14 5 +36 5 +865 1 +717 1 +164 0 +2280 0 +1385 2 +14 0 +78 0 +2113 1 +402 0 +2142 1 +13009 4 +3 0 +49 0 +4246 13 +3644 11 +4290 4 +1346 4 +893 0 +1 0 +1151 2 +111 2 +2988 2 +398 1 +612 0 +364 1 +345 1 +1246 0 +609 1 +1 0 +584 0 +379 0 +2195 0 +56 0 +832 0 +1951 4 +0 0 +3744 1 +1047 0 +1567 1 +1164 0 +78 0 +2163 0 +442 0 +351 0 +250 0 +729 1 +1906 0 +2313 4 +507 0 +11077 0 +1864 0 +679 0 +9954 8 +1353 0 +859 0 +448 0 +1081 1 +1259 2 +1155 0 +802 0 +1268 0 +0 0 +9948 13 +5 0 +3501 7 +1414 1 +1403 2 +11273 5 +1009 0 +449 1 +271 0 +384 1 +1406 1 +267 0 +457 0 +3746 1 +1306 2 +562 0 +3284 3 +73 0 +1143 0 +3052 3 +2842 1 +822 1 +705 0 +1138 0 +4931 3 +377 0 +1 0 +410 0 +4419 23 +32 0 +2249 0 +755 0 +373 0 +1269 0 +18 0 +2197 0 +363 0 +516 0 +3608 2 +293 0 +1382 0 +251 0 +7971 6 +1825 1 +488 1 +638 0 +15665 6 +3157 5 +1391 2 +11553 4 +3706 2 +295 0 +352 0 +372 0 +1936 1 +1169 1 +1023 14 +1895 0 +322 0 +274 0 +80 0 +279 0 +14 0 +80 0 +692 0 +764 0 +364 0 +169 1 +874 1 +116 0 +3017 0 +1209 0 +3829 1 +105 9 +166 9 +536 0 +703 0 +458 1 +1426 1 +10149 3 +434 0 +6440 7 +110 0 +921 3 +26999 11 +28 0 +579 0 +0 0 +17637 7 +367 0 +825 1 +1241 0 +1060 0 +2089 0 +131 0 +831 0 +1703 1 +1094 2 +101 0 +942 0 +1523 0 +2299 1 +521 0 +892 0 +1517 2 +951 3 +1 0 +2095 1 +1445 0 +30 0 +439 0 +2733 2 +899 0 +8221 0 +1536 0 +0 0 +1075 1 +278 0 +930 0 +3677 19 +539 1 +1514 1 +11011 7 +380 2 +472 0 +274 0 +406 0 +200 0 +2626 4 +1061 0 +0 0 +7 0 +168 0 +175 1 +2463 0 +300 0 +653 0 +770 0 +256 0 +1417 0 +213 0 +300 0 +176 0 +5860 1 +781 0 +1257 1 +7000 45 +6343 2 +1421 1 +592 0 +1226 0 +1107 3 +0 0 +1807 1 +1188 2 +742 0 +885 0 +944 0 +1380 0 +6204 3 +1284 1 +1947 3 +179 0 +799 0 +2418 1 +1828 8 +1294 1 +1324 3 +222 0 +1093 2 +1831 0 +10 0 +0 0 +821 0 +1424 0 +87 0 +1966 3 +482 0 +114 0 +28 0 +1097 0 +1454 0 +402 1 +869 0 +323 0 +88 0 +2415 1 +891 0 +815 1 +714 0 +1685 2 +11787 17 +1331 1 +3950 0 +499 1 +164 0 +152 0 +1323 0 +2406 0 +2173 2 +6565 2 +2219 0 +349 0 +10189 2 +1556 1 +836 0 +479 0 +27 0 +1728 1 +5865 4 +1500 2 +2547 1 +13180 7 +17 0 +244 0 +611 0 +528 0 +3712 1 +1065 0 +1173 0 +57 0 +6 0 +911 6 +442 0 +955 0 +954 0 +348 0 +4835 25 +1767 142337 +1908 2 +2422 0 +99 0 +57 0 +71 0 +207 0 +67 0 +1547 1 +925 0 +584 2 +2073 2 +1124 6 +649 1 +901 2 +17848 10 +918 0 +462 0 +621 1 +37 1 +26 1 +232 0 +2335 6 +1209 0 +159 0 +3591 8 +5363 1 +2188 0 +387 0 +1320 2 +335 0 +255 0 +167 0 +286 0 +1252 1 +1145 0 +2709 97 +1860 97 +710 0 +1 0 +567 0 +466 0 +470 0 +579 0 +793 0 +595 0 +657 0 +235 0 +43 14 +1797 0 +1972 0 +403 0 +622 1 +2632 0 +52 0 +6803 0 +737 0 +618 0 +1651 0 +819 0 +1484 0 +61 0 +201 0 +506 1 +7988 19 +1897 0 +5320 2 +15285 2 +2266 1 +3419 1 +4158 1 +48 0 +2593 4 +1948 4 +31 0 +509 0 +1604 59901 +941 0 +492 0 +272 0 +1629 2 +1169 59900 +547 0 +1790 0 +7 0 +4921 3 +2114 1 +428 0 +2026 1 +6754 7 +38 0 +768 0 +2600 6 +4953 7 +7635 3 +713 2 +2686 0 +1652 2 +1037 1 +880 0 +464 0 +1436 0 +394 0 +12 0 +997 0 +368 0 +133 0 +531 0 +715 0 +3177 5 +1632 0 +4984 2 +12 0 +881 0 +70 0 +1675 1 +32 0 +397 0 +1298 0 +2967 0 +1501 0 +1419 3 +1662 2 +180 0 +538 0 +1026 2 +1711 0 +119 0 +2486 0 +529 0 +2384 1 +1930 2 +5117 3 +28 0 +21 3 +2865 0 +1384 0 +87 0 +360 0 +193 0 +279 0 +2125 0 +280 0 +605 0 +1501 1 +63 3 +1119 0 +1369 0 +314 1 +719 1 +546 0 +3395 1 +1003 6 +1877 0 +848 0 +1213 0 +1111 1 +1660 0 +536 0 +1966 1 +5269 6 +344 0 +98 0 +181 0 +1919 0 +906 1 +1536 1 +600 0 +162 0 +30 0 +925 0 +1183 0 +6271 2 +1 0 +374 0 +54 0 +687 1 +664 0 +1057 0 +653 0 +547 1 +2112 3 +63 0 +67 0 +295 0 +9184 7 +1195 0 +1039 0 +147 0 +14645 16 +1292 1 +1848 1 +320 0 +761 1 +0 0 +1299 0 +1028 5 +1323 2 +946 1 +1540 0 +182 0 +1619 0 +2274 2 +2823 1 +834 1 +2060 0 +164 0 +402 0 +1102 0 +315 0 +1506 0 +683 0 +870 0 +171 0 +0 0 +4092 2 +493 1 +10079 1 +1708 1 +1062 1 +3 0 +34 0 +748 0 +2209 1 +2861 1 +335 0 +2281 0 +608 0 +106 0 +13640 5 +575 0 +1183 1 +3996 3 +141 0 +981 0 +339 0 +4280 2 +1470 0 +3089 2 +583 1 +624 1 +938 0 +2204 0 +898 0 +2532 3 +806 0 +565 1 +2670 3 +688 1 +1980 2 +0 0 +877 0 +578 0 +811 0 +824 1 +3307 0 +1391 1 +1537 1 +1404 0 +57 0 +104 0 +72 0 +211 0 +517 0 +11670 3 +36 0 +3202 14 +1924 1 +11041 10 +1180 1 +862 2 +355 0 +146 0 +320 0 +66 0 +219 0 +180 0 +604 0 +1679 1 +1510 0 +1759 0 +196 0 +8056 2 +23 0 +9 0 +1255 0 +333 1 +264 0 +77 0 +268 0 +660 0 +300 0 +263 0 +2038 0 +406 0 +1146 0 +2471 1 +386 0 +10054 2 +1973 1 +2480 2 +131 0 +5 0 +5 0 +56 0 +294 0 +4 0 +171 0 +1057 0 +4049 2 +23 0 +1657 95 +1092 0 +21 0 +1730 0 +1158 0 +2623 2 +468 1 +837 0 +621 0 +12582 9 +321 0 +4841 13 +811 0 +451 0 +403 0 +361 0 +2177 2 +4310 2 +2976 3 +3532 1 +527 0 +298 0 +495 0 +3540 3 +1987 0 +1619 0 +4346 1 +1895 3 +752 0 +1270 0 +2068 1 +3783 0 +903 0 +0 0 +401 0 +516 0 +12591 6 +1501 0 +26 0 +2721 0 +983 1 +829 0 +2 0 +287 0 +145 0 +664 0 +550 0 +501 0 +48 0 +3587 1 +1455 0 +201 0 +1298 0 +1672 1 +348 0 +896 0 +719 1 +321 0 +1349 4 +390 1 +665 0 +296 0 +208 0 +1990 1 +926 0 +5632 5 +2117 1 +46 0 +4295 0 +2528 1 +318 0 +471 0 +2191 0 +1703 0 +1497 0 +961 1 +310 0 +1963 0 +538 0 +1408 2 +1125 1 +2564 4 +117 0 +611 0 +528 0 +656 0 +472 1 +916 4 +10 0 +2553 0 +3143 0 +693 0 +446 0 +788 1 +490 2 +1719 0 +435 0 +867 0 +446 0 +0 0 +149 0 +846 0 +5819 3 +16330 3 +1578 0 +80 680 +1545 3 +1513 8 +640 0 +230 0 +115 680 +320 0 +263 0 +407 0 +1551 1 +237 0 +799 0 +1397 0 +955 3 +2250 7 +1017 0 +10022 4 +1168 0 +2052 3 +7067 15 +451 0 +393 0 +1539 0 +1378 0 +198 0 +3055 2 +768 0 +1066 0 +2829 4 +432 0 +482 0 +2112 1 +319 0 +2073 1 +2071 0 +511 0 +1559 0 +223 0 +6519 1 +1008 0 +23383 10 +692 0 +416 0 +521 0 +391 0 +586 1 +7753 3 +130 0 +795 0 +6199 3 +1966 0 +3469 12 +1745 0 +3671 1 +1335 0 +372 0 +360 0 +3198 1 +10253 4 +340 0 +688 0 +1811 2 +1270 1 +3583 2 +2410 1 +395 0 +7118 3 +486 0 +512 0 +3391 4 +2972 3 +1370 0 +344 0 +2360 2 +1357 1 +2617 1 +3588 0 +736 0 +4439 11 +514 0 +809 0 +9 0 +1242 0 +258 0 +2453 0 +1324 2 +2518 0 +1416 0 +1917 1 +517 1 +1383 5 +1193 4 +1712 2 +3388 2 +1038 2 +1788 0 +814 0 +403 2 +2570 0 +173 0 +234 0 +1171 1 +3926 2 +61 0 +1559 1 +715 0 +2270 2 +814 0 +483 0 +748 0 +92 0 +71 0 +4 0 +26 0 +0 0 +153 0 +440 0 +1270 0 +406 0 +6186 2 +1789 1 +1750 1 +1884 0 +1444 0 +326 0 +195 0 +698 0 +1 0 +1848 2 +217 0 +440 0 +601 0 +399 0 +1577 0 +746 0 +3037 3 +643 0 +608 0 +16 0 +103 0 +142 0 +33 0 +79 0 +31 0 +3216 0 +543 0 +1955 1 +773 0 +3963 15 +5828 28 +782 1 +4268 1 +1198 1 +954 0 +1276 0 +594 0 +421 1 +2532 0 +793 0 +17 0 +392 0 +36 0 +21920 6 +6199 6 +476 0 +751 0 +1617 1 +382 0 +1 0 +2 0 +32 0 +893 0 +247 0 +473 1 +211 0 +1097 1 +785 0 +243 0 +706 0 +2686 0 +432 2 +1049 0 +6462 0 +25 0 +2 0 +334 0 +708 0 +1117 1 +1307 0 +2826 10 +2978 2 +1340 0 +692 0 +312 0 +1729 0 +602 0 +719 0 +586 0 +2394 1 +1 0 +1 31 +46 31 +857 0 +3388 2 +336 0 +153 0 +397 0 +34 0 +2309 0 +2030 2 +321 1 +836 3 +181 0 +962 0 +46 0 +6 0 +1533 0 +908 0 +1611 1 +979 0 +1823 1 +866 0 +2966 0 +653 0 +1055 0 +1675 6 +252 0 +129 0 +342 1 +1439 1 +4535 0 +7 0 +401 0 +1046 1 +2727 2 +457 0 +977 1 +225 0 +547 0 +1060 0 +1488 1 +7463 17 +2391 0 +1153 2 +1906 1 +186 0 +419 2 +15 0 +2062 6 +2972 0 +0 0 +2337 1 +132 0 +465 0 +1937 0 +31344 13 +2148 0 +1 0 +401 0 +834 0 +2742 1 +87 0 +711 0 +4342 6 +345 0 +374 0 +0 0 +350 0 +1772 12 +769 0 +156 0 +14 0 +0 0 +1362 1 +2557 1 +920 0 +1780 0 +1457 0 +1152 1 +1449 0 +7918 33 +1083 0 +2625 1 +1405 0 +2099 0 +127 0 +820 0 +1586 0 +7329 5 +677 0 +153 0 +609 0 +1895 1 +261 0 +1384 1 +1544 0 +97 0 +29 0 +11 0 +366 0 +1326 0 +583 0 +1974 1 +2507 0 +402 0 +974 0 +1119 2 +52 0 +4 0 +740 1 +793 0 +1980 0 +384 0 +2216 0 +3507 1 +3294 0 +689 0 +290 0 +1498 2 +1809 0 +535 0 +1159 0 +361 0 +618 0 +3 0 +114 0 +14 0 +700 0 +831 0 +780 0 +654 1 +2580 1 +1520 2 +766 2 +5587 2716 +357 1 +793 0 +1147 0 +2660 0 +342 0 +43 0 +4583 15 +854 1 +464 0 +1493 0 +1882 1 +9183 8 +3415 4 +729 0 +2753 2 +5488 0 +2599 1 +1266 0 +57 0 +2130 1 +1706 0 +388 0 +121 0 +498 0 +3657 0 +37 0 +6370 21 +23628 2 +644 0 +1849 1 +407 0 +1932 1 +3625 4 +7877 4 +2807 1 +123 0 +672 2 +1366 0 +21 0 +158 0 +625 0 +2821 0 +2066 0 +2233 2 +5309 1 +39 0 +197 0 +2508 0 +38274 24 +1620 0 +826 0 +585 0 +2420 1 +23 0 +1361 1 +2353 40 +5074 41 +14139 22 +965 0 +1338 0 +30 0 +1471 0 +818 0 +140 0 +303 0 +1443 1 +824 0 +3932 4 +5564 37 +278 0 +2558 2 +2982 4 +296 0 +1279 0 +4054 0 +6616 1 +1052 0 +289 0 +989 1 +609 0 +214 0 +372 1 +1315 0 +952 0 +5857 1 +473 0 +1 0 +17 0 +1271 0 +585 0 +1410 1 +476 0 +83 0 +763 0 +506 0 +4879 2 +797 0 +3182 2 +1606 1 +8 0 +31 0 +3153 0 +40 0 +335 0 +2674 1 +901 2 +499 0 +1878 4 +4 0 +8892 3 +678 0 +780 1 +2791 6 +2219 1 +899 0 +0 0 +5 0 +0 0 +198 0 +1 0 +254 0 +11236 30 +99 0 +1387 0 +532 1 +187 1 +5442 5 +1732 1 +1255 0 +1524 0 +326 0 +145 0 +824 1 +810 4 +652 0 +1635 2 +635 0 +185 2 +991 1 +155 0 +747 0 +2926 1 +1183 0 +5 0 +3186 0 +1708 1 +0 0 +2 0 +51 0 +227 0 +1489 5 +2809 1 +443 0 +562 0 +1306 0 +505 0 +434 0 +35 0 +734 0 +597 0 +186 0 +996 0 +1093 0 +8 0 +1 0 +340 268 +463 0 +1124 1 +825 3 +59 0 +644 0 +1230 0 +49 0 +2467 1 +1697 0 +8240 2 +1062 0 +10 0 +687 1 +934 0 +2714 5 +90 0 +2741 0 +1851 1 +3872 0 +1803 0 +3522 6 +5143 0 +1025 0 +52 0 +972 0 +1177 1 +127 0 +247 0 +260 0 +524 0 +810 1 +1967 1 +5007 0 +588 1 +3121 2 +574 1 +6417 1 +714 1 +3542 2 +480 2 +198 0 +49 116 +904 3 +682 0 +11 0 +675 1 +0 0 +2076 3 +9176 7 +0 0 +293 0 +3 0 +785 0 +1476 0 +1952 0 +174 0 +210 1 +191 29 +65 29 +532 0 +1389 1 +2141 2 +2972 0 +1921 2 +252 0 +22 0 +4849 3 +272 0 +673 0 +1936 0 +1011 1 +2695 1 +2489 4 +833 1 +240 0 +1406 4 +6 0 +740 0 +212 0 +558 0 +92 0 +2981 2 +554 2 +727 1 +87 1 +16 0 +185 1 +15 1 +6 1 +1 0 +1068 0 +1245 0 +1517 0 +881 0 +2619 4 +4790 1 +1260 0 +584 1 +2048 1 +3376 0 +1665 2 +5782 2 +592 0 +1431 2 +755 1 +1121 1 +645 0 +14057 16 +170 0 +1801 1 +1063 0 +80 0 +164 0 +56 2 +4164 1 +137 1 +795 0 +626 2 +1 0 +3379 2 +210 0 +1193 1 +823 0 +376 0 +3001 1 +363 1 +769 1 +925 0 +9 0 +350 0 +9 0 +1152 629 +436 0 +7056 5 +354 0 +1155 1 +621 0 +1210 1 +1002 1 +8 0 +1632 0 +1114 1 +7 0 +594 0 +6733 3 +215 0 +649 1 +702 0 +924 0 +0 0 +680 0 +945 1 +78 0 +499 0 +1270 0 +1487 0 +1430 0 +7121 0 +113 0 +617 0 +96 912 +1401 0 +3150 2 +1244 1 +2317 0 +18 912 +129 0 +233 0 +1115 3 +104 0 +912 1 +85 0 +3500 1 +10 0 +4280 0 +3617 1 +460 0 +1293 0 +618 0 +1156 0 +3123 2 +2358 0 +0 0 +0 0 +1461 4 +468 0 +1379 2 +2198 1 +211 0 +1431 3 +2243 1 +544 0 +2532 1 +9560 6 +2363 2 +1053 0 +854 1 +2019 4 +33 0 +65 0 +2423 6 +9508 54 +112 0 +14609 1 +610 1 +1077 0 +504 0 +2695 1 +3043 1 +99 0 +1081 1 +444 1 +1086 1 +1556 0 +2370 0 +466 1 +4301 2 +452 0 +2357 0 +92 0 +114 0 +371 0 +1757 1 +3393 0 +3 0 +0 0 +105 0 +141 1 +0 0 +195 0 +465 0 +3682 0 +2101 1 +8511 0 +1727 0 +1122 0 +369 0 +3 0 +9545 5 +1574 0 +232 0 +1567 0 +556 0 +51 0 +1032 0 +1041 0 +404 0 +565 0 +1518 0 +4214 45 +1853 0 +654 1 +743 1 +1990 2 +1454 0 +430 0 +244 0 +574 1 +2984 2 +918 3 +1436 2 +0 0 +13 4 +201 0 +2190 1 +2467 1 +1310 1 +330 1 +2372 5 +2757 1 +1265 0 +684 0 +266 0 +868 0 +177 0 +5302 21 +2225 0 +3356 2 +69 0 +2233 1 +748 0 +776 0 +2150 1 +1671 1 +2679 1 +831 1 +2659 1 +234 0 +7365 10 +380 0 +1099 6 +3264 2 +7216 1 +43 0 +2814 2 +282 414 +1197 1 +279 0 +2 0 +6926 1 +288 19 +142 0 +6141 8 +1270 0 +588 0 +2 0 +268 0 +1 0 +340 0 +492 0 +1168 0 +4742 1 +433 0 +1034 1 +1579 0 +2672 0 +714 0 +4916 3 +985 0 +949 0 +30 0 +0 0 +82 0 +1905 0 +431 0 +1512 0 +646 1 +663 0 +752 0 +2411 1 +670 0 +59 0 +47191 15 +1742 8 +472 0 +2442 0 +758 1 +1851 1 +338 0 +115 0 +1311 1 +6158 3 +653 0 +926 1 +157 12 +1 9 +48 8 +507 0 +7753 2 +177 0 +2748 4 +57 0 +3 0 +4033 0 +351 0 +1861 0 +362 0 +2061 1 +827 3 +147 0 +2347 2 +1231 0 +1122 0 +6435 3 +964 1 +198 0 +0 0 +1526 0 +6348 4 +2800 0 +2015 1 +967 0 +29 0 +380 0 +2984 0 +265 0 +444 0 +3366 1 +1147 1 +267 0 +393 0 +0 0 +1700 0 +395 0 +1070 0 +0 0 +8 0 +1218 1 +279 0 +1822 5 +1276 1 +912 0 +1806 4 +570 0 +526 1 +989 0 +916 0 +865 1 +463 0 +3115 1 +986 3 +3147 2 +1451 2 +141 0 +34689 35 +1345 0 +499 0 +427 0 +79 0 +1316 0 +314 0 +1 0 +527 35 +6 33 +322 0 +1079 2 +103 0 +26 0 +2 0 +1001 0 +0 0 +174 1 +0 0 +2262 2 +563 0 +480 0 +514 0 +253 0 +533 0 +212 0 +321 0 +833 1 +897 0 +583 1 +475 0 +9559 5 +143 0 +313 1 +471 0 +650 0 +1430 1 +1799 4 +364 0 +114 0 +329 0 +356 0 +142 0 +345 0 +33 0 +44469 72 +768 0 +4378 5 +755 0 +727 0 +391 0 +598 0 +1188 0 +2137 2 +967 0 +1387 0 +3323 4 +3225 5 +405 0 +598 1 +3352 3 +7583 3 +2262 0 +1006 0 +670 0 +962 0 +2875 1 +756 3 +1170 0 +708 1 +821 0 +926 0 +252 0 +219 0 +665 0 +325 1 +1 0 +170 0 +511 0 +472 0 +554 0 +785 0 +322 0 +367 0 +285 0 +3780 2 +78 483 +935 1 +321 0 +14586 5 +617 0 +53 107 +3299 0 +29 0 +3263 0 +493 483 +307 0 +615 0 +838 1 +266 0 +896 1 +881 2 +381 0 +689 0 +7 0 +1630 0 +3629 2 +162 0 +1004 1 +406 0 +96 0 +7 0 +34 0 +161 0 +548 0 +1407 0 +55 0 +295 0 +913 1 +314 0 +1259 0 +2739 0 +1028 3 +496 0 +268 0 +2366 1 +6761 2 +497 0 +483 117 +1500 0 +1385 0 +706 0 +102 0 +1495 3 +2733 4 +1906 4 +643 0 +9 0 +1917 1 +2019 1 +335 0 +391 0 +1558 1 +54 0 +720 0 +4070 2 +2109 5 +4774 1 +3983 3 +14442 6 +6926 0 +1860 0 +242 0 +1854 0 +2238 0 +457 0 +378 0 +1138 0 +0 0 +0 0 +472 0 +845 0 +1469 0 +1194 0 +2084 2 +592 1 +3208 2 +1013 1 +478 0 +655 1 +121 0 +435 0 +945 0 +1463 0 +1218 0 +6230 0 +3932 3 +204 0 +199 0 +6341 6 +1518 0 +61 0 +423 0 +1285 0 +4659 3 +506 0 +31 0 +1185 0 +1555 1 +2 0 +7920 2 +127 0 +4193 0 +2631 0 +2701 6 +24 0 +5 0 +14752 7 +495 0 +38 0 +2261 0 +726 0 +14 0 +2098 0 +2302 0 +39501 6 +1312 0 +802 0 +1954 3 +3169 0 +2249 1 +344 2 +510 0 +620 1 +290 1 +1164 0 +221 0 +0 0 +0 0 +6126 1 +933 0 +282 0 +849 0 +4198 19 +494 0 +797 0 +1107 1 +1503 0 +14 6 +178 0 +631 1 +2280 2 +2379 1 +137 0 +802 0 +1944 0 +1924 4 +1086 0 +1233 0 +1679 0 +5043 4 +1167 0 +198 0 +1532 1 +735 0 +234 0 +671 1 +4877 3 +1565 0 +417 1 +11457 6 +256 0 +3290 4 +141 0 +11 0 +111 0 +984 0 +8493 1 +391 0 +6743 6 +136 0 +2086 0 +1448 0 +1093 0 +148 0 +169 0 +313 1 +1680 5 +43 0 +3577 0 +498 0 +552 0 +200 0 +604 0 +809 2 +3161 2 +2682 1 +582 0 +263 0 +28 0 +1493 1 +4383 5 +163 27 +429 0 +746 0 +497 0 +2324 0 +1550 2 +580 0 +147 0 +1202 2 +477 0 +23 27 +1772 1 +497 0 +3239 0 +7920 42 +706 0 +4632 3 +305 0 +984 1 +795 0 +8214 1 +675 2 +877 0 +527 0 +4 0 +1816 0 +1677 0 +784 1 +1440 0 +663 1 +1446 1 +1900 0 +695 1 +829 0 +174 0 +235 0 +145 0 +89 0 +2552 2 +1204 0 +1252 0 +1159 0 +1345 0 +849 1 +2397 3 +504 0 +582 10 +234 0 +1576 1 +3362 0 +2122 1 +1978 0 +241 0 +9604 9 +6427 5 +864 0 +284 0 +96 0 +7365 4 +2106 0 +1156 0 +33 0 +1501 0 +1362 1 +366 0 +1795 0 +13298 8 +1013 1 +326 0 +5647 1 +238 0 +921 0 +1660 1 +2906 0 +3629 2 +639 0 +766 0 +420 0 +2852 2 +95 0 +845 0 +317 0 +537 0 +444 0 +4175 2 +897 0 +989 3 +320 1 +568 0 +851 0 +119 0 +10151 4 +85 0 +1935 0 +26334 173 +1172 0 +367 0 +733 0 +1257 0 +472 0 +4793 3 +159 0 +6993 24 +1429 2 +66 0 +2604 1 +920 0 +191 1 +202 0 +139 0 +1047 0 +1883 5 +7355 11 +105 0 +153 38 +2008 4 +1649 6 +37 38 +480 1 +2197 1 +1400 0 +189 0 +937 342 +413 342 +26020 33 +2762 1 +42 0 +5 0 +5771 3 +584 0 +4658 2 +911 0 +2546 2 +1305 0 +2087 2 +1277 0 +3526 0 +943 0 +319 0 +1639 0 +107 1 +561 1 +147 0 +4692 10 +1453 0 +307 0 +894 0 +306 0 +3554 0 +8348 10 +279 0 +3515 93 +1 0 +8 0 +355 0 +634 0 +750 0 +42 0 +2565 2 +1 0 +975 0 +430 0 +973 0 +1063 0 +1126 0 +8891 11 +436 0 +1311 0 +788 0 +114 87 +27 87 +4 0 +187 0 +314 0 +211 0 +2510 0 +338 1 +424 2 +21306 9 +214 0 +239 0 +10313 12 +573 0 +103 0 +16 0 +857 0 +486 1 +1938 0 +563 0 +1538 0 +979 0 +19884 9 +1385 0 +148 0 +252 0 +3 0 +220 0 +3607 1 +315 0 +289 0 +2271 3 +718 1 +849 0 +843 1 +1597 1 +535 0 +2 0 +1161 1 +633 0 +440 0 +224 0 +6325 5 +515 0 +386 0 +397 1 +2694 2 +79 0 +2052 0 +700 0 +804 0 +2640 1 +108 0 +4491 33 +503 0 +597 0 +883 0 +286 1 +1422 0 +248 1 +160 0 +3490 1 +1344 0 +623 1 +203 0 +1625 0 +2324 2 +893 1 +679 0 +1025 0 +887 1 +4040 2 +2 0 +5259 33 +768 0 +256 0 +11283 0 +1339 3 +299 0 +435 0 +3313 3 +929 0 +1913 3 +1628 2 +1041 0 +4361 25 +2430 0 +12 0 +0 0 +1 0 +4 0 +54 0 +3695 1 +2914 1 +6999 4 +1212 0 +269 0 +723 0 +6267 0 +8 0 +1388 0 +726 0 +1605 0 +185 0 +70 0 +3075 0 +231 0 +1025 2 +750 0 +8849 22 +1006 1 +2466 0 +213 0 +2826 1 +57 0 +2634 1 +3522 1 +133445 328 +1375 3 +404 0 +42 0 +77 0 +234 0 +2003 0 +12454 11 +538 0 +617 0 +1567 1 +29 0 +1389 1 +1156 0 +1920 2 +1063 0 +2613 2 +87 0 +2800 0 +122 0 +296 0 +536 0 +117 0 +898 0 +588 0 +1476 0 +371 0 +2896 2 +351 0 +2052 1 +1293 0 +52 0 +20600 28 +672 2 +1397 0 +1109 0 +486 0 +425 0 +3194 0 +640 0 +8710 11 +1345 1 +0 0 +4 0 +248 0 +207 0 +954 0 +75 0 +460 0 +24 0 +200 0 +604 0 +690 0 +236 0 +1214 1 +581 1 +1358 0 +1253 2 +1334 0 +178 0 +668 0 +1445 5 +219 1 +1180 0 +80 0 +8 0 +2647 0 +285 0 +442 1 +4 0 +19 0 +65 0 +4346 20 +2051 0 +2065 0 +101 69 +4 831 +36 1060 +1471 1 +716 0 +1106 1 +2699 1 +231 0 +354 0 +1903 0 +1208 1 +1524 1 +1733 1 +2101 18 +33 17 +55 0 +208 0 +382 0 +39 0 +212 5 +833 1 +876 0 +1918 1 +96 0 +1180 0 +1375 14 +126 0 +257 0 +5469 0 +239 0 +632 0 +1222 0 +1700 5 +3662 1 +1818 2 +992 0 +897 1 +891 1 +1252 1 +248 0 +14783 16 +162 0 +2895 0 +301 0 +1373 0 +1568 0 +1051 0 +259 0 +407 0 +123 1 +1244 0 +1229 1 +1804 0 +1132 0 +1340 3 +455 0 +4 0 +414 1 +210 0 +1003 0 +494 0 +348 0 +2521 4 +2609 3 +800 0 +2431 2 +1513 1 +347 0 +427 0 +472 0 +688 1 +5615 14 +4472 11 +1695 2 +270 0 +296 0 +3485 1 +1314 0 +64 19 +1998 0 +968 0 +1449 1 +486 0 +364 217 +1870 643 +1781 3 +1095 12 +2536 0 +440 0 +296 1 +3807 1 +1017 0 +320 0 +652 0 +1354 0 +14531 10 +355 0 +2 0 +117 0 +821 0 +1974 0 +949 1 +2651 3 +1 0 +1584 0 +1355 2 +1131 0 +3185 0 +932 1 +1949 1 +282 1 +1007 0 +25 0 +1353 0 +1310 0 +2947 3 +1069 2 +415 0 +1590 3 +140 0 +17783 6 +1921 0 +1613 1 +844 1 +499 0 +5304 7 +862 0 +2061 3 +302 1 +4451 4 +980 1 +722 0 +3498 4 +740 0 +2754 997 +1462 996 +2241 0 +7256 0 +265 0 +12857 0 +209 0 +1201 1 +77 0 +546 0 +4095 5 +1997 0 +2402 6 +286 0 +2416 3 +1291 1 +71 0 +573 0 +230 0 +81 0 +1260 1 +1803 0 +2307 1 +2845 0 +525 0 +1061 3 +992 0 +58 0 +4791 1 +7384 4 +2473 6 +3257 6 +906 0 +1121 1 +526 0 +1328 1 +4207 5 +10 0 +317 0 +1036 0 +17755 8 +441 2 +355 2 +3072 0 +1223 0 +867 0 +910 0 +0 9 +42 0 +926 1 +639 0 +1180 0 +0 0 +443 0 +511 0 +2288 0 +243 0 +6933 5 +5107 5 +382 0 +254 0 +1488 0 +5 0 +1384 0 +645 0 +616 0 +122 0 +910 3 +2512 7 +1150 0 +95 0 +8643 3 +1552 1 +805 0 +409 0 +180 0 +628 0 +455 0 +695 0 +3611 1 +1363 0 +1039 0 +646 1 +9 0 +498 0 +1951 0 +225 0 +0 0 +1440 1 +1294 3 +21583 6 +1723 0 +760 0 +1381 1 +850 0 +2 0 +61 0 +799 0 +307 0 +13144 6 +122 0 +2705 1 +2939 4 +456 2 +4 0 +640 1 +517 0 +803 0 +898 0 +990 0 +1158 0 +297 0 +3383 1 +2313 1 +2456 0 +155 0 +359 0 +196 0 +124 0 +142 0 +61 0 +990 0 +775 0 +1422 5 +26 0 +2350 5 +995 1 +14858 9 +1083 1 +3412 2 +360 1 +1223 1 +795 0 +950 0 +972 0 +955 0 +845 0 +342 0 +387 0 +1824 1 +264 0 +2225 3 +1072 0 +2116 51 +200 52 +113 0 +1660 0 +364 0 +1430 1 +298 0 +557 0 +2737 1 +549 1 +18 1818 +1831 0 +3357 1 +17 0 +53 0 +442 1818 +662 0 +963 0 +4 0 +404 0 +8 0 +136 0 +3100 1 +1695 1 +1361 2 +267 0 +5025 1 +10 0 +163 0 +148 0 +106 0 +0 0 +25 0 +462 0 +1244 0 +837 0 +526 0 +524 0 +456 0 +1477 0 +390 0 +342 0 +1571 0 +973 0 +491 2 +1041 0 +1502 4 +2046 0 +2453 1 +7904 2 +2787 0 +14 0 +279 0 +71 0 +22 2 +191 0 +95 0 +9 0 +131 0 +101 2 +42 2 +132 2 +64 0 +1657 1 +391 0 +468 0 +1450 0 +3736 21 +625 0 +989 3 +1099 3 +1780 6 +7023 3 +432 0 +1065 0 +175 0 +2582 2 +80 0 +224 0 +125 0 +1296 0 +9604 1 +355 1 +3889 0 +2013 4 +1247 4 +10298 3 +9 2 +2 2 +14 0 +634 0 +237 0 +579 0 +3282 8 +64 0 +1025 1 +522 0 +0 0 +687 0 +2175 142335 +271 0 +194 0 +1735 0 +3974 0 +832 0 +3688 0 +253 0 +4685 1 +1543 0 +2 0 +2156 1 +3758 2 +726 0 +109 0 +745 0 +142 0 +333 0 +102 0 +236 0 +17789 6041 +1979 1 +541 1 +8616 35 +4753 13 +6240 0 +325 0 +1432 0 +612 0 +21 0 +215 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +9 0 +0 0 +1 0 +0 0 +0 0 +1898 0 +12 0 +5 15 +0 15 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +277 0 +0 0 +2 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +1 0 +2 0 +0 0 +0 0 +0 0 +0 0 +2 0 diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278970/libParams/flenDist.txt b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278970/libParams/flenDist.txt new file mode 100644 index 0000000000000000000000000000000000000000..5adb835ed990d9abb29d3765a607832d4e84313a --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278970/libParams/flenDist.txt @@ -0,0 +1,2 @@ +2.3985e-42 3.57509e-42 5.32033e-42 7.90489e-42 1.17262e-41 1.7367e-41 2.56802e-41 3.79119e-41 5.58804e-41 8.22333e-41 1.20821e-40 1.77231e-40 2.59564e-40 3.79537e-40 5.54074e-40 8.07586e-40 1.17521e-39 1.70743e-39 2.47674e-39 3.58692e-39 5.18642e-39 7.48719e-39 1.07914e-38 1.55288e-38 2.23103e-38 3.20021e-38 4.58306e-38 6.55297e-38 9.35463e-38 1.33328e-37 1.89722e-37 2.6954e-37 3.82324e-37 5.41435e-37 7.65536e-37 1.08066e-36 1.52307e-36 2.14317e-36 3.0109e-36 4.2232e-36 5.91415e-36 8.26891e-36 1.15428e-35 1.6087e-35 2.23845e-35 3.10975e-35 4.31327e-35 5.97302e-35 8.25823e-35 1.13995e-34 1.57104e-34 2.1617e-34 2.96968e-34 4.07313e-34 5.57767e-34 7.62574e-34 1.04092e-33 1.41859e-33 1.93019e-33 2.62211e-33 3.55637e-33 4.81578e-33 6.51077e-33 8.78827e-33 1.18435e-32 1.59353e-32 2.14066e-32 2.87104e-32 3.84447e-32 5.13971e-32 6.86035e-32 9.14238e-32 1.2164e-31 1.61585e-31 1.43044e-07 1.31247e-06 5.80984e-06 1.66844e-05 3.36921e-05 5.13603e-05 6.51679e-05 7.47379e-05 9.01344e-05 0.000132436 0.000205028 0.000276719 0.000298445 0.000257965 0.000350934 0.00089884 0.0017466 0.00232314 0.00247847 0.00246911 0.00243669 0.00240802 0.00240677 0.00241751 0.00240634 0.00238417 0.0023773 0.00238987 0.00240398 0.00239485 0.00237263 0.00234567 0.00231594 0.0023111 0.00232107 0.00231571 0.00231335 0.00233508 0.0023659 0.002384 0.00238262 0.00236192 0.00231766 0.00226723 0.002227 0.00219554 0.00219666 0.00222637 0.00223836 0.00223989 0.00225734 0.00226996 0.00225787 0.0022286 0.00220108 0.0021831 0.00217006 0.00218684 0.00224771 0.00230766 0.00234083 0.00235632 0.00235433 0.00235189 0.00235766 0.00234553 0.00233027 0.00234494 0.00236399 0.00236755 0.00237866 0.00239943 0.0024177 0.0024272 0.00243496 0.00249585 0.00260751 0.00269222 0.00277387 0.00288518 0.00295039 0.00297759 0.00308985 0.00330081 0.00349141 0.00362376 0.00377817 0.00402266 0.00435978 0.0047174 0.00506929 0.00547622 0.00594873 0.00646623 0.00705665 0.0077284 0.00842439 0.00913018 0.00998598 0.0111011 0.0122281 0.0130791 0.0138084 0.0145797 0.0153664 0.0164434 0.0178349 0.0190064 0.0200998 0.021431 0.0222325 0.0218685 0.0210118 0.020678 0.0207139 0.0205103 0.0202567 0.0200939 0.0198414 0.0195477 0.0194083 0.0194971 0.0194842 0.0190829 0.0183548 0.0173901 0.0164048 0.0156273 0.0150183 0.0144187 0.0137343 0.0130087 0.0123519 0.0117008 0.0108927 0.0100632 0.00939741 0.00874773 0.00800253 0.00730786 0.00675765 0.0062735 0.00577759 0.0052806 0.00484212 0.00448304 0.00415396 0.00382057 0.00350883 0.00323408 0.00298522 0.00278306 0.00263469 0.00249369 0.00233353 0.00214978 0.00194743 0.00177092 0.00163886 0.00151892 0.00140177 0.00129729 0.00119766 0.00108686 0.000958019 0.000828887 0.000722257 0.000635346 0.000553868 0.000477458 0.000412854 0.000357851 0.000310369 0.000269988 0.00023256 0.000199853 0.000175737 0.00015849 0.000143344 0.000126624 0.000111127 0.000100065 8.99625e-05 7.93424e-05 6.9594e-05 5.96666e-05 5.00658e-05 4.23721e-05 3.79685e-05 3.76949e-05 3.77486e-05 3.31418e-05 2.55365e-05 2.12677e-05 2.19348e-05 2.28031e-05 2.0267e-05 1.58839e-05 1.26445e-05 1.13139e-05 1.11679e-05 1.07722e-05 9.65272e-06 8.79965e-06 8.14885e-06 6.96415e-06 5.38043e-06 4.50896e-06 4.7876e-06 4.92591e-06 4.8552e-06 5.70072e-06 6.77475e-06 6.75821e-06 6.43289e-06 7.23988e-06 7.89128e-06 6.79953e-06 5.30319e-06 4.34231e-06 3.24871e-06 2.39589e-06 2.48416e-06 3.12735e-06 3.51446e-06 3.57252e-06 3.97146e-06 4.47927e-06 4.47121e-06 4.50171e-06 4.68234e-06 4.18353e-06 3.41803e-06 3.49257e-06 4.59182e-06 5.74799e-06 5.64768e-06 5.18703e-06 6.0044e-06 6.80349e-06 6.14391e-06 4.95522e-06 3.94768e-06 3.04698e-06 2.58484e-06 2.55843e-06 2.54427e-06 2.34695e-06 2.09082e-06 2.43136e-06 3.14038e-06 2.90372e-06 1.76223e-06 1.1822e-06 2.06039e-06 3.41509e-06 3.92716e-06 3.85883e-06 3.30244e-06 2.12341e-06 1.5171e-06 1.98254e-06 2.57716e-06 2.85292e-06 2.62937e-06 1.84464e-06 1.39942e-06 1.58738e-06 1.49135e-06 9.15615e-07 4.53787e-07 3.12011e-07 6.77167e-07 1.8533e-06 2.82238e-06 2.49175e-06 1.99555e-06 2.17151e-06 2.20741e-06 1.93427e-06 1.74358e-06 1.7542e-06 1.87934e-06 1.99598e-06 2.41334e-06 2.78438e-06 2.22858e-06 1.2054e-06 5.91369e-07 4.79085e-07 5.5357e-07 4.596e-07 3.87331e-07 6.59469e-07 8.84e-07 7.96985e-07 1.00458e-06 1.65115e-06 2.18752e-06 2.70376e-06 3.23704e-06 3.27729e-06 2.83605e-06 2.2633e-06 1.67128e-06 1.2066e-06 1.1137e-06 1.17973e-06 1.17778e-06 1.59538e-06 2.2366e-06 2.17668e-06 1.74095e-06 1.69002e-06 1.65507e-06 1.1442e-06 4.91735e-07 2.65061e-07 5.34323e-07 8.6294e-07 9.57802e-07 9.62592e-07 9.54422e-07 7.82407e-07 5.67968e-07 7.59823e-07 1.3655e-06 1.7358e-06 1.64021e-06 1.68834e-06 2.06838e-06 2.37575e-06 2.69862e-06 3.02569e-06 3.19303e-06 3.80766e-06 5.03042e-06 6.01496e-06 5.68022e-06 3.73076e-06 1.96295e-06 2.20694e-06 3.77116e-06 4.99838e-06 5.36306e-06 5.11617e-06 4.51822e-06 3.90822e-06 3.45346e-06 3.32272e-06 3.56195e-06 3.3897e-06 2.45911e-06 1.79662e-06 1.97451e-06 2.25384e-06 2.18117e-06 2.38223e-06 3.68055e-06 5.20089e-06 4.79097e-06 2.95506e-06 2.0709e-06 2.23714e-06 2.34813e-06 2.03102e-06 1.35314e-06 1.01636e-06 1.40329e-06 1.74009e-06 1.51396e-06 1.28739e-06 1.58885e-06 1.81715e-06 1.26842e-06 6.40109e-07 8.67125e-07 1.55687e-06 1.79056e-06 1.47437e-06 1.3037e-06 1.80408e-06 2.46017e-06 2.28511e-06 1.42161e-06 7.36425e-07 3.98709e-07 3.8945e-07 8.75788e-07 1.33509e-06 1.25276e-06 1.09089e-06 1.26816e-06 1.69191e-06 2.2136e-06 2.42283e-06 1.87313e-06 9.6522e-07 4.72327e-07 4.4896e-07 6.08385e-07 8.74739e-07 1.22026e-06 1.3094e-06 8.57914e-07 3.89543e-07 4.62947e-07 9.31638e-07 1.39556e-06 1.44843e-06 1.06601e-06 7.34025e-07 5.98278e-07 3.83241e-07 2.11151e-07 3.16398e-07 4.19628e-07 2.65816e-07 6.44462e-08 2.7667e-11 1.38076e-08 5.95635e-08 1.18884e-07 1.58944e-07 2.14899e-07 3.48748e-07 5.85587e-07 8.98401e-07 9.78653e-07 5.92414e-07 1.99689e-07 2.03454e-07 2.9964e-07 2.02542e-07 5.51134e-08 3.29974e-09 3.19884e-09 3.86868e-09 6.69692e-08 2.59124e-07 3.87872e-07 2.58581e-07 6.58424e-08 1.91628e-08 1.34839e-07 3.7167e-07 6.07707e-07 8.74866e-07 1.10904e-06 9.18141e-07 4.01588e-07 7.89065e-08 1.67058e-08 1.12576e-08 4.47017e-09 5.27425e-09 1.13882e-07 4.31403e-07 6.41412e-07 4.26883e-07 1.06727e-07 4.82994e-12 1.21467e-12 6.20754e-15 2.96415e-15 7.41037e-16 3.01435e-10 9.49452e-09 3.50012e-08 5.10883e-08 3.36814e-08 8.43866e-09 2.61667e-08 1.15374e-07 2.00205e-07 1.69661e-07 2.21695e-07 6.19402e-07 9.13114e-07 6.17309e-07 1.84219e-07 4.71351e-08 3.30637e-08 1.3703e-08 9.80202e-09 9.84019e-09 5.43783e-09 1.3315e-09 3.62346e-10 5.44183e-10 3.63677e-10 1.96204e-08 7.81153e-08 1.18789e-07 8.458e-08 2.92261e-08 1.23345e-07 4.69138e-07 7.01283e-07 6.16935e-07 7.14549e-07 9.09238e-07 6.48533e-07 2.25655e-07 5.09938e-08 5.45291e-08 1.73082e-07 2.77836e-07 2.10465e-07 2.22514e-07 6.12455e-07 9.11402e-07 6.1323e-07 2.92962e-07 5.43418e-07 8.13489e-07 5.90122e-07 3.20049e-07 2.75163e-07 2.20726e-07 1.80004e-07 1.89215e-07 1.21619e-07 2.97266e-08 6.82776e-12 2.82429e-08 1.12905e-07 2.29615e-07 5.06172e-07 9.98519e-07 1.1721e-06 7.45815e-07 2.7907e-07 9.99415e-08 3.64813e-08 4.60187e-09 1.74792e-12 4.51251e-10 2.92259e-08 1.12391e-07 2.03589e-07 2.60309e-07 3.03253e-07 4.15579e-07 6.36249e-07 9.16659e-07 1.24169e-06 1.3394e-06 1.15868e-06 1.46546e-06 2.52831e-06 4.53924e-06 8.03346e-06 1.04536e-05 9.14073e-06 7.3135e-06 7.55245e-06 6.69147e-06 3.50266e-06 1.03502e-06 5.02919e-07 7.14329e-07 8.01926e-07 5.15693e-07 1.66609e-07 7.42256e-08 1.10976e-07 2.47304e-07 5.91221e-07 8.97804e-07 9.19274e-07 8.37965e-07 7.07359e-07 4.31766e-07 3.27129e-07 7.28723e-07 1.16197e-06 9.61623e-07 4.67385e-07 2.62916e-07 2.22769e-07 2.4145e-07 5.2184e-07 8.00396e-07 6.22067e-07 2.24326e-07 9.3634e-08 2.60647e-07 3.9201e-07 2.78065e-07 1.10886e-07 5.38139e-08 3.33717e-08 1.75276e-08 3.2677e-08 7.76707e-08 1.05145e-07 7.76274e-08 5.11272e-08 6.97688e-08 8.03083e-08 4.7329e-08 1.11009e-08 6.04964e-11 3.15821e-08 1.25806e-07 2.82365e-07 5.07499e-07 6.20188e-07 4.55085e-07 2.8424e-07 2.53336e-07 1.64715e-07 4.17451e-08 9.49029e-10 1.02134e-09 8.36472e-10 5.61834e-08 2.23134e-07 3.55791e-07 3.12092e-07 3.11324e-07 6.16775e-07 9.74174e-07 9.12422e-07 5.03524e-07 3.54829e-07 7.91939e-07 1.14425e-06 7.60819e-07 2.26111e-07 1.44751e-07 2.20031e-07 1.73346e-07 1.21521e-07 1.13477e-07 7.23293e-08 3.23237e-08 4.61996e-08 6.21969e-08 4.05911e-08 1.73661e-08 2.23626e-08 3.09978e-08 2.19823e-08 1.17673e-08 4.09474e-08 1.30317e-07 2.78235e-07 5.00847e-07 6.28536e-07 4.45838e-07 1.62103e-07 4.2877e-08 2.01064e-08 5.0266e-09 3.66553e-10 3.7062e-08 1.44589e-07 2.42528e-07 2.66004e-07 2.54014e-07 2.56295e-07 3.73438e-07 5.2607e-07 4.56235e-07 2.38052e-07 1.02986e-07 4.67552e-08 8.51323e-08 2.89912e-07 5.42082e-07 7.20345e-07 7.15228e-07 4.28525e-07 1.10768e-07 3.41016e-09 9.8425e-10 5.26845e-10 1.40673e-08 5.37709e-08 8.03379e-08 5.39247e-08 1.38226e-08 6.17846e-09 2.41626e-08 3.62422e-08 2.41612e-08 6.04032e-09 3.57844e-15 2.90297e-29 2.90297e-29 4.67053e-09 1.87989e-08 2.84922e-08 1.12224e-07 6.66986e-07 1.71914e-06 2.11596e-06 1.36377e-06 7.10078e-07 6.21306e-07 4.1417e-07 1.18407e-07 3.72028e-08 4.25448e-08 3.35135e-08 4.41081e-08 1.99682e-07 6.04025e-07 9.19756e-07 8.10848e-07 5.05562e-07 2.40631e-07 6.04837e-08 7.85473e-09 3.03557e-08 3.08743e-07 1.0618e-06 1.53669e-06 1.0187e-06 2.78784e-07 5.5106e-08 6.37185e-08 4.00576e-08 2.33542e-08 1.10723e-07 3.43992e-07 4.89284e-07 3.51038e-07 1.97758e-07 2.58638e-07 3.60603e-07 3.83665e-07 3.38816e-07 2.51025e-07 2.65981e-07 3.24679e-07 3.6362e-07 6.43877e-07 8.85841e-07 5.93829e-07 1.59639e-07 1.06076e-07 3.55554e-07 5.5067e-07 6.03191e-07 7.5829e-07 8.70998e-07 6.95488e-07 4.32188e-07 2.36159e-07 1.43735e-07 2.21792e-07 4.7617e-07 7.26945e-07 6.60021e-07 3.36476e-07 1.08535e-07 4.70568e-08 3.24034e-08 3.70761e-08 8.84244e-08 1.78674e-07 2.13329e-07 1.30607e-07 3.55348e-08 1.55663e-08 1.65418e-07 5.97953e-07 9.12722e-07 6.61743e-07 2.31398e-07 6.10275e-08 3.46941e-08 2.6076e-08 3.0295e-08 2.47962e-08 1.17824e-08 3.93907e-09 8.52923e-10 9.59665e-14 1.75008e-09 7.00033e-09 1.05237e-08 7.09312e-09 4.51107e-09 1.058e-08 2.69578e-08 5.53023e-08 7.14941e-08 5.14134e-08 2.11012e-08 6.59828e-09 1.72578e-09 3.0483e-10 4.57246e-10 1.08525e-07 4.32959e-07 6.49324e-07 4.32883e-07 1.92028e-07 3.35229e-07 5.02845e-07 4.47904e-07 5.34502e-07 6.98756e-07 5.41559e-07 2.48973e-07 9.0867e-08 2.2717e-08 1.61244e-13 4.03109e-14 2.90297e-29 2.90297e-29 2.90297e-29 2.90297e-29 1.52606e-08 6.10425e-08 9.16203e-08 7.19005e-08 1.10569e-07 3.50894e-07 6.65674e-07 7.56447e-07 6.65466e-07 5.61753e-07 4.29306e-07 3.9393e-07 4.27049e-07 2.87361e-07 9.32361e-08 2.58199e-08 1.57356e-08 1.53134e-08 4.22519e-08 1.168e-07 3.16491e-07 6.20063e-07 7.29092e-07 4.87932e-07 3.15684e-07 5.7995e-07 8.46396e-07 7.45644e-07 6.67031e-07 6.57611e-07 3.94679e-07 9.39806e-08 7.28433e-08 2.87104e-07 5.8838e-07 9.19104e-07 1.05915e-06 7.88669e-07 3.92758e-07 1.56679e-07 4.11073e-08 5.90503e-09 9.08849e-09 1.00346e-08 9.22787e-09 5.8091e-09 1.77955e-09 1.3091e-10 2.90297e-29 2.65956e-08 1.07082e-07 1.62412e-07 1.10736e-07 2.96266e-08 8.54261e-10 3.86076e-11 1.5684e-09 1.12904e-07 4.35933e-07 6.46057e-07 4.28091e-07 1.06631e-07 2.90297e-29 1.38297e-13 5.5319e-13 9.00673e-11 3.57503e-10 5.35564e-10 3.5695e-10 9.73219e-08 3.88931e-07 5.83396e-07 3.88931e-07 9.72326e-08 2.90297e-29 2.90297e-29 2.90297e-29 2.85688e-12 1.14275e-11 1.71413e-11 1.14275e-11 2.85688e-12 2.90297e-29 2.90297e-29 2.90297e-29 2.90297e-29 2.90297e-29 3.76002e-12 3.0482e-10 1.18324e-09 1.75994e-09 1.17222e-09 2.96005e-10 8.07077e-12 2.60516e-11 3.90737e-11 3.00174e-11 2.23897e-11 2.45414e-11 3.82382e-09 1.52285e-08 2.28333e-08 1.52218e-08 3.80733e-09 2.77285e-12 1.68785e-12 4.46519e-13 1.59907e-07 6.39627e-07 9.59441e-07 + diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/aux_info/ambig_info.tsv b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/aux_info/ambig_info.tsv new file mode 100644 index 0000000000000000000000000000000000000000..2630b36a26b7351f423ea71a5b1785da092b34fd --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/aux_info/ambig_info.tsv @@ -0,0 +1,5924 @@ +UniqueCount AmbigCount +1935 0 +1454 0 +799 0 +2377 3 +498 1 +899 0 +2963 0 +2354 1 +1184 0 +4135 6 +3391 1 +474 0 +621 0 +839 1 +535 0 +557 0 +6370 7 +1090 4 +2106 0 +2317 1 +141 1 +1752 1 +379 0 +1023 3 +1663 0 +6638 4 +955 0 +366 0 +5 0 +1503 0 +954 0 +2811 2 +2371 0 +2619 9 +185 0 +1326 3 +699 0 +84 1 +12 0 +932 0 +928 0 +44 0 +70 27 +573 31 +250 0 +34591 7 +1626 5 +3331 2 +7248 12 +1873 0 +1067 0 +647 1 +5372 0 +346 0 +1463 2 +1546 0 +1887 2 +118 0 +616 1 +7550 10 +3754 4 +789 0 +0 0 +2247 2 +7613 1 +2055 2 +463 1 +217 0 +161 277 +484 0 +2800 18 +13327 5 +6657 3 +483 0 +428 0 +3109 1 +611 0 +495 0 +2803 0 +1701 1 +396 0 +1180 0 +918 1 +25987 8 +0 0 +1549 2 +413 1 +1659 0 +0 0 +8 11 +25577 60 +1295 0 +4976 3 +2095 4 +630 20 +5228 48 +1181 1 +1340 7 +967 0 +795 0 +366 0 +4482 20 +1015 0 +1769 5 +32 0 +1715 1 +712 0 +436 0 +48 0 +52 0 +3833 1 +1490 1 +854 1 +318 1 +642 0 +214 0 +439 0 +952 0 +447 1 +437 1 +73 0 +847 0 +503 2 +1194 2 +1271 0 +103 0 +1876 0 +2614 0 +766 0 +661 0 +1040 0 +2735 2 +363 0 +2606 15 +529 1 +1749 0 +2476 43 +1237 5 +281 0 +848 0 +977 1 +1217 2 +926 0 +357 0 +1017 0 +231 0 +1474 2 +4126 31 +3596 1 +2314 2 +2196 0 +533 0 +1613 1 +3204 1 +7 0 +2911 1 +3369 2 +915 1 +1029 0 +545 0 +640 0 +0 0 +126 0 +305 0 +3274 1 +530 0 +4 29 +1 11 +2 26 +2 0 +5195 1 +3546 4 +899 0 +2921 1 +879 0 +4695 4 +510 1 +64 527 +239 0 +886 0 +427 1 +1 0 +1264 3 +2183 1 +511 0 +5043 22 +6 0 +35 527 +148 0 +262 0 +915 0 +521 0 +947 1 +893 0 +1240 0 +6 0 +1194 0 +8273 3 +449 0 +1534 5 +647 3 +182 0 +773 0 +684 1 +1357 0 +760 0 +118 0 +772 0 +616 1 +883 1 +111 0 +380 0 +152 0 +647 0 +1037 7 +595 0 +2784 2 +937 0 +544 0 +2794 2 +734 0 +1273 0 +2989 3 +412 1 +551 0 +828 0 +429 0 +329 0 +1287 0 +48 2 +932 1 +1 0 +434 0 +180 0 +332 1 +10507 27 +814 0 +3511 2 +8397 66 +2054 2 +160 0 +1206 0 +475 1 +2354 0 +2290 2 +5126 1 +6730 3 +2385 2 +2044 0 +525 0 +370 0 +25117 31 +1259 0 +491 1 +1315 0 +494 0 +3022 0 +1260 1 +145 0 +865 1 +2386 0 +2264 1 +224 1 +325 0 +751 1 +25057 5 +2 0 +1566 0 +3547 3 +743 0 +661 0 +1164 1 +83 0 +1209 1 +201 0 +316 0 +270 0 +154 0 +468 0 +776 0 +71 0 +939 0 +373 0 +2047 0 +1987 0 +37 0 +7067 4 +1115 1 +897 0 +1438 0 +590 1 +413 0 +3661 2 +2557 38 +2869 19 +789 0 +434 1 +48010 38 +267 1 +2253 2 +13394 10 +2569 0 +7948 33 +5635 14 +883 0 +1647 3 +888 0 +1124 1 +919 1 +2257 1 +286 0 +1106 0 +511 2 +327 0 +568 0 +938 0 +1954 0 +22 0 +3344 8 +564 1 +750 1 +316 0 +52 0 +786 0 +1238 1 +4110 13 +31734 12 +30336 7 +534 0 +1060 0 +107 0 +647 3 +124 0 +95 2 +158 0 +1153 1 +4456 1 +26631 30 +3864 71 +1047 0 +2561 1 +737 0 +1601 6 +2661 1 +2853 27 +1862 0 +6298 3 +997 1 +170 0 +2177 0 +185 0 +1154 0 +3161 9 +92 8 +3376 1 +763 0 +673 1 +231 0 +100 0 +458 0 +1154 0 +944 0 +1332 0 +1428 1 +124 0 +2156 1 +5138 1 +154 0 +762 0 +212 0 +942 1 +321 0 +72 153 +430 405 +128 1 +594 0 +3549 0 +3237 1 +550 0 +1540 1 +29 0 +100 0 +11567 24 +10416 14 +1036 0 +861 2 +3595 0 +552 1 +2812 0 +2514 1 +115 0 +1377 3 +993 1 +0 0 +526 0 +249 0 +91 0 +156 0 +570 0 +634 0 +31 0 +734 0 +2608 0 +130 0 +1442 3 +1045 1 +4080 1 +115 0 +2016 2 +1767 0 +379 0 +367 0 +0 0 +423 0 +315 0 +385 0 +9 0 +318 0 +458 0 +361 0 +24 0 +1058 0 +902 0 +92 0 +598 0 +3300 0 +468 1 +1499 0 +1295 0 +10 0 +754 1 +36 0 +76 0 +884 0 +554 1 +1654 0 +372 0 +120 1 +4134 22 +414 0 +11344 36 +1758 1 +2265 8 +245 0 +1493 0 +855 1 +769 1 +1662 0 +400 64 +472 1 +166 0 +11 0 +490 0 +843 0 +2527 0 +6905 2 +3436 2 +6 808 +1328 1 +0 0 +118 0 +1031 0 +1359 2 +116 0 +414 1 +8 0 +743 0 +209 0 +149 808 +1 0 +442 0 +975 1 +80 0 +742 1 +1386 3 +5584 3 +2515 3 +1158 2 +113 0 +0 0 +406 0 +13195 24 +2926 2 +338 0 +252 0 +1634 2 +1569 0 +0 0 +13411 6 +1064 0 +779 0 +995 0 +1183 0 +3758 1 +869 0 +1098 0 +687 0 +344 0 +4069 1 +26889 11 +1306 1 +3447 3 +4154 2 +11460 9 +1661 0 +2313 2 +1448 0 +686 1 +3281 1 +1470 1 +2912 8 +3508 2 +184 0 +1622 3 +1645 0 +155 0 +38 0 +4312 1 +405 0 +3948 1 +868 2 +781 0 +671 0 +122 0 +7035 3 +1376 0 +196 0 +3346 6 +1190 0 +3847 5 +31 0 +3538 18 +1140 0 +1315 1 +642 1 +271 0 +1309 4 +1491 0 +19621 5 +741 1 +8 267 +2081 0 +1931 3 +240 0 +1561 1 +2447 2 +616 0 +695 0 +1557 0 +5120 4 +706 0 +51 0 +2028 2 +22145 16 +22 11 +4897 1413 +2290 0 +515 1 +597 0 +905 1 +666 1 +697 4 +426 0 +1096 1413 +3806 0 +0 0 +256 0 +1744 0 +653 0 +1000 1 +1283 0 +1614 0 +1183 0 +430 0 +337 0 +204 0 +15102 299 +2 0 +584 0 +1008 1 +1034 1 +2314 1 +15005 43 +0 0 +3644 0 +2073 1 +1336 0 +49 0 +110 0 +13 0 +757 5 +37 0 +300 0 +984 0 +9 0 +388 0 +2971 1 +1662 3 +0 0 +0 0 +1120 1 +6334 2 +2 0 +3159 1 +2499 0 +356 0 +7306 20 +41 0 +526 0 +1021 0 +354 0 +1004 0 +2282 2 +1577 4 +3655 2 +491 1 +628 0 +340 0 +638 0 +762 0 +502 0 +151 0 +409 0 +124 0 +0 0 +651 1 +144 0 +1379 2 +610 0 +0 2 +191 1 +1 2 +0 0 +3050 0 +1458 1 +11374 2 +426 0 +524 0 +139 0 +22 0 +23 0 +1989 0 +2 0 +289 1 +555 0 +955 0 +117 0 +531 0 +2158 1 +1326 0 +3297 1 +386 0 +1894 1 +493 0 +1322 0 +656 0 +1201 1 +159 0 +8157 6 +62 0 +5205 1 +303 0 +2351 0 +980 1 +199 0 +169 0 +152 0 +235 0 +2162 0 +3402 3 +1150 0 +906 1 +2190 2 +510 1 +435 3 +970 0 +1191 0 +719 1 +524 0 +1427 1 +2323 0 +3148 1 +567 1 +130 0 +255 0 +21 0 +659 0 +279 0 +9 0 +1248 0 +1 0 +4 0 +1364 0 +885 0 +1186 176 +363 176 +1515 1069 +1638 3 +3075 2 +607 1 +1750 1 +2428 1 +149 1 +512 0 +1864 0 +401 0 +15125 3 +1150 5 +94 0 +2481 1 +8549 13 +8289 0 +10 0 +1819 1 +1422 0 +947 3 +193 0 +1054 2 +728 0 +921 0 +1791 0 +634 2 +470 0 +39 0 +2629 0 +1560 0 +171 0 +171 0 +250 0 +62 0 +974 1 +728 0 +499 0 +1757 0 +3462 21 +0 0 +477 1 +606 1 +504 0 +173 0 +86 0 +2252 0 +0 0 +551 0 +7534 6 +771 0 +878 0 +751 2 +286 0 +791 0 +192 0 +2404 1 +817 2 +705 3 +135 0 +1395 0 +2944 5 +3813 5 +638 0 +259 0 +467 4 +499 2 +1340 0 +338 1 +3019 3 +1094 0 +91 0 +478 0 +753 1 +317 0 +385 0 +840 0 +2995 1 +112 0 +687 0 +2346 6 +824 0 +2018 7 +1086 2 +2863 3 +2674 1 +2094 0 +842 0 +2709 9 +134 0 +895 2 +483 0 +741 1 +3115 1 +200 0 +1038 1 +1001 0 +114 0 +191 0 +1983 1 +35 0 +1059 0 +463 0 +0 0 +513 0 +683 2 +1337 0 +16647 6 +54 0 +193 0 +2695 1 +1639 0 +475 1 +897 1 +0 0 +707 1 +256 0 +46 0 +2258 1 +3057 3 +1013 3 +1012 4 +239 0 +1109 0 +698 0 +71 0 +600 1 +819 0 +903 0 +2531 0 +8 0 +472 0 +1013 0 +8383 4 +4649 0 +4289 2 +1103 0 +1456 0 +566 0 +983 0 +317 0 +11 0 +76 0 +571 0 +332 0 +737 2 +472 0 +2941 3 +1297 0 +2506 1 +981 6 +1924 0 +1021 0 +184 0 +5 0 +1543 6 +1947 0 +4580 2 +914 0 +107 0 +511 0 +263 0 +322 0 +153 0 +299 0 +407 0 +996 2 +228 0 +204 0 +682 0 +301 0 +72 0 +1159 1 +219 0 +1483 2 +103 1 +168 2 +517 0 +462 0 +1311 0 +2343 2 +1260 0 +1205 0 +0 0 +6 0 +951 0 +480 0 +18 0 +211 0 +913 0 +555 0 +2155 0 +565 0 +499 0 +421 1 +5144 3 +1987 2 +3794 2 +3247 13 +25 0 +1350 0 +2392 1 +2038 1 +491 0 +838 0 +2693 8 +766 1 +334 0 +1155 0 +1994 2 +367 0 +684 0 +44 0 +1469 0 +723 0 +1447 8 +998 0 +23956 8 +353 0 +488 0 +2439 1 +928 1 +710 2 +221 0 +4526 1 +838 0 +118 0 +126 0 +242 0 +2108 0 +3091 0 +624 0 +170 0 +2666 2 +263 0 +420 1 +3464 3 +284 0 +3465 4 +2302 0 +1401 1 +510 1 +16138 4 +5458 1 +673 1 +3144 1 +3469 0 +261 0 +168 0 +2787 1 +89 0 +1636 0 +1509 1 +1634 1 +109 0 +419 0 +743 0 +757 0 +1228 1 +15397 11 +390 0 +444 0 +282 1 +1392 0 +170 0 +0 15 +105 0 +854 0 +707 0 +59 0 +1235 1 +784 1 +160 0 +473 0 +955 0 +730 2 +0 0 +985 2 +509 0 +379 0 +473 0 +932 0 +1022 1 +2554 0 +518 0 +1305 5 +1381 0 +970 0 +3121 2 +104 0 +1050 1 +705 0 +1398 0 +263 0 +597 0 +367 0 +1960 2 +1021 1 +1521 0 +1251 0 +1608 2 +371 0 +1557 0 +2970 4 +7292 2 +2215 1 +9418 2 +235 1 +1074 0 +4065 1 +1102 0 +223 0 +292 0 +3241 0 +1057 0 +3021 2 +46 0 +1139 0 +2553 0 +1477 1 +482 0 +50 0 +186 1 +2629 0 +483 0 +0 0 +2095 0 +36 0 +276 0 +17 0 +415 1 +1869 1 +973 1 +11261 6 +1207 1 +584 1 +539 2 +2494 0 +2151 0 +435 0 +1286 1 +331 0 +722 1 +90 0 +3451 2 +696 0 +1459 1 +1536 2 +3509 0 +1193 0 +2520 3 +2869 2 +915 0 +1316 0 +347 1 +864 0 +1011 0 +1258 1 +148 0 +497 0 +373 0 +466 1 +9961 1380 +360 1380 +387 0 +676 2 +121 1 +3183 3 +1436 2 +1319 0 +1592 0 +296 0 +643 0 +1793 4 +613 0 +374 1 +794 0 +261 0 +623 0 +385 0 +673 0 +2911 7 +1001 0 +6473 34 +164 0 +183 0 +698 2 +2627 2462 +769 0 +4733 1 +693 2 +927 0 +75 0 +176 0 +103 63 +0 1433 +1063 2 +302 1 +817 0 +568 0 +1467 0 +1073 3 +1222 0 +1133 1 +419 0 +236 0 +2333 4 +804 0 +113 0 +4705 5 +1182 0 +74 0 +121 0 +12 0 +1456 0 +478 0 +1 0 +2357 0 +844 0 +811 0 +843 0 +2459 1 +3325 0 +1589 0 +3265 1 +1598 0 +325 0 +851 0 +2 191 +0 0 +0 0 +269 0 +20 0 +3901 2 +583 0 +804 0 +1759 0 +398 0 +191 0 +275 0 +5631 1 +487 0 +83 0 +994 1 +620 1 +2208 0 +2090 1 +530 0 +99 0 +364 0 +623 0 +9 0 +95 191 +0 0 +584 0 +2484 4 +805 0 +501 0 +1178 1 +2865 2 +593 0 +96 0 +443 0 +2461 1 +4609 2 +2645 14 +169 0 +1401 0 +145 0 +994 0 +655 0 +470 0 +1551 0 +81 0 +1207 1 +1064 0 +766 1 +1117 1 +178 0 +2157 1 +619 0 +1294 0 +446 0 +265 0 +1128 0 +3656 19 +1756 0 +168 0 +202 0 +10712 11 +540 0 +80 0 +562 0 +65 0 +164 0 +202 0 +227 0 +457 0 +1776 0 +1527 0 +581 0 +514 0 +519 0 +1425 1 +1249 1 +2041 2 +218 25 +86 816 +2682 3819 +3 0 +1616 3890 +5637 6 +1802 0 +607 0 +241 0 +15 0 +327 35079 +889 0 +541 1 +1078 0 +14453 7 +283 1 +315 0 +2 35079 +767 0 +36 0 +11 0 +3 119 +9792 125 +3119 0 +2662 1 +689 2 +823 0 +773 0 +402 1 +140 0 +835 2 +1667 1 +1637 1 +608 0 +4219 1 +1133 0 +363 1 +62 0 +1510 0 +1306 1 +176 0 +3820 1 +5070 3 +763 0 +5693 33 +1507 0 +111 0 +345 0 +442 0 +498 1 +1284 0 +633 0 +1028 0 +1376 0 +3142 1 +673 0 +1616 0 +3131 1 +2677 10 +916 1 +1196 1 +662 0 +466 3817 +3159 1 +167 0 +557 0 +2343 2 +3747 0 +825 0 +961 0 +2626 1 +240 0 +1244 2 +0 0 +184 0 +1671 0 +2987 0 +196 0 +224 0 +509 0 +902 0 +416 2 +547 0 +1218 1 +578 0 +658 0 +1927 1 +160 0 +1927 0 +383 0 +436 0 +659 0 +299 0 +3740 3 +1067 3890 +49 816 +393 25 +631 0 +52 0 +231 0 +1690 1 +1011 0 +57 0 +3200 2 +2040 4 +2061 1 +969 0 +2358 1 +2646 1 +3007 4 +1109 0 +2100 2 +21644 65 +4916 0 +1123 1 +867 0 +2117 1 +1265 1 +282 0 +196 0 +153 0 +4029 0 +399 0 +2931 2 +141 2230 +9214 4 +655 0 +1570 0 +161 0 +933 1 +747 0 +64 2230 +1152 466 +1815 1 +2051 1 +4116 13 +504 3 +601 0 +7000 54 +101 0 +371 2 +3079 1 +326 1 +1384 1 +2523 1 +6819 12 +1654 0 +196 0 +2112 0 +6702 3 +4153 0 +6163 4 +1158 5 +385 0 +397 3 +305 0 +412 0 +389 0 +545 0 +1393 0 +691 0 +2130 3 +274 0 +448 1 +1355 5 +13323 55 +1008 0 +1037 2 +2880 10 +4228 0 +2928 2 +857 0 +245 0 +328 0 +202 0 +1344 0 +428 0 +1055 5 +351 0 +2774 0 +813 1 +2490 1 +1857 0 +513 0 +188 0 +4049 4 +3151 3 +385 2 +1199 1 +468 0 +270 2 +938 0 +255 0 +116 0 +963 1 +626 0 +217 0 +210 1 +237 0 +831 3 +141 0 +82 1 +835 0 +1699 4 +3207 4 +2163 1 +2306 0 +590 0 +3663 3 +243 0 +3363 0 +1357 0 +218 0 +1616 4 +3429 1 +765 1 +3584 3 +2722 0 +1167 1 +586 0 +2326 3 +2597 6 +4868 11 +2577 1 +8373 45 +1612 3 +2047 3 +600 7694 +2911 2 +985 0 +1083 0 +2818 1 +267 0 +371 0 +477 402 +184 153 +258 0 +801 0 +12 0 +301 0 +1094 1 +138 0 +555 0 +2982 10 +197 176 +202 176 +1549 0 +476 0 +381 0 +565 0 +407 0 +2170 0 +3207 1 +245 0 +315 1 +1541 1 +658 2 +1355 1 +253 3 +1747 1 +695 0 +13 0 +689 0 +3393 3 +635 1 +1735 2 +3882 8 +78 0 +1687 1 +212 0 +174 0 +1969 2 +3827 1 +289 0 +873 0 +576 0 +843 1 +342 0 +309 0 +84 0 +128 0 +2174 3 +790 0 +845 0 +228 0 +968 1 +1094 0 +2038 0 +1779 1 +588 0 +662 204 +0 113 +1735 95 +6 95 +0 203 +157 118 +1 7 +4288 1 +1423 1 +478 2 +35 0 +56 0 +1821 1 +627 0 +934 0 +641 0 +445 159 +844 9 +368 254 +3846 103 +4597 1 +2004 0 +11123 44 +1254 1 +2092 1 +1522 1 +580 0 +2203 1 +1542 1 +972 2 +347 0 +626 0 +2063 6 +5664 6 +121 0 +288 0 +5232 0 +961 5 +301 0 +431 0 +1187 0 +681 2 +431 0 +1266 0 +620 0 +34778 54 +641 0 +3355 2 +275 0 +3129 2 +302 0 +120 0 +1022 0 +549 1 +2271 1 +7 0 +36 0 +2 0 +494 0 +7327 25 +3135 6 +628 0 +1360 2 +3012 0 +902 0 +36 1 +757 0 +1415 3 +303 0 +190 0 +1570 2 +745 0 +499 0 +371 1 +367 1 +436 0 +392 1 +18452 111 +776 0 +2922 5 +649 0 +1943 1 +7677 5 +2603 3 +1003 1 +434 0 +2715 6 +1698 1 +690 0 +1335 0 +1523 0 +11 0 +597 0 +1117 0 +2286 1 +159 0 +2131 1 +1533 0 +550 0 +79 0 +4896 7 +171 0 +17 6 +1581 1 +1965 2 +1991 2 +1112 1 +2501 1288 +274 0 +248 0 +1175 1 +5 0 +102 0 +302 0 +834 0 +363 0 +13581 32 +3464 0 +30 1288 +68 0 +1720 0 +647 1 +1372 1 +990 0 +2024 0 +2091 1 +70 48 +6 1440 +25 2540 +761 0 +44 0 +3818 1 +1267 1 +1213 0 +1298 0 +1171 0 +3439 2 +45 1 +602 1 +1083 0 +1019 4 +1285 1 +3936 6 +939 0 +1127 1 +234 0 +2942 3 +746 0 +141 0 +1604 1 +2771 0 +6 0 +708 2 +4019 3 +623 0 +327 0 +2 74 +169 0 +1288 4 +1204 1 +7244 8 +808 0 +1249 0 +0 0 +456 2 +2166 3 +2357 4 +1161 1 +5660 2 +315 0 +201 0 +314 0 +532 0 +151 1 +2682 3 +622 1 +431 1 +355 0 +3343 3 +2477 1 +1222 2 +635 0 +2528 1 +168 0 +1264 0 +360 0 +813 1 +4636 2 +6 0 +2632 2 +58 0 +1284 78 +4638 3 +253 0 +2405 1 +2545 12 +1839 0 +7936 2 +5600 6 +14523 33 +1738 2 +1026 1 +7732 7 +753 3 +3042 0 +2217 1 +4697 9 +671 0 +188 0 +16836 7 +2576 0 +1527 2 +256 1 +802 0 +434 0 +238 0 +12 0 +1985 0 +164 0 +346 0 +402 0 +85 0 +189 0 +511 0 +3885 0 +25 0 +26 0 +581 0 +1083 1 +493 0 +784 0 +8014 12 +6413 5 +1450 0 +1925 0 +1061 0 +176 0 +1809 1 +284 0 +1798 2 +1777 2 +164 0 +5144 1 +93 0 +5524 1 +533 0 +911 0 +38 0 +1006 4 +1364 0 +468 2 +288 0 +1925 2 +117 0 +1669 3 +3246 1 +399 0 +768 0 +88 0 +757 0 +604 0 +1848 1 +38 0 +440 2 +529 0 +632 0 +2243 4 +207 0 +1019 1 +984 0 +2366 0 +1211 0 +789 0 +1023 0 +3312 19 +1 0 +1322 0 +215 0 +1028 1 +580 0 +3561 3 +486 0 +2005 2 +1373 1 +2118 0 +996 0 +633 1 +648 0 +20289 9 +110 0 +773 0 +292 0 +958 1 +1517 1 +2794 0 +2310 0 +4407 3 +3985 3 +2919 0 +724 0 +1994 2 +605 0 +163 2 +330 2 +1312 0 +1066 0 +987 0 +145 0 +1254 0 +510 2 +357 0 +1013 0 +1123 0 +298 0 +1375 0 +1208 0 +371 0 +6871 3 +1202 1 +991 0 +632 0 +2560 1 +355 0 +33 0 +2362 0 +13082 11 +4548 13 +4629 1 +786 0 +3757 0 +1428 1 +777 0 +441 0 +1004 3 +119 0 +5887 6 +1621 1 +2609 0 +3969 1 +467 1 +90 0 +5786 12 +22 0 +738 4 +3026 2 +4161 1 +1523 0 +26 0 +1935 1 +1074 0 +381 0 +1 0 +25 0 +1254 2 +4035 2 +185 0 +655 0 +0 0 +1474 1 +1784 3 +1525 1 +596 0 +348 0 +2073 0 +941 0 +4905 3 +1252 0 +934 0 +1513 2 +412 0 +2018 1 +34 0 +546 1 +1235 2 +3138 2 +2265 0 +43 0 +306 0 +660 0 +881 0 +710 1 +571 99 +2337 1 +5145 1 +700 0 +421 0 +79 0 +62 0 +2 0 +1319 0 +1313 2 +2997 2 +524 0 +329 0 +593 0 +3863 1 +545 0 +2813 3 +2325 0 +2314 3 +1255 2 +1938 4 +12086 45 +4195 0 +472 110 +386 111 +750 1 +3136 3 +134 0 +746 0 +1083 0 +1972 0 +2281 1 +669 0 +110 206 +146 0 +111 206 +4259 4 +1300 2 +34 0 +2894 2 +3657 12 +3091 4 +148 2 +64 0 +12773 35 +787 3 +7640 26 +2000 1 +197 0 +2344 1 +16 0 +5791 3469 +1949 3469 +7099 0 +1427 2 +134 0 +1980 2 +1167 0 +347 0 +1312 2 +1812 0 +233 0 +2752 10 +524 0 +547 0 +881 0 +738 1 +119 0 +1290 3 +572 0 +2145 3 +1389 2 +18294 8 +0 0 +334 0 +46 0 +3411 2 +1700 0 +1718 1 +245 0 +2967 1 +203 0 +1197 0 +3395 0 +1806 2 +992 0 +185 0 +6053 3 +1802 2 +411 0 +2751 3 +158 0 +322 0 +64 0 +16 0 +751 0 +0 0 +145 0 +10580 6 +985 0 +775 0 +1681 2 +270 0 +2131 0 +2097 1 +999 1 +712 0 +4461 14 +1177 0 +232 0 +2135 3 +53862 265 +8 0 +2546 3 +504 0 +3596 0 +1131 0 +346 0 +51 0 +1997 1 +441 1 +796 0 +38 0 +1985 0 +371 0 +2380 6 +2440 2 +1058 1 +8 0 +26 0 +3 0 +302 0 +768 1 +1360 0 +669 0 +2786 2 +689 1 +1379 6 +2709 1 +1462 3 +3151 1 +397 0 +1326 1 +89 0 +2223 7 +269 0 +738 17 +1417 0 +2092 2 +3066 1 +1208 0 +357 0 +2513 2 +850 0 +1689 2 +1472 2 +1341 0 +793 1 +1966 1 +1752 3 +859 1 +1172 4 +354 0 +1189 0 +950 0 +4115 5 +757 0 +0 0 +0 0 +923 0 +247 0 +2546 1 +4190 1 +417 1 +560 0 +1565 1 +1 0 +620 0 +23 0 +456 1 +145 8313 +112 577 +12 0 +4589 1 +1470 0 +6152 3 +258 577 +0 8313 +1183 2 +285 0 +1515 2 +1687 1 +1154 0 +308 0 +698 1 +1892 0 +907 1 +2193 3 +1097 1 +1438 1 +667 1 +320 0 +1628 4 +869 0 +25137 15 +365 2 +1074 0 +4176 20 +713 0 +138 0 +645 0 +810 1 +661 1 +853 0 +6472 2 +2074 0 +366 1 +233 0 +770 0 +433 0 +481 0 +608 1 +887 0 +930 1 +1 0 +1364 1 +324 0 +114 0 +484 0 +20 0 +12797 13 +1334 2 +2581 3 +1561 0 +4 0 +90 0 +678 1 +863 0 +2409 1 +107 0 +982 0 +473 0 +191 0 +1069 0 +499 0 +665 0 +672 2 +3412 22 +525 3 +818 0 +3366 1 +144 0 +1253 0 +1126 0 +55 0 +36 0 +334 0 +824 0 +1715 2 +397 0 +368 0 +339 0 +822 0 +2008 0 +2838 5 +942 0 +5020 9 +718 0 +1418 3 +2133 1 +5268 0 +198 1 +8 0 +169 0 +478 0 +6368 2 +371 1 +1780 3 +2218 0 +1860 0 +2348 0 +3620 1 +816 1 +2970 2 +848 1 +736 0 +946 1 +2352 1 +415 0 +168 0 +514 2 +646 1 +796 0 +2656 1 +185 0 +369 1 +587 0 +305 2 +194 0 +1371 1 +98 0 +3 1956 +1425 0 +1752 0 +362 0 +336 14 +219 14 +3876 4 +1388 4 +45 0 +44 1956 +1326 0 +1164 0 +427 1 +793 0 +280 1 +1750 2 +1473 1 +2047 5 +6270 14 +99 0 +221 0 +3112 1 +131 1 +2478 0 +6361 35 +139 0 +790 0 +2372 1 +1656 0 +931 1 +193 3 +1691 0 +235 0 +794 0 +544 0 +1178 1 +1522 0 +229 0 +1127 0 +42 0 +236 0 +1476 0 +355 0 +325 0 +1380 0 +1928 3 +2462 6 +1435 2 +334 0 +1352 2 +0 0 +275 0 +5744 2 +1490 1 +1960 2 +851 1 +409 0 +2 0 +1507 0 +3600 2 +2836 2 +573 1 +998 0 +440 2 +106 0 +2983 1 +3349 1 +454 0 +411 2 +997 0 +373 0 +2362 0 +231 0 +275 0 +485 0 +2562 0 +0 0 +1133 0 +6958 1 +501 0 +1493 0 +1171 0 +1308 5 +2072 1 +3400 3 +2194 2 +5119 0 +1023 5 +4209 9 +4438 8 +887 1 +28888 17 +1595 0 +552 0 +722 0 +474 0 +556 0 +224 0 +187 0 +128 0 +1043 0 +2490 1 +114 0 +378 0 +698 0 +2564 1 +15 0 +53 0 +21049 2 +2722 1 +1035 0 +477 0 +650 0 +649 0 +742 0 +61 0 +307 1 +3228 1 +1709 1 +364 0 +729 1 +2913 0 +12602 3 +3572 1 +1 2059 +16 52 +564 0 +2745 0 +226 0 +847 0 +2659 0 +29 0 +2138 0 +1011 0 +300 0 +764 1 +809 1 +1555 2 +1294 2 +1390 0 +304 1 +759 0 +161 0 +389 0 +1 52 +17 2059 +1262 0 +3618 5 +3036 6 +184 0 +1 0 +403 0 +13 1 +69 0 +4571 6 +668 0 +1913 1 +1638 5 +543 1 +8 0 +2964 4 +75 0 +5487 1 +9657 2 +765 0 +722 1 +1945 0 +1318 2 +763 0 +3979 26 +261 0 +2088 1 +2453 3 +4763 10 +324 1 +1113 1 +2455 9 +6238 6 +190 0 +936 0 +6935 4 +8260 3 +470 1 +67 0 +475 0 +451 0 +770 0 +2623 1 +208 0 +1061 0 +1407 0 +22 0 +489 0 +375 0 +1984 1 +28 0 +1975 1 +1437 0 +4715 10 +25 0 +1015 1 +5976 6 +13673 21 +5011 2 +0 3580 +1536 1 +944 0 +11603 4 +1263 3 +926 0 +466 0 +1392 0 +0 0 +2272 1 +920 2 +77 0 +190 0 +230 1 +95 0 +254 1 +74 0 +848 0 +167 0 +1211 0 +6 3580 +1332 0 +63 0 +9102 31 +61 0 +1592 3 +1764 2 +273 1 +8416 7 +616 0 +1348 2 +798 0 +1713 2 +100 64 +1946 0 +341 0 +848 0 +1298 0 +1276 3 +748 102 +399 102 +1521 1 +1363 1 +1169 0 +477 0 +89 0 +190 0 +1858 0 +470 0 +7002 1 +1 0 +1243 2 +57 0 +1576 0 +105 0 +743 2 +207 0 +631 0 +172 0 +1032 1 +600 1 +910 0 +440 2 +686 0 +3028 2 +273 0 +589 0 +4912 2 +1437 2 +3698 0 +6053 3 +37 0 +150 0 +1584 3 +577 0 +351 0 +0 0 +741 0 +303 0 +294 1 +6430 23 +762 1 +422 0 +2085 0 +77 0 +5876 11 +369 0 +1183 0 +2106 1 +6140 2 +18762 62 +105 1497 +0 0 +379 0 +524 0 +2291 0 +200 0 +2568 2 +2289 3 +4526 5 +254 0 +1508 2 +5917 3 +3321 1 +992 1 +0 0 +3004 0 +1654 0 +1618 1 +1119 0 +310 1 +466 0 +1381 0 +1005 1 +902 0 +882 0 +507 1 +139 0 +1567 0 +3970 5 +81 0 +1068 0 +346 0 +580 0 +467 2 +728 0 +2296 1 +304 1 +188 0 +305 0 +728 1 +2016 0 +7016 7 +2725 19 +67 0 +412 0 +309 0 +1006 0 +2286 3 +2682 0 +891 0 +496 14 +2870 2 +385 0 +293 0 +359 0 +191 0 +713 0 +257 0 +1840 2 +54525 25 +1840 0 +351 0 +5787 2 +511 0 +3035 4 +13097 9 +1589 0 +5634 3 +11405 6 +615 0 +475 0 +122 36 +793 7566 +105 41 +1133 0 +1929 1 +186 0 +3009 0 +2174 2 +586 2 +2907 2 +171 0 +193 0 +563 0 +1054 2 +4025 3 +2240 2 +514 0 +11810 5 +3417 0 +393 0 +1460 0 +1815 79 +102 0 +925 0 +2644 0 +715 2 +1941 1 +775 0 +3109 2 +5 0 +788 0 +658 2 +43 0 +23 0 +1775 0 +2010 1 +804 0 +4328 11 +2 0 +170 0 +568 0 +3502 0 +4132 2 +4700 2 +713 1 +504 0 +1134 1 +141 0 +1876 1 +596 2 +2426 1 +60 0 +440 1 +1009 2 +2250 2 +1264 1 +1499 1 +675 0 +6171 2 +106 1 +2483 1 +204 0 +1906 1 +2789 0 +822 0 +2403 1 +2547 1 +2469 1 +4095 1 +1377 1 +1425 2 +1234 2 +596 1 +862 1 +3325 1 +8500 2 +1002 1 +3529 31 +0 0 +59 0 +13551 7 +3097 2 +2765 3 +620 0 +811 0 +1253 1 +4176 3 +1474 2 +336 0 +2062 0 +366 0 +1722 2 +5413 7 +5817 1 +1215 0 +1258 0 +825 2 +110 0 +1938 1 +11454 66 +0 0 +25292 8 +400 0 +60 0 +430 0 +1052 0 +3056 5 +193 0 +271 0 +526 0 +53 0 +41507 32 +6827 18 +22580 12 +1098 34 +0 33 +4735 8 +720 0 +759 0 +213 0 +2041 2 +495 1 +467 0 +1936 0 +478 0 +92 0 +287 0 +852 0 +2298 4 +4323 2 +2 0 +350 6 +293 6 +2196 5 +874 1 +427 1 +1287 0 +882 1 +280 0 +1707 1 +503 0 +871 1 +1008 0 +3262 6 +2298 0 +681 0 +1394 6 +478 4 +234 0 +1009 2 +1325 0 +8570 8 +675 32 +53 32 +1917 1 +875 1 +477 0 +1343 0 +1154 0 +923 0 +495 0 +917 0 +1398 0 +730 0 +1004 1 +727 0 +652 1 +36 0 +63 0 +9416 173 +4338 0 +619 0 +2 3 +33 3 +13 0 +18 0 +12 0 +136 0 +639 0 +1594 0 +50 0 +86 0 +152 0 +1486 0 +2086 1 +2903 5 +7626 13 +571 0 +3343 3 +801 0 +7000 3 +2449 1 +1716 1 +1257 1 +176 0 +403 1 +269 0 +25 0 +1130 2 +699 0 +1197 1 +2489 27 +1927 4 +0 0 +7136 9 +82 0 +1635 0 +621 1 +1605 0 +17812 5 +19 0 +1617 0 +2048 1 +2156 2 +223 0 +5566 2 +2104 0 +8191 5 +1773 0 +282 0 +285 0 +503 1 +1697 0 +5688 25 +589 1 +931 0 +484 0 +0 0 +1518 0 +1174 1 +2145 1 +366 1 +235 0 +404 0 +758 0 +518 1 +1871 2 +538 1 +791 0 +1568 2 +2257 2 +1371 0 +5587 3 +9 0 +4974 1 +650 1 +8503 10 +1087 0 +104 0 +278 0 +342 1 +934 0 +392 0 +235 2 +500 0 +387 0 +450 0 +100 0 +616 1 +7216 8 +752 2 +967 0 +1752 0 +99 0 +248 0 +1129 0 +91 0 +656 0 +1250 0 +749 1 +101 0 +231 1 +1297 1 +811 1 +390 1 +652 0 +546 2 +303 0 +622 0 +119 1 +222 0 +81 0 +1237 0 +789 0 +817 0 +142 0 +1388 0 +360 1 +378 0 +242 0 +2219 0 +2098 0 +137 0 +231 0 +487 0 +1164 0 +461 0 +939 0 +8 0 +16 36 +1353 1359 +206 41 +786 0 +1573 1 +890 0 +482 1 +638 1 +960 1 +1298 0 +158 0 +650 0 +1469 3 +4992 0 +6735 6 +776 0 +31 0 +440 0 +3409 2 +1535 1 +927 0 +761 0 +1221 0 +687 1 +13 0 +2264 1 +951 1 +385 0 +2708 3 +1480 11 +4 0 +629 0 +46706 996 +9594 10 +65 0 +1433 3 +1466 1 +551 981 +167 28921 +230 636 +5 594 +2316 1 +567 1 +299 0 +175 0 +382 0 +79 0 +231 1 +1106 1 +2403 0 +649 0 +9609 0 +917 2 +307 1 +922 1 +1297 0 +582 0 +438 0 +334 0 +1021 0 +1475 0 +522 0 +1436 0 +3 594 +6 636 +152 28920 +3280 1 +4583 8 +225 0 +808 0 +825 0 +1987 0 +2281 0 +4169 2 +273 0 +824 1 +1204 0 +896 2 +0 0 +1673 0 +1019 1 +855 1 +287 22 +221 22 +254 0 +776 0 +2897 0 +385 0 +1192 0 +1390 0 +2623 3 +893 0 +3165 5 +178 0 +516 0 +273 0 +596 3 +132 0 +2323 0 +641 0 +2259 1 +3676 2 +942 1 +1439 0 +5533 29 +1132 1 +5082 0 +4314 1 +131 0 +288 0 +801 3 +1272 0 +398 0 +813 1 +128 0 +91 0 +2751 1 +270 0 +659 0 +2054 1 +42 0 +773 0 +829 0 +314 0 +1 0 +295 0 +2866 0 +2460 2 +1612 5 +1615 2 +3161 0 +750 0 +358 0 +1330 0 +345 0 +1756 1 +1669 1 +26 0 +374 0 +140 1 +12 1 +200 1092 +2124 3 +6817 30 +2021 0 +830 3 +152 1093 +149 0 +1025 0 +2168 0 +2321 0 +1097 0 +214 0 +420 2 +200 0 +159 0 +51 0 +770 1 +281 0 +208 0 +4615 0 +614 2 +185 1 +2306 1 +1486 0 +964 1 +2049 0 +1217 0 +1524 1 +557 0 +752 0 +937 3 +959 1 +2465 2 +1009 1 +2550 1 +1699 1 +296 0 +443 0 +1515 0 +670 0 +344 0 +234 0 +461 0 +943 0 +1140 1 +861 0 +378 1 +631 0 +471 0 +771 0 +747 0 +3497 2 +2349 8 +2466 2 +8351 15 +678 0 +1684 2 +1290 0 +1541 6 +545 0 +204 0 +894 0 +1060 9 +441 0 +43 0 +521 0 +1014 0 +1089 0 +539 0 +1785 0 +2637 1 +2996 4 +106 0 +2641 1 +11 0 +514 0 +934 1 +950 0 +1915 7 +2080 0 +10051 14 +632 0 +643 0 +362 0 +4550 2 +1278 0 +1930 1 +1826 0 +428 0 +14301 21 +919 3 +948 3 +569 0 +1271 0 +3135 0 +520 0 +17 0 +135 0 +129 0 +413 1 +3761 0 +5693 2 +5262 5 +5153 9 +8502 2 +127 0 +1106 0 +530 0 +552 0 +186 0 +422 0 +1996 1 +553 1 +1542 0 +7052 9 +142 0 +783 0 +2870 5 +135 0 +177 50 +368 1 +100 0 +1129 0 +2209 4 +122 0 +5337 1 +535 0 +379 0 +628 1 +323 0 +0 1433 +211 63 +23 0 +429 1 +1609 1 +88 0 +8902 1 +260 50 +3369 11 +1133 0 +126 0 +274 1 +105 0 +1437 1 +6396 3 +0 0 +922 1 +1109 0 +1447 0 +1005 0 +313 0 +62 0 +284 0 +1455 0 +679 15 +20356 862 +386 0 +1917 28 +7525 12 +1629 0 +268 0 +223 0 +2858 2 +84 0 +33226 21 +5339 1417 +32 1414 +2779 3 +12561 18 +1424 0 +73 0 +7254 1 +3 0 +623 0 +1730 0 +1095 0 +3850 4 +618 0 +1686 2 +1679 1 +1 0 +136 0 +159 0 +2018 1 +1024 0 +1662 3 +1043 0 +17 0 +262 0 +866 0 +41 0 +731 2 +940 0 +2152 0 +46 0 +14 0 +195 0 +3 0 +0 0 +0 0 +1062 0 +236 0 +2921 27 +9168 4 +565 1 +291 0 +45 0 +371 0 +201 0 +1233 1 +930 0 +1584 13 +1360 2 +2456 0 +678 0 +53 0 +299 0 +709 0 +137 0 +4404 2 +1151 0 +193 6 +141 0 +1714 0 +188 0 +0 0 +0 0 +7 0 +161 0 +1367 2 +3775 0 +1174 1 +4002 0 +560 1 +574 1 +363 255 +1053 255 +317 0 +215 1 +237 1 +368 0 +3173 1 +41 0 +171 0 +3176 2 +636 0 +2356 2 +7014 1 +3 0 +8362 36 +1784 14 +128 0 +4062 5 +50 0 +165 0 +3 0 +5281 6 +1387 5 +3496 3 +870 0 +1080 1 +76 0 +625 4 +489 0 +1900 2 +2 0 +1381 0 +688 0 +3254 0 +1745 1 +1216 0 +1984 3 +0 0 +3162 0 +1096 3 +1137 0 +1594 0 +115 0 +8712 6 +875 0 +742 0 +507 0 +719 2 +4100 3 +537 0 +152 0 +588 1 +1318 0 +1264 0 +1698 2 +435 0 +282 0 +446 0 +2428 3 +883 2 +965 0 +222 0 +1093 1 +1 0 +11480 29 +3 0 +1232 6 +658 1 +1830 2 +1333 2 +847 0 +599 2 +41 0 +250 0 +381 0 +587 0 +383 0 +404 0 +6336 4 +1533 0 +1903 1 +140 0 +1271 1 +1753 0 +724 0 +1011 0 +2289 2 +984 0 +5695 2 +190 0 +6 0 +285 0 +11095 42 +354 0 +1714 1 +355 0 +117 0 +703 0 +11 1 +1365 2 +515 0 +1205 0 +3506 1 +243 0 +1209 2 +736 0 +1915 0 +2778 1 +422 0 +647 0 +500 0 +1409 7 +744 0 +400 0 +2526 5 +1521 1 +744 0 +973 7 +2037 5 +298 0 +373 3 +191 0 +218 0 +969 0 +87 0 +735 0 +37 0 +41 0 +554 1 +2238 3 +58 2 +1102 0 +1999 0 +147 0 +6099 2 +1521 1 +3563 1 +439 6 +353 6 +335 0 +371 1 +224 0 +3316 3 +788 0 +278 1 +3428 6 +268 0 +1352 2 +7969 2 +306 0 +3278 3 +0 0 +16094 2 +277 0 +1407 1 +1001 0 +985 1 +1304 0 +307 0 +1066 0 +4576 0 +1747 1 +566 1 +933 1 +4750 1 +2397 1 +211 0 +583 0 +231 0 +1571 1 +0 0 +24 0 +3214 1 +12 0 +382 0 +1869 1 +991 0 +4139 1 +828 0 +0 0 +1579 1 +1387 1 +1104 0 +14044 86 +1286 1 +1077 0 +2097 0 +341 1 +812 0 +502 0 +1341 2 +57 0 +1304 2 +492 0 +0 0 +1 0 +254 0 +272 1 +7345 1 +123 0 +604 0 +188 0 +788 0 +2319 5 +486 0 +278 0 +203 0 +1723 1 +421 0 +729 0 +5628 27 +6329 1 +1208 0 +296 0 +1679 0 +548 0 +0 0 +2057 0 +2086 5 +1202 1 +524 0 +1235 1 +1751 0 +5362 6 +4220 1 +1280 1 +167 0 +327 0 +1348 1 +501 1 +2074 7 +1418 0 +243 0 +2343 2 +1119 0 +18 0 +0 0 +1752 0 +947 0 +27 0 +233 1 +372 0 +234 0 +5 0 +2121 2 +2138 1 +827 1 +852 0 +2281 1 +416 0 +2580 0 +372 0 +1705 2 +156 0 +684 0 +3272 3 +634 1 +2390 1 +889 1 +1740 2 +717 0 +1554 0 +1633 2 +1630 0 +1184 0 +1283 1 +874 1 +7372 2 +5286 5 +1456 1 +968 0 +44 0 +417 0 +7820 9 +2135 4 +291 1 +31628 17 +2047 1 +357 0 +613 0 +512 1 +3424 4 +375 0 +1396 4 +77 0 +72 0 +615 0 +647 0 +1191 0 +1136 0 +962 1 +5444 20 +995 34004 +1399 5 +7378 3 +1654 0 +1229 2 +230 0 +164 0 +1251 0 +1366 3 +876 1 +259 2 +3381 2 +797 2 +241 0 +447 0 +3517 1 +636 0 +303 0 +846 0 +117 0 +55 5 +407 5 +2625 8 +1254 3 +2750 0 +1301 4 +230 0 +738 0 +341 0 +1928 2 +802 1 +232 0 +1026 0 +346 0 +2032 4 +912 0 +2569 17 +2996 15 +828 0 +1 0 +155 0 +974 0 +595 0 +2138 2 +1027 0 +2677 0 +8225 3 +211 0 +124 37 +670 1 +1785 2 +946 0 +1201 0 +10032 9 +224 1 +1651 1 +595 0 +743 0 +3663 1 +1466 0 +1242 0 +26 0 +526 0 +459 0 +6125 14 +2815 1 +1755 0 +2049 1 +2692 7 +2173 2 +5439 4 +16 0 +6105 1 +32035 6 +37 0 +1226 0 +171 8277 +3077 4 +11248 2 +360 0 +2942 11 +21 8278 +1960 0 +614 0 +280 0 +181 1 +168 0 +346 0 +1723 1 +871 0 +31 0 +1985 4 +590 0 +848 1 +354 0 +963 0 +1468 0 +6121 7 +914 1 +470 0 +1144 0 +1940 0 +1134 1 +13 0 +341 0 +788 0 +310 1 +387 1 +673 1 +7327 3 +1606 1 +3464 2 +10 0 +1427 1 +81 0 +2917 0 +160 0 +278 1 +886 1 +687 0 +1510 0 +1866 11 +839 0 +331 0 +923 0 +1093 1 +684 0 +127 0 +1037 0 +749 1 +2171 0 +1156 0 +2399 3 +132 1 +104 1 +7606 5 +620 0 +76 0 +131 0 +240 1 +429 3 +4857 5 +3381 0 +537 0 +2230 3 +33 1 +2146 2 +821 1 +1419 8 +1337 1 +391 0 +11191 4 +286 1 +481 1 +627 0 +987 0 +538 0 +694 0 +294 0 +1845 0 +11122 7 +1318 1 +157 1 +163 1 +82 0 +1450 0 +333 0 +882 0 +547 0 +21 0 +1690 4 +2324 3 +2568 3 +1 0 +575 0 +109 0 +709 1 +226 0 +3080 1 +12526 37 +771 0 +2204 2 +125 0 +327 1 +335 0 +474 0 +210 0 +2036 0 +795 0 +3420 0 +1551 0 +1110 2 +509 0 +2209 2 +0 0 +744 0 +858 2 +2394 10 +221 1 +1794 0 +873 0 +1290 2 +2542 5 +6380 4 +259 0 +622 0 +59 0 +210 0 +1872 0 +531 0 +586 1 +530 0 +237 0 +122 0 +65 0 +8724 3 +270 0 +1829 0 +791 0 +770 0 +4 0 +91 0 +556 1 +474 2 +1391 0 +305 0 +886 0 +21 0 +8 0 +1056 0 +1000 0 +2010 0 +240 0 +74 0 +1765 0 +908 4 +567 0 +3724 0 +3142 1 +425 1 +905 0 +3045 2 +1079 0 +695 0 +890 1 +457 0 +2870 0 +1532 3 +1914 0 +1142 0 +7 0 +1744 0 +590 0 +147 0 +144 0 +1093 0 +2034 0 +2343 3 +1273 0 +672 0 +515 0 +320 0 +432 1 +615 2 +1027 1 +128 0 +5957 19 +1021 0 +19605 10 +7757 1 +3201 1 +543 0 +960 1 +5061 2 +1423 2 +2672 0 +3562 1 +589 1 +774 1 +543 0 +4216 4 +118 0 +1560 0 +137 0 +3157 1 +1532 1 +1003 0 +599 0 +567 0 +140 0 +158 0 +440 0 +668 0 +263 0 +85 0 +409 0 +1767 1 +322 0 +2999 0 +2385 0 +3520 2 +630 0 +7 0 +8 0 +36 0 +1702 2 +29 0 +463 0 +1875 0 +1811 1 +3 0 +1462 78 +998 2 +9 0 +5833 3 +341 0 +1665 1 +812 1 +960 0 +1044 1 +9818 4 +310 0 +11775 88 +446 0 +218 0 +357 0 +195 0 +2829 2 +3420 3 +2884 3 +473 0 +2794 2 +1630 0 +14163 3 +1992 0 +2730 2 +382 1 +1319 2 +226 0 +324 0 +3057 0 +658 0 +1784 1 +776 0 +0 0 +834 0 +335 0 +1413 0 +859 0 +44 0 +1827 0 +1516 1 +992 1 +1 1 +561 1 +2170 0 +2591 0 +451 1 +775 0 +6 0 +4899 3 +1264 1 +324 1 +89 0 +559 0 +1330 0 +1715 1 +271 0 +697 1 +568 0 +87 0 +592 0 +87 0 +251 0 +693 0 +620 0 +3923 9 +2285 1 +383 0 +1723 2 +305 0 +560 1 +901 0 +1336 0 +1289 0 +2583 0 +1475 0 +289 0 +1039 1 +1725 0 +1560 1 +1080 2 +1833 1 +109 0 +362 0 +607 0 +736 0 +2565 1 +1268 3 +27 0 +638 0 +1608 0 +1071 1 +787 0 +1111 1 +1456 0 +14644 10 +638 2 +1506 0 +1037 0 +1 0 +958 1 +707 0 +668 0 +1786 1 +728 2 +42 634 +4813 5 +2107 12 +1058 0 +538 0 +204 634 +175 0 +26 0 +489 0 +1596 1 +275 0 +1470 0 +1834 0 +1209 6 +4310 13 +612 0 +1208 1 +3660 0 +4106 23 +74941 289 +1694 1 +929 0 +1487 1 +1118 1 +178 0 +2919 0 +961 0 +1046 0 +1454 1 +758 0 +942 0 +3741 2 +628 0 +4175 0 +292 0 +91 1 +1229 0 +84 0 +1843 0 +464 0 +7824 1 +1142 1 +4568 0 +554 2 +1032 1 +1631 0 +994 0 +38 0 +2732 3 +3671 0 +3853 4 +32025 52 +875 0 +4283 1 +1055 0 +126 0 +698 1 +2578 6 +2679 3 +747 0 +4738 2 +2073 3 +1047 0 +881 0 +1824 0 +658 1 +6503 5 +363 0 +738 1 +7179 5 +1173 0 +563 0 +120 0 +1733 3 +853 0 +2227 0 +1139 0 +909 1 +4716 9 +788 1 +991 1 +14 0 +1126 1 +214 0 +3621 0 +1409 0 +8344 1 +2376 1 +2066 1 +270 0 +6307 8 +3323 5 +816 0 +895 0 +833 3 +2736 0 +1426 0 +1007 0 +8785 3 +472 0 +535 0 +2331 2 +2761 1 +106 0 +899 0 +675 0 +1690 2 +1102 0 +677 0 +138 0 +75 0 +189 0 +9 0 +577 0 +4 0 +135 0 +508 1 +1168 1 +438 1 +1927 1 +3898 10 +1438 2 +590 0 +2283 1 +204 0 +232 0 +814 0 +18 0 +659 2 +378 0 +484 0 +328 4 +196 0 +817 2 +575 0 +2527 1 +697 0 +264 0 +846 0 +126 1 +432 0 +109 0 +206 0 +13 0 +974 0 +1010 0 +2885 8 +623 0 +41 0 +4836 29 +823 0 +2270 0 +1167 0 +1028 0 +244 0 +1221 0 +351 0 +3397 0 +1310 0 +29 0 +343 0 +313 0 +6513 3 +4098 3 +673 0 +199 0 +929 0 +365 0 +2 0 +0 0 +86 0 +1596 1 +351 0 +254 0 +361 0 +2699 3 +1056 0 +177 0 +605 0 +2135 1 +626 0 +847 0 +7367 4 +952 1 +3 0 +229 1 +2066 0 +1515 0 +5602 5 +1809 6 +2527 2 +1522 1 +254 0 +154 0 +255 0 +709 0 +356 0 +1989 1 +2145 1 +6 0 +7 68 +46 68 +612 0 +1609 1 +314 0 +1482 2 +1174 1 +21 0 +3024 2 +2700 1 +347 0 +361 0 +242 0 +1304 0 +441 0 +1148 1 +984 1 +993 2 +496 0 +706 0 +4945 2 +2696 3 +4577 3 +858 0 +946 0 +1477 6 +551 1 +270 0 +265 0 +721 0 +32071 2 +8 0 +330 0 +2898 1 +1042 1 +378 0 +1939 1 +1039 0 +335 0 +565 0 +2472 0 +6653 22 +4199 4 +308 0 +1569 1 +595 0 +1181 2 +42 0 +3242 2 +882 0 +0 0 +2250 0 +93 0 +102 0 +1822 1 +5751 3 +1273 0 +29 0 +2795 4 +588 0 +2609 2 +274 0 +1360 0 +4842 3 +290 1 +215 0 +0 0 +405 0 +765 1 +1386 0 +427 0 +782 0 +0 0 +1352 2 +1759 0 +1384 0 +1190 0 +1032 1 +2913 5 +5401 2 +6514 38 +466 0 +1833 1 +549 1 +382 0 +346 0 +826 0 +2003 1 +6104 6 +1366 1 +249 0 +637 0 +1811 0 +3643 1 +1840 1 +1281 0 +71 1 +165 0 +56 0 +548 0 +1292 0 +671 0 +480 0 +2514 3 +1550 0 +6018 1 +10923 1 +245 0 +20 0 +1019 0 +487 0 +1965 2 +596 1 +1756 1 +4039 1 +2179 1 +110 0 +311 0 +2057 0 +2937 0 +721 0 +925 0 +367 0 +1295 0 +6 0 +206 0 +2003 2 +1247 1 +832 1 +2902 4 +379 0 +3685 1 +596 0 +276 0 +27307 2465 +1969 1 +407 0 +438 0 +2751 0 +2049 1 +10 0 +12119 47 +1082 2 +462 0 +638 0 +1975 1 +3536 0 +460 0 +631 0 +1756 1 +3904 0 +1530 0 +241 0 +1573 0 +2447 4 +529 0 +600 0 +2593 2 +486 1 +8325 4 +99 0 +413 2 +1739 1 +432 1 +2241 1 +467 0 +2643 1 +4776 3 +1150 2 +637 0 +192 0 +992 0 +2074 0 +65 0 +26 0 +2184 0 +445 1 +892 0 +3249 3 +6203 2 +60 0 +938 4 +3038 0 +2688 1 +6172 1 +1875 0 +1854 2 +2696 0 +170 0 +1030 0 +1256 329 +14878 339 +9430 23 +1572 4 +2383 0 +19 0 +2394 1 +427 0 +825 0 +441 0 +891 0 +2014 2 +1084 0 +4528 34 +33 0 +406 1 +1839 0 +1144 0 +438 0 +541 0 +661 1 +812 0 +327 1 +958 0 +1538 1 +831 0 +152 2 +1191 1 +2769 1 +5119 0 +801 1 +11 0 +4 0 +941 1 +689 0 +3434 3 +78 0 +926 0 +328 0 +390 1 +2842 1 +459 0 +4639 6 +1263 0 +13 0 +315 1 +1467 0 +108 0 +1777 0 +332 0 +1194 0 +133 0 +1571 5 +5 0 +2812 0 +851 0 +2335 0 +2846 11 +1129 1 +660 2 +1 0 +5 1 +0 1 +99 0 +1 0 +366 1 +2385 6 +86 0 +324 0 +5164 2 +813 1 +3422 1 +3007 0 +750 0 +960 0 +258 0 +104 0 +175 1 +527 3 +371 0 +365 0 +230 0 +57 0 +697 1 +422 0 +1005 0 +166 0 +4483 3 +2 0 +692 1 +952 0 +0 0 +2 0 +149 0 +1039 0 +2788 5 +1531 1 +117 0 +212 0 +1792 0 +499 1 +983 0 +157 0 +1042 1 +262 0 +157 0 +2531 4 +1515 0 +1 0 +7 0 +516 277 +666 3 +2050 0 +3373 5 +81 0 +283 0 +742 2 +15 0 +3541 1 +2782 1 +80 0 +769 1 +52 0 +230 0 +488 1 +2795 5 +80 0 +1647 1 +3068 0 +5227 2 +792 1 +1147 2 +326 0 +1606 0 +230 0 +645 0 +1787 0 +129 0 +239 0 +178 0 +263 0 +1258 0 +671 1 +1458 0 +168 0 +2360 1 +905 0 +548 1 +155 0 +717 0 +134 1 +1042 0 +133 256 +153 0 +5526 0 +13 0 +102 0 +7 0 +4530 12 +504 1 +1753 1 +579 1 +6 0 +2070 0 +1130 0 +1460 2 +438 0 +17444 21 +388 21 +122 20 +613 1 +502 1 +2597 1 +294 0 +474 4 +569 0 +230 0 +1007 0 +148 0 +1098 1 +2581 0 +2040 3 +3667 2 +1039 0 +3243 1 +504 0 +1009 1 +2 0 +1344 2 +459 0 +822 0 +75 0 +1983 0 +1401 1 +3285 1 +403 41 +392 0 +176 41 +11 0 +5 0 +17 0 +5311 2 +1961 2 +758 0 +2996 1 +1492 0 +2996 2 +1178 3 +1645 2 +1414 0 +566 0 +3095 0 +3135 1 +575 1 +1032 1 +1011 0 +532 0 +283 0 +3891 6 +801 1 +920 1 +2372 1 +366 0 +32 0 +38 0 +3384 0 +63 0 +695 0 +2281 7 +74 0 +3634 2 +348 0 +2282 0 +699 0 +314 0 +542 0 +2257 2 +1542 2 +3682 3 +58 0 +249 0 +346 0 +1870 1071 +516 1 +2554 2 +786 0 +1950 3 +578 0 +22990 8 +1110 0 +200 0 +1760 0 +604 0 +13 0 +3969 1 +5054 3 +179 0 +2759 0 +355 3 +1060 2 +57 0 +2212 1 +2090 0 +814 1 +629 0 +1034 2 +1053 0 +1084 0 +5510 1 +195 0 +247 0 +79 226 +2638 1 +2533 3 +136 0 +1973 2 +27 226 +365 0 +113 0 +1466 1 +339 0 +351 0 +325 0 +593 0 +13 0 +466 3 +768 0 +705 0 +934 1 +210 0 +985 1 +921 0 +3258 4 +0 0 +0 0 +2218 3 +529 0 +788 2 +4055 1 +699 1 +2053 7 +3403 0 +165 0 +2766 2 +3945 1 +2296 9 +658 0 +1103 0 +1612 2 +1279 2 +1551 1 +12419 24 +3043 32 +541 0 +6514 5 +2003 1 +2981 5 +501 0 +720 0 +2487 5 +4 0 +827 0 +487 0 +942 0 +2744 1 +2957 0 +218 0 +2848 3 +1465 0 +1265 1 +123 0 +121 0 +662 0 +3542 6 +1252 0 +29 0 +9 0 +705 1 +926 0 +3 0 +1498 0 +632 0 +4067 2 +2765 1 +3249 2 +1139 1 +1301 1 +283 0 +53 0 +824 1 +1635 0 +299 0 +2091 1 +315 0 +204 0 +783 1 +143 0 +162 1 +59 0 +885 0 +3570 40 +3340 0 +913 1 +821 0 +1979 2 +1063 1 +345 1 +365 0 +2434 4 +1841 3 +303 1 +2871 8 +3 0 +257 1 +263 0 +355 0 +3744 2 +2550 1 +115 2 +2582 2 +2963 1 +1483 2 +777 0 +335 1 +509 0 +190 0 +3733 8 +1733 4 +1942 0 +21 0 +641 0 +162 0 +1940 0 +1540 1 +285 0 +5226 0 +1012 0 +1909 1 +1650 0 +6269 13 +129 0 +473 3 +806 3 +1554 1 +209 0 +793 1 +461 489 +797 0 +1929 0 +4 0 +1294 0 +727 59 +128 0 +4890 7 +9763 5 +1095 1 +4 0 +899 0 +70 1 +419 0 +667 0 +2045 5 +949 1 +2051 1 +281 0 +3512 0 +1101 0 +689 0 +15111 6 +6477 2 +1938 0 +68 0 +0 0 +143 0 +89 0 +32 0 +729 2 +2888 1 +1964 0 +142 0 +767 0 +2076 1 +738 0 +3359 1 +263 1 +595 1 +1323 1 +1040 0 +1779 2 +256 1 +191 0 +1153 1 +5867 1 +773 0 +348 0 +5 0 +6 0 +70 0 +492 0 +5882 2 +321 0 +2305 3 +561 0 +9 0 +5221 1 +160 0 +3364 0 +453 1 +1487 0 +2287 18 +1152 1 +798 4 +1454 0 +1698 0 +2581 1 +743 1 +386 0 +0 0 +100 0 +5884 2 +1596 0 +872 1 +970 0 +46 0 +393 0 +1154 0 +315 0 +532 0 +2212 0 +1328 1 +210 0 +313 0 +0 0 +3457 2 +1035 0 +781 0 +0 0 +20 0 +1005 0 +306 0 +238 0 +6438 1 +1905 1 +1403 1 +331 0 +941 0 +889 0 +1184 2 +4659 14 +422 0 +996 1 +372 0 +297 0 +1402 0 +158 0 +8899 1 +2681 2 +1121 2 +591 0 +224 0 +2731 1 +174 0 +18 0 +472 15 +33 15 +273 0 +437 2 +31 0 +17 0 +3 0 +340 1 +0 0 +1449 0 +0 0 +332 0 +352 0 +518 2 +162 1 +966 0 +136 0 +132 1 +388 0 +801 0 +611 0 +49 0 +165 0 +3981 4 +46 0 +308 0 +161 0 +232 0 +308 1 +1342 1 +717 0 +23 0 +704 0 +672 0 +61 0 +63 0 +36 0 +5830 1 +1207 0 +168 0 +2166 1 +799 1 +898 1 +389 0 +557 0 +1684 4 +1493 0 +630 1 +5109 19 +1567 0 +784 1 +566 0 +5006 3 +2005 2 +3887 0 +565 0 +226 0 +1639 0 +1371 1 +1045 11 +1330 1 +233 1 +396 0 +1010 0 +432 0 +161 0 +1643 0 +249 3 +0 0 +1196 1 +463 2 +215 0 +553 0 +1121 1 +475 0 +439 0 +183 0 +3057 0 +65 490 +1318 1 +448 1 +28164 12 +992 0 +127 285 +898 1 +58 1 +1095 0 +667 490 +511 0 +293 0 +1050 2 +246 0 +585 0 +2283 8 +459 0 +175 0 +4 0 +707 0 +1629 0 +187 0 +1137 1 +826 0 +331 0 +624 0 +3189 0 +869 1 +440 0 +1875 1 +568 0 +294 0 +9925 10 +611 1 +818 0 +1513 0 +877 3 +1024 3 +222 0 +1229 0 +5918 2 +447 2 +571 256 +639 1 +685 0 +576 0 +102 0 +2220 21 +1290 4 +26278 11 +1023 0 +29 0 +1382 0 +3312 2 +659 0 +348 1 +1129 1 +15 0 +1210 1 +2776 2 +1329 9 +3642 0 +1870 0 +2716 3 +3657 1 +2545 0 +1705 0 +1237 1 +1403 0 +429 1 +230 0 +1592 2 +1 0 +1 0 +171 0 +635 0 +2399 1 +594 0 +922 0 +1361 0 +5552 3 +517 1 +526 0 +670 0 +233 0 +329 0 +2019 2 +4445 0 +674 0 +1326 0 +1245 0 +431 1 +261 0 +1731 1 +688 0 +65 0 +379 0 +436 0 +2432 0 +14639 1 +16340 8 +90 0 +1059 0 +5 0 +3261 0 +389 0 +3110 1 +2640 0 +2739 4 +8 0 +2 0 +1242 0 +146 0 +32 0 +3010 5 +4922 2 +37 0 +236 0 +532 0 +3020 2 +352 0 +867 0 +999 2 +3128 5 +1945 0 +679 4 +1260 0 +490 0 +478 0 +2043 1 +1325 1 +0 0 +0 0 +3552 5 +1276 2 +3139 0 +1173 1 +1339 6 +651 0 +820 2 +1216 5 +168 0 +526 161 +193 0 +146 2 +2914 1 +16019 5 +941 1 +1328 1 +776 1 +2834 0 +1668 0 +3325 1 +2796 1 +2192 1 +8826 7 +925 1 +603 0 +2292 0 +87 0 +915 1 +3110 0 +1968 0 +368 0 +1092 1 +409 1 +2605 7 +71 0 +15 0 +757 0 +1255 2 +2494 3 +1535 1 +862 1 +396 0 +1822 1 +950 1 +1975 1 +195 0 +88 0 +1214 1 +399 1 +24 0 +3811 5 +268 0 +2096 1 +464 0 +671 2 +2248 1 +6210 4 +1910 0 +1311 1 +575 0 +520 0 +1052 3 +12240 3 +48 64 +629 1 +744 0 +756 1 +1778 1 +1319 0 +644 0 +371 0 +2259 1 +295 0 +32 64 +2310 0 +292 0 +6579 2 +4003 23 +117 0 +898 1 +2253 0 +2236 1 +676 0 +4281 1 +501 0 +102 0 +702 1 +12 0 +920 2 +3306 5 +1925 0 +1571 1 +96 0 +1118 1 +1034 0 +737 0 +438 0 +395 0 +698 0 +228 1 +89 0 +2868 2 +1202 1 +551 0 +521 0 +271 0 +488 1 +960 1 +797 0 +719 5 +478 0 +326 2 +615 1 +1432 4 +1721 1 +238 0 +5135 1 +5167 2 +3458 0 +387 0 +185 0 +3018 1 +629 0 +415 1 +50 1 +1688 1 +2069 2 +751 2 +8251 2 +946 0 +261 0 +339 0 +2103 3 +214 0 +881 1 +1037 0 +2343 3 +1508 0 +1358 3 +1049 0 +1323 0 +3589 6 +1735 0 +528 0 +292 0 +445 0 +512 0 +3813 1 +671 2 +18011 78 +905 0 +1070 2 +125 0 +118 0 +4672 2 +18 0 +1222 0 +5560 38 +1293 1 +919 1 +432 1 +12141 9 +861 1 +2698 1 +344 0 +4470 13 +1034 0 +613 0 +92 0 +883 1 +105 0 +355 0 +270 0 +349 0 +96 1 +3553 22 +3638 1 +143 172 +6688 23 +2682 19 +287 172 +6125 13 +2219 0 +2100 1 +38 0 +2425 961 +793 962 +2106 4 +2042 3 +133 0 +1 0 +3442 1 +610 0 +933 1 +883 0 +2102 0 +3091 1 +2835 3 +1427 1 +5316 3 +1545 0 +151 0 +1896 2 +105 0 +335 0 +41 0 +498 1 +315 0 +465 0 +768 0 +176 0 +1618 1 +978 0 +934 0 +6827 85 +6 0 +9 0 +421 0 +686 0 +645 0 +0 0 +3671 0 +9 0 +618 1 +263 1 +3098 2 +1095 0 +188 0 +1742 0 +1257 0 +2329 2 +3211 3 +19033 19109 +7811 19110 +12 0 +830 0 +1807 1 +598 0 +2197 1 +41 0 +4388 58 +90587 37 +31 0 +177 0 +6431 6 +324 0 +465 0 +36 0 +246 0 +179 0 +554 2 +121 0 +509 0 +1446 0 +3558 2 +1441 0 +130 0 +275 0 +4 1 +665 0 +2521 2 +153 0 +1263 0 +3015 3 +530 0 +799 0 +656 2 +1475 4 +130 0 +11 0 +302 0 +504 0 +932 2 +1402 0 +5303 7 +901 1 +280 0 +261 0 +3201 1 +213 0 +2378 2 +1583 1 +541 0 +3445 3 +324 0 +1726 6 +96 0 +634 1 +645 0 +306 0 +501 1 +46 0 +53 0 +480 0 +341 0 +595 0 +120 0 +2992 0 +2918 0 +744 0 +4076 1 +8380 2 +9900 5 +2117 1 +7 0 +3045 25 +1352 1 +524 0 +2887 1 +664 0 +724 0 +2339 3 +388 1 +532 0 +435 0 +3075 0 +591 0 +6063 36 +3419 2 +3727 0 +17 0 +1291 0 +2685 1 +41 0 +500 1 +1752 0 +2456 0 +496 0 +239 0 +2094 0 +3924 3 +27 0 +2147 1 +881 1 +435 0 +654 0 +25 0 +3833 1 +212 0 +1117 0 +52 0 +4355 8 +727 0 +438 1 +207 0 +6539 5 +3142 0 +2475 0 +2463 2 +99379 115 +4268 3 +134 0 +113 0 +267 0 +225 0 +1235 0 +2816 2 +339 0 +167 0 +1055 1 +63 0 +2076 1 +732 0 +1386 1 +2154 1 +2000 0 +64 0 +1123 0 +155 0 +520 0 +1471 2 +244 0 +2655 1 +1249 1 +294 0 +85 0 +733 0 +1758 0 +1750 1 +2461 3 +62 0 +476 0 +1174 0 +1174 1 +4265 0 +1784 0 +489 0 +2786 3 +1762 2 +2679 6 +6137 3 +0 0 +48 0 +418 0 +219 0 +3019 0 +1661 0 +1029 1 +68 0 +391 0 +727 0 +864 0 +461 0 +970 0 +227 0 +856 0 +393 0 +1413 0 +104 0 +1171 0 +1034 13 +758 0 +3529 1 +8190 2 +3 0 +4054 5 +291 0 +304 0 +23 0 +88 0 +356 0 +15675 75 +14515 4 +7163 5 +156 48 +19 1487 +113 2540 +12905 30 +1287 1 +882 1 +1801 1 +825 0 +93 0 +1880 0 +1306 2 +1990 0 +2967 1 +2312 21 +63 21 +1100 3 +900 0 +2687 0 +85 0 +445 0 +1819 1 +1096 0 +1378 0 +119 1 +1437 0 +3351 65 +461 1 +1599 0 +2948 2 +298 0 +13367 5 +1369 1 +853 6 +281 1 +3348 6 +995 0 +1694 0 +2066 0 +1134 0 +359 0 +4017 12 +210 0 +1661 0 +581 0 +920 0 +1507 0 +882 0 +517 0 +409 1 +27 1 +1292 1 +37 0 +1085 0 +684 0 +164 0 +1058 0 +81 0 +413 0 +129 0 +235 0 +267 0 +3602 2 +1573 1 +249 0 +457 0 +939 0 +985 0 +400 0 +264 0 +808 0 +266 1 +4044 17 +8707 18 +288 1 +100 0 +300 0 +1253 0 +2453 0 +82 59 +1727 3 +3090 4 +1961 0 +127 0 +492 365 +1646 858 +15473 23 +1264 4 +378 1 +582 2 +247 1 +3344 1 +2968 0 +671 3 +1356 1 +1757 2 +2057 0 +702 0 +3 0 +1507 0 +601 0 +7491 2 +1411 2 +2418 4 +2 0 +1777 0 +1722 1 +514 0 +1711 0 +211 0 +6308 4 +384 0 +368 0 +29 0 +1959 0 +586 0 +3803 6 +1249 0 +409 2 +1357 2 +176 0 +5603 4 +3832 2 +2797 1 +274 0 +387 0 +18814 12 +744 0 +1423 0 +157 0 +2062 0 +710 0 +680 1 +3798 3 +4325 2 +7723 1071 +1895 1067 +380 0 +788 0 +275 0 +1354 0 +584 0 +595 0 +151 0 +533 0 +1983 6 +4166 4 +6702 26 +793 0 +1796 1 +1211 2 +119 0 +748 0 +2652 3 +3684 9 +2888 0 +2245 2 +3331 0 +7133 1 +359 0 +2177 7 +2077 0 +143 0 +1537 0 +800 1 +2791 3 +2020 4 +457 1 +727 2 +834 1 +554 1 +3181 3 +3 0 +536 0 +259 0 +1791 3 +2261 1 +903 1 +8772 4 +1826 0 +1195 0 +980 1 +0 15 +5476 23 +2602 1 +847 0 +3583 3 +0 0 +679 0 +1977 0 +10102 5 +362 0 +14059 11 +3035 5 +3165 2 +267 0 +705 0 +5 0 +1125 0 +500 0 +540 0 +47 0 +511 1 +3012 4 +347 0 +172 0 +4291 2 +431 0 +2154 1 +454 1 +433 0 +756 0 +115 0 +2045 1 +897 0 +1223 0 +464 1 +425 0 +1 0 +176 0 +1731 2 +1041 0 +0 0 +629 1 +1641 5 +3979 2 +3653 2 +588 2 +780 0 +890 0 +33 0 +127 1 +1211 0 +185 0 +4468 1 +2372 1 +2486 0 +1873 0 +559 0 +6 0 +1005 0 +531 0 +372 0 +1101 0 +714 1 +836 0 +1086 0 +1961 1 +1139 0 +2321 2 +533 0 +412 0 +204 0 +369 0 +311 0 +391 0 +3012 0 +908 2 +575 1 +66 0 +342 0 +3502 1 +7911 3 +228 0 +12367 23 +838 2 +549 3 +2432 1 +844 0 +1127 0 +107 1 +842 0 +797 0 +255 0 +378 0 +332 2 +792 0 +714 1 +869 8 +372 8 +199 0 +2951 0 +129 0 +216 0 +649 1 +696 1 +846 0 +734 1 +2 1458 +624 0 +10826 3 +965 0 +18 0 +181 1458 +1102 1 +518 0 +2 0 +388 1 +1 0 +245 0 +2422 0 +612 0 +2974 9 +221 0 +4249 5 +9 0 +352 1 +193 0 +41 0 +0 0 +13 0 +413 0 +822 0 +779 1 +282 0 +914 0 +998 0 +742 0 +340 0 +432 1 +740 0 +4159 0 +23604 97 +1244 1 +375 1 +34617 8 +2139 2 +2698 0 +12184 9 +39 0 +679 0 +221 0 +173 0 +1306 2 +46 1 +64 0 +399 1 +21 0 +499 11 +249 10 +540 0 +5008 3 +231 0 +388 0 +1411 0 +2314 23 +113 0 +842 2 +5273 6 +848 2 +7962 4 +477 0 +1565 0 +784 0 +8825 13 +364 0 +775 2 +103 0 +572 0 +3666 0 +547 0 +5488 1 +1836 2 +1325 5 +934 0 +158 37 +14 37 +27 0 +974 0 +896 2 +1532 1 +32160 119 +745 0 +1234 0 +377 0 +3 0 +1132 1 +353 34005 +254 0 +161 0 +219 0 +2875 2 +979 0 +623 0 +342 0 +543 0 +1195 0 +2 0 +1159 1 +3196 2 +1229 2 +226 0 +429 0 +43 0 +971 0 +1 0 +171 0 +1191 467 +1760 0 +1524 6 +7112 91 +3909 14 +1131 0 +2972 8 +3426 1 +1199 0 +38 0 +823 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +6 0 +0 0 +1 0 +4 0 +0 0 +6288 2 +42 0 +0 7 +0 7 +0 0 +0 0 +0 0 +0 0 +3 0 +0 0 +0 0 +752 2 +0 0 +1 0 +0 0 +0 0 +1 0 +0 0 +0 0 +0 0 +0 0 +0 0 +1 0 +0 0 +0 0 +0 0 +0 0 +0 0 +1 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/aux_info/meta_info.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/aux_info/meta_info.json new file mode 100644 index 0000000000000000000000000000000000000000..a9b0b469eefe92aa448cc7c640dfecbb2bd12ace --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/aux_info/meta_info.json @@ -0,0 +1,50 @@ +{ + "salmon_version": "1.7.0", + "samp_type": "none", + "opt_type": "vb", + "quant_errors": [], + "num_libraries": 1, + "library_types": [ + "ISR" + ], + "frag_dist_length": 1001, + "frag_length_mean": 199.37961842117236, + "frag_length_sd": 18.502153639616677, + "seq_bias_correct": false, + "gc_bias_correct": false, + "num_bias_bins": 4096, + "mapping_type": "mapping", + "keep_duplicates": false, + "num_valid_targets": 5923, + "num_decoy_targets": 0, + "num_eq_classes": 11114, + "serialized_eq_classes": false, + "eq_class_properties": [ + "range_factorized", + "gzipped" + ], + "length_classes": [ + 669, + 1053, + 1479, + 2127, + 11412 + ], + "index_seq_hash": "521c4fd92100146ddba5122d99aa6494e7f6268f86c12cc107ce982f8cbdcfad", + "index_name_hash": "3bfae595a879cf68fb015e83d3b3b179b6626adfd02895a1aebcab510ac5cdd3", + "index_seq_hash512": "e4f0142d60affb6e0106a2ea42b62606cedd8d1ade45824ba8ea654fee0219acb88a2cd6bf49d22846a30d4ef3f8e82b7268cafcb57342780a56c1c5e358c812", + "index_name_hash512": "d8a1571371444ed2da49dab9e659625dd5be7f9394d0154cf01325199d053cc4077abbe5ca9f395476c8181935c169907a2c8d5a6184eb7795eb450517a1b2b3", + "index_decoy_seq_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "index_decoy_name_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "num_bootstraps": 0, + "num_processed": 13150248, + "num_mapped": 10380825, + "num_decoy_fragments": 0, + "num_dovetail_fragments": 43343, + "num_fragments_filtered_vm": 1521477, + "num_alignments_below_threshold_for_mapped_fragments_vm": 1824605, + "percent_mapped": 78.94014622385829, + "call": "quant", + "start_time": "Mon May 18 16:09:06 2026", + "end_time": "Mon May 18 16:09:38 2026" +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/cmd_info.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/cmd_info.json new file mode 100644 index 0000000000000000000000000000000000000000..49301da6ca0ca4facba2c63b7d10a5d56a11848d --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/cmd_info.json @@ -0,0 +1,10 @@ +{ + "salmon_version": "1.7.0", + "index": "salmon_index", + "libType": "A", + "mates1": "/225040511/project/bioagent-bench/dataset/deseq/data/SRR1278971_1.fastq", + "mates2": "/225040511/project/bioagent-bench/dataset/deseq/data/SRR1278971_2.fastq", + "output": "quant_SRR1278971", + "validateMappings": [], + "auxDir": "aux_info" +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/libParams/flenDist.txt b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/libParams/flenDist.txt new file mode 100644 index 0000000000000000000000000000000000000000..56be2545ec4a1146a7edef5c3170da695efe0c2b --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/libParams/flenDist.txt @@ -0,0 +1,2 @@ +2.62492e-42 3.91256e-42 5.82255e-42 8.65097e-42 1.2833e-41 1.90061e-41 2.81039e-41 4.14901e-41 6.11543e-41 8.99945e-41 1.32224e-40 1.93959e-40 2.84063e-40 4.15359e-40 6.06371e-40 8.8381e-40 1.28613e-39 1.86859e-39 2.7105e-39 3.92546e-39 5.67593e-39 8.19387e-39 1.18099e-38 1.69944e-38 2.4416e-38 3.50225e-38 5.01562e-38 7.17146e-38 1.02376e-37 1.45912e-37 2.07629e-37 2.9498e-37 4.18409e-37 5.92537e-37 8.37789e-37 1.18266e-36 1.66682e-36 2.34544e-36 3.29508e-36 4.6218e-36 6.47235e-36 9.04937e-36 1.26322e-35 1.76054e-35 2.44973e-35 3.40326e-35 4.72038e-35 6.53679e-35 9.03768e-35 1.24754e-34 1.71933e-34 2.36574e-34 3.24997e-34 4.45758e-34 6.10411e-34 8.34549e-34 1.13916e-33 1.55248e-33 2.11237e-33 2.86959e-33 3.89203e-33 5.27031e-33 7.12528e-33 9.61774e-33 1.29613e-32 1.74394e-32 2.3427e-32 3.14202e-32 4.20733e-32 5.62482e-32 7.50786e-32 1.00053e-31 1.33121e-31 1.76836e-31 6.84644e-10 2.73858e-09 4.21865e-08 1.55059e-07 2.32088e-07 2.92225e-07 5.72767e-07 9.57305e-07 1.30519e-06 1.73188e-06 2.07814e-06 2.73873e-06 4.41247e-06 5.79943e-06 1.04233e-05 3.10714e-05 6.63813e-05 9.26436e-05 9.82099e-05 9.66766e-05 0.000101726 0.000109324 0.000110308 0.000106978 0.000103204 9.89284e-05 9.56333e-05 9.3509e-05 9.45274e-05 9.87694e-05 0.000100627 0.000100792 0.000102152 0.000100798 9.67814e-05 9.45169e-05 9.30189e-05 9.12694e-05 8.98184e-05 8.77667e-05 8.67113e-05 8.67363e-05 8.65601e-05 8.85366e-05 9.3253e-05 9.77131e-05 9.99546e-05 9.94427e-05 9.59263e-05 9.12396e-05 8.9919e-05 9.34555e-05 9.57299e-05 9.28975e-05 9.03505e-05 9.23943e-05 9.7449e-05 0.000100926 9.98835e-05 0.000100525 0.000108599 0.000117317 0.000118641 0.000115614 0.000116049 0.000118093 0.000115199 0.000112869 0.000118876 0.000127342 0.0001321 0.000137572 0.000145693 0.000153295 0.000159997 0.00016691 0.000176581 0.000189143 0.000198947 0.000209027 0.000229312 0.000256247 0.000283789 0.00031601 0.000351406 0.000384742 0.000430753 0.000514092 0.000623527 0.000731173 0.000852877 0.00100974 0.00118989 0.00140031 0.00166775 0.00200596 0.00244254 0.00300722 0.00367331 0.00443724 0.00534462 0.00629268 0.00718668 0.00819301 0.0094228 0.0107903 0.0122093 0.0136193 0.0150342 0.0164532 0.0177764 0.0190079 0.020159 0.0211135 0.0219315 0.0227554 0.0234417 0.0238752 0.024211 0.0245135 0.0247564 0.0249707 0.0250715 0.0250277 0.0249859 0.0249259 0.0246971 0.0243641 0.0240892 0.0239126 0.0237772 0.0235946 0.0233405 0.0229916 0.0224877 0.0219338 0.0214061 0.0207483 0.0199504 0.0191652 0.0183937 0.0175401 0.0165257 0.0153448 0.0140728 0.0127713 0.0114784 0.010265 0.00918092 0.00815585 0.00713106 0.00615511 0.00524281 0.00440033 0.00368012 0.00306412 0.00250146 0.00201241 0.00161982 0.00130694 0.00106022 0.000856743 0.000668507 0.000500318 0.00037262 0.000289477 0.000234821 0.000190094 0.000154422 0.000127366 0.000100668 7.93446e-05 6.96093e-05 6.27302e-05 5.29292e-05 4.54519e-05 4.07535e-05 3.22445e-05 2.05861e-05 1.41505e-05 1.66103e-05 2.23122e-05 2.41114e-05 2.37128e-05 2.67699e-05 2.90493e-05 2.46155e-05 1.93613e-05 1.90377e-05 1.97397e-05 1.85999e-05 1.87571e-05 2.01532e-05 1.84571e-05 1.43908e-05 1.15109e-05 1.0816e-05 1.34235e-05 1.74153e-05 1.78405e-05 1.50059e-05 1.27732e-05 1.17902e-05 9.92226e-06 6.99253e-06 5.3264e-06 5.51072e-06 6.09051e-06 5.88795e-06 5.28822e-06 6.00218e-06 7.75965e-06 8.13576e-06 6.39091e-06 4.0901e-06 3.12518e-06 3.95427e-06 5.0077e-06 4.7626e-06 4.23646e-06 4.89413e-06 5.3329e-06 4.31157e-06 3.40319e-06 3.94618e-06 5.28169e-06 6.23746e-06 6.79044e-06 7.09408e-06 6.53271e-06 5.26668e-06 4.27609e-06 4.12906e-06 4.70796e-06 5.71848e-06 6.44525e-06 5.75919e-06 3.91838e-06 2.31989e-06 1.82532e-06 2.67418e-06 4.57076e-06 7.29547e-06 1.16465e-05 1.76613e-05 2.21686e-05 2.27032e-05 2.11177e-05 1.85409e-05 1.45089e-05 1.15139e-05 1.17937e-05 1.36797e-05 1.5465e-05 1.68526e-05 1.68053e-05 1.48481e-05 1.20364e-05 9.10098e-06 6.65251e-06 5.80342e-06 5.87111e-06 5.57542e-06 5.43165e-06 5.65727e-06 6.69838e-06 9.81125e-06 1.38083e-05 1.62185e-05 1.69279e-05 1.69747e-05 1.71195e-05 1.78771e-05 1.82131e-05 1.74895e-05 1.60288e-05 1.30883e-05 9.98468e-06 9.13059e-06 1.01031e-05 1.15146e-05 1.15907e-05 9.47579e-06 6.59086e-06 4.03897e-06 3.16113e-06 4.52293e-06 5.20384e-06 3.65431e-06 2.27639e-06 2.27916e-06 2.48764e-06 2.14263e-06 1.34094e-06 6.06502e-07 2.57318e-07 1.80122e-07 4.60658e-07 1.00768e-06 1.1681e-06 7.47586e-07 4.7941e-07 8.03917e-07 1.07573e-06 7.20596e-07 3.4341e-07 6.02827e-07 1.03752e-06 1.02642e-06 6.72947e-07 3.36386e-07 2.17664e-07 2.26058e-07 1.4997e-07 3.84038e-08 1.13794e-08 9.20134e-08 2.79652e-07 4.22838e-07 4.28301e-07 4.86916e-07 6.49695e-07 7.24498e-07 7.25728e-07 8.48817e-07 1.49478e-06 2.82245e-06 3.61626e-06 2.84884e-06 1.80148e-06 1.85589e-06 2.56347e-06 3.49376e-06 4.41303e-06 4.54336e-06 4.3519e-06 4.60954e-06 4.56926e-06 4.1309e-06 3.92484e-06 3.61135e-06 3.30485e-06 3.8404e-06 5.06537e-06 5.94178e-06 6.33485e-06 7.39249e-06 8.57534e-06 8.2498e-06 7.65575e-06 7.94659e-06 7.66936e-06 6.85887e-06 6.60128e-06 6.63977e-06 6.88534e-06 6.93595e-06 6.11998e-06 5.60124e-06 6.58736e-06 7.90956e-06 7.96445e-06 6.51845e-06 4.42341e-06 3.08922e-06 2.95942e-06 3.28512e-06 3.74776e-06 4.14848e-06 3.59221e-06 2.26144e-06 1.88807e-06 3.1431e-06 4.67527e-06 4.59261e-06 2.79964e-06 1.26961e-06 8.05052e-07 6.64526e-07 7.86017e-07 1.02826e-06 9.0624e-07 8.46475e-07 1.17325e-06 1.25909e-06 8.87641e-07 7.34307e-07 1.08026e-06 1.23079e-06 8.27444e-07 4.94823e-07 5.55517e-07 7.27481e-07 7.39881e-07 4.65574e-07 2.37467e-07 5.42868e-07 1.13835e-06 1.28152e-06 9.04117e-07 5.18192e-07 4.0989e-07 8.31981e-07 1.50962e-06 1.50264e-06 8.07375e-07 2.93417e-07 2.06086e-07 2.4214e-07 2.52607e-07 2.29705e-07 1.68638e-07 1.05405e-07 1.36563e-07 3.21038e-07 4.68038e-07 3.53897e-07 1.30258e-07 2.20811e-08 2.59435e-08 9.61623e-08 1.68664e-07 1.59729e-07 1.32798e-07 2.09316e-07 3.23997e-07 3.40917e-07 2.5565e-07 1.30196e-07 3.57782e-08 4.92823e-09 1.9967e-09 7.97192e-09 3.15146e-08 5.23448e-08 4.20558e-08 1.58923e-08 1.7721e-08 6.22962e-08 9.34897e-08 6.2391e-08 2.53869e-08 4.24507e-08 1.77942e-07 4.89725e-07 7.02684e-07 5.32563e-07 2.28077e-07 6.91235e-08 1.81446e-08 2.58321e-08 7.58996e-08 1.0014e-07 6.23964e-08 4.01549e-08 9.9132e-08 1.47726e-07 9.82784e-08 2.97972e-08 4.42097e-08 1.27024e-07 2.00996e-07 2.45952e-07 2.56314e-07 1.81228e-07 8.81241e-08 9.50093e-08 1.40772e-07 2.28287e-07 4.76951e-07 6.54342e-07 5.091e-07 2.61878e-07 1.09948e-07 4.38947e-08 2.04449e-07 6.60979e-07 9.27336e-07 6.58751e-07 4.90377e-07 8.58273e-07 1.0895e-06 7.63475e-07 3.82401e-07 2.79318e-07 2.54308e-07 1.56786e-07 6.50968e-08 8.15073e-08 2.02174e-07 2.75011e-07 3.67848e-07 7.97151e-07 1.12831e-06 7.5221e-07 1.88053e-07 3.82676e-13 7.92131e-08 3.16852e-07 4.75279e-07 3.86697e-07 3.60839e-07 4.36271e-07 3.25696e-07 1.28068e-07 4.87673e-08 6.30127e-08 8.48288e-08 6.52785e-08 2.941e-08 5.12474e-08 1.67972e-07 2.53665e-07 1.76624e-07 4.97933e-08 2.25637e-09 7.29338e-13 1.00956e-17 4.03826e-17 6.05738e-17 4.03826e-17 2.11173e-13 5.85877e-12 2.13234e-11 3.09293e-11 2.02676e-11 5.01411e-12 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 1.37181e-12 5.48723e-12 3.45398e-08 1.38457e-07 2.08493e-07 1.40106e-07 4.1138e-08 2.20272e-08 1.87778e-07 6.71168e-07 1.1058e-06 1.00253e-06 5.88757e-07 3.34176e-07 3.88163e-07 5.70095e-07 1.20129e-06 3.37588e-06 6.11741e-06 7.4666e-06 9.04615e-06 1.12651e-05 1.01331e-05 5.60959e-06 2.02866e-06 7.90669e-07 8.65252e-07 1.25607e-06 1.3089e-06 1.37928e-06 1.58935e-06 1.45632e-06 1.17953e-06 1.25475e-06 1.81057e-06 2.2953e-06 2.02968e-06 1.62031e-06 1.83644e-06 2.02125e-06 1.91896e-06 2.45095e-06 3.26842e-06 3.09049e-06 2.00327e-06 8.90529e-07 2.34077e-07 5.74076e-08 1.29174e-07 2.01208e-07 1.55621e-07 2.06915e-07 5.9188e-07 8.67474e-07 5.76234e-07 1.44026e-07 1.68232e-09 1.63014e-07 7.41643e-07 1.37008e-06 1.26598e-06 5.847e-07 1.10571e-07 2.77413e-09 1.76441e-07 7.02988e-07 1.05448e-06 7.02988e-07 1.75747e-07 1.61043e-14 1.29734e-10 5.18936e-10 7.78404e-10 4.72983e-09 1.69739e-08 2.52678e-08 3.737e-08 2.33223e-07 7.11385e-07 9.65898e-07 6.11647e-07 1.49259e-07 5.06826e-08 2.7119e-07 6.54864e-07 1.04543e-06 1.30507e-06 1.19798e-06 7.11632e-07 3.6676e-07 4.79012e-07 8.1539e-07 1.10343e-06 1.10833e-06 8.07621e-07 6.45723e-07 7.7062e-07 7.45636e-07 4.39977e-07 1.76765e-07 9.37939e-08 7.20738e-08 3.89034e-08 1.97308e-07 7.9206e-07 1.29489e-06 1.0106e-06 3.87126e-07 1.22793e-07 1.09236e-07 7.14504e-08 2.34428e-08 2.29058e-08 4.06198e-08 1.98844e-07 6.64948e-07 9.75405e-07 6.48698e-07 2.00511e-07 1.50154e-07 2.23716e-07 1.58855e-07 1.27989e-07 2.79101e-07 4.33866e-07 4.2801e-07 3.43516e-07 2.3891e-07 1.09876e-07 1.07214e-07 3.78579e-07 6.75142e-07 6.52919e-07 5.15155e-07 5.54765e-07 5.40216e-07 3.16141e-07 1.49548e-07 1.25568e-07 8.44073e-08 7.65496e-08 2.16564e-07 3.80462e-07 4.43886e-07 4.24332e-07 3.91612e-07 4.32041e-07 4.78856e-07 4.55812e-07 5.18385e-07 7.76071e-07 9.99803e-07 9.66658e-07 8.99094e-07 1.04221e-06 1.07853e-06 8.34421e-07 8.13644e-07 1.10737e-06 1.48681e-06 1.91756e-06 1.84523e-06 1.06091e-06 3.20588e-07 4.0363e-08 6.78915e-13 9.71314e-13 1.45697e-12 4.28907e-10 1.71199e-09 2.56762e-09 1.30801e-07 5.16785e-07 8.9672e-07 1.01001e-06 8.8186e-07 5.18251e-07 1.41898e-07 4.98043e-09 3.12453e-09 1.23407e-08 1.86488e-08 1.65895e-08 1.85744e-08 2.24625e-08 3.44217e-08 8.24619e-08 1.18268e-07 7.91378e-08 2.06166e-08 1.59836e-09 2.35527e-09 2.5947e-09 1.60823e-09 4.38331e-09 1.59286e-08 2.38929e-08 6.08708e-08 1.83751e-07 2.77026e-07 2.32668e-07 1.82804e-07 1.69926e-07 1.00996e-07 2.34069e-08 9.72572e-13 2.52934e-13 2.24907e-08 9.00346e-08 1.35231e-07 9.11977e-08 6.54682e-08 1.63653e-07 2.43515e-07 1.64028e-07 8.20146e-08 1.65843e-07 3.22431e-07 4.16986e-07 3.83172e-07 2.18442e-07 2.32255e-07 6.78191e-07 1.00254e-06 6.98491e-07 3.03458e-07 2.93317e-07 3.95934e-07 5.59222e-07 9.93586e-07 1.26165e-06 1.02993e-06 8.77885e-07 1.07963e-06 1.37421e-06 1.49437e-06 1.1192e-06 7.06081e-07 9.42124e-07 1.20702e-06 9.02717e-07 6.62138e-07 7.01326e-07 6.22697e-07 5.80037e-07 5.79093e-07 3.44282e-07 7.98042e-08 1.68259e-08 7.29407e-08 1.23553e-07 1.05124e-07 7.99424e-08 1.289e-07 2.82319e-07 5.70816e-07 8.00548e-07 7.68079e-07 5.68648e-07 3.01303e-07 1.67057e-07 3.67341e-07 5.52055e-07 3.69429e-07 9.34034e-08 4.19945e-10 7.29338e-13 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 2.44143e-14 9.76573e-14 1.46486e-13 9.76573e-14 2.44143e-14 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 3.17697e-29 1.29551e-10 5.18203e-10 7.77304e-10 5.18203e-10 1.29551e-10 3.17697e-29 7.87139e-11 3.14855e-10 8.24499e-09 3.23387e-08 5.50497e-08 5.71772e-08 4.74307e-08 3.18083e-08 1.29124e-08 2.95485e-09 9.87091e-08 3.86062e-07 5.74706e-07 3.81675e-07 9.51994e-08 4.0379e-08 1.61516e-07 3.88943e-07 7.48191e-07 9.30864e-07 6.28748e-07 2.10231e-07 1.30511e-07 3.61332e-07 5.25391e-07 3.50162e-07 8.91967e-08 1.56927e-08 4.64381e-08 1.03553e-07 2.83319e-07 6.05656e-07 7.80334e-07 5.86768e-07 2.9516e-07 2.68055e-07 4.09772e-07 7.16365e-07 1.50658e-06 2.2693e-06 2.34874e-06 2.08278e-06 1.74956e-06 1.28296e-06 8.18585e-07 5.62634e-07 4.3172e-07 3.9386e-07 8.19262e-07 1.40849e-06 1.41394e-06 1.10947e-06 9.37695e-07 7.06619e-07 4.11791e-07 1.93037e-07 5.71613e-08 1.09978e-07 3.99699e-07 6.65507e-07 6.91648e-07 5.46405e-07 2.99416e-07 7.65489e-08 2.98386e-09 4.20808e-09 2.2355e-08 7.3984e-08 1.15239e-07 1.02267e-07 1.21804e-07 2.60587e-07 3.52017e-07 2.3076e-07 6.24293e-08 7.58283e-09 5.05522e-09 1.26381e-09 1.54426e-12 4.76381e-08 1.90537e-07 2.85798e-07 1.95097e-07 6.59039e-08 3.64376e-08 5.43883e-08 8.07943e-08 1.59199e-07 2.80832e-07 2.98432e-07 1.65512e-07 4.08845e-08 4.18034e-09 1.30288e-09 + diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/lib_format_counts.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/lib_format_counts.json new file mode 100644 index 0000000000000000000000000000000000000000..44514dcdaea2735419ba1acbd291a2c0bf486840 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/lib_format_counts.json @@ -0,0 +1,22 @@ +{ + "read_files": "[ /225040511/project/bioagent-bench/dataset/deseq/data/SRR1278971_1.fastq, /225040511/project/bioagent-bench/dataset/deseq/data/SRR1278971_2.fastq]", + "expected_format": "ISR", + "compatible_fragment_ratio": 1.0, + "num_compatible_fragments": 10380825, + "num_assigned_fragments": 10380825, + "num_frags_with_concordant_consistent_mappings": 9572272, + "num_frags_with_inconsistent_or_orphan_mappings": 815051, + "strand_mapping_bias": 0.00013056845746006537, + "MSF": 0, + "OSF": 0, + "ISF": 1250, + "MSR": 0, + "OSR": 0, + "ISR": 9572272, + "SF": 285171, + "SR": 528630, + "MU": 0, + "OU": 0, + "IU": 0, + "U": 0 +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/logs/salmon_quant.log b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/logs/salmon_quant.log new file mode 100644 index 0000000000000000000000000000000000000000..18f4163902d0785ece02fd0d2c4d85dedf1cca4f --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/logs/salmon_quant.log @@ -0,0 +1,139 @@ +[2026-05-18 16:09:06.696] [jointLog] [info] setting maxHashResizeThreads to 104 +[2026-05-18 16:09:06.696] [jointLog] [info] Fragment incompatibility prior below threshold. Incompatible fragments will be ignored. +[2026-05-18 16:09:06.696] [jointLog] [info] Usage of --validateMappings implies use of minScoreFraction. Since not explicitly specified, it is being set to 0.65 +[2026-05-18 16:09:06.696] [jointLog] [info] Setting consensusSlack to selective-alignment default of 0.35. +[2026-05-18 16:09:06.696] [jointLog] [info] parsing read library format +[2026-05-18 16:09:06.696] [jointLog] [info] There is 1 library. +[2026-05-18 16:09:06.696] [jointLog] [info] Loading pufferfish index +[2026-05-18 16:09:06.696] [jointLog] [info] Loading dense pufferfish index. +[2026-05-18 16:09:06.735] [jointLog] [info] done +[2026-05-18 16:09:06.818] [jointLog] [info] Index contained 5923 targets +[2026-05-18 16:09:06.820] [jointLog] [info] Number of decoys : 0 +[2026-05-18 16:09:07.374] [jointLog] [info] Automatically detected most likely library type as ISR + +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.42% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.74% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.44% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.60% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.60% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.70% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.84% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.58% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.42% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.60% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.58% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.64% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.44% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.60% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.72% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.46% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.40% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.34% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.64% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.80% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.72% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.40% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.46% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.66% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.78% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.42% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.68% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.46% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.68% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.84% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.64% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.58% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.86% zero probability fragments +[2026-05-18 16:09:37.801] [jointLog] [info] Thread saw mini-batch with a maximum of 2.64% zero probability fragments +[2026-05-18 16:09:37.802] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.804] [jointLog] [info] Thread saw mini-batch with a maximum of 2.78% zero probability fragments +[2026-05-18 16:09:37.804] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.805] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.805] [jointLog] [info] Thread saw mini-batch with a maximum of 2.42% zero probability fragments +[2026-05-18 16:09:37.805] [jointLog] [info] Thread saw mini-batch with a maximum of 2.70% zero probability fragments +[2026-05-18 16:09:37.805] [jointLog] [info] Thread saw mini-batch with a maximum of 2.68% zero probability fragments +[2026-05-18 16:09:37.806] [jointLog] [info] Thread saw mini-batch with a maximum of 2.70% zero probability fragments +[2026-05-18 16:09:37.806] [jointLog] [info] Thread saw mini-batch with a maximum of 2.78% zero probability fragments +[2026-05-18 16:09:37.806] [jointLog] [info] Thread saw mini-batch with a maximum of 2.58% zero probability fragments +[2026-05-18 16:09:37.806] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.807] [jointLog] [info] Thread saw mini-batch with a maximum of 2.74% zero probability fragments +[2026-05-18 16:09:37.811] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.814] [jointLog] [info] Thread saw mini-batch with a maximum of 2.78% zero probability fragments +[2026-05-18 16:09:37.818] [jointLog] [info] Thread saw mini-batch with a maximum of 2.56% zero probability fragments +[2026-05-18 16:09:37.822] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:09:37.834] [jointLog] [info] Thread saw mini-batch with a maximum of 2.58% zero probability fragments +[2026-05-18 16:09:37.835] [jointLog] [info] Thread saw mini-batch with a maximum of 2.66% zero probability fragments +[2026-05-18 16:09:37.835] [jointLog] [info] Thread saw mini-batch with a maximum of 2.74% zero probability fragments +[2026-05-18 16:09:37.840] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:09:37.844] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.845] [jointLog] [info] Thread saw mini-batch with a maximum of 2.58% zero probability fragments +[2026-05-18 16:09:37.846] [jointLog] [info] Thread saw mini-batch with a maximum of 2.42% zero probability fragments +[2026-05-18 16:09:37.850] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:09:37.856] [jointLog] [info] Thread saw mini-batch with a maximum of 2.70% zero probability fragments +[2026-05-18 16:09:37.857] [jointLog] [info] Thread saw mini-batch with a maximum of 2.46% zero probability fragments +[2026-05-18 16:09:37.858] [jointLog] [info] Thread saw mini-batch with a maximum of 2.60% zero probability fragments +[2026-05-18 16:09:37.861] [jointLog] [info] Thread saw mini-batch with a maximum of 2.54% zero probability fragments +[2026-05-18 16:09:37.865] [jointLog] [info] Thread saw mini-batch with a maximum of 2.60% zero probability fragments +[2026-05-18 16:09:37.866] [jointLog] [info] Thread saw mini-batch with a maximum of 2.50% zero probability fragments +[2026-05-18 16:09:37.868] [jointLog] [info] Thread saw mini-batch with a maximum of 2.36% zero probability fragments +[2026-05-18 16:09:37.870] [jointLog] [info] Thread saw mini-batch with a maximum of 2.62% zero probability fragments +[2026-05-18 16:09:37.873] [jointLog] [info] Thread saw mini-batch with a maximum of 2.40% zero probability fragments +[2026-05-18 16:09:38.487] [fileLog] [info] +At end of round 0 +================== +Observed 13150248 total fragments (13150248 in most recent round) + +[2026-05-18 16:09:38.487] [jointLog] [info] Computed 11114 rich equivalence classes for further processing +[2026-05-18 16:09:38.487] [jointLog] [info] Counted 10380825 total reads in the equivalence classes +[2026-05-18 16:09:38.617] [jointLog] [info] Number of mappings discarded because of alignment score : 1824605 +[2026-05-18 16:09:38.617] [jointLog] [info] Number of fragments entirely discarded because of alignment score : 1521477 +[2026-05-18 16:09:38.617] [jointLog] [info] Number of fragments discarded because they are best-mapped to decoys : 0 +[2026-05-18 16:09:38.617] [jointLog] [info] Number of fragments discarded because they have only dovetail (discordant) mappings to valid targets : 43343 +[2026-05-18 16:09:38.617] [jointLog] [info] Mapping rate = 78.9401% + +[2026-05-18 16:09:38.617] [jointLog] [info] finished quantifyLibrary() +[2026-05-18 16:09:38.617] [jointLog] [info] Starting optimizer +[2026-05-18 16:09:38.621] [jointLog] [info] Marked 0 weighted equivalence classes as degenerate +[2026-05-18 16:09:38.622] [jointLog] [info] iteration = 0 | max rel diff. = 2693.33 +[2026-05-18 16:09:38.743] [jointLog] [info] iteration = 100 | max rel diff. = 0.0441453 +[2026-05-18 16:09:38.822] [jointLog] [info] iteration = 130 | max rel diff. = 0.00160704 +[2026-05-18 16:09:38.823] [jointLog] [info] Finished optimizer +[2026-05-18 16:09:38.823] [jointLog] [info] writing output + diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/quant.sf b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/quant.sf new file mode 100644 index 0000000000000000000000000000000000000000..c471ddd781c3efedbb303427778c1b108c8509c2 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278971/quant.sf @@ -0,0 +1,5924 @@ +Name Length EffectiveLength TPM NumReads +CPAR2_600010-T 2208 2008.621 69.966540 1935.000 +CPAR2_600020-T 2919 2719.621 38.829650 1454.000 +CPAR2_600030-T 2451 2251.621 25.772641 799.000 +CPAR2_600040-T 1473 1273.621 135.648842 2378.751 +CPAR2_600050-T 1002 802.621 45.151263 498.969 +CPAR2_600060-T 1143 943.621 69.194155 899.000 +CPAR2_600070-T 1902 1702.621 126.392433 2963.000 +CPAR2_600080-T 2745 2545.621 67.166566 2354.179 +CPAR2_600090-T 2028 1828.621 47.025716 1184.000 +CPAR2_600100-T 1824 1624.621 185.054886 4139.475 +CPAR2_600110-T 2442 2242.621 109.819521 3391.002 +CPAR2_600120-T 1011 811.621 42.416258 474.000 +CPAR2_600130-T 2184 1984.621 22.725918 621.000 +CPAR2_600140-T 1224 1024.621 59.541141 839.988 +CPAR2_600150-T 780 580.671 66.916163 535.000 +CPAR2_600160-T 780 580.671 69.667856 557.000 +CPAR2_600170-T 3054 2854.621 162.179168 6374.352 +CPAR2_600180-T 1083 883.621 89.686118 1091.149 +CPAR2_600190-T 2070 1870.621 81.767361 2106.000 +CPAR2_600200-T 2343 2143.621 78.519415 2317.489 +CPAR2_600210-T 345 145.846 70.215494 141.001 +CPAR2_600220-T 2712 2512.621 50.642448 1752.001 +CPAR2_600230-T 1026 826.621 33.299680 379.000 +CPAR2_600240-T 1428 1228.621 60.494857 1023.361 +CPAR2_600250-T 1050 850.621 141.991858 1663.000 +CPAR2_600260-T 2010 1810.621 266.344619 6639.939 +CPAR2_600270-T 888 688.649 100.719323 955.000 +CPAR2_600280-T 825 625.667 42.485948 366.000 +CPAR2_600290-T 1725 1525.621 0.238029 5.000 +CPAR2_600300-T 2082 1882.621 57.983377 1503.000 +CPAR2_600310-T 321 121.885 568.467279 954.000 +CPAR2_600320-T 1548 1348.621 151.450423 2812.244 +CPAR2_600330-T 678 478.697 359.731495 2371.000 +CPAR2_600340-T 5877 5677.621 33.555309 2623.132 +CPAR2_600350-T 702 502.691 26.728718 185.000 +CPAR2_600360-T 1887 1687.621 57.111386 1327.059 +CPAR2_600370-T 252 52.945 958.864917 699.000 +CPAR2_600380-T 765 565.676 10.785426 84.004 +CPAR2_600390-T 1251 1051.621 0.828761 12.000 +CPAR2_600400-T 1152 952.621 71.056380 932.000 +CPAR2_600410-T 2154 1954.621 34.482031 928.000 +CPAR2_600420-T 171 16.642 192.018349 44.000 +CPAR2_600430-T 4290 4090.621 1.380461 77.751 +CPAR2_600440-T 3477 3277.621 13.186186 595.073 +CPAR2_600450-T 1704 1504.621 12.067583 250.000 +CPAR2_600460-T 1704 1504.621 1669.964538 34596.086 +CPAR2_600470-T 1815 1615.621 73.201481 1628.366 +CPAR2_600480-T 1413 1213.621 199.424713 3332.381 +CPAR2_600490-T 1023 823.621 639.731471 7254.673 +CPAR2_600500-T 3009 2809.621 48.416957 1873.000 +CPAR2_600510-T 1899 1699.621 45.595265 1067.000 +CPAR2_600520-T 1407 1207.621 38.940290 647.474 +CPAR2_600530-T 2049 1849.621 210.940842 5372.000 +CPAR2_600540-T 1878 1678.621 14.970312 346.000 +CPAR2_600560-T 714 514.688 206.675703 1464.623 +CPAR2_600570-T 1908 1708.621 65.716006 1546.000 +CPAR2_600580-T 1443 1243.621 110.260712 1887.998 +CPAR2_600590-T 465 265.756 32.248283 118.000 +CPAR2_600600-T 561 361.747 123.675429 616.000 +CPAR2_600610-T 1956 1756.621 312.305441 7553.534 +CPAR2_600620-T 3741 3541.621 77.049815 3757.216 +CPAR2_600630-T 2757 2557.621 22.405171 789.000 +CPAR2_600640-T 1359 1159.621 0.000000 0.000 +CPAR2_600650-T 3189 2989.621 54.615253 2248.136 +CPAR2_600660-T 1365 1165.621 474.408854 7613.823 +CPAR2_600670-T 2742 2542.621 58.728512 2056.000 +CPAR2_600680-T 1152 952.621 35.299509 463.001 +CPAR2_600690-T 1752 1552.621 10.150833 217.000 +CPAR2_600710-T 1197 997.621 17.100362 234.889 +CPAR2_600730-T 4260 4060.621 8.656860 484.000 +CPAR2_600740-T 1836 1636.621 124.722989 2810.524 +CPAR2_600750-T 4506 4306.621 224.793684 13329.482 +CPAR2_600760-T 1824 1624.621 297.626083 6657.569 +CPAR2_600770-T 915 715.649 49.017880 483.000 +CPAR2_600780-T 870 670.650 46.350603 428.000 +CPAR2_600790-T 267 67.926 3324.299027 3109.057 +CPAR2_600800-T 951 751.633 59.039564 611.000 +CPAR2_600810-T 1944 1744.621 20.606846 495.000 +CPAR2_600820-T 4632 4432.621 45.927201 2803.000 +CPAR2_600830-T 2097 1897.621 65.140903 1701.985 +CPAR2_600840-T 1536 1336.621 21.517622 396.000 +CPAR2_600850-T 1947 1747.621 49.039063 1180.000 +CPAR2_600860-T 507 307.752 216.794754 918.633 +CPAR2_600870-T 1581 1381.621 1366.419738 25993.554 +CPAR2_tA(UGC)1-T 73 73.000 0.000000 0.000 +CPAR2_600880-T 2523 2323.621 48.475885 1550.899 +CPAR2_600890-T 612 412.744 72.699942 413.150 +CPAR2_600900-T 1128 928.621 129.752340 1659.000 +CPAR2_600910-T 972 772.624 0.000000 0.000 +CPAR2_600920-T 2094 1894.621 0.478368 12.479 +CPAR2_600930-T 2157 1957.621 950.174708 25610.889 +CPAR2_600940-T 1488 1288.621 72.988079 1295.000 +CPAR2_600950-T 1974 1774.621 203.679515 4976.747 +CPAR2_600960-T 1905 1705.621 89.253441 2096.043 +CPAR2_600970-T 2169 1969.621 23.881148 647.635 +CPAR2_600980-T 1170 970.621 393.248940 5255.450 +CPAR2_600990-T 879 679.649 126.309452 1181.988 +CPAR2_601000-T 1605 1405.621 69.375023 1342.654 +CPAR2_601010-T 3129 2929.621 23.973006 967.000 +CPAR2_601040-T 2532 2332.621 24.753145 795.000 +CPAR2_601050-T 1332 1132.621 23.469499 366.000 +CPAR2_601080-T 3420 3220.621 101.279279 4491.100 +CPAR2_601090-T 1584 1384.621 53.240547 1015.000 +CPAR2_601100-T 1914 1714.621 75.039122 1771.530 +CPAR2_601110-T 408 208.809 11.130323 32.000 +CPAR2_601120-T 708 508.689 244.861134 1715.003 +CPAR2_601130-T 2145 1945.621 26.578421 712.000 +CPAR2_601140-T 855 655.653 48.296984 436.000 +CPAR2_601150-T 804 604.669 5.765425 48.000 +CPAR2_601160-T 888 688.649 5.484194 52.000 +CPAR2_601170-T 3516 3316.621 83.955217 3833.858 +CPAR2_601180-T 1077 877.621 123.388617 1490.990 +CPAR2_601190-T 891 691.649 89.753002 854.727 +CPAR2_601200-T 1392 1192.621 19.368107 318.040 +CPAR2_601210-T 891 691.649 67.415013 642.000 +CPAR2_601220-T 993 793.622 19.584274 214.000 +CPAR2_601230-T 684 484.697 65.781205 439.000 +CPAR2_601240-T 2886 2686.621 25.735819 952.000 +CPAR2_601250-T 1371 1171.621 27.709841 447.006 +CPAR2_601260-T 765 565.676 56.107594 437.001 +CPAR2_601270-T 588 388.744 13.638487 73.000 +CPAR2_601280-T 1323 1123.621 54.748335 847.000 +CPAR2_601290-T 1314 1114.621 32.787979 503.193 +CPAR2_601300-T 1815 1615.621 53.705556 1194.679 +CPAR2_601310-T 2793 2593.621 35.591516 1271.000 +CPAR2_601320-T 1002 802.621 9.320388 103.000 +CPAR2_601330-T 654 454.702 299.649657 1876.000 +CPAR2_601340-T 1977 1777.621 106.800633 2614.000 +CPAR2_601350-T 573 373.745 148.853955 766.000 +CPAR2_601360-T 1365 1165.621 41.186174 661.000 +CPAR2_601370-T 1389 1189.621 63.493911 1040.000 +CPAR2_601380-T 2226 2026.621 98.037886 2735.641 +CPAR2_601390-T 318 118.893 221.746970 363.000 +CPAR2_601400-T 1704 1504.621 126.072367 2611.798 +CPAR2_601410-T 1578 1378.621 27.886939 529.344 +CPAR2_601420-T 744 544.682 233.213674 1749.000 +CPAR2_601430-T 1245 1045.621 173.284318 2494.745 +CPAR2_601440-T 1665 1465.621 61.359101 1238.207 +CPAR2_601450-T 546 346.750 58.856960 281.000 +CPAR2_601460-T 1434 1234.621 49.884952 848.000 +CPAR2_601470-T 1740 1540.621 46.105173 977.998 +CPAR2_601480-T 1416 1216.621 72.708383 1217.958 +CPAR2_601490-T 1266 1066.621 63.053355 926.000 +CPAR2_601500-T 960 760.627 34.088209 357.000 +CPAR2_601510-T 1749 1549.621 47.665358 1017.000 +CPAR2_601520-T 1050 850.621 19.723463 231.000 +CPAR2_601530-T 1032 832.621 128.664308 1475.021 +CPAR2_601540-T 2340 2140.621 140.249789 4133.658 +CPAR2_601550-T 2127 1927.621 135.514343 3596.661 +CPAR2_601560-T 3315 3115.621 53.976411 2315.481 +CPAR2_601570-T 3267 3067.621 51.992188 2196.000 +CPAR2_601580-T 1530 1330.621 29.092444 533.000 +CPAR2_601590-T 4095 3895.621 30.076567 1613.234 +CPAR2_601600-T 2751 2551.621 91.220064 3204.786 +CPAR2_601610-T 360 160.822 3.161268 7.000 +CPAR2_601620-T 1623 1423.621 148.532280 2911.440 +CPAR2_601630-T 2544 2344.621 104.393628 3370.072 +CPAR2_601640-T 834 634.664 104.709122 915.000 +CPAR2_601650-T 1494 1294.621 57.727148 1029.000 +CPAR2_601660-T 972 772.624 51.231352 545.000 +CPAR2_601670-T 1047 847.621 54.838499 640.000 +CPAR2_601680-T 696 496.693 0.000000 0.000 +CPAR2_601690-T 672 472.698 19.359498 126.000 +CPAR2_601700-T 483 283.753 78.066882 305.000 +CPAR2_601710-T 879 679.649 349.896553 3274.289 +CPAR2_601720-T 1086 886.621 43.415535 530.000 +CPAR2_601730-T 1860 1660.621 1.249336 28.566 +CPAR2_601740-T 1839 1639.621 0.055337 1.249 +CPAR2_601750-T 1827 1627.621 0.276000 6.185 +CPAR2_601760-T 1734 1534.621 0.094653 2.000 +CPAR2_601770-T 1116 916.621 411.693600 5195.850 +CPAR2_601780-T 1308 1108.621 232.461919 3548.359 +CPAR2_601790-T 1086 886.621 73.642577 899.000 +CPAR2_601800-T 897 697.649 304.139394 2921.476 +CPAR2_601810-T 1254 1054.621 60.534059 879.000 +CPAR2_601820-T 2496 2296.621 148.566159 4697.879 +CPAR2_601830-T 414 214.804 172.561094 510.361 +CPAR2_601840-T 1107 907.621 33.357600 416.862 +CPAR2_601850-T 621 421.743 41.158339 239.000 +CPAR2_601860-T 1194 994.621 64.696893 886.000 +CPAR2_601870-T 8517 8317.621 3.733205 427.537 +CPAR2_601880-T 828 628.666 0.115528 1.000 +CPAR2_601890-T 1935 1735.621 52.944088 1265.217 +CPAR2_601900-T 2097 1897.621 83.570306 2183.504 +CPAR2_601910-T 834 634.664 58.476895 511.000 +CPAR2_601920-T 1572 1372.621 267.525780 5056.021 +CPAR2_601925-T 423 223.791 1.947221 6.000 +CPAR2_601950-T 1107 907.621 16.735407 209.138 +CPAR2_601960-T 1491 1291.621 8.322120 148.000 +CPAR2_601970-T 1365 1165.621 16.324928 262.000 +CPAR2_601980-T 1893 1693.621 39.238489 915.000 +CPAR2_601990-T 990 790.622 47.860382 521.000 +CPAR2_602000-T 777 577.671 119.114482 947.410 +CPAR2_602010-T 933 733.645 88.404265 893.000 +CPAR2_602020-T 3672 3472.621 25.934135 1240.000 +CPAR2_602030-T 660 460.701 0.945887 6.000 +CPAR2_602040-T 1125 925.621 93.686807 1194.000 +CPAR2_602050-T 1737 1537.621 390.862367 8274.957 +CPAR2_602060-T 1614 1414.621 23.052266 449.000 +CPAR2_602070-T 1629 1429.621 78.029914 1535.941 +CPAR2_602080-T 1182 982.621 47.906533 648.147 +CPAR2_602090-T 639 439.715 30.061307 182.000 +CPAR2_602100-T 2547 2347.621 23.914370 773.000 +CPAR2_602110-T 759 559.679 88.800890 684.304 +CPAR2_602120-T 1533 1333.621 73.901763 1357.000 +CPAR2_602130-T 915 715.649 77.129584 760.000 +CPAR2_602135-T 225 26.867 318.981517 118.000 +CPAR2_602140-T 1590 1390.621 40.319571 772.000 +CPAR2_602150-T 1428 1228.621 36.414215 616.001 +CPAR2_602160-T 432 232.777 275.815539 883.999 +CPAR2_602170-T 726 526.686 15.306609 111.000 +CPAR2_602180-T 1218 1018.621 27.094323 380.000 +CPAR2_602190-T 552 352.749 31.295772 152.000 +CPAR2_602200-T 1029 829.621 56.641120 647.000 +CPAR2_602210-T 1527 1327.621 56.843089 1039.069 +CPAR2_602220-T 1260 1060.621 40.744039 595.000 +CPAR2_602230-T 4908 4708.621 42.943426 2784.088 +CPAR2_602240-T 1176 976.621 69.682040 937.000 +CPAR2_602250-T 3150 2950.621 13.390381 544.000 +CPAR2_602260-T 1914 1714.621 118.418967 2795.645 +CPAR2_602270-T 1104 904.621 58.930035 734.000 +CPAR2_602280-T 2196 1996.621 46.306312 1273.000 +CPAR2_602290-T 2523 2323.621 93.450389 2989.778 +CPAR2_602300-T 957 757.629 39.506314 412.112 +CPAR2_602310-T 657 457.702 87.433283 551.000 +CPAR2_602320-T 1176 976.621 61.576018 828.000 +CPAR2_602330-T 450 250.759 124.253227 429.000 +CPAR2_602340-T 645 445.710 53.610608 329.000 +CPAR2_602350-T 1722 1522.621 61.389504 1287.000 +CPAR2_602360-T 1296 1096.621 3.187120 48.122 +CPAR2_602370-T 1086 886.621 76.346018 932.003 +CPAR2_602380-T 642 442.713 0.164053 1.000 +CPAR2_602390-T 1227 1027.621 30.673553 434.000 +CPAR2_602400-T 1095 895.621 14.596729 180.000 +CPAR2_602410-T 1221 1021.621 23.606095 332.052 +CPAR2_602420-T 1230 1030.621 741.537578 10522.643 +CPAR2_602430-T 1152 952.621 62.059971 814.000 +CPAR2_602440-T 1914 1714.621 148.724772 3511.107 +CPAR2_602450-T 3132 2932.621 208.611148 8423.372 +CPAR2_602460-T 1242 1042.621 143.158982 2055.123 +CPAR2_602480-T 117 14.064 826.259974 160.000 +CPAR2_602490-T 4110 3910.621 22.397990 1206.000 +CPAR2_602500-T 1029 829.621 41.601305 475.203 +CPAR2_602510-T 2751 2551.621 67.003539 2354.000 +CPAR2_602520-T 1830 1630.621 102.011690 2290.317 +CPAR2_602530-T 471 271.755 1370.189929 5126.853 +CPAR2_602540-T 1710 1510.621 323.665148 6731.999 +CPAR2_602550-T 1389 1189.621 145.672818 2386.051 +CPAR2_602560-T 486 286.753 517.702897 2044.000 +CPAR2_602570-T 7785 7585.621 5.026615 525.000 +CPAR2_602580-T 396 196.816 136.536798 370.000 +CPAR2_602590-T 2712 2512.621 726.607178 25137.334 +CPAR2_602600-T 879 679.649 134.539062 1259.000 +CPAR2_602610-T 2466 2266.621 15.758425 491.795 +CPAR2_602620-T 1467 1267.621 75.343137 1315.000 +CPAR2_602630-T 849 649.655 55.227013 494.000 +CPAR2_602640-T 3393 3193.621 68.725601 3022.000 +CPAR2_602650-T 1296 1096.621 83.462285 1260.200 +CPAR2_602660-T 582 382.745 27.514796 145.000 +CPAR2_602670-T 1476 1276.621 49.213313 865.042 +CPAR2_602680-T 372 172.818 1002.741806 2386.000 +CPAR2_602690-T 1965 1765.621 93.129481 2264.004 +CPAR2_602700-T 648 448.708 36.282674 224.159 +CPAR2_602710-T 663 463.700 50.904187 325.000 +CPAR2_602720-T 11412 11212.621 4.864787 751.041 +CPAR2_602730-T 1233 1033.621 1760.968264 25061.411 +CPAR2_602740-T 798 598.669 0.242634 2.000 +CPAR2_602750-T 1242 1042.621 109.086906 1566.000 +CPAR2_602760-T 2265 2065.621 124.783365 3548.950 +CPAR2_602770-T 2415 2215.621 24.355709 743.000 +CPAR2_602780-T 1668 1468.621 32.688810 661.000 +CPAR2_602790-T 384 184.816 457.739688 1164.800 +CPAR2_602800-T 675 475.697 12.672284 83.000 +CPAR2_602810-T 4119 3919.621 22.407184 1209.272 +CPAR2_602820-T 483 283.753 51.447355 201.000 +CPAR2_602830-T 429 229.782 99.880133 316.000 +CPAR2_602840-T 1146 946.621 20.715477 270.000 +CPAR2_602850-T 456 256.758 43.561632 154.000 +CPAR2_602860-T 417 217.801 156.060520 468.000 +CPAR2_602870-T 1677 1477.621 38.142228 776.000 +CPAR2_602880-T 477 277.754 18.565455 71.000 +CPAR2_602890-T 1554 1354.621 50.344864 939.000 +CPAR2_602900-T 849 649.655 41.699749 373.000 +CPAR2_602910-T 2100 1900.621 78.222149 2047.000 +CPAR2_602920-T 1437 1237.621 116.605105 1987.000 +CPAR2_602930-T 1746 1546.621 1.737502 37.000 +CPAR2_602940-T 1953 1753.621 292.772735 7069.016 +CPAR2_602950-T 1254 1054.621 76.788538 1115.027 +CPAR2_602960-T 855 655.653 99.363291 897.000 +CPAR2_602970-T 3201 3001.621 34.794491 1438.000 +CPAR2_602980-T 3264 3064.621 13.985443 590.127 +CPAR2_602990-T 801 601.669 49.854025 413.000 +CPAR2_603000-T 3120 2920.621 91.072260 3662.300 +CPAR2_603010-T 1806 1606.621 117.116696 2590.746 +CPAR2_603020-T 471 271.755 769.627856 2879.724 +CPAR2_603030-T 738 538.684 106.377629 789.000 +CPAR2_603040-T 765 565.676 55.722356 434.000 +CPAR2_603050-T 1104 904.621 3856.899439 48039.411 +CPAR2_603060-T 1032 832.621 23.298548 267.097 +CPAR2_603070-T 2466 2266.621 72.225114 2254.030 +CPAR2_603080-T 1761 1561.621 623.217592 13400.097 +CPAR2_603090-T 1296 1096.621 170.143315 2569.000 +CPAR2_603100-T 1542 1342.621 430.885838 7965.413 +CPAR2_603110-T 2232 2032.621 201.549406 5640.668 +CPAR2_603120-T 924 724.648 88.499617 883.000 +CPAR2_603130-T 2115 1915.621 62.482503 1648.013 +CPAR2_603140-T 1194 994.621 64.842935 888.000 +CPAR2_603150-T 492 292.752 279.034174 1124.736 +CPAR2_603160-T 1503 1303.621 51.230900 919.551 +CPAR2_603170-T 2364 2164.621 75.729496 2257.041 +CPAR2_603180-T 1167 967.621 21.466837 286.000 +CPAR2_603190-T 1023 823.621 97.529276 1106.000 +CPAR2_603200-T 1275 1075.621 34.505341 511.020 +CPAR2_603210-T 1476 1276.621 18.603435 327.000 +CPAR2_603220-T 954 754.632 54.666455 568.000 +CPAR2_603230-T 1842 1642.621 41.473709 938.000 +CPAR2_603240-T 1128 928.621 152.824636 1954.000 +CPAR2_603250-T 1068 868.621 1.839499 22.000 +CPAR2_603260-T 2724 2524.621 96.233100 3345.132 +CPAR2_603270-T 1419 1219.621 33.590239 564.067 +CPAR2_603280-T 339 139.859 389.473492 750.002 +CPAR2_603290-T 1323 1123.621 20.425589 316.000 +CPAR2_603300-T 1020 820.621 4.602227 52.000 +CPAR2_603310-T 891 691.649 82.536138 786.000 +CPAR2_603320-T 1707 1507.621 59.655195 1238.320 +CPAR2_603330-T 1740 1540.621 193.958010 4114.302 +CPAR2_603340-T 417 217.801 10584.947597 31742.528 +CPAR2_603350-T 849 649.655 3392.061589 30341.645 +CPAR2_603360-T 477 277.754 139.633139 534.000 +CPAR2_603370-T 2502 2302.621 33.434193 1060.000 +CPAR2_603375-T 246 46.958 165.493642 107.000 +CPAR2_603380-T 1170 970.621 48.600118 649.501 +CPAR2_603390-T 597 397.744 22.642537 124.000 +CPAR2_603400-T 378 178.817 38.585327 95.000 +CPAR2_603410-T 1380 1180.621 9.719724 158.000 +CPAR2_603420-T 2670 2470.621 33.905640 1153.375 +CPAR2_603430-T 2472 2272.621 142.414576 4456.296 +CPAR2_603440-T 2568 2368.621 817.196296 26651.062 +CPAR2_603450-T 2436 2236.621 126.405668 3892.705 +CPAR2_603460-T 2763 2563.621 29.661992 1047.000 +CPAR2_603470-T 2415 2215.621 83.952456 2561.070 +CPAR2_603480-T 4362 4162.621 12.859027 737.000 +CPAR2_603490-T 1554 1354.621 85.948868 1603.063 +CPAR2_603500-T 2100 1900.621 101.723143 2661.999 +CPAR2_603510-T 2733 2533.621 82.018956 2861.201 +CPAR2_603520-T 2319 2119.621 63.801207 1862.000 +CPAR2_603530-T 1731 1531.621 298.723644 6299.608 +CPAR2_603540-T 1389 1189.621 60.872912 997.069 +CPAR2_603550-T 1035 835.621 14.775659 170.000 +CPAR2_603560-T 3228 3028.621 52.206065 2177.000 +CPAR2_603570-T 258 58.938 227.973205 185.000 +CPAR2_603580-T 1419 1219.621 68.720811 1154.000 +CPAR2_603590-T 1902 1702.621 135.181203 3169.034 +CPAR2_603600-T 1884 1684.621 3.966393 92.001 +CPAR2_603610-T 1311 1111.621 220.633972 3376.928 +CPAR2_603620-T 1287 1087.621 50.951186 763.000 +CPAR2_603630-T 1251 1051.621 46.485150 673.079 +CPAR2_603640-T 297 97.907 171.359012 231.000 +CPAR2_603650-T 240 40.990 177.187381 100.000 +CPAR2_603660-T 1797 1597.621 20.820882 458.000 +CPAR2_603670-T 906 706.649 118.606752 1154.000 +CPAR2_603680-T 1893 1693.621 40.482113 944.000 +CPAR2_603690-T 1929 1729.621 55.932043 1332.000 +CPAR2_603700-T 1575 1375.621 75.405640 1428.220 +CPAR2_603710-T 912 712.649 12.637275 124.000 +CPAR2_603720-T 1458 1258.621 124.469166 2156.996 +CPAR2_603730-T 1281 1081.621 345.049287 5138.648 +CPAR2_603740-T 702 502.691 22.249852 154.000 +CPAR2_603750-T 690 490.696 112.784748 762.000 +CPAR2_603760-T 531 331.751 46.412113 212.000 +CPAR2_603770-T 1701 1501.621 45.570822 942.193 +CPAR2_603780-T 627 427.738 54.504849 321.000 +CPAR2_603790-T 972 772.624 15.115187 160.796 +CPAR2_603800-T 4500 4300.621 11.323062 670.483 +CPAR2_100010-T 453 253.759 36.635025 128.000 +CPAR2_100020-T 2172 1972.621 21.870072 594.000 +CPAR2_100030-T 1266 1066.621 241.659131 3549.000 +CPAR2_100040-T 1281 1081.621 217.417344 3237.889 +CPAR2_100050-T 1458 1258.621 31.737673 550.000 +CPAR2_100060-T 1089 889.621 125.725938 1540.007 +CPAR2_100070-T 477 277.754 7.583073 29.000 +CPAR2_100080-T 1041 841.621 8.629601 100.000 +CPAR2_100090-T 2892 2692.621 312.396134 11581.730 +CPAR2_100100-T 564 364.747 2076.104222 10426.374 +CPAR2_100110-T 1395 1195.621 62.932297 1036.000 +CPAR2_100120-T 1332 1132.621 55.296935 862.340 +CPAR2_100130-T 1776 1576.621 165.607114 3595.000 +CPAR2_100140-T 1377 1177.621 34.046417 552.039 +CPAR2_100150-T 2934 2734.621 74.683666 2812.000 +CPAR2_100160-T 2715 2515.621 72.610602 2514.999 +CPAR2_100170-T 1281 1081.621 7.722005 115.000 +CPAR2_100180-T 1308 1108.621 90.233431 1377.347 +CPAR2_100190-T 1011 811.621 88.884552 993.281 +CPAR2_100200-T 912 712.649 0.000000 0.000 +CPAR2_100210-T 585 385.745 99.036064 526.000 +CPAR2_100220-T 714 514.688 35.136856 249.000 +CPAR2_100230-T 348 148.838 44.405198 91.000 +CPAR2_100240-T 492 292.752 38.701833 156.000 +CPAR2_100250-T 981 781.623 52.964523 570.000 +CPAR2_100260-T 780 580.671 79.298780 634.000 +CPAR2_100270-T 927 727.646 3.094205 31.000 +CPAR2_100280-T 1311 1111.621 47.956410 734.000 +CPAR2_100290-T 366 166.819 1135.456835 2608.000 +CPAR2_100300-T 1530 1330.621 7.095718 130.000 +CPAR2_100320-T 681 481.697 217.702134 1443.873 +CPAR2_100330-T 1851 1651.621 45.958017 1045.115 +CPAR2_100340-T 483 283.753 1044.547904 4080.951 +CPAR2_100350-T 2025 1825.621 4.575037 115.000 +CPAR2_100360-T 1674 1474.621 99.347137 2017.104 +CPAR2_100370-T 1236 1036.621 123.800923 1767.000 +CPAR2_100380-T 846 646.657 42.566959 379.000 +CPAR2_100390-T 303 103.903 256.534157 367.000 +CPAR2_100400-T 912 712.649 0.000000 0.000 +CPAR2_100410-T 939 739.643 41.536085 423.000 +CPAR2_100420-T 558 358.747 63.771904 315.000 +CPAR2_100430-T 663 463.700 60.301883 385.000 +CPAR2_100440-T 321 121.885 5.362899 9.000 +CPAR2_100450-T 486 286.753 80.542819 318.000 +CPAR2_100460-T 1467 1267.621 26.241184 458.000 +CPAR2_100470-T 1518 1318.621 19.883580 361.000 +CPAR2_100480-T 1026 826.621 2.108687 24.000 +CPAR2_100490-T 1776 1576.621 48.737782 1058.000 +CPAR2_100500-T 1107 907.621 72.178742 902.000 +CPAR2_100510-T 483 283.753 23.548043 92.000 +CPAR2_100520-T 447 247.762 175.297151 598.000 +CPAR2_100530-T 636 436.717 548.809611 3300.000 +CPAR2_100540-T 732 532.685 63.822367 468.097 +CPAR2_100550-T 1434 1234.621 88.181065 1499.000 +CPAR2_100560-T 1755 1555.621 60.460728 1295.000 +CPAR2_100565-T 711 511.689 1.419389 10.000 +CPAR2_100570-T 1758 1558.621 35.181449 755.000 +CPAR2_100580-T 306 106.902 24.458270 36.000 +CPAR2_100590-T 813 613.668 8.994722 76.000 +CPAR2_100600-T 753 553.681 115.957822 884.000 +CPAR2_100610-T 4455 4255.621 9.454844 554.000 +CPAR2_100620-T 1734 1534.621 78.278368 1654.000 +CPAR2_100630-T 705 505.690 53.427666 372.000 +CPAR2_100640-T 279 79.915 109.749635 120.760 +CPAR2_100650-T 2679 2479.621 121.328062 4142.277 +CPAR2_100660-T 1356 1156.621 25.996604 414.000 +CPAR2_100670-T 3660 3460.621 238.508760 11364.515 +CPAR2_100680-T 1209 1009.621 126.513147 1758.680 +CPAR2_100690-T 951 751.633 219.403286 2270.603 +CPAR2_100700-T 4902 4702.621 3.783847 245.000 +CPAR2_100710-T 1317 1117.621 97.022532 1493.000 +CPAR2_100720-T 1242 1042.621 59.563946 855.072 +CPAR2_100730-T 1296 1096.621 50.930405 769.000 +CPAR2_100740-T 945 745.640 161.885914 1662.000 +CPAR2_100750-T 1098 898.621 36.592023 452.747 +CPAR2_100760-T 789 589.669 58.135523 472.000 +CPAR2_100770-T 102 6.280 1919.889012 166.000 +CPAR2_100780-T 102 6.280 127.221561 11.000 +CPAR2_100790-T 813 613.668 57.992289 490.000 +CPAR2_100800-T 1284 1084.621 56.449085 843.000 +CPAR2_100810-T 3504 3304.621 55.538104 2527.000 +CPAR2_100820-T 951 751.633 667.332076 6906.215 +CPAR2_100830-T 717 517.687 482.185311 3436.955 +CPAR2_100840-T 777 577.671 26.411391 210.070 +CPAR2_100850-T 858 658.653 146.436411 1328.000 +CPAR2_100850.1-T 552 352.749 0.000000 0.000 +CPAR2_100860-T 659 459.701 18.642913 118.000 +CPAR2_100870-T 957 757.629 98.834764 1031.000 +CPAR2_100880-T 1641 1441.621 68.485713 1359.389 +CPAR2_100890-T 1065 865.621 9.732793 116.000 +CPAR2_100900-T 942 742.642 40.488215 414.001 +CPAR2_100900.1-T 264 64.930 8.948556 8.000 +CPAR2_100910-T 903 703.649 76.690239 743.000 +CPAR2_100920-T 840 640.661 23.693281 209.000 +CPAR2_100940-T 906 706.649 77.385229 752.930 +CPAR2_100950-T 480 280.753 0.258692 1.000 +CPAR2_100960-T 885 685.649 46.819608 442.000 +CPAR2_100970-T 909 709.649 99.785994 975.003 +CPAR2_100980-T 1755 1555.621 3.735026 80.000 +CPAR2_100990-T 1452 1252.621 43.022098 742.000 +CPAR2_101000-T 1473 1273.621 79.130603 1387.642 +CPAR2_101010-T 2928 2728.621 148.645014 5584.523 +CPAR2_101020-T 1350 1150.621 158.832973 2516.318 +CPAR2_101030-T 1209 1009.621 83.352510 1158.697 +CPAR2_101040-T 423 223.791 36.672669 113.000 +CPAR2_tD(GUC)1-T 72 72.000 0.000000 0.000 +CPAR2_101050-T 609 409.744 71.964859 406.000 +CPAR2_101060-T 3120 2920.621 328.433023 13207.316 +CPAR2_101070-T 2991 2791.621 76.151386 2927.028 +CPAR2_101080-T 1836 1636.621 14.999472 338.000 +CPAR2_101090-T 738 538.684 33.976125 252.000 +CPAR2_101100-T 1383 1183.621 100.332087 1635.103 +CPAR2_101110-T 897 697.649 163.340289 1569.000 +CPAR2_tA(AGC)1-T 73 73.000 0.000000 0.000 +CPAR2_101120-T 3846 3646.621 267.168524 13414.313 +CPAR2_101130-T 819 619.668 124.706862 1064.000 +CPAR2_101140-T 1350 1150.621 49.171393 779.000 +CPAR2_101150-T 2244 2044.621 35.344162 995.000 +CPAR2_101160-T 831 631.666 136.020702 1183.000 +CPAR2_101170-T 234 35.101 7777.860845 3758.973 +CPAR2_101180-T 1461 1261.621 50.026283 869.000 +CPAR2_101190-T 2388 2188.621 36.436715 1098.000 +CPAR2_101200-T 1662 1462.621 34.113975 687.000 +CPAR2_101210-T 288 88.910 281.004546 344.000 +CPAR2_101220-T 2787 2587.621 114.235527 4070.000 +CPAR2_101230-T 1527 1327.621 1471.280821 26894.428 +CPAR2_101240-T 3291 3091.621 30.702769 1306.942 +CPAR2_101250-T 2139 1939.621 129.137484 3448.750 +CPAR2_101260-T 2640 2440.621 123.647219 4155.060 +CPAR2_101270-T 3378 3178.621 261.963821 11464.962 +CPAR2_101280-T 1008 808.621 149.187315 1661.000 +CPAR2_101290-T 1116 916.621 183.384494 2314.436 +CPAR2_101300-T 918 718.649 146.338774 1448.000 +CPAR2_101310-T 1122 922.621 54.046018 686.562 +CPAR2_101320-T 2673 2473.621 96.344137 3281.338 +CPAR2_101330-T 900 700.649 152.451297 1470.701 +CPAR2_101340-T 2109 1909.621 110.846169 2914.476 +CPAR2_101350-T 954 754.632 337.632165 3508.094 +CPAR2_101360-T 1197 997.621 13.395520 184.000 +CPAR2_101370-T 2100 1900.621 62.033600 1623.361 +CPAR2_101380-T 2076 1876.621 63.664415 1645.000 +CPAR2_101390-T 456 256.758 43.844500 155.000 +CPAR2_101400-T 1344 1144.621 2.411178 38.000 +CPAR2_101410-T 1329 1129.621 277.285636 4312.735 +CPAR2_101420-T 1434 1234.621 23.824771 405.000 +CPAR2_101430-T 1737 1537.621 186.528490 3949.000 +CPAR2_101440-T 5784 5584.621 11.290037 868.124 +CPAR2_101450-T 699 499.693 113.515640 781.000 +CPAR2_101460-T 1107 907.621 53.693942 671.000 +CPAR2_101470-T 1002 802.621 11.039683 122.000 +CPAR2_101480-T 1776 1576.621 324.162067 7036.912 +CPAR2_101490-T 765 565.676 176.668075 1376.000 +CPAR2_101500-T 738 538.684 26.425875 196.000 +CPAR2_101510-T 2454 2254.621 107.920055 3350.181 +CPAR2_101520-T 2292 2092.621 41.301309 1190.000 +CPAR2_101530-T 3036 2836.621 98.532161 3848.326 +CPAR2_101540-T 744 544.682 4.133576 31.000 +CPAR2_101550-T 2418 2218.621 115.989007 3543.174 +CPAR2_101560-T 4980 4780.621 17.319208 1140.000 +CPAR2_101570-T 1383 1183.621 80.690344 1315.003 +CPAR2_101580-T 999 799.621 58.386597 642.821 +CPAR2_101590-T 1056 856.621 22.976711 271.000 +CPAR2_101600-T 2256 2056.621 46.270478 1310.240 +CPAR2_101610-T 1587 1387.621 78.039443 1491.000 +CPAR2_101620-T 1563 1363.621 1045.175569 19623.458 +CPAR2_101630-T 765 565.676 95.160273 741.167 +CPAR2_101640-T 2502 2302.621 0.456286 14.466 +CPAR2_101650-T 1224 1024.621 147.508199 2081.000 +CPAR2_101660-T 1053 853.621 164.342483 1931.558 +CPAR2_101670-T 384 184.816 94.314491 240.000 +CPAR2_101680-T 1194 994.621 114.036430 1561.687 +CPAR2_101690-T 2475 2275.621 78.132705 2448.079 +CPAR2_101700-T 1602 1402.621 31.896847 616.000 +CPAR2_101710-T 2094 1894.621 26.642187 695.000 +CPAR2_101720-T 1602 1402.621 80.622388 1557.000 +CPAR2_101730-T 2862 2662.621 139.702575 5121.608 +CPAR2_101740-T 1659 1459.621 35.129502 706.000 +CPAR2_101750-T 543 343.750 10.775435 51.000 +CPAR2_101760-T 1812 1612.621 91.365320 2028.646 +CPAR2_101770-T 2541 2341.621 687.178392 22155.352 +CPAR2_101780-T 2085 1885.621 1.098548 28.521 +CPAR2_101790-T 2541 2341.621 187.730465 6052.627 +CPAR2_101800-T 2226 2026.621 82.067343 2290.000 +CPAR2_101810-T 885 685.649 54.658185 516.000 +CPAR2_101820-T 447 247.762 175.004012 597.000 +CPAR2_101830-T 1575 1375.621 47.783321 905.040 +CPAR2_101840-T 387 187.816 257.542406 666.000 +CPAR2_101850-T 1458 1258.621 40.290421 698.215 +CPAR2_101860-T 1731 1531.621 20.200666 426.000 +CPAR2_101870-T 2121 1921.621 51.151130 1353.367 +CPAR2_101880-T 825 625.667 441.807429 3806.000 +CPAR2_101890-T 1161 961.621 0.000000 0.000 +CPAR2_101900-T 2499 2299.621 8.085207 256.000 +CPAR2_101910-T 1623 1423.621 88.973255 1744.000 +CPAR2_101920-T 741 541.683 87.553860 653.000 +CPAR2_101930-T 948 748.635 97.078935 1000.663 +CPAR2_101940-T 7500 7300.621 12.763634 1283.000 +CPAR2_101950-T 1407 1207.621 97.068928 1614.000 +CPAR2_101960-T 1626 1426.621 60.225931 1183.000 +CPAR2_101970-T 897 697.649 44.765025 430.000 +CPAR2_101980-T 1104 904.621 27.056433 337.000 +CPAR2_101990-T 348 148.838 99.545718 204.000 +CPAR2_102000-T 3969 3769.621 294.263632 15273.086 +CPAR2_102010-T 1074 874.621 0.166080 2.000 +CPAR2_102020-T 798 598.669 70.849026 584.000 +CPAR2_102030-T 1149 949.621 77.166805 1008.959 +CPAR2_102040-T 861 661.653 113.536263 1034.325 +CPAR2_102050-T 1605 1405.621 119.589765 2314.488 +CPAR2_102060-T 3186 2986.621 365.557310 15032.393 +CPAR2_tG(UCC)1-T 71 71.000 0.000000 0.000 +CPAR2_102070-T 762 562.678 470.355345 3644.000 +CPAR2_102080-T 1731 1531.621 98.313446 2073.275 +CPAR2_102090-T 1758 1558.621 62.254870 1336.000 +CPAR2_102100-T 1545 1345.621 2.644726 49.000 +CPAR2_102110-T 3657 3457.621 2.310589 110.000 +CPAR2_102120-T 201 12.627 74.772676 13.000 +CPAR2_102130-T 216 20.259 2723.617640 759.742 +CPAR2_102140-T 777 577.671 4.651880 37.000 +CPAR2_102150-T 381 181.817 119.838123 300.000 +CPAR2_102160-T 1377 1177.621 60.687174 984.000 +CPAR2_102170-T 591 391.744 1.668581 9.000 +CPAR2_102180-T 1383 1183.621 23.808192 388.000 +CPAR2_102190-T 3450 3250.621 66.403237 2971.995 +CPAR2_102200-T 1452 1252.621 96.410844 1662.793 +CPAR2_tR(UCU)1-T 73 73.000 0.000000 0.000 +CPAR2_tF(GAA)1-T 73 73.000 0.000000 0.000 +CPAR2_102210-T 1317 1117.621 72.791146 1120.123 +CPAR2_102220-T 2472 2272.621 202.447567 6334.789 +CPAR2_102230-T 1758 1558.621 0.093196 2.000 +CPAR2_102240-T 3624 3424.621 67.000416 3159.239 +CPAR2_102250-T 3609 3409.621 53.231367 2499.000 +CPAR2_102260-T 468 268.755 96.205597 356.000 +CPAR2_102270-T 2790 2590.621 205.079766 7315.083 +CPAR2_102280-T 1275 1075.621 2.768420 41.000 +CPAR2_102290-T 1386 1186.621 32.194455 526.000 +CPAR2_102300-T 1380 1180.621 62.809104 1021.000 +CPAR2_102310-T 2211 2011.621 12.780991 354.000 +CPAR2_102320-T 2262 2062.621 35.352628 1004.000 +CPAR2_102330-T 2583 2383.621 69.544052 2282.389 +CPAR2_102340-T 381 181.817 630.603178 1578.637 +CPAR2_102350-T 3165 2965.621 89.514514 3655.120 +CPAR2_102360-T 444 244.764 145.694565 491.002 +CPAR2_102370-T 1179 979.621 46.559561 628.000 +CPAR2_102380-T 483 283.753 87.025376 340.000 +CPAR2_102390-T 687 487.696 95.012043 638.000 +CPAR2_102400-T 1734 1534.621 36.062948 762.000 +CPAR2_102410-T 1206 1006.621 36.219718 502.000 +CPAR2_102420-T 1194 994.621 11.026220 151.000 +CPAR2_102430-T 1647 1447.621 20.519928 409.000 +CPAR2_102440-T 189 8.749 1029.364423 124.000 +CPAR2_tM(CAU)1-T 72 72.000 0.000000 0.000 +CPAR2_102450-T 423 223.791 211.273828 651.001 +CPAR2_102460-T 540 340.750 30.692595 144.000 +CPAR2_102470-T 588 388.744 258.010027 1380.999 +CPAR2_102480-T 1455 1255.621 35.284067 610.000 +CPAR2_102490-T 129 20.061 0.000000 0.000 +CPAR2_102500-T 492 292.752 47.404282 191.078 +CPAR2_102510-T 129 20.061 10.861180 3.000 +CPAR2_102520-T 129 20.061 0.000000 0.000 +CPAR2_102530-T 1386 1186.621 186.678872 3050.000 +CPAR2_102540-T 1587 1387.621 76.364206 1458.993 +CPAR2_102550-T 2163 1963.621 420.756857 11375.787 +CPAR2_102560-T 2163 1963.621 15.756486 426.000 +CPAR2_102570-T 2160 1960.621 19.410873 524.000 +CPAR2_102580-T 1218 1018.621 9.910818 139.000 +CPAR2_102590-T 1836 1636.621 0.976297 22.000 +CPAR2_102600-T 1722 1522.621 1.097093 23.000 +CPAR2_102610-T 1794 1594.621 90.590927 1989.000 +CPAR2_102620-T 1152 952.621 0.152482 2.000 +CPAR2_102630-T 1851 1651.621 12.709271 289.017 +CPAR2_102640-T 285 85.912 469.187494 555.000 +CPAR2_102650-T 2109 1909.621 36.321486 955.000 +CPAR2_102660-T 237 38.026 223.468867 117.000 +CPAR2_102670-T 660 460.701 83.711025 531.000 +CPAR2_102680-T 1395 1195.621 131.098489 2158.161 +CPAR2_102690-T 2817 2617.621 36.791222 1326.000 +CPAR2_102700-T 4539 4339.621 55.179103 3297.000 +CPAR2_102710-T 552 352.749 79.474788 386.000 +CPAR2_102720-T 1095 895.621 153.591830 1894.022 +CPAR2_102730-T 981 781.623 45.809666 493.000 +CPAR2_102740-T 2541 2341.621 41.003629 1322.000 +CPAR2_102750-T 1944 1744.621 27.309274 656.000 +CPAR2_102760-T 1956 1756.621 49.660114 1201.098 +CPAR2_102770-T 582 382.745 30.171397 159.000 +CPAR2_102780-T 1707 1507.621 393.190594 8161.837 +CPAR2_102790-T 1440 1240.621 3.629610 62.000 +CPAR2_102800-T 3006 2806.621 134.710209 5205.672 +CPAR2_102810-T 537 337.751 65.155951 303.000 +CPAR2_102820-T 3888 3688.621 46.290947 2351.000 +CPAR2_102830-T 999 799.621 89.030454 980.202 +CPAR2_102840-T 576 376.745 38.363047 199.000 +CPAR2_102850-T 882 682.649 17.980286 169.000 +CPAR2_102860-T 339 139.859 78.933117 152.000 +CPAR2_102870-T 723 523.687 32.591451 235.000 +CPAR2_102880-T 2259 2059.621 76.238757 2162.000 +CPAR2_102890-T 183 8.453 29256.042820 3404.894 +CPAR2_102900-T 1269 1069.621 78.086375 1150.000 +CPAR2_102910-T 2172 1972.621 33.373337 906.433 +CPAR2_102920-T 1665 1465.621 108.564232 2190.792 +CPAR2_102930-T 1047 847.621 43.704550 510.060 +CPAR2_102940-T 696 496.693 63.907197 437.049 +CPAR2_102950-T 1437 1237.621 56.923478 970.000 +CPAR2_102960-T 1599 1399.621 61.802877 1191.000 +CPAR2_102970-T 2184 1984.621 26.319089 719.186 +CPAR2_102980-T 600 400.744 94.966688 524.000 +CPAR2_102990-T 3156 2956.621 35.056034 1427.089 +CPAR2_103000-T 876 676.649 249.340664 2323.000 +CPAR2_103010-T 1662 1462.621 156.349190 3148.619 +CPAR2_103020-T 2856 2656.621 15.502541 567.055 +CPAR2_103030-T 288 88.910 106.193578 130.000 +CPAR2_103040-T 192 9.429 1964.189676 255.000 +CPAR2_103050-T 543 343.750 4.436944 21.000 +CPAR2_103060-T 1791 1591.621 30.071366 659.000 +CPAR2_103070-T 1062 862.621 23.490457 279.000 +CPAR2_103080-T 735 535.684 1.220228 9.000 +CPAR2_103090-T 1689 1489.621 60.847984 1248.000 +CPAR2_103100-T 234 35.101 2.069145 1.000 +CPAR2_103110-T 438 238.769 1.216718 4.000 +CPAR2_103120-T 2793 2593.621 38.195773 1364.000 +CPAR2_103130-T 1815 1615.621 39.784251 885.000 +CPAR2_103140-T 1647 1447.621 65.711352 1309.748 +CPAR2_103150-T 1647 1447.621 20.833575 415.252 +CPAR2_103160-T 4965 4765.621 32.038308 2102.237 +CPAR2_103170-T 720 520.687 228.620092 1639.018 +CPAR2_103180-T 435 235.772 947.520286 3075.909 +CPAR2_103190-T 1485 1285.621 34.296802 607.099 +CPAR2_103200-T 1830 1630.621 77.968605 1750.513 +CPAR2_103210-T 2691 2491.621 70.775450 2428.047 +CPAR2_103220-T 348 148.838 73.096007 149.796 +CPAR2_103230-T 906 706.649 52.622753 512.000 +CPAR2_103240-T 921 721.648 187.597923 1864.000 +CPAR2_103250-T 1389 1189.621 24.481787 401.000 +CPAR2_103260-T 2691 2491.621 440.950140 15127.391 +CPAR2_103270-T 654 454.702 184.057103 1152.316 +CPAR2_103280-T 405 205.812 33.171494 94.000 +CPAR2_103290-T 2106 1906.621 94.509060 2481.021 +CPAR2_103300-T 237 38.026 16343.718847 8556.964 +CPAR2_103310-T 2022 1822.621 330.303509 8289.000 +CPAR2_103320-T 330 130.868 5.549759 10.000 +CPAR2_103330-T 1473 1273.621 103.785829 1819.998 +CPAR2_103350-T 2298 2098.621 49.212226 1422.000 +CPAR2_103360-T 1272 1072.621 64.257884 948.998 +CPAR2_103370-T 1836 1636.621 8.564788 193.000 +CPAR2_103380-T 1518 1318.621 58.113431 1055.089 +CPAR2_103390-T 1557 1357.621 38.945763 728.000 +CPAR2_103400-T 3159 2959.621 22.601174 921.000 +CPAR2_103410-T 669 469.699 276.938842 1791.000 +CPAR2_103420-T 516 316.752 145.748201 635.645 +CPAR2_103430-T 531 331.751 102.894778 470.000 +CPAR2_103440-T 1029 829.621 3.414225 39.000 +CPAR2_103450-T 975 775.624 246.176702 2629.000 +CPAR2_103460-T 4362 4162.621 27.218564 1560.000 +CPAR2_103470-T 840 640.661 19.385412 171.000 +CPAR2_103480-T 1707 1507.621 8.237802 171.000 +CPAR2_103490-T 1413 1213.621 14.961126 250.000 +CPAR2_103500-T 492 292.752 15.381498 62.000 +CPAR2_103510-T 2964 2764.621 25.591096 974.130 +CPAR2_103520-T 990 790.622 66.875927 728.000 +CPAR2_103530-T 1488 1288.621 28.124364 499.000 +CPAR2_103540-T 2283 2083.621 61.243565 1757.000 +CPAR2_103550-T 3009 2809.621 89.688231 3469.571 +CPAR2_tK(CUU)1-T 74 74.000 0.000000 0.000 +CPAR2_103560-T 3885 3685.621 9.399726 477.000 +CPAR2_103570-T 1521 1321.621 33.318912 606.304 +CPAR2_103580-T 864 664.652 55.073640 504.000 +CPAR2_103590-T 309 109.900 114.329109 173.000 +CPAR2_103600-T 1002 802.621 7.782071 86.000 +CPAR2_103610-T 1413 1213.621 134.769825 2252.000 +CPAR2_tL(CAA)1-T 83 1.606 0.000000 0.000 +CPAR2_103620-T 567 367.746 108.820575 551.000 +CPAR2_103630-T 3903 3703.621 147.815634 7537.710 +CPAR2_103640-T 2031 1831.621 30.572164 771.000 +CPAR2_103650-T 1680 1480.621 43.068327 878.000 +CPAR2_103660-T 819 619.668 88.064706 751.369 +CPAR2_103670-T 1053 853.621 24.333705 286.000 +CPAR2_103680-T 2025 1825.621 31.468300 791.000 +CPAR2_103690-T 1743 1543.621 9.033748 192.000 +CPAR2_103700-T 1212 1012.621 172.430180 2404.102 +CPAR2_103710-T 1164 964.621 61.567054 817.707 +CPAR2_103720-T 1158 958.621 53.424269 705.145 +CPAR2_103730-T 783 583.670 16.798639 135.000 +CPAR2_103740-T 1734 1534.621 66.020752 1395.000 +CPAR2_103750-T 2121 1921.621 111.356826 2946.301 +CPAR2_103760-T 2685 2485.621 111.479252 3815.237 +CPAR2_103770-T 1023 823.621 56.260107 638.000 +CPAR2_103780-T 564 364.747 51.572193 259.000 +CPAR2_103790-T 444 244.764 139.110660 468.814 +CPAR2_103800-T 237 38.026 955.003245 500.004 +CPAR2_103810-T 2559 2359.621 41.244875 1340.000 +CPAR2_103820-T 729 529.685 46.351872 338.048 +CPAR2_103830-T 2127 1927.621 113.782357 3019.876 +CPAR2_103840-T 1050 850.621 93.408955 1094.000 +CPAR2_103850-T 675 475.697 13.893709 91.000 +CPAR2_103860-T 5865 5665.621 6.127564 478.000 +CPAR2_103870-T 1149 949.621 57.631111 753.529 +CPAR2_103880-T 738 538.684 42.739808 317.000 +CPAR2_103890-T 684 484.697 57.689667 385.000 +CPAR2_103900-T 1011 811.621 75.168051 840.000 +CPAR2_103910-T 1476 1276.621 170.389290 2995.001 +CPAR2_103920-T 1677 1477.621 5.505064 112.000 +CPAR2_103930-T 1227 1027.621 48.554680 687.000 +CPAR2_103940-T 288 88.910 1919.027349 2349.234 +CPAR2_103950-T 1053 853.621 70.108296 824.000 +CPAR2_103960-T 1260 1060.621 138.517599 2022.823 +CPAR2_103970-T 561 361.747 218.041088 1086.015 +CPAR2_103980-T 3021 2821.621 73.730976 2864.450 +CPAR2_103990-T 1515 1315.621 147.650900 2674.604 +CPAR2_104000-T 2853 2653.621 57.311956 2094.000 +CPAR2_104010-T 627 427.738 142.969106 842.000 +CPAR2_104020-T 2298 2098.621 93.846080 2711.707 +CPAR2_104030-T 465 265.756 36.620932 134.000 +CPAR2_104040-T 2046 1846.621 35.218994 895.462 +CPAR2_104050-T 939 739.643 47.427728 483.000 +CPAR2_104060-T 891 691.649 77.822264 741.109 +CPAR2_104070-T 3075 2875.621 78.689368 3115.590 +CPAR2_104080-T 399 199.815 72.695821 200.000 +CPAR2_104090-T 909 709.649 106.260711 1038.267 +CPAR2_104100-T 1077 877.621 82.838909 1001.000 +CPAR2_104110-T 699 499.693 16.569504 114.000 +CPAR2_104120-T 1230 1030.621 13.459896 191.000 +CPAR2_104130-T 654 454.702 316.850776 1983.690 +CPAR2_104135-T 330 130.868 19.424155 35.000 +CPAR2_104140-T 3381 3181.621 24.174360 1059.000 +CPAR2_104150-T 909 709.649 47.385422 463.000 +CPAR2_tM(CAU)2-T 74 74.000 0.000000 0.000 +CPAR2_104160-T 759 559.679 66.571069 513.000 +CPAR2_104170-T 918 718.649 69.064574 683.383 +CPAR2_104180-T 3078 2878.621 33.732954 1337.000 +CPAR2_104190-T 3168 2968.621 407.376273 16651.104 +CPAR2_104195-T 180 9.123 429.889765 54.000 +CPAR2_104200-T 1053 853.621 16.420997 193.000 +CPAR2_104210-T 2169 1969.621 99.376470 2695.000 +CPAR2_104220-T 1485 1285.621 92.591979 1639.000 +CPAR2_104230-T 1026 826.621 41.767980 475.382 +CPAR2_104240-T 1275 1075.621 60.573409 897.086 +CPAR2_tI(AAU)1-T 74 74.000 0.000000 0.000 +CPAR2_104250-T 1071 871.621 58.912337 707.012 +CPAR2_104260-T 909 709.649 26.200147 256.000 +CPAR2_104270-T 957 757.629 4.409698 46.000 +CPAR2_104280-T 3705 3505.621 46.793393 2258.614 +CPAR2_104290-T 942 742.642 299.064148 3057.994 +CPAR2_104300-T 2661 2461.621 29.921580 1014.141 +CPAR2_104310-T 765 565.676 130.067102 1013.043 +CPAR2_104320-T 1152 952.621 18.221540 239.000 +CPAR2_104330-T 1134 934.621 86.179372 1109.000 +CPAR2_104340-T 1431 1231.621 41.160980 698.000 +CPAR2_104350-T 360 160.822 32.064287 71.000 +CPAR2_104360-T 747 547.682 79.642269 600.571 +CPAR2_104370-T 525 325.751 182.602040 819.000 +CPAR2_104380-T 849 649.655 100.951402 903.000 +CPAR2_104390-T 3183 2983.621 61.610673 2531.000 +CPAR2_104400-T 1437 1237.621 0.469472 8.000 +CPAR2_104410-T 549 349.750 98.014968 472.000 +CPAR2_104420-T 4275 4075.621 18.051909 1013.000 +CPAR2_104430-T 1986 1786.621 340.908489 8386.154 +CPAR2_104440-T 555 355.748 949.127989 4649.000 +CPAR2_104450-T 861 661.653 470.978537 4290.655 +CPAR2_104460-T 1002 802.621 99.809590 1103.000 +CPAR2_104470-T 3165 2965.621 35.657688 1456.000 +CPAR2_104480-T 1536 1336.621 30.754986 566.000 +CPAR2_104490-T 660 460.701 154.967868 983.000 +CPAR2_104500-T 1923 1723.621 13.357491 317.000 +CPAR2_104510-T 213 18.486 43.217756 11.000 +CPAR2_104520-T 591 391.744 14.090236 76.000 +CPAR2_104530-T 1122 922.621 44.949005 571.000 +CPAR2_104540-T 1014 814.621 29.599867 332.000 +CPAR2_104550-T 669 469.699 113.972603 737.076 +CPAR2_104560-T 558 358.747 95.556631 472.000 +CPAR2_104570-T 2481 2281.621 93.653081 2942.105 +CPAR2_104580-T 1566 1366.621 68.928570 1297.000 +CPAR2_104590-T 522 322.751 564.069996 2506.647 +CPAR2_104600-T 957 757.629 94.229261 982.957 +CPAR2_104610-T 1599 1399.621 99.839409 1924.000 +CPAR2_104620-T 1383 1183.621 62.649908 1021.000 +CPAR2_104630-T 1671 1471.621 9.080907 184.000 +CPAR2_104640-T 192 9.429 38.513523 5.000 +CPAR2_104660-T 1668 1468.621 76.502733 1546.961 +CPAR2_104670-T 1632 1432.621 98.705653 1947.000 +CPAR2_104680-T 3531 3331.621 99.867497 4581.127 +CPAR2_104690-T 645 445.710 148.936461 914.000 +CPAR2_104700-T 417 217.801 35.680503 107.000 +CPAR2_104710-T 333 133.864 277.244972 511.000 +CPAR2_104720-T 1233 1033.621 18.479991 263.000 +CPAR2_104730-T 1305 1105.621 21.152268 322.000 +CPAR2_104740-T 534 334.751 33.195358 153.000 +CPAR2_104750-T 2184 1984.621 10.942109 299.000 +CPAR2_104760-T 336 136.862 215.982834 407.000 +CPAR2_104770-T 2331 2131.621 33.951648 996.468 +CPAR2_104780-T 954 754.632 21.943577 228.000 +CPAR2_104790-T 1179 979.621 15.124444 204.000 +CPAR2_104800-T 1983 1783.621 27.770853 682.000 +CPAR2_104810-T 1713 1513.621 14.442978 301.000 +CPAR2_104820-T 1335 1135.621 4.604754 72.000 +CPAR2_104830-T 4329 4129.621 20.401013 1159.991 +CPAR2_104840-T 276 76.917 206.790243 219.000 +CPAR2_104850-T 858 658.653 163.562629 1483.314 +CPAR2_104860-T 1458 1258.621 5.958887 103.265 +CPAR2_104870-T 876 676.649 18.114484 168.765 +CPAR2_104880-T 1059 859.621 43.680824 517.000 +CPAR2_104890-T 1188 988.621 33.940596 462.000 +CPAR2_104900-T 2304 2104.621 45.241420 1311.000 +CPAR2_104910-T 1356 1156.621 147.239794 2344.817 +CPAR2_104920-T 1371 1171.621 78.107143 1260.000 +CPAR2_104930-T 1899 1699.621 51.492309 1205.000 +CPAR2_tM(CAU)3-T 72 72.000 0.000000 0.000 +CPAR2_104940-T 1494 1294.621 0.336601 6.000 +CPAR2_104950-T 990 790.622 87.361273 951.000 +CPAR2_104960-T 1305 1105.621 31.531331 480.000 +CPAR2_104970-T 342 142.854 9.151415 18.000 +CPAR2_104980-T 735 535.684 28.607569 211.000 +CPAR2_104990-T 1008 808.621 82.003623 913.000 +CPAR2_105000-T 1482 1282.621 31.426934 555.000 +CPAR2_105010-T 1629 1429.621 109.479736 2155.000 +CPAR2_105020-T 2634 2434.621 16.854836 565.000 +CPAR2_105030-T 1203 1003.621 36.110885 499.000 +CPAR2_105040-T 1116 916.621 33.362127 421.052 +CPAR2_105050-T 1956 1756.621 212.715885 5144.825 +CPAR2_105060-T 558 358.747 402.471829 1988.001 +CPAR2_105070-T 1260 1060.621 259.876996 3795.078 +CPAR2_105080-T 4719 4519.621 52.272781 3252.896 +CPAR2_105090-T 258 58.938 30.807190 25.000 +CPAR2_105100-T 966 766.625 127.896353 1350.000 +CPAR2_105110-T 1170 970.621 179.029160 2392.578 +CPAR2_105120-T 1473 1273.621 116.272689 2038.969 +CPAR2_105130-T 1284 1084.621 32.878411 491.000 +CPAR2_105140-T 3120 2920.621 20.838971 838.000 +CPAR2_105150-T 2610 2410.621 81.253787 2696.902 +CPAR2_105160-T 261 61.934 899.325964 766.894 +CPAR2_105170-T 630 430.726 56.318786 334.000 +CPAR2_105180-T 945 745.640 112.501944 1155.000 +CPAR2_105190-T 2247 2047.621 70.748064 1994.604 +CPAR2_105200-T 1314 1114.621 23.913668 367.000 +CPAR2_105210-T 2802 2602.621 19.087657 684.000 +CPAR2_105220-T 300 100.905 31.669904 44.000 +CPAR2_105230-T 1698 1498.621 71.193013 1469.000 +CPAR2_105240-T 1686 1486.621 35.322011 723.000 +CPAR2_105250-T 1032 832.621 126.445668 1449.586 +CPAR2_105260-T 1269 1069.621 67.765393 998.000 +CPAR2_105270-T 1638 1438.621 1209.740568 23962.452 +CPAR2_105280-T 1212 1012.621 25.318333 353.000 +CPAR2_105290-T 3963 3763.621 9.417192 488.000 +CPAR2_105300-T 2595 2395.621 73.967937 2439.800 +CPAR2_105310-T 528 328.751 205.113803 928.441 +CPAR2_105320-T 843 643.659 80.114307 710.000 +CPAR2_105330-T 759 559.679 28.678764 221.000 +CPAR2_105340-T 1644 1444.621 227.580761 4526.704 +CPAR2_105350-T 1239 1039.621 58.543180 838.000 +CPAR2_105360-T 174 13.039 657.292227 118.000 +CPAR2_105370-T 807 607.668 15.059529 126.000 +CPAR2_105380-T 807 607.668 28.923858 242.000 +CPAR2_105390-T 1941 1741.621 87.907184 2108.000 +CPAR2_105400-T 3492 3292.621 68.181214 3091.000 +CPAR2_105410-T 1974 1774.621 25.537971 624.000 +CPAR2_105420-T 1047 847.621 14.566476 170.000 +CPAR2_105430-T 1323 1123.621 172.329676 2666.076 +CPAR2_105440-T 222 24.450 781.225743 263.000 +CPAR2_105450-T 594 394.744 77.459297 421.000 +CPAR2_105460-T 2790 2590.621 97.125833 3464.425 +CPAR2_105470-T 1785 1585.621 13.008474 284.000 +CPAR2_105480-T 807 607.668 414.575712 3468.670 +CPAR2_105490-T 2757 2557.621 65.369713 2302.000 +CPAR2_105500-T 915 715.649 142.189663 1401.073 +CPAR2_105510-T 1224 1024.621 36.220938 510.994 +CPAR2_105520-T 5478 5278.621 222.075032 16140.342 +CPAR2_105530-T 2160 1960.621 202.202746 5458.500 +CPAR2_105540-T 1692 1492.621 32.747108 673.000 +CPAR2_105550-T 1218 1018.621 224.214066 3144.620 +CPAR2_105560-T 2709 2509.621 100.393040 3469.000 +CPAR2_105570-T 651 451.704 41.965625 261.000 +CPAR2_105580-T 2136 1936.621 6.300457 168.000 +CPAR2_105590-T 2127 1927.621 105.010681 2787.069 +CPAR2_105600-T 243 43.969 147.009748 89.000 +CPAR2_105610-T 2817 2617.621 45.392488 1636.000 +CPAR2_105620-T 903 703.649 155.754947 1509.005 +CPAR2_105630-T 2523 2323.621 51.092114 1634.601 +CPAR2_105640-T 1497 1297.621 6.100789 109.000 +CPAR2_105650-T 345 145.846 208.653604 419.000 +CPAR2_105660-T 1191 991.621 54.418983 743.000 +CPAR2_105670-T 2232 2032.621 27.048731 757.000 +CPAR2_105680-T 972 772.624 115.436845 1228.019 +CPAR2_105690-T 945 745.640 1500.460794 15404.465 +CPAR2_105700-T 1371 1171.621 24.176021 390.000 +CPAR2_105710-T 2148 1948.621 16.548667 444.000 +CPAR2_105720-T 408 208.809 98.203367 282.338 +CPAR2_105730-T 2436 2236.621 45.201649 1392.000 +CPAR2_105740-T 540 340.750 36.234314 170.000 +CPAR2_105750-T 1353 1153.621 0.472178 7.500 +CPAR2_105760-T 3282 3082.621 2.473869 105.000 +CPAR2_105770-T 948 748.635 82.850473 854.000 +CPAR2_105780-T 1191 991.621 51.782263 707.000 +CPAR2_105790-T 315 115.897 36.973103 59.000 +CPAR2_105800-T 2256 2056.621 43.633430 1235.567 +CPAR2_105810-T 1485 1285.621 44.332842 784.750 +CPAR2_105820-T 318 118.893 97.739711 160.000 +CPAR2_105830-T 459 259.757 132.251638 473.000 +CPAR2_105840-T 1395 1195.621 58.011914 955.000 +CPAR2_105850-T 1437 1237.621 42.863326 730.409 +CPAR2_tP(UGG)1-T 72 72.000 0.000000 0.000 +CPAR2_105860-T 3072 2872.621 24.912761 985.355 +CPAR2_105870-T 366 166.819 221.605648 509.000 +CPAR2_105880-T 1350 1150.621 23.922924 379.000 +CPAR2_105890-T 2157 1957.621 17.548498 473.000 +CPAR2_105900-T 1038 838.621 80.715598 932.000 +CPAR2_105910-T 684 484.697 153.288924 1022.995 +CPAR2_105920-T 3879 3679.621 50.410996 2554.000 +CPAR2_105930-T 966 766.625 49.074304 518.000 +CPAR2_105940-T 1941 1741.621 54.475713 1306.319 +CPAR2_105950-T 4389 4189.621 23.940125 1381.000 +CPAR2_105960-T 429 229.782 306.594079 970.000 +CPAR2_105970-T 609 409.744 553.501879 3122.660 +CPAR2_105980-T 333 133.864 56.425591 104.000 +CPAR2_105990-T 1257 1057.621 72.105259 1050.001 +CPAR2_106000-T 1275 1075.621 47.603314 705.000 +CPAR2_106010-T 1641 1441.621 70.430936 1398.000 +CPAR2_106015-T 387 187.816 101.702161 263.000 +CPAR2_106020-T 540 340.750 127.246384 597.000 +CPAR2_106030-T 1356 1156.621 23.045299 367.000 +CPAR2_106040-T 1107 907.621 156.920879 1961.002 +CPAR2_106050-T 1431 1231.621 60.208277 1021.000 +CPAR2_106060-T 2319 2119.621 52.116883 1521.000 +CPAR2_106070-T 324 124.880 727.568057 1251.000 +CPAR2_106080-T 891 691.649 168.892941 1608.385 +CPAR2_106090-T 741 541.683 49.743464 371.000 +CPAR2_106100-T 603 403.744 280.084819 1557.000 +CPAR2_106110-T 1560 1360.621 158.706715 2973.207 +CPAR2_106120-T 1398 1198.621 441.935865 7293.463 +CPAR2_106130-T 1515 1315.621 122.278732 2215.003 +CPAR2_106140-T 2016 1816.621 376.563887 9418.800 +CPAR2_106150-T 492 292.752 58.303310 235.010 +CPAR2_106160-T 951 751.633 103.778218 1074.000 +CPAR2_106170-T 1098 898.621 328.622747 4065.995 +CPAR2_106180-T 990 790.622 101.232517 1102.000 +CPAR2_106190-T 810 610.668 26.522058 223.000 +CPAR2_106200-T 642 442.713 47.903588 292.000 +CPAR2_106210-T 750 550.682 427.450467 3241.000 +CPAR2_106220-T 1857 1657.621 46.312386 1057.000 +CPAR2_106230-T 2628 2428.621 90.359864 3021.537 +CPAR2_106240-T 705 505.690 6.606647 46.000 +CPAR2_106250-T 1086 886.621 93.302442 1139.000 +CPAR2_106260-T 873 673.649 275.248202 2553.000 +CPAR2_106270-T 2745 2545.621 42.140019 1477.002 +CPAR2_106280-T 1047 847.621 41.300244 482.000 +CPAR2_106290-T 357 157.823 23.009438 50.000 +CPAR2_106300-T 315 115.897 116.559273 186.000 +CPAR2_106310-T 1617 1417.621 134.690770 2629.000 +CPAR2_106320-T 384 184.816 189.807913 483.000 +CPAR2_tR(CCG)1-T 74 74.000 0.000000 0.000 +CPAR2_106330-T 765 565.676 268.982280 2095.000 +CPAR2_106340-T 1716 1516.621 1.723982 36.000 +CPAR2_106350-T 2784 2584.621 7.755676 276.000 +CPAR2_106360-T 555 355.748 3.470677 17.000 +CPAR2_106370-T 2214 2014.621 14.962016 415.027 +CPAR2_106380-T 1263 1063.621 127.623305 1869.001 +CPAR2_106390-T 1005 805.621 87.722664 973.050 +CPAR2_106400-T 5730 5530.621 147.920221 11264.034 +CPAR2_106410-T 1860 1660.621 52.810084 1207.480 +CPAR2_106420-T 1035 835.621 50.845338 584.996 +CPAR2_106430-T 558 358.747 109.252742 539.652 +CPAR2_106440-T 663 463.700 390.630902 2494.000 +CPAR2_106450-T 510 310.752 502.729279 2151.000 +CPAR2_106460-T 762 562.678 56.148347 435.000 +CPAR2_106470-T 1932 1732.621 53.948784 1286.998 +CPAR2_106480-T 510 310.752 77.360944 331.000 +CPAR2_106490-T 690 490.696 107.009999 722.984 +CPAR2_106500-T 1656 1456.621 4.487488 90.000 +CPAR2_106510-T 2463 2263.621 110.766749 3452.277 +CPAR2_106520-T 1020 820.621 61.599033 696.000 +CPAR2_106530-T 951 751.633 140.985548 1459.058 +CPAR2_106540-T 1254 1054.621 105.852926 1537.064 +CPAR2_106550-T 1491 1291.621 197.312974 3509.000 +CPAR2_106560-T 174 13.039 6645.335823 1193.000 +CPAR2_106570-T 2421 2221.621 82.387086 2520.123 +CPAR2_106580-T 2820 2620.621 79.542539 2870.095 +CPAR2_106590-T 801 601.669 110.451411 915.000 +CPAR2_106600-T 603 403.744 236.731935 1316.000 +CPAR2_106610-T 516 316.752 79.705997 347.618 +CPAR2_106620-T 1395 1195.621 52.484077 864.000 +CPAR2_106630-T 1080 880.621 83.381445 1011.000 +CPAR2_106640-T 4374 4174.621 21.888410 1258.125 +CPAR2_106650-T 726 526.686 20.408812 148.000 +CPAR2_106660-T 879 679.649 53.110337 497.000 +CPAR2_106670-T 1746 1546.621 17.515895 373.000 +CPAR2_106680-T 1737 1537.621 22.024217 466.275 +CPAR2_106690-T 1788 1588.621 515.312717 11271.553 +CPAR2_106700-T 1776 1576.621 19.759475 428.939 +CPAR2_106710-T 1113 913.621 30.764666 387.000 +CPAR2_106720-T 1461 1261.621 38.978985 677.099 +CPAR2_106730-T 1524 1324.621 6.637634 121.059 +CPAR2_106740-T 1446 1246.621 185.528137 3184.468 +CPAR2_106750-T 2160 1960.621 53.228334 1436.908 +CPAR2_106760-T 1491 1291.621 74.168086 1319.000 +CPAR2_106770-T 903 703.649 164.321482 1592.000 +CPAR2_106780-T 732 532.685 40.357914 296.000 +CPAR2_106790-T 498 298.752 156.317397 643.000 +CPAR2_106800-T 576 376.745 345.992929 1794.763 +CPAR2_106810-T 1167 967.621 46.011089 613.000 +CPAR2_106820-T 1485 1285.621 21.182277 374.954 +CPAR2_106830-T 741 541.683 106.459058 794.000 +CPAR2_106840-T 576 376.745 50.315353 261.000 +CPAR2_106850-T 657 457.702 98.858321 623.000 +CPAR2_106860-T 1398 1198.621 23.328467 385.000 +CPAR2_106870-T 1221 1021.621 47.844562 673.000 +CPAR2_106880-T 2175 1975.621 107.144434 2914.512 +CPAR2_106890-T 1161 961.621 75.602726 1001.000 +CPAR2_106900-T 1884 1684.621 280.020121 6495.073 +CPAR2_106910-T 1215 1015.621 11.727880 164.000 +CPAR2_106920-T 1317 1117.621 11.892246 183.000 +CPAR2_106930-T 642 442.713 114.591581 698.502 +CPAR2_106940-T 1941 1741.621 117.365230 2814.399 +CPAR2_106950-T 393 193.816 288.167035 769.000 +CPAR2_106960-T 2010 1810.621 189.873546 4733.524 +CPAR2_106970-T 645 445.710 113.168608 694.498 +CPAR2_106980-T 765 565.676 119.019844 927.000 +CPAR2_106990-T 1206 1006.621 5.411312 75.000 +CPAR2_107000-T 1275 1075.621 11.883948 176.000 +CPAR2_107010-T 411 211.806 38.816424 113.200 +CPAR2_107020-T 312 112.898 474.539962 737.655 +CPAR2_107030-T 597 397.744 194.428994 1064.774 +CPAR2_107040-T 873 673.649 32.559718 302.000 +CPAR2_107050-T 591 391.744 151.470036 817.000 +CPAR2_107060-T 1338 1138.621 36.230681 568.000 +CPAR2_107070-T 810 610.668 174.474704 1467.000 +CPAR2_107080-T 3123 2923.621 26.670851 1073.620 +CPAR2_107090-T 396 196.816 450.940451 1222.000 +CPAR2_107100-T 393 193.816 424.577917 1133.025 +CPAR2_107110-T 930 730.645 41.649991 419.000 +CPAR2_107120-T 822 622.667 27.527290 236.000 +CPAR2_107130-T 2535 2335.621 72.568857 2333.701 +CPAR2_107140-T 636 436.717 133.709978 804.000 +CPAR2_107150-T 957 757.629 10.832520 113.000 +CPAR2_107160-T 849 649.655 526.375171 4708.372 +CPAR2_107170-T 1245 1045.621 82.101391 1182.000 +CPAR2_107180-T 648 448.708 11.977759 74.000 +CPAR2_107190-T 1089 889.621 9.878424 121.000 +CPAR2_107200-T 408 208.809 4.173871 12.000 +CPAR2_107210-T 2100 1900.621 55.638226 1456.000 +CPAR2_107220-T 2010 1810.621 19.173781 478.000 +CPAR2_107230-T 1563 1363.621 0.053262 1.000 +CPAR2_107240-T 1407 1207.621 141.754315 2357.000 +CPAR2_107250-T 861 661.653 92.644565 844.000 +CPAR2_107260-T 915 715.649 82.305385 811.000 +CPAR2_107270-T 999 799.621 76.568592 843.000 +CPAR2_107280-T 2904 2704.621 66.057603 2459.924 +CPAR2_107290-T 2964 2764.621 87.350119 3325.000 +CPAR2_107300-T 1281 1081.621 106.697963 1589.000 +CPAR2_107310-T 1542 1342.621 176.621445 3265.047 +CPAR2_107320-T 2748 2548.621 45.538526 1598.000 +CPAR2_107330-T 1059 859.621 27.458932 325.000 +CPAR2_107340-T 1236 1036.621 59.623421 851.000 +CPAR2_107350-T 1161 961.621 0.200659 2.657 +CPAR2_107360-T 729 529.685 0.000000 0.000 +CPAR2_tT(AGU)1-T 73 73.000 0.000000 0.000 +CPAR2_107370-T 1422 1222.621 15.979669 269.000 +CPAR2_107380-T 1209 1009.621 1.438729 20.000 +CPAR2_107390-T 3327 3127.621 90.595640 3901.341 +CPAR2_107400-T 1200 1000.621 42.316162 583.000 +CPAR2_107410-T 750 550.682 106.038314 804.000 +CPAR2_107420-T 4065 3865.621 33.048674 1759.000 +CPAR2_107430-T 1245 1045.621 27.644969 398.000 +CPAR2_107440-T 402 202.813 68.398228 191.000 +CPAR2_107450-T 699 499.693 39.970296 275.000 +CPAR2_107460-T 408 208.809 1958.936816 5632.000 +CPAR2_107470-T 747 547.682 64.581477 487.000 +CPAR2_107480-T 1113 913.621 6.598107 83.000 +CPAR2_107490-T 5163 4963.621 14.545061 994.046 +CPAR2_107500-T 654 454.702 99.031339 620.000 +CPAR2_107510-T 1689 1489.621 107.654125 2208.000 +CPAR2_107520-T 1920 1720.621 88.226523 2090.148 +CPAR2_107530-T 231 32.238 1194.040546 530.000 +CPAR2_107540-T 750 550.682 13.056957 99.000 +CPAR2_107550-T 456 256.758 102.963859 364.000 +CPAR2_107560-T 1101 901.621 50.184700 623.000 +CPAR2_107570-T 915 715.649 0.913377 9.000 +CPAR2_107580-T 1161 961.621 21.551174 285.343 +CPAR2_tN(GUU)1-T 74 74.000 0.000000 0.000 +CPAR2_107590-T 495 295.752 143.414180 584.000 +CPAR2_107600-T 1059 859.621 210.052203 2486.148 +CPAR2_107610-T 1536 1336.621 43.741632 805.000 +CPAR2_107620-T 2181 1981.621 18.362193 501.000 +CPAR2_107630-T 249 49.950 1712.837563 1178.000 +CPAR2_107640-T 2232 2032.621 102.370786 2865.003 +CPAR2_107650-T 744 544.682 79.071303 593.000 +CPAR2_107660-T 1125 925.621 7.532608 96.000 +CPAR2_107670-T 1170 970.621 33.148308 443.000 +CPAR2_107680-T 4320 4120.621 43.386630 2461.564 +CPAR2_107690-T 2196 1996.621 167.659795 4609.111 +CPAR2_107700-T 2247 2047.621 93.967357 2649.227 +CPAR2_107710-T 480 280.753 43.718922 169.000 +CPAR2_107720-T 546 346.750 293.446978 1401.000 +CPAR2_107730-T 564 364.747 28.872463 145.000 +CPAR2_107740-T 1701 1501.621 48.076567 994.000 +CPAR2_107750-T 3720 3520.621 13.512307 655.000 +CPAR2_107760-T 2130 1930.621 17.681058 470.000 +CPAR2_107770-T 1827 1627.621 69.209533 1551.000 +CPAR2_107780-T 639 439.715 13.378933 81.000 +CPAR2_107790-T 1047 847.621 103.440944 1207.221 +CPAR2_107800-T 1707 1507.621 51.257432 1064.000 +CPAR2_107810-T 2052 1852.621 30.039001 766.240 +CPAR2_107820-T 1959 1759.621 46.104310 1117.000 +CPAR2_107830-T 726 526.686 24.545734 178.000 +CPAR2_107840-T 1917 1717.621 91.247231 2157.941 +CPAR2_107850-T 1902 1702.621 26.404629 619.000 +CPAR2_107860-T 1344 1144.621 82.106950 1294.000 +CPAR2_107870-T 588 388.744 83.325548 446.000 +CPAR2_107880-T 489 289.753 66.424150 265.000 +CPAR2_107890-T 1215 1015.621 80.664929 1128.000 +CPAR2_107900-T 1311 1111.621 239.379698 3663.842 +CPAR2_107910-T 1614 1414.621 90.155411 1756.000 +CPAR2_107920-T 267 67.926 179.630736 168.000 +CPAR2_107930-T 237 38.026 385.818044 202.000 +CPAR2_107940-T 1299 1099.621 708.060090 10720.272 +CPAR2_107950-T 1173 973.621 40.282012 540.000 +CPAR2_107960-T 1263 1063.621 5.462739 80.000 +CPAR2_107970-T 1098 898.621 45.422084 562.000 +CPAR2_107980-T 777 577.671 8.172221 65.000 +CPAR2_107990-T 894 694.649 17.146907 164.000 +CPAR2_108000-T 1011 811.621 18.076127 202.000 +CPAR2_108010-T 1725 1525.621 10.806538 227.000 +CPAR2_108020-T 606 406.744 81.602241 457.000 +CPAR2_108030-T 2316 2116.621 60.940680 1776.000 +CPAR2_108040-T 1197 997.621 111.168253 1527.000 +CPAR2_108050-T 2682 2482.621 16.997034 581.000 +CPAR2_108060-T 1776 1576.621 23.677902 514.000 +CPAR2_108070-T 1689 1489.621 25.304570 519.000 +CPAR2_108080-T 924 724.648 142.826232 1425.041 +CPAR2_108090-T 1338 1138.621 79.711181 1249.658 +CPAR2_108100-T 4026 3826.621 38.771233 2042.761 +CPAR2_108120-T 531 331.751 48.484749 221.467 +CPAR2_108130-T 2004 1804.621 22.060825 548.151 +CPAR2_108140-T 1062 862.621 492.319347 5847.357 +CPAR2_108150-T 270 70.923 3.072125 3.000 +CPAR2_108170-T 3807 3607.621 86.376094 4290.491 +CPAR2_108180-T 2691 2491.621 164.355551 5638.439 +CPAR2_108190-T 2670 2470.621 52.973187 1802.000 +CPAR2_108200-T 270 70.923 621.593393 607.000 +CPAR2_108210-T 1644 1444.621 12.116314 241.000 +CPAR2_108220-T 1656 1456.621 0.747915 15.000 +CPAR2_108230-T 996 796.622 3227.605388 35401.772 +CPAR2_108240-T 861 661.653 97.584145 889.000 +CPAR2_108260-T 999 799.621 49.141955 541.040 +CPAR2_108270-T 3855 3655.621 21.417317 1078.000 +CPAR2_108280-T 1035 835.621 1256.637440 14458.128 +CPAR2_108290-T 492 292.752 70.276861 283.273 +CPAR2_108300-T 558 358.747 63.771904 315.000 +CPAR2_108320-T 996 796.622 0.435828 4.780 +CPAR2_108330-T 270 70.923 785.440086 767.000 +CPAR2_108340-T 1638 1438.621 1.817454 36.000 +CPAR2_108350-T 1626 1426.621 0.560004 11.000 +CPAR2_108360-T 1632 1432.621 0.152817 3.014 +CPAR2_108370-T 1632 1432.621 502.686414 9915.647 +CPAR2_108380-T 2217 2017.621 112.275039 3119.000 +CPAR2_108390-T 2112 1912.621 101.122914 2662.999 +CPAR2_108400-T 4203 4003.621 12.504041 689.280 +CPAR2_108410-T 2550 2350.621 25.428730 823.000 +CPAR2_108420-T 1053 853.621 65.769069 773.000 +CPAR2_108430-T 810 610.668 47.915145 402.875 +CPAR2_108440-T 192 9.429 1078.378646 140.000 +CPAR2_108450-T 1050 850.621 71.443948 836.747 +CPAR2_108460-T 468 268.755 450.745116 1667.941 +CPAR2_108470-T 2016 1816.621 65.449530 1637.056 +CPAR2_108480-T 480 280.753 157.284643 608.000 +CPAR2_108490-T 1035 835.621 366.750203 4219.611 +CPAR2_108500-T 1752 1552.621 52.999510 1133.000 +CPAR2_108510-T 435 235.772 111.863350 363.139 +CPAR2_108520-T 678 478.697 9.406728 62.000 +CPAR2_108530-T 972 772.624 141.943746 1510.000 +CPAR2_108540-T 1734 1534.621 61.823253 1306.308 +CPAR2_108550-T 843 643.659 19.859309 176.000 +CPAR2_108560-T 1302 1102.621 251.619654 3820.001 +CPAR2_108570-T 3540 3340.621 110.248964 5071.008 +CPAR2_108580-T 1209 1009.621 54.887505 763.000 +CPAR2_108590-T 813 613.668 675.704762 5709.299 +CPAR2_108600-T 1698 1498.621 73.034630 1507.000 +CPAR2_108610-T 429 229.782 35.084477 111.000 +CPAR2_108620-T 1227 1027.621 24.383355 345.000 +CPAR2_108630-T 1956 1756.621 18.274757 442.000 +CPAR2_108640-T 1131 931.621 38.884616 498.781 +CPAR2_108650-T 924 724.648 128.690270 1284.000 +CPAR2_108660-T 1776 1576.621 29.159750 633.000 +CPAR2_108670-T 1407 1207.621 61.825811 1028.000 +CPAR2_108680-T 1296 1096.621 91.131647 1376.000 +CPAR2_108690-T 1449 1249.621 182.615218 3142.013 +CPAR2_108700-T 1620 1420.621 34.406795 673.000 +CPAR2_108710-T 837 637.664 184.059090 1616.000 +CPAR2_108720-T 2649 2449.621 92.849742 3131.642 +CPAR2_108740-T 1953 1753.621 111.034472 2680.934 +CPAR2_108750-T 4212 4012.621 16.584221 916.254 +CPAR2_108760-T 1863 1663.621 52.231990 1196.420 +CPAR2_108770-T 1941 1741.621 27.606525 662.000 +CPAR2_108780-T 1062 862.621 94.247598 1119.394 +CPAR2_108790-T 1458 1258.621 182.289696 3159.001 +CPAR2_108800-T 1095 895.621 13.542521 167.000 +CPAR2_108810-T 1443 1243.621 32.529285 557.000 +CPAR2_108820-T 3786 3586.621 47.445451 2343.002 +CPAR2_108830-T 2874 2674.621 101.748706 3747.000 +CPAR2_108840-T 1383 1183.621 50.623089 825.000 +CPAR2_108850-T 2772 2572.621 27.130327 961.000 +CPAR2_108860-T 1896 1696.621 112.440680 2626.642 +CPAR2_108870-T 987 787.623 22.130972 240.000 +CPAR2_108880-T 1665 1465.621 61.654100 1244.160 +CPAR2_tT(CGU)1-T 72 72.000 0.000000 0.000 +CPAR2_108890-T 3282 3082.621 4.335160 184.000 +CPAR2_108900-T 1263 1063.621 114.102953 1671.000 +CPAR2_108910-T 1080 880.621 246.350521 2987.000 +CPAR2_108915-T 234 35.101 405.552452 196.000 +CPAR2_108920-T 501 301.752 53.914481 224.000 +CPAR2_108930-T 753 553.681 66.767569 509.000 +CPAR2_108940-T 3486 3286.621 19.932620 902.000 +CPAR2_108950-T 393 193.816 156.388762 417.338 +CPAR2_108960-T 567 367.746 108.030589 547.000 +CPAR2_108970-T 834 634.664 139.430438 1218.412 +CPAR2_108980-T 498 298.752 140.515482 578.000 +CPAR2_108990-T 1719 1519.621 31.448360 658.000 +CPAR2_109000-T 1431 1231.621 113.642939 1927.135 +CPAR2_109010-T 546 346.750 33.512860 160.000 +CPAR2_109020-T 621 421.743 331.849871 1927.000 +CPAR2_109030-T 864 664.652 41.851595 383.000 +CPAR2_109040-T 849 649.655 48.742870 436.000 +CPAR2_109060-T 3066 2866.621 16.696391 659.000 +CPAR2_109070-T 480 280.753 77.348862 299.000 +CPAR2_109080-T 2178 1978.621 137.359376 3742.084 +CPAR2_109090-T 3816 3616.621 45.802694 2280.797 +CPAR2_109100-T 2004 1804.621 16.213005 402.849 +CPAR2_109110-T 579 379.745 79.281970 414.533 +CPAR2_109120-T 1629 1429.621 32.056480 631.000 +CPAR2_109130-T 474 274.755 13.745663 52.000 +CPAR2_109140-T 864 664.652 25.242085 231.000 +CPAR2_109150-T 1194 994.621 123.418488 1690.171 +CPAR2_109160-T 1818 1618.621 45.364214 1011.000 +CPAR2_109170-T 264 64.930 63.758464 57.000 +CPAR2_109180-T 1641 1441.621 161.276069 3201.206 +CPAR2_109190-T 1986 1786.621 82.940820 2040.297 +CPAR2_109200-T 1467 1267.621 118.094320 2061.157 +CPAR2_109210-T 1026 826.621 85.138232 969.000 +CPAR2_109220-T 1716 1516.621 112.952454 2358.660 +CPAR2_109230-T 3048 2848.621 67.487388 2646.975 +CPAR2_109240-T 1425 1225.621 178.230157 3007.669 +CPAR2_109250-T 747 547.682 147.065418 1109.000 +CPAR2_109260-T 681 481.697 316.631252 2100.004 +CPAR2_109270-T 2028 1828.621 861.057835 21679.467 +CPAR2_109280-T 690 490.696 727.624439 4916.000 +CPAR2_109290-T 1956 1756.621 46.435633 1123.109 +CPAR2_109300-T 1740 1540.621 40.872451 867.000 +CPAR2_109310-T 1554 1354.621 113.517227 2117.250 +CPAR2_109320-T 3468 3268.621 28.117013 1265.395 +CPAR2_109330-T 576 376.745 54.363715 282.000 +CPAR2_109340-T 522 322.751 44.105820 196.000 +CPAR2_109350-T 531 331.751 33.495534 153.000 +CPAR2_109360-T 3687 3487.621 83.902607 4029.000 +CPAR2_109370-T 822 622.667 46.539782 399.000 +CPAR2_109380-T 612 412.744 515.856842 2931.587 +CPAR2_109390-T 1002 802.621 127.503664 1409.048 +CPAR2_109400-T 741 541.683 1235.610360 9215.511 +CPAR2_109410-T 2514 2314.621 20.552699 655.000 +CPAR2_109420-T 975 775.624 147.013093 1570.000 +CPAR2_109430-T 492 292.752 39.942276 161.000 +CPAR2_109440-T 4437 4237.621 15.992527 933.108 +CPAR2_109450-T 1437 1237.621 43.836947 747.000 +CPAR2_109470-T 1002 802.621 92.837544 1025.952 +CPAR2_109480-T 795 595.669 167.947988 1377.438 +CPAR2_109490-T 1146 946.621 139.254072 1815.000 +CPAR2_109500-T 1665 1465.621 101.645692 2051.178 +CPAR2_109510-T 2136 1936.621 154.561546 4121.342 +CPAR2_109520-T 1734 1534.621 23.910956 505.232 +CPAR2_109530-T 1149 949.621 45.965446 601.000 +CPAR2_109540-T 1653 1453.621 351.046491 7026.005 +CPAR2_109545-T 468 268.755 27.294284 101.000 +CPAR2_109550-T 750 550.682 48.936932 371.048 +CPAR2_109560-T 1641 1441.621 155.120044 3079.014 +CPAR2_109570-T 735 535.684 44.199377 326.000 +CPAR2_109580-T 2421 2221.621 45.277897 1384.997 +CPAR2_109590-T 3552 3352.621 54.665188 2523.410 +CPAR2_109600-T 2466 2266.621 218.702551 6825.356 +CPAR2_109610-T 1428 1228.621 97.774350 1654.000 +CPAR2_109620-T 1773 1573.621 9.046140 196.000 +CPAR2_109630-T 603 403.744 379.922375 2112.000 +CPAR2_109640-T 966 766.625 635.177712 6704.569 +CPAR2_109650-T 1374 1174.621 256.786109 4153.000 +CPAR2_109660-T 1701 1501.621 298.250266 6166.430 +CPAR2_109670-T 2139 1939.621 43.460110 1160.647 +CPAR2_109680-T 4779 4579.621 6.105745 385.000 +CPAR2_109690-T 1587 1387.621 20.779240 397.002 +CPAR2_109700-T 900 700.649 31.615983 305.000 +CPAR2_109710-T 558 358.747 83.409601 412.000 +CPAR2_109720-T 879 679.649 41.569257 389.000 +CPAR2_109730-T 1287 1087.621 36.393704 545.000 +CPAR2_109740-T 447 247.762 408.342695 1393.000 +CPAR2_109750-T 1884 1684.621 29.790874 691.000 +CPAR2_109760-T 2241 2041.621 75.819040 2131.307 +CPAR2_109770-T 1377 1177.621 16.898664 274.000 +CPAR2_109780-T 2001 1801.621 18.060182 448.000 +CPAR2_109790-T 2490 2290.621 43.005456 1356.342 +CPAR2_109800-T 2511 2311.621 419.533330 13352.902 +CPAR2_109810-T 2229 2029.621 36.070571 1008.000 +CPAR2_109830-T 909 709.649 106.257600 1038.236 +CPAR2_109840-T 2223 2023.621 103.467227 2882.867 +CPAR2_109850-T 1500 1300.621 236.097610 4228.000 +CPAR2_109860-T 6864 6664.621 31.910034 2928.163 +CPAR2_109870-T 915 715.649 86.973754 857.000 +CPAR2_109880-T 594 394.744 45.077267 245.000 +CPAR2_109890-T 654 454.702 52.390771 328.000 +CPAR2_109900-T 1473 1273.621 11.519099 202.000 +CPAR2_109910-T 933 733.645 133.051884 1344.000 +CPAR2_109920-T 1767 1567.621 19.829424 428.000 +CPAR2_109930-T 1755 1555.621 49.469898 1059.589 +CPAR2_109940-T 270 70.923 359.438683 351.000 +CPAR2_109950-T 2970 2770.621 72.717140 2774.000 +CPAR2_109960-T 1062 862.621 68.511105 813.718 +CPAR2_109970-T 468 268.755 673.168014 2490.997 +CPAR2_109980-T 3129 2929.621 46.037096 1857.000 +CPAR2_109990-T 1962 1762.621 21.138095 513.000 +CPAR2_110000-T 369 169.818 80.404630 188.000 +CPAR2_110010-T 4284 4084.621 72.048825 4052.016 +CPAR2_110020-T 3765 3565.621 64.189566 3151.317 +CPAR2_110030-T 864 664.652 42.144154 385.677 +CPAR2_110040-T 627 427.738 203.589354 1199.016 +CPAR2_110050-T 1956 1756.621 19.349743 468.000 +CPAR2_110060-T 1593 1393.621 14.124218 271.020 +CPAR2_110070-T 2034 1834.621 37.133330 938.000 +CPAR2_110080-T 1020 820.621 22.568611 255.000 +CPAR2_110090-T 399 199.815 42.163576 116.000 +CPAR2_110100-T 942 742.642 94.178998 963.000 +CPAR2_110110-T 456 256.758 177.075207 626.000 +CPAR2_110120-T 1377 1177.621 13.383249 217.000 +CPAR2_110130-T 1302 1102.621 13.832492 210.000 +CPAR2_110140-T 312 112.898 152.464227 237.000 +CPAR2_110150-T 852 652.654 92.572418 831.873 +CPAR2_110160-T 1722 1522.621 6.725657 141.000 +CPAR2_110170-T 792 592.669 10.062118 82.110 +CPAR2_110180-T 1974 1774.621 34.173407 835.000 +CPAR2_110190-T 786 586.669 210.527987 1700.573 +CPAR2_110200-T 2316 2116.621 110.155207 3210.264 +CPAR2_110210-T 1401 1201.621 130.796719 2163.999 +CPAR2_110220-T 1758 1558.621 107.454889 2306.000 +CPAR2_110230-T 798 598.669 71.576927 590.000 +CPAR2_110240-T 2895 2695.621 98.773110 3665.980 +CPAR2_110250-T 609 409.744 43.072563 243.000 +CPAR2_110260-T 4341 4141.621 58.974463 3363.000 +CPAR2_110270-T 2364 2164.621 45.530814 1357.000 +CPAR2_110280-T 603 403.744 39.215472 218.000 +CPAR2_110290-T 771 571.671 205.665105 1618.824 +CPAR2_110300-T 4392 4192.621 59.406971 3429.379 +CPAR2_110310-T 531 331.751 167.628475 765.689 +CPAR2_110320-T 1305 1105.621 235.512304 3585.193 +CPAR2_110330-T 3105 2905.621 68.038795 2722.000 +CPAR2_110340-T 1746 1546.621 54.845442 1167.931 +CPAR2_110350-T 543 343.750 123.811865 586.000 +CPAR2_110360-T 3117 2917.621 57.921897 2326.828 +CPAR2_110370-T 1941 1741.621 108.357399 2598.393 +CPAR2_110380-T 1848 1648.621 214.667976 4872.824 +CPAR2_110390-T 3486 3286.621 56.953080 2577.267 +CPAR2_110400-T 2001 1801.621 338.728970 8402.497 +CPAR2_110410-T 1872 1672.621 70.042658 1613.068 +CPAR2_110420-T 888 688.649 215.945183 2047.548 +CPAR2_110430-T 1152 952.621 175.888532 2307.015 +CPAR2_110440-T 1851 1651.621 128.085689 2912.753 +CPAR2_110450-T 1170 970.621 73.704477 985.000 +CPAR2_110460-T 1029 829.621 94.810406 1083.000 +CPAR2_110470-T 1266 1066.621 191.884281 2818.008 +CPAR2_110480-T 1878 1678.621 11.552235 267.000 +CPAR2_110490-T 2175 1975.621 13.638848 371.000 +CPAR2_300010-T 4499 4299.621 10.226470 605.408 +CPAR2_300020-T 1044 844.621 21.342970 248.204 +CPAR2_300030-T 240 40.990 457.143442 258.000 +CPAR2_300040-T 795 595.669 97.664163 801.000 +CPAR2_300050-T 705 505.690 1.723473 12.000 +CPAR2_300060-T 807 607.668 35.975542 301.000 +CPAR2_300070-T 2385 2185.621 36.358513 1094.142 +CPAR2_300080-T 702 502.691 19.938179 138.000 +CPAR2_300090-T 1197 997.621 40.404964 555.000 +CPAR2_300100-T 2115 1915.621 113.075861 2982.442 +CPAR2_300110-T 2757 2557.621 8.095145 285.071 +CPAR2_300120-T 2775 2575.621 8.175547 289.929 +CPAR2_300130-T 2022 1822.621 61.725194 1549.000 +CPAR2_300140-T 462 262.756 131.571299 476.000 +CPAR2_300150-T 1071 871.621 31.747139 381.000 +CPAR2_300160-T 564 364.747 112.503046 565.000 +CPAR2_300170-T 693 493.695 59.874672 407.000 +CPAR2_300180-T 447 247.762 636.111736 2170.000 +CPAR2_300190-T 2343 2143.621 108.689005 3207.940 +CPAR2_300200-T 2730 2530.621 7.031475 245.000 +CPAR2_300210-T 699 499.693 45.819760 315.245 +CPAR2_300220-T 2052 1852.621 60.450105 1541.971 +CPAR2_300230-T 816 616.668 77.502856 658.054 +CPAR2_300240-T 438 238.769 412.357642 1355.639 +CPAR2_300250-T 1437 1237.621 14.861830 253.252 +CPAR2_300260-T 2013 1813.621 69.964665 1747.100 +CPAR2_300270-T 939 739.643 68.244868 695.000 +CPAR2_300280-T 1134 934.621 1.010218 13.000 +CPAR2_300290-T 444 244.764 204.446344 689.000 +CPAR2_300300-T 3648 3448.621 71.499337 3395.002 +CPAR2_300310-T 1839 1639.621 28.130455 635.057 +CPAR2_300320-T 1023 823.621 153.100055 1736.183 +CPAR2_300330-T 4515 4315.621 65.344869 3882.820 +CPAR2_300340-T 1044 844.621 6.707181 78.000 +CPAR2_300350-T 1221 1021.621 119.935728 1687.062 +CPAR2_300360-T 279 79.915 192.670166 212.000 +CPAR2_300370-T 963 763.626 16.549160 174.000 +CPAR2_300380-T 843 643.659 222.322528 1970.298 +CPAR2_300390-T 2292 2092.621 132.830875 3827.209 +CPAR2_300400-T 915 715.649 29.329539 289.000 +CPAR2_300410-T 1140 940.621 67.407293 873.000 +CPAR2_300420-T 1410 1210.621 34.555855 576.000 +CPAR2_300430-T 951 751.633 81.457665 843.005 +CPAR2_300440-T 1683 1483.621 16.742123 342.000 +CPAR2_300450-T 1215 1015.621 22.097042 309.000 +CPAR2_300460-T 510 310.752 19.632385 84.000 +CPAR2_300470-T 750 550.682 16.881722 128.000 +CPAR2_300480-T 1689 1489.621 106.007547 2174.228 +CPAR2_300490-T 5013 4813.621 11.919627 790.000 +CPAR2_300500-T 1905 1705.621 35.981692 845.000 +CPAR2_300510-T 1023 823.621 20.105493 228.000 +CPAR2_300520-T 525 325.751 215.823425 968.003 +CPAR2_300530-T 1245 1045.621 75.988936 1094.000 +CPAR2_300540-T 1836 1636.621 90.440606 2038.000 +CPAR2_300550-T 1227 1027.621 125.771004 1779.533 +CPAR2_300560-T 660 460.701 92.696954 588.000 +CPAR2_300570-T 816 616.668 101.879975 865.033 +CPAR2_300580-T 666 466.700 3.549406 22.808 +CPAR2_300590-T 1863 1663.621 77.342971 1771.609 +CPAR2_300600-T 555 355.748 2.691204 13.182 +CPAR2_300610-T 450 250.759 0.000000 0.000 +CPAR2_300620-T 1752 1552.621 11.797046 252.192 +CPAR2_300630-T 1791 1591.621 0.045633 1.000 +CPAR2_300640-T 2967 2767.621 112.552943 4289.000 +CPAR2_300650-T 654 454.702 227.360158 1423.421 +CPAR2_300660-T 669 469.699 74.066745 478.999 +CPAR2_300670-T 1557 1357.621 1.872392 35.000 +CPAR2_300680-T 1764 1564.621 2.599479 56.000 +CPAR2_300690-T 1755 1555.621 85.033261 1821.316 +CPAR2_300700-T 927 727.646 62.582800 627.000 +CPAR2_300710-T 2436 2236.621 30.329267 934.000 +CPAR2_300720-T 1191 991.621 46.948275 641.000 +CPAR2_300730-T 1740 1540.621 21.755175 461.478 +CPAR2_300740-T 1881 1681.621 36.523145 845.647 +CPAR2_300750-T 1719 1519.621 28.596978 598.340 +CPAR2_300760-T 1860 1660.621 171.010266 3910.077 +CPAR2_300770-T 1794 1594.621 209.417079 4597.928 +CPAR2_300780-T 1806 1606.621 90.592382 2004.000 +CPAR2_300790-T 1092 892.621 907.213530 11149.857 +CPAR2_300800-T 1059 859.621 105.967764 1254.219 +CPAR2_300810-T 2982 2782.621 54.602864 2092.002 +CPAR2_300820-T 1725 1525.621 72.456173 1522.000 +CPAR2_300830-T 408 208.809 201.737111 580.000 +CPAR2_300840-T 1830 1630.621 98.131876 2203.209 +CPAR2_300850-T 2376 2176.621 51.484951 1542.964 +CPAR2_300860-T 2028 1828.621 38.649560 973.108 +CPAR2_300870-T 546 346.750 72.681015 347.000 +CPAR2_300880-T 1305 1105.621 41.122111 626.000 +CPAR2_300890-T 3351 3151.621 47.565916 2064.060 +CPAR2_300900-T 2316 2116.621 194.446631 5666.777 +CPAR2_300910-T 1074 874.621 10.047841 121.000 +CPAR2_300920-T 909 709.649 29.475165 288.000 +CPAR2_300930-T 3141 2941.621 129.177976 5232.000 +CPAR2_300940-T 552 352.749 198.186580 962.570 +CPAR2_300950-T 288 88.910 245.878978 301.000 +CPAR2_300960-T 669 469.699 66.644691 431.000 +CPAR2_300970-T 3336 3136.621 27.485025 1187.000 +CPAR2_300980-T 1230 1030.621 48.057597 681.952 +CPAR2_300990-T 1158 958.621 32.654095 431.000 +CPAR2_301000-T 1530 1330.621 69.101378 1266.000 +CPAR2_301010-T 1554 1354.621 33.241550 620.000 +CPAR2_301020-T 1980 1780.621 1419.858570 34810.412 +CPAR2_301030-T 204 13.953 3336.502718 641.000 +CPAR2_301040-T 2415 2215.621 109.997755 3355.613 +CPAR2_301050-T 798 598.669 33.362127 275.000 +CPAR2_301060-T 3501 3301.621 68.836046 3129.217 +CPAR2_301070-T 672 472.698 46.401336 302.000 +CPAR2_301080-T 867 667.651 13.053879 120.000 +CPAR2_301090-T 1317 1117.621 66.414620 1022.000 +CPAR2_301100-T 1845 1645.621 24.229806 549.000 +CPAR2_301110-T 2178 1978.621 83.360989 2271.005 +CPAR2_301120-T 1656 1456.621 0.349027 7.000 +CPAR2_301130-T 1647 1447.621 1.806155 36.000 +CPAR2_301140-T 2280 2080.621 0.069814 2.000 +CPAR2_301150-T 891 691.649 51.873858 494.000 +CPAR2_301160-T 1680 1480.621 359.777623 7334.503 +CPAR2_301170-T 2331 2131.621 106.885023 3137.035 +CPAR2_301180-T 771 571.671 79.784890 628.000 +CPAR2_301190-T 1311 1111.621 88.965544 1361.668 +CPAR2_301200-T 3720 3520.621 62.135981 3012.000 +CPAR2_301210-T 1314 1114.621 58.774192 902.000 +CPAR2_301220-T 1044 844.621 3.101431 36.068 +CPAR2_301230-T 465 265.756 206.880936 757.000 +CPAR2_301240-T 2049 1849.621 55.591153 1415.732 +CPAR2_301250-T 675 475.697 46.261472 303.000 +CPAR2_301260-T 357 157.823 87.435864 190.000 +CPAR2_301270-T 2379 2179.621 52.347919 1570.988 +CPAR2_301280-T 1842 1642.621 32.940206 745.000 +CPAR2_301290-T 1320 1120.621 32.340679 499.000 +CPAR2_301300-T 1245 1045.621 25.833794 371.925 +CPAR2_301310-T 1236 1036.621 25.750103 367.529 +CPAR2_301320-T 1260 1060.621 29.856136 436.000 +CPAR2_301330-T 1314 1114.621 25.542716 392.001 +CPAR2_301340-T 942 742.642 1811.917292 18527.235 +CPAR2_301350-T 1251 1051.621 53.593215 776.000 +CPAR2_301360-T 2766 2566.621 82.703526 2922.660 +CPAR2_301370-T 1125 925.621 50.923566 649.000 +CPAR2_301380-T 2952 2752.621 51.277196 1943.405 +CPAR2_301390-T 1689 1489.621 374.388593 7678.758 +CPAR2_301400-T 2706 2506.621 75.447878 2603.924 +CPAR2_301410-T 1131 931.621 78.270840 1003.996 +CPAR2_301420-T 849 649.655 48.519279 434.000 +CPAR2_301430-T 2682 2482.621 79.491369 2717.208 +CPAR2_301440-T 900 700.649 176.081341 1698.660 +CPAR2_301450-T 891 691.649 72.455388 690.000 +CPAR2_301460-T 1548 1348.621 71.895006 1335.000 +CPAR2_301470-T 1629 1429.621 77.372454 1523.000 +CPAR2_301480-T 1545 1345.621 0.593714 11.000 +CPAR2_301490-T 723 523.687 82.796154 597.000 +CPAR2_301500-T 1317 1117.621 72.588190 1117.000 +CPAR2_301510-T 3381 3181.621 52.196747 2286.570 +CPAR2_301520-T 531 331.751 34.809085 159.000 +CPAR2_301530-T 2727 2527.621 61.232509 2131.015 +CPAR2_301540-T 726 526.686 211.396685 1533.000 +CPAR2_301550-T 1062 862.621 46.307353 550.000 +CPAR2_301560-T 207 15.353 373.720798 79.000 +CPAR2_301570-T 3690 3490.621 101.963787 4900.509 +CPAR2_301580-T 1245 1045.621 11.877612 171.000 +CPAR2_301590-T 1386 1186.621 1.312816 21.449 +CPAR2_301600-T 1296 1096.621 104.710599 1581.029 +CPAR2_301610-T 1770 1570.621 90.872463 1965.153 +CPAR2_301620-T 924 724.648 199.550149 1991.000 +CPAR2_301630-T 1002 802.621 100.623994 1112.000 +CPAR2_301640-T 1902 1702.621 159.131309 3730.493 +CPAR2_301650-T 888 688.649 28.897481 274.000 +CPAR2_301660-T 1248 1048.621 17.176729 248.000 +CPAR2_301670-T 1413 1213.621 70.317325 1175.001 +CPAR2_301680-T 351 151.833 2.391733 5.000 +CPAR2_301690-T 1560 1360.621 5.444655 102.000 +CPAR2_301700-T 1830 1630.621 13.451209 302.000 +CPAR2_301710-T 840 640.661 94.546394 834.000 +CPAR2_301720-T 204 13.953 1889.470338 363.000 +CPAR2_301730-T 2562 2362.621 417.926679 13595.235 +CPAR2_301740-T 3069 2869.621 87.671977 3464.000 +CPAR2_301750-T 1920 1720.621 3.735946 88.507 +CPAR2_301760-T 1677 1477.621 3.342360 68.000 +CPAR2_301770-T 1494 1294.621 96.492414 1720.000 +CPAR2_301780-T 1503 1303.621 36.048774 647.045 +CPAR2_301790-T 1821 1621.621 61.460516 1372.266 +CPAR2_301800-T 2181 1981.621 36.284574 990.000 +CPAR2_301810-T 3552 3352.621 43.846357 2024.000 +CPAR2_301820-T 1497 1297.621 117.063297 2091.516 +CPAR2_301830-T 669 469.699 13.271899 85.831 +CPAR2_301840-T 606 406.744 14.501515 81.213 +CPAR2_301850-T 1317 1117.621 90.759132 1396.618 +CPAR2_301860-T 2679 2479.621 22.289832 761.000 +CPAR2_301870-T 1131 931.621 3.430210 44.000 +CPAR2_301880-T 1656 1456.621 190.407680 3818.771 +CPAR2_301890-T 2697 2497.621 36.854528 1267.389 +CPAR2_301900-T 2682 2482.621 35.486063 1213.000 +CPAR2_301910-T 1824 1624.621 58.026989 1298.000 +CPAR2_301920-T 903 703.649 120.867120 1171.000 +CPAR2_301930-T 3204 3004.621 83.130775 3439.094 +CPAR2_301940-T 1320 1120.621 2.916494 45.000 +CPAR2_301950-T 1221 1021.621 42.798137 602.015 +CPAR2_301960-T 2046 1846.621 42.594949 1083.000 +CPAR2_301970-T 1467 1267.621 58.456297 1020.266 +CPAR2_301980-T 2301 2101.621 44.419557 1285.349 +CPAR2_301990-T 3039 2839.621 100.681569 3936.433 +CPAR2_302000-T 1878 1678.621 40.627523 939.000 +CPAR2_302010-T 1344 1144.621 71.573516 1127.994 +CPAR2_302020-T 666 466.700 36.415429 234.000 +CPAR2_302030-T 1782 1582.621 135.085675 2943.600 +CPAR2_302040-T 1290 1090.621 49.678939 746.000 +CPAR2_302050-T 447 247.762 41.332606 141.000 +CPAR2_302060-T 939 739.643 157.503313 1604.001 +CPAR2_302070-T 1446 1246.621 161.439370 2771.000 +CPAR2_302080-T 567 367.746 1.184979 6.000 +CPAR2_302090-T 1452 1252.621 41.053116 708.041 +CPAR2_302100-T 7080 6880.621 42.450864 4021.672 +CPAR2_302110-T 1056 856.621 52.821001 623.000 +CPAR2_302120-T 750 550.682 43.127523 327.000 +CPAR2_302130-T 1245 1045.621 0.149400 2.151 +CPAR2_302140-T 1599 1399.621 8.769678 169.000 +CPAR2_302150-T 927 727.646 128.886194 1291.276 +CPAR2_302160-T 711 511.689 170.943908 1204.349 +CPAR2_302170-T 1470 1270.621 414.266565 7247.505 +CPAR2_302180-T 618 418.744 140.142689 808.000 +CPAR2_302190-T 2016 1816.621 49.935054 1249.000 +CPAR2_302200-T 129 20.061 0.000000 0.000 +CPAR2_302210-T 591 391.744 84.706195 456.889 +CPAR2_302220-T 4836 4636.621 33.934988 2166.416 +CPAR2_302230-T 2262 2062.621 83.017506 2357.663 +CPAR2_302240-T 1389 1189.621 70.892080 1161.178 +CPAR2_302250-T 3231 3031.621 135.624118 5661.146 +CPAR2_302260-T 750 550.682 41.544862 315.000 +CPAR2_302270-T 846 646.657 22.575089 201.000 +CPAR2_302280-T 1056 856.621 26.622463 314.000 +CPAR2_302290-T 570 370.746 104.218050 532.000 +CPAR2_302300-T 624 424.742 25.985600 151.967 +CPAR2_302310-T 1446 1246.621 156.371817 2684.019 +CPAR2_302320-T 516 316.752 142.847325 622.994 +CPAR2_302330-T 507 307.752 101.833362 431.502 +CPAR2_302340-T 1635 1435.621 17.959570 355.000 +CPAR2_302350-T 2805 2605.621 93.213465 3344.125 +CPAR2_302360-T 2049 1849.621 97.263676 2477.000 +CPAR2_302370-T 969 769.624 115.432125 1223.201 +CPAR2_302380-T 1689 1489.621 30.960312 635.000 +CPAR2_302390-T 1614 1414.621 129.812991 2528.430 +CPAR2_302400-T 594 394.744 30.910126 168.000 +CPAR2_302410-T 1803 1603.621 57.247001 1264.000 +CPAR2_302420-T 750 550.682 47.479842 360.000 +CPAR2_302430-T 990 790.622 74.684300 813.001 +CPAR2_302440-T 1341 1141.621 294.960918 4636.381 +CPAR2_302450-T 621 421.743 1.033264 6.000 +CPAR2_302460-T 1671 1471.621 129.896492 2632.001 +CPAR2_302470-T 288 88.910 47.378673 58.000 +CPAR2_302480-T 1251 1051.621 91.253404 1321.299 +CPAR2_302490-T 3114 2914.621 115.573037 4638.004 +CPAR2_302500-T 1881 1681.621 10.926971 253.000 +CPAR2_302510-T 1128 928.621 188.154191 2405.720 +CPAR2_302520-T 2022 1822.621 101.564628 2548.775 +CPAR2_302530-T 3333 3133.621 42.622873 1839.000 +CPAR2_302540-T 2022 1822.621 316.237538 7936.013 +CPAR2_302550-T 6228 6028.621 67.486898 5601.830 +CPAR2_302555-T 1110 910.621 1159.971636 14543.794 +CPAR2_302560-T 1809 1609.621 78.426884 1738.126 +CPAR2_302570-T 903 703.649 105.911656 1026.107 +CPAR2_302580-T 1518 1318.621 426.097467 7736.091 +CPAR2_302590-T 2037 1837.621 29.799773 753.983 +CPAR2_302600-T 1971 1771.621 124.708428 3042.000 +CPAR2_302610-T 2286 2086.621 77.201411 2217.999 +CPAR2_302620-T 504 304.752 1120.874310 4703.226 +CPAR2_302630-T 984 784.623 62.111072 671.000 +CPAR2_302640-T 1164 964.621 14.154954 188.000 +CPAR2_302650-T 6144 5944.621 205.745246 16840.171 +CPAR2_302660-T 3564 3364.621 55.605426 2576.000 +CPAR2_302670-T 1638 1438.621 77.107626 1527.342 +CPAR2_302680-T 807 607.668 30.597428 256.002 +CPAR2_302690-T 1323 1123.621 51.839627 802.000 +CPAR2_302700-T 762 562.678 56.019270 434.000 +CPAR2_302710-T 414 214.804 80.471547 238.000 +CPAR2_302720-T 988 788.623 1.105146 12.000 +CPAR2_302730-T 1353 1153.621 124.969696 1985.000 +CPAR2_302740-T 1290 1090.621 10.921375 164.000 +CPAR2_302750-T 1293 1093.621 22.978232 346.000 +CPAR2_302760-T 1251 1051.621 27.763495 402.000 +CPAR2_302770-T 1218 1018.621 6.060572 85.000 +CPAR2_302780-T 1218 1018.621 13.475861 189.000 +CPAR2_302790-T 1218 1018.621 36.434734 511.000 +CPAR2_302800-T 1854 1654.621 170.529649 3885.000 +CPAR2_302810-T 1470 1270.621 1.428997 25.000 +CPAR2_302820-T 636 436.717 4.323955 26.000 +CPAR2_302830-T 1077 877.621 48.081325 581.000 +CPAR2_302840-T 1071 871.621 90.324707 1083.994 +CPAR2_302850-T 900 700.649 51.103867 493.000 +CPAR2_302860-T 1104 904.621 62.944343 784.000 +CPAR2_302880-T 3318 3118.621 186.734840 8018.267 +CPAR2_302890-T 903 703.649 662.351473 6417.077 +CPAR2_302900-T 843 643.659 163.613622 1450.000 +CPAR2_302910-T 891 691.649 202.140032 1925.000 +CPAR2_302920-T 693 493.695 156.086060 1061.000 +CPAR2_302930-T 423 223.791 57.118493 176.000 +CPAR2_302940-T 1632 1432.621 91.709934 1809.007 +CPAR2_302950-T 1515 1315.621 15.678154 284.000 +CPAR2_302960-T 1734 1534.621 85.105301 1798.251 +CPAR2_302970-T 585 385.745 334.795281 1778.164 +CPAR2_302980-T 858 658.653 18.084014 164.000 +CPAR2_302990-T 270 70.923 5267.671427 5144.000 +CPAR2_303000-T 2700 2500.621 2.701112 93.000 +CPAR2_303010-T 594 394.744 1016.538238 5524.999 +CPAR2_303020-T 579 379.745 101.939589 533.000 +CPAR2_303030-T 435 235.772 280.629594 911.000 +CPAR2_303040-T 912 712.649 3.872713 38.000 +CPAR2_303050-T 597 397.744 183.980456 1007.554 +CPAR2_303060-T 2265 2065.621 47.959115 1364.000 +CPAR2_303070-T 495 295.752 115.154484 468.923 +CPAR2_303080-T 576 376.745 55.520390 288.000 +CPAR2_303090-T 2877 2677.621 52.241918 1926.020 +CPAR2_303100-T 279 79.915 106.332120 117.000 +CPAR2_303110-T 4863 4663.621 26.007808 1670.012 +CPAR2_303120-T 3348 3148.621 74.874806 3246.001 +CPAR2_303130-T 930 730.645 39.661924 399.000 +CPAR2_303140-T 2034 1834.621 30.403409 768.000 +CPAR2_303150-T 3237 3037.621 2.104052 88.000 +CPAR2_303160-T 546 346.750 158.557718 757.000 +CPAR2_303170-T 516 316.752 138.492228 604.000 +CPAR2_303180-T 963 763.626 175.765882 1848.025 +CPAR2_303190-T 915 715.649 3.856479 38.000 +CPAR2_303200-T 861 661.653 48.330624 440.296 +CPAR2_303210-T 1158 958.621 40.078924 529.000 +CPAR2_303220-T 1611 1411.621 32.516692 632.000 +CPAR2_303230-T 3105 2905.621 56.076169 2243.416 +CPAR2_303240-T 1188 988.621 15.207150 207.000 +CPAR2_303250-T 1284 1084.621 68.279315 1019.670 +CPAR2_303260-T 2619 2419.621 29.536239 984.000 +CPAR2_303270-T 2178 1978.621 86.847946 2366.000 +CPAR2_303280-T 939 739.643 118.913000 1211.000 +CPAR2_303290-T 2064 1864.621 30.732214 789.000 +CPAR2_303300-T 1557 1357.621 54.727356 1023.000 +CPAR2_303310-T 2046 1846.621 130.429670 3316.246 +CPAR2_303320-T 1272 1072.621 0.067711 1.000 +CPAR2_303330-T 768 568.674 168.840035 1322.000 +CPAR2_303340-T 1101 901.621 17.318958 215.000 +CPAR2_303350-T 1239 1039.621 71.825383 1028.124 +CPAR2_303360-T 930 730.645 57.653925 580.000 +CPAR2_303370-T 2064 1864.621 138.793575 3563.301 +CPAR2_303380-T 1086 886.621 39.811227 486.000 +CPAR2_303390-T 2382 2182.621 66.729429 2005.341 +CPAR2_303400-T 1812 1612.621 61.836605 1373.000 +CPAR2_303410-T 1596 1396.621 110.142460 2118.000 +CPAR2_303420-T 1746 1546.621 46.771665 996.000 +CPAR2_303430-T 1509 1309.621 35.114472 633.176 +CPAR2_303440-T 1401 1201.621 39.166508 648.000 +CPAR2_303450-T 543 343.750 4288.148027 20295.751 +CPAR2_303460-T 183 8.453 945.158471 110.000 +CPAR2_303470-T 636 436.717 128.554494 773.000 +CPAR2_303480-T 633 433.718 48.897089 292.000 +CPAR2_303490-T 2310 2110.621 32.980477 958.429 +CPAR2_303500-T 2529 2329.621 47.324252 1517.964 +CPAR2_303510-T 2943 2743.621 73.962186 2794.000 +CPAR2_303520-T 3657 3457.621 48.522376 2310.000 +CPAR2_303530-T 1758 1558.621 205.422527 4408.402 +CPAR2_303540-T 1107 907.621 318.964070 3986.016 +CPAR2_303550-T 1704 1504.621 140.901096 2919.000 +CPAR2_303560-T 1659 1459.621 36.025155 724.000 +CPAR2_303570-T 1320 1120.621 129.329162 1995.482 +CPAR2_303580-T 2814 2614.621 16.805602 605.000 +CPAR2_303590-T 606 406.744 29.328503 164.249 +CPAR2_303600-T 669 469.699 51.143309 330.751 +CPAR2_303610-T 2172 1972.621 48.305614 1312.000 +CPAR2_303620-T 2352 2152.621 35.966408 1066.000 +CPAR2_303630-T 1740 1540.621 46.529538 987.000 +CPAR2_303640-T 576 376.745 27.952974 145.000 +CPAR2_303650-T 1638 1438.621 63.307991 1254.000 +CPAR2_303660-T 2256 2056.621 18.012074 510.047 +CPAR2_303670-T 5718 5518.621 4.698348 357.000 +CPAR2_303680-T 1512 1312.621 56.050239 1013.000 +CPAR2_303690-T 1548 1348.621 60.477972 1123.000 +CPAR2_303700-T 570 370.746 58.377780 298.000 +CPAR2_303710-T 2154 1954.621 51.091372 1375.000 +CPAR2_303720-T 1464 1264.621 69.376744 1208.000 +CPAR2_303730-T 1059 859.621 31.345427 371.000 +CPAR2_303740-T 1569 1369.621 364.445617 6872.674 +CPAR2_303750-T 2001 1801.621 48.482479 1202.654 +CPAR2_303760-T 1371 1171.621 61.431888 991.000 +CPAR2_303770-T 1035 835.621 54.930686 632.000 +CPAR2_303780-T 2412 2212.621 84.056128 2560.761 +CPAR2_303790-T 3726 3526.621 7.311004 355.000 +CPAR2_303800-T 330 130.868 18.314203 33.000 +CPAR2_303810-T 1905 1705.621 100.578411 2362.000 +CPAR2_303820-T 2067 1867.621 509.007400 13088.969 +CPAR2_303830-T 1662 1462.621 226.226797 4555.840 +CPAR2_303840-T 1104 904.621 371.685067 4629.504 +CPAR2_303850-T 939 739.643 77.180527 786.000 +CPAR2_303860-T 843 643.659 423.928537 3757.000 +CPAR2_303870-T 2160 1960.621 52.899893 1428.042 +CPAR2_303880-T 705 505.690 111.594882 777.000 +CPAR2_303890-T 1164 964.621 33.203908 441.000 +CPAR2_303900-T 1119 919.621 79.449005 1005.982 +CPAR2_303910-T 483 283.753 30.458882 119.000 +CPAR2_303920-T 2094 1894.621 225.756397 5889.182 +CPAR2_303930-T 1335 1135.621 103.670928 1621.000 +CPAR2_303940-T 912 712.649 265.892337 2609.000 +CPAR2_303950-T 5076 4876.621 59.111185 3969.001 +CPAR2_303960-T 459 259.757 130.780977 467.740 +CPAR2_303970-T 321 121.885 53.628989 90.000 +CPAR2_303980-T 1395 1195.621 351.981723 5794.371 +CPAR2_303990-T 2322 2122.621 0.752762 22.000 +CPAR2_304000-T 1479 1279.621 41.965041 739.370 +CPAR2_304010-T 3723 3523.621 62.372697 3026.051 +CPAR2_304020-T 3150 2950.621 102.434517 4161.523 +CPAR2_304030-T 921 721.648 153.278775 1523.000 +CPAR2_304040-T 1587 1387.621 1.360849 26.000 +CPAR2_304050-T 1842 1642.621 85.573568 1935.395 +CPAR2_304060-T 1041 841.621 92.681917 1074.000 +CPAR2_304070-T 726 526.686 52.538902 381.000 +CPAR2_304080-T 603 403.744 0.179887 1.000 +CPAR2_304090-T 357 157.823 11.504719 25.000 +CPAR2_304100-T 2226 2026.621 44.980239 1255.125 +CPAR2_304110-T 408 208.809 1403.820090 4036.023 +CPAR2_304120-T 1329 1129.621 11.894504 185.000 +CPAR2_304130-T 432 232.777 204.365704 655.000 +CPAR2_tS(CAG)1-T 82 1.388 0.000000 0.000 +CPAR2_304140-T 1305 1105.621 96.829035 1474.024 +CPAR2_304150-T 963 763.626 169.832548 1785.641 +CPAR2_304160-T 8973 8773.621 12.625168 1525.136 +CPAR2_304170-T 312 112.898 383.412148 596.000 +CPAR2_304180-T 321 121.885 207.365422 348.000 +CPAR2_304190-T 4092 3892.621 38.678058 2073.000 +CPAR2_304200-T 1035 835.621 81.787619 941.000 +CPAR2_304210-T 2247 2047.621 174.006622 4905.778 +CPAR2_304220-T 2094 1894.621 47.994271 1252.000 +CPAR2_304230-T 2679 2479.621 27.357034 934.000 +CPAR2_304240-T 1878 1678.621 65.491302 1513.662 +CPAR2_304250-T 669 469.699 63.706758 412.000 +CPAR2_304260-T 1248 1048.621 139.769370 2018.010 +CPAR2_304270-T 1026 826.621 2.987306 34.000 +CPAR2_304280-T 1674 1474.621 26.940677 546.993 +CPAR2_304290-T 1494 1294.621 69.356975 1236.304 +CPAR2_304300-T 1968 1768.621 128.906983 3139.090 +CPAR2_304310-T 318 118.893 1383.627787 2265.000 +CPAR2_304320-T 522 322.751 9.676277 43.000 +CPAR2_304330-T 1677 1477.621 15.040621 306.000 +CPAR2_304340-T 1308 1108.621 43.238257 660.000 +CPAR2_304350-T 1512 1312.621 48.746556 881.000 +CPAR2_304360-T 1149 949.621 54.306478 710.059 +CPAR2_304370-T 4497 4297.621 10.259788 607.098 +CPAR2_800010-T 2100 1900.621 89.342103 2337.999 +CPAR2_800020-T 1218 1018.621 366.913957 5145.997 +CPAR2_800030-T 429 229.782 221.253459 700.000 +CPAR2_800040-T 1674 1474.621 20.735240 421.000 +CPAR2_800050-T 1305 1105.621 5.189532 79.000 +CPAR2_800060-T 462 262.756 17.137438 62.000 +CPAR2_800070-T 564 364.747 0.398241 2.000 +CPAR2_800080-T 1689 1489.621 64.309688 1319.000 +CPAR2_800090-T 1476 1276.621 74.716933 1313.329 +CPAR2_800100-T 2217 2017.621 107.898616 2997.423 +CPAR2_800110-T 525 325.751 116.829632 524.000 +CPAR2_800120-T 894 694.649 34.398368 329.000 +CPAR2_800130-T 1014 814.621 52.869643 593.000 +CPAR2_800140-T 5541 5341.621 52.524482 3863.024 +CPAR2_800150-T 444 244.764 161.717355 545.000 +CPAR2_800160-T 2205 2005.621 101.901952 2813.999 +CPAR2_800170-T 1791 1591.621 106.093969 2325.000 +CPAR2_800180-T 375 175.818 956.315936 2315.027 +CPAR2_800190-T 2382 2182.621 41.775921 1255.443 +CPAR2_800200-T 600 400.744 351.684384 1940.497 +CPAR2_800210-T 2643 2443.621 359.931462 12110.058 +CPAR2_800220-T 1683 1483.621 205.360251 4195.000 +CPAR2_800230-T 2769 2569.621 15.059014 532.793 +CPAR2_800240-T 2769 2569.621 12.328379 436.182 +CPAR2_800250-T 2775 2575.621 21.163163 750.508 +CPAR2_800260-T 3933 3733.621 61.005431 3136.110 +CPAR2_800270-T 264 64.930 149.888318 134.000 +CPAR2_800280-T 1482 1282.621 42.242329 746.000 +CPAR2_800290-T 1344 1144.621 68.718568 1083.000 +CPAR2_800300-T 4743 4543.621 31.521893 1972.000 +CPAR2_800310-T 1671 1471.621 112.616852 2281.876 +CPAR2_800320-T 2556 2356.621 20.617871 669.000 +CPAR2_800330-T 897 697.649 18.040467 173.292 +CPAR2_800340-T 903 703.649 15.069684 146.000 +CPAR2_800350-T 903 703.649 26.187028 253.708 +CPAR2_800360-T 2307 2107.621 146.840065 4261.178 +CPAR2_800370-T 1197 997.621 94.688751 1300.639 +CPAR2_800380-T 186 8.379 294.704322 34.000 +CPAR2_800390-T 2421 2221.621 94.632821 2894.705 +CPAR2_800400-T 1296 1096.621 242.600176 3663.029 +CPAR2_800410-T 795 595.669 377.136842 3093.116 +CPAR2_800420-T 1215 1015.621 10.593452 148.136 +CPAR2_800430-T 1491 1291.621 3.598755 64.000 +CPAR2_800440-T 1665 1465.621 634.074202 12795.415 +CPAR2_800450-T 1506 1306.621 43.812680 788.210 +CPAR2_800460-T 4269 4069.621 136.512131 7649.230 +CPAR2_800470-T 297 97.907 1484.306719 2000.915 +CPAR2_800480-T 240 40.990 349.059140 197.000 +CPAR2_800490-T 5445 5245.621 32.454133 2344.010 +CPAR2_800500-T 228 29.478 39.421614 16.000 +CPAR2_800510-T 1566 1366.621 445.166273 8376.507 +CPAR2_800520-T 1566 1366.621 149.970569 2821.933 +CPAR2_800530-T 1668 1468.621 351.070900 7099.000 +CPAR2_800540-T 2835 2635.621 39.333221 1427.365 +CPAR2_800550-T 1845 1645.621 5.914014 134.000 +CPAR2_800560-T 4380 4180.621 34.410652 1980.734 +CPAR2_800570-T 1188 988.621 85.733065 1167.000 +CPAR2_800580-T 1932 1732.621 14.545656 347.000 +CPAR2_800590-T 4341 4141.621 23.026418 1313.074 +CPAR2_800600-T 2964 2764.621 47.602531 1812.000 +CPAR2_800610-T 678 478.697 35.351092 233.000 +CPAR2_800620-T 2619 2419.621 82.706751 2755.376 +CPAR2_800630-T 855 655.653 58.045000 524.000 +CPAR2_800640-T 681 481.697 82.474748 547.000 +CPAR2_800650-T 1377 1177.621 54.334756 881.000 +CPAR2_800660-T 909 709.649 75.566203 738.353 +CPAR2_800670-T 924 724.648 11.926902 119.000 +CPAR2_800680-T 2541 2341.621 40.020878 1290.315 +CPAR2_800690-T 1206 1006.621 41.270276 572.000 +CPAR2_800700-T 2055 1855.621 83.999122 2146.133 +CPAR2_800710-T 1443 1243.621 81.177907 1390.012 +CPAR2_800720-T 2409 2209.621 601.502900 18299.873 +CPAR2_tL(AAG)1-T 81 1.192 0.000000 0.000 +CPAR2_800730-T 687 487.696 49.739847 334.000 +CPAR2_800740-T 501 301.752 11.071724 46.000 +CPAR2_800750-T 1767 1567.621 158.080131 3412.015 +CPAR2_800760-T 1920 1720.621 71.758130 1700.000 +CPAR2_800770-T 1986 1786.621 69.842724 1718.091 +CPAR2_800780-T 963 763.626 23.301979 245.000 +CPAR2_800790-T 2364 2164.621 99.583974 2968.000 +CPAR2_800800-T 1020 820.621 17.966385 203.000 +CPAR2_800810-T 1392 1192.621 72.895221 1197.000 +CPAR2_800820-T 2652 2452.621 100.534884 3395.000 +CPAR2_800830-T 1773 1573.621 83.404269 1807.095 +CPAR2_800840-T 630 430.726 167.270166 992.000 +CPAR2_800850-T 420 220.797 60.853602 185.000 +CPAR2_800860-T 687 487.696 901.711895 6054.940 +CPAR2_800870-T 1539 1339.621 97.767400 1803.303 +CPAR2_800880-T 516 316.752 94.238917 411.000 +CPAR2_800890-T 2934 2734.621 73.077447 2751.522 +CPAR2_800900-T 1080 880.621 13.030928 158.000 +CPAR2_800910-T 993 793.622 29.467927 322.000 +CPAR2_800920-T 255 55.942 83.089627 64.000 +CPAR2_800930-T 369 169.818 6.842947 16.000 +CPAR2_800940-T 1635 1435.621 37.993344 751.000 +CPAR2_800950-T 210 16.856 0.000000 0.000 +CPAR2_800960-T 960 760.627 13.845351 145.000 +CPAR2_800970-T 1011 811.621 946.929506 10581.900 +CPAR2_800980-T 738 538.684 132.803504 985.000 +CPAR2_800990-T 555 355.748 158.222024 775.000 +CPAR2_801000-T 1785 1585.621 77.025000 1681.604 +CPAR2_801010-T 654 454.702 43.126550 270.000 +CPAR2_801020-T 3144 2944.621 52.560744 2131.000 +CPAR2_801030-T 933 733.645 207.597226 2097.007 +CPAR2_801040-T 1200 1000.621 72.529453 999.256 +CPAR2_801050-T 1062 862.621 59.946974 712.000 +CPAR2_801060-T 2574 2374.621 136.529582 4463.891 +CPAR2_801070-T 981 781.623 109.367093 1177.000 +CPAR2_801080-T 2397 2197.621 7.667303 232.000 +CPAR2_801090-T 1791 1591.621 97.432990 2135.199 +CPAR2_801100-T 1407 1207.621 3251.031462 54056.070 +CPAR2_801110-T 2055 1855.621 0.313118 8.000 +CPAR2_801120-T 1074 874.621 211.561339 2547.704 +CPAR2_801130-T 2490 2290.621 15.980293 504.000 +CPAR2_801140-T 1563 1363.621 191.528489 3596.000 +CPAR2_801150-T 2091 1891.621 43.424607 1131.000 +CPAR2_801160-T 780 580.671 43.276621 346.000 +CPAR2_801170-T 381 181.817 20.372481 51.000 +CPAR2_801180-T 1593 1393.621 104.102594 1997.555 +CPAR2_801190-T 741 541.683 59.262278 441.994 +CPAR2_801200-T 1626 1426.621 40.523957 796.000 +CPAR2_801210-T 561 361.747 7.629323 38.000 +CPAR2_801220-T 1476 1276.621 112.929108 1985.000 +CPAR2_801230-T 975 775.624 34.740037 371.000 +CPAR2_801240-T 1665 1465.621 118.081246 2382.842 +CPAR2_801250-T 1245 1045.621 169.603729 2441.757 +CPAR2_801260-T 3024 2824.621 27.204328 1058.012 +CPAR2_801270-T 1674 1474.621 0.394019 8.000 +CPAR2_801280-T 1110 910.621 2.073686 26.000 +CPAR2_801290-T 549 349.750 0.622976 3.000 +CPAR2_801300-T 744 544.682 40.269028 302.000 +CPAR2_801310-T 804 604.669 92.316029 768.576 +CPAR2_801320-T 1026 826.621 119.492256 1360.000 +CPAR2_801330-T 2076 1876.621 25.891485 669.000 +CPAR2_801340-T 4809 4609.621 43.897961 2786.135 +CPAR2_801350-T 1386 1186.621 42.175631 689.075 +CPAR2_801360-T 3024 2824.621 35.498053 1380.566 +CPAR2_801370-T 2940 2740.621 71.793688 2709.117 +CPAR2_801380-T 891 691.649 153.756443 1464.238 +CPAR2_801390-T 2958 2758.621 82.985256 3151.995 +CPAR2_801400-T 504 304.752 94.613167 397.000 +CPAR2_801410-T 924 724.648 132.951377 1326.515 +CPAR2_801420-T 1134 934.621 6.916108 89.000 +CPAR2_801430-T 2994 2794.621 57.820530 2224.834 +CPAR2_801440-T 2796 2596.621 7.524041 269.000 +CPAR2_801450-T 1266 1066.621 50.543619 742.282 +CPAR2_801460-T 1002 802.621 128.223200 1417.000 +CPAR2_801470-T 3282 3082.621 49.326623 2093.602 +CPAR2_801480-T 1635 1435.621 155.127886 3066.354 +CPAR2_801490-T 1665 1465.621 59.862196 1208.000 +CPAR2_801500-T 1722 1522.621 17.028790 357.000 +CPAR2_801510-T 2352 2152.621 84.801394 2513.409 +CPAR2_801520-T 357 157.823 391.160444 850.000 +CPAR2_801530-T 1680 1480.621 82.876326 1689.534 +CPAR2_801540-T 693 493.695 216.760414 1473.436 +CPAR2_801550-T 4098 3898.621 24.981887 1341.000 +CPAR2_801560-T 1038 838.621 68.698830 793.246 +CPAR2_801570-T 708 508.689 280.698588 1966.008 +CPAR2_801580-T 1557 1357.621 93.770935 1752.828 +CPAR2_801590-T 1359 1159.621 53.801523 859.020 +CPAR2_801600-T 2658 2458.621 34.628912 1172.257 +CPAR2_801610-T 162 26.415 973.314022 354.000 +CPAR2_801620-T 1638 1438.621 60.026476 1189.000 +CPAR2_801630-T 2175 1975.621 34.924275 950.000 +CPAR2_801640-T 5502 5302.621 56.388207 4116.910 +CPAR2_801650-T 3798 3598.621 15.278026 757.000 +CPAR2_801655-T 201 12.627 0.000000 0.000 +CPAR2_801660-T 1146 946.621 0.000000 0.000 +CPAR2_801670-T 3609 3409.621 19.660885 923.000 +CPAR2_801680-T 558 358.747 50.005271 247.000 +CPAR2_801690-T 2178 1978.621 93.488907 2546.920 +CPAR2_801700-T 3603 3403.621 89.408822 4190.001 +CPAR2_801710-T 876 676.649 44.789416 417.284 +CPAR2_801720-T 840 640.661 63.484389 560.000 +CPAR2_801730-T 2289 2089.621 54.424829 1565.875 +CPAR2_801735-T 156 28.521 2.546515 1.000 +CPAR2_801740-T 1242 1042.621 43.188941 620.000 +CPAR2_801750-T 777 577.671 2.891709 23.000 +CPAR2_801760-T 3735 3535.621 9.367580 456.022 +CPAR2_801770-T 519 319.751 1921.117076 8457.825 +CPAR2_801780-T 342 142.854 139.328132 274.046 +CPAR2_801790-T 204 13.953 62.461829 12.000 +CPAR2_801800-T 3714 3514.621 94.850856 4589.996 +CPAR2_801810-T 4710 4510.621 23.669467 1470.000 +CPAR2_801820-T 1698 1498.621 298.276095 6154.643 +CPAR2_801830-T 342 142.854 342.137989 672.954 +CPAR2_801840-T 519 319.751 0.000000 0.000 +CPAR2_801850-T 1248 1048.621 82.059720 1184.790 +CPAR2_801860-T 1299 1099.621 18.823881 285.000 +CPAR2_801870-T 2316 2116.621 52.029934 1516.313 +CPAR2_801880-T 396 196.816 622.534400 1687.001 +CPAR2_801890-T 2313 2113.621 39.653920 1154.000 +CPAR2_801900-T 3738 3538.621 6.321558 308.000 +CPAR2_801910-T 1245 1045.621 48.552156 698.997 +CPAR2_801920-T 3105 2905.621 47.292212 1892.000 +CPAR2_801930-T 1107 907.621 72.578863 907.000 +CPAR2_801940-T 2562 2362.621 67.467520 2194.731 +CPAR2_801950-T 1485 1285.621 61.985764 1097.230 +CPAR2_801960-T 2559 2359.621 44.290783 1438.958 +CPAR2_801970-T 654 454.702 106.543311 667.030 +CPAR2_801980-T 1092 892.621 26.036954 320.000 +CPAR2_801990-T 1305 1105.621 107.084272 1630.139 +CPAR2_802000-T 2067 1867.621 33.793910 869.000 +CPAR2_802010-T 1401 1201.621 1519.897222 25146.316 +CPAR2_802020-T 2952 2752.621 9.663946 366.263 +CPAR2_802030-T 492 292.752 266.447233 1074.000 +CPAR2_802040-T 1809 1609.621 188.834761 4185.026 +CPAR2_802050-T 366 166.819 310.422057 713.000 +CPAR2_802060-T 822 622.667 16.096466 138.000 +CPAR2_802070-T 1734 1534.621 30.525724 645.000 +CPAR2_802080-T 927 727.646 80.854702 810.061 +CPAR2_802090-T 870 670.650 71.583593 661.001 +CPAR2_802100-T 1350 1150.621 53.842360 853.000 +CPAR2_802110-T 1734 1534.621 306.379154 6473.706 +CPAR2_802120-T 1848 1648.621 91.368255 2074.000 +CPAR2_802130-T 1836 1636.621 16.245223 366.072 +CPAR2_802140-T 1113 913.621 18.522396 233.000 +CPAR2_802150-T 864 664.652 84.140283 770.000 +CPAR2_802160-T 744 544.682 57.736718 433.000 +CPAR2_802170-T 1734 1534.621 22.764145 481.000 +CPAR2_802180-T 1014 814.621 54.257927 608.571 +CPAR2_802190-T 1074 874.621 73.656490 887.000 +CPAR2_802200-T 1386 1186.621 56.924671 930.048 +CPAR2_802210-T 1101 901.621 0.080553 1.000 +CPAR2_802220-T 957 757.629 130.769428 1364.128 +CPAR2_802230-T 1014 814.621 28.886617 324.000 +CPAR2_802240-T 1527 1327.621 6.236460 114.000 +CPAR2_802250-T 1083 883.621 39.782002 484.000 +CPAR2_802260-T 1131 931.621 1.559186 20.000 +CPAR2_802270-T 2529 2329.621 399.292410 12807.633 +CPAR2_802280-T 1938 1738.621 55.746033 1334.478 +CPAR2_802290-T 2139 1939.621 96.666800 2581.587 +CPAR2_802300-T 1272 1072.621 105.697313 1561.000 +CPAR2_802310-T 870 670.650 0.433183 4.000 +CPAR2_802320-T 663 463.700 14.096544 90.000 +CPAR2_802330-T 3231 3031.621 16.243397 678.023 +CPAR2_802340-T 1551 1351.621 46.372792 863.000 +CPAR2_802350-T 1044 844.621 207.198736 2409.582 +CPAR2_802360-T 435 235.772 32.960885 107.000 +CPAR2_802370-T 786 586.669 121.569875 982.000 +CPAR2_802380-T 2547 2347.621 14.633243 473.000 +CPAR2_802390-T 810 610.668 22.716202 191.000 +CPAR2_802400-T 1704 1504.621 51.600984 1069.000 +CPAR2_802410-T 1008 808.621 44.819067 499.000 +CPAR2_802420-T 2283 2083.621 23.179836 665.000 +CPAR2_802430-T 2589 2389.621 20.427058 672.090 +CPAR2_802440-T 2751 2551.621 97.272164 3417.412 +CPAR2_802450-T 1881 1681.621 22.719509 526.041 +CPAR2_802460-T 504 304.752 194.946022 818.000 +CPAR2_802470-T 2484 2284.621 107.007454 3366.052 +CPAR2_802480-T 1227 1027.621 10.177400 144.000 +CPAR2_802490-T 1392 1192.621 76.305524 1253.000 +CPAR2_802500-T 1455 1255.621 65.130916 1126.000 +CPAR2_802510-T 744 544.682 7.333763 55.000 +CPAR2_802520-T 432 232.777 11.232313 36.000 +CPAR2_802530-T 576 376.745 64.388230 334.000 +CPAR2_802540-T 1182 982.621 60.904375 824.000 +CPAR2_802550-T 1287 1087.621 114.583864 1715.907 +CPAR2_802560-T 513 313.752 91.899210 397.000 +CPAR2_802570-T 564 364.747 73.276320 368.000 +CPAR2_802580-T 690 490.696 50.175892 339.000 +CPAR2_802590-T 450 250.759 238.079611 822.000 +CPAR2_802600-T 1494 1294.621 112.649283 2008.000 +CPAR2_802610-T 2034 1834.621 112.429950 2840.017 +CPAR2_802620-T 1182 982.621 69.626119 942.000 +CPAR2_802630-T 3183 2983.621 122.304953 5024.354 +CPAR2_802640-T 1734 1534.621 33.980573 718.000 +CPAR2_802650-T 903 703.649 146.460103 1418.953 +CPAR2_802660-T 2586 2386.621 64.929613 2133.629 +CPAR2_802670-T 1689 1489.621 256.848701 5268.000 +CPAR2_802680-T 378 178.817 80.582784 198.401 +CPAR2_802690-T 1347 1147.621 0.506289 8.000 +CPAR2_802700-T 1632 1432.621 8.567671 169.000 +CPAR2_802710-T 1614 1414.621 24.541165 478.000 +CPAR2_802720-T 1578 1378.621 335.570238 6369.729 +CPAR2_802730-T 2343 2143.621 12.570745 371.024 +CPAR2_802740-T 696 496.693 260.420969 1780.971 +CPAR2_802750-T 2724 2524.621 63.807657 2218.000 +CPAR2_802760-T 3279 3079.621 43.865505 1860.000 +CPAR2_802770-T 2448 2248.621 75.838419 2348.000 +CPAR2_802780-T 852 652.654 402.920230 3620.716 +CPAR2_802790-T 660 460.701 128.641885 816.008 +CPAR2_802800-T 2304 2104.621 102.503811 2970.342 +CPAR2_802810-T 1188 988.621 62.318996 848.287 +CPAR2_802820-T 2913 2713.621 19.698632 736.000 +CPAR2_802830-T 1548 1348.621 50.961751 946.296 +CPAR2_802840-T 1710 1510.621 113.128956 2353.000 +CPAR2_802850-T 588 388.744 77.533862 415.000 +CPAR2_802860-T 636 436.717 27.939398 168.000 +CPAR2_802870-T 1128 928.621 40.218953 514.235 +CPAR2_802880-T 1896 1696.621 27.661353 646.176 +CPAR2_802890-T 1668 1468.621 39.365043 796.000 +CPAR2_802900-T 882 682.649 282.659942 2656.773 +CPAR2_802910-T 618 418.744 32.087125 185.000 +CPAR2_802920-T 951 751.633 35.679313 369.245 +CPAR2_802930-T 738 538.684 79.142799 587.000 +CPAR2_802940-T 1110 910.621 24.418409 306.159 +CPAR2_802950-T 1089 889.621 15.838134 194.000 +CPAR2_802960-T 1959 1759.621 56.591506 1371.081 +CPAR2_802970-T 636 436.717 16.297982 98.000 +CPAR2_802980-T 1485 1285.621 18.795883 332.712 +CPAR2_802990-T 1596 1396.621 74.104346 1425.000 +CPAR2_803010-T 3480 3280.621 38.786939 1752.000 +CPAR2_803020-T 1926 1726.621 15.227162 362.000 +CPAR2_803030-T 1947 1747.621 14.178585 341.171 +CPAR2_803040-T 1968 1768.621 9.355795 227.829 +CPAR2_803050-T 1266 1066.621 264.004986 3877.171 +CPAR2_803060-T 1551 1351.621 74.627955 1388.830 +CPAR2_803070-T 261 61.934 52.770846 45.000 +CPAR2_803090-T 1485 1285.621 94.259515 1668.518 +CPAR2_803100-T 3327 3127.621 30.791927 1326.000 +CPAR2_803110-T 603 403.744 209.389036 1164.000 +CPAR2_803120-T 1341 1141.621 27.172286 427.111 +CPAR2_803130-T 2856 2656.621 21.679589 793.000 +CPAR2_803140-T 297 97.907 208.410465 280.947 +CPAR2_803150-T 900 700.649 181.565521 1751.566 +CPAR2_803160-T 2037 1837.621 58.217602 1473.000 +CPAR2_803170-T 2301 2101.621 70.861234 2050.481 +CPAR2_803180-T 3240 3040.621 149.941838 6277.369 +CPAR2_803190-T 1638 1438.621 4.997999 99.000 +CPAR2_803200-T 2400 2200.621 7.293810 221.000 +CPAR2_803210-T 6405 6205.621 36.424781 3112.252 +CPAR2_803220-T 897 697.649 13.647920 131.098 +CPAR2_803230-T 1248 1048.621 171.628769 2478.000 +CPAR2_803240-T 1677 1477.621 313.384481 6375.777 +CPAR2_803245-T 297 97.907 103.112133 139.000 +CPAR2_803250-T 810 610.668 93.957066 790.000 +CPAR2_803260-T 5184 4984.621 34.561788 2372.034 +CPAR2_803270-T 1992 1792.621 67.093318 1656.000 +CPAR2_803280-T 1827 1627.621 41.550150 931.147 +CPAR2_803290-T 717 517.687 27.246680 194.211 +CPAR2_803300-T 1464 1264.621 97.115955 1691.000 +CPAR2_803310-T 651 451.704 37.785141 235.000 +CPAR2_803320-T 1302 1102.621 52.299988 794.000 +CPAR2_803330-T 1548 1348.621 29.296542 544.000 +CPAR2_803340-T 1335 1135.621 75.355925 1178.266 +CPAR2_803350-T 6552 6352.621 17.400799 1522.000 +CPAR2_803360-T 756 556.680 29.877005 229.000 +CPAR2_803370-T 1419 1219.621 67.112959 1127.000 +CPAR2_803380-T 1365 1165.621 2.616973 42.000 +CPAR2_803390-T 2772 2572.621 6.662598 236.000 +CPAR2_803400-T 399 199.815 536.495156 1476.000 +CPAR2_803410-T 393 193.816 133.028995 355.000 +CPAR2_803420-T 156 28.521 827.617316 325.000 +CPAR2_803430-T 534 334.751 299.409108 1380.000 +CPAR2_803440-T 1260 1060.621 132.070354 1928.671 +CPAR2_803450-T 2103 1903.621 94.017843 2464.242 +CPAR2_803460-T 1269 1069.621 97.453607 1435.227 +CPAR2_803470-T 2259 2059.621 11.777865 334.000 +CPAR2_803480-T 510 310.752 316.399628 1353.762 +CPAR2_tS(CGA)1-T 82 1.388 0.000000 0.000 +CPAR2_803490-T 753 553.681 36.072852 275.000 +CPAR2_803500-T 2607 2407.621 173.312261 5745.264 +CPAR2_803510-T 1008 808.621 133.918147 1490.998 +CPAR2_803520-T 5001 4801.621 29.661609 1960.989 +CPAR2_803530-T 1305 1105.621 55.967771 851.995 +CPAR2_803540-T 987 787.623 37.714866 409.000 +CPAR2_803550-T 483 283.753 0.511914 2.000 +CPAR2_803560-T 1593 1393.621 78.537298 1507.000 +CPAR2_803570-T 4032 3832.621 68.232187 3600.623 +CPAR2_803580-T 5013 4813.621 42.809046 2837.265 +CPAR2_803590-T 453 253.759 164.149470 573.526 +CPAR2_803600-T 669 469.699 154.318796 998.000 +CPAR2_803610-T 1104 904.621 35.329850 440.049 +CPAR2_803620-T 555 355.748 21.640690 106.000 +CPAR2_803630-T 1098 898.621 241.104185 2983.143 +CPAR2_803640-T 1287 1087.621 223.693071 3349.830 +CPAR2_803650-T 2376 2176.621 15.148878 454.000 +CPAR2_803660-T 366 166.819 179.282006 411.788 +CPAR2_803670-T 1584 1384.621 52.296380 997.000 +CPAR2_803680-T 2913 2713.621 9.983138 373.000 +CPAR2_803690-T 2211 2011.621 85.278816 2362.000 +CPAR2_803700-T 552 352.749 47.561337 231.000 +CPAR2_803710-T 675 475.697 41.986485 275.000 +CPAR2_803720-T 834 634.664 55.501554 485.000 +CPAR2_803730-T 3240 3040.621 61.196178 2562.000 +CPAR2_803740-T 498 298.752 0.000000 0.000 +CPAR2_803750-T 1014 814.621 101.014005 1133.000 +CPAR2_803760-T 2712 2512.621 201.139434 6958.518 +CPAR2_803770-T 1449 1249.621 29.118351 501.000 +CPAR2_803780-T 687 487.696 222.340094 1493.000 +CPAR2_803790-T 3813 3613.621 23.535410 1171.000 +CPAR2_803800-T 2145 1945.621 48.835767 1308.244 +CPAR2_803810-T 2682 2482.621 60.644965 2072.992 +CPAR2_803820-T 2436 2236.621 110.468491 3401.914 +CPAR2_803830-T 2184 1984.621 80.351435 2195.653 +CPAR2_803840-T 1487 1287.621 288.738337 5119.000 +CPAR2_803850-T 1464 1264.621 58.788387 1023.634 +CPAR2_803860-T 2835 2635.621 116.044794 4211.154 +CPAR2_803870-T 1647 1447.621 222.866824 4442.147 +CPAR2_803880-T 1539 1339.621 48.103790 887.266 +CPAR2_803890-T 1656 1456.621 1441.046936 28901.295 +CPAR2_803900-T 1977 1777.621 65.167180 1595.000 +CPAR2_803910-T 1203 1003.621 39.946310 552.000 +CPAR2_803920-T 858 658.653 79.613767 722.000 +CPAR2_803930-T 864 664.652 51.795447 474.000 +CPAR2_803940-T 753 553.681 72.932748 556.000 +CPAR2_803950-T 2130 1930.621 8.426717 224.000 +CPAR2_803960-T 576 376.745 36.049698 187.000 +CPAR2_803970-T 465 265.756 34.981189 128.000 +CPAR2_803980-T 1293 1093.621 69.266750 1043.000 +CPAR2_803990-T 2745 2545.621 71.041813 2490.006 +CPAR2_804000-T 369 169.818 48.755999 114.000 +CPAR2_804010-T 864 664.652 41.305230 378.000 +CPAR2_804020-T 891 691.649 73.295451 698.000 +CPAR2_804030-T 5187 4987.621 37.350869 2564.996 +CPAR2_804040-T 1221 1021.621 1.066372 15.000 +CPAR2_804050-T 1227 1027.621 3.745849 53.000 +CPAR2_804060-T 6657 6457.621 236.738008 21049.076 +CPAR2_804070-T 1410 1210.621 163.360132 2722.995 +CPAR2_804080-T 636 436.717 172.126651 1035.000 +CPAR2_804090-T 1887 1687.621 20.528200 477.000 +CPAR2_804100-T 1083 883.621 53.426242 650.000 +CPAR2_804110-T 1341 1141.621 41.288595 649.000 +CPAR2_804120-T 1251 1051.621 51.245058 742.000 +CPAR2_804130-T 393 193.816 22.858503 61.000 +CPAR2_804140-T 1230 1030.621 21.637467 307.042 +CPAR2_804150-T 453 253.759 924.173850 3228.994 +CPAR2_804160-T 1452 1252.621 99.097882 1709.136 +CPAR2_804170-T 636 436.717 60.535363 364.000 +CPAR2_804180-T 459 259.757 203.936758 729.383 +CPAR2_804190-T 2442 2242.621 94.339167 2913.000 +CPAR2_804200-T 1119 919.621 995.496301 12604.953 +CPAR2_804210-T 2235 2035.621 127.463042 3572.513 +CPAR2_804220-T 1926 1726.621 4.124942 98.064 +CPAR2_804230-T 1509 1309.621 1.006750 18.153 +CPAR2_804240-T 1209 1009.621 40.572153 564.000 +CPAR2_804250-T 1662 1462.621 136.306929 2745.000 +CPAR2_804260-T 1056 856.621 19.161390 226.000 +CPAR2_804270-T 1137 937.621 65.608997 847.000 +CPAR2_804280-T 1863 1663.621 116.083729 2659.000 +CPAR2_804290-T 900 700.649 3.006110 29.000 +CPAR2_804300-T 2766 2566.621 60.499726 2138.000 +CPAR2_804310-T 1752 1552.621 47.292590 1011.000 +CPAR2_804320-T 225 26.867 810.969959 300.000 +CPAR2_804330-T 477 277.754 199.790106 764.059 +CPAR2_804340-T 1377 1177.621 49.943555 809.800 +CPAR2_804350-T 966 766.625 147.318921 1555.013 +CPAR2_804360-T 1383 1183.621 79.423328 1294.355 +CPAR2_804370-T 1395 1195.621 84.436189 1390.000 +CPAR2_804380-T 714 514.688 42.898021 304.000 +CPAR2_804390-T 1710 1510.621 36.491663 759.000 +CPAR2_804400-T 381 181.817 64.313126 161.000 +CPAR2_804410-T 1467 1267.621 22.287818 389.000 +CPAR2_804420-T 378 178.817 20.651890 50.847 +CPAR2_804430-T 1926 1726.621 83.186818 1977.626 +CPAR2_804440-T 762 562.678 162.894743 1262.000 +CPAR2_804450-T 5157 4957.621 53.035660 3620.210 +CPAR2_804460-T 1950 1750.621 126.043167 3038.114 +CPAR2_804470-T 1011 811.621 16.465383 184.000 +CPAR2_804480-T 1494 1294.621 0.056100 1.000 +CPAR2_804490-T 1935 1735.621 16.863882 403.000 +CPAR2_804500-T 438 238.769 3.954335 13.000 +CPAR2_804510-T 684 484.697 10.339187 69.000 +CPAR2_804520-T 2742 2542.621 130.604792 4572.285 +CPAR2_804530-T 627 427.738 113.424421 668.000 +CPAR2_804540-T 2265 2065.621 67.265974 1913.104 +CPAR2_804550-T 3165 2965.621 40.146631 1639.296 +CPAR2_804560-T 1071 871.621 45.247381 543.018 +CPAR2_804570-T 828 628.666 0.924224 8.000 +CPAR2_804580-T 2079 1879.621 114.584601 2965.440 +CPAR2_804585-T 273 73.920 73.689827 75.000 +CPAR2_804590-T 804 604.669 659.162469 5487.852 +CPAR2_804600-T 1692 1492.621 469.943145 9658.006 +CPAR2_804610-T 1827 1627.621 34.136230 765.000 +CPAR2_804620-T 780 580.671 90.305651 722.001 +CPAR2_804630-T 1800 1600.621 88.254833 1945.000 +CPAR2_804640-T 2799 2599.621 36.849984 1318.985 +CPAR2_804650-T 1044 844.621 65.609987 763.000 +CPAR2_804660-T 2469 2269.621 127.659757 3989.330 +CPAR2_804670-T 993 793.622 23.885493 261.000 +CPAR2_804680-T 2175 1975.621 76.795423 2088.967 +CPAR2_804690-T 2907 2707.621 65.804913 2453.233 +CPAR2_804700-T 3135 2935.621 117.907093 4765.763 +CPAR2_804710-T 507 307.752 76.463139 324.000 +CPAR2_804720-T 1944 1744.621 46.372475 1113.920 +CPAR2_804730-T 1740 1540.621 115.886234 2458.217 +CPAR2_804740-T 2046 1846.621 245.427190 6240.121 +CPAR2_804750-T 1053 853.621 16.165748 190.000 +CPAR2_804760-T 1602 1402.621 48.466638 936.000 +CPAR2_804770-T 3957 3757.621 134.082129 6937.075 +CPAR2_804780-T 3894 3694.621 162.405019 8261.556 +CPAR2_804790-T 1125 925.621 36.929342 470.649 +CPAR2_804800-T 684 484.697 10.039500 67.000 +CPAR2_804810-T 1242 1042.621 33.088302 475.000 +CPAR2_804820-T 522 322.751 101.488392 451.000 +CPAR2_804830-T 1167 967.621 57.795332 770.000 +CPAR2_804840-T 2214 2014.621 94.590165 2623.807 +CPAR2_804850-T 339 139.859 108.013739 208.000 +CPAR2_804860-T 909 709.649 108.587328 1061.000 +CPAR2_804870-T 897 697.649 146.475326 1407.000 +CPAR2_804880-T 204 13.953 114.513354 22.000 +CPAR2_804890-T 780 580.671 61.162624 489.000 +CPAR2_804900-T 1320 1120.621 24.304118 375.000 +CPAR2_804910-T 1572 1372.621 105.030685 1984.995 +CPAR2_804920-T 747 547.682 3.713103 28.000 +CPAR2_804930-T 4149 3949.621 36.317787 1975.001 +CPAR2_804940-T 2250 2050.621 50.895431 1437.000 +CPAR2_804950-T 1386 1186.621 288.806264 4718.580 +CPAR2_804960-T 990 790.622 2.296563 25.000 +CPAR2_804970-T 1686 1486.621 49.593348 1015.117 +CPAR2_804980-T 2106 1906.621 227.759160 5979.059 +CPAR2_804990-T 2868 2668.621 372.438045 13684.643 +CPAR2_805000-T 2325 2125.621 171.216871 5011.006 +CPAR2_805010-T 1023 823.621 126.487335 1434.390 +CPAR2_805020-T 1938 1738.621 64.181791 1536.418 +CPAR2_805030-T 927 727.646 94.223545 944.000 +CPAR2_805040-T 642 442.713 1903.895136 11605.339 +CPAR2_805050-T 738 538.684 170.420376 1264.003 +CPAR2_805060-T 867 667.651 100.732432 926.000 +CPAR2_805070-T 747 547.682 61.796650 466.000 +CPAR2_805080-T 3663 3463.621 29.188807 1392.000 +CPAR2_805090-T 747 547.682 0.000000 0.000 +CPAR2_805100-T 2868 2668.621 61.854535 2272.746 +CPAR2_805110-T 1392 1192.621 56.110991 921.389 +CPAR2_805120-T 507 307.752 18.171781 77.000 +CPAR2_805130-T 765 565.676 24.394574 190.000 +CPAR2_805140-T 1026 826.621 20.208292 230.000 +CPAR2_805150-T 1116 916.621 7.527333 95.000 +CPAR2_805160-T 738 538.684 34.278072 254.240 +CPAR2_805170-T 441 241.766 22.230200 74.000 +CPAR2_805180-T 1326 1126.621 54.667015 848.000 +CPAR2_805190-T 255 55.942 216.811996 167.000 +CPAR2_805200-T 948 748.635 117.484687 1211.000 +CPAR2_805210-T 1023 823.621 189.419145 2148.048 +CPAR2_805220-T 1833 1633.621 59.218898 1332.000 +CPAR2_805230-T 1971 1771.621 2.582719 63.000 +CPAR2_805240-T 2325 2125.621 311.659430 9121.341 +CPAR2_805250-T 360 160.822 27.548190 61.000 +CPAR2_805260-T 1653 1453.621 79.660722 1594.366 +CPAR2_805270-T 2361 2161.621 59.325673 1765.691 +CPAR2_805280-T 1146 946.621 20.945661 273.000 +CPAR2_805290-T 1452 1252.621 488.141820 8418.958 +CPAR2_805300-T 1515 1315.621 34.006136 616.000 +CPAR2_805310-T 2448 2248.621 43.555256 1348.495 +CPAR2_805320-T 1257 1057.621 54.799950 798.000 +CPAR2_805330-T 1485 1285.621 96.828665 1713.995 +CPAR2_805340-T 1098 898.621 8.991706 111.253 +CPAR2_805350-T 1707 1507.621 93.747145 1946.000 +CPAR2_805360-T 741 541.683 45.721081 341.000 +CPAR2_805370-T 1071 871.621 70.660298 848.000 +CPAR2_805380-T 1365 1165.621 80.876935 1298.000 +CPAR2_805390-T 2223 2023.621 45.813151 1276.474 +CPAR2_805400-T 2268 2068.621 29.794185 848.604 +CPAR2_805410-T 2268 2068.621 14.057768 400.396 +CPAR2_805420-T 2268 2068.621 53.401939 1521.005 +CPAR2_805430-T 465 265.756 372.495540 1363.002 +CPAR2_805440-T 2064 1864.621 45.533534 1169.000 +CPAR2_805450-T 4590 4390.621 7.890416 477.000 +CPAR2_805460-T 705 505.690 12.782425 89.000 +CPAR2_805470-T 492 292.752 47.136848 190.000 +CPAR2_805480-T 1488 1288.621 104.719576 1858.000 +CPAR2_805490-T 2898 2698.621 12.649210 470.000 +CPAR2_805500-T 1515 1315.621 386.553407 7002.174 +CPAR2_805510-T 1122 922.621 0.078720 1.000 +CPAR2_805520-T 3909 3709.621 24.341044 1243.258 +CPAR2_805530-T 336 136.862 30.248210 57.000 +CPAR2_805540-T 2133 1933.621 59.195989 1576.000 +CPAR2_805550-T 366 166.819 45.714328 105.000 +CPAR2_805560-T 795 595.669 90.725439 744.092 +CPAR2_805570-T 498 298.752 50.323019 207.000 +CPAR2_805580-T 984 784.623 58.408475 631.000 +CPAR2_805590-T 675 475.697 26.260638 172.000 +CPAR2_805600-T 1308 1108.621 67.609464 1032.008 +CPAR2_805610-T 798 598.669 72.911373 601.000 +CPAR2_805620-T 2298 2098.621 31.493056 910.000 +CPAR2_805630-T 1221 1021.621 31.292397 440.171 +CPAR2_805640-T 3039 2839.621 17.545720 686.000 +CPAR2_805650-T 1707 1507.621 145.951511 3029.656 +CPAR2_805660-T 747 547.682 36.202758 273.000 +CPAR2_805670-T 579 379.745 112.649940 589.000 +CPAR2_805680-T 3123 2923.621 122.039704 4912.638 +CPAR2_805690-T 1881 1681.621 62.090238 1437.620 +CPAR2_805700-T 2841 2641.621 101.672581 3698.000 +CPAR2_805710-T 2925 2725.621 161.354954 6055.365 +CPAR2_805720-T 831 631.666 4.254240 37.000 +CPAR2_805730-T 534 334.751 32.544468 150.000 +CPAR2_805740-T 1383 1183.621 97.320621 1586.026 +CPAR2_805750-T 1140 940.621 44.552128 577.000 +CPAR2_805760-T 351 151.833 167.899655 351.000 +CPAR2_tV(UAC)1-T 73 73.000 0.000000 0.000 +CPAR2_805770-T 990 790.622 68.070140 741.000 +CPAR2_805780-T 804 604.669 36.394247 303.000 +CPAR2_805790-T 636 436.717 48.894161 294.001 +CPAR2_805800-T 1821 1621.621 288.492654 6441.347 +CPAR2_805810-T 945 745.640 74.234452 762.127 +CPAR2_805820-T 1455 1255.621 24.409633 422.000 +CPAR2_805830-T 1164 964.621 156.984461 2085.000 +CPAR2_805840-T 885 685.649 8.156357 77.000 +CPAR2_805850-T 2514 2314.621 184.513079 5880.302 +CPAR2_805860-T 1107 907.621 29.527667 369.000 +CPAR2_805870-T 2628 2428.621 35.377932 1183.000 +CPAR2_805880-T 1725 1525.621 100.282002 2106.504 +CPAR2_805890-T 2508 2308.621 193.178017 6140.488 +CPAR2_805900-T 2724 2524.621 540.820681 18799.315 +CPAR2_805910-T 606 406.744 208.277743 1166.425 +CPAR2_tV(AAC)1-T 74 74.000 0.000000 0.000 +CPAR2_805920-T 171 16.642 1653.976238 379.000 +CPAR2_805930-T 2460 2260.621 16.834917 524.000 +CPAR2_805940-T 1713 1513.621 109.929775 2291.000 +CPAR2_805950-T 321 121.885 119.175530 200.000 +CPAR2_805960-T 579 379.745 491.346834 2569.050 +CPAR2_805970-T 1770 1570.621 105.868855 2289.456 +CPAR2_805980-T 3402 3202.621 102.726675 4529.824 +CPAR2_805990-T 1269 1069.621 17.246904 254.000 +CPAR2_806000-T 2445 2245.621 48.800969 1508.890 +CPAR2_806010-T 1044 844.621 508.990347 5919.215 +CPAR2_806020-T 3474 3274.621 73.659488 3321.102 +CPAR2_806030-T 2952 2752.621 26.176434 992.086 +CPAR2_806040-T 861 661.653 0.000000 0.000 +CPAR2_806050-T 642 442.713 492.816369 3004.000 +CPAR2_806060-T 2721 2521.621 47.639055 1654.000 +CPAR2_806070-T 3399 3199.621 36.734577 1618.326 +CPAR2_806080-T 2298 2098.621 38.726077 1119.000 +CPAR2_806090-T 483 283.753 79.401338 310.214 +CPAR2_806100-T 381 181.817 186.148551 466.000 +CPAR2_806110-T 3468 3268.621 30.685738 1381.000 +CPAR2_806120-T 2301 2101.621 34.732850 1005.049 +CPAR2_806130-T 1476 1276.621 51.315897 902.000 +CPAR2_806140-T 354 154.828 413.739704 882.000 +CPAR2_806150-T 879 679.649 54.210916 507.299 +CPAR2_806160-T 972 772.624 13.066345 139.000 +CPAR2_806170-T 4365 4165.621 27.321008 1567.000 +CPAR2_806180-T 843 643.659 448.314079 3973.113 +CPAR2_806190-T 1020 820.621 7.168853 81.000 +CPAR2_806200-T 858 658.653 117.766625 1068.000 +CPAR2_806210-T 1104 904.621 27.779008 346.000 +CPAR2_806220-T 1740 1540.621 27.342585 580.000 +CPAR2_806230-T 1170 970.621 34.957815 467.183 +CPAR2_806240-T 987 787.623 67.130616 728.000 +CPAR2_806250-T 1305 1105.621 150.827801 2296.045 +CPAR2_806260-T 2643 2443.621 9.035732 304.011 +CPAR2_806270-T 702 502.691 27.162157 188.000 +CPAR2_806280-T 957 757.629 29.238218 305.000 +CPAR2_806290-T 1674 1474.621 35.861121 728.110 +CPAR2_806300-T 1581 1381.621 105.976357 2016.000 +CPAR2_806310-T 684 484.697 1051.866281 7019.776 +CPAR2_806320-T 1491 1291.621 153.697605 2733.347 +CPAR2_806330-T 126 18.528 262.633236 67.000 +CPAR2_806340-T 720 520.687 57.468252 412.000 +CPAR2_806350-T 675 475.697 47.177541 309.000 +CPAR2_806360-T 1134 934.621 78.175336 1006.000 +CPAR2_806370-T 2058 1858.621 89.410387 2288.081 +CPAR2_806380-T 3315 3115.621 62.520381 2682.000 +CPAR2_806390-T 4923 4723.621 13.699671 891.000 +CPAR2_806400-T 6822 6622.621 5.486145 500.253 +CPAR2_806410-T 5016 4816.621 43.292495 2871.095 +CPAR2_806420-T 5145 4945.621 5.653890 385.000 +CPAR2_806430-T 1374 1174.621 18.116622 293.000 +CPAR2_806440-T 879 679.649 38.363402 359.000 +CPAR2_806450-T 792 592.669 23.406087 191.000 +CPAR2_806460-T 834 634.664 81.593006 713.000 +CPAR2_806470-T 393 193.816 96.305498 257.000 +CPAR2_806480-T 2565 2365.621 56.516640 1840.832 +CPAR2_806490-T 1203 1003.621 3947.135287 54543.678 +CPAR2_806500-T 1458 1258.621 106.176943 1840.000 +CPAR2_806510-T 183 8.453 3015.914758 351.000 +CPAR2_806520-T 1887 1687.621 249.050535 5787.020 +CPAR2_806530-T 3030 2830.621 13.111326 511.000 +CPAR2_806540-T 1533 1333.621 165.433597 3037.727 +CPAR2_806550-T 474 274.755 3463.567523 13102.716 +CPAR2_806560-T 1530 1330.621 86.731509 1589.000 +CPAR2_806570-T 1095 895.621 456.978516 5635.244 +CPAR2_806580-T 1542 1342.621 617.100244 11407.797 +CPAR2_806590-T 1485 1285.621 34.743177 615.000 +CPAR2_806600-T 711 511.689 67.420967 475.000 +CPAR2_806610-T 618 418.744 25.378198 146.319 +CPAR2_806620-T 1152 952.621 445.900336 5848.583 +CPAR2_806630-T 939 739.643 11.518741 117.306 +CPAR2_806640-T 2970 2770.621 29.700259 1133.000 +CPAR2_806650-T 1731 1531.621 91.493618 1929.455 +CPAR2_806660-T 2655 2455.621 5.501220 186.000 +CPAR2_806670-T 1569 1369.621 159.561887 3009.000 +CPAR2_806680-T 1392 1192.621 132.497659 2175.721 +CPAR2_806690-T 3516 3316.621 12.875155 587.951 +CPAR2_806700-T 3501 3301.621 63.972372 2908.119 +CPAR2_806710-T 1068 868.621 14.297927 171.000 +CPAR2_806720-T 1059 859.621 16.306381 193.000 +CPAR2_806730-T 960 760.627 53.758156 563.000 +CPAR2_806740-T 1509 1309.621 58.488016 1054.642 +CPAR2_806750-T 2430 2230.621 131.102821 4026.525 +CPAR2_806760-T 1650 1450.621 112.197722 2240.942 +CPAR2_806770-T 897 697.649 53.509821 514.000 +CPAR2_806780-T 1689 1489.621 575.988533 11813.599 +CPAR2_806790-T 1956 1756.621 141.277930 3417.000 +CPAR2_806800-T 981 781.623 36.517644 393.000 +CPAR2_806810-T 1119 919.621 115.305835 1460.000 +CPAR2_806820-T 1233 1033.621 130.453211 1856.559 +CPAR2_806830-T 1926 1726.621 4.290526 102.000 +CPAR2_806840-T 2130 1930.621 34.797827 925.000 +CPAR2_806850-T 1785 1585.621 121.107060 2644.000 +CPAR2_806860-T 2847 2647.621 19.618930 715.194 +CPAR2_806870-T 2007 1807.621 78.007162 1941.487 +CPAR2_806880-T 936 736.645 76.410185 775.000 +CPAR2_806890-T 1755 1555.621 145.223883 3110.530 +CPAR2_806900-T 1320 1120.621 0.324055 5.000 +CPAR2_806910-T 804 604.669 94.649066 788.000 +CPAR2_806920-T 735 535.684 89.354700 659.051 +CPAR2_806930-T 744 544.682 5.733670 43.000 +CPAR2_806940-T 744 544.682 3.066846 23.000 +CPAR2_806950-T 1395 1195.621 107.823192 1775.000 +CPAR2_806960-T 2184 1984.621 73.558637 2010.036 +CPAR2_806970-T 2196 1996.621 29.246092 804.000 +CPAR2_806980-T 1626 1426.621 220.584243 4332.871 +CPAR2_806990-T 1245 1045.621 0.138919 2.000 +CPAR2_807000-T 987 787.623 15.676105 170.000 +CPAR2_807010-T 996 796.622 51.784975 568.000 +CPAR2_807020-T 840 640.661 397.004161 3502.000 +CPAR2_807030-T 2391 2191.621 136.953878 4132.685 +CPAR2_807040-T 756 556.680 613.349383 4701.174 +CPAR2_807050-T 2823 2623.621 19.739550 713.068 +CPAR2_807060-T 1392 1192.621 30.692725 504.000 +CPAR2_807070-T 1212 1012.621 81.334480 1134.003 +CPAR2_807080-T 228 29.478 347.402974 141.000 +CPAR2_807090-T 1035 835.621 163.093296 1876.455 +CPAR2_807100-T 1509 1309.621 33.053800 596.018 +CPAR2_807110-T 2103 1903.621 92.591080 2426.846 +CPAR2_807120-T 366 166.819 26.122473 60.000 +CPAR2_807130-T 1176 976.621 32.721615 440.001 +CPAR2_807140-T 1263 1063.621 68.969142 1010.030 +CPAR2_807150-T 2139 1939.621 84.250646 2250.001 +CPAR2_807160-T 945 745.640 123.143112 1264.247 +CPAR2_807170-T 1452 1252.621 86.922520 1499.148 +CPAR2_807180-T 1596 1396.621 35.102059 675.000 +CPAR2_807190-T 2097 1897.621 236.217402 6171.830 +CPAR2_807200-T 2130 1930.621 3.989380 106.046 +CPAR2_807210-T 1278 1078.621 167.191898 2483.000 +CPAR2_807220-T 333 133.864 110.680967 204.000 +CPAR2_807230-T 2268 2068.621 66.923073 1906.116 +CPAR2_807240-T 2265 2065.621 98.063029 2789.000 +CPAR2_807250-T 975 775.624 76.971187 822.000 +CPAR2_807260-T 3378 3178.621 54.907616 2403.056 +CPAR2_807270-T 3387 3187.621 58.032294 2547.000 +CPAR2_807280-T 777 577.671 310.515188 2469.768 +CPAR2_807290-T 1419 1219.621 243.868745 4095.186 +CPAR2_807300-T 2085 1885.621 53.041507 1377.092 +CPAR2_807310-T 1074 874.621 118.380587 1425.585 +CPAR2_807320-T 2589 2389.621 37.509167 1234.125 +CPAR2_807330-T 1131 931.621 46.463967 596.003 +CPAR2_807340-T 1668 1468.621 42.678163 862.995 +CPAR2_807350-T 3990 3790.621 63.713518 3325.328 +CPAR2_807360-T 4290 4090.621 150.948318 8501.784 +CPAR2_807370-T 1014 814.621 89.334539 1002.000 +CPAR2_807380-T 1479 1279.621 201.103923 3543.191 +CPAR2_tK(CUU)2-T 74 74.000 0.000000 0.000 +CPAR2_807390-T 1218 1018.621 4.206750 59.000 +CPAR2_807400-T 5655 5455.621 180.430647 13553.361 +CPAR2_807410-T 5418 5218.621 43.125605 3098.728 +CPAR2_807420-T 855 655.653 306.542929 2767.310 +CPAR2_807430-T 1800 1600.621 28.132646 620.000 +CPAR2_807440-T 1452 1252.621 47.022805 811.000 +CPAR2_807450-T 1056 856.621 106.260833 1253.299 +CPAR2_807460-T 5853 5653.621 53.670493 4177.869 +CPAR2_807470-T 1644 1444.621 74.105602 1474.000 +CPAR2_807480-T 1848 1648.621 14.802186 336.000 +CPAR2_807490-T 1278 1078.621 138.844005 2062.000 +CPAR2_807500-T 780 580.671 45.778160 366.000 +CPAR2_807510-T 168 20.414 6126.837921 1722.109 +CPAR2_807520-T 1797 1597.621 246.244074 5416.667 +CPAR2_807530-T 1692 1492.621 283.077361 5817.646 +CPAR2_807540-T 1059 859.621 102.654161 1215.000 +CPAR2_807550-T 1485 1285.621 71.068157 1258.000 +CPAR2_807560-T 429 229.782 261.178095 826.313 +CPAR2_807570-T 339 139.859 57.122650 110.000 +CPAR2_807580-T 765 565.676 248.874380 1938.387 +CPAR2_807590-T 1707 1507.621 553.696928 11493.622 +CPAR2_tY(GUA)1-T 75 75.000 0.000000 0.000 +CPAR2_807600-T 2175 1975.621 929.983934 25297.153 +CPAR2_807610-T 576 376.745 77.111653 400.000 +CPAR2_807620-T 582 382.745 11.385433 60.000 +CPAR2_807630-T 609 409.744 76.218939 430.000 +CPAR2_807640-T 987 787.623 97.007429 1052.000 +CPAR2_807650-T 2460 2260.621 98.229752 3057.478 +CPAR2_807660-T 1038 838.621 16.714711 193.000 +CPAR2_807670-T 3948 3748.621 5.250555 271.000 +CPAR2_807680-T 1242 1042.621 36.640940 526.000 +CPAR2_807690-T 168 20.414 188.560886 53.000 +CPAR2_807700-T 2136 1936.621 1557.405507 41527.800 +CPAR2_807710-T 2136 1936.621 256.141079 6829.933 +CPAR2_807720-T 2136 1936.621 847.191018 22590.121 +CPAR2_807730-T 1599 1399.621 58.689419 1131.001 +CPAR2_807740-T 1599 1399.621 0.000000 0.000 +CPAR2_807750-T 1116 916.621 375.559800 4739.817 +CPAR2_807760-T 627 427.738 122.253867 720.000 +CPAR2_807770-T 780 580.671 94.933398 759.000 +CPAR2_807780-T 912 712.649 21.707577 213.000 +CPAR2_807790-T 1800 1600.621 92.669971 2042.303 +CPAR2_807800-T 984 784.623 45.819761 495.001 +CPAR2_807810-T 1365 1165.621 29.098250 467.000 +CPAR2_807820-T 2313 2113.621 66.525121 1936.000 +CPAR2_807830-T 732 532.685 65.172577 478.000 +CPAR2_807840-T 267 67.926 98.369213 92.000 +CPAR2_807850-T 1140 940.621 22.160244 287.000 +CPAR2_807860-T 2190 1990.621 31.085542 852.000 +CPAR2_807870-T 936 736.645 226.855358 2300.909 +CPAR2_807880-T 1089 889.621 352.991820 4323.768 +CPAR2_807890-T 2850 2650.621 0.054801 2.000 +CPAR2_807900-T 2832 2632.621 9.758575 353.726 +CPAR2_807910-T 2838 2638.621 8.127468 295.274 +CPAR2_807920-T 1494 1294.621 123.344909 2198.652 +CPAR2_807930-T 1878 1678.621 37.820393 874.120 +CPAR2_807940-T 1491 1291.621 24.012783 427.042 +CPAR2_807950-T 1236 1036.621 90.170791 1287.000 +CPAR2_807960-T 2361 2161.621 29.634590 882.005 +CPAR2_807970-T 996 796.622 25.527805 280.000 +CPAR2_807980-T 747 547.682 226.442364 1707.571 +CPAR2_807990-T 966 766.625 47.653234 503.000 +CPAR2_808000-T 1338 1138.621 55.621658 871.999 +CPAR2_808010-T 3387 3187.621 22.966844 1008.000 +CPAR2_808020-T 1077 877.621 270.159302 3264.522 +CPAR2_808030-T 651 451.704 369.490447 2298.000 +CPAR2_808040-T 1440 1240.621 39.867165 681.000 +CPAR2_808050-T 417 217.801 465.888713 1397.124 +CPAR2_808060-T 1029 829.621 41.854681 478.098 +CPAR2_808070-T 927 727.646 23.356260 234.000 +CPAR2_808080-T 1365 1165.621 62.901930 1009.518 +CPAR2_808090-T 2088 1888.621 50.954024 1325.000 +CPAR2_808100-T 1047 847.621 734.825139 8575.875 +CPAR2_808110-T 2202 2002.621 25.577171 705.251 +CPAR2_808120-T 2229 2029.621 1.959147 54.749 +CPAR2_808130-T 1548 1348.621 103.252234 1917.264 +CPAR2_808140-T 804 604.669 105.103392 875.037 +CPAR2_808150-T 756 556.680 62.232887 477.000 +CPAR2_808160-T 4896 4696.621 20.768158 1343.000 +CPAR2_808170-T 795 595.669 140.704674 1154.000 +CPAR2_808180-T 2430 2230.621 30.052690 923.000 +CPAR2_808190-T 1788 1588.621 22.630404 495.000 +CPAR2_808200-T 1479 1279.621 52.046958 917.000 +CPAR2_808210-T 1020 820.621 123.729093 1398.000 +CPAR2_808220-T 1374 1174.621 45.136976 730.000 +CPAR2_808230-T 3654 3454.621 21.108382 1004.033 +CPAR2_808240-T 1053 853.621 61.855257 727.000 +CPAR2_808250-T 342 142.854 331.491877 652.014 +CPAR2_808260-T 234 35.101 74.489226 36.000 +CPAR2_808270-T 936 736.645 6.211409 63.000 +CPAR2_808280-T 2505 2305.621 299.214132 9498.665 +CPAR2_808290-T 1965 1765.621 178.442983 4338.000 +CPAR2_808300-T 1308 1108.621 40.552244 619.000 +CPAR2_808310-T 456 256.758 0.567866 2.008 +CPAR2_808320-T 282 82.914 31.527751 35.992 +CPAR2_808330-T 1584 1384.621 0.681899 13.000 +CPAR2_808340-T 468 268.755 4.864328 18.000 +CPAR2_808350-T 477 277.754 3.137823 12.000 +CPAR2_808360-T 480 280.753 35.182091 136.000 +CPAR2_808370-T 480 280.753 165.304090 639.000 +CPAR2_808380-T 1317 1117.621 103.586012 1594.000 +CPAR2_808390-T 1557 1357.621 2.674846 50.000 +CPAR2_808400-T 1668 1468.621 4.253007 86.000 +CPAR2_808410-T 1557 1357.621 8.131533 152.000 +CPAR2_808420-T 1335 1135.621 95.037006 1486.000 +CPAR2_808430-T 1650 1450.621 104.485859 2086.912 +CPAR2_808440-T 1188 988.621 213.381342 2904.551 +CPAR2_808450-T 4248 4048.621 136.860811 7629.196 +CPAR2_808460-T 648 448.708 92.422977 571.000 +CPAR2_808470-T 3000 2800.621 86.710463 3343.631 +CPAR2_808480-T 1500 1300.621 44.728994 801.000 +CPAR2_808490-T 1851 1651.621 307.857010 7000.870 +CPAR2_808500-T 2592 2392.621 74.356494 2449.545 +CPAR2_808510-T 798 598.669 208.246556 1716.551 +CPAR2_808520-T 1884 1684.621 54.211034 1257.426 +CPAR2_808530-T 207 15.353 832.593171 176.000 +CPAR2_808540-T 846 646.657 45.265931 403.031 +CPAR2_808550-T 939 739.643 26.414201 269.000 +CPAR2_808560-T 981 781.623 2.323005 25.000 +CPAR2_808570-T 1401 1201.621 68.366536 1131.107 +CPAR2_808580-T 885 685.649 74.042773 699.000 +CPAR2_808590-T 2412 2212.621 39.292004 1197.027 +CPAR2_808600-T 1551 1351.621 134.328003 2499.851 +CPAR2_808610-T 3984 3784.621 36.994444 1927.753 +CPAR2_tW(CCA)1-T 73 73.000 0.000000 0.000 +CPAR2_808620-T 1503 1303.621 397.971083 7143.244 +CPAR2_808630-T 162 26.415 225.456920 82.000 +CPAR2_808640-T 1482 1282.621 92.582048 1635.000 +CPAR2_808650-T 1116 916.621 49.283309 621.988 +CPAR2_808660-T 852 652.654 178.607471 1605.000 +CPAR2_808670-T 1011 811.621 1594.168664 17814.772 +CPAR2_808680-T 813 613.668 2.248681 19.000 +CPAR2_808690-T 2304 2104.621 55.801202 1617.000 +CPAR2_808700-T 690 490.696 303.237861 2048.746 +CPAR2_808710-T 1947 1747.621 89.651072 2157.224 +CPAR2_808720-T 1005 805.621 20.103949 223.000 +CPAR2_808730-T 2733 2533.621 159.573052 5566.648 +CPAR2_808740-T 1731 1531.621 99.770424 2104.000 +CPAR2_808750-T 888 688.649 864.234206 8194.492 +CPAR2_808760-T 1674 1474.621 87.324421 1773.000 +CPAR2_808770-T 1002 802.621 25.517955 282.000 +CPAR2_808780-T 309 109.900 188.345642 285.000 +CPAR2_808790-T 627 427.738 85.408154 503.001 +CPAR2_808800-T 2013 1813.621 67.958334 1697.000 +CPAR2_808810-T 3420 3220.621 128.464972 5696.615 +CPAR2_808820-T 1461 1261.621 33.964642 589.995 +CPAR2_808830-T 1551 1351.621 50.026732 931.000 +CPAR2_808840-T 1002 802.621 43.796774 484.000 +CPAR2_808850-T 396 196.816 0.000000 0.000 +CPAR2_808860-T 663 463.700 237.761712 1518.000 +CPAR2_808870-T 411 211.806 402.565528 1174.000 +CPAR2_808880-T 2220 2020.621 77.104212 2145.139 +CPAR2_808890-T 3279 3079.621 8.632098 366.021 +CPAR2_808900-T 414 214.804 79.457200 235.000 +CPAR2_808910-T 1047 847.621 34.616802 404.000 +CPAR2_808920-T 2655 2455.621 22.418952 758.000 +CPAR2_808930-T 420 220.797 170.531335 518.429 +CPAR2_808940-T 1926 1726.621 78.701968 1871.006 +CPAR2_808950-T 828 628.666 62.261015 538.926 +CPAR2_808960-T 1305 1105.621 51.961006 791.000 +CPAR2_808970-T 3822 3622.621 31.445969 1568.485 +CPAR2_808980-T 1455 1255.621 130.582489 2257.544 +CPAR2_808990-T 5397 5197.621 19.157566 1371.000 +CPAR2_809000-T 690 490.696 827.222847 5588.910 +CPAR2_809010-T 279 79.915 8.179394 9.000 +CPAR2_809020-T 1932 1732.621 208.522893 4974.505 +CPAR2_809030-T 1038 838.621 56.301548 650.098 +CPAR2_809040-T 3450 3250.621 190.100365 8508.281 +CPAR2_809050-T 1656 1456.621 54.198887 1087.000 +CPAR2_809060-T 1116 916.621 8.240448 104.000 +CPAR2_200010-T 1872 1672.621 12.071317 278.000 +CPAR2_200020-T 2247 2047.621 12.131217 342.016 +CPAR2_200030-T 387 187.816 361.178015 934.000 +CPAR2_200040-T 399 199.815 142.483808 392.000 +CPAR2_200050-T 579 379.745 45.007233 235.324 +CPAR2_200060-T 1035 835.621 43.457821 500.000 +CPAR2_200070-T 1785 1585.621 17.726336 387.000 +CPAR2_200080-T 1530 1330.621 24.562101 450.000 +CPAR2_200090-T 963 763.626 9.511012 100.000 +CPAR2_200100-T 729 529.685 84.463817 616.001 +CPAR2_200110-T 5241 5041.621 103.985719 7218.325 +CPAR2_200120-T 1125 925.621 59.048902 752.554 +CPAR2_200130-T 996 796.622 88.162096 967.000 +CPAR2_200140-T 1287 1087.621 116.994073 1752.000 +CPAR2_200150-T 1425 1225.621 5.866598 99.000 +CPAR2_200160-T 633 433.718 41.529034 248.000 +CPAR2_200170-T 2013 1813.621 45.212115 1129.000 +CPAR2_200180-T 423 223.791 29.532857 91.000 +CPAR2_200190-T 1098 898.621 53.019372 656.000 +CPAR2_200200-T 2487 2287.621 39.685639 1250.000 +CPAR2_200210-T 1260 1060.621 51.321806 749.471 +CPAR2_200220-T 1629 1429.621 5.131069 101.000 +CPAR2_200230-T 777 577.671 29.130971 231.701 +CPAR2_200240-T 3042 2842.621 33.153098 1297.584 +CPAR2_200250-T 1062 862.621 68.314806 811.386 +CPAR2_200260-T 357 157.823 179.933130 390.999 +CPAR2_200270-T 471 271.755 174.251884 652.000 +CPAR2_200280-T 1104 904.621 43.994392 547.970 +CPAR2_200290-T 486 286.753 76.743629 303.000 +CPAR2_200300-T 1071 871.621 51.828662 622.000 +CPAR2_200310-T 1698 1498.621 5.814020 119.967 +CPAR2_200320-T 1509 1309.621 12.311606 222.000 +CPAR2_200330-T 702 502.691 11.702844 81.000 +CPAR2_200340-T 3015 2815.621 31.908248 1237.000 +CPAR2_200350-T 891 691.649 82.851161 789.000 +CPAR2_200360-T 642 442.713 134.031616 817.000 +CPAR2_200370-T 390 190.816 54.048127 142.000 +CPAR2_200380-T 1542 1342.621 75.083310 1388.000 +CPAR2_200390-T 987 787.623 33.213219 360.182 +CPAR2_200400-T 2622 2422.621 11.332188 378.000 +CPAR2_200410-T 549 349.750 50.253437 242.000 +CPAR2_200420-T 1659 1459.621 110.414113 2219.000 +CPAR2_200430-T 780 580.671 262.411421 2098.000 +CPAR2_200440-T 576 376.745 26.410741 137.000 +CPAR2_200450-T 609 409.744 40.945523 231.000 +CPAR2_200460-T 828 628.666 56.262142 487.000 +CPAR2_200470-T 846 646.657 130.733353 1164.000 +CPAR2_200480-T 918 718.649 46.589900 461.000 +CPAR2_200490-T 312 112.898 604.067126 939.000 +CPAR2_200500-T 978 778.623 0.746225 8.000 +CPAR2_200510-T 509 309.752 6.490381 27.681 +CPAR2_200520-T 708 508.689 276.772944 1938.513 +CPAR2_200530-T 945 745.640 22.860210 234.694 +CPAR2_200540-T 1149 949.621 60.114543 786.000 +CPAR2_200550-T 1878 1678.621 68.067651 1573.208 +CPAR2_200560-T 1140 940.621 68.719921 890.000 +CPAR2_200570-T 795 595.669 58.819014 482.409 +CPAR2_200580-T 1023 823.621 56.260226 638.001 +CPAR2_200590-T 807 607.668 114.823540 960.705 +CPAR2_200600-T 3792 3592.621 26.240419 1298.000 +CPAR2_200610-T 324 124.880 91.891090 158.000 +CPAR2_200620-T 1164 964.621 48.940000 650.000 +CPAR2_200630-T 2022 1822.621 58.552084 1469.370 +CPAR2_200640-T 2055 1855.621 195.385674 4992.000 +CPAR2_200650-T 1563 1363.621 359.009595 6740.504 +CPAR2_200660-T 1464 1264.621 44.566518 776.000 +CPAR2_200670-T 783 583.670 3.857465 31.000 +CPAR2_200680-T 633 433.718 73.680545 440.000 +CPAR2_200690-T 2163 1963.621 126.100826 3409.323 +CPAR2_200700-T 1536 1336.621 83.422072 1535.260 +CPAR2_200710-T 282 82.914 812.009471 927.000 +CPAR2_200720-T 1437 1237.621 44.658523 761.000 +CPAR2_200730-T 1272 1072.621 82.675477 1221.000 +CPAR2_200740-T 1632 1432.621 34.851570 687.458 +CPAR2_200750-T 399 199.815 4.725228 13.000 +CPAR2_200760-T 4182 3982.621 41.288762 2264.088 +CPAR2_200770-T 2238 2038.621 33.889221 951.241 +CPAR2_200780-T 444 244.764 114.240700 385.000 +CPAR2_200790-T 2643 2443.621 80.533712 2709.593 +CPAR2_200800-T 1506 1306.621 82.568689 1485.449 +CPAR2_200810-T 945 745.640 0.389617 4.000 +CPAR2_200820-T 2088 1888.621 24.188740 629.000 +CPAR2_200830-T 1710 1510.621 2291.260425 47656.548 +CPAR2_200840-T 807 607.668 1147.131065 9597.811 +CPAR2_200850-T 357 157.823 29.912269 65.000 +CPAR2_200860-T 861 661.653 157.473388 1434.596 +CPAR2_200870-T 576 376.745 282.614801 1466.003 +CPAR2_200880-T 1704 1504.621 28.578082 592.042 +CPAR2_200890-T 324 124.880 8539.423506 14682.913 +CPAR2_200900-T 894 694.649 58.659489 561.043 +CPAR2_200910-T 561 361.747 77.341025 385.219 +CPAR2_200920-T 2175 1975.621 85.176418 2316.944 +CPAR2_200930-T 1290 1090.621 37.770429 567.177 +CPAR2_200940-T 1002 802.621 27.056271 299.000 +CPAR2_200950-T 2010 1810.621 7.019690 175.000 +CPAR2_200960-T 1749 1549.621 17.903802 382.000 +CPAR2_200970-T 1797 1597.621 3.591375 79.000 +CPAR2_200980-T 2721 2521.621 6.653345 231.000 +CPAR2_200990-T 1992 1792.621 44.812833 1106.072 +CPAR2_201000-T 996 796.622 219.083265 2403.000 +CPAR2_201010-T 444 244.764 192.577180 649.000 +CPAR2_201020-T 537 337.751 2066.282303 9609.000 +CPAR2_201030-T 3399 3199.621 20.832369 917.761 +CPAR2_201040-T 1020 820.621 27.190233 307.219 +CPAR2_201050-T 1371 1171.621 57.186822 922.520 +CPAR2_201060-T 1944 1744.621 53.994098 1297.000 +CPAR2_201070-T 1041 841.621 50.224279 582.000 +CPAR2_201080-T 885 685.649 46.395901 438.000 +CPAR2_201090-T 771 571.671 42.433365 334.000 +CPAR2_201100-T 2496 2296.621 32.288201 1021.000 +CPAR2_201110-T 618 418.744 255.829784 1475.000 +CPAR2_201120-T 885 685.649 55.293745 522.000 +CPAR2_201130-T 810 610.668 170.787781 1436.000 +CPAR2_201140-T 561 361.747 43.523506 216.781 +CPAR2_201150-T 894 694.649 32.413517 310.016 +CPAR2_201160-T 324 124.880 8459.463699 14545.428 +CPAR2_201170-T 1575 1375.621 173.210879 3280.700 +CPAR2_201180-T 1317 1117.621 298.126039 4587.617 +CPAR2_201190-T 339 139.859 116.841785 225.000 +CPAR2_201200-T 606 406.744 144.277048 808.000 +CPAR2_201210-T 1131 931.621 64.316439 825.000 +CPAR2_201220-T 1092 892.621 161.673213 1987.000 +CPAR2_201230-T 1200 1000.621 165.562890 2281.000 +CPAR2_201240-T 1332 1132.621 267.362135 4169.435 +CPAR2_201250-T 495 295.752 67.041218 273.000 +CPAR2_201260-T 996 796.622 75.153050 824.311 +CPAR2_201270-T 1176 976.621 89.538075 1204.000 +CPAR2_201280-T 1656 1456.621 44.677237 896.036 +CPAR2_tM(CAU)4-T 74 74.000 0.000000 0.000 +CPAR2_201290-T 348 148.838 816.372482 1673.000 +CPAR2_201300-T 2739 2539.621 29.147522 1019.209 +CPAR2_201310-T 645 445.710 139.339540 855.105 +CPAR2_201320-T 684 484.697 44.682559 298.195 +CPAR2_201330-T 351 151.833 110.883007 231.805 +CPAR2_201340-T 987 787.623 23.421946 254.000 +CPAR2_201350-T 936 736.645 76.508779 776.000 +CPAR2_201360-T 2640 2440.621 86.209593 2897.000 +CPAR2_201370-T 948 748.635 37.350623 385.000 +CPAR2_201380-T 936 736.645 117.523794 1192.000 +CPAR2_201390-T 1350 1150.621 87.738430 1390.000 +CPAR2_201400-T 2508 2308.621 82.540992 2623.704 +CPAR2_201410-T 858 658.653 98.469660 893.000 +CPAR2_201420-T 2058 1858.621 123.778930 3167.599 +CPAR2_201430-T 2022 1822.621 7.093018 178.000 +CPAR2_201440-T 1596 1396.621 26.833574 516.000 +CPAR2_201450-T 903 703.649 28.178244 273.000 +CPAR2_201460-T 1020 820.621 52.928428 598.032 +CPAR2_201470-T 318 118.893 80.635262 132.000 +CPAR2_201480-T 4623 4423.621 38.139832 2323.000 +CPAR2_201490-T 651 451.704 103.065003 641.000 +CPAR2_201500-T 1701 1501.621 109.285211 2259.510 +CPAR2_201510-T 1791 1591.621 167.809999 3677.478 +CPAR2_201520-T 1272 1072.621 63.789406 942.079 +CPAR2_201530-T 2511 2311.621 45.211780 1439.000 +CPAR2_201540-T 1998 1798.621 224.111330 5550.039 +CPAR2_201550-T 561 361.747 227.285673 1132.061 +CPAR2_201560-T 330 130.868 2820.387335 5082.000 +CPAR2_201570-T 1131 931.621 336.392474 4314.974 +CPAR2_201580-T 360 160.822 59.160867 131.000 +CPAR2_201590-T 1926 1726.621 12.114427 288.000 +CPAR2_201600-T 981 781.623 74.447828 801.202 +CPAR2_201610-T 2058 1858.621 49.705413 1272.000 +CPAR2_201620-T 453 253.759 113.912011 398.000 +CPAR2_201630-T 1602 1402.621 42.100886 813.063 +CPAR2_201640-T 708 508.689 18.275320 128.000 +CPAR2_201650-T 573 373.745 17.683694 91.000 +CPAR2_201660-T 1527 1327.621 150.512619 2751.311 +CPAR2_201670-T 2622 2422.621 8.094420 270.000 +CPAR2_201680-T 2034 1834.621 26.088342 659.000 +CPAR2_201690-T 414 214.804 694.803354 2054.928 +CPAR2_201700-T 390 190.816 15.986066 42.000 +CPAR2_201710-T 1674 1474.621 38.072068 773.000 +CPAR2_201720-T 735 535.684 112.396564 829.000 +CPAR2_201730-T 1461 1261.621 18.076240 314.000 +CPAR2_201740-T 576 376.745 0.192779 1.000 +CPAR2_201750-T 405 205.812 104.102028 295.000 +CPAR2_201760-T 4791 4591.621 45.333331 2866.000 +CPAR2_201770-T 4113 3913.621 45.662453 2460.541 +CPAR2_201780-T 2139 1939.621 60.420062 1613.580 +CPAR2_201790-T 1734 1534.621 76.526038 1616.974 +CPAR2_201800-T 2253 2053.621 111.792232 3161.000 +CPAR2_201810-T 1200 1000.621 54.437601 750.000 +CPAR2_201820-T 687 487.696 53.313968 358.000 +CPAR2_201830-T 1707 1507.621 64.071790 1330.000 +CPAR2_201840-T 378 178.817 140.125656 345.000 +CPAR2_201850-T 1422 1222.621 104.367268 1756.907 +CPAR2_201860-T 1296 1096.621 110.536860 1669.000 +CPAR2_201870-T 975 775.624 2.434612 26.000 +CPAR2_201880-T 2703 2503.621 10.849518 374.000 +CPAR2_201890-T 450 250.759 40.837071 140.995 +CPAR2_201900-T 1698 1498.621 0.581914 12.007 +CPAR2_201910-T 804 604.669 107.460793 894.664 +CPAR2_201920-T 2337 2137.621 72.205669 2125.174 +CPAR2_201930-T 900 700.649 708.347839 6833.445 +CPAR2_201940-T 3834 3634.621 40.384495 2021.000 +CPAR2_201950-T 780 580.671 104.014812 831.607 +CPAR2_201960-T 804 604.669 66.102527 550.336 +CPAR2_201970-T 768 568.674 19.029626 149.000 +CPAR2_201980-T 1623 1423.621 52.292194 1025.000 +CPAR2_201990-T 972 772.624 203.797379 2168.000 +CPAR2_202000-T 2442 2242.621 75.166909 2321.000 +CPAR2_202010-T 666 466.700 170.716778 1097.000 +CPAR2_202020-T 471 271.755 57.193103 214.000 +CPAR2_202030-T 540 340.750 89.719050 420.934 +CPAR2_202040-T 474 274.755 52.867933 200.000 +CPAR2_202050-T 1659 1459.621 7.911602 159.000 +CPAR2_202060-T 222 24.450 151.492444 51.000 +CPAR2_202070-T 450 250.759 223.307969 770.999 +CPAR2_202080-T 291 91.909 222.051827 281.000 +CPAR2_202090-T 1254 1054.621 14.324328 208.000 +CPAR2_202100-T 3138 2938.621 114.060583 4615.000 +CPAR2_202110-T 759 559.679 79.708776 614.240 +CPAR2_202120-T 1746 1546.621 8.688521 185.022 +CPAR2_202130-T 1485 1285.621 130.282090 2306.165 +CPAR2_202140-T 1212 1012.621 106.580857 1486.000 +CPAR2_202150-T 1662 1462.621 47.917893 964.988 +CPAR2_202160-T 2334 2134.621 69.715382 2049.000 +CPAR2_202170-T 1890 1690.621 52.281944 1217.000 +CPAR2_202180-T 1422 1222.621 90.591018 1524.999 +CPAR2_202190-T 915 715.649 56.527866 557.000 +CPAR2_202200-T 1383 1183.621 46.143713 752.000 +CPAR2_202210-T 1425 1225.621 55.642669 938.981 +CPAR2_202220-T 2778 2578.621 27.011414 959.019 +CPAR2_202230-T 1644 1444.621 123.947729 2465.387 +CPAR2_202240-T 615 415.744 176.267866 1009.002 +CPAR2_202250-T 1773 1573.621 117.714419 2550.483 +CPAR2_202260-T 2034 1834.621 67.261139 1699.038 +CPAR2_202270-T 522 322.751 66.608790 296.000 +CPAR2_202280-T 474 274.755 117.102472 443.000 +CPAR2_202290-T 1854 1654.621 66.499979 1515.000 +CPAR2_202300-T 1335 1135.621 42.849794 670.000 +CPAR2_202310-T 2619 2419.621 10.325677 344.000 +CPAR2_202320-T 606 406.744 41.783205 234.000 +CPAR2_202330-T 978 778.623 43.001237 461.000 +CPAR2_202340-T 1305 1105.621 61.945928 943.000 +CPAR2_202350-T 1440 1240.621 66.787235 1140.841 +CPAR2_202360-T 762 562.678 111.135003 861.000 +CPAR2_202370-T 654 454.702 60.534276 378.984 +CPAR2_202380-T 1611 1411.621 32.465241 631.000 +CPAR2_202390-T 801 601.669 56.855316 471.000 +CPAR2_202400-T 1005 805.621 69.507374 771.000 +CPAR2_202410-T 1326 1126.621 48.155967 747.000 +CPAR2_202420-T 2088 1888.621 134.554967 3498.945 +CPAR2_202430-T 2364 2164.621 78.949852 2353.021 +CPAR2_202440-T 1791 1591.621 112.528132 2466.002 +CPAR2_202450-T 1890 1690.621 359.012061 8356.952 +CPAR2_202460-T 291 91.909 535.769177 678.000 +CPAR2_202470-T 1560 1360.621 89.933321 1684.808 +CPAR2_202480-T 1905 1705.621 54.930631 1290.000 +CPAR2_202490-T 516 316.752 354.232563 1544.899 +CPAR2_202500-T 2700 2500.621 15.829095 545.000 +CPAR2_202510-T 999 799.621 18.529054 204.000 +CPAR2_202520-T 414 214.804 302.275474 894.000 +CPAR2_202530-T 741 541.683 142.495266 1062.768 +CPAR2_202540-T 1482 1282.621 24.971672 441.000 +CPAR2_202550-T 186 8.379 372.714289 43.000 +CPAR2_202560-T 783 583.670 64.830302 521.000 +CPAR2_202570-T 1392 1192.621 61.750839 1014.000 +CPAR2_202580-T 1626 1426.621 55.440438 1089.000 +CPAR2_202590-T 549 349.750 111.928110 539.000 +CPAR2_202600-T 975 775.624 167.145460 1785.000 +CPAR2_202610-T 1884 1684.621 113.708948 2637.482 +CPAR2_202620-T 999 799.621 272.197888 2996.827 +CPAR2_202630-T 486 286.753 26.847606 106.000 +CPAR2_202640-T 843 643.659 298.002822 2641.003 +CPAR2_202650-T 1593 1393.621 0.573265 11.000 +CPAR2_202660-T 594 394.744 94.570266 514.000 +CPAR2_202670-T 2904 2704.621 25.082068 934.033 +CPAR2_202680-T 2094 1894.621 36.417379 950.000 +CPAR2_202690-T 1980 1780.621 78.207049 1917.388 +CPAR2_202700-T 990 790.622 191.074078 2080.000 +CPAR2_202710-T 1761 1561.621 467.889284 10060.309 +CPAR2_202720-T 921 721.648 63.606163 632.000 +CPAR2_202730-T 1188 988.621 47.237670 643.000 +CPAR2_202740-T 756 556.680 47.229151 362.000 +CPAR2_202750-T 3759 3559.621 92.848681 4550.635 +CPAR2_202760-T 1830 1630.621 56.922665 1278.000 +CPAR2_202770-T 1812 1612.621 86.922582 1930.001 +CPAR2_202780-T 2406 2206.621 60.100829 1826.000 +CPAR2_202790-T 939 739.643 42.027055 428.000 +CPAR2_202800-T 2961 2761.621 376.367261 14310.950 +CPAR2_202810-T 1287 1087.621 61.448341 920.196 +CPAR2_202820-T 1383 1183.621 58.220318 948.811 +CPAR2_202830-T 759 559.679 73.838086 569.000 +CPAR2_202840-T 1665 1465.621 62.984148 1271.000 +CPAR2_202850-T 2166 1966.621 115.777535 3135.000 +CPAR2_202860-T 1083 883.621 42.740994 520.000 +CPAR2_202870-T 342 142.854 8.643003 17.000 +CPAR2_202880-T 330 130.868 74.921741 135.000 +CPAR2_202890-T 324 124.880 75.025003 129.000 +CPAR2_202900-T 318 118.893 252.807345 413.846 +CPAR2_202910-T 4446 4246.621 64.323151 3761.000 +CPAR2_202920-T 1794 1594.621 259.373985 5694.774 +CPAR2_202930-T 1896 1696.621 225.333568 5263.848 +CPAR2_202940-T 2340 2140.621 174.926672 5155.709 +CPAR2_202950-T 1155 955.621 646.293574 8503.705 +CPAR2_202960-T 531 331.751 27.803483 127.000 +CPAR2_202970-T 2034 1834.621 43.784076 1106.000 +CPAR2_202980-T 1344 1144.621 33.629585 530.000 +CPAR2_202990-T 648 448.708 89.347606 552.000 +CPAR2_203000-T 633 433.718 31.146776 186.000 +CPAR2_203010-T 2613 2413.621 12.698453 422.000 +CPAR2_203020-T 1926 1726.621 83.959714 1996.000 +CPAR2_203030-T 2832 2632.621 15.256231 553.004 +CPAR2_203040-T 1689 1489.621 75.182365 1542.000 +CPAR2_203050-T 1287 1087.621 471.299285 7057.762 +CPAR2_203060-T 1212 1012.621 10.184712 142.000 +CPAR2_203070-T 1233 1033.621 55.018377 783.000 +CPAR2_203080-T 1380 1180.621 176.711258 2872.548 +CPAR2_203090-T 411 211.806 46.291606 135.000 +CPAR2_203100-T 1734 1534.621 9.281512 196.116 +CPAR2_203110-T 1134 934.621 28.603738 368.087 +CPAR2_203120-T 462 262.756 27.641029 100.000 +CPAR2_203130-T 858 658.653 124.492996 1129.000 +CPAR2_203140-T 3126 2926.621 54.845114 2210.024 +CPAR2_203150-T 1644 1444.621 6.133570 122.000 +CPAR2_203160-T 6627 6427.621 60.316334 5337.989 +CPAR2_203170-T 1275 1075.621 36.124500 535.000 +CPAR2_203180-T 684 484.697 56.790607 379.000 +CPAR2_203190-T 1083 883.621 51.618305 628.004 +CPAR2_203200-T 1617 1417.621 16.548162 323.000 +CPAR2_203210-T 312 112.898 447.233401 695.208 +CPAR2_203220-T 411 211.806 90.457171 263.800 +CPAR2_203230-T 462 262.756 6.357437 23.000 +CPAR2_203240-T 876 676.649 46.078642 429.295 +CPAR2_203250-T 2142 1942.621 60.160687 1609.139 +CPAR2_203260-T 216 20.259 315.473169 88.000 +CPAR2_203270-T 1878 1678.621 385.202739 8902.964 +CPAR2_203280-T 1734 1534.621 13.766592 290.884 +CPAR2_203290-T 2358 2158.621 113.407814 3370.637 +CPAR2_203300-T 1896 1696.621 48.501200 1133.000 +CPAR2_203310-T 1014 814.621 11.233685 126.000 +CPAR2_203320-T 432 232.777 85.798657 274.988 +CPAR2_203330-T 1518 1318.621 5.783313 105.000 +CPAR2_203340-T 1632 1432.621 72.900384 1437.983 +CPAR2_203350-T 1113 913.621 508.547222 6397.202 +CPAR2_tH(GUG)1-T 72 72.000 0.000000 0.000 +CPAR2_203360-T 1560 1360.621 49.260874 922.852 +CPAR2_203370-T 3135 2935.621 27.437151 1109.000 +CPAR2_203380-T 2583 2383.621 44.089865 1447.000 +CPAR2_203390-T 891 691.649 105.532848 1005.000 +CPAR2_203400-T 708 508.689 44.688868 313.000 +CPAR2_203410-T 276 76.917 58.543356 62.000 +CPAR2_203420-T 1155 955.621 21.584400 284.000 +CPAR2_203430-T 1458 1258.621 83.960572 1455.000 +CPAR2_203440-T 1140 940.621 52.499709 679.930 +CPAR2_203450-T 1152 952.621 1591.409140 20873.471 +CPAR2_203460-T 1809 1609.621 17.416909 386.000 +CPAR2_203470-T 1599 1399.621 100.075559 1928.551 +CPAR2_203480-T 1362 1162.621 470.517096 7531.929 +CPAR2_203490-T 2130 1930.621 61.281796 1629.000 +CPAR2_203500-T 1551 1351.621 14.400821 268.000 +CPAR2_203510-T 1539 1339.621 12.090111 223.000 +CPAR2_203520-T 1509 1309.621 158.559121 2859.101 +CPAR2_203530-T 1569 1369.621 4.454370 84.000 +CPAR2_203540-T 3672 3472.621 695.137562 33236.913 +CPAR2_203550-T 1437 1237.621 396.104318 6749.784 +CPAR2_203560-T 1428 1228.621 2.129636 36.026 +CPAR2_203570-T 3630 3430.621 58.842201 2779.420 +CPAR2_203580-T 477 277.754 3287.983622 12574.259 +CPAR2_203590-T 1680 1480.621 69.851136 1424.000 +CPAR2_203600-T 423 223.791 23.691193 73.000 +CPAR2_203610-T 693 493.695 1067.292411 7254.954 +CPAR2_203620-T 1161 961.621 0.226582 3.000 +CPAR2_203630-T 789 589.669 76.733919 623.000 +CPAR2_203640-T 1506 1306.621 96.162079 1730.000 +CPAR2_203650-T 654 454.702 174.902118 1095.000 +CPAR2_203660-T 4884 4684.621 59.698985 3850.649 +CPAR2_203670-T 1011 811.621 55.302209 618.000 +CPAR2_203680-T 2781 2581.621 47.454248 1686.787 +CPAR2_203690-T 612 412.744 295.446889 1679.009 +CPAR2_203700-T 390 190.816 0.380621 1.000 +CPAR2_203710-T 378 178.817 55.237940 136.000 +CPAR2_203720-T 3645 3445.621 3.351484 159.000 +CPAR2_203730-T 1359 1159.621 126.452308 2018.996 +CPAR2_203740-T 918 718.649 103.488194 1024.000 +CPAR2_203750-T 2307 2107.621 57.291776 1662.560 +CPAR2_203760-T 306 106.902 708.610431 1043.000 +CPAR2_203770-T 1026 826.621 1.493653 17.000 +CPAR2_203780-T 1569 1369.621 13.893391 262.000 +CPAR2_203790-T 3153 2953.621 21.294654 866.000 +CPAR2_203800-T 210 16.856 176.659119 41.000 +CPAR2_203810-T 2523 2323.621 22.851508 731.093 +CPAR2_203820-T 1776 1576.621 43.301999 940.000 +CPAR2_203830-T 1518 1318.621 118.530374 2152.000 +CPAR2_203840-T 291 91.909 36.350121 46.000 +CPAR2_203850-T 1458 1258.621 0.807868 14.000 +CPAR2_203860-T 1425 1225.621 11.555421 195.000 +CPAR2_203870-T 1443 1243.621 0.175203 3.000 +CPAR2_tR(ACG)1-T 72 72.000 0.000000 0.000 +CPAR2_tR(ACG)2-T 72 72.000 0.000000 0.000 +CPAR2_203880-T 771 571.671 134.922855 1062.000 +CPAR2_203890-T 1476 1276.621 13.426332 236.000 +CPAR2_203900-T 1149 949.621 224.394735 2933.970 +CPAR2_203910-T 1332 1132.621 588.093782 9171.151 +CPAR2_203920-T 1041 841.621 48.777526 565.235 +CPAR2_203930-T 1089 889.621 23.757201 291.000 +CPAR2_203940-T 786 586.669 5.570921 45.000 +CPAR2_203950-T 855 655.653 41.096746 371.000 +CPAR2_203960-T 444 244.764 59.642547 201.000 +CPAR2_203970-T 1110 910.621 98.413446 1233.914 +CPAR2_203980-T 1506 1306.621 51.694065 930.000 +CPAR2_203990-T 1926 1726.621 66.770254 1587.350 +CPAR2_204000-T 2934 2734.621 36.140336 1360.761 +CPAR2_204010-T 4083 3883.621 45.930270 2456.000 +CPAR2_204020-T 333 133.864 367.851450 678.000 +CPAR2_204030-T 447 247.762 15.536370 53.000 +CPAR2_204040-T 576 376.745 57.640960 299.000 +CPAR2_204050-T 1590 1390.621 37.029243 709.000 +CPAR2_204060-T 267 67.926 146.484588 137.000 +CPAR2_204070-T 3990 3790.621 84.383101 4404.112 +CPAR2_204080-T 744 544.682 153.475665 1151.000 +CPAR2_204090-T 156 28.521 502.410374 197.293 +CPAR2_204100-T 324 124.880 82.004074 141.000 +CPAR2_204110-T 360 160.822 774.058980 1714.000 +CPAR2_204120-T 1962 1762.621 7.746514 188.000 +CPAR2_204130-T 747 547.682 0.000000 0.000 +CPAR2_tS(GCU)1-T 82 1.388 0.000000 0.000 +CPAR2_204130.1-T 165 23.765 21.392816 7.000 +CPAR2_204140-T 1344 1144.621 10.215780 161.000 +CPAR2_204150-T 831 631.666 157.406520 1368.997 +CPAR2_204160-T 813 613.668 446.777328 3775.000 +CPAR2_204170-T 1818 1618.621 52.690800 1174.282 +CPAR2_204180-T 774 574.671 505.784047 4002.000 +CPAR2_204190-T 621 421.743 96.607399 560.984 +CPAR2_204200-T 981 781.623 53.337825 574.017 +CPAR2_204210-T 1563 1363.621 23.740548 445.735 +CPAR2_204220-T 1581 1381.621 64.409270 1225.265 +CPAR2_204230-T 1152 952.621 24.168318 317.000 +CPAR2_204240-T 753 553.681 28.210432 215.061 +CPAR2_204250-T 489 289.753 59.501201 237.381 +CPAR2_204260-T 1422 1222.621 21.860663 368.000 +CPAR2_204270-T 1140 940.621 245.075242 3173.999 +CPAR2_204280-T 1290 1090.621 2.730344 41.000 +CPAR2_204290-T 2190 1990.621 6.239000 171.000 +CPAR2_204300-T 2430 2230.621 103.448608 3177.189 +CPAR2_204310-T 738 538.684 85.749268 636.000 +CPAR2_204320-T 5754 5554.621 30.806856 2356.103 +CPAR2_204330-T 2691 2491.621 204.476315 7014.836 +CPAR2_204340-T 807 607.668 0.358560 3.000 +CPAR2_204350-T 1839 1639.621 370.965401 8374.704 +CPAR2_204360-T 1383 1183.621 109.975214 1792.256 +CPAR2_204370-T 2784 2584.621 3.596835 128.000 +CPAR2_204380-T 2778 2578.621 114.458714 4063.768 +CPAR2_204390-T 2001 1801.621 2.015645 50.000 +CPAR2_204400-T 498 298.752 40.112551 165.000 +CPAR2_204410-T 609 409.744 0.531760 3.000 +CPAR2_204420-T 2115 1915.621 200.364376 5284.728 +CPAR2_204430-T 2115 1915.621 52.636884 1388.329 +CPAR2_204440-T 1287 1087.621 233.518640 3496.969 +CPAR2_204450-T 897 697.649 90.571097 870.000 +CPAR2_204460-T 510 310.752 252.646722 1080.986 +CPAR2_204470-T 660 460.701 11.981239 76.000 +CPAR2_204480-T 855 655.653 69.361978 626.164 +CPAR2_204490-T 864 664.652 53.434543 489.000 +CPAR2_204500-T 2775 2575.621 53.632472 1901.964 +CPAR2_204510-T 561 361.747 0.401543 2.000 +CPAR2_204520-T 2499 2299.621 43.615901 1381.000 +CPAR2_204530-T 1356 1156.621 43.202086 688.000 +CPAR2_204540-T 3450 3250.621 72.704062 3254.000 +CPAR2_204550-T 1227 1027.621 123.332491 1745.031 +CPAR2_204560-T 1320 1120.621 78.810152 1216.000 +CPAR2_204570-T 2097 1897.621 75.975299 1985.064 +CPAR2_tC(GCA)1-T 74 74.000 0.000000 0.000 +CPAR2_204580-T 774 574.671 399.622478 3162.000 +CPAR2_204590-T 2430 2230.621 35.725347 1097.223 +CPAR2_204600-T 1680 1480.621 55.772993 1137.000 +CPAR2_204610-T 837 637.664 181.553335 1594.000 +CPAR2_204620-T 645 445.710 18.739270 115.000 +CPAR2_204630-T 1128 928.621 681.734649 8716.589 +CPAR2_204640-T 1614 1414.621 44.923681 875.000 +CPAR2_204650-T 1332 1132.621 47.580242 742.000 +CPAR2_204660-T 633 433.718 84.900082 507.000 +CPAR2_204670-T 1659 1459.621 35.875308 720.989 +CPAR2_204680-T 2244 2044.621 145.657369 4100.510 +CPAR2_204690-T 699 499.693 78.051087 537.000 +CPAR2_204700-T 972 772.624 14.288377 152.000 +CPAR2_204710-T 2841 2641.621 16.166446 588.000 +CPAR2_204720-T 564 364.747 262.440734 1318.000 +CPAR2_204730-T 837 637.664 143.967011 1264.000 +CPAR2_204740-T 1248 1048.621 117.654342 1698.710 +CPAR2_204750-T 768 568.674 55.556290 435.000 +CPAR2_204760-T 2496 2296.621 8.917995 282.000 +CPAR2_204770-T 1887 1687.621 19.194082 446.000 +CPAR2_204780-T 1548 1348.621 130.851488 2429.748 +CPAR2_204790-T 1401 1201.621 53.387626 883.285 +CPAR2_204800-T 777 577.671 121.326054 965.000 +CPAR2_204810-T 789 589.669 27.343387 222.000 +CPAR2_204820-T 3237 3037.621 26.142221 1093.374 +CPAR2_tS(AGA)1-T 82 1.388 52.332247 1.000 +CPAR2_204830-T 591 391.744 2132.191186 11500.626 +CPAR2_204840-T 1485 1285.621 0.169479 3.000 +CPAR2_204850-T 2805 2605.621 34.438427 1235.512 +CPAR2_204860-T 477 277.754 172.123653 658.254 +CPAR2_204870-T 390 190.816 697.245480 1831.865 +CPAR2_204880-T 1650 1450.621 66.792681 1334.060 +CPAR2_204890-T 882 682.649 90.114214 847.000 +CPAR2_204900-T 1083 883.621 49.256703 599.272 +CPAR2_204910-T 369 169.818 17.535052 41.000 +CPAR2_204920-T 822 622.667 29.160265 250.000 +CPAR2_204930-T 1149 949.621 29.139492 381.000 +CPAR2_204940-T 1896 1696.621 25.128159 587.000 +CPAR2_204950-T 2019 1819.621 15.287105 383.000 +CPAR2_204960-T 1452 1252.621 23.424431 404.000 +CPAR2_204970-T 2268 2068.621 222.519265 6337.838 +CPAR2_204980-T 864 664.652 167.515654 1533.000 +CPAR2_204990-T 2763 2563.621 53.926486 1903.481 +CPAR2_205000-T 1860 1660.621 6.123009 140.000 +CPAR2_205010-T 975 775.624 119.015060 1271.000 +CPAR2_205020-T 1056 856.621 148.627952 1753.000 +CPAR2_205030-T 1068 868.621 60.536253 724.000 +CPAR2_205040-T 837 637.664 115.150829 1011.000 +CPAR2_205050-T 1383 1183.621 140.559540 2290.686 +CPAR2_205060-T 1050 850.621 84.016830 984.000 +CPAR2_205070-T 2049 1849.621 223.693523 5696.771 +CPAR2_205080-T 2295 2095.621 6.584886 190.000 +CPAR2_205090-T 1122 922.621 0.472319 6.000 +CPAR2_205100-T 1347 1147.621 18.036561 285.000 +CPAR2_205110-T 2580 2380.621 338.893176 11108.250 +CPAR2_205120-T 1605 1405.621 18.291209 354.000 +CPAR2_205130-T 3978 3778.621 32.963696 1714.991 +CPAR2_205140-T 1335 1135.621 22.703995 355.000 +CPAR2_205150-T 282 82.914 102.486632 117.000 +CPAR2_205160-T 3111 2911.621 17.535895 703.000 +CPAR2_205170-T 1131 931.621 0.864754 11.092 +CPAR2_205180-T 2175 1975.621 50.189071 1365.229 +CPAR2_205190-T 609 409.744 91.285474 515.000 +CPAR2_205200-T 1152 952.621 91.870105 1205.000 +CPAR2_205210-T 3279 3079.621 82.689875 3506.244 +CPAR2_205220-T 1335 1135.621 15.541045 243.000 +CPAR2_205230-T 522 322.751 272.260244 1209.886 +CPAR2_205240-T 837 637.664 83.828892 736.000 +CPAR2_205250-T 2847 2647.621 52.531574 1915.000 +CPAR2_205260-T 2373 2173.621 92.828355 2778.159 +CPAR2_205270-T 1653 1453.621 21.084760 422.000 +CPAR2_205280-T 621 421.743 111.420273 647.000 +CPAR2_205290-T 375 175.818 206.545320 500.000 +CPAR2_205300-T 2349 2149.621 47.667603 1410.840 +CPAR2_205310-T 396 196.816 274.549669 744.000 +CPAR2_205320-T 2400 2200.621 13.201466 400.000 +CPAR2_205330-T 1563 1363.621 134.749179 2529.953 +CPAR2_205340-T 1491 1291.621 85.560618 1521.604 +CPAR2_205350-T 1029 829.621 65.132910 744.000 +CPAR2_205360-T 1098 898.621 78.815760 975.174 +CPAR2_205370-T 1827 1627.621 91.045069 2040.339 +CPAR2_205380-T 1464 1264.621 17.114462 298.000 +CPAR2_205390-T 978 778.623 34.809506 373.180 +CPAR2_205400-T 6660 6460.621 2.147171 191.000 +CPAR2_205410-T 1626 1426.621 11.098270 218.000 +CPAR2_205420-T 1323 1123.621 62.634163 969.000 +CPAR2_205430-T 474 274.755 22.997551 87.000 +CPAR2_205440-T 4392 4192.621 12.732369 735.000 +CPAR2_205450-T 3078 2878.621 0.933522 37.000 +CPAR2_205460-T 216 20.259 146.981817 41.000 +CPAR2_205470-T 1989 1789.621 22.488034 554.122 +CPAR2_205480-T 1068 868.621 187.284119 2239.876 +CPAR2_205490-T 789 589.669 7.151476 58.063 +CPAR2_205500-T 828 628.666 127.311870 1102.000 +CPAR2_205510-T 2379 2179.621 66.609971 1999.000 +CPAR2_205520-T 729 529.685 20.156117 147.000 +CPAR2_205530-T 1791 1591.621 278.375796 6100.476 +CPAR2_205540-T 2316 2116.621 52.211390 1521.601 +CPAR2_205550-T 7266 7066.621 36.629564 3563.987 +CPAR2_205560-T 810 610.668 52.923783 444.988 +CPAR2_205570-T 810 610.668 41.984747 353.012 +CPAR2_205580-T 1800 1600.621 15.200704 335.000 +CPAR2_205590-T 1062 862.621 31.241603 371.062 +CPAR2_205600-T 414 214.804 75.737926 224.000 +CPAR2_205610-T 4557 4357.621 55.274069 3316.373 +CPAR2_205620-T 360 160.822 355.868422 788.000 +CPAR2_205630-T 879 679.649 29.707612 278.000 +CPAR2_205640-T 2886 2686.621 92.755122 3431.127 +CPAR2_205650-T 1251 1051.621 18.508997 268.000 +CPAR2_205660-T 1320 1120.621 87.650048 1352.395 +CPAR2_205670-T 1842 1642.621 352.351742 7969.047 +CPAR2_205680-T 840 640.661 34.689684 306.000 +CPAR2_205690-T 1086 886.621 268.684558 3279.997 +CPAR2_tK(UUU)1-T 74 74.000 0.000000 0.000 +CPAR2_205700-T 2373 2173.621 537.792309 16095.000 +CPAR2_205710-T 291 91.909 218.890947 277.000 +CPAR2_205720-T 2373 2173.621 47.031077 1407.542 +CPAR2_205730-T 1368 1168.621 62.211081 1001.000 +CPAR2_205740-T 477 277.754 257.707739 985.554 +CPAR2_205750-T 3756 3556.621 26.628547 1304.000 +CPAR2_205760-T 804 604.669 36.874699 307.000 +CPAR2_205770-T 2277 2077.621 37.264758 1066.000 +CPAR2_205780-T 1071 871.621 381.298967 4576.000 +CPAR2_205790-T 1794 1594.621 79.588326 1747.429 +CPAR2_205800-T 855 655.653 62.721490 566.217 +CPAR2_205810-T 1839 1639.621 41.328133 933.000 +CPAR2_205820-T 858 658.653 523.790391 4750.142 +CPAR2_205830-T 1398 1198.621 145.296869 2397.898 +CPAR2_205840-T 528 328.751 46.614705 211.000 +CPAR2_205850-T 1989 1789.621 23.660009 583.000 +CPAR2_205860-T 486 286.753 58.507519 231.000 +CPAR2_205870-T 1545 1345.621 84.847013 1571.998 +CPAR2_205875-T 309 109.900 0.000000 0.000 +CPAR2_205880-T 171 16.642 104.737282 24.000 +CPAR2_205890-T 2313 2113.621 110.443914 3214.115 +CPAR2_205900-T 1086 886.621 0.982993 12.000 +CPAR2_205910-T 1431 1231.621 22.526496 382.000 +CPAR2_205920-T 2601 2401.621 56.550349 1869.960 +CPAR2_205930-T 1593 1393.621 51.645960 991.000 +CPAR2_205940-T 1479 1279.621 234.920942 4139.003 +CPAR2_205950-T 2946 2746.621 21.894703 828.000 +CPAR2_tG(GCC)1-T 71 71.000 0.000000 0.000 +CPAR2_205960-T 708 508.689 225.564212 1579.848 +CPAR2_205970-T 2139 1939.621 51.970509 1387.926 +CPAR2_205980-T 2403 2203.621 36.386443 1104.000 +CPAR2_205990-T 2175 1975.621 518.173938 14095.217 +CPAR2_206000-T 1164 964.621 96.834603 1286.115 +CPAR2_206010-T 2859 2659.621 29.410567 1077.000 +CPAR2_206020-T 1458 1258.621 121.007092 2097.000 +CPAR2_206030-T 894 694.649 35.754962 341.975 +CPAR2_206040-T 993 793.622 74.310424 812.000 +CPAR2_206050-T 1293 1093.621 33.338359 502.000 +CPAR2_206060-T 1254 1054.621 92.372767 1341.322 +CPAR2_206070-T 732 532.685 7.771625 57.000 +CPAR2_206080-T 4425 4225.621 22.412865 1304.009 +CPAR2_206090-T 1644 1444.621 24.735379 492.000 +CPAR2_tS(AGA)2-T 82 1.388 0.000000 0.000 +CPAR2_206100-T 708 508.689 0.142776 1.000 +CPAR2_206110-T 573 373.745 49.358883 254.000 +CPAR2_206120-T 822 622.667 31.827935 272.871 +CPAR2_206130-T 3939 3739.621 142.663259 7345.684 +CPAR2_206140-T 399 199.815 44.707930 123.000 +CPAR2_206150-T 1539 1339.621 32.746310 604.000 +CPAR2_206160-T 867 667.651 20.451077 188.000 +CPAR2_206170-T 678 478.697 119.556482 788.000 +CPAR2_206180-T 2202 2002.621 84.190012 2321.410 +CPAR2_206190-T 1107 907.621 38.890098 486.000 +CPAR2_206200-T 765 565.676 35.693114 278.000 +CPAR2_206210-T 981 781.623 18.862804 203.000 +CPAR2_206220-T 471 271.755 460.717098 1723.870 +CPAR2_206230-T 849 649.655 47.065936 421.000 +CPAR2_206240-T 1119 919.621 57.573941 729.000 +CPAR2_206250-T 3294 3094.621 132.301185 5637.204 +CPAR2_206270-T 2115 1915.621 239.972736 6329.422 +CPAR2_206280-T 1857 1657.621 52.928441 1208.000 +CPAR2_206290-T 1806 1606.621 13.380911 296.000 +CPAR2_206300-T 2148 1948.621 62.579306 1679.000 +CPAR2_206310-T 732 532.685 74.716679 548.000 +CPAR2_tV(AAC)2-T 74 74.000 0.000000 0.000 +CPAR2_206320-T 3909 3709.621 40.272837 2057.000 +CPAR2_206330-T 1824 1624.621 93.366633 2088.509 +CPAR2_206340-T 963 763.626 114.328011 1202.059 +CPAR2_206350-T 738 538.684 70.648768 524.000 +CPAR2_206360-T 1749 1549.621 57.892636 1235.212 +CPAR2_206370-T 1080 880.621 144.412374 1751.000 +CPAR2_206380-T 5187 4987.621 78.121579 5364.842 +CPAR2_206390-T 1596 1396.621 219.480776 4220.537 +CPAR2_206400-T 2877 2677.621 34.735850 1280.618 +CPAR2_206410-T 591 391.744 30.961439 167.000 +CPAR2_206420-T 759 559.679 42.434190 327.000 +CPAR2_206430-T 948 748.635 130.824677 1348.505 +CPAR2_206440-T 2022 1822.621 19.964062 501.000 +CPAR2_206450-T 2139 1939.621 77.733579 2075.956 +CPAR2_206460-T 1011 811.621 126.890829 1418.000 +CPAR2_206470-T 966 766.625 23.021344 243.000 +CPAR2_206480-T 1581 1381.621 123.200852 2343.663 +CPAR2_206490-T 1323 1123.621 72.329854 1119.000 +CPAR2_206500-T 234 35.101 37.244613 18.000 +CPAR2_tQ(UUG)1-T 74 74.000 0.000000 0.000 +CPAR2_206510-T 1005 805.621 157.946717 1752.000 +CPAR2_206520-T 3105 2905.621 23.671102 947.000 +CPAR2_206530-T 360 160.822 12.193461 27.000 +CPAR2_206540-T 1548 1348.621 12.548027 233.001 +CPAR2_206550-T 966 766.625 35.242551 372.000 +CPAR2_206560-T 195 10.338 1643.918124 234.000 +CPAR2_206570-T 195 10.338 35.126456 5.000 +CPAR2_206580-T 672 472.698 326.136603 2122.638 +CPAR2_206590-T 2046 1846.621 84.117689 2138.738 +CPAR2_206600-T 1374 1174.621 51.134648 827.000 +CPAR2_206610-T 3327 3127.621 19.784858 852.000 +CPAR2_206620-T 1113 913.621 181.353753 2281.315 +CPAR2_206630-T 1116 916.621 32.961794 416.000 +CPAR2_206640-T 1359 1159.621 161.588701 2580.000 +CPAR2_206650-T 930 730.645 36.978035 372.000 +CPAR2_206660-T 687 487.696 254.097634 1706.250 +CPAR2_206670-T 1686 1486.621 7.621347 156.000 +CPAR2_206680-T 390 190.816 260.344497 684.000 +CPAR2_206690-T 3054 2854.621 83.298058 3273.979 +CPAR2_206700-T 1104 904.621 50.927771 634.328 +CPAR2_206710-T 3276 3076.621 56.434525 2390.625 +CPAR2_206720-T 1233 1033.621 62.491207 889.350 +CPAR2_206730-T 948 748.635 168.926071 1741.244 +CPAR2_206740-T 1203 1003.621 51.886783 717.000 +CPAR2_206750-T 2166 1966.621 57.390204 1554.000 +CPAR2_206760-T 933 733.645 161.776789 1634.160 +CPAR2_206770-T 1323 1123.621 105.359841 1630.000 +CPAR2_206780-T 438 238.769 360.148575 1184.000 +CPAR2_206790-T 3969 3769.621 24.719335 1283.001 +CPAR2_206800-T 1074 874.621 72.659309 874.992 +CPAR2_206810-T 6387 6187.621 86.533014 7372.216 +CPAR2_206820-T 2187 1987.621 193.282654 5289.554 +CPAR2_206830-T 1692 1492.621 70.852963 1456.130 +CPAR2_206840-T 597 397.744 176.757867 968.000 +CPAR2_206850-T 147 27.316 116.986975 44.000 +CPAR2_206860-T 2577 2377.621 12.737989 417.000 +CPAR2_206870-T 2385 2185.621 259.920969 7821.837 +CPAR2_206880-T 3234 3034.621 51.152258 2137.282 +CPAR2_206890-T 3297 3097.621 6.825780 291.121 +CPAR2_206900-T 1461 1261.621 1821.525874 31641.487 +CPAR2_206910-T 201 12.627 11779.243555 2047.943 +CPAR2_206920-T 474 274.755 94.369261 357.000 +CPAR2_206930-T 1191 991.621 44.897492 613.000 +CPAR2_206940-T 432 232.777 159.908355 512.512 +CPAR2_206950-T 2568 2368.621 105.056808 3426.197 +CPAR2_206960-T 1422 1222.621 22.276491 375.000 +CPAR2_206970-T 1527 1327.621 76.430466 1397.118 +CPAR2_206980-T 435 235.772 23.719516 77.000 +CPAR2_206990-T 1524 1324.621 3.947737 72.000 +CPAR2_207000-T 1320 1120.621 39.858753 615.000 +CPAR2_207010-T 645 445.710 105.428764 647.000 +CPAR2_207020-T 750 550.682 157.079144 1191.000 +CPAR2_207030-T 1203 1003.621 82.208348 1136.000 +CPAR2_207040-T 1089 889.621 78.552283 962.180 +CPAR2_207050-T 2175 1975.621 200.428029 5451.985 +CPAR2_207060-T 1377 1177.621 1437.182278 23302.904 +CPAR2_207070-T 1965 1765.621 57.752260 1403.974 +CPAR2_207080-T 3075 2875.621 186.359727 7378.639 +CPAR2_207090-T 1650 1450.621 82.811173 1654.000 +CPAR2_207100-T 1650 1450.621 61.560607 1229.559 +CPAR2_207110-T 1641 1441.621 11.587350 230.000 +CPAR2_207120-T 381 181.817 65.511507 164.000 +CPAR2_207130-T 1644 1444.621 62.894226 1251.000 +CPAR2_207140-T 2820 2620.621 37.866170 1366.307 +CPAR2_207150-T 1029 829.621 76.713830 876.286 +CPAR2_207160-T 630 430.726 44.006197 260.980 +CPAR2_207170-T 2256 2056.621 119.433222 3381.987 +CPAR2_207180-T 552 352.749 164.274363 797.862 +CPAR2_207190-T 447 247.762 70.646511 241.000 +CPAR2_207200-T 873 673.649 48.192693 447.000 +CPAR2_207210-T 1320 1120.621 227.967166 3517.416 +CPAR2_207220-T 1386 1186.621 38.927135 636.000 +CPAR2_207230-T 558 358.747 61.342498 303.000 +CPAR2_207240-T 444 244.764 251.032811 846.000 +CPAR2_207250-T 1578 1378.621 6.163797 117.000 +CPAR2_207260-T 1578 1378.621 2.929552 55.608 +CPAR2_207270-T 1578 1378.621 21.672956 411.392 +CPAR2_207280-T 2544 2344.621 81.407260 2628.018 +CPAR2_207290-T 576 376.745 241.794030 1254.254 +CPAR2_207300-T 1848 1648.621 121.148843 2750.000 +CPAR2_207310-T 2289 2089.621 45.266377 1302.374 +CPAR2_207320-T 426 226.786 73.657752 230.000 +CPAR2_207330-T 798 598.669 89.531817 738.000 +CPAR2_207340-T 1074 874.621 28.316644 341.000 +CPAR2_207350-T 2133 1933.621 72.442547 1928.669 +CPAR2_207360-T 1233 1033.621 56.353448 802.000 +CPAR2_207370-T 924 724.648 23.252448 232.000 +CPAR2_207380-T 960 760.627 97.967795 1026.000 +CPAR2_207390-T 867 667.651 37.638684 346.000 +CPAR2_207400-T 3090 2890.621 51.064234 2032.359 +CPAR2_207410-T 1086 886.621 74.707487 912.000 +CPAR2_207420-T 4824 4624.621 40.476460 2577.337 +CPAR2_207430-T 4764 4564.621 47.782757 3003.091 +CPAR2_207440-T 1437 1237.621 48.590351 828.000 +CPAR2_207450-T 1104 904.621 0.080286 1.000 +CPAR2_207460-T 651 451.704 24.922115 155.000 +CPAR2_207470-T 645 445.710 158.713471 974.000 +CPAR2_207480-T 489 289.753 149.141017 595.000 +CPAR2_207490-T 2328 2128.621 73.002216 2139.572 +CPAR2_207500-T 2040 1840.621 40.524110 1027.000 +CPAR2_207510-T 1347 1147.621 169.417098 2677.000 +CPAR2_207520-T 4203 4003.621 149.258501 8227.816 +CPAR2_207530-T 537 337.751 45.372626 211.000 +CPAR2_207540-T 1752 1552.621 5.983615 127.915 +CPAR2_207550-T 552 352.749 138.075642 670.618 +CPAR2_207560-T 2931 2731.621 47.467068 1785.276 +CPAR2_207570-T 1782 1582.621 43.413181 946.000 +CPAR2_207580-T 2424 2224.621 39.209781 1201.000 +CPAR2_207590-T 2244 2044.621 356.556815 10037.698 +CPAR2_207600-T 2634 2434.621 6.682480 224.007 +CPAR2_207610-T 2568 2368.621 50.653425 1651.950 +CPAR2_207620-T 1551 1351.621 31.971971 595.000 +CPAR2_207630-T 543 343.750 156.983303 743.000 +CPAR2_207640-T 1932 1732.621 153.554558 3663.185 +CPAR2_207650-T 1719 1519.621 70.065799 1466.000 +CPAR2_207660-T 1065 865.621 104.208011 1242.000 +CPAR2_207660.1-T 471 271.755 6.948695 26.000 +CPAR2_207670-T 936 736.645 51.860332 526.000 +CPAR2_207680-T 2655 2455.621 13.575592 459.000 +CPAR2_207690-T 3723 3523.621 126.364047 6130.632 +CPAR2_207700-T 1095 895.621 228.355561 2815.973 +CPAR2_207710-T 465 265.756 479.624891 1755.000 +CPAR2_207720-T 360 160.822 925.776329 2049.948 +CPAR2_207730-T 1605 1405.621 139.341468 2696.753 +CPAR2_207740-T 393 193.816 814.705878 2174.117 +CPAR2_207750-T 2601 2401.621 164.538609 5440.826 +CPAR2_207760-T 2673 2473.621 0.469780 16.000 +CPAR2_207770-T 2388 2188.621 202.600230 6105.244 +CPAR2_207780-T 1458 1258.621 1848.819311 32039.230 +CPAR2_207790-T 171 16.642 161.469976 37.000 +CPAR2_207800-T 780 580.671 153.344329 1226.000 +CPAR2_207810-T 666 466.700 1055.388130 6781.763 +CPAR2_207820-T 1302 1102.621 202.818803 3079.124 +CPAR2_207830-T 1170 970.621 841.675464 11248.304 +CPAR2_207840-T 1368 1168.621 22.373616 360.000 +CPAR2_207850-T 2250 2050.621 104.366205 2946.713 +CPAR2_207860-T 666 466.700 262.584025 1687.325 +CPAR2_207870-T 237 38.026 3743.581021 1960.000 +CPAR2_207880-T 450 250.759 177.835622 614.000 +CPAR2_207890-T 1917 1717.621 11.839629 280.000 +CPAR2_207900-T 1701 1501.621 8.759249 181.101 +CPAR2_207910-T 273 73.920 165.065213 168.000 +CPAR2_207920-T 2232 2032.621 12.363093 346.000 +CPAR2_207930-T 870 670.650 186.631641 1723.351 +CPAR2_207940-T 4026 3826.621 16.531421 871.000 +CPAR2_207950-T 384 184.816 12.182288 31.000 +CPAR2_207960-T 1092 892.621 161.739591 1987.816 +CPAR2_207970-T 2400 2200.621 19.472163 590.000 +CPAR2_207980-T 3735 3535.621 17.423511 848.191 +CPAR2_207990-T 1158 958.621 26.820301 354.000 +CPAR2_208000-T 1278 1078.621 64.843248 963.000 +CPAR2_208010-T 3102 2902.621 36.731882 1468.000 +CPAR2_208020-T 204 13.953 31892.613907 6127.124 +CPAR2_208030-T 1800 1600.621 41.472966 914.000 +CPAR2_208040-T 909 709.649 48.101832 470.000 +CPAR2_208050-T 1506 1306.621 63.589259 1144.000 +CPAR2_208060-T 2523 2323.621 60.637862 1940.000 +CPAR2_208070-T 756 556.680 147.952106 1134.017 +CPAR2_208080-T 2331 2131.621 0.442936 13.000 +CPAR2_208090-T 804 604.669 40.958542 341.000 +CPAR2_208100-T 960 760.627 75.242322 788.000 +CPAR2_208110-T 1500 1300.621 17.337860 310.484 +CPAR2_208120-T 798 598.669 46.969551 387.164 +CPAR2_208130-T 1419 1219.621 40.110398 673.557 +CPAR2_208140-T 1917 1717.621 309.842884 7327.595 +CPAR2_208150-T 999 799.621 145.915563 1606.492 +CPAR2_208160-T 1683 1483.621 169.617337 3464.861 +CPAR2_208200-T 252 52.945 13.717667 10.000 +CPAR2_208210-T 1560 1360.621 76.204205 1427.607 +CPAR2_208220-T 663 463.700 12.686890 81.000 +CPAR2_208230-T 2946 2746.621 77.133875 2917.000 +CPAR2_208240-T 1767 1567.621 7.412869 160.000 +CPAR2_208250-T 1284 1084.621 18.623718 278.123 +CPAR2_208260-T 1590 1390.621 46.273841 886.007 +CPAR2_208270-T 1008 808.621 61.704807 687.000 +CPAR2_208280-T 2982 2782.621 39.412170 1510.000 +CPAR2_208290-T 1140 940.621 144.380328 1869.887 +CPAR2_208300-T 2754 2554.621 23.852996 839.000 +CPAR2_208310-T 909 709.649 33.875971 331.000 +CPAR2_208320-T 2058 1858.621 36.067686 923.000 +CPAR2_208330-T 2649 2449.621 32.406255 1093.000 +CPAR2_208340-T 1218 1018.621 48.769781 684.000 +CPAR2_208350-T 759 559.679 16.480557 127.000 +CPAR2_208360-T 900 700.649 107.494341 1037.000 +CPAR2_208370-T 1407 1207.621 45.046239 749.000 +CPAR2_208380-T 1854 1654.621 95.294689 2171.000 +CPAR2_208390-T 2334 2134.621 39.331860 1156.000 +CPAR2_208400-T 2382 2182.621 79.838658 2399.298 +CPAR2_208410-T 432 232.777 41.185533 132.001 +CPAR2_208420-T 981 781.623 9.734413 104.761 +CPAR2_208430-T 579 379.745 1455.477927 7610.093 +CPAR2_208440-T 1128 928.621 48.490929 620.000 +CPAR2_208450-T 192 9.429 585.405550 76.000 +CPAR2_208460-T 1311 1111.621 8.558978 131.000 +CPAR2_208470-T 774 574.671 30.381631 240.394 +CPAR2_208480-T 669 469.699 66.482757 429.953 +CPAR2_208490-T 3573 3373.621 104.614310 4859.369 +CPAR2_208500-T 726 526.686 466.231045 3381.000 +CPAR2_208510-T 1296 1096.621 35.565185 537.000 +CPAR2_208520-T 2934 2734.621 59.234313 2230.299 +CPAR2_208530-T 981 781.623 3.088576 33.239 +CPAR2_208540-T 1425 1225.621 127.236014 2147.133 +CPAR2_208550-T 495 295.752 201.698875 821.342 +CPAR2_208560-T 1452 1252.621 82.333800 1420.007 +CPAR2_208570-T 1599 1399.621 69.379296 1337.005 +CPAR2_208580-T 1218 1018.621 27.878632 391.000 +CPAR2_208590-T 2748 2548.621 318.953382 11192.446 +CPAR2_208600-T 1902 1702.621 12.225564 286.602 +CPAR2_208610-T 3594 3394.621 10.311916 481.974 +CPAR2_208620-T 1149 949.621 47.953968 627.000 +CPAR2_208630-T 2049 1849.621 38.756257 987.000 +CPAR2_208640-T 1929 1729.621 22.591171 538.000 +CPAR2_208650-T 1002 802.621 62.799506 694.000 +CPAR2_208660-T 798 598.669 35.667147 294.000 +CPAR2_208670-T 2949 2749.621 48.733880 1845.000 +CPAR2_208680-T 3183 2983.621 270.834198 11126.016 +CPAR2_208690-T 1116 916.621 104.511065 1319.000 +CPAR2_208700-T 849 649.655 17.631274 157.710 +CPAR2_208710-T 1302 1102.621 10.755753 163.290 +CPAR2_208720-T 825 625.667 9.518710 82.000 +CPAR2_208730-T 2937 2737.621 38.468224 1450.000 +CPAR2_208740-T 528 328.751 73.567283 333.000 +CPAR2_208750-T 1437 1237.621 51.759286 882.000 +CPAR2_208760-T 1650 1450.621 27.386766 547.000 +CPAR2_208770-T 1293 1093.621 1.394633 21.000 +CPAR2_208780-T 450 250.759 490.273043 1692.730 +CPAR2_208790-T 2826 2626.621 64.291844 2325.123 +CPAR2_208800-T 999 799.621 233.310653 2568.689 +CPAR2_208810-T 888 688.649 0.105465 1.000 +CPAR2_208820-T 1339 1139.621 36.645002 575.000 +CPAR2_208830-T 288 88.910 89.039231 109.000 +CPAR2_208840-T 2019 1819.621 28.337642 709.965 +CPAR2_208850-T 312 112.898 145.387828 226.000 +CPAR2_208860-T 4788 4588.621 48.761968 3080.746 +CPAR2_208870-T 1989 1789.621 509.048436 12543.327 +CPAR2_208880-T 396 196.816 284.513165 771.000 +CPAR2_208890-T 2130 1930.621 82.944051 2204.829 +CPAR2_208900-T 1527 1327.621 6.838223 125.000 +CPAR2_208910-T 204 13.953 1702.103599 327.004 +CPAR2_208920-T 2766 2566.621 9.479611 335.000 +CPAR2_208930-T 357 157.823 218.129471 474.000 +CPAR2_208940-T 426 226.786 67.252730 210.000 +CPAR2_208950-T 2658 2458.621 60.144183 2036.000 +CPAR2_208960-T 1146 946.621 60.995572 795.000 +CPAR2_208970-T 3840 3640.621 68.227288 3420.000 +CPAR2_208980-T 3216 3016.621 37.342080 1551.000 +CPAR2_208990-T 903 703.649 114.764004 1111.871 +CPAR2_209000-T 1734 1534.621 24.089292 509.000 +CPAR2_209010-T 1440 1240.621 129.381579 2210.061 +CPAR2_tP(AGG)1-T 73 73.000 0.000000 0.000 +CPAR2_209020-T 2406 2206.621 24.487961 744.000 +CPAR2_209030-T 1269 1069.621 58.385115 859.854 +CPAR2_209040-T 1536 1336.621 130.182313 2395.813 +CPAR2_209050-T 1362 1162.621 13.808122 221.037 +CPAR2_209060-T 849 649.655 200.561258 1794.000 +CPAR2_209070-T 621 421.743 150.339874 873.000 +CPAR2_209080-T 1506 1306.621 71.712714 1290.145 +CPAR2_209090-T 2382 2182.621 84.674354 2544.619 +CPAR2_209100-T 6846 6646.621 69.745403 6382.767 +CPAR2_209110-T 840 640.661 29.361530 259.000 +CPAR2_209120-T 1323 1123.621 40.204798 622.000 +CPAR2_209130-T 306 106.902 40.084387 59.000 +CPAR2_209140-T 696 496.693 30.707079 210.000 +CPAR2_209150-T 1455 1255.621 108.281594 1872.000 +CPAR2_209160-T 717 517.687 74.496296 531.000 +CPAR2_209170-T 1044 844.621 50.425092 586.410 +CPAR2_209180-T 1416 1216.621 31.639377 530.000 +CPAR2_209190-T 609 409.744 42.009043 237.000 +CPAR2_209200-T 378 178.817 49.551681 122.000 +CPAR2_209210-T 219 22.239 212.282264 65.000 +CPAR2_209220-T 1122 922.621 686.968915 8726.762 +CPAR2_209230-T 432 232.777 84.242351 270.000 +CPAR2_209240-T 1515 1315.621 100.969518 1829.000 +CPAR2_209250-T 957 757.629 75.827642 791.000 +CPAR2_209260-T 1110 910.621 61.413008 770.000 +CPAR2_209270-T 603 403.744 0.719550 4.000 +CPAR2_209280-T 597 397.744 16.616700 91.000 +CPAR2_209290-T 1119 919.621 43.913198 556.028 +CPAR2_209300-T 354 154.828 222.421398 474.152 +CPAR2_209310-T 5715 5515.621 18.316404 1391.000 +CPAR2_209340-T 2340 2140.621 10.348264 305.000 +CPAR2_209350-T 774 574.671 111.975179 886.000 +CPAR2_209360-T 186 8.379 182.023258 21.000 +CPAR2_209370-T 882 682.649 0.851138 8.000 +CPAR2_209380-T 765 565.676 135.582476 1056.000 +CPAR2_209390-T 2187 1987.621 36.540446 1000.000 +CPAR2_209400-T 3375 3175.621 45.970037 2010.000 +CPAR2_209410-T 339 139.859 124.631237 240.000 +CPAR2_209420-T 588 388.744 13.825315 74.000 +CPAR2_209430-T 1392 1192.621 107.485435 1765.000 +CPAR2_209440-T 1356 1156.621 57.135207 909.887 +CPAR2_209450-T 324 124.880 329.761062 567.000 +CPAR2_209460-T 1464 1264.621 213.873340 3724.000 +CPAR2_209470-T 1347 1147.621 198.876570 3142.496 +CPAR2_209480-T 1437 1237.621 24.950447 425.166 +CPAR2_209490-T 1494 1294.621 50.770718 905.000 +CPAR2_209500-T 1251 1051.621 210.393292 3046.378 +CPAR2_209510-T 333 133.864 585.415509 1079.000 +CPAR2_209520-T 1404 1204.621 41.902674 695.000 +CPAR2_209530-T 2553 2353.621 27.468926 890.166 +CPAR2_209540-T 1341 1141.621 29.073787 457.000 +CPAR2_209550-T 1635 1435.621 145.194271 2870.000 +CPAR2_209560-T 4716 4516.621 24.639972 1532.309 +CPAR2_209570-T 1440 1240.621 112.049564 1914.000 +CPAR2_209580-T 1437 1237.621 67.017126 1142.000 +CPAR2_209590-T 1017 817.621 0.621804 7.000 +CPAR2_209600-T 1278 1078.621 117.431593 1744.000 +CPAR2_209610-T 1305 1105.621 38.757261 590.000 +CPAR2_209620-T 672 472.698 22.586081 147.000 +CPAR2_209630-T 1356 1156.621 9.042297 144.000 +CPAR2_209640-T 1041 841.621 94.321541 1093.000 +CPAR2_209650-T 2412 2212.621 66.765385 2034.000 +CPAR2_209660-T 2493 2293.621 74.208910 2343.529 +CPAR2_209670-T 1374 1174.621 78.711466 1273.000 +CPAR2_209680-T 1578 1378.621 35.402323 672.000 +CPAR2_209690-T 1578 1378.621 27.131245 515.000 +CPAR2_209700-T 1572 1372.621 16.931940 320.000 +CPAR2_209710-T 732 532.685 58.970143 432.509 +CPAR2_209720-T 1122 922.621 48.506247 616.189 +CPAR2_209730-T 612 412.744 180.716137 1027.000 +CPAR2_209740-T 219 22.239 418.032765 128.000 +CPAR2_209750-T 2313 2113.621 205.059137 5967.588 +CPAR2_209760-T 2985 2785.621 26.620191 1021.000 +CPAR2_209770-T 3108 2908.621 489.687166 19610.939 +CPAR2_209780-T 1878 1678.621 335.663708 7757.997 +CPAR2_209790-T 5499 5299.621 43.868489 3201.032 +CPAR2_209800-T 1428 1228.621 32.098834 543.000 +CPAR2_209810-T 1143 943.621 73.943485 960.705 +CPAR2_209820-T 1095 895.621 410.567191 5062.922 +CPAR2_209830-T 891 691.649 149.618297 1424.830 +CPAR2_209840-T 921 721.648 268.917194 2672.000 +CPAR2_209850-T 1059 859.621 301.034311 3562.999 +CPAR2_209860-T 2073 1873.621 22.831855 589.000 +CPAR2_209870-T 186 8.379 6717.515906 774.999 +CPAR2_209880-T 300 100.905 390.835400 543.000 +CPAR2_209890-T 3372 3172.621 96.536836 4217.002 +CPAR2_209900-T 1083 883.621 9.698918 118.000 +CPAR2_209910-T 1263 1063.621 106.523404 1560.000 +CPAR2_209920-T 204 13.953 713.105885 137.000 +CPAR2_209930-T 2124 1924.621 119.156749 3157.595 +CPAR2_209940-T 2331 2131.621 52.198298 1532.000 +CPAR2_209950-T 1269 1069.621 68.104899 1003.000 +CPAR2_209960-T 1500 1300.621 33.449023 599.000 +CPAR2_209970-T 1413 1213.621 33.931834 567.000 +CPAR2_209980-T 447 247.762 41.039467 140.000 +CPAR2_209990-T 645 445.710 25.746128 158.000 +CPAR2_210000-T 993 793.622 40.266732 440.000 +CPAR2_210010-T 798 598.669 81.039639 668.000 +CPAR2_210020-T 861 661.653 28.869100 263.000 +CPAR2_210030-T 243 43.969 140.402569 85.000 +CPAR2_210040-T 1413 1213.621 24.476403 409.000 +CPAR2_210050-T 894 694.649 184.747556 1767.001 +CPAR2_210060-T 432 232.777 100.466804 322.000 +CPAR2_210070-T 867 667.651 326.238189 2999.000 +CPAR2_210080-T 1662 1462.621 118.430611 2385.000 +CPAR2_210090-T 3219 3019.621 84.663931 3520.006 +CPAR2_210100-T 1257 1057.621 43.263119 630.000 +CPAR2_210110-T 2112 1912.621 0.265813 7.000 +CPAR2_210120-T 2142 1942.621 0.299095 8.000 +CPAR2_210130-T 429 229.782 11.378749 36.000 +CPAR2_210140-T 2274 2074.621 59.637304 1703.528 +CPAR2_210150-T 1668 1468.621 1.434154 29.000 +CPAR2_210160-T 993 793.622 42.371584 463.000 +CPAR2_210170-T 2403 2203.621 61.797628 1875.000 +CPAR2_210180-T 1320 1120.621 117.372686 1811.000 +CPAR2_210190-T 411 211.806 1.028702 3.000 +CPAR2_210200-T 3510 3310.621 32.215312 1468.468 +CPAR2_210210-T 1413 1213.621 59.767718 998.717 +CPAR2_210220-T 624 424.742 1.538951 9.000 +CPAR2_210230-T 2361 2161.621 196.035622 5834.547 +CPAR2_210240-T 729 529.685 46.756708 341.000 +CPAR2_210250-T 1200 1000.621 120.888357 1665.508 +CPAR2_210260-T 1980 1780.621 33.120553 812.011 +CPAR2_210270-T 2109 1909.621 36.511651 960.000 +CPAR2_210280-T 1710 1510.621 50.194203 1044.003 +CPAR2_210290-T 3831 3631.621 196.394468 9820.244 +CPAR2_210300-T 597 397.744 56.606342 310.000 +CPAR2_210310-T 552 352.749 2438.241296 11842.260 +CPAR2_210320-T 345 145.846 222.099063 446.000 +CPAR2_210330-T 828 628.666 25.185107 218.000 +CPAR2_210340-T 375 175.818 147.473358 357.000 +CPAR2_210345-T 300 100.905 140.355254 195.000 +CPAR2_210350-T 2100 1900.621 108.106635 2829.049 +CPAR2_210360-T 567 367.746 675.823990 3421.954 +CPAR2_210370-T 2421 2221.621 94.310005 2884.831 +CPAR2_210380-T 2220 2020.621 17.001362 473.000 +CPAR2_210390-T 579 379.745 534.536453 2794.870 +CPAR2_210400-T 1533 1333.621 88.769251 1630.000 +CPAR2_210410-T 1590 1390.621 739.775335 14164.500 +CPAR2_210420-T 2682 2482.621 58.275547 1992.000 +CPAR2_210430-T 7635 7435.621 26.675376 2730.991 +CPAR2_210440-T 756 556.680 49.862506 382.184 +CPAR2_210450-T 1665 1465.621 65.392433 1319.598 +CPAR2_210460-T 1119 919.621 17.848711 226.000 +CPAR2_210470-T 1251 1051.621 22.376548 324.000 +CPAR2_210480-T 1458 1258.621 176.403758 3057.000 +CPAR2_210490-T 1878 1678.621 28.469553 658.000 +CPAR2_210500-T 654 454.702 285.063246 1784.680 +CPAR2_210510-T 474 274.755 205.127581 776.000 +CPAR2_tI(UAU)1-T 73 73.000 0.000000 0.000 +CPAR2_210520-T 1116 916.621 66.082058 834.000 +CPAR2_210530-T 915 715.649 33.997909 335.000 +CPAR2_210540-T 414 214.804 477.757545 1413.000 +CPAR2_210550-T 1317 1117.621 55.822073 859.000 +CPAR2_210560-T 555 355.748 8.982928 44.000 +CPAR2_210570-T 1419 1219.621 108.798026 1827.000 +CPAR2_210580-T 993 793.622 138.739632 1516.027 +CPAR2_210590-T 1473 1273.621 56.625863 992.996 +CPAR2_210600-T 558 358.747 0.203180 1.004 +CPAR2_210610-T 1659 1459.621 27.914564 561.001 +CPAR2_210620-T 2139 1939.621 81.255035 2170.000 +CPAR2_210630-T 1047 847.621 222.010235 2591.000 +CPAR2_210640-T 576 376.745 87.071699 451.666 +CPAR2_210650-T 2202 2002.621 28.106733 775.000 +CPAR2_210660-T 249 49.950 8.724128 6.000 +CPAR2_210670-T 546 346.750 1026.301082 4899.856 +CPAR2_210680-T 1308 1108.621 82.828206 1264.311 +CPAR2_210690-T 1611 1411.621 16.675572 324.109 +CPAR2_210700-T 666 466.700 13.850313 89.000 +CPAR2_210710-T 1317 1117.621 36.326588 559.000 +CPAR2_210720-T 1242 1042.621 92.647245 1330.000 +CPAR2_210730-T 453 253.759 491.021463 1715.592 +CPAR2_210740-T 1161 961.621 20.467871 271.000 +CPAR2_210750-T 1626 1426.621 35.483992 697.001 +CPAR2_210760-T 846 646.657 63.794282 568.000 +CPAR2_210770-T 474 274.755 22.997551 87.000 +CPAR2_210780-T 858 658.653 65.278879 592.000 +CPAR2_210790-T 756 556.680 11.350652 87.000 +CPAR2_210800-T 720 520.687 35.010998 251.000 +CPAR2_210810-T 747 547.682 91.899310 693.000 +CPAR2_210820-T 573 373.745 120.482313 620.000 +CPAR2_210830-T 1371 1171.621 243.495659 3927.996 +CPAR2_210840-T 3885 3685.621 45.034626 2285.334 +CPAR2_210850-T 825 625.667 44.459339 383.000 +CPAR2_210860-T 1092 892.621 140.277097 1724.037 +CPAR2_210870-T 1641 1441.621 15.365834 305.000 +CPAR2_210880-T 687 487.696 83.544967 560.999 +CPAR2_210890-T 1704 1504.621 43.491568 901.000 +CPAR2_210900-T 591 391.744 247.691515 1336.000 +CPAR2_210910-T 1848 1648.621 56.785767 1289.000 +CPAR2_210920-T 2820 2620.621 71.585925 2583.000 +CPAR2_210930-T 3111 2911.621 36.792952 1475.000 +CPAR2_210940-T 663 463.700 45.265570 289.000 +CPAR2_210950-T 2616 2416.621 31.228384 1039.084 +CPAR2_210960-T 1506 1306.621 95.884154 1725.000 +CPAR2_210970-T 1422 1222.621 92.726287 1560.944 +CPAR2_210980-T 1857 1657.621 47.385511 1081.492 +CPAR2_210990-T 1731 1531.621 86.919845 1833.002 +CPAR2_211000-T 378 178.817 44.271584 109.000 +CPAR2_211010-T 876 676.649 38.855497 362.000 +CPAR2_211020-T 228 29.478 1495.557484 607.000 +CPAR2_211030-T 1002 802.621 66.600053 736.000 +CPAR2_211040-T 1419 1219.621 152.760136 2565.237 +CPAR2_211050-T 2208 2008.621 45.864319 1268.427 +CPAR2_211060-T 1437 1237.621 1.584468 27.000 +CPAR2_211070-T 777 577.671 80.213495 638.000 +CPAR2_211080-T 1197 997.621 117.065194 1608.000 +CPAR2_211090-T 1056 856.621 90.835146 1071.360 +CPAR2_211100-T 1947 1747.621 32.706562 787.000 +CPAR2_211110-T 1716 1516.621 53.250574 1111.972 +CPAR2_211120-T 1077 877.621 120.492959 1456.000 +CPAR2_211130-T 3081 2881.621 369.215670 14649.052 +CPAR2_211140-T 579 379.745 122.212898 639.001 +CPAR2_211150-T 1251 1051.621 104.009512 1506.000 +CPAR2_211160-T 2829 2629.621 28.641321 1037.000 +CPAR2_211170-T 411 211.806 0.342901 1.000 +CPAR2_211180-T 402 202.813 343.246021 958.504 +CPAR2_211190-T 1917 1717.621 29.895064 707.000 +CPAR2_211200-T 579 379.745 127.759185 668.000 +CPAR2_211210-T 483 283.753 457.363264 1786.875 +CPAR2_211220-T 2064 1864.621 28.374923 728.480 +CPAR2_211230-T 1140 940.621 34.411299 445.665 +CPAR2_211240-T 3099 2899.621 120.590332 4814.445 +CPAR2_211250-T 2997 2797.621 54.779402 2110.079 +CPAR2_211260-T 1770 1570.621 48.923967 1058.000 +CPAR2_211270-T 324 124.880 312.894976 538.000 +CPAR2_211280-T 1140 940.621 33.491988 433.759 +CPAR2_211290-T 471 271.755 46.770061 175.000 +CPAR2_211300-T 222 24.450 77.231442 26.000 +CPAR2_211310-T 1086 886.621 40.056975 489.000 +CPAR2_211320-T 2184 1984.621 58.418241 1596.315 +CPAR2_211330-T 591 391.744 50.984406 275.000 +CPAR2_211340-T 2421 2221.621 48.056795 1470.000 +CPAR2_211350-T 3075 2875.621 46.320703 1834.000 +CPAR2_211360-T 1476 1276.621 68.927480 1211.566 +CPAR2_211370-T 2445 2245.621 139.592709 4316.103 +CPAR2_211380-T 840 640.661 69.379368 612.000 +CPAR2_211390-T 300 100.905 869.505860 1208.032 +CPAR2_211400-T 1461 1261.621 210.697579 3660.000 +CPAR2_211410-T 2955 2755.621 108.392046 4112.533 +CPAR2_211420-T 2019 1819.621 3000.656218 75177.826 +CPAR2_211430-T 1575 1375.621 89.438146 1694.003 +CPAR2_211440-T 2013 1813.621 37.202883 929.000 +CPAR2_211450-T 3216 3016.621 35.801254 1487.002 +CPAR2_211460-T 1152 952.621 85.299370 1118.816 +CPAR2_211470-T 486 286.753 45.083716 178.000 +CPAR2_211480-T 453 253.759 835.450150 2919.000 +CPAR2_211490-T 1104 904.621 77.154992 961.000 +CPAR2_211500-T 1053 853.621 88.996697 1046.000 +CPAR2_211510-T 924 724.648 145.757778 1454.290 +CPAR2_211520-T 882 682.649 80.645306 758.000 +CPAR2_211530-T 2274 2074.621 32.977639 942.000 +CPAR2_211540-T 2862 2662.621 102.050431 3741.250 +CPAR2_211550-T 1647 1447.621 31.507370 628.000 +CPAR2_211560-T 2448 2248.621 134.848977 4175.000 +CPAR2_211570-T 891 691.649 30.662280 292.000 +CPAR2_211580-T 1485 1285.621 5.141304 91.008 +CPAR2_211590-T 1176 976.621 91.397254 1229.000 +CPAR2_211600-T 1458 1258.621 4.847208 84.000 +CPAR2_211610-T 1110 910.621 146.992434 1843.000 +CPAR2_211620-T 705 505.690 66.640959 464.000 +CPAR2_211630-T 2529 2329.621 243.922027 7824.000 +CPAR2_211640-T 717 517.687 160.317203 1142.720 +CPAR2_211650-T 2121 1921.621 172.649682 4568.000 +CPAR2_211660-T 624 424.742 94.733185 554.013 +CPAR2_211670-T 2274 2074.621 36.145968 1032.503 +CPAR2_211680-T 2133 1933.621 61.261839 1631.000 +CPAR2_211690-T 2601 2401.621 30.060026 994.000 +CPAR2_211700-T 228 29.478 93.626333 38.000 +CPAR2_211710-T 1368 1168.621 169.960083 2734.722 +CPAR2_211720-T 9762 9562.621 27.881424 3671.000 +CPAR2_211730-T 741 541.683 517.021031 3856.081 +CPAR2_211740-T 1269 1069.621 2177.006626 32061.389 +CPAR2_211750-T 1014 814.621 78.011698 875.000 +CPAR2_211760-T 4323 4123.621 75.436865 4283.067 +CPAR2_211770-T 1026 826.621 92.694360 1055.000 +CPAR2_211780-T 654 454.702 20.125723 126.000 +CPAR2_211790-T 861 661.653 76.727091 698.990 +CPAR2_211800-T 2736 2536.621 73.862570 2579.720 +CPAR2_211810-T 747 547.682 355.443279 2680.349 +CPAR2_211820-T 720 520.687 104.196079 747.000 +CPAR2_211830-T 1311 1111.621 309.623895 4738.969 +CPAR2_211840-T 1200 1000.621 150.571458 2074.459 +CPAR2_211850-T 1749 1549.621 49.071416 1047.000 +CPAR2_211860-T 1659 1459.621 43.837239 881.000 +CPAR2_211870-T 2277 2077.621 63.762588 1824.000 +CPAR2_211880-T 1893 1693.621 28.219983 658.060 +CPAR2_211890-T 4335 4135.621 114.227041 6504.324 +CPAR2_211900-T 1638 1438.621 18.325997 363.000 +CPAR2_211910-T 1275 1075.621 49.898285 738.988 +CPAR2_211920-T 1743 1543.621 337.909909 7181.815 +CPAR2_211930-T 7980 7780.621 10.949423 1173.000 +CPAR2_211940-T 1023 823.621 49.646458 563.000 +CPAR2_211950-T 1221 1021.621 8.530977 120.000 +CPAR2_211960-T 2355 2155.621 58.435138 1734.359 +CPAR2_211970-T 1077 877.621 70.590998 853.000 +CPAR2_211980-T 2859 2659.621 60.814608 2227.000 +CPAR2_211990-T 2913 2713.621 30.484704 1139.000 +CPAR2_212000-T 1104 904.621 72.985626 909.069 +CPAR2_212010-T 4893 4693.621 73.037277 4720.034 +CPAR2_212020-T 531 331.751 172.540364 788.125 +CPAR2_212030-T 1059 859.621 83.809535 991.958 +CPAR2_212040-T 1113 913.621 1.112934 14.000 +CPAR2_212050-T 2325 2125.621 38.484357 1126.322 +CPAR2_212060-T 900 700.649 22.183017 214.000 +CPAR2_212070-T 1383 1183.621 222.189341 3621.000 +CPAR2_212080-T 1425 1225.621 83.495326 1409.000 +CPAR2_212090-T 993 793.622 763.693919 8344.986 +CPAR2_212100-T 1380 1180.621 146.165547 2376.009 +CPAR2_212110-T 1281 1081.621 138.727502 2066.000 +CPAR2_212120-T 1170 970.621 20.203258 270.000 +CPAR2_212130-T 2328 2128.621 215.304876 6310.224 +CPAR2_212140-T 1305 1105.621 218.486383 3326.008 +CPAR2_212150-T 2520 2320.621 25.538382 816.000 +CPAR2_212160-T 1269 1069.621 60.771570 895.000 +CPAR2_212170-T 1068 868.621 69.700416 833.601 +CPAR2_212180-T 3936 3736.621 53.179533 2736.000 +CPAR2_212190-T 1782 1582.621 65.441011 1426.000 +CPAR2_212200-T 1452 1252.621 58.387133 1007.000 +CPAR2_212210-T 1494 1294.621 492.951671 8786.980 +CPAR2_212220-T 843 643.659 53.259055 472.000 +CPAR2_212230-T 1635 1435.621 27.065831 535.000 +CPAR2_212240-T 1950 1750.621 96.734467 2331.664 +CPAR2_212250-T 2811 2611.621 76.789455 2761.241 +CPAR2_212260-T 1170 970.621 7.931649 106.000 +CPAR2_212270-T 642 442.713 147.483993 899.000 +CPAR2_212280-T 1068 868.621 56.439186 675.000 +CPAR2_212290-T 3021 2821.621 43.530334 1691.154 +CPAR2_212300-T 846 646.657 123.769892 1102.000 +CPAR2_212310-T 876 676.649 72.666220 677.000 +CPAR2_212320-T 918 718.649 13.946651 138.000 +CPAR2_212330-T 372 172.818 31.519545 75.000 +CPAR2_212340-T 792 592.669 23.160997 189.000 +CPAR2_212350-T 1635 1435.621 0.455313 9.000 +CPAR2_212360-T 1635 1435.621 29.190625 577.000 +CPAR2_212370-T 1644 1444.621 0.201101 4.000 +CPAR2_212380-T 294 94.908 103.309076 135.000 +CPAR2_212390-T 459 259.757 142.127718 508.322 +CPAR2_212400-T 2058 1858.621 45.650176 1168.223 +CPAR2_212410-T 1113 913.621 34.836153 438.217 +CPAR2_212420-T 1095 895.621 156.269249 1927.039 +CPAR2_212430-T 3618 3418.621 82.855818 3900.017 +CPAR2_212450-T 885 685.649 152.418825 1438.908 +CPAR2_212460-T 1701 1501.621 28.536393 590.000 +CPAR2_212470-T 2361 2161.621 76.710139 2283.100 +CPAR2_212480-T 654 454.702 32.584504 204.000 +CPAR2_212490-T 270 70.923 237.577705 232.000 +CPAR2_212500-T 1059 859.621 68.774063 814.000 +CPAR2_212510-T 1344 1144.621 1.142137 18.000 +CPAR2_212520-T 1935 1735.621 27.620013 660.042 +CPAR2_212530-T 1194 994.621 27.602060 378.000 +CPAR2_212540-T 399 199.815 175.923886 484.000 +CPAR2_212550-T 780 580.671 41.087330 328.496 +CPAR2_212560-T 1446 1246.621 11.419024 196.000 +CPAR2_212570-T 1662 1462.621 40.587158 817.359 +CPAR2_212580-T 3987 3787.621 11.025767 575.000 +CPAR2_212590-T 1425 1225.621 149.746603 2527.003 +CPAR2_212600-T 1518 1318.621 38.390182 697.000 +CPAR2_212610-T 219 22.239 862.192579 264.000 +CPAR2_212620-T 1665 1465.621 41.923359 846.000 +CPAR2_212630-T 474 274.755 33.307007 126.001 +CPAR2_212640-T 846 646.657 48.519595 432.000 +CPAR2_212650-T 465 265.756 29.788668 109.000 +CPAR2_212660-T 669 469.699 31.853379 206.000 +CPAR2_212670-T 1773 1573.621 0.599999 13.000 +CPAR2_212680-T 3069 2869.621 24.651416 974.000 +CPAR2_212690-T 582 382.745 191.654788 1010.000 +CPAR2_212700-T 2016 1816.621 115.587334 2891.127 +CPAR2_212710-T 960 760.627 59.487267 623.000 +CPAR2_212720-T 1281 1081.621 2.753063 41.000 +CPAR2_212730-T 1284 1084.621 324.932063 4852.474 +CPAR2_212740-T 1497 1297.621 46.063756 823.000 +CPAR2_212750-T 1230 1030.621 159.968401 2270.000 +CPAR2_212760-T 2700 2500.621 33.894593 1167.000 +CPAR2_212770-T 2151 1951.621 38.256484 1028.000 +CPAR2_212780-T 564 364.747 48.585386 244.000 +CPAR2_212790-T 1071 871.621 101.740830 1221.000 +CPAR2_212800-T 1722 1522.621 16.742592 351.000 +CPAR2_212810-T 1212 1012.621 243.644127 3397.000 +CPAR2_212820-T 759 559.679 169.996296 1310.000 +CPAR2_212830-T 321 121.885 17.280452 29.000 +CPAR2_212840-T 636 436.717 57.042938 343.000 +CPAR2_212850-T 1719 1519.621 14.959478 313.000 +CPAR2_212860-T 1677 1477.621 320.192645 6514.289 +CPAR2_212870-T 2238 2038.621 146.031495 4098.978 +CPAR2_212880-T 543 343.750 142.193490 673.000 +CPAR2_212890-T 1089 889.621 16.246333 199.000 +CPAR2_212900-T 585 385.745 174.913504 929.000 +CPAR2_212910-T 678 478.697 55.378320 365.000 +CPAR2_212920-T 636 436.717 0.332612 2.000 +CPAR2_212925-T 684 484.697 0.000000 0.000 +CPAR2_212930-T 1008 808.621 7.724328 86.000 +CPAR2_212940-T 1071 871.621 133.046064 1596.697 +CPAR2_212950-T 453 253.759 100.460090 351.000 +CPAR2_212960-T 630 430.726 42.829256 254.000 +CPAR2_212970-T 1185 985.621 26.601405 361.000 +CPAR2_212980-T 1017 817.621 239.967237 2701.449 +CPAR2_212990-T 1413 1213.621 63.195797 1056.000 +CPAR2_213000-T 912 712.649 18.038691 177.000 +CPAR2_213010-T 1482 1282.621 34.258189 605.000 +CPAR2_213020-T 1806 1606.621 96.515652 2135.029 +CPAR2_213030-T 1725 1525.621 29.801291 626.000 +CPAR2_213040-T 1329 1129.621 54.457538 847.000 +CPAR2_213050-T 240 40.990 13060.327809 7370.913 +CPAR2_213060-T 186 8.379 8260.315697 952.992 +CPAR2_213070-T 906 706.649 0.308336 3.000 +CPAR2_213080-T 648 448.708 37.083882 229.109 +CPAR2_213090-T 1776 1576.621 95.172266 2066.000 +CPAR2_213100-T 2934 2734.621 40.236754 1515.000 +CPAR2_213110-T 1854 1654.621 245.968941 5603.655 +CPAR2_213120-T 1368 1168.621 112.601487 1811.801 +CPAR2_213130-T 2802 2602.621 70.520489 2527.079 +CPAR2_213140-T 3303 3103.621 35.639788 1522.987 +CPAR2_213150-T 1011 811.621 22.729387 254.000 +CPAR2_213160-T 975 775.624 14.420393 154.000 +CPAR2_213170-T 204 13.953 1327.313874 255.000 +CPAR2_213180-T 750 550.682 93.508911 709.000 +CPAR2_213190-T 1638 1438.621 17.972603 356.000 +CPAR2_213200-T 1560 1360.621 106.170857 1989.002 +CPAR2_213210-T 1737 1537.621 101.338012 2145.430 +CPAR2_213220-T 471 271.755 1.603545 6.000 +CPAR2_213230-T 1716 1516.621 0.805638 16.823 +CPAR2_213240-T 1731 1531.621 4.940000 104.177 +CPAR2_213250-T 1833 1633.621 27.208683 612.000 +CPAR2_213260-T 1362 1162.621 100.545717 1609.513 +CPAR2_213270-T 990 790.622 28.844837 314.000 +CPAR2_213280-T 2367 2167.621 49.722774 1483.991 +CPAR2_213290-T 2004 1804.621 47.249388 1174.018 +CPAR2_213300-T 357 157.823 9.663964 21.000 +CPAR2_213310-T 3771 3571.621 61.507598 3024.730 +CPAR2_213320-T 3861 3661.621 53.554786 2700.003 +CPAR2_213330-T 825 625.667 40.280394 347.000 +CPAR2_213340-T 753 553.681 47.353816 361.000 +CPAR2_213350-T 1026 826.621 21.262593 242.000 +CPAR2_213360-T 1710 1510.621 62.694504 1304.000 +CPAR2_213370-T 1202 1002.621 31.945458 441.000 +CPAR2_213380-T 339 139.859 596.160561 1148.015 +CPAR2_213390-T 720 520.687 137.290349 984.259 +CPAR2_213400-T 1215 1015.621 71.045391 993.483 +CPAR2_213410-T 1935 1735.621 20.755547 496.000 +CPAR2_213420-T 2955 2755.621 18.607699 706.000 +CPAR2_213430-T 2106 1906.621 188.410797 4946.098 +CPAR2_213440-T 3414 3214.621 60.936322 2697.109 +CPAR2_213450-T 1479 1279.621 259.878552 4578.724 +CPAR2_213460-T 2874 2674.621 23.298743 858.000 +CPAR2_213470-T 777 577.671 118.937251 946.000 +CPAR2_213480-T 981 781.623 137.385158 1478.528 +CPAR2_213490-T 651 451.704 88.649348 551.344 +CPAR2_213500-T 699 499.693 39.243563 270.000 +CPAR2_213510-T 822 622.667 30.909880 265.000 +CPAR2_213520-T 1215 1015.621 51.559764 721.000 +CPAR2_213530-T 258 58.938 39522.672050 32072.604 +CPAR2_213540-T 1131 931.621 0.623675 8.000 +CPAR2_213550-T 1413 1213.621 19.748687 330.000 +CPAR2_213560-T 1194 994.621 211.688620 2898.997 +CPAR2_213570-T 237 38.026 1990.227568 1042.009 +CPAR2_213580-T 897 697.649 39.351580 378.000 +CPAR2_213590-T 1476 1276.621 110.333753 1939.380 +CPAR2_213600-T 909 709.649 106.335753 1039.000 +CPAR2_213610-T 1314 1114.621 21.828552 335.000 +CPAR2_213620-T 777 577.671 71.035462 565.000 +CPAR2_213630-T 1356 1156.621 155.226100 2472.000 +CPAR2_213640-T 2004 1804.621 268.310046 6666.771 +CPAR2_213650-T 2742 2542.621 119.993889 4200.813 +CPAR2_213660-T 777 577.671 38.723756 308.000 +CPAR2_213670-T 1161 961.621 118.507651 1569.072 +CPAR2_213680-T 681 481.697 89.712021 595.000 +CPAR2_213690-T 1599 1399.621 61.319304 1181.681 +CPAR2_213700-T 2004 1804.621 1.690327 42.000 +CPAR2_213710-T 1878 1678.621 140.293998 3242.532 +CPAR2_213720-T 1173 973.621 65.793952 882.000 +CPAR2_tV(CAC)1-T 74 74.000 0.000000 0.000 +CPAR2_213730-T 1986 1786.621 91.465539 2250.000 +CPAR2_213740-T 726 526.686 12.824456 93.000 +CPAR2_213750-T 411 211.806 34.975880 102.000 +CPAR2_213760-T 900 700.649 188.901742 1822.339 +CPAR2_213780-T 2055 1855.621 225.139200 5752.187 +CPAR2_213770-T 2199 1999.621 46.236840 1273.000 +CPAR2_213800-T 333 133.864 15.734059 29.000 +CPAR2_213810-T 1362 1162.621 174.697330 2796.515 +CPAR2_213820-T 1212 1012.621 42.173314 588.000 +CPAR2_213830-T 4347 4147.621 45.687917 2609.113 +CPAR2_213840-T 189 8.749 2274.563321 274.000 +CPAR2_213850-T 984 784.623 125.888314 1360.000 +CPAR2_213860-T 2196 1996.621 176.206651 4844.071 +CPAR2_213870-T 2031 1831.621 11.499436 290.005 +CPAR2_213880-T 2373 2173.621 7.183930 215.000 +CPAR2_213890-T 465 265.756 0.000000 0.000 +CPAR2_213900-T 705 505.690 58.167217 405.000 +CPAR2_213910-T 2814 2614.621 21.250107 765.002 +CPAR2_213920-T 1599 1399.621 71.921736 1386.000 +CPAR2_213930-T 1029 829.621 37.381388 427.000 +CPAR2_213940-T 1068 868.621 65.385843 782.000 +CPAR2_tL(UAA)1-T 84 1.871 0.000000 0.000 +CPAR2_213950-T 1713 1513.621 64.933429 1353.250 +CPAR2_213960-T 1368 1168.621 109.319971 1759.000 +CPAR2_213970-T 1788 1588.621 63.273694 1384.000 +CPAR2_213980-T 1806 1606.621 53.794878 1190.000 +CPAR2_213990-T 1245 1045.621 71.708235 1032.371 +CPAR2_214000-T 2388 2188.621 96.729395 2914.886 +CPAR2_214010-T 2271 2071.621 189.370641 5401.514 +CPAR2_214020-T 1587 1387.621 341.942857 6533.066 +CPAR2_214030-T 2604 2404.621 14.074946 466.000 +CPAR2_214040-T 1482 1282.621 103.850319 1833.998 +CPAR2_214050-T 2133 1933.621 20.621572 549.017 +CPAR2_214060-T 570 370.746 74.833261 382.000 +CPAR2_214070-T 276 76.917 326.709699 346.000 +CPAR2_214080-T 684 484.697 123.770558 826.000 +CPAR2_214090-T 4785 4585.621 31.726539 2003.150 +CPAR2_214100-T 2757 2557.621 173.449022 6108.022 +CPAR2_214110-T 1497 1297.621 76.468113 1366.221 +CPAR2_214120-T 810 610.668 29.614316 249.000 +CPAR2_214130-T 1065 865.621 53.446460 637.000 +CPAR2_214140-T 2139 1939.621 67.812382 1811.000 +CPAR2_214150-T 1185 985.621 268.511956 3643.898 +CPAR2_214160-T 2331 2131.621 62.704650 1840.358 +CPAR2_214170-T 1527 1327.621 70.078112 1281.000 +CPAR2_214180-T 249 49.950 103.953757 71.494 +CPAR2_700010-T 1326 1126.621 10.636860 165.000 +CPAR2_700020-T 885 685.649 5.931896 56.000 +CPAR2_700030-T 4431 4231.621 9.405487 548.000 +CPAR2_700040-T 966 766.625 122.401547 1292.000 +CPAR2_700050-T 2184 1984.621 24.555703 671.000 +CPAR2_700060-T 2640 2440.621 14.283951 480.000 +CPAR2_700070-T 2460 2260.621 80.807136 2515.186 +CPAR2_700080-T 1680 1480.621 76.031785 1550.000 +CPAR2_700090-T 759 559.679 781.012098 6018.518 +CPAR2_700100-T 1266 1066.621 743.772493 10923.024 +CPAR2_700110-T 1758 1558.621 11.416499 245.000 +CPAR2_700120-T 1812 1612.621 0.900752 20.000 +CPAR2_700130-T 1716 1516.621 48.798280 1019.000 +CPAR2_700140-T 1182 982.621 35.995669 487.000 +CPAR2_700150-T 696 496.693 287.395515 1965.444 +CPAR2_700160-T 837 637.664 67.889080 596.052 +CPAR2_700170-T 939 739.643 172.476714 1756.488 +CPAR2_700180-T 1422 1222.621 239.989555 4039.958 +CPAR2_700190-T 1347 1147.621 137.917915 2179.274 +CPAR2_700200-T 1023 823.621 9.700018 110.000 +CPAR2_700210-T 294 94.908 237.993502 311.000 +CPAR2_700220-T 1782 1582.621 94.398429 2057.000 +CPAR2_700230-T 1692 1492.621 142.909728 2937.000 +CPAR2_700240-T 1632 1432.621 36.552016 721.000 +CPAR2_700250-T 1035 835.621 80.396969 925.000 +CPAR2_700260-T 609 409.744 65.051978 367.000 +CPAR2_700270-T 2382 2182.621 43.092221 1295.000 +CPAR2_700280-T 1125 925.621 0.470788 6.000 +CPAR2_700290-T 405 205.812 72.694975 206.000 +CPAR2_700300-T 405 205.812 707.169339 2003.947 +CPAR2_700310-T 987 787.623 115.045422 1247.614 +CPAR2_700320-T 2079 1879.621 32.149839 832.035 +CPAR2_700330-T 3390 3190.621 66.116029 2904.521 +CPAR2_700340-T 1512 1312.621 20.970425 379.000 +CPAR2_700350-T 5457 5257.621 50.905037 3685.043 +CPAR2_700360-T 324 124.880 346.627148 596.000 +CPAR2_700370-T 1887 1687.621 11.877952 276.000 +CPAR2_700380-T 1707 1507.621 1425.178083 29583.797 +CPAR2_700390-T 1881 1681.621 85.065886 1969.591 +CPAR2_700400-T 222 24.450 1208.969116 407.000 +CPAR2_700410-T 1227 1027.621 30.956259 438.000 +CPAR2_700420-T 1863 1663.621 120.100165 2751.000 +CPAR2_700430-T 510 310.752 478.907529 2049.075 +CPAR2_700440-T 789 589.669 1.231684 10.000 +CPAR2_700450-T 2397 2197.621 401.423662 12146.421 +CPAR2_700460-T 1311 1111.621 70.786784 1083.432 +CPAR2_700470-T 696 496.693 67.555575 462.000 +CPAR2_700480-T 1023 823.621 56.260107 638.000 +CPAR2_700490-T 3903 3703.621 38.747920 1975.911 +CPAR2_700500-T 1998 1798.621 142.784154 3536.000 +CPAR2_700510-T 819 619.668 53.914621 460.000 +CPAR2_700520-T 903 703.649 65.129934 631.000 +CPAR2_700530-T 864 664.652 191.992680 1756.999 +CPAR2_700540-T 3549 3349.621 84.648956 3904.000 +CPAR2_700550-T 1746 1546.621 71.848040 1530.000 +CPAR2_700560-T 3498 3298.621 5.306304 241.000 +CPAR2_700570-T 1167 967.621 118.067606 1573.000 +CPAR2_700580-T 2487 2287.621 77.709479 2447.657 +CPAR2_700590-T 372 172.818 222.317861 529.000 +CPAR2_700600-T 1674 1474.621 29.551411 600.000 +CPAR2_700610-T 930 730.645 257.924548 2594.728 +CPAR2_700620-T 939 739.643 47.730432 486.083 +CPAR2_700630-T 2529 2329.621 259.614865 8327.361 +CPAR2_700640-T 639 439.715 16.352029 99.000 +CPAR2_700650-T 987 787.623 38.143764 413.651 +CPAR2_700660-T 1092 892.621 141.495516 1739.012 +CPAR2_700670-T 696 496.693 63.268983 432.685 +CPAR2_700680-T 7884 7684.621 21.189375 2241.987 +CPAR2_700690-T 801 601.669 56.372469 467.000 +CPAR2_700700-T 2763 2563.621 74.884419 2643.248 +CPAR2_700710-T 3195 2995.621 115.819724 4777.074 +CPAR2_700720-T 411 211.806 394.619398 1150.827 +CPAR2_700730-T 1266 1066.621 43.374716 637.000 +CPAR2_700740-T 468 268.755 51.886164 192.000 +CPAR2_700750-T 615 415.744 173.297772 992.000 +CPAR2_700760-T 2958 2758.621 54.603964 2074.000 +CPAR2_700770-T 1269 1069.621 4.413578 65.000 +CPAR2_700780-T 198 11.413 165.450853 26.000 +CPAR2_700790-T 873 673.649 235.464972 2184.000 +CPAR2_700800-T 3189 2989.621 10.810646 445.000 +CPAR2_700810-T 1929 1729.621 37.455993 892.000 +CPAR2_700820-T 1680 1480.621 159.478302 3251.158 +CPAR2_700830-T 1884 1684.621 267.428714 6203.015 +CPAR2_700840-T 1035 835.621 5.214939 60.000 +CPAR2_700850-T 384 184.816 369.012064 939.017 +CPAR2_700860-T 3462 3262.621 67.628321 3038.000 +CPAR2_700870-T 777 577.671 338.052333 2688.792 +CPAR2_700880-T 2718 2518.621 178.008564 6173.000 +CPAR2_700890-T 1725 1525.621 89.261054 1875.000 +CPAR2_700900-T 1986 1786.621 75.394324 1854.657 +CPAR2_700910-T 1779 1579.621 123.957951 2696.000 +CPAR2_700920-T 1656 1456.621 8.476367 170.000 +CPAR2_700930-T 2493 2293.621 32.615422 1030.000 +CPAR2_700940-T 1113 913.621 100.838929 1268.490 +CPAR2_700950-T 1113 913.621 1208.364675 15200.462 +CPAR2_700960-T 1977 1777.621 385.771515 9441.955 +CPAR2_700970-T 1929 1729.621 66.070816 1573.451 +CPAR2_700980-T 1005 805.621 214.832777 2383.000 +CPAR2_700990-T 2079 1879.621 0.734160 19.000 +CPAR2_701000-T 1995 1795.621 96.871546 2394.989 +CPAR2_701010-T 714 514.688 60.254770 427.000 +CPAR2_701020-T 795 595.669 100.590430 825.000 +CPAR2_701030-T 633 433.718 73.848000 441.000 +CPAR2_701040-T 1860 1660.621 38.968580 891.000 +CPAR2_701050-T 1347 1147.621 127.542646 2015.332 +CPAR2_701060-T 1014 814.621 96.645350 1084.000 +CPAR2_701070-T 3324 3124.621 105.564694 4541.597 +CPAR2_701080-T 1491 1291.621 1.855608 33.000 +CPAR2_701090-T 195 10.338 2853.946093 406.239 +CPAR2_701100-T 2037 1837.621 72.683060 1839.000 +CPAR2_701110-T 987 787.623 105.490969 1144.000 +CPAR2_701120-T 855 655.653 48.518530 438.000 +CPAR2_701130-T 1977 1777.621 22.103727 541.000 +CPAR2_701140-T 1923 1723.621 27.859182 661.154 +CPAR2_701150-T 1161 961.621 61.328086 812.000 +CPAR2_701160-T 534 334.751 70.966192 327.089 +CPAR2_701170-T 1269 1069.621 65.049345 958.000 +CPAR2_701180-T 1437 1237.621 90.281973 1538.443 +CPAR2_701190-T 924 724.648 83.287862 831.000 +CPAR2_701200-T 546 346.750 31.960159 152.587 +CPAR2_701210-T 2160 1960.621 44.155582 1191.988 +CPAR2_701220-T 1506 1306.621 153.914943 2769.001 +CPAR2_701230-T 795 595.669 624.148375 5119.000 +CPAR2_701240-T 834 634.664 91.744577 801.709 +CPAR2_701250-T 693 493.695 1.618234 11.000 +CPAR2_701260-T 1026 826.621 0.351448 4.000 +CPAR2_701270-T 576 376.745 181.472617 941.350 +CPAR2_701280-T 1698 1498.621 33.391413 689.000 +CPAR2_701290-T 906 706.649 353.032840 3434.879 +CPAR2_701300-T 1410 1210.621 4.679439 78.000 +CPAR2_701310-T 1434 1234.621 54.473426 926.000 +CPAR2_701320-T 477 277.754 85.767172 328.000 +CPAR2_701330-T 1386 1186.621 23.870456 390.001 +CPAR2_701340-T 3525 3325.621 62.088387 2842.992 +CPAR2_701350-T 753 553.681 60.208869 459.000 +CPAR2_701360-T 2742 2542.621 132.613545 4642.609 +CPAR2_701370-T 1707 1507.621 60.844113 1263.000 +CPAR2_701380-T 669 469.699 2.010165 13.000 +CPAR2_701390-T 762 562.678 40.659809 315.005 +CPAR2_701400-T 1359 1159.621 91.880087 1467.000 +CPAR2_701410-T 1215 1015.621 7.723238 108.000 +CPAR2_701420-T 3279 3079.621 41.908066 1777.000 +CPAR2_701430-T 1347 1147.621 21.011011 332.000 +CPAR2_701440-T 897 697.649 124.301023 1194.000 +CPAR2_701460-T 1059 859.621 11.237040 133.000 +CPAR2_701470-T 1704 1504.621 75.936219 1573.145 +CPAR2_701480-T 981 781.623 0.464601 5.000 +CPAR2_701490-T 3009 2809.621 72.690061 2812.000 +CPAR2_701500-T 1164 964.621 64.073754 851.000 +CPAR2_701510-T 1107 907.621 186.848517 2335.000 +CPAR2_701520-T 1788 1588.621 130.346259 2851.094 +CPAR2_701530-T 1293 1093.621 75.011811 1129.508 +CPAR2_701540-T 3363 3163.621 15.174854 661.000 +CPAR2_701550-T 123 17.012 4.269317 1.000 +CPAR2_701560-T 157 28.382 15.353924 6.000 +CPAR2_701565-T 151 28.218 0.000000 0.000 +CPAR2_701570-T 1786 1586.621 4.531786 99.000 +CPAR2_701580-T 121 16.003 4.538337 1.000 +CPAR2_701590-T 1446 1246.621 21.340535 366.296 +CPAR2_701620-T 1479 1279.621 135.451803 2386.485 +CPAR2_701630-T 2766 2566.621 2.433572 86.000 +CPAR2_701640-T 2091 1891.621 12.439941 324.000 +CPAR2_701650-T 1761 1561.621 240.175126 5164.119 +CPAR2_701660-T 2262 2062.621 28.662228 813.995 +CPAR2_701670-T 1686 1486.621 167.181326 3422.005 +CPAR2_701680-T 4203 4003.621 54.549145 3007.000 +CPAR2_701690-T 2394 2194.621 24.820422 750.000 +CPAR2_701700-T 2346 2146.621 32.480544 960.000 +CPAR2_701710-T 924 724.648 25.858325 258.000 +CPAR2_701720-T 273 73.920 102.183227 104.000 +CPAR2_701730-T 918 718.649 17.688981 175.030 +CPAR2_701740-T 369 169.818 225.746873 527.835 +CPAR2_701750-T 1023 823.621 32.715517 371.000 +CPAR2_701760-T 849 649.655 40.805384 365.000 +CPAR2_701770-T 180 9.123 1831.011963 230.000 +CPAR2_701780-T 273 73.920 56.004269 57.000 +CPAR2_701790-T 1014 814.621 62.142232 697.004 +CPAR2_701800-T 666 466.700 65.672270 422.000 +CPAR2_701810-T 1029 829.621 87.981956 1005.000 +CPAR2_701820-T 249 49.950 241.367550 166.000 +CPAR2_701830-T 1254 1054.621 308.891352 4485.334 +CPAR2_701840-T 948 748.635 0.194029 2.000 +CPAR2_701850-T 1134 934.621 53.797866 692.298 +CPAR2_701860-T 597 397.744 173.836249 952.000 +CPAR2_701870-T 1113 913.621 0.000000 0.000 +CPAR2_701880-T 1122 922.621 0.157440 2.000 +CPAR2_701890-T 1146 946.621 11.431875 149.000 +CPAR2_701900-T 1206 1006.621 74.964714 1039.000 +CPAR2_701910-T 2598 2398.621 84.472755 2789.786 +CPAR2_701920-T 2481 2281.621 48.766148 1531.985 +CPAR2_701930-T 1164 964.621 8.809200 117.000 +CPAR2_701940-T 972 772.624 19.928526 212.000 +CPAR2_701950-T 3255 3055.621 42.593760 1792.000 +CPAR2_701960-T 765 565.676 64.067986 499.001 +CPAR2_701970-T 2511 2311.621 30.884767 983.000 +CPAR2_701980-T 354 154.828 73.647544 157.000 +CPAR2_701990-T 1971 1771.621 42.753221 1042.875 +CPAR2_702000-T 1329 1129.621 16.845189 262.000 +CPAR2_702010-T 273 73.920 154.257371 157.000 +CPAR2_702020-T 1833 1633.621 112.619131 2533.122 +CPAR2_702030-T 3036 2836.621 38.789910 1515.000 +CPAR2_702040-T 1107 907.621 0.080021 1.000 +CPAR2_702050-T 495 295.752 1.719006 7.000 +CPAR2_702060-T 1197 997.621 52.352495 719.111 +CPAR2_702070-T 918 718.649 67.510096 668.002 +CPAR2_702080-T 2049 1849.621 80.496784 2050.000 +CPAR2_702090-T 687 487.696 502.793669 3376.228 +CPAR2_702100-T 1158 958.621 6.136848 81.000 +CPAR2_702110-T 1104 904.621 22.720981 283.000 +CPAR2_702120-T 687 487.696 110.618459 742.796 +CPAR2_702130-T 1446 1246.621 0.873905 15.000 +CPAR2_702140-T 1209 1009.621 254.727050 3541.002 +CPAR2_702150-T 1344 1144.621 176.556438 2782.518 +CPAR2_702160-T 336 136.862 42.453628 80.000 +CPAR2_702170-T 1464 1264.621 44.167301 769.049 +CPAR2_702180-T 753 553.681 6.821048 52.000 +CPAR2_702190-T 369 169.818 98.367367 230.000 +CPAR2_702200-T 1365 1165.621 30.413071 488.102 +CPAR2_702210-T 1911 1711.621 118.655135 2796.319 +CPAR2_702220-T 528 328.751 17.673822 80.000 +CPAR2_702230-T 1482 1282.621 93.273081 1647.204 +CPAR2_702240-T 3243 3043.621 73.210310 3068.000 +CPAR2_702250-T 5307 5107.621 74.348034 5228.543 +CPAR2_702260-T 747 547.682 105.159564 792.994 +CPAR2_702280-T 1707 1507.621 55.255954 1147.001 +CPAR2_702290-T 204 13.953 1696.879697 326.000 +CPAR2_702300-T 1410 1210.621 96.348443 1606.000 +CPAR2_702310-T 1932 1732.621 9.641213 230.000 +CPAR2_702320-T 1260 1060.621 44.167908 645.000 +CPAR2_702330-T 981 781.623 166.048424 1787.000 +CPAR2_702340-T 420 220.797 42.433052 129.000 +CPAR2_702350-T 516 316.752 54.800733 239.000 +CPAR2_702360-T 786 586.669 22.036087 178.000 +CPAR2_702370-T 1608 1408.621 13.560290 263.000 +CPAR2_702380-T 1938 1738.621 52.551260 1258.000 +CPAR2_702390-T 852 652.654 74.670826 671.006 +CPAR2_702400-T 264 64.930 1630.874384 1458.000 +CPAR2_702410-T 831 631.666 19.316549 168.000 +CPAR2_702420-T 807 607.668 282.124926 2360.482 +CPAR2_702430-T 1044 844.621 77.820496 905.000 +CPAR2_702440-T 336 136.862 290.811412 548.008 +CPAR2_702450-T 1002 802.621 14.025826 155.000 +CPAR2_702460-T 1998 1798.621 28.952556 717.000 +CPAR2_702470-T 648 448.708 21.751293 134.382 +CPAR2_702480-T 1080 880.621 85.938146 1042.000 +CPAR2_702490-T 627 427.738 47.587892 280.263 +CPAR2_702500-T 1011 811.621 13.691324 153.000 +CPAR2_702510-T 606 406.744 986.726446 5526.000 +CPAR2_702520-T 552 352.749 2.676612 13.000 +CPAR2_702530-T 393 193.816 38.222416 102.000 +CPAR2_702540-T 396 196.816 2.583129 7.000 +CPAR2_702550-T 4206 4006.621 82.230867 4536.341 +CPAR2_702560-T 894 694.649 52.746005 504.484 +CPAR2_702570-T 768 568.674 223.899433 1753.109 +CPAR2_702580-T 684 484.697 86.795587 579.242 +CPAR2_702590-T 270 70.923 6.144251 6.000 +CPAR2_702600-T 756 556.680 270.067247 2070.000 +CPAR2_702610-T 1164 964.621 85.080308 1130.000 +CPAR2_702620-T 885 685.649 154.749364 1460.910 +CPAR2_702630-T 360 160.822 197.805037 438.000 +CPAR2_702640-T 1152 952.621 1331.124013 17459.482 +CPAR2_702650-T 1257 1057.621 26.874009 391.341 +CPAR2_702660-T 1239 1039.621 9.688597 138.685 +CPAR2_702670-T 750 550.682 80.875077 613.208 +CPAR2_702680-T 750 550.682 66.279629 502.543 +CPAR2_702690-T 3390 3190.621 59.129559 2597.601 +CPAR2_702700-T 615 415.744 51.360428 294.000 +CPAR2_702710-T 912 712.649 48.448384 475.387 +CPAR2_702720-T 1635 1435.621 28.785903 569.000 +CPAR2_702730-T 1587 1387.621 12.038278 230.000 +CPAR2_702740-T 489 289.753 252.411771 1007.000 +CPAR2_702750-T 573 373.745 28.760294 148.000 +CPAR2_702760-T 447 247.762 321.981279 1098.391 +CPAR2_702770-T 2205 2005.621 93.464473 2581.000 +CPAR2_702780-T 1146 946.621 156.635795 2041.549 +CPAR2_702790-T 4800 4600.621 57.903623 3667.877 +CPAR2_702800-T 2445 2245.621 33.603656 1039.000 +CPAR2_702810-T 2100 1900.621 123.925045 3243.002 +CPAR2_702820-T 588 388.744 94.161606 504.000 +CPAR2_702830-T 486 286.753 255.761028 1009.798 +CPAR2_702840-T 642 442.713 0.328107 2.000 +CPAR2_702850-T 1431 1231.621 79.286902 1344.532 +CPAR2_702860-T 741 541.683 61.542453 459.000 +CPAR2_702870-T 1122 922.621 64.707675 822.000 +CPAR2_702880-T 405 205.812 26.466617 75.000 +CPAR2_702890-T 864 664.652 216.688546 1983.000 +CPAR2_702900-T 639 439.715 231.570724 1401.997 +CPAR2_702910-T 2907 2707.621 88.127192 3285.416 +CPAR2_702920-T 1674 1474.621 21.222932 430.902 +CPAR2_702930-T 444 244.764 116.317804 392.000 +CPAR2_702940-T 1680 1480.621 9.275784 189.098 +CPAR2_702950-T 1677 1477.621 0.540676 11.000 +CPAR2_702960-T 1653 1453.621 0.249819 5.000 +CPAR2_702970-T 1644 1444.621 0.854678 17.000 +CPAR2_702980-T 1989 1789.621 215.578837 5312.021 +CPAR2_702990-T 705 505.690 281.861639 1962.514 +CPAR2_703000-T 999 799.621 68.848153 758.000 +CPAR2_703010-T 2712 2512.621 86.612187 2996.391 +CPAR2_703020-T 1176 976.621 110.955820 1492.000 +CPAR2_703030-T 2859 2659.621 81.824040 2996.355 +CPAR2_703040-T 1830 1630.621 52.493601 1178.561 +CPAR2_703050-T 666 466.700 256.134255 1645.880 +CPAR2_703060-T 3780 3580.621 28.681280 1414.000 +CPAR2_703070-T 369 169.818 242.069259 566.000 +CPAR2_703080-T 2097 1897.621 118.456418 3095.000 +CPAR2_703090-T 1806 1606.621 141.720136 3135.000 +CPAR2_703100-T 1023 823.621 50.792252 575.994 +CPAR2_703110-T 813 613.668 122.186623 1032.404 +CPAR2_703120-T 2655 2455.621 29.901795 1011.000 +CPAR2_703130-T 459 259.757 148.748142 532.000 +CPAR2_703140-T 1188 988.621 20.790452 283.000 +CPAR2_703150-T 2133 1933.621 146.224966 3893.009 +CPAR2_703160-T 1170 970.621 59.958534 801.297 +CPAR2_703170-T 1785 1585.621 42.185713 920.995 +CPAR2_703180-T 2796 2596.621 66.365291 2372.696 +CPAR2_703190-T 1398 1198.621 22.177192 366.000 +CPAR2_703200-T 1398 1198.621 1.938989 32.000 +CPAR2_703210-T 480 280.753 9.830290 38.000 +CPAR2_703220-T 6225 6025.621 40.788340 3384.000 +CPAR2_703230-T 489 289.753 15.791402 63.000 +CPAR2_703240-T 831 631.666 79.910725 695.000 +CPAR2_703250-T 1098 898.621 184.563520 2283.574 +CPAR2_703260-T 810 610.668 8.801042 74.000 +CPAR2_703270-T 3417 3217.621 82.037857 3634.475 +CPAR2_703280-T 633 433.718 58.274612 348.000 +CPAR2_703290-T 789 589.669 281.070311 2282.000 +CPAR2_703300-T 387 187.816 270.303461 699.000 +CPAR2_703310-T 1122 922.621 24.718017 314.000 +CPAR2_703320-T 1200 1000.621 39.340240 542.000 +CPAR2_703330-T 1773 1573.621 104.185351 2257.353 +CPAR2_703340-T 1407 1207.621 92.796710 1542.964 +CPAR2_703350-T 2757 2557.621 104.575772 3682.645 +CPAR2_703360-T 1044 844.621 4.987391 58.000 +CPAR2_703370-T 471 271.755 66.547115 249.000 +CPAR2_703380-T 1986 1786.621 14.065367 346.000 +CPAR2_703390-T 4965 4765.621 35.829687 2351.013 +CPAR2_703400-T 681 481.697 77.800677 516.000 +CPAR2_703410-T 1458 1258.621 147.450456 2555.252 +CPAR2_703420-T 1020 820.621 69.564426 786.000 +CPAR2_703430-T 738 538.684 262.950592 1950.297 +CPAR2_703440-T 897 697.649 60.172522 578.000 +CPAR2_703450-T 3264 3064.621 544.969957 22995.448 +CPAR2_703460-T 1299 1099.621 73.314065 1110.000 +CPAR2_703460.1-T 489 289.753 50.131434 200.000 +CPAR2_703470-T 2382 2182.621 58.565489 1760.000 +CPAR2_703480-T 2211 2011.621 21.807115 604.000 +CPAR2_703490-T 636 436.717 2.161977 13.000 +CPAR2_703500-T 1266 1066.621 270.258086 3969.004 +CPAR2_703510-T 4326 4126.621 88.976964 5055.507 +CPAR2_703520-T 561 361.747 35.938125 179.000 +CPAR2_703530-T 771 571.671 350.519921 2759.000 +CPAR2_703540-T 975 775.624 33.356656 356.226 +CPAR2_703550-T 1749 1549.621 49.682056 1060.029 +CPAR2_703560-T 498 298.752 13.857063 57.000 +CPAR2_703570-T 1746 1546.621 103.885536 2212.237 +CPAR2_703580-T 1740 1540.621 98.527592 2090.000 +CPAR2_703590-T 1728 1528.621 38.714999 814.839 +CPAR2_703600-T 1395 1195.621 38.208894 629.000 +CPAR2_703610-T 1548 1348.621 55.692528 1034.140 +CPAR2_703620-T 1797 1597.621 47.869844 1053.000 +CPAR2_703630-T 2784 2584.621 30.460699 1084.000 +CPAR2_703640-T 1479 1279.621 312.735964 5510.003 +CPAR2_703650-T 873 673.649 21.023658 195.000 +CPAR2_703660-T 924 724.648 24.755839 247.000 +CPAR2_703670-T 1029 829.621 21.298572 243.289 +CPAR2_703680-T 1995 1795.621 106.700771 2638.000 +CPAR2_703690-T 3156 2956.621 62.247269 2534.011 +CPAR2_703700-T 1449 1249.621 7.904383 136.000 +CPAR2_703710-T 1632 1432.621 100.048884 1973.496 +CPAR2_703720-T 1029 829.621 7.766114 88.711 +CPAR2_703730-T 669 469.699 56.439239 365.000 +CPAR2_703740-T 624 424.742 19.322379 113.000 +CPAR2_703750-T 2028 1828.621 58.246721 1466.519 +CPAR2_703760-T 975 775.624 31.743592 339.000 +CPAR2_703770-T 849 649.655 39.240246 351.000 +CPAR2_703780-T 591 391.744 60.254298 325.000 +CPAR2_703790-T 1401 1201.621 35.842191 593.000 +CPAR2_703800-T 1854 1654.621 0.570627 13.000 +CPAR2_703810-T 1647 1447.621 23.398185 466.369 +CPAR2_703820-T 2049 1849.621 30.156844 768.000 +CPAR2_703830-T 939 739.643 69.226808 705.000 +CPAR2_703840-T 1398 1198.621 56.594312 934.001 +CPAR2_703850-T 264 64.930 234.899603 210.000 +CPAR2_703860-T 1608 1408.621 50.789320 985.052 +CPAR2_703870-T 3189 2989.621 22.374377 921.000 +CPAR2_703880-T 2433 2233.621 105.998597 3259.884 +CPAR2_703890-T 750 550.682 0.000000 0.000 +CPAR2_703900-T 450 250.759 0.000000 0.000 +CPAR2_703910-T 1737 1537.621 104.851814 2219.820 +CPAR2_703920-T 669 469.699 81.798240 529.000 +CPAR2_703930-T 522 322.751 177.431021 788.478 +CPAR2_703940-T 1338 1138.621 258.698471 4055.699 +CPAR2_703950-T 1242 1042.621 48.696156 699.059 +CPAR2_703960-T 1737 1537.621 97.108975 2055.897 +CPAR2_703970-T 1569 1369.621 180.455002 3403.000 +CPAR2_703980-T 654 454.702 26.355114 165.000 +CPAR2_704000-T 3360 3160.621 63.578038 2766.764 +CPAR2_704010-T 2844 2644.621 108.351585 3945.402 +CPAR2_704020-T 2817 2617.621 63.759448 2297.967 +CPAR2_704030-T 621 421.743 113.314590 658.000 +CPAR2_704040-T 297 97.907 818.220737 1103.000 +CPAR2_704050-T 1329 1129.621 103.761469 1613.844 +CPAR2_704060-T 501 301.752 308.161450 1280.327 +CPAR2_704070-T 723 523.687 215.112848 1551.067 +CPAR2_704080-T 2109 1909.621 472.804573 12431.440 +CPAR2_704090-T 1743 1543.621 143.841039 3057.145 +CPAR2_704100-T 687 487.696 80.566638 541.000 +CPAR2_704110-T 1653 1453.621 325.530472 6515.315 +CPAR2_704120-T 2109 1909.621 76.184163 2003.108 +CPAR2_704130-T 3108 2908.621 74.486848 2983.041 +CPAR2_704140-T 867 667.651 54.499944 501.000 +CPAR2_704150-T 822 622.667 83.981562 720.000 +CPAR2_704160-T 501 301.752 599.383746 2490.276 +CPAR2_704170-T 426 226.786 1.281004 4.000 +CPAR2_704180-T 1266 1066.621 56.312229 827.000 +CPAR2_704190-T 1128 928.621 38.088842 487.000 +CPAR2_704200-T 1653 1453.621 47.065980 942.000 +CPAR2_704210-T 3495 3295.621 60.478512 2744.296 +CPAR2_704220-T 3957 3757.621 57.153894 2957.000 +CPAR2_704230-T 519 319.751 49.516695 218.000 +CPAR2_704240-T 2727 2527.621 81.876244 2849.459 +CPAR2_704250-T 1077 877.621 121.237764 1465.000 +CPAR2_704260-T 528 328.751 279.688091 1265.999 +CPAR2_704270-T 495 295.752 30.205384 123.000 +CPAR2_704280-T 558 358.747 24.496509 121.000 +CPAR2_704290-T 618 418.744 114.819876 662.000 +CPAR2_704300-T 4926 4726.621 54.460591 3544.261 +CPAR2_704310-T 1962 1762.621 51.588488 1252.000 +CPAR2_704320-T 1248 1048.621 2.008569 29.000 +CPAR2_704330-T 1500 1300.621 0.502573 9.000 +CPAR2_704340-T 966 766.625 66.795466 705.054 +CPAR2_704350-T 885 685.649 98.088137 926.000 +CPAR2_704360-T 405 205.812 1.058665 3.000 +CPAR2_704370-T 2226 2026.621 53.684227 1498.000 +CPAR2_500010-T 1740 1540.621 29.793990 632.000 +CPAR2_500020-T 4560 4360.621 67.747134 4067.540 +CPAR2_500030-T 1737 1537.621 130.604232 2765.026 +CPAR2_500040-T 1266 1066.621 221.330741 3250.458 +CPAR2_500050-T 5532 5332.621 15.514319 1139.111 +CPAR2_500060-T 1113 913.621 103.502789 1301.999 +CPAR2_500070-T 531 331.751 61.955792 283.000 +CPAR2_500080-T 438 238.769 16.121516 53.000 +CPAR2_500090-T 456 256.758 233.365801 825.000 +CPAR2_500100-T 2382 2182.621 54.406008 1635.000 +CPAR2_500110-T 843 643.659 33.738257 299.000 +CPAR2_500120-T 4122 3922.621 38.717974 2091.132 +CPAR2_500130-T 756 556.680 41.097190 315.000 +CPAR2_500140-T 1698 1498.621 9.886572 204.000 +CPAR2_500150-T 918 718.649 79.209936 783.770 +CPAR2_500160-T 2673 2473.621 4.198656 143.000 +CPAR2_500170-T 1857 1657.621 7.098021 162.000 +CPAR2_500180-T 1344 1144.621 3.743671 59.000 +CPAR2_500190-T 888 688.649 93.336755 885.000 +CPAR2_500200-T 3483 3283.621 79.293975 3584.972 +CPAR2_500210-T 1686 1486.621 163.174990 3340.000 +CPAR2_500220-T 1386 1186.621 55.942417 913.999 +CPAR2_500230-T 1005 805.621 74.014985 821.000 +CPAR2_500240-T 3483 3283.621 43.808190 1980.619 +CPAR2_500250-T 1542 1342.621 57.517712 1063.280 +CPAR2_500260-T 669 469.699 53.347076 345.003 +CPAR2_500270-T 1935 1735.621 15.273740 365.000 +CPAR2_500280-T 1305 1105.621 160.152418 2437.993 +CPAR2_500290-T 2403 2203.621 60.685416 1841.254 +CPAR2_500300-T 1125 925.621 23.793837 303.243 +CPAR2_500310-T 1731 1531.621 136.316234 2874.693 +CPAR2_500320-T 789 589.669 0.369505 3.000 +CPAR2_500330-T 465 265.756 70.502331 257.976 +CPAR2_500340-T 213 18.486 1033.297262 263.000 +CPAR2_500350-T 228 29.478 874.667062 355.000 +CPAR2_500360-T 3303 3103.621 87.617423 3744.137 +CPAR2_500370-T 2157 1957.621 94.616091 2550.270 +CPAR2_500380-T 246 46.958 179.926543 116.332 +CPAR2_500390-T 465 265.756 705.652522 2582.060 +CPAR2_500400-T 1878 1678.621 128.220941 2963.495 +CPAR2_500410-T 2370 2170.621 49.650859 1483.896 +CPAR2_500420-T 957 757.629 74.485559 777.000 +CPAR2_500430-T 840 640.661 38.083256 335.935 +CPAR2_500440-T 954 754.632 48.988073 509.000 +CPAR2_500450-T 435 235.772 58.528675 190.000 +CPAR2_500460-T 2556 2356.621 115.122153 3735.435 +CPAR2_500470-T 2613 2413.621 52.191214 1734.439 +CPAR2_500480-T 8265 8065.621 17.487145 1942.000 +CPAR2_500490-T 1200 1000.621 1.524253 21.000 +CPAR2_500500-T 1026 826.621 56.319512 641.000 +CPAR2_500510-T 1479 1279.621 9.194773 162.000 +CPAR2_500520-T 1557 1357.621 103.784038 1940.000 +CPAR2_500530-T 987 787.623 142.053116 1540.499 +CPAR2_500540-T 1659 1459.621 14.181173 285.000 +CPAR2_500550-T 1839 1639.621 231.490588 5226.000 +CPAR2_500560-T 1371 1171.621 62.733674 1012.000 +CPAR2_500570-T 4203 4003.621 34.631451 1909.045 +CPAR2_500580-T 1401 1201.621 99.729535 1650.000 +CPAR2_500590-T 2310 2110.621 215.886446 6273.764 +CPAR2_500600-T 546 346.750 27.019743 129.000 +CPAR2_500610-T 1158 958.621 35.919512 474.100 +CPAR2_500620-T 1917 1717.621 34.091795 806.250 +CPAR2_500630-T 2280 2080.621 54.245722 1554.000 +CPAR2_500640-T 267 67.926 223.469189 209.000 +CPAR2_500650-T 1317 1117.621 51.551596 793.285 +CPAR2_500660-T 3072 2872.621 15.211239 601.638 +CPAR2_500670-T 3837 3637.621 15.912864 797.000 +CPAR2_500680-T 1257 1057.621 132.467549 1929.000 +CPAR2_500680.1-T 252 52.945 5.487067 4.000 +CPAR2_500690-T 2067 1867.621 50.321427 1294.000 +CPAR2_500700-T 1467 1267.621 44.522231 777.068 +CPAR2_500710-T 801 601.669 15.451126 128.000 +CPAR2_500720-T 5055 4855.621 73.181656 4892.598 +CPAR2_500730-T 1149 949.621 746.890472 9765.622 +CPAR2_500740-T 1287 1087.621 73.128675 1095.111 +CPAR2_500750-T 789 589.669 0.492674 4.000 +CPAR2_500760-T 1686 1486.621 43.920454 899.000 +CPAR2_500770-T 975 775.624 6.556909 70.023 +CPAR2_500780-T 966 766.625 39.695239 419.000 +CPAR2_500790-T 1770 1570.621 30.843371 667.000 +CPAR2_500800-T 1371 1171.621 126.862540 2046.507 +CPAR2_500810-T 1122 922.621 74.706112 949.013 +CPAR2_500820-T 2163 1963.621 75.870438 2051.270 +CPAR2_500830-T 1095 895.621 22.787116 281.000 +CPAR2_500840-T 249 49.950 5106.523115 3512.000 +CPAR2_500850-T 1863 1663.621 48.066260 1101.000 +CPAR2_500860-T 1440 1240.621 40.335501 689.000 +CPAR2_500870-T 1512 1312.621 836.264465 15113.868 +CPAR2_500880-T 1653 1453.621 323.679247 6478.264 +CPAR2_500890-T 2190 1990.621 70.708662 1938.000 +CPAR2_500900-T 1545 1345.621 3.670232 68.000 +CPAR2_500910-T 585 385.745 0.000000 0.000 +CPAR2_500920-T 1278 1078.621 9.628852 143.000 +CPAR2_500930-T 363 163.820 39.457655 89.000 +CPAR2_500940-T 393 193.816 11.991346 32.000 +CPAR2_500950-T 864 664.652 79.754032 729.860 +CPAR2_500960-T 1320 1120.621 187.186850 2888.197 +CPAR2_500970-T 4374 4174.621 34.168972 1964.000 +CPAR2_500980-T 1551 1351.621 7.630286 142.000 +CPAR2_500990-T 2991 2791.621 19.954753 767.000 +CPAR2_501000-T 915 715.649 210.762087 2076.754 +CPAR2_501010-T 1767 1567.621 34.191857 738.000 +CPAR2_501020-T 1701 1501.621 162.464175 3359.004 +CPAR2_501030-T 867 667.651 28.609752 263.000 +CPAR2_501040-T 837 637.664 67.769427 595.001 +CPAR2_501050-T 4332 4132.621 23.251156 1323.009 +CPAR2_501060-T 1185 985.621 76.635627 1040.000 +CPAR2_501070-T 579 379.745 340.518662 1780.431 +CPAR2_501080-T 555 355.748 52.273619 256.046 +CPAR2_501090-T 408 208.809 66.434118 191.000 +CPAR2_501100-T 1542 1342.621 62.422988 1153.960 +CPAR2_501110-T 2409 2209.621 192.843850 5867.001 +CPAR2_501120-T 1821 1621.621 34.620835 773.000 +CPAR2_501130-T 801 601.669 42.007750 348.000 +CPAR2_501140-T 840 640.661 0.566825 5.000 +CPAR2_501150-T 840 640.661 0.680190 6.000 +CPAR2_501160-T 840 640.661 7.935549 70.000 +CPAR2_501170-T 846 646.657 55.258427 492.000 +CPAR2_501180-T 1917 1717.621 248.769857 5883.255 +CPAR2_501190-T 528 328.751 70.916210 321.000 +CPAR2_501200-T 1917 1717.621 97.520110 2306.291 +CPAR2_501210-T 1230 1030.621 39.534041 561.000 +CPAR2_501220-T 1254 1054.621 0.619803 9.000 +CPAR2_501230-T 2757 2557.621 148.273891 5221.478 +CPAR2_501240-T 450 250.759 46.341530 160.000 +CPAR2_501250-T 1113 913.621 267.422055 3364.000 +CPAR2_501260-T 774 574.671 57.377315 453.996 +CPAR2_501270-T 1692 1492.621 72.355044 1487.000 +CPAR2_501280-T 648 448.708 371.788101 2296.951 +CPAR2_501290-T 342 142.854 585.697905 1152.014 +CPAR2_501300-T 2016 1816.621 31.915758 798.293 +CPAR2_501310-T 1398 1198.621 88.102835 1454.000 +CPAR2_501320-T 1914 1714.621 71.924518 1698.000 +CPAR2_501330-T 1953 1753.621 106.926472 2581.746 +CPAR2_501340-T 2151 1951.621 27.661025 743.287 +CPAR2_501350-T 744 544.682 51.469684 386.000 +CPAR2_501360-T 459 259.757 0.000000 0.000 +CPAR2_501370-T 1158 958.621 7.576356 100.000 +CPAR2_501380-T 1365 1165.621 366.749653 5885.993 +CPAR2_501390-T 2136 1936.621 59.854344 1596.000 +CPAR2_501400-T 2607 2407.621 26.305544 872.023 +CPAR2_501410-T 2313 2113.621 33.331285 970.000 +CPAR2_501415-T 168 20.414 163.656618 46.000 +CPAR2_501420-T 1059 859.621 33.204185 393.000 +CPAR2_501430-T 9186 8986.621 9.326461 1154.000 +CPAR2_501440-T 567 367.746 62.211400 315.000 +CPAR2_501450-T 1143 943.621 40.946930 532.000 +CPAR2_501460-T 450 250.759 640.671653 2212.000 +CPAR2_501470-T 3501 3301.621 29.213739 1328.027 +CPAR2_501480-T 1194 994.621 15.334478 210.000 +CPAR2_501490-T 1368 1168.621 19.452616 313.000 +CPAR2_tS(UGA)1-T 82 1.388 0.000000 0.000 +CPAR2_501500-T 2076 1876.621 133.840308 3458.248 +CPAR2_501510-T 2001 1801.621 41.723846 1035.000 +CPAR2_501520-T 831 631.666 89.798959 781.000 +CPAR2_tT(UGU)1-T 73 73.000 0.000000 0.000 +CPAR2_501530-T 1761 1561.621 0.930169 20.000 +CPAR2_501540-T 3060 2860.621 25.516035 1005.000 +CPAR2_501550-T 2400 2200.621 10.099122 306.000 +CPAR2_501560-T 1023 823.621 20.987313 238.000 +CPAR2_501570-T 3609 3409.621 137.157244 6438.985 +CPAR2_501580-T 3867 3667.621 37.737198 1905.665 +CPAR2_501590-T 3471 3271.621 31.152053 1403.273 +CPAR2_501600-T 1602 1402.621 17.139377 331.000 +CPAR2_501610-T 477 277.754 246.057648 941.000 +CPAR2_501620-T 1827 1627.621 39.669423 889.000 +CPAR2_501630-T 4338 4138.621 20.782574 1184.261 +CPAR2_501640-T 3549 3349.621 101.160502 4665.511 +CPAR2_501650-T 321 121.885 251.460369 422.000 +CPAR2_501660-T 1479 1279.621 56.545703 996.262 +CPAR2_501670-T 1392 1192.621 22.654154 372.000 +CPAR2_501680-T 468 268.755 80.261411 297.000 +CPAR2_501690-T 819 619.668 164.322388 1402.000 +CPAR2_501700-T 2241 2041.621 5.620687 158.000 +CPAR2_501710-T 3153 2953.621 218.828452 8899.203 +CPAR2_501720-T 1614 1414.621 137.710890 2682.261 +CPAR2_501730-T 1860 1660.621 49.028155 1121.008 +CPAR2_501740-T 1323 1123.621 38.201022 591.000 +CPAR2_501750-T 720 520.687 31.244875 224.000 +CPAR2_501760-T 1995 1795.621 110.488323 2731.641 +CPAR2_501770-T 495 295.752 42.729567 174.000 +CPAR2_501780-T 1077 877.621 1.489611 18.000 +CPAR2_501800-T 1449 1249.621 28.250071 486.061 +CPAR2_501810-T 1488 1288.621 1.912869 33.939 +CPAR2_501820-T 813 613.668 32.309990 273.000 +CPAR2_501830-T 480 280.753 113.048548 437.001 +CPAR2_501840-T 291 91.909 24.496821 31.000 +CPAR2_501845-T 279 79.915 15.449966 17.000 +CPAR2_501850-T 1176 976.621 0.223102 3.000 +CPAR2_501860-T 624 424.742 58.143411 340.031 +CPAR2_tQ(CUG)1-T 73 73.000 0.000000 0.000 +CPAR2_501870-T 1485 1285.621 81.858315 1449.000 +CPAR2_tE(UUC)1-T 72 72.000 0.000000 0.000 +CPAR2_501880-T 2412 2212.621 10.897791 332.000 +CPAR2_501890-T 1137 937.621 27.266077 352.000 +CPAR2_501900-T 741 541.683 69.529652 518.571 +CPAR2_501910-T 1470 1270.621 9.262333 162.043 +CPAR2_501920-T 1881 1681.621 41.721164 966.000 +CPAR2_501930-T 1263 1063.621 9.286656 136.000 +CPAR2_501940-T 336 136.862 70.060545 132.023 +CPAR2_501950-T 525 325.751 86.507438 388.000 +CPAR2_501960-T 1302 1102.621 52.761071 801.000 +CPAR2_501970-T 885 685.649 64.721222 611.000 +CPAR2_501980-T 399 199.815 17.810476 49.000 +CPAR2_501990-T 1278 1078.621 11.110214 165.000 +CPAR2_502000-T 1119 919.621 314.543986 3982.749 +CPAR2_502010-T 504 304.752 10.962735 46.000 +CPAR2_502020-T 1245 1045.621 21.393594 308.000 +CPAR2_502030-T 657 457.702 25.547656 161.000 +CPAR2_502040-T 375 175.818 95.837028 232.000 +CPAR2_502050-T 531 331.751 67.472689 308.200 +CPAR2_502060-T 1659 1459.621 66.825626 1342.999 +CPAR2_502070-T 312 112.898 461.252534 717.000 +CPAR2_502080-T 1164 964.621 1.731723 23.000 +CPAR2_502090-T 1530 1330.621 38.426043 704.000 +CPAR2_502100-T 1404 1204.621 40.515967 672.000 +CPAR2_502110-T 522 322.751 13.726811 61.000 +CPAR2_502120-T 2427 2227.621 2.054030 63.000 +CPAR2_502130-T 2742 2542.621 1.028320 36.000 +CPAR2_502140-T 1755 1555.621 272.231726 5830.894 +CPAR2_502150-T 1101 901.621 97.227822 1207.000 +CPAR2_502160-T 1392 1192.621 10.230908 168.000 +CPAR2_502170-T 1365 1165.621 134.966020 2166.080 +CPAR2_502180-T 330 130.868 443.444613 799.034 +CPAR2_502190-T 813 613.668 106.341970 898.526 +CPAR2_502200-T 312 112.898 250.247190 389.000 +CPAR2_502210-T 6954 6754.621 5.989102 557.000 +CPAR2_502220-T 2136 1936.621 63.222590 1685.813 +CPAR2_502230-T 1641 1441.621 75.217015 1493.000 +CPAR2_502240-T 1014 814.621 56.180529 630.136 +CPAR2_502250-T 1359 1159.621 320.783272 5121.774 +CPAR2_502260-T 2709 2509.621 45.349062 1567.000 +CPAR2_502270-T 873 673.649 84.529605 784.034 +CPAR2_502280-T 1701 1501.621 27.375590 566.000 +CPAR2_502290-T 3585 3385.621 107.413122 5007.122 +CPAR2_502300-T 2703 2503.621 58.176147 2005.423 +CPAR2_502310-T 627 427.738 660.001087 3887.000 +CPAR2_502320-T 822 622.667 65.902198 565.000 +CPAR2_502330-T 945 745.640 22.013367 226.000 +CPAR2_502340-T 801 601.669 197.846844 1639.000 +CPAR2_502350-T 1431 1231.621 80.848027 1371.005 +CPAR2_502360-T 1527 1327.621 57.429997 1049.797 +CPAR2_502370-T 1722 1522.621 63.444242 1330.077 +CPAR2_502380-T 1341 1141.621 14.839102 233.250 +CPAR2_502390-T 846 646.657 44.476295 396.000 +CPAR2_502400-T 1710 1510.621 48.559393 1010.000 +CPAR2_502410-T 861 661.653 47.419967 432.000 +CPAR2_502420-T 1761 1561.621 7.487859 161.000 +CPAR2_502430-T 2373 2173.621 54.898588 1643.000 +CPAR2_502440-T 591 391.744 46.319885 249.840 +CPAR2_502450-T 816 616.668 0.000000 0.000 +CPAR2_502460-T 798 598.669 145.095411 1196.004 +CPAR2_502470-T 843 643.659 52.262988 463.173 +CPAR2_502480-T 534 334.751 46.647071 215.000 +CPAR2_502490-T 801 601.669 66.753694 553.000 +CPAR2_502500-T 2511 2311.621 35.220575 1121.000 +CPAR2_502510-T 834 634.664 54.357192 475.000 +CPAR2_502520-T 957 757.629 42.083862 439.000 +CPAR2_502530-T 345 145.846 91.130333 183.000 +CPAR2_502540-T 3921 3721.621 59.658285 3057.000 +CPAR2_502550-T 1410 1210.621 6.820065 113.681 +CPAR2_502560-T 2121 1921.621 49.814992 1318.015 +CPAR2_502570-T 612 412.744 79.007658 448.996 +CPAR2_502580-T 1212 1012.621 2020.716129 28173.766 +CPAR2_502590-T 2166 1966.621 36.635188 992.000 +CPAR2_502600-T 2370 2170.621 12.930529 386.450 +CPAR2_502610-T 1047 847.621 77.027749 898.963 +CPAR2_502620-T 351 151.833 28.040832 58.620 +CPAR2_502630-T 3333 3133.621 25.379035 1095.000 +CPAR2_502640-T 1554 1354.621 59.419905 1108.262 +CPAR2_502650-T 1479 1279.621 29.003266 511.000 +CPAR2_502660-T 522 322.751 65.933701 293.000 +CPAR2_502670-T 1602 1402.621 54.400861 1050.603 +CPAR2_502680-T 744 544.682 32.801923 246.000 +CPAR2_502690-T 1746 1546.621 27.471309 585.000 +CPAR2_502700-T 1860 1660.621 99.922775 2284.692 +CPAR2_502710-T 1131 931.621 35.783328 459.000 +CPAR2_502720-T 1410 1210.621 10.498741 175.000 +CPAR2_502730-T 702 502.691 0.577918 4.000 +CPAR2_502740-T 2325 2125.621 24.156890 707.000 +CPAR2_502750-T 1587 1387.621 85.262410 1629.000 +CPAR2_502760-T 723 523.687 25.934474 187.000 +CPAR2_502770-T 1062 862.621 95.776249 1137.550 +CPAR2_502780-T 1302 1102.621 54.407796 826.000 +CPAR2_502790-T 789 589.669 40.768744 331.000 +CPAR2_502800-T 822 622.667 72.784020 624.000 +CPAR2_502810-T 798 598.669 386.879356 3189.000 +CPAR2_502820-T 1569 1369.621 46.134442 869.998 +CPAR2_502830-T 960 760.627 42.013479 440.000 +CPAR2_502840-T 3879 3679.621 37.010946 1875.106 +CPAR2_502850-T 306 106.902 385.897148 568.000 +CPAR2_502860-T 534 334.751 63.787158 294.000 +CPAR2_502870-T 2361 2161.621 333.687888 9931.448 +CPAR2_502880-T 1284 1084.621 40.913874 611.000 +CPAR2_502890-T 807 607.668 97.767420 818.000 +CPAR2_502900-T 4425 4225.621 26.004941 1513.000 +CPAR2_502910-T 1203 1003.621 63.500653 877.487 +CPAR2_502920-T 1176 976.621 76.250775 1025.328 +CPAR2_502930-T 1104 904.621 17.823526 222.000 +CPAR2_502940-T 3090 2890.621 30.879353 1229.000 +CPAR2_502950-T 2697 2497.621 172.108476 5918.632 +CPAR2_502960-T 2457 2257.621 14.382548 447.074 +CPAR2_502970-T 1119 919.621 53.683287 679.737 +CPAR2_502980-T 1398 1198.621 38.751489 639.533 +CPAR2_502990-T 744 544.682 91.338689 685.000 +CPAR2_503000-T 1245 1045.621 40.008800 576.000 +CPAR2_503010-T 312 112.898 65.617515 102.000 +CPAR2_503020-T 2364 2164.621 74.724550 2227.090 +CPAR2_503030-T 3255 3055.621 30.665034 1290.136 +CPAR2_503040-T 2712 2512.621 759.771754 26284.679 +CPAR2_503050-T 2262 2062.621 36.021652 1023.000 +CPAR2_503060-T 423 223.791 9.411570 29.000 +CPAR2_503070-T 2511 2311.621 43.420903 1382.000 +CPAR2_503080-T 1938 1738.621 138.408647 3313.300 +CPAR2_503090-T 885 685.649 69.805705 659.000 +CPAR2_503100-T 2067 1867.621 13.571897 348.997 +CPAR2_503110-T 1602 1402.621 58.460671 1129.007 +CPAR2_503120-T 228 29.478 36.957763 15.000 +CPAR2_503130-T 2226 2026.621 43.363566 1210.013 +CPAR2_503140-T 2508 2308.621 87.368187 2777.145 +CPAR2_503150-T 2826 2626.621 36.791327 1330.563 +CPAR2_503160-T 1305 1105.621 239.243975 3642.000 +CPAR2_503170-T 1458 1258.621 107.908089 1870.000 +CPAR2_503180-T 3624 3424.621 57.624169 2717.126 +CPAR2_503190-T 1386 1186.621 223.839228 3657.134 +CPAR2_503200-T 2382 2182.621 84.687028 2545.000 +CPAR2_503210-T 312 112.898 1096.841799 1705.000 +CPAR2_503220-T 1875 1675.621 53.617952 1237.025 +CPAR2_503230-T 2274 2074.621 49.116378 1403.000 +CPAR2_503240-T 1038 838.621 37.153520 429.001 +CPAR2_503250-T 882 682.649 24.470212 230.000 +CPAR2_503260-T 4356 4156.621 27.819318 1592.133 +CPAR2_503270-T 1275 1075.621 0.067522 1.000 +CPAR2_503280-T 711 511.689 0.141939 1.000 +CPAR2_503290-T 2133 1933.621 6.422915 171.000 +CPAR2_503300-T 1071 871.621 52.911898 635.000 +CPAR2_503310-T 1413 1213.621 143.581547 2399.244 +CPAR2_503320-T 723 523.687 82.380093 594.000 +CPAR2_503330-T 1122 922.621 72.579654 922.000 +CPAR2_503340-T 1374 1174.621 84.152635 1361.000 +CPAR2_503350-T 2082 1882.621 214.197574 5552.263 +CPAR2_503360-T 720 520.687 72.161737 517.340 +CPAR2_503370-T 1494 1294.621 29.508727 526.000 +CPAR2_503380-T 621 421.743 115.381117 670.000 +CPAR2_503390-T 966 766.625 22.073963 233.000 +CPAR2_503400-T 1008 808.621 29.550046 329.000 +CPAR2_503410-T 1545 1345.621 109.026893 2019.989 +CPAR2_503420-T 912 712.649 453.005534 4445.000 +CPAR2_503430-T 1452 1252.621 39.079372 674.000 +CPAR2_503440-T 639 439.715 219.018091 1326.000 +CPAR2_503450-T 1164 964.621 93.738923 1245.000 +CPAR2_503460-T 615 415.744 75.466433 431.989 +CPAR2_503470-T 1059 859.621 22.051635 261.000 +CPAR2_503480-T 2667 2467.621 50.958496 1731.361 +CPAR2_503490-T 1452 1252.621 39.891110 688.000 +CPAR2_503495-T 297 97.907 48.217904 65.000 +CPAR2_503500-T 873 673.649 40.861366 379.000 +CPAR2_503510-T 672 472.698 66.990008 436.000 +CPAR2_503520-T 1113 913.621 193.332473 2432.000 +CPAR2_503530-T 1764 1564.621 679.557444 14639.557 +CPAR2_503540-T 1818 1618.621 733.419172 16345.192 +CPAR2_503550-T 990 790.622 8.267628 90.000 +CPAR2_503560-T 966 766.625 100.327584 1059.000 +CPAR2_503570-T 876 676.649 0.536678 5.000 +CPAR2_503580-T 1854 1654.621 143.139558 3261.000 +CPAR2_503590-T 564 364.747 77.457849 389.000 +CPAR2_503600-T 1155 955.621 236.375531 3110.147 +CPAR2_503610-T 1083 883.621 216.992738 2640.000 +CPAR2_503620-T 2655 2455.621 81.069659 2741.020 +CPAR2_503630-T 474 274.755 2.114717 8.000 +CPAR2_503640-T 180 9.123 15.921843 2.000 +CPAR2_503650-T 1335 1135.621 79.432006 1242.000 +CPAR2_503660-T 1143 943.621 11.237315 146.000 +CPAR2_503670-T 543 343.750 6.761057 32.000 +CPAR2_503680-T 2250 2050.621 106.679487 3012.027 +CPAR2_503690-T 1206 1006.621 355.191446 4922.902 +CPAR2_503700-T 450 250.759 10.716479 37.000 +CPAR2_503710-T 528 328.751 52.137774 236.000 +CPAR2_503720-T 723 523.687 73.781497 532.000 +CPAR2_503730-T 561 361.747 606.678421 3021.734 +CPAR2_503740-T 1761 1561.621 16.370970 352.000 +CPAR2_503750-T 1860 1660.621 37.918922 867.000 +CPAR2_503760-T 1062 862.621 84.138121 999.322 +CPAR2_503770-T 7560 7360.621 30.882321 3129.802 +CPAR2_503780-T 3345 3145.621 44.907686 1945.000 +CPAR2_503790-T 678 478.697 103.189762 680.127 +CPAR2_503800-T 390 190.816 479.581968 1260.000 +CPAR2_503810-T 825 625.667 56.880095 490.000 +CPAR2_503820-T 378 178.817 194.145111 478.000 +CPAR2_503830-T 4284 4084.621 36.339445 2043.726 +CPAR2_503840-T 630 430.726 223.588211 1325.996 +CPAR2_503850-T 942 742.642 0.000000 0.000 +CPAR2_tR(CCU)1-T 73 73.000 0.000000 0.000 +CPAR2_503860-T 3759 3559.621 72.508943 3553.758 +CPAR2_503870-T 1521 1321.621 70.180380 1277.072 +CPAR2_503880-T 1551 1351.621 168.672299 3139.000 +CPAR2_503890-T 3516 3316.621 25.687385 1173.028 +CPAR2_503900-T 2274 2074.621 46.931586 1340.592 +CPAR2_503910-T 1311 1111.621 42.533546 651.000 +CPAR2_503920-T 3513 3313.621 17.980681 820.354 +CPAR2_503930-T 801 601.669 146.946663 1217.333 +CPAR2_503940-T 936 736.645 16.563756 168.000 +CPAR2_503950-T 1566 1366.621 28.515252 536.560 +CPAR2_503960-T 594 394.744 35.509847 193.000 +CPAR2_503970-T 360 160.822 65.961601 146.059 +CPAR2_503980-T 2073 1873.621 112.957542 2914.000 +CPAR2_503990-T 765 565.676 2057.199963 16022.743 +CPAR2_504000-T 441 241.766 282.984439 942.000 +CPAR2_504010-T 2355 2155.621 44.751138 1328.217 +CPAR2_504020-T 1326 1126.621 50.025884 776.006 +CPAR2_504030-T 3606 3406.621 60.420386 2834.000 +CPAR2_504040-T 1506 1306.621 92.715808 1668.000 +CPAR2_504050-T 1383 1183.621 204.026424 3325.001 +CPAR2_504060-T 1281 1081.621 187.812588 2797.000 +CPAR2_504070-T 1410 1210.621 131.564086 2192.998 +CPAR2_504080-T 1986 1786.621 358.884737 8828.359 +CPAR2_504090-T 681 481.697 139.619009 926.000 +CPAR2_504100-T 1278 1078.621 40.602781 603.000 +CPAR2_504110-T 1845 1645.621 101.156128 2292.000 +CPAR2_504120-T 348 148.838 42.453321 87.000 +CPAR2_504130-T 1638 1438.621 46.218416 915.491 +CPAR2_504140-T 2061 1861.621 121.332330 3110.000 +CPAR2_504150-T 2460 2260.621 63.227320 1968.000 +CPAR2_504160-T 870 670.650 39.852855 368.000 +CPAR2_504170-T 408 208.809 380.122703 1092.864 +CPAR2_504180-T 1470 1270.621 23.400686 409.390 +CPAR2_504190-T 1815 1615.621 117.244924 2608.111 +CPAR2_504200-T 519 319.751 16.126997 71.000 +CPAR2_504210-T 924 724.648 1.503391 15.000 +CPAR2_504220-T 1545 1345.621 40.858320 757.000 +CPAR2_400010-T 1566 1366.621 66.743206 1255.879 +CPAR2_400020-T 4674 4474.621 40.500557 2495.225 +CPAR2_400030-T 1077 877.621 127.072258 1535.502 +CPAR2_400040-T 14541 14341.621 4.370388 863.000 +CPAR2_400050-T 1152 952.621 30.191337 396.000 +CPAR2_400060-T 2901 2701.621 48.990461 1822.336 +CPAR2_400070-T 747 547.682 125.981234 950.007 +CPAR2_400080-T 1623 1423.621 100.769438 1975.222 +CPAR2_400090-T 1101 901.621 15.707892 195.000 +CPAR2_400095-T 300 100.905 63.339807 88.000 +CPAR2_400100-T 1578 1378.621 63.966842 1214.206 +CPAR2_400110-T 1479 1279.621 22.646478 399.002 +CPAR2_400120-T 2532 2332.621 0.747265 24.000 +CPAR2_400130-T 2256 2056.621 134.631865 3812.367 +CPAR2_400140-T 675 475.697 40.917738 268.000 +CPAR2_400150-T 1173 973.621 156.415293 2096.823 +CPAR2_400160-T 1389 1189.621 28.328052 464.000 +CPAR2_400170-T 1284 1084.621 44.956909 671.378 +CPAR2_400180-T 2355 2155.621 75.774500 2248.993 +CPAR2_400190-T 2544 2344.621 192.431058 6212.128 +CPAR2_400200-T 1896 1696.621 81.762834 1910.000 +CPAR2_400210-T 1197 997.621 95.505142 1311.853 +CPAR2_400220-T 1413 1213.621 34.410590 575.000 +CPAR2_400230-T 1374 1174.621 32.152366 520.000 +CPAR2_400240-T 1053 853.621 89.689595 1054.144 +CPAR2_400250-T 786 586.669 1515.647977 12242.888 +CPAR2_400260-T 939 739.643 6.091058 62.031 +CPAR2_400270-T 414 214.804 212.770973 629.284 +CPAR2_400280-T 969 769.624 70.210458 744.000 +CPAR2_400290-T 1026 826.621 66.437259 756.155 +CPAR2_400300-T 1602 1402.621 92.117196 1778.991 +CPAR2_400310-T 1629 1429.621 67.008711 1319.000 +CPAR2_400320-T 1221 1021.621 45.782909 644.000 +CPAR2_400330-T 2043 1843.621 14.615366 371.000 +CPAR2_400340-T 2277 2077.621 78.969163 2259.001 +CPAR2_400350-T 708 508.689 42.118901 295.000 +CPAR2_400370-T 435 235.772 25.250248 81.969 +CPAR2_400380-T 2379 2179.621 76.973003 2310.000 +CPAR2_400390-T 1626 1426.621 14.865572 292.000 +CPAR2_400400-T 1209 1009.621 473.404358 6580.870 +CPAR2_400410-T 2256 2056.621 141.667688 4011.600 +CPAR2_400420-T 717 517.687 16.414438 117.000 +CPAR2_400430-T 669 469.699 138.962989 898.692 +CPAR2_400440-T 1518 1318.621 124.093370 2253.000 +CPAR2_400450-T 1227 1027.621 158.056832 2236.346 +CPAR2_400460-T 999 799.621 61.400199 676.000 +CPAR2_400470-T 999 799.621 388.916821 4281.872 +CPAR2_400480-T 1758 1558.621 23.345576 501.000 +CPAR2_400490-T 279 79.915 92.699797 102.000 +CPAR2_400500-T 855 655.653 77.774566 702.108 +CPAR2_400510-T 1770 1570.621 0.554903 12.000 +CPAR2_400520-T 879 679.649 98.395225 920.770 +CPAR2_400570-T 1443 1243.621 193.194569 3308.077 +CPAR2_400580-T 1779 1579.621 88.508552 1925.000 +CPAR2_400590-T 3567 3367.621 33.881825 1571.023 +CPAR2_400600-T 276 76.917 90.647778 96.000 +CPAR2_400610-T 825 625.667 129.785348 1118.051 +CPAR2_400620-T 960 760.627 98.731676 1034.000 +CPAR2_400630-T 753 553.681 96.675243 737.000 +CPAR2_400640-T 1773 1573.621 20.215355 438.000 +CPAR2_400650-T 726 526.686 54.469466 395.000 +CPAR2_400660-T 1194 994.621 50.968884 698.000 +CPAR2_400670-T 519 319.751 51.788244 228.001 +CPAR2_400680-T 1380 1180.621 5.475035 89.000 +CPAR2_400690-T 1818 1618.621 128.718574 2868.659 +CPAR2_400700-T 1089 889.621 98.154451 1202.286 +CPAR2_400710-T 1266 1066.621 37.518789 551.000 +CPAR2_400720-T 1323 1123.621 33.676366 521.000 +CPAR2_400730-T 558 358.747 54.864082 271.000 +CPAR2_400740-T 648 448.708 79.052044 488.393 +CPAR2_400750-T 1287 1087.621 64.134092 960.416 +CPAR2_400760-T 753 553.681 104.545683 797.000 +CPAR2_400770-T 1755 1555.621 33.587734 719.411 +CPAR2_400790-T 1767 1567.621 22.145945 478.000 +CPAR2_400800-T 207 15.353 1542.426944 326.050 +CPAR2_400810-T 1245 1045.621 42.724367 615.096 +CPAR2_400820-T 5244 5044.621 20.620667 1432.266 +CPAR2_400830-T 5517 5317.621 23.506313 1721.054 +CPAR2_400840-T 324 124.880 138.418224 238.000 +CPAR2_400850-T 1875 1675.621 222.602904 5135.695 +CPAR2_400860-T 1473 1273.621 294.707613 5168.020 +CPAR2_400870-T 1272 1072.621 234.145618 3458.000 +CPAR2_400880-T 1113 913.621 30.764666 387.000 +CPAR2_400890-T 1101 901.621 14.902359 185.000 +CPAR2_400900-T 378 178.817 1226.135595 3018.839 +CPAR2_400910-T 891 691.649 66.049912 629.000 +CPAR2_400920-T 3501 3301.621 9.149895 415.945 +CPAR2_400930-T 936 736.645 4.933446 50.038 +CPAR2_400940-T 1707 1507.621 81.318334 1688.003 +CPAR2_400950-T 3990 3790.621 39.649714 2069.393 +CPAR2_400960-T 663 463.700 117.923601 752.888 +CPAR2_400970-T 906 706.649 848.028581 8251.006 +CPAR2_400980-T 519 319.751 214.875197 946.000 +CPAR2_400990-T 804 604.669 31.349500 261.000 +CPAR2_401000-T 1089 889.621 27.675914 339.000 +CPAR2_401010-T 2367 2167.621 70.485763 2103.669 +CPAR2_401020-T 1107 907.621 17.124447 214.000 +CPAR2_401030-T 921 721.648 88.700251 881.338 +CPAR2_401040-T 1299 1099.621 68.492509 1037.000 +CPAR2_401050-T 1659 1459.621 116.611949 2343.558 +CPAR2_401060-T 1257 1057.621 103.556798 1508.000 +CPAR2_401070-T 2451 2251.621 43.842749 1359.207 +CPAR2_401080-T 789 589.669 129.203662 1049.000 +CPAR2_401090-T 1785 1585.621 60.599335 1323.000 +CPAR2_401100-T 2352 2152.621 121.186409 3591.816 +CPAR2_401110-T 996 796.622 158.181217 1735.000 +CPAR2_401120-T 1086 886.621 43.251703 528.000 +CPAR2_401130-T 1317 1117.621 18.975606 292.000 +CPAR2_401140-T 1152 952.621 33.927134 445.000 +CPAR2_401150-T 2253 2053.621 18.107442 512.000 +CPAR2_401160-T 3195 2995.621 92.459703 3813.572 +CPAR2_401170-T 696 496.693 98.232545 671.794 +CPAR2_401180-T 2295 2095.621 626.107745 18065.683 +CPAR2_401190-T 609 409.744 160.414279 905.000 +CPAR2_401200-T 993 793.622 97.983185 1070.675 +CPAR2_401210-T 780 580.671 15.634618 125.000 +CPAR2_401220-T 534 334.751 25.601648 118.000 +CPAR2_401230-T 1080 880.621 385.433337 4673.379 +CPAR2_401240-T 324 124.880 10.468605 18.000 +CPAR2_401250-T 2106 1906.621 46.549418 1222.000 +CPAR2_401260-T 2094 1894.621 213.849266 5578.567 +CPAR2_401270-T 3465 3265.621 28.757268 1293.022 +CPAR2_401280-T 975 775.624 86.054352 919.002 +CPAR2_401290-T 3474 3274.621 9.581660 432.011 +CPAR2_401300-T 1911 1711.621 515.381239 12145.875 +CPAR2_401310-T 1677 1477.621 42.330513 861.210 +CPAR2_401320-T 4128 3928.621 49.885431 2698.400 +CPAR2_401330-T 237 38.026 657.036669 344.000 +CPAR2_401340-T 4155 3955.621 82.139950 4473.646 +CPAR2_401350-T 669 469.699 159.885406 1034.000 +CPAR2_401360-T 1287 1087.621 40.934570 613.000 +CPAR2_401370-T 234 35.101 190.361355 92.000 +CPAR2_401380-T 1458 1258.621 50.955389 883.035 +CPAR2_401390-T 258 58.938 129.390198 105.000 +CPAR2_401400-T 684 484.697 53.194368 355.000 +CPAR2_401410-T 1023 823.621 23.809136 270.000 +CPAR2_401420-T 1491 1291.621 19.624459 349.000 +CPAR2_401430-T 159 27.911 252.153081 96.902 +CPAR2_401440-T 5733 5533.621 46.695740 3557.781 +CPAR2_401450-T 1926 1726.621 153.048636 3638.472 +CPAR2_401460-T 714 514.688 28.580462 202.538 +CPAR2_401470-T 4089 3889.621 125.118653 6700.726 +CPAR2_401480-T 3120 2920.621 66.814017 2686.800 +CPAR2_401490-T 714 514.688 56.368886 399.462 +CPAR2_401500-T 1032 832.621 534.916256 6132.335 +CPAR2_401510-T 2691 2491.621 64.681900 2219.000 +CPAR2_401520-T 2547 2347.621 64.991247 2100.755 +CPAR2_401530-T 219 22.239 124.103477 38.000 +CPAR2_401540-T 1746 1546.621 144.189709 3070.512 +CPAR2_401550-T 1743 1543.621 52.155994 1108.505 +CPAR2_401560-T 1131 931.621 164.378564 2108.517 +CPAR2_401570-T 2745 2545.621 58.273515 2042.479 +CPAR2_401580-T 1398 1198.621 8.058925 133.000 +CPAR2_401590-T 696 496.693 0.146224 1.000 +CPAR2_401600-T 927 727.646 343.609913 3442.534 +CPAR2_401610-T 1212 1012.621 43.751227 610.000 +CPAR2_401620-T 1386 1186.621 57.111917 933.107 +CPAR2_401630-T 885 685.649 93.533289 883.000 +CPAR2_401640-T 1242 1042.621 146.424442 2102.000 +CPAR2_401650-T 2178 1978.621 113.482342 3091.601 +CPAR2_401660-T 3360 3160.621 65.170293 2836.055 +CPAR2_401670-T 855 655.653 158.182882 1427.993 +CPAR2_401680-T 2631 2431.621 158.814695 5317.153 +CPAR2_401690-T 642 442.713 253.462480 1545.000 +CPAR2_401700-T 834 634.664 17.279865 151.000 +CPAR2_401710-T 2784 2584.621 53.315126 1897.317 +CPAR2_401720-T 342 142.854 53.383255 105.000 +CPAR2_401730-T 777 577.671 42.118371 335.000 +CPAR2_401740-T 2136 1936.621 1.537612 41.000 +CPAR2_401750-T 2130 1930.621 18.741610 498.192 +CPAR2_401760-T 300 100.905 226.727718 315.000 +CPAR2_401770-T 840 640.661 52.714716 465.000 +CPAR2_401780-T 1122 922.621 60.456805 768.000 +CPAR2_401790-T 687 487.696 26.210219 176.000 +CPAR2_401800-T 321 121.885 964.725737 1619.000 +CPAR2_401810-T 468 268.755 264.295150 978.000 +CPAR2_401820-T 984 784.623 86.455651 934.000 +CPAR2_401830-T 4497 4297.621 115.788409 6851.501 +CPAR2_401840-T 621 421.743 1.033264 6.000 +CPAR2_401850-T 1902 1702.621 0.383912 9.000 +CPAR2_401860-T 1662 1462.621 20.905361 421.000 +CPAR2_401870-T 597 397.744 125.264356 686.000 +CPAR2_401880-T 3147 2947.621 15.892621 645.000 +CPAR2_401885-T 207 15.353 0.000000 0.000 +CPAR2_401890-T 1563 1363.621 195.523104 3671.000 +CPAR2_401900-T 651 451.704 1.447091 9.000 +CPAR2_401910-T 2064 1864.621 24.110106 618.988 +CPAR2_401920-T 1344 1144.621 16.749928 263.978 +CPAR2_401930-T 2904 2704.621 83.225467 3099.240 +CPAR2_401940-T 3894 3694.621 21.525423 1095.000 +CPAR2_401950-T 759 559.679 24.396415 188.000 +CPAR2_401960-T 651 451.704 280.092410 1742.000 +CPAR2_401970-T 1812 1612.621 56.612244 1257.000 +CPAR2_401980-T 1692 1492.621 113.375318 2330.025 +CPAR2_401990-T 1149 949.621 245.700559 3212.544 +CPAR2_402000-T 858 658.653 3571.253740 32386.926 +CPAR2_402010-T 822 622.667 1582.519799 13567.434 +CPAR2_402020-T 717 517.687 1.683532 12.000 +CPAR2_402030-T 537 337.751 178.479999 830.000 +CPAR2_402040-T 1548 1348.621 97.341844 1807.516 +CPAR2_402050-T 1566 1366.621 31.780482 598.000 +CPAR2_402060-T 2934 2734.621 58.350290 2197.013 +CPAR2_402070-T 1551 1351.621 2.203111 41.000 +CPAR2_402080-T 246 46.958 6854.990983 4432.098 +CPAR2_402090-T 3540 3340.621 1970.126028 90617.849 +CPAR2_402100-T 633 433.718 5.191129 31.000 +CPAR2_402110-T 636 436.717 29.436152 177.000 +CPAR2_402120-T 2697 2497.621 187.094885 6433.999 +CPAR2_402130-T 987 787.623 29.876813 324.000 +CPAR2_402140-T 2280 2080.621 16.231827 465.000 +CPAR2_402150-T 936 736.645 3.549376 36.000 +CPAR2_402160-T 1323 1123.621 15.900933 246.000 +CPAR2_402170-T 1035 835.621 15.557900 179.000 +CPAR2_402180-T 1305 1105.621 36.516717 555.892 +CPAR2_402190-T 399 199.815 43.980971 121.000 +CPAR2_402200-T 819 619.668 59.657700 509.000 +CPAR2_402210-T 2334 2134.621 49.198850 1446.000 +CPAR2_402220-T 1506 1306.621 197.819194 3558.858 +CPAR2_402230-T 1398 1198.621 87.315121 1441.000 +CPAR2_402240-T 729 529.685 17.825138 130.000 +CPAR2_402250-T 1350 1150.621 17.358322 275.000 +CPAR2_402260-T 1341 1141.621 0.254480 4.000 +CPAR2_402270-T 1266 1066.621 45.281297 665.000 +CPAR2_402280-T 2484 2284.621 80.175145 2522.008 +CPAR2_402290-T 750 550.682 20.178933 153.000 +CPAR2_402300-T 1020 820.621 111.781004 1263.000 +CPAR2_402310-T 2958 2758.621 79.431061 3016.997 +CPAR2_402320-T 1275 1075.621 35.786888 530.000 +CPAR2_402330-T 1047 847.621 68.462438 799.000 +CPAR2_402340-T 1200 1000.621 47.730133 657.590 +CPAR2_402350-T 3294 3094.621 34.621524 1475.184 +CPAR2_402360-T 603 403.744 23.385373 130.000 +CPAR2_402370-T 744 544.682 1.466753 11.000 +CPAR2_402380-T 1185 985.621 22.253807 302.000 +CPAR2_402390-T 747 547.682 66.835862 504.000 +CPAR2_402400-T 2154 1954.621 34.676180 933.225 +CPAR2_402410-T 1389 1189.621 85.594676 1402.000 +CPAR2_402420-T 2913 2713.621 142.037904 5306.962 +CPAR2_402430-T 1626 1426.621 45.920060 901.994 +CPAR2_402440-T 1032 832.621 24.424066 280.000 +CPAR2_402450-T 510 310.752 61.000624 261.000 +CPAR2_402460-T 1980 1780.621 130.590858 3201.672 +CPAR2_402470-T 1224 1024.621 15.098148 213.000 +CPAR2_402480-T 3165 2965.621 58.286559 2379.998 +CPAR2_402490-T 3924 3724.621 30.869039 1583.061 +CPAR2_402500-T 1290 1090.621 36.027220 541.000 +CPAR2_402510-T 1503 1303.621 192.047069 3447.082 +CPAR2_402520-T 453 253.759 92.732391 324.000 +CPAR2_402530-T 1998 1798.621 69.760922 1727.605 +CPAR2_402540-T 480 280.753 24.834417 96.000 +CPAR2_402550-T 627 427.738 107.716321 634.383 +CPAR2_402560-T 2880 2680.621 17.475586 645.000 +CPAR2_402570-T 957 757.629 29.334081 306.000 +CPAR2_402580-T 1932 1732.621 21.042653 501.992 +CPAR2_402590-T 531 331.751 10.070553 46.000 +CPAR2_402600-T 504 304.752 12.630977 53.000 +CPAR2_402610-T 282 82.914 420.457979 480.000 +CPAR2_402620-T 1383 1183.621 20.924210 341.000 +CPAR2_402630-T 390 190.816 226.469262 595.000 +CPAR2_402640-T 525 325.751 26.754878 120.000 +CPAR2_402650-T 1119 919.621 236.297985 2992.000 +CPAR2_402660-T 3282 3082.621 68.749986 2918.000 +CPAR2_402670-T 1245 1045.621 51.678033 744.000 +CPAR2_402690-T 471 271.755 1089.380066 4076.144 +CPAR2_402700-T 1296 1096.621 555.070009 8381.022 +CPAR2_402710-T 1836 1636.621 439.509518 9903.963 +CPAR2_402720-T 2547 2347.621 65.494115 2117.010 +CPAR2_402730-T 1395 1195.621 0.425218 7.000 +CPAR2_402740-T 4071 3871.621 57.242873 3051.454 +CPAR2_402750-T 1023 823.621 119.276092 1352.613 +CPAR2_402760-T 978 778.623 48.877762 524.000 +CPAR2_402770-T 285 85.912 2440.620374 2887.000 +CPAR2_402780-T 1194 994.621 48.486159 664.000 +CPAR2_402790-T 1512 1312.621 40.059599 724.000 +CPAR2_402800-T 1383 1183.621 143.545724 2339.352 +CPAR2_402810-T 2277 2077.621 13.597821 388.981 +CPAR2_402820-T 996 796.622 48.502829 532.000 +CPAR2_402830-T 582 382.745 82.544389 435.000 +CPAR2_402840-T 2928 2728.621 81.848242 3075.000 +CPAR2_402850-T 582 382.745 112.146515 591.000 +CPAR2_402860-T 2970 2770.621 159.268625 6075.750 +CPAR2_402870-T 1509 1309.621 189.685008 3420.356 +CPAR2_402880-T 1998 1798.621 150.496759 3727.000 +CPAR2_402890-T 657 457.702 2.697579 17.000 +CPAR2_402900-T 711 511.689 183.243092 1291.000 +CPAR2_402910-T 699 499.693 390.336825 2685.560 +CPAR2_402920-T 960 760.627 3.914892 41.000 +CPAR2_402930-T 2841 2641.621 13.754514 500.274 +CPAR2_402940-T 1620 1420.621 89.570141 1752.000 +CPAR2_402950-T 1167 967.621 184.344590 2456.000 +CPAR2_402960-T 1653 1453.621 24.782087 496.000 +CPAR2_402970-T 1188 988.621 17.558014 239.000 +CPAR2_402980-T 1542 1342.621 113.274100 2094.000 +CPAR2_402990-T 3867 3667.621 77.718236 3924.641 +CPAR2_403000-T 1473 1273.621 1.539682 27.000 +CPAR2_403010-T 4863 4663.621 33.444178 2147.515 +CPAR2_403020-T 1935 1735.621 36.866782 881.014 +CPAR2_403030-T 1368 1168.621 27.034785 435.000 +CPAR2_403040-T 1143 943.621 50.337016 654.000 +CPAR2_403050-T 225 26.867 67.580830 25.000 +CPAR2_403060-T 4338 4138.621 67.268201 3833.169 +CPAR2_403070-T 369 169.818 90.669051 212.000 +CPAR2_403080-T 2250 2050.621 39.561723 1117.000 +CPAR2_403090-T 1272 1072.621 3.520987 52.000 +CPAR2_403100-T 2439 2239.621 141.341158 4358.487 +CPAR2_403110-T 2280 2080.621 25.377502 727.000 +CPAR2_403120-T 4638 4438.621 7.167038 438.006 +CPAR2_403130-T 690 490.696 30.638377 207.000 +CPAR2_403140-T 3981 3781.621 125.626997 6541.141 +CPAR2_403150-T 696 496.693 459.436397 3142.000 +CPAR2_403160-T 540 340.750 527.528981 2475.000 +CPAR2_403170-T 2466 2266.621 78.928283 2463.225 +CPAR2_403180-T 774 574.671 12572.014860 99475.663 +CPAR2_403190-T 2184 1984.621 156.295919 4270.884 +CPAR2_403200-T 1854 1654.621 5.881846 134.000 +CPAR2_403210-T 525 325.751 25.194176 113.000 +CPAR2_403220-T 2169 1969.621 9.845460 267.000 +CPAR2_403240-T 750 550.682 29.674901 225.000 +CPAR2_403250-T 4005 3805.621 23.569420 1235.000 +CPAR2_403260-T 1314 1114.621 183.494242 2816.063 +CPAR2_403270-T 915 715.649 34.403854 339.000 +CPAR2_403280-T 639 439.715 27.583726 167.000 +CPAR2_403290-T 735 535.684 143.066226 1055.209 +CPAR2_403300-T 312 112.898 40.528465 63.000 +CPAR2_403310-T 1668 1468.621 102.689716 2076.487 +CPAR2_403320-T 2112 1912.621 27.796466 732.000 +CPAR2_403330-T 2412 2212.621 45.495801 1386.025 +CPAR2_403340-T 963 763.626 204.867797 2154.006 +CPAR2_403350-T 3735 3535.621 41.083909 2000.000 +CPAR2_403360-T 474 274.755 16.917739 64.000 +CPAR2_403370-T 2175 1975.621 41.284169 1123.000 +CPAR2_403380-T 1371 1171.621 9.608418 155.000 +CPAR2_403390-T 888 688.649 54.841935 520.000 +CPAR2_403400-T 891 691.649 154.676448 1472.999 +CPAR2_403410-T 1383 1183.621 14.972162 244.000 +CPAR2_403420-T 1509 1309.621 147.242558 2655.043 +CPAR2_403430-T 1080 880.621 103.092544 1249.997 +CPAR2_403440-T 705 505.690 42.225091 294.000 +CPAR2_403450-T 246 46.958 131.466912 85.000 +CPAR2_403460-T 924 724.648 73.465707 733.000 +CPAR2_403470-T 357 157.823 809.011835 1758.000 +CPAR2_403480-T 2394 2194.621 57.938303 1750.725 +CPAR2_403490-T 1935 1735.621 103.021688 2461.933 +CPAR2_403500-T 1770 1570.621 2.867000 62.000 +CPAR2_403510-T 2439 2239.621 15.436181 476.000 +CPAR2_403520-T 3705 3505.621 24.322634 1174.000 +CPAR2_403530-T 2304 2104.621 40.514081 1174.012 +CPAR2_403540-T 2985 2785.621 111.199917 4265.000 +CPAR2_403550-T 1677 1477.621 87.687803 1784.000 +CPAR2_403560-T 969 769.624 46.146390 489.000 +CPAR2_403570-T 2553 2353.621 86.055740 2788.746 +CPAR2_403580-T 1362 1162.621 110.133413 1762.990 +CPAR2_403590-T 1437 1237.621 157.322930 2680.849 +CPAR2_403600-T 4563 4363.621 102.178149 6138.999 +CPAR2_tD(GUC)5-T 72 72.000 0.000000 0.000 +CPAR2_403610-T 2553 2353.621 1.481195 48.000 +CPAR2_403620-T 1932 1732.621 17.521857 418.000 +CPAR2_403630-T 426 226.786 70.134990 219.000 +CPAR2_403640-T 1767 1567.621 139.871567 3019.000 +CPAR2_403650-T 1434 1234.621 97.710973 1661.000 +CPAR2_403660-T 1035 835.621 89.492547 1029.648 +CPAR2_403670-T 1722 1522.621 3.243579 68.000 +CPAR2_403680-T 738 538.684 52.716924 391.000 +CPAR2_403690-T 1047 847.621 62.293107 727.000 +CPAR2_403700-T 1311 1111.621 56.450052 864.000 +CPAR2_403710-T 1725 1525.621 21.946318 461.000 +CPAR2_403720-T 1188 988.621 71.260560 970.000 +CPAR2_403730-T 405 205.812 80.105628 227.000 +CPAR2_403740-T 1341 1141.621 54.457684 856.000 +CPAR2_403750-T 1281 1081.621 26.389112 393.000 +CPAR2_403760-T 2238 2038.621 50.339987 1413.000 +CPAR2_403770-T 969 769.624 9.814365 104.000 +CPAR2_403780-T 1500 1300.621 65.390327 1171.000 +CPAR2_403790-T 1389 1189.621 63.320938 1037.167 +CPAR2_403800-T 903 703.649 78.238494 758.000 +CPAR2_403810-T 4119 3919.621 65.408224 3529.953 +CPAR2_403820-T 1722 1522.621 390.714283 8191.128 +CPAR2_403830-T 969 769.624 0.283107 3.000 +CPAR2_403840-T 5262 5062.621 58.182301 4055.635 +CPAR2_403850-T 2229 2029.621 10.413230 291.000 +CPAR2_403860-T 420 220.797 99.997270 304.000 +CPAR2_403870-T 300 100.905 16.554722 23.000 +CPAR2_403880-T 363 163.820 39.014310 88.000 +CPAR2_403890-T 1575 1375.621 18.795703 356.000 +CPAR2_403900-T 2604 2404.621 474.902763 15723.307 +CPAR2_403910-T 2412 2212.621 476.556559 14518.242 +CPAR2_403920-T 1290 1090.621 477.262264 7166.772 +CPAR2_403930-T 669 469.699 29.096188 188.169 +CPAR2_403940-T 606 406.744 67.917566 380.361 +CPAR2_403950-T 1317 1117.621 83.270566 1281.382 +CPAR2_403960-T 2529 2329.621 402.823379 12920.892 +CPAR2_403970-T 843 643.659 145.262975 1287.370 +CPAR2_403980-T 375 175.818 364.611706 882.643 +CPAR2_403990-T 1890 1690.621 77.404271 1801.788 +CPAR2_404000-T 855 655.653 91.387643 825.000 +CPAR2_404010-T 372 172.818 39.084236 93.000 +CPAR2_404020-T 1782 1582.621 86.275667 1880.000 +CPAR2_404030-T 1713 1513.621 62.679138 1306.269 +CPAR2_404040-T 1083 883.621 163.566495 1990.000 +CPAR2_404050-T 2727 2527.621 85.265823 2967.423 +CPAR2_404060-T 810 610.668 277.361437 2332.081 +CPAR2_404070-T 807 607.668 7.639545 63.919 +CPAR2_404080-T 483 283.753 282.234323 1102.663 +CPAR2_404090-T 1494 1294.621 50.490217 900.000 +CPAR2_404100-T 1632 1432.621 136.220899 2687.000 +CPAR2_404110-T 1233 1033.621 5.972621 85.000 +CPAR2_404120-T 1263 1063.621 30.386484 445.000 +CPAR2_404130-T 1866 1666.621 79.269000 1819.001 +CPAR2_404140-T 2589 2389.621 33.311100 1096.000 +CPAR2_404160-T 1848 1648.621 60.706584 1378.000 +CPAR2_404170-T 537 337.751 25.589708 119.002 +CPAR2_404180-T 3006 2806.621 37.186085 1437.000 +CPAR2_404190-T 1689 1489.621 164.765808 3379.368 +CPAR2_404200-T 333 133.864 250.658498 461.998 +CPAR2_404210-T 798 598.669 193.985604 1599.000 +CPAR2_404220-T 3039 2839.621 75.440167 2949.549 +CPAR2_404230-T 3543 3343.621 6.473016 298.000 +CPAR2_404240-T 615 415.744 2335.792068 13370.661 +CPAR2_404250-T 1719 1519.621 65.429890 1369.002 +CPAR2_404260-T 1995 1795.621 34.625997 856.071 +CPAR2_404270-T 2595 2395.621 8.519138 281.000 +CPAR2_404280-T 1920 1720.621 141.404705 3349.976 +CPAR2_404290-T 1053 853.621 84.657470 995.000 +CPAR2_404300-T 831 631.666 194.775207 1694.000 +CPAR2_404310-T 1029 829.621 180.866389 2066.000 +CPAR2_404320-T 1353 1153.621 71.393267 1134.000 +CPAR2_404330-T 882 682.649 38.194809 359.000 +CPAR2_404340-T 3522 3322.621 87.881072 4020.395 +CPAR2_404350-T 333 133.864 113.936290 210.000 +CPAR2_404360-T 1206 1006.621 119.842532 1661.000 +CPAR2_404370-T 1074 874.621 48.246246 581.000 +CPAR2_404380-T 1542 1342.621 49.767035 920.000 +CPAR2_404390-T 855 655.653 166.934761 1507.000 +CPAR2_404400-T 675 475.697 134.662107 882.000 +CPAR2_404410-T 1938 1738.621 21.596980 517.000 +CPAR2_404420-T 408 208.809 142.606441 409.998 +CPAR2_404430-T 384 184.816 10.611603 27.003 +CPAR2_404440-T 2352 2152.621 43.625234 1292.998 +CPAR2_404450-T 1029 829.621 3.239137 37.000 +CPAR2_404460-T 3093 2893.621 27.233004 1085.000 +CPAR2_404470-T 213 18.486 2687.358658 684.000 +CPAR2_404480-T 654 454.702 26.195386 164.000 +CPAR2_404490-T 1971 1771.621 43.373280 1058.000 +CPAR2_404500-T 669 469.699 12.524872 81.000 +CPAR2_404510-T 1476 1276.621 23.496081 413.000 +CPAR2_404520-T 465 265.756 35.254479 129.000 +CPAR2_404530-T 759 559.679 30.495519 235.000 +CPAR2_404540-T 912 712.649 27.210906 267.000 +CPAR2_404550-T 1083 883.621 296.208107 3603.758 +CPAR2_404560-T 3288 3088.621 36.988914 1573.000 +CPAR2_404570-T 2817 2617.621 6.908759 249.000 +CPAR2_404580-T 1050 850.621 39.020011 457.000 +CPAR2_404590-T 4164 3964.621 17.201701 939.000 +CPAR2_404600-T 3189 2989.621 23.929166 985.000 +CPAR2_404610-T 1023 823.621 35.272794 400.000 +CPAR2_404620-T 1083 883.621 21.699274 264.000 +CPAR2_404630-T 1257 1057.621 55.486666 808.000 +CPAR2_404640-T 1101 901.621 21.439330 266.151 +CPAR2_404650-T 3399 3199.621 91.933862 4050.108 +CPAR2_404660-T 2283 2083.621 303.754351 8714.326 +CPAR2_404670-T 2508 2308.621 9.060402 288.000 +CPAR2_404680-T 522 322.751 22.502969 100.000 +CPAR2_404690-T 705 505.690 43.086827 300.000 +CPAR2_404700-T 624 424.742 214.256113 1253.000 +CPAR2_404710-T 1560 1360.621 130.938620 2453.000 +CPAR2_404720-T 1470 1270.621 5.197668 90.932 +CPAR2_404730-T 489 289.753 433.435854 1729.198 +CPAR2_404740-T 2541 2341.621 95.886633 3091.486 +CPAR2_404750-T 2106 1906.621 74.700007 1961.000 +CPAR2_404760-T 843 643.659 14.330297 127.000 +CPAR2_404770-T 3003 2803.621 21.722281 838.527 +CPAR2_404780-T 3462 3262.621 44.851391 2014.815 +CPAR2_404790-T 7179 6979.621 161.083856 15480.193 +CPAR2_404800-T 4152 3952.621 23.262842 1266.020 +CPAR2_404810-T 651 451.704 60.777893 378.001 +CPAR2_404820-T 783 583.670 72.591696 583.373 +CPAR2_404830-T 555 355.748 50.474717 247.234 +CPAR2_404840-T 591 391.744 620.137303 3344.900 +CPAR2_404850-T 1113 913.621 235.941932 2968.000 +CPAR2_404860-T 993 793.622 61.555909 672.630 +CPAR2_404870-T 786 586.669 167.977600 1356.866 +CPAR2_404880-T 1179 979.621 130.336970 1757.998 +CPAR2_404890-T 498 298.752 500.069805 2057.000 +CPAR2_404900-T 1413 1213.621 42.010843 702.000 +CPAR2_404910-T 1227 1027.621 0.212029 3.000 +CPAR2_404920-T 1272 1072.621 102.040904 1507.000 +CPAR2_404930-T 1089 889.621 49.065559 601.000 +CPAR2_404940-T 1944 1744.621 311.902622 7492.258 +CPAR2_404950-T 1818 1618.621 63.401546 1412.985 +CPAR2_404960-T 1716 1516.621 115.822857 2418.599 +CPAR2_404970-T 1011 811.621 0.178972 2.000 +CPAR2_404980-T 2499 2299.621 56.122706 1777.000 +CPAR2_404990-T 2238 2038.621 61.349930 1722.040 +CPAR2_405000-T 1215 1015.621 36.756892 514.000 +CPAR2_405010-T 1131 931.621 133.388397 1711.000 +CPAR2_405020-T 3945 3745.621 4.091345 211.000 +CPAR2_405030-T 1503 1303.621 351.534495 6309.747 +CPAR2_405040-T 1962 1762.621 15.822667 384.000 +CPAR2_405050-T 2346 2146.621 12.450875 368.000 +CPAR2_405060-T 183 8.453 249.178142 29.000 +CPAR2_405070-T 447 247.762 574.259397 1959.000 +CPAR2_405080-T 1149 949.621 44.818222 586.000 +CPAR2_405090-T 2520 2320.621 119.031721 3803.290 +CPAR2_405100-T 1488 1288.621 70.395453 1249.000 +CPAR2_405110-T 489 289.753 102.804481 410.140 +CPAR2_405120-T 1617 1417.621 69.545917 1357.452 +CPAR2_405130-T 216 20.259 630.946337 176.000 +CPAR2_405140-T 2148 1948.621 208.884107 5604.351 +CPAR2_405150-T 1014 814.621 341.811504 3833.849 +CPAR2_405160-T 1101 901.621 225.323878 2797.203 +CPAR2_405170-T 1059 859.621 23.149992 274.000 +CPAR2_405180-T 714 514.688 54.610295 387.000 +CPAR2_405190-T 1602 1402.621 974.622300 18822.153 +CPAR2_405200-T 993 793.622 68.087384 744.000 +CPAR2_405210-T 1056 856.621 120.648931 1423.000 +CPAR2_405220-T 1125 925.621 12.318952 157.000 +CPAR2_405230-T 546 346.750 431.896980 2062.000 +CPAR2_405240-T 954 754.632 68.333069 710.000 +CPAR2_405250-T 687 487.696 101.380750 680.765 +CPAR2_405260-T 3123 2923.621 94.361095 3798.451 +CPAR2_405270-T 3063 2863.621 109.743430 4326.997 +CPAR2_405280-T 4518 4318.621 143.786820 8549.814 +CPAR2_405290-T 4515 4315.621 35.960756 2136.804 +CPAR2_405300-T 12387 12187.621 2.264499 380.000 +CPAR2_405310-T 441 241.766 236.721590 788.000 +CPAR2_405320-T 1698 1498.621 13.327487 275.000 +CPAR2_405330-T 561 361.747 271.844808 1354.000 +CPAR2_405340-T 999 799.621 53.043959 584.000 +CPAR2_405350-T 573 373.745 115.624155 595.000 +CPAR2_405360-T 1065 865.621 12.669412 151.000 +CPAR2_405370-T 1317 1117.621 34.636979 533.000 +CPAR2_405380-T 1542 1342.621 107.298026 1983.526 +CPAR2_405390-T 2745 2545.621 118.882448 4166.813 +CPAR2_405400-T 1647 1447.621 336.915484 6715.347 +CPAR2_405410-T 555 355.748 161.896859 793.000 +CPAR2_405420-T 1257 1057.621 123.334718 1796.007 +CPAR2_405430-T 2223 2023.621 43.472058 1211.245 +CPAR2_405440-T 1314 1114.621 7.754023 119.000 +CPAR2_405450-T 1314 1114.621 48.739574 748.000 +CPAR2_405460-T 1410 1210.621 159.171020 2653.169 +CPAR2_405470-T 1008 808.621 331.075665 3686.082 +CPAR2_405480-T 2883 2683.621 78.159804 2888.000 +CPAR2_405490-T 3981 3781.621 43.116742 2245.001 +CPAR2_405500-T 2427 2227.621 108.602736 3331.000 +CPAR2_405510-T 516 316.752 1635.538185 7133.000 +CPAR2_405520-T 711 511.689 50.956057 359.000 +CPAR2_405530-T 2286 2086.621 75.843902 2178.998 +CPAR2_405540-T 1077 877.621 171.884529 2077.000 +CPAR2_405550-T 456 256.758 40.450087 143.000 +CPAR2_405560-T 546 346.750 321.932909 1537.000 +CPAR2_405570-T 363 163.820 354.823014 800.333 +CPAR2_405580-T 3285 3085.621 65.704196 2791.440 +CPAR2_405590-T 1458 1258.621 116.708415 2022.506 +CPAR2_405600-T 606 406.744 81.639198 457.207 +CPAR2_405610-T 2586 2386.621 22.126815 727.101 +CPAR2_405620-T 1761 1561.621 38.792426 834.094 +CPAR2_405630-T 921 721.648 55.767254 554.111 +CPAR2_405640-T 855 655.653 352.417206 3181.439 +CPAR2_405650-T 1512 1312.621 0.165993 3.000 +CPAR2_405660-T 1371 1171.621 33.226531 536.000 +CPAR2_405670-T 1539 1339.621 14.041878 259.000 +CPAR2_405680-T 786 586.669 221.794800 1791.583 +CPAR2_405690-T 1839 1639.621 100.154622 2261.034 +CPAR2_405695-T 294 94.908 691.762292 903.966 +CPAR2_405700-T 2307 2107.621 302.353113 8774.038 +CPAR2_405710-T 1674 1474.621 89.934795 1826.000 +CPAR2_405720-T 1698 1498.621 57.913990 1195.000 +CPAR2_405730-T 1191 991.621 71.849854 980.989 +CPAR2_405740-T 1353 1153.621 0.472178 7.500 +CPAR2_405750-T 873 673.649 591.847815 5489.545 +CPAR2_405760-T 2055 1855.621 101.855466 2602.353 +CPAR2_405770-T 2127 1927.621 31.913114 847.000 +CPAR2_405780-T 1737 1537.621 169.304903 3584.358 +CPAR2_tV(AAC)3-T 74 74.000 0.000000 0.000 +CPAR2_405790-T 1677 1477.621 33.374450 679.000 +CPAR2_405800-T 5097 4897.621 29.317638 1977.000 +CPAR2_405810-T 2034 1834.621 399.996922 10104.052 +CPAR2_405820-T 855 655.653 40.099790 362.000 +CPAR2_405830-T 3903 3703.621 275.809258 14064.617 +CPAR2_405840-T 807 607.668 363.024077 3037.348 +CPAR2_405850-T 2094 1894.621 121.330463 3165.081 +CPAR2_405860-T 642 442.713 43.802254 267.000 +CPAR2_405870-T 2049 1849.621 27.683041 705.000 +CPAR2_405880-T 1278 1078.621 0.336673 5.000 +CPAR2_405890-T 2094 1894.621 43.125843 1125.000 +CPAR2_405900-T 1326 1126.621 32.232910 500.000 +CPAR2_405910-T 849 649.655 60.369609 540.000 +CPAR2_405920-T 243 43.969 77.634361 47.000 +CPAR2_405930-T 1146 946.621 39.206099 511.002 +CPAR2_405940-T 1932 1732.621 126.341787 3014.000 +CPAR2_405950-T 885 685.649 36.756570 347.000 +CPAR2_405960-T 1242 1042.621 11.981448 172.000 +CPAR2_405970-T 2256 2056.621 151.584879 4292.425 +CPAR2_405980-T 1437 1237.621 25.292803 431.000 +CPAR2_405990-T 1965 1765.621 88.630411 2154.631 +CPAR2_406000-T 483 283.753 116.431002 454.885 +CPAR2_406010-T 855 655.653 47.964666 433.000 +CPAR2_406020-T 645 445.710 123.190333 756.000 +CPAR2_406030-T 522 322.751 25.878415 115.000 +CPAR2_406040-T 1311 1111.621 133.611562 2045.001 +CPAR2_406050-T 1308 1108.621 58.764722 897.000 +CPAR2_406060-T 2202 2002.621 44.354238 1223.000 +CPAR2_406070-T 1134 934.621 36.074794 464.229 +CPAR2_406080-T 486 286.753 107.643704 425.000 +CPAR2_406090-T 519 319.751 0.227141 1.000 +CPAR2_406100-T 1026 826.621 15.463704 176.000 +CPAR2_406110-T 1107 907.621 138.619993 1732.300 +CPAR2_406120-T 465 265.756 284.495448 1041.000 +CPAR2_tE(CUC)1-T 72 72.000 0.000000 0.000 +CPAR2_406130-T 1773 1573.621 29.043918 629.286 +CPAR2_406140-T 1569 1369.621 87.178105 1643.995 +CPAR2_406150-T 1170 970.621 297.809740 3979.983 +CPAR2_406160-T 1539 1339.621 198.086031 3653.662 +CPAR2_406170-T 342 142.854 299.308234 588.712 +CPAR2_406180-T 1830 1630.621 34.741533 780.000 +CPAR2_406190-T 2031 1831.621 35.290825 890.000 +CPAR2_406200-T 1554 1354.621 1.769308 33.000 +CPAR2_406210-T 345 145.846 63.739859 127.997 +CPAR2_406220-T 1854 1654.621 53.156089 1211.000 +CPAR2_406230-T 1380 1180.621 11.380690 185.000 +CPAR2_406240-T 2052 1852.621 175.159857 4468.006 +CPAR2_406250-T 1341 1141.621 150.903875 2372.002 +CPAR2_406260-T 4899 4699.621 38.418975 2486.000 +CPAR2_406270-T 630 430.726 315.823610 1873.000 +CPAR2_406280-T 333 133.864 303.287553 559.000 +CPAR2_406290-T 1272 1072.621 0.406268 6.000 +CPAR2_406300-T 1338 1138.621 64.105342 1005.000 +CPAR2_406310-T 954 754.632 51.105436 531.000 +CPAR2_406320-T 1047 847.621 31.874877 372.000 +CPAR2_406330-T 1815 1615.621 49.494305 1101.000 +CPAR2_406340-T 3495 3295.621 15.735062 714.000 +CPAR2_406350-T 1113 913.621 66.458037 836.000 +CPAR2_406360-T 1095 895.621 88.066931 1086.000 +CPAR2_406370-T 7428 7228.621 19.702999 1961.012 +CPAR2_406380-T 1263 1063.621 77.775741 1139.000 +CPAR2_406390-T 1647 1447.621 116.500833 2322.076 +CPAR2_406400-T 372 172.818 223.998903 533.000 +CPAR2_406410-T 954 754.632 39.652429 412.000 +CPAR2_406420-T 1203 1003.621 14.762767 204.000 +CPAR2_406430-T 840 640.661 41.831678 369.000 +CPAR2_406440-T 1029 829.621 27.226257 311.000 +CPAR2_406450-T 1524 1324.621 21.438406 391.000 +CPAR2_406460-T 2892 2692.621 81.243232 3012.000 +CPAR2_406470-T 807 607.668 108.648668 909.041 +CPAR2_406480-T 1266 1066.621 39.160876 575.116 +CPAR2_406490-T 339 139.859 34.273590 66.000 +CPAR2_406500-T 549 349.750 71.019320 342.000 +CPAR2_406510-T 2427 2227.621 114.178585 3502.019 +CPAR2_406520-T 1779 1579.621 363.798654 7912.370 +CPAR2_406530-T 762 562.678 29.429478 228.000 +CPAR2_406540-T 1917 1717.621 523.555598 12381.770 +CPAR2_406550-T 1020 820.621 74.178861 838.138 +CPAR2_406560-T 612 412.744 96.858308 550.441 +CPAR2_406570-T 1653 1453.621 121.519015 2432.137 +CPAR2_406580-T 1422 1222.621 50.136956 844.000 +CPAR2_406590-T 2328 2128.621 38.453246 1127.000 +CPAR2_406600-T 771 571.671 13.594320 107.003 +CPAR2_406610-T 4788 4588.621 13.327153 842.000 +CPAR2_406620-T 747 547.682 105.690837 797.000 +CPAR2_406630-T 1026 826.621 22.404798 255.000 +CPAR2_406640-T 726 526.686 52.125210 378.000 +CPAR2_406650-T 1143 943.621 25.653608 333.303 +CPAR2_406660-T 1104 904.621 63.586632 792.000 +CPAR2_406670-T 678 478.697 108.405184 714.501 +CPAR2_406680-T 1554 1354.621 46.891023 874.581 +CPAR2_406690-T 1656 1456.621 18.668890 374.419 +CPAR2_406700-T 1533 1333.621 10.837473 199.000 +CPAR2_406710-T 1929 1729.621 123.915511 2951.000 +CPAR2_406720-T 723 523.687 17.890626 129.000 +CPAR2_406730-T 894 694.649 22.583731 216.000 +CPAR2_406740-T 1038 838.621 56.206474 649.000 +CPAR2_406750-T 1020 820.621 61.684805 696.969 +CPAR2_406760-T 1335 1135.621 54.105859 846.000 +CPAR2_406770-T 1170 970.621 54.961520 734.516 +CPAR2_406780-T 1260 1060.621 2.282343 33.330 +CPAR2_406790-T 933 733.645 61.774089 624.000 +CPAR2_406800-T 1389 1189.621 661.089364 10828.329 +CPAR2_406810-T 597 397.744 176.210064 965.000 +CPAR2_406820-T 606 406.744 3.214093 18.000 +CPAR2_406860-T 1338 1138.621 102.547506 1607.670 +CPAR2_406870-T 633 433.718 184.695053 1102.948 +CPAR2_406880-T 738 538.684 69.839812 518.000 +CPAR2_406890-T 1032 832.621 0.174458 2.000 +CPAR2_406900-T 1866 1666.621 16.910608 388.051 +CPAR2_406905-T 153 28.507 2.547706 1.000 +CPAR2_406910-T 666 466.700 38.127266 245.000 +CPAR2_406920-T 2364 2164.621 81.264283 2422.000 +CPAR2_406930-T 2022 1822.621 24.387230 612.000 +CPAR2_406940-T 1323 1123.621 192.509994 2978.282 +CPAR2_406950-T 501 301.752 53.192412 221.000 +CPAR2_406960-T 4368 4168.621 74.065402 4251.090 +CPAR2_406970-T 1074 874.621 0.747360 9.000 +CPAR2_406980-T 1086 886.621 28.837990 352.043 +CPAR2_406990-T 498 298.752 46.919530 193.000 +CPAR2_407000-T 633 433.718 6.865687 41.000 +CPAR2_407010-T 378 178.817 0.000000 0.000 +CPAR2_407020-T 345 145.846 6.473739 13.000 +CPAR2_407030-T 1734 1534.621 19.545929 413.000 +CPAR2_407040-T 1224 1024.621 58.266093 822.000 +CPAR2_407050-T 2466 2266.621 24.961256 779.001 +CPAR2_407060-T 1908 1708.621 11.987008 282.000 +CPAR2_407070-T 765 565.676 117.350742 914.000 +CPAR2_407080-T 1518 1318.621 54.969012 998.000 +CPAR2_407090-T 1191 991.621 54.345741 742.000 +CPAR2_407100-T 768 568.674 43.423307 340.000 +CPAR2_407110-T 723 523.687 59.912829 432.000 +CPAR2_407120-T 681 481.697 111.574614 740.000 +CPAR2_407130-T 1377 1177.621 256.501988 4159.000 +CPAR2_407140-T 1356 1156.621 1486.657217 23675.249 +CPAR2_407150-T 972 772.624 117.030482 1244.972 +CPAR2_407160-T 1518 1318.621 20.657250 375.047 +CPAR2_407170-T 1155 955.621 2631.462055 34623.860 +CPAR2_407180-T 2433 2233.621 69.555388 2139.109 +CPAR2_407190-T 1341 1141.621 171.643495 2698.000 +CPAR2_407200-T 4344 4144.621 213.604842 12189.571 +CPAR2_407200.1-T 504 304.752 9.294492 39.000 +CPAR2_407210-T 1503 1303.621 37.829082 679.000 +CPAR2_407220-T 1248 1048.621 15.306682 221.000 +CPAR2_407230-T 846 646.657 19.430301 173.000 +CPAR2_407240-T 1584 1384.621 68.579399 1307.426 +CPAR2_407250-T 1575 1375.621 2.433000 46.082 +CPAR2_407260-T 873 673.649 6.900072 64.000 +CPAR2_407270-T 1326 1126.621 25.784983 399.979 +CPAR2_407280-T 846 646.657 2.358591 21.000 +CPAR2_407290-T 1575 1375.621 26.892279 509.353 +CPAR2_407300-T 1575 1375.621 13.176241 249.565 +CPAR2_407310-T 1578 1378.621 28.448296 540.000 +CPAR2_407320-T 1935 1735.621 209.629871 5009.572 +CPAR2_407330-T 243 43.969 381.564628 231.000 +CPAR2_407340-T 1008 808.621 34.849294 388.000 +CPAR2_407350-T 1179 979.621 104.610734 1411.000 +CPAR2_407360-T 837 637.664 264.849605 2325.324 +CPAR2_407370-T 630 430.726 19.053960 113.000 +CPAR2_407380-T 855 655.653 93.349419 842.710 +CPAR2_407390-T 825 625.667 612.530939 5276.717 +CPAR2_407400-T 3216 3016.621 20.445801 849.215 +CPAR2_407410-T 1119 919.621 629.100413 7965.656 +CPAR2_407420-T 1899 1699.621 20.383263 477.000 +CPAR2_407430-T 2598 2398.621 47.387102 1565.000 +CPAR2_407440-T 894 694.649 81.970578 784.000 +CPAR2_407450-T 4140 3940.621 162.795173 8832.806 +CPAR2_407460-T 1164 964.621 27.406400 364.000 +CPAR2_407470-T 1632 1432.621 39.312618 775.454 +CPAR2_407480-T 2772 2572.621 2.907829 103.000 +CPAR2_407490-T 768 568.674 73.053328 572.000 +CPAR2_407500-T 336 136.862 1945.437515 3666.000 +CPAR2_407510-T 4353 4153.621 9.564625 547.000 +CPAR2_407520-T 1830 1630.621 244.482377 5488.999 +CPAR2_407530-T 6525 6325.621 21.094054 1837.197 +CPAR2_407540-T 1269 1069.621 90.058599 1326.318 +CPAR2_407550-T 360 160.822 421.803435 934.000 +CPAR2_407560-T 1827 1627.621 8.515230 190.828 +CPAR2_407570-T 1818 1618.621 0.815386 18.172 +CPAR2_407590-T 210 16.856 116.336493 27.000 +CPAR2_407600-T 978 778.623 90.852940 974.000 +CPAR2_407610-T 1029 829.621 78.473605 896.388 +CPAR2_407620-T 993 793.622 140.268837 1532.736 +CPAR2_407630-T 3825 3625.621 645.682973 32232.520 +CPAR2_407640-T 1581 1381.621 39.162890 745.000 +CPAR2_407650-T 1017 817.621 109.615105 1234.000 +CPAR2_407660-T 1083 883.621 30.987221 377.000 +CPAR2_407670-T 516 316.752 0.687875 3.000 +CPAR2_407680-T 2112 1912.621 43.003828 1132.475 +CPAR2_407690-T 1377 1177.621 742.912378 12045.804 +CPAR2_407700-T 2481 2281.621 8.085328 254.000 +CPAR2_407710-T 249 49.950 234.097443 161.000 +CPAR2_407720-T 1218 1018.621 15.614886 219.000 +CPAR2_407730-T 1095 895.621 233.271255 2876.591 +CPAR2_407740-T 1233 1033.621 68.790537 979.000 +CPAR2_407750-T 2232 2032.621 22.260713 623.000 +CPAR2_407760-T 855 655.653 37.884332 342.000 +CPAR2_407770-T 459 259.757 151.823762 543.000 +CPAR2_407780-T 1119 919.621 94.377036 1195.000 +CPAR2_407790-T 882 682.649 0.212784 2.000 +CPAR2_407800-T 2781 2581.621 32.612155 1159.216 +CPAR2_407810-T 2430 2230.621 104.105745 3197.371 +CPAR2_407820-T 2079 1879.621 47.505848 1229.447 +CPAR2_407830-T 336 136.862 119.931500 226.000 +CPAR2_407840-T 1689 1489.621 20.916494 429.000 +CPAR2_407850-T 672 472.698 6.606813 43.000 +CPAR2_407860-T 885 685.649 102.854840 971.000 +CPAR2_407870-T 171 16.642 4.364053 1.000 +CPAR2_407880-T 531 331.751 37.436185 171.000 +CPAR2_407890-T 795 595.669 174.549406 1431.580 +CPAR2_407900-T 1800 1600.621 79.860414 1760.000 +CPAR2_407910-T 1170 970.621 114.481095 1529.946 +CPAR2_407920-T 1206 1006.621 514.905109 7136.510 +CPAR2_407930-T 1629 1429.621 198.894171 3915.034 +CPAR2_407940-T 7470 7270.621 11.297923 1131.000 +CPAR2_407950-T 798 598.669 360.906695 2974.910 +CPAR2_407960-T 3243 3043.621 81.772350 3426.807 +CPAR2_407970-T 453 253.759 343.167088 1199.000 +CPAR2_407980-T 357 157.823 17.487173 38.000 +CPAR2_407990-T 1548 1348.621 44.321790 823.000 +CapafMp01-T 396 196.816 0.000000 0.000 +CapafMp02-T 1419 1219.621 0.000000 0.000 +CapafMt01-T 71 71.000 0.000000 0.000 +CapafMt02-T 83 1.606 0.000000 0.000 +CapafMt03-T 72 72.000 0.000000 0.000 +CapafMt04-T 72 72.000 0.000000 0.000 +CapafMp03-T 1155 955.621 0.456008 6.000 +CapafMp03.2-T 744 544.682 0.000000 0.000 +CapafMp03.1-T 1122 922.621 0.078720 1.000 +CapafMp05-T 795 595.669 0.487711 4.000 +CapafMt05-T 72 72.000 0.000000 0.000 +CapafMr01-T 2680 2480.621 184.138440 6289.229 +CapafMp06-T 1596 1396.621 2.184128 42.000 +CapafMp06.1-T 2802 2602.621 0.000000 0.000 +CapafMp06.2-T 2052 1852.621 0.274422 7.000 +CapafMp06.3-T 921 721.648 0.000000 0.000 +CapafMp06.4-T 1116 916.621 0.000000 0.000 +CapafMt06-T 81 1.192 0.000000 0.000 +CapafMt07-T 74 74.000 0.000000 0.000 +CapafMp09-T 1386 1186.621 0.183619 3.000 +CapafMt08-T 72 72.000 0.000000 0.000 +CapafMt09-T 71 71.000 0.000000 0.000 +CapafMr02-T 1325 1125.621 48.552729 752.486 +CapafMt10-T 72 72.000 0.000000 0.000 +CapafMp10-T 231 32.238 2.252907 1.000 +CapafMt11-T 71 71.000 0.000000 0.000 +CapafMp11-T 468 268.755 0.000000 0.000 +CapafMp12-T 936 736.645 0.098594 1.000 +CapafMt12-T 71 71.000 0.000000 0.000 +CapafMt13-T 71 71.000 0.000000 0.000 +CapafMt14-T 71 71.000 0.000000 0.000 +CapafMt15-T 72 72.000 0.000000 0.000 +CapafMt16-T 72 72.000 0.000000 0.000 +CapafMp13-T 810 610.668 0.118933 1.000 +CapafMt17-T 82 1.388 0.000000 0.000 +CapafMt18-T 83 1.606 0.000000 0.000 +CapafMt19-T 71 71.000 0.000000 0.000 +CapafMt20-T 72 72.000 0.000000 0.000 +CapafMt21-T 72 72.000 0.000000 0.000 +CapafMp14-T 255 55.942 1.298275 1.000 +CapafMp15-T 1668 1468.621 0.000000 0.000 +CapafMt22-T 71 71.000 0.000000 0.000 +CapafMt23-T 69 69.000 0.000000 0.000 +CapafMt24-T 74 74.000 0.000000 0.000 +CapafMp16-T 147 27.316 0.000000 0.000 +CapafMp17-T 741 541.683 0.000000 0.000 diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/aux_info/ambig_info.tsv b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/aux_info/ambig_info.tsv new file mode 100644 index 0000000000000000000000000000000000000000..324813102b0127d3234264fd17272e4dec1a5651 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/aux_info/ambig_info.tsv @@ -0,0 +1,5924 @@ +UniqueCount AmbigCount +2112 1 +1913 4 +847 0 +2129 0 +568 3 +1089 1 +2822 1 +1748 1 +1224 0 +3759 3 +2583 3 +476 0 +781 0 +1005 0 +520 0 +512 0 +6445 3 +1064 3 +2373 0 +2247 1 +189 0 +1572 0 +546 0 +1020 1 +1846 0 +6364 8 +810 3 +476 0 +19 0 +1211 0 +1525 0 +2449 6 +2060 0 +2901 6 +212 0 +2172 1 +709 3 +89 0 +10 0 +1282 0 +1125 1 +62 1 +84 35 +820 35 +342 0 +35846 8 +1771 5 +3485 4 +6684 7 +1472 0 +884 0 +733 0 +3938 1 +368 0 +1487 1 +1574 1 +1986 0 +110 0 +691 1 +7875 9 +3385 4 +846 1 +2 0 +2292 1 +8417 3 +1955 0 +595 0 +308 0 +179 255 +560 1 +2577 20 +12727 6 +5670 4 +633 0 +493 0 +5635 2 +750 0 +710 0 +2580 2 +2050 2 +360 0 +1283 0 +869 0 +23438 8 +0 0 +1248 0 +548 0 +1810 1 +0 0 +16 14 +23427 67 +694 0 +3546 3 +2329 0 +616 11 +5669 68 +1306 0 +830 3 +844 0 +635 0 +474 0 +3793 12 +983 0 +1778 4 +20 0 +2668 0 +637 1 +772 0 +71 1 +45 0 +3564 1 +1628 1 +948 1 +379 0 +491 2 +232 0 +515 1 +757 0 +833 1 +436 0 +40 0 +1072 0 +866 11 +1047 0 +1641 0 +184 0 +4168 1 +2314 2 +1109 1 +664 3 +1177 0 +2652 4 +495 1 +2260 24 +587 0 +2617 1 +2495 35 +1477 4 +319 0 +1141 0 +1214 0 +1571 3 +1207 1 +383 2 +1074 1 +160 0 +1475 0 +4685 45 +3306 1 +2809 4 +2247 4 +719 1 +1689 0 +2891 1 +10 0 +2436 1 +3248 5 +834 0 +965 1 +469 1 +812 0 +0 0 +193 0 +428 1 +3657 2 +710 1 +13 19 +0 7 +1 18 +6 0 +5415 5 +3040 1 +1034 1 +4596 8 +902 1 +4232 6 +1409 0 +44 663 +584 1 +1222 1 +517 2 +9 0 +1075 0 +2603 3 +508 0 +6253 21 +10 0 +35 663 +186 1 +300 0 +1090 1 +615 0 +888 0 +894 1 +1434 1 +5 0 +1471 2 +5088 3 +753 0 +1582 9 +671 1 +213 2 +751 0 +1459 0 +1174 0 +995 1 +196 0 +796 0 +738 1 +1374 1 +214 1 +565 1 +165 0 +717 1 +901 9 +769 0 +3103 3 +1040 0 +982 0 +3524 2 +727 0 +1355 0 +1822 3 +508 0 +527 1 +693 0 +503 0 +483 0 +1425 2 +87 0 +923 1 +0 0 +490 0 +246 0 +252 0 +10190 22 +780 0 +3353 4 +8310 70 +1721 1 +155 0 +1085 0 +658 4 +2008 0 +1980 4 +7815 2 +5160 3 +2364 3 +1703 1 +661 0 +659 0 +20065 9 +1170 0 +584 1 +958 0 +626 2 +2995 0 +980 1 +277 0 +1123 0 +2474 1 +2360 1 +235 0 +399 0 +1181 2 +23991 8 +2 0 +1504 0 +3269 1 +800 1 +518 2 +1471 0 +110 0 +1325 1 +171 0 +385 0 +443 1 +376 1 +624 0 +694 0 +56 0 +851 0 +413 0 +1802 0 +2826 1 +74 0 +6739 0 +2204 2 +1096 0 +1624 1 +659 0 +262 0 +3554 1 +1887 35 +2663 27 +1030 1 +492 3 +62972 52 +380 0 +2043 4 +12874 18 +5160 4 +8329 32 +5390 17 +829 1 +1579 0 +1156 3 +1295 1 +1384 1 +2253 3 +505 3 +851 0 +577 0 +313 0 +687 0 +990 0 +2349 2 +34 0 +3253 12 +540 0 +740 0 +393 1 +96 0 +542 0 +1926 0 +3897 7 +39733 29 +32104 10 +289 1 +954 1 +112 0 +579 0 +240 0 +100 0 +281 0 +4105 8 +3527 4 +21511 24 +2869 77 +1088 1 +2252 1 +1005 0 +1642 6 +2357 1 +2847 13 +1789 0 +5914 2 +1107 1 +244 0 +2024 5 +400 0 +1057 3 +1956 7 +86 6 +2194 1 +863 1 +714 1 +284 0 +107 0 +556 1 +1205 1 +1062 2 +1516 0 +1960 1 +176 0 +1786 0 +4762 0 +338 0 +1107 0 +409 1 +1039 1 +376 0 +51 150 +549 375 +142 0 +734 1 +4572 4 +2879 3 +854 6 +1763 0 +48 0 +104 0 +11418 25 +7056 10 +1312 1 +898 0 +4477 2 +561 1 +2431 1 +2243 2 +179 0 +1194 0 +835 0 +0 0 +645 2 +334 0 +90 0 +231 0 +653 2 +791 0 +46 0 +915 0 +2984 2 +222 0 +3610 2 +1448 0 +5895 0 +154 0 +2540 2 +1681 0 +419 0 +268 0 +4 0 +522 1 +376 1 +342 0 +11 1 +330 0 +422 0 +435 0 +13 0 +1917 4 +1118 1 +149 0 +679 0 +3913 0 +469 6 +1353 1 +2192 2 +13 0 +890 0 +44 0 +171 1 +722 0 +931 6 +1845 0 +337 4 +410 1 +3609 26 +321 2 +9049 15 +2150 0 +2726 6 +401 0 +2185 0 +990 1 +1084 1 +1323 1 +448 89 +478 0 +180 3 +9 0 +714 0 +712 0 +2049 1 +5232 2 +2559 3 +0 506 +1851 0 +5 0 +82 0 +1472 1 +1237 5 +215 0 +517 0 +16 0 +862 2 +189 1 +184 506 +0 0 +385 0 +879 1 +129 0 +1275 2 +1554 4 +5331 5 +3300 4 +1118 2 +172 1 +0 0 +554 0 +12421 25 +2383 1 +458 0 +178 0 +1439 0 +1279 0 +0 0 +14098 4 +914 0 +728 0 +1091 1 +1353 1 +3240 0 +1560 2 +1191 2 +733 0 +523 0 +3472 2 +20198 5 +1085 0 +2826 1 +4639 2 +9357 10 +2088 0 +2114 0 +1364 0 +733 0 +2857 3 +2412 0 +2977 7 +5288 3 +273 0 +1247 2 +1427 1 +255 2 +63 0 +6178 7 +623 0 +3440 0 +1321 0 +1070 2 +582 0 +165 0 +8118 0 +1455 0 +372 0 +2820 2 +1466 0 +3096 2 +28 0 +3222 14 +1379 1 +1313 2 +693 1 +311 0 +1089 1 +1816 0 +12478 6 +587 0 +6 327 +1478 0 +1461 2 +497 1 +2191 2 +2196 1 +612 0 +777 0 +1641 1 +4940 2 +725 0 +52 0 +2584 3 +19968 28 +22 14 +4743 1493 +1910 0 +512 0 +482 0 +1106 1 +691 0 +752 5 +476 0 +1190 1489 +3327 1 +0 1 +294 0 +1455 0 +512 0 +1000 0 +1107 3 +1330 2 +1328 2 +336 0 +305 0 +177 0 +11011 241 +12 0 +407 1 +606 2 +1520 1 +2073 1 +12093 45 +0 0 +2940 5 +2339 2 +1427 3 +122 0 +201 0 +15 0 +1903 7 +48 0 +262 0 +862 0 +12 0 +413 0 +2331 0 +984 2 +0 0 +0 0 +1211 0 +5990 3 +6 0 +3139 8 +2130 1 +316 0 +6743 21 +134 0 +716 1 +1092 2 +448 0 +1003 0 +2269 1 +1051 1 +2800 2 +598 0 +569 0 +379 0 +772 0 +536 1 +515 0 +128 0 +415 0 +172 0 +0 0 +524 1 +183 0 +1186 0 +739 0 +0 2 +194 1 +0 2 +0 0 +2422 1 +1375 0 +9714 4 +378 0 +467 0 +200 2 +32 0 +15 0 +2567 1 +0 0 +324 0 +349 0 +900 0 +101 0 +645 0 +2238 4 +1270 1 +3677 6 +670 0 +1817 2 +680 0 +932 1 +944 1 +1114 0 +159 0 +9315 2 +144 0 +6029 3 +282 0 +2014 3 +1187 1 +415 0 +393 0 +104 0 +212 0 +2282 1 +8028 7 +1098 0 +1202 0 +1330 2 +363 0 +411 0 +820 1 +1412 0 +872 0 +578 0 +1338 0 +2090 1 +2115 5 +723 1 +108 0 +203 0 +34 0 +920 0 +349 0 +13 0 +1362 1 +8 0 +9 0 +1394 1 +895 1 +1179 71 +285 70 +1810 1503 +2199 1 +4696 1 +560 0 +724 0 +1787 1 +127 0 +689 0 +1687 0 +349 2 +13502 5 +1276 3 +50 0 +1879 6 +14679 15 +5898 1 +8 0 +1539 0 +940 0 +755 1 +186 0 +1203 1 +675 0 +976 0 +1579 0 +654 0 +536 0 +63 0 +2959 3 +1997 2 +158 0 +269 0 +232 0 +81 1 +689 0 +685 0 +601 1 +1624 0 +3172 29 +0 0 +747 0 +665 0 +641 1 +117 1 +40 0 +2154 1 +0 0 +704 0 +6188 5 +1108 0 +790 1 +727 1 +342 1 +933 2 +783 0 +2809 3 +913 0 +789 3 +169 1 +1327 1 +3674 1 +3193 4 +849 0 +589 0 +555 1 +975 0 +1024 0 +257 1 +2709 5 +1215 0 +66 0 +675 2 +1015 1 +270 1 +236 0 +1062 0 +3254 2 +196 0 +693 0 +2958 5 +1314 0 +1661 4 +1891 2 +2414 2 +2286 0 +2104 2 +841 0 +2444 11 +175 0 +792 1 +515 2 +779 3 +2710 2 +260 0 +745 0 +920 0 +106 0 +321 0 +3333 1 +58 0 +864 0 +460 0 +0 0 +409 0 +750 0 +1027 0 +16600 12 +40 0 +196 0 +2862 3 +1367 0 +434 0 +897 0 +0 0 +626 0 +454 1 +89 0 +2571 1 +3139 1 +1194 7 +1209 5 +289 1 +1309 0 +699 0 +105 0 +571 1 +1885 1 +732 1 +2640 3 +4 0 +406 1 +1117 1 +4562 2 +4149 2 +7551 2 +777 0 +1805 0 +617 0 +979 1 +300 1 +9 0 +49 0 +747 0 +499 0 +798 1 +469 1 +2729 1 +1888 1 +2858 2 +708 6 +2134 2 +1265 0 +182 0 +1 0 +1702 5 +1601 0 +4945 3 +1551 2 +160 0 +457 0 +176 0 +383 0 +144 0 +605 0 +297 0 +1048 0 +336 0 +482 1 +750 0 +417 0 +75 0 +1220 0 +131 0 +1321 0 +138 0 +296 0 +583 0 +488 0 +2037 2 +2258 0 +1254 0 +1072 1 +0 0 +7 0 +1150 1 +550 1 +26 0 +268 0 +1047 1 +597 0 +2449 1 +837 1 +450 3 +392 0 +5898 5 +1968 3 +4927 6 +4001 22 +25 0 +1323 2 +1969 0 +1977 1 +800 0 +819 0 +3008 7 +655 0 +475 0 +1330 0 +1455 2 +521 0 +790 2 +84 0 +1244 1 +753 0 +1973 14 +802 0 +23607 12 +484 0 +659 0 +3647 2 +754 0 +802 0 +358 0 +9347 6 +1328 1 +98 0 +188 0 +431 0 +1830 0 +2988 2 +742 0 +140 0 +2384 1 +424 0 +182 0 +3146 1 +236 0 +4723 2 +2545 1 +1704 1 +548 0 +8669 7 +2779 3 +478 1 +3061 0 +3147 1 +204 0 +211 2 +2305 3 +53 0 +1945 0 +1205 0 +1534 0 +177 0 +656 0 +951 2 +1106 1 +1470 0 +9424 12 +341 0 +439 1 +282 0 +1348 1 +166 0 +0 13 +53 1 +640 0 +654 2 +95 0 +1220 0 +694 2 +164 0 +623 0 +1080 1 +717 0 +0 0 +1120 1 +749 0 +627 1 +505 0 +819 0 +758 0 +2832 1 +599 0 +1476 2 +1136 0 +2734 0 +2981 6 +280 0 +1014 3 +986 0 +1212 0 +288 0 +521 1 +336 0 +1792 3 +930 0 +1469 0 +1213 2 +1453 1 +495 0 +1690 0 +3174 3 +5365 6 +2144 1 +8442 5 +230 0 +1166 1 +5144 1 +1289 1 +337 0 +403 0 +3655 1 +1343 3 +3107 1 +113 0 +1076 0 +2476 2 +1202 1 +479 0 +87 0 +107 0 +2042 0 +890 0 +0 0 +2823 1 +47 1 +579 2 +36 0 +547 0 +2003 2 +1147 0 +14193 11 +1499 0 +575 1 +647 1 +4264 3 +1167 0 +605 0 +1267 3 +558 0 +615 2 +385 0 +3102 0 +654 1 +1485 1 +1459 2 +3611 3 +1887 0 +2451 0 +2799 3 +710 2 +1750 0 +486 1 +1180 0 +1558 0 +1294 1 +210 0 +721 2 +359 1 +631 0 +11004 1582 +322 1580 +553 0 +727 0 +194 0 +2933 1 +1202 1 +1423 1 +1510 1 +439 1 +537 0 +1946 1 +541 0 +641 0 +511 0 +257 0 +618 0 +435 0 +859 1 +2932 5 +1158 1 +5918 27 +230 0 +150 0 +806 1 +3028 2265 +477 1 +3068 3 +995 1 +876 0 +119 0 +276 0 +266 93 +1 2604 +827 2 +400 1 +972 2 +572 0 +1578 0 +1156 0 +1298 5 +2067 0 +425 0 +292 0 +2396 3 +1140 1 +138 0 +6198 2 +1079 0 +61 2 +137 0 +6 0 +1373 1 +535 0 +1 0 +1895 2 +853 0 +857 0 +1182 1 +2781 0 +2979 1 +1945 3 +2748 1 +1709 1 +1101 0 +963 1 +2 184 +0 0 +0 0 +443 0 +38 0 +4012 1 +577 3 +915 2 +1980 3 +589 0 +210 0 +249 0 +5148 2 +783 0 +108 0 +1206 0 +1547 0 +1791 0 +1748 1 +669 0 +122 0 +517 2 +496 0 +26 0 +107 184 +0 0 +557 0 +2471 8 +1153 1 +686 1 +1089 0 +2577 2 +645 0 +90 0 +550 0 +2321 0 +3551 4 +2272 14 +293 0 +2089 1 +181 0 +1267 1 +870 0 +536 0 +1422 1 +101 0 +1221 0 +923 0 +1159 1 +1292 2 +264 0 +2071 0 +708 0 +1433 1 +393 2 +359 0 +1352 3 +4274 18 +1478 2 +293 0 +379 0 +9574 12 +571 0 +122 0 +975 2 +120 0 +193 0 +277 1 +259 1 +511 0 +1675 0 +1344 2 +706 0 +452 0 +589 0 +1294 3 +1319 0 +2526 0 +308 57 +70 700 +3543 2766 +1 0 +1886 3668 +5104 3 +1766 1 +868 0 +374 2 +55 0 +156 30004 +1231 0 +552 1 +821 1 +11296 7 +284 2 +517 0 +0 30003 +902 0 +95 0 +25 0 +0 102 +6598 105 +3831 2 +2301 1 +1329 1 +1113 1 +920 3 +642 0 +120 0 +957 2 +1884 1 +1583 0 +1012 0 +3794 2 +1206 0 +312 1 +52 0 +1567 3 +1247 1 +214 0 +10075 3 +4245 7 +1221 0 +7767 43 +1615 1 +200 0 +220 0 +539 0 +587 0 +1523 3 +617 1 +932 0 +1407 2 +3464 1 +651 0 +1458 1 +2807 0 +3828 7 +1510 1 +1805 1 +710 0 +532 2766 +3118 1 +205 0 +515 0 +2097 2 +4003 4 +816 0 +778 0 +2772 2 +273 0 +1274 0 +0 0 +202 1 +1782 1 +2750 2 +167 0 +313 0 +622 0 +856 0 +716 1 +585 2 +1518 0 +641 0 +899 0 +1947 2 +255 0 +1990 0 +478 1 +705 0 +988 2 +226 1 +3529 1 +971 3669 +48 700 +397 57 +685 2 +90 0 +216 0 +3373 2 +1199 0 +151 0 +3160 1 +2038 2 +1907 1 +1137 0 +2805 0 +2103 2 +2843 4 +1978 1 +3979 3 +23384 63 +2610 4 +1084 0 +876 0 +1832 0 +1145 4 +288 2 +303 0 +232 1 +3759 3 +708 0 +2292 4 +169 2686 +7359 4 +1003 1 +2203 2 +180 0 +904 0 +743 1 +90 2686 +1988 800 +1849 1 +2294 1 +3751 14 +896 5 +865 0 +7808 67 +129 0 +527 0 +3295 0 +375 0 +1494 0 +3122 0 +6301 8 +1992 4 +212 0 +6386 3 +7430 3 +4819 2 +15376 4 +1017 4 +457 1 +448 1 +294 0 +491 0 +320 0 +559 3 +1526 0 +964 1 +1868 1 +234 0 +410 1 +1458 7 +11030 70 +1293 1 +1197 2 +2988 7 +3616 1 +3015 4 +1070 0 +321 0 +347 0 +298 1 +852 1 +513 0 +1125 7 +292 0 +3236 4 +939 0 +4489 4 +1438 1 +674 1 +223 1 +3817 7 +2186 1 +332 0 +1437 0 +531 0 +613 4 +902 0 +361 0 +161 0 +1163 0 +755 1 +250 0 +246 0 +597 0 +982 0 +107 0 +102 0 +1343 0 +2201 2 +2727 10 +3101 1 +2383 1 +431 0 +3720 3 +190 0 +2680 1 +1349 2 +261 0 +2993 6 +4632 2 +1452 1 +2811 5 +2914 0 +985 0 +596 0 +2285 2 +2473 1 +4193 6 +2593 0 +8822 39 +1415 1 +2009 0 +567 8473 +2856 1 +862 2 +1229 1 +5010 1 +374 1 +362 0 +627 367 +225 150 +115 0 +787 0 +4 0 +333 0 +944 0 +212 0 +582 2 +2819 7 +196 128 +133 128 +838 0 +545 1 +440 0 +221 0 +408 0 +1313 0 +3047 1 +300 0 +476 0 +1886 0 +735 2 +2850 1 +689 2 +1819 4 +1734 0 +23 0 +604 0 +3360 3 +552 0 +3218 4 +4025 18 +137 0 +1827 1 +184 0 +176 1 +2094 1 +3074 3 +357 0 +927 0 +709 0 +1945 0 +657 0 +188 0 +140 1 +230 0 +1693 2 +982 1 +979 0 +334 0 +782 2 +1048 0 +1898 0 +1500 3 +751 1 +911 244 +2 127 +1348 66 +2 147 +0 243 +163 128 +5 6 +3257 3 +922 2 +488 0 +43 0 +83 0 +1599 0 +979 0 +973 1 +569 0 +625 191 +1075 5 +398 337 +3767 68 +3019 0 +1712 3 +14034 54 +1186 0 +2442 3 +1648 2 +834 0 +3021 2 +1462 2 +822 0 +285 2 +791 0 +1643 2 +5769 12 +276 0 +439 0 +4535 0 +715 3 +486 0 +450 0 +1008 1 +1030 0 +713 0 +1199 2 +720 1 +27833 61 +718 0 +3552 0 +351 1 +2857 1 +445 0 +207 0 +954 0 +598 0 +2579 6 +26 0 +17 0 +4 0 +564 0 +7598 19 +3119 7 +624 1 +976 1 +2513 1 +646 0 +59 0 +1153 2 +1592 1 +462 0 +270 0 +1292 0 +606 0 +655 0 +645 0 +468 0 +499 0 +418 1 +16909 86 +802 0 +2596 4 +870 0 +2104 3 +6395 3 +3363 0 +837 2 +632 1 +2975 5 +2028 0 +1034 1 +1022 2 +2471 0 +18 0 +640 0 +1167 1 +1697 5 +201 0 +2095 0 +2173 0 +644 0 +241 0 +5116 18 +295 0 +34 10 +2322 3 +1154 4 +1650 1 +1372 1 +2314 1038 +298 0 +345 0 +1381 0 +0 0 +192 0 +447 0 +1043 3 +346 0 +13596 36 +2851 0 +23 1038 +61 0 +1885 1 +843 1 +2174 1 +840 0 +2170 4 +2003 2 +99 78 +7 830 +32 2314 +847 0 +41 0 +6459 1 +1111 2 +1137 0 +1593 0 +1188 2 +3182 3 +90 0 +528 1 +1293 0 +1104 9 +1322 0 +2607 7 +952 0 +998 0 +374 0 +2766 0 +804 1 +154 0 +2084 2 +2357 4 +27 0 +802 1 +4719 2 +967 1 +356 0 +2 80 +332 0 +1152 5 +2345 1 +8297 28 +812 1 +1396 1 +0 0 +273 0 +2251 1 +2885 2 +1134 0 +4419 4 +331 0 +262 0 +475 1 +460 0 +194 0 +2049 2 +545 0 +323 0 +487 0 +3193 3 +2053 1 +1538 0 +711 0 +2911 1 +288 1 +1196 0 +556 0 +894 0 +6130 3 +9 0 +2018 0 +80 0 +2080 137 +4697 2 +290 1 +1948 2 +1937 5 +1650 0 +9458 7 +5021 8 +12495 25 +1821 4 +1090 1 +6645 15 +758 5 +2588 5 +1932 0 +6588 7 +775 0 +192 0 +8593 7 +2575 1 +1597 1 +230 0 +1033 2 +797 2 +208 0 +25 0 +1944 0 +179 0 +336 0 +376 0 +105 0 +205 0 +569 0 +3678 3 +21 0 +25 0 +589 0 +768 2 +556 1 +997 0 +6697 14 +4957 2 +1263 0 +2408 0 +959 2 +212 0 +2137 0 +349 0 +2610 1 +1804 0 +261 0 +6694 4 +79 0 +3694 2 +552 2 +1267 3 +66 0 +924 1 +1454 1 +410 0 +419 1 +2294 1 +237 0 +1281 0 +2123 4 +527 1 +636 0 +161 0 +606 0 +393 0 +2093 1 +41 0 +409 2 +694 3 +780 0 +1733 0 +235 0 +879 1 +1273 0 +2827 2 +1258 0 +794 0 +952 1 +2550 12 +5 0 +1286 2 +220 1 +1291 2 +859 0 +4102 5 +508 0 +2039 0 +1493 0 +2417 0 +1169 0 +742 0 +685 0 +23117 10 +75 0 +872 3 +366 0 +979 1 +1625 0 +2499 3 +2194 0 +4277 7 +2990 2 +2685 0 +815 0 +1851 1 +731 0 +198 0 +460 0 +1300 0 +934 0 +901 0 +189 0 +1207 0 +1488 3 +409 0 +1043 0 +1284 1 +240 0 +1252 0 +1714 0 +573 0 +6978 1 +1650 3 +842 0 +454 0 +2475 2 +464 0 +49 0 +3036 1 +13508 19 +4448 15 +6026 5 +753 0 +3769 3 +2120 0 +874 1 +500 0 +759 1 +136 0 +5060 9 +1651 1 +4058 9 +4398 0 +475 0 +102 0 +7650 15 +25 0 +883 5 +2859 1 +4267 0 +2021 1 +33 0 +1742 0 +1264 2 +269 1 +9 0 +24 0 +1467 2 +5331 1 +243 0 +1173 1 +0 0 +1181 1 +1630 0 +2243 1 +909 0 +358 0 +1664 0 +1257 1 +4994 6 +986 0 +1000 0 +1521 1 +490 0 +2239 6 +80 0 +721 0 +1230 0 +3103 2 +7133 0 +92 0 +363 0 +865 1 +1071 2 +846 0 +671 127 +2007 1 +5603 4 +484 2 +407 0 +366 0 +187 0 +6 0 +982 0 +1339 3 +2354 2 +543 0 +274 0 +596 1 +3276 5 +664 0 +2138 6 +2328 4 +3408 3 +1447 3 +3097 10 +11044 25 +4430 2 +579 88 +200 88 +811 1 +3125 2 +113 0 +755 0 +1585 0 +1796 2 +1841 1 +835 1 +121 310 +193 0 +141 310 +4901 3 +1137 0 +105 0 +2668 2 +3284 7 +2640 0 +265 1 +157 0 +15273 38 +1018 1 +6886 24 +3724 0 +335 1 +2116 0 +50 0 +4491 2919 +1634 2916 +7985 8 +1244 0 +212 0 +1865 1 +1265 1 +389 0 +1265 2 +2363 0 +262 0 +2565 8 +709 2 +468 1 +906 1 +748 0 +150 0 +1434 1 +433 0 +1993 1 +1216 0 +21143 6 +0 0 +300 0 +70 0 +3126 2 +1091 0 +1440 2 +235 0 +2844 1 +299 2 +1538 1 +2467 1 +2147 2 +946 0 +113 0 +5242 5 +1437 3 +435 0 +3011 0 +185 0 +332 0 +86 1 +15 0 +767 0 +0 0 +237 0 +9861 4 +933 0 +946 0 +1681 1 +296 0 +1806 1 +2162 0 +595 1 +1025 0 +3938 4 +836 2 +257 0 +3017 7 +56022 239 +17 0 +2234 3 +564 0 +2635 4 +951 1 +327 0 +92 0 +2038 0 +312 1 +921 1 +61 0 +2146 1 +454 0 +2290 3 +2104 3 +576 0 +20 0 +18 0 +4 0 +506 0 +568 0 +1238 0 +733 1 +2356 2 +601 0 +1620 3 +2415 2 +1426 0 +2626 2 +738 2 +1298 0 +163 0 +1688 7 +598 0 +863 15 +2104 1 +2273 0 +2541 3 +1250 0 +323 0 +2029 3 +587 4 +1608 1 +1963 0 +1372 5 +505 0 +2761 2 +1453 0 +1082 0 +1283 2 +350 0 +1214 1 +863 0 +3916 2 +1045 0 +0 0 +0 0 +1161 0 +202 0 +2424 1 +3462 1 +593 1 +552 0 +1743 0 +1 0 +644 0 +32 0 +738 1 +85 16170 +116 788 +28 0 +4887 2 +1598 0 +6050 7 +264 788 +0 16170 +5191 4 +451 0 +1903 1 +3905 1 +1298 0 +462 0 +754 0 +1464 2 +746 0 +1938 1 +1064 1 +2374 6 +679 0 +317 0 +2399 2 +1036 2 +27195 3 +508 0 +942 1 +3780 13 +758 0 +160 0 +255 0 +1030 0 +962 0 +856 0 +5283 3 +2314 0 +428 0 +245 0 +757 0 +418 1 +700 0 +702 0 +771 0 +1243 1 +3 0 +1013 0 +342 0 +82 0 +446 0 +11 0 +10427 4 +1183 0 +2216 10 +1389 0 +9 0 +91 0 +978 0 +900 0 +2423 3 +107 0 +1182 0 +581 0 +251 1 +1235 1 +544 0 +782 0 +1088 2 +2798 16 +608 2 +1946 2 +3667 1 +236 0 +1239 1 +1320 0 +123 0 +81 0 +312 1 +1014 2 +2235 6 +718 1 +550 0 +430 0 +1852 1 +1915 1 +2047 5 +836 1 +4043 4 +768 0 +1141 0 +1690 0 +4870 4 +171 1 +18 0 +217 2 +517 1 +4191 2 +561 0 +991 2 +1900 1 +2222 1 +2103 0 +3615 1 +1251 1 +4187 2 +910 0 +768 1 +847 0 +2175 0 +435 4 +170 0 +504 0 +528 0 +755 0 +2547 3 +313 0 +409 1 +596 0 +638 4 +240 1 +1285 0 +81 0 +8 1798 +1696 0 +1259 1 +352 0 +263 13 +255 13 +3704 5 +1516 2 +75 0 +43 1798 +1484 2 +951 0 +436 0 +1113 0 +316 0 +2821 3 +1625 0 +2206 2 +6234 17 +98 1 +312 0 +3161 1 +199 0 +2978 3 +5460 33 +67 0 +399 0 +2017 8 +1144 0 +872 2 +232 0 +1405 0 +472 0 +793 0 +637 0 +1339 1 +1670 1 +268 0 +1166 0 +34 0 +313 0 +3740 1 +652 2 +875 1 +1460 0 +2273 1 +2061 4 +1113 1 +649 3 +1512 0 +0 0 +383 0 +5202 10 +1711 0 +1714 0 +806 0 +560 0 +5 0 +1856 0 +3510 3 +2805 4 +477 2 +1041 5 +605 4 +267 0 +4459 1 +2602 1 +798 0 +426 1 +792 2 +636 1 +2345 1 +291 0 +525 0 +519 3 +2648 1 +3 0 +1862 1 +6129 3 +548 0 +1274 3 +1619 2 +1305 13 +1806 1 +4283 2 +1959 3 +6382 4 +3218 7 +4868 11 +6494 10 +1202 0 +30860 16 +1248 0 +664 1 +538 0 +637 0 +588 0 +251 0 +224 1 +136 0 +902 1 +2328 2 +116 0 +410 1 +796 0 +2552 2 +14 0 +35 0 +11681 5 +1778 1 +1028 0 +812 1 +827 0 +804 0 +495 0 +66 1 +425 0 +6021 3 +1664 1 +543 0 +440 1 +3410 1 +12634 7 +3060 3 +2 2429 +26 88 +561 0 +2507 0 +218 0 +723 1 +1957 0 +54 0 +2956 2 +590 0 +595 0 +1057 2 +692 0 +2623 1 +1166 2 +1652 2 +456 0 +865 0 +283 0 +302 0 +23 88 +9 2429 +1199 1 +2994 6 +3430 2 +220 0 +1 0 +450 0 +15 0 +103 0 +5849 6 +637 0 +1883 2 +1647 1 +647 0 +5 0 +2680 5 +138 0 +6474 3 +10069 3 +887 1 +642 0 +2111 1 +1578 1 +948 0 +3650 10 +380 0 +2018 1 +2362 1 +4646 12 +401 1 +1105 0 +2681 4 +9166 5 +108 0 +968 1 +6077 1 +7165 6 +406 0 +85 0 +726 1 +530 0 +720 0 +1492 0 +264 0 +1003 0 +1762 0 +56 0 +393 1 +514 1 +1864 2 +31 0 +1506 1 +1067 1 +4812 25 +43 0 +1266 1 +5158 6 +17688 24 +4799 7 +0 3589 +1301 1 +1895 0 +14674 12 +1271 1 +859 0 +860 1 +1132 0 +0 0 +2442 2 +1460 1 +45 0 +252 0 +166 1 +79 0 +316 0 +64 0 +903 1 +150 1 +980 0 +9 3589 +678 1 +86 0 +12156 56 +77 0 +1468 0 +1352 0 +391 0 +9380 9 +617 0 +1510 0 +852 0 +1544 3 +119 89 +1536 0 +479 0 +562 0 +1306 2 +1179 0 +883 168 +235 168 +1429 1 +1117 0 +1340 1 +681 1 +122 0 +313 0 +1661 2 +443 0 +5981 4 +4 0 +1467 0 +53 0 +2421 1 +121 0 +867 0 +125 0 +670 1 +357 0 +721 1 +696 0 +641 0 +415 0 +806 0 +2895 0 +282 0 +784 0 +4123 6 +1526 0 +3848 2 +6140 1 +34 0 +413 1 +1038 6 +628 1 +633 0 +0 0 +849 0 +257 0 +545 0 +5214 21 +798 2 +590 0 +2254 2 +123 0 +5819 13 +349 0 +1634 2 +3004 2 +5227 3 +14079 45 +63 904 +0 0 +508 1 +739 1 +2362 1 +106 0 +3184 1 +2217 4 +3765 4 +295 0 +1105 0 +6583 4 +3259 2 +1012 1 +0 0 +4363 3 +1582 0 +1381 0 +1150 0 +517 0 +578 1 +1657 0 +1066 1 +845 0 +751 0 +467 3 +170 0 +1753 0 +3824 6 +150 0 +1744 0 +322 2 +609 2 +552 3 +856 0 +2584 0 +328 0 +113 0 +340 0 +773 1 +2001 1 +6871 11 +2729 23 +103 0 +355 1 +221 0 +845 4 +2317 7 +2439 2 +1450 0 +519 8 +2831 1 +578 0 +350 0 +381 0 +213 0 +539 0 +227 0 +1714 4 +63483 13 +2224 5 +527 0 +5749 2 +611 0 +1967 6 +10589 10 +1326 1 +8969 4 +9966 2 +583 0 +744 2 +204 58 +1071 8441 +181 53 +1015 0 +2586 1 +264 0 +4627 3 +1709 3 +643 0 +3070 2 +234 0 +306 0 +426 2 +1269 2 +4434 3 +2195 0 +1087 0 +9326 8 +3236 2 +569 0 +1742 1 +2853 141 +94 1 +994 7 +2792 2 +659 0 +1891 1 +511 0 +3064 2 +8 0 +758 2 +1363 0 +73 0 +46 0 +1603 3 +1893 3 +853 1 +4459 23 +1 0 +252 0 +607 0 +3165 0 +4817 3 +3198 0 +750 0 +646 0 +1020 0 +689 0 +1533 1 +682 0 +2581 5 +87 0 +498 1 +1292 1 +2116 2 +1138 0 +1732 2 +935 0 +7401 5 +140 0 +2580 0 +204 0 +1687 2 +2755 1 +1019 1 +2117 1 +2309 2 +5821 5 +3545 2 +1504 0 +1409 1 +1324 2 +783 0 +988 0 +2516 1 +8388 1 +1308 1 +4440 30 +0 0 +16 0 +6828 4 +2336 0 +3598 5 +780 0 +1158 0 +1447 0 +3678 3 +1192 0 +328 0 +2579 1 +361 0 +2750 1 +3176 5 +6327 3 +1306 0 +1490 1 +2012 1 +171 0 +1493 3 +9222 44 +0 0 +21532 7 +461 0 +86 0 +295 1 +1044 0 +2210 4 +254 1 +482 0 +570 4 +119 0 +46066 33 +6465 13 +15985 18 +844 21 +0 21 +3899 13 +724 1 +1162 0 +306 0 +2623 0 +430 1 +621 1 +1493 2 +500 0 +110 0 +380 0 +1012 1 +2386 2 +6083 1 +1 0 +375 12 +449 12 +1765 2 +864 0 +436 0 +1953 1 +729 0 +347 0 +1973 2 +399 0 +902 1 +1262 0 +2894 2 +1780 3 +1308 1 +1723 0 +828 2 +243 0 +1244 0 +1018 2 +8846 12 +682 32 +97 32 +1724 1 +577 0 +566 2 +1366 1 +1225 0 +742 0 +627 0 +1534 2 +1078 1 +905 2 +1266 0 +515 0 +844 6 +44 1 +102 0 +10033 169 +3868 1 +1258 0 +3 3 +75 3 +4 0 +11 0 +10 0 +263 0 +1251 0 +1412 0 +65 0 +46 0 +103 0 +2254 1 +2082 4 +2894 8 +7241 15 +449 0 +2945 3 +845 1 +4897 3 +1667 4 +1580 1 +1171 4 +189 1 +296 0 +252 0 +53 0 +1690 7 +670 2 +1070 0 +2254 19 +1901 3 +0 0 +6580 3 +75 0 +1483 1 +820 0 +1403 1 +28939 5 +34 0 +2566 1 +1891 2 +2302 1 +256 0 +4834 2 +1853 4 +6648 4 +1491 1 +274 0 +383 0 +713 1 +1567 0 +5753 31 +794 1 +851 1 +493 0 +0 0 +2195 0 +1172 2 +1878 2 +334 0 +157 1 +405 1 +1645 0 +1069 3 +1833 1 +630 1 +987 0 +1654 0 +2286 0 +1216 0 +4997 1 +9 0 +4607 5 +661 4 +6945 24 +907 1 +138 0 +307 0 +612 0 +733 0 +443 2 +125 0 +610 0 +485 0 +606 1 +271 0 +501 0 +9317 9 +705 0 +868 0 +1056 3 +47 0 +138 0 +1020 2 +112 0 +965 1 +1283 0 +881 0 +126 0 +306 0 +1468 1 +903 0 +363 0 +815 0 +868 0 +497 0 +333 0 +233 0 +344 2 +131 1 +1211 2 +1010 1 +873 0 +157 1 +1324 1 +351 0 +550 0 +230 0 +2400 3 +1641 0 +207 0 +191 0 +648 0 +1036 2 +702 0 +2019 1 +25 0 +36 58 +1691 1888 +248 53 +725 1 +1726 4 +1216 1 +460 0 +700 0 +1182 0 +1549 1 +221 0 +667 1 +1532 4 +4867 4 +4534 5 +909 0 +56 0 +433 0 +4532 1 +1511 2 +978 0 +1011 1 +1537 0 +844 2 +26 0 +2058 3 +997 1 +289 2 +1984 1 +1397 8 +0 0 +657 0 +40339 589 +8840 11 +79 0 +1356 7 +1677 2 +501 576 +161 31268 +196 458 +3 905 +2234 2 +777 1 +402 0 +298 0 +474 1 +32 0 +187 0 +962 1 +2434 3 +801 0 +8669 7 +760 0 +404 0 +853 1 +1070 0 +901 0 +352 3 +488 1 +994 0 +1869 4 +516 2 +1693 1 +3 905 +2 458 +144 31268 +3696 2 +4667 10 +187 0 +956 1 +758 0 +2122 1 +2216 0 +4303 2 +342 1 +953 0 +1321 1 +816 0 +0 0 +1903 4 +1127 4 +1078 0 +277 38 +164 39 +478 0 +849 1 +2940 1 +592 1 +1028 1 +1386 2 +2062 5 +723 0 +2883 1 +124 0 +578 0 +496 0 +657 0 +108 0 +2430 3 +551 0 +1759 1 +3568 3 +824 3 +1235 0 +5496 36 +1207 0 +5086 2 +8008 1 +85 0 +356 4 +839 1 +1232 1 +349 0 +1087 1 +237 0 +110 0 +2993 4 +357 0 +578 2 +1882 1 +49 0 +773 0 +625 0 +341 0 +2 0 +395 0 +2226 2 +3012 0 +1588 6 +1468 5 +2588 0 +1034 1 +487 0 +1394 1 +582 2 +1739 1 +1883 0 +27 0 +670 0 +128 0 +31 4 +184 1200 +2129 3 +8035 21 +1741 0 +903 3 +185 1200 +243 2 +1024 0 +2582 1 +2648 4 +1108 0 +315 0 +661 2 +176 0 +341 0 +23 0 +845 0 +408 0 +278 0 +4162 4 +850 0 +607 4 +2616 0 +1673 0 +1394 0 +1813 0 +1079 2 +1538 0 +521 1 +982 0 +1007 6 +1133 2 +2953 2 +1963 0 +3080 3 +2076 0 +478 0 +804 0 +2012 0 +668 1 +580 2 +321 1 +457 0 +1155 0 +927 1 +815 2 +449 1 +573 1 +590 0 +1056 0 +705 0 +3013 2 +2373 6 +2415 4 +6725 17 +450 1 +1435 2 +1394 0 +1397 5 +939 1 +202 0 +1408 0 +995 4 +709 0 +42 0 +697 1 +1043 0 +1286 0 +629 0 +1853 2 +1752 0 +2638 3 +90 0 +3702 0 +10 0 +366 0 +1084 2 +1037 1 +1994 4 +1776 0 +9553 16 +714 1 +545 0 +452 1 +4681 5 +1159 1 +1803 3 +2054 0 +560 0 +14545 32 +1074 0 +1069 7 +416 2 +1208 0 +3820 0 +802 0 +18 0 +191 0 +141 0 +279 0 +3752 1 +4046 2 +5593 10 +4800 12 +14068 3 +134 0 +1072 2 +615 1 +422 0 +207 1 +510 1 +1819 0 +615 0 +2044 0 +9598 17 +228 1 +853 0 +2795 4 +119 0 +211 34 +537 1 +100 0 +1412 1 +2232 2 +160 0 +6687 3 +575 1 +490 0 +520 0 +506 0 +5 2604 +324 93 +61 0 +422 0 +1761 0 +115 0 +12477 7 +272 34 +2903 16 +1177 0 +180 0 +574 0 +181 0 +1883 0 +8792 5 +0 0 +1049 0 +1310 0 +1110 4 +1252 0 +560 0 +105 0 +338 0 +1471 0 +1019 26 +22107 1006 +503 0 +1914 24 +7763 18 +1746 2 +77 0 +188 0 +2878 2 +48 0 +28475 11 +5051 1433 +31 1432 +3592 2 +9234 28 +1437 1 +117 0 +6455 6 +5 0 +803 0 +1817 0 +1239 1 +3120 3 +652 0 +2010 1 +1106 4 +3 0 +209 0 +244 0 +1734 1 +984 0 +1687 2 +948 1 +24 0 +440 0 +839 1 +38 0 +970 1 +758 0 +2611 0 +70 2 +7 0 +309 0 +14 0 +0 0 +0 0 +1118 0 +301 0 +3106 33 +8753 9 +701 0 +549 0 +88 0 +481 1 +174 0 +1288 4 +1238 1 +1488 12 +1620 1 +2682 3 +1268 0 +67 0 +578 0 +746 0 +82 2 +5343 1 +2697 0 +180 10 +260 0 +2114 1 +220 1 +5 0 +0 0 +23 0 +182 0 +2090 0 +6837 3 +1453 0 +4308 2 +724 0 +693 0 +240 486 +1109 486 +355 0 +325 0 +371 1 +397 0 +2518 1 +40 0 +203 0 +3225 2 +958 0 +2131 2 +4736 3 +5 0 +10062 44 +2373 12 +111 0 +3901 9 +52 0 +174 0 +4 0 +5301 6 +1346 4 +3841 3 +1088 1 +1433 0 +66 0 +576 0 +749 1 +1737 0 +3 0 +1655 1 +602 0 +3093 2 +1497 1 +1302 2 +1934 4 +0 0 +3782 1 +1039 2 +1368 5 +1825 4 +170 0 +9669 11 +892 0 +942 2 +794 1 +672 0 +3524 5 +707 0 +221 0 +889 1 +1611 0 +1051 0 +1932 2 +402 0 +317 0 +460 0 +2195 2 +852 0 +874 0 +376 0 +1206 2 +0 0 +14031 32 +11 0 +1080 4 +932 0 +871 1 +2053 1 +602 1 +468 2 +27 0 +389 0 +566 0 +519 1 +477 0 +544 1 +5476 9 +1481 3 +2308 2 +180 0 +1217 1 +1673 1 +920 0 +646 2 +2444 0 +968 0 +5983 5 +415 0 +5 0 +315 0 +12010 59 +306 1 +1664 0 +502 0 +123 0 +887 0 +35 0 +1353 1 +553 0 +1046 1 +2919 0 +358 0 +1185 1 +742 0 +2374 1 +2677 5 +450 0 +820 0 +2109 0 +1401 2 +1519 1 +502 2 +4284 2 +1513 0 +645 0 +692 3 +1863 4 +306 1 +660 12 +336 2 +252 0 +742 1 +57 0 +694 0 +66 0 +46 0 +440 0 +1945 2 +68 0 +1084 2 +1716 3 +152 0 +5175 1 +1607 0 +2869 0 +419 9 +355 11 +377 0 +239 1 +307 0 +2094 1 +1726 1 +301 0 +3437 3 +404 1 +1199 2 +12714 9 +302 0 +3331 4 +0 0 +23046 14 +231 0 +1319 1 +871 0 +1224 2 +1436 4 +323 0 +1085 0 +4513 1 +2185 5 +598 0 +1002 1 +5408 5 +2824 0 +234 1 +679 1 +294 1 +1833 1 +0 0 +51 0 +3242 1 +21 0 +351 0 +2114 0 +1144 1 +5614 1 +787 0 +0 0 +1670 3 +1149 0 +1129 2 +13200 67 +1097 2 +1157 0 +2056 0 +356 1 +846 0 +627 1 +1095 0 +75 0 +1751 2 +740 0 +0 0 +1 0 +362 0 +318 1 +5261 2 +108 0 +682 0 +181 0 +1052 0 +2078 1 +630 0 +383 0 +243 0 +2885 0 +630 0 +1051 1 +6232 53 +5419 1 +1008 0 +471 1 +1476 0 +599 0 +0 0 +2008 0 +1586 2 +1370 0 +691 0 +1036 0 +1575 1 +4511 2 +4102 7 +1440 2 +309 1 +484 0 +1465 3 +575 1 +1926 9 +1789 3 +277 0 +1731 3 +2127 0 +29 0 +0 0 +1614 0 +994 1 +15 0 +229 0 +363 0 +118 1 +3 0 +1447 0 +2027 2 +776 0 +1085 0 +2244 0 +433 0 +2753 2 +422 0 +1501 2 +339 0 +531 0 +2895 8 +630 0 +2964 1 +809 0 +1922 5 +736 0 +1282 0 +1734 0 +1422 5 +1358 4 +1200 0 +966 1 +7221 2 +4902 3 +1402 0 +1128 1 +94 0 +681 0 +16822 21 +1803 1 +475 0 +25998 18 +2031 2 +231 0 +496 2 +827 0 +2558 9 +357 1 +1382 0 +63 1 +93 0 +631 1 +564 2 +1091 0 +1600 3 +742 1 +4729 21 +2008 57252 +1666 1 +7958 0 +2080 1 +828 0 +200 0 +224 0 +956 0 +1551 0 +904 0 +329 1 +3306 0 +877 3 +414 0 +436 0 +6080 3 +818 0 +336 0 +982 0 +158 0 +59 5 +458 6 +2104 2 +976 0 +2748 2 +1519 0 +361 0 +933 1 +408 0 +1540 0 +817 0 +204 0 +868 1 +296 0 +2275 3 +938 0 +2281 9 +2755 10 +987 0 +2 0 +255 0 +991 0 +777 0 +1874 0 +849 0 +1997 0 +5737 2 +199 0 +142 34 +540 0 +1693 0 +638 0 +1065 0 +12094 15 +204 0 +1718 2 +634 2 +782 0 +4195 2 +1307 1 +960 0 +64 0 +495 0 +444 2 +5855 22 +3888 1 +2929 0 +3776 0 +1956 0 +3152 5 +5145 7 +27 0 +4963 1 +37884 29 +46 0 +1727 0 +208 15098 +2860 7 +7729 4 +501 0 +2420 22 +51 15097 +1270 1 +435 0 +151 0 +346 0 +432 1 +423 2 +1327 1 +1476 1 +26 0 +1804 2 +906 2 +1263 0 +645 0 +863 1 +1642 3 +1314 9 +808 0 +562 0 +1178 0 +1920 1 +1416 0 +15 0 +460 0 +776 1 +436 0 +676 0 +951 4 +7935 3 +1674 0 +9153 6 +19 0 +1625 0 +159 0 +2399 0 +265 0 +310 0 +1207 1 +749 0 +1648 2 +1664 6 +996 0 +325 0 +967 0 +911 0 +836 1 +160 0 +810 1 +687 0 +2218 1 +1076 0 +2661 1 +211 0 +172 0 +9370 0 +955 1 +178 0 +191 0 +202 1 +498 2 +4794 7 +3701 6 +605 0 +1864 0 +54 0 +1904 1 +1302 0 +1706 16 +1130 0 +387 0 +7818 3 +389 2 +672 1 +679 0 +1086 0 +742 0 +786 1 +291 0 +2601 4 +8302 8 +1313 1 +165 0 +213 0 +487 1 +1175 0 +543 0 +945 0 +416 0 +24 0 +1350 0 +2056 0 +4805 2 +1 0 +585 0 +79 0 +622 0 +220 1 +3038 7 +11401 22 +907 0 +2310 4 +232 0 +242 2 +414 0 +1008 1 +477 0 +1671 1 +1055 0 +4902 2 +1525 0 +1481 0 +541 1 +2267 0 +0 0 +755 0 +976 5 +3032 2 +383 0 +2862 1 +1053 0 +1420 1 +2041 3 +6838 2 +329 0 +675 0 +39 0 +301 0 +1924 1 +546 0 +819 1 +641 0 +274 0 +107 2 +82 0 +8902 5 +465 0 +2593 2 +738 0 +799 0 +9 0 +129 0 +448 0 +529 1 +2156 1 +345 0 +1490 0 +29 0 +18 0 +2383 2 +844 1 +2008 1 +487 1 +108 0 +1409 6 +1061 1 +1318 0 +6289 2 +3458 7 +587 0 +843 1 +2567 4 +1514 1 +910 1 +1101 1 +538 1 +3333 3 +1822 2 +1907 2 +1252 1 +2 0 +1852 0 +546 0 +233 0 +218 0 +1682 3 +1646 0 +2139 3 +1526 0 +364 0 +480 0 +388 0 +517 2 +676 0 +2040 0 +71 0 +4796 9 +883 1 +20797 19 +7494 5 +2127 0 +523 0 +994 1 +3461 2 +1025 0 +2516 0 +2777 1 +594 0 +990 2 +778 0 +4248 2 +105 0 +1734 1 +250 0 +2881 3 +1292 0 +1197 2 +649 0 +626 0 +150 0 +318 0 +333 0 +496 0 +493 0 +146 0 +645 1 +2049 3 +252 0 +5108 4 +2343 1 +2919 0 +317 0 +8 0 +21 0 +38 0 +782 1 +20 0 +545 1 +1783 2 +1438 3 +6 0 +1891 90 +1046 1 +26 0 +4543 3 +366 1 +1935 1 +916 0 +915 0 +1010 0 +12019 8 +434 0 +13344 95 +527 0 +227 0 +433 0 +200 1 +2214 0 +6603 2 +2819 1 +525 0 +3579 0 +1527 2 +14587 4 +4112 1 +1959 3 +540 1 +1274 0 +830 1 +542 0 +3236 0 +786 1 +2494 1 +734 0 +0 0 +849 0 +508 0 +1795 0 +944 2 +50 0 +1897 2 +1404 3 +1011 0 +2 0 +510 0 +2061 0 +2223 1 +536 0 +752 1 +12 0 +4861 3 +1249 2 +342 0 +181 0 +1074 0 +1505 0 +1489 2 +248 0 +675 0 +570 1 +139 0 +897 0 +158 0 +290 0 +862 1 +949 0 +3986 7 +1855 0 +532 0 +1532 0 +476 0 +1001 0 +1003 2 +2088 0 +1169 1 +2752 1 +1338 1 +254 0 +972 0 +1599 0 +980 0 +892 0 +1929 4 +159 0 +244 0 +806 0 +735 0 +2746 2 +1303 2 +31 0 +829 2 +1974 1 +1052 0 +653 1 +938 1 +1319 2 +12452 11 +806 7 +1769 1 +1023 0 +1 0 +1145 0 +960 1 +1287 3 +2799 2 +597 2 +32 840 +3977 5 +1889 7 +1101 0 +788 0 +271 840 +211 0 +13 0 +618 0 +1443 4 +322 0 +1587 0 +1958 1 +1407 8 +4287 16 +1048 1 +1176 4 +4088 2 +3152 6 +73214 289 +1731 0 +772 0 +1455 1 +1558 0 +215 0 +6123 3 +1111 0 +1023 0 +2092 1 +674 0 +925 1 +3330 2 +652 1 +3713 2 +606 1 +81 0 +1274 1 +183 0 +2469 0 +504 1 +13739 4 +1699 0 +3139 1 +649 0 +1060 0 +1854 1 +1890 0 +42 0 +2205 2 +3217 2 +2144 0 +25445 38 +1089 0 +3489 7 +904 0 +69 0 +822 0 +2535 7 +4637 3 +920 0 +4936 1 +2266 3 +970 0 +2900 2 +1672 1 +782 0 +5914 4 +448 0 +596 2 +7714 3 +1168 1 +565 0 +239 0 +1785 2 +804 2 +2073 2 +1240 2 +903 0 +3967 5 +812 1 +788 1 +18 0 +965 1 +335 0 +3519 2 +1555 0 +8268 7 +2124 0 +2695 2 +216 3 +7128 13 +2343 8 +883 0 +1323 3 +617 2 +2550 2 +1386 0 +768 0 +10667 5 +354 0 +559 2 +2211 1 +2828 1 +155 0 +1028 0 +755 0 +1775 3 +918 0 +933 0 +178 0 +131 0 +179 1 +5 0 +184 0 +11 0 +308 0 +272 1 +1147 1 +510 0 +2337 1 +2722 9 +1737 1 +793 0 +2736 1 +227 0 +426 0 +758 0 +27 0 +573 4 +479 0 +622 1 +528 1 +361 0 +1204 1 +670 0 +3308 3 +690 0 +190 0 +1089 0 +111 0 +718 0 +117 0 +275 0 +19 0 +1038 0 +951 0 +3025 5 +677 1 +92 0 +4446 30 +724 0 +2650 2 +1248 0 +1133 0 +246 1 +1170 1 +376 2 +4470 2 +960 1 +24 0 +485 0 +369 2 +5063 2 +3759 3 +920 0 +393 0 +1259 2 +365 0 +4 0 +1 0 +73 0 +2049 0 +398 0 +210 0 +424 0 +2825 1 +1234 0 +226 1 +641 0 +2068 3 +563 0 +1106 0 +8085 1 +313 3 +1 0 +383 0 +1967 1 +1626 1 +4261 3 +1439 1 +2213 1 +1395 0 +293 0 +204 0 +469 0 +853 0 +330 0 +1871 2 +2075 0 +3 0 +7 69 +31 69 +582 0 +1578 2 +397 0 +969 0 +948 2 +36 0 +2485 1 +2419 2 +370 1 +337 0 +307 0 +1371 0 +379 0 +1135 2 +1081 0 +962 0 +726 0 +922 0 +3310 0 +2023 1 +3141 0 +822 0 +915 1 +1327 11 +597 1 +291 0 +447 0 +916 0 +13336 1 +5 0 +206 0 +2539 6 +3527 2 +368 0 +1850 0 +789 0 +328 0 +541 0 +2295 2 +8791 15 +3456 0 +595 1 +2377 0 +700 1 +1675 4 +64 1 +2467 0 +1038 0 +0 0 +2400 2 +126 0 +330 0 +1286 0 +6373 5 +1421 1 +40 0 +2290 0 +841 0 +2507 1 +346 0 +1290 1 +4358 9 +298 0 +305 0 +1 0 +555 0 +943 0 +1731 1 +597 0 +754 0 +0 0 +1362 2 +1417 0 +1123 0 +1463 2 +1511 0 +2437 0 +4863 2 +4916 27 +634 0 +2066 0 +913 0 +364 0 +635 0 +1086 1 +1954 0 +4666 7 +1242 0 +259 0 +654 1 +1521 2 +2989 4 +1741 1 +1467 0 +80 0 +211 0 +47 0 +641 2 +1825 2 +661 0 +529 0 +2132 3 +1585 0 +5860 1 +10088 6 +415 0 +12 0 +915 2 +795 0 +2185 0 +692 0 +1784 1 +3034 1 +1899 5 +148 0 +300 0 +1785 4 +2728 0 +766 1 +693 0 +295 1 +1089 2 +7 0 +256 1 +1883 2 +1335 0 +746 0 +2469 1 +649 0 +3714 2 +843 1 +380 0 +22007 2281 +1947 2 +201 0 +749 2 +2861 6 +1866 3 +19 0 +9545 44 +1161 2 +776 0 +739 2 +1799 1 +3671 0 +472 2 +813 2 +1599 2 +3830 3 +1455 0 +335 0 +1122 2 +1861 2 +316 0 +627 0 +1445 0 +503 2 +7879 9 +114 0 +801 2 +2721 0 +444 0 +2325 1 +549 0 +2847 1 +4362 2 +2259 2 +859 0 +297 0 +1051 2 +1996 1 +89 0 +36 1 +2243 4 +814 0 +1571 3 +2994 1 +6843 2 +97 0 +604 0 +2847 2 +8046 2 +4438 2 +1424 1 +1921 1 +2482 4 +208 0 +1033 0 +1035 799 +14142 811 +9184 28 +1654 11 +3219 3 +33 0 +2748 1 +588 0 +769 0 +313 0 +861 0 +1776 3 +2020 3 +4206 42 +65 0 +260 1 +2304 8 +968 0 +679 0 +775 1 +948 0 +820 0 +367 0 +1217 1 +1658 1 +546 0 +164 2 +1542 0 +2752 3 +7291 1 +654 2 +17 0 +32 0 +1792 0 +809 0 +3967 3 +123 0 +977 0 +423 0 +451 0 +2508 4 +440 0 +3353 4 +1365 0 +15 0 +527 0 +1623 2 +161 0 +1708 3 +670 2 +1171 2 +226 0 +2055 2 +4 0 +2954 3 +942 0 +2115 5 +2764 8 +1379 0 +533 0 +0 0 +1 0 +1 0 +53 1 +0 0 +440 0 +2914 12 +109 0 +450 1 +3082 0 +900 2 +4891 2 +2651 3 +890 0 +1049 0 +232 0 +171 0 +218 0 +746 0 +542 0 +544 1 +187 0 +41 0 +701 0 +389 1 +955 0 +251 0 +6280 2 +2 0 +805 0 +1902 0 +6 0 +9 0 +238 0 +1537 1 +3149 14 +1800 2 +154 1 +349 1 +1679 3 +463 1 +1328 0 +202 0 +1148 0 +217 0 +197 0 +2224 1 +1543 0 +1 0 +8 0 +722 255 +680 0 +2125 0 +3039 4 +90 0 +353 0 +818 2 +26 0 +3644 1 +3098 0 +146 0 +583 0 +55 0 +288 0 +469 1 +2645 12 +82 0 +1661 1 +2425 2 +4449 2 +930 0 +821 2 +450 0 +1315 1 +277 0 +712 0 +1849 2 +215 0 +303 1 +302 1 +275 0 +1110 0 +854 1 +1884 2 +288 1 +2603 2 +816 0 +652 0 +222 0 +766 1 +158 1 +815 0 +141 185 +124 1 +5850 1 +11 0 +147 0 +7 0 +3378 10 +1085 2 +1709 2 +513 0 +7 0 +2159 0 +1131 0 +1369 0 +646 0 +14945 33 +645 15 +197 15 +491 0 +425 1 +2126 1 +649 1 +977 1 +616 0 +239 0 +2262 2 +215 1 +1922 1 +2462 1 +2583 0 +3611 1 +1526 0 +3112 4 +341 2 +1388 5 +5 0 +1124 3 +512 0 +907 0 +114 0 +2103 6 +1070 2 +3084 0 +390 60 +603 0 +189 60 +22 0 +12 0 +5 0 +5082 3 +1930 0 +993 0 +2637 1 +1652 0 +2555 2 +1099 2 +1840 0 +1299 1 +714 0 +2698 3 +3480 3 +716 0 +1176 1 +1245 0 +863 0 +414 0 +5126 7 +563 0 +999 3 +2152 0 +493 0 +57 0 +54 0 +2984 2 +84 0 +877 1 +2077 8 +51 0 +3432 1 +387 0 +2258 5 +1066 1 +391 0 +485 0 +2064 2 +1521 0 +3146 1 +66 0 +469 0 +373 0 +1866 1503 +656 3 +3196 7 +819 1 +1966 2 +558 0 +21868 19 +962 0 +128 0 +1702 0 +559 0 +9 0 +4841 1 +4709 7 +122 0 +2344 0 +312 1 +1073 1 +65 0 +1654 2 +1577 1 +589 1 +574 0 +1182 3 +1123 0 +1363 0 +5354 6 +181 0 +446 0 +134 320 +2289 2 +2443 3 +182 0 +2371 0 +28 320 +566 0 +83 0 +1350 4 +387 0 +359 0 +181 0 +480 0 +34 0 +786 1 +1041 3 +1070 0 +1072 1 +303 0 +948 2 +1169 2 +3136 3 +3 0 +0 0 +2085 0 +526 0 +770 0 +3830 0 +742 1 +1850 2 +3176 3 +176 0 +2865 1 +5666 1 +2257 15 +586 1 +933 0 +1363 1 +1095 1 +951 1 +10571 22 +3591 43 +704 0 +7611 7 +1589 1 +2666 2 +596 0 +903 1 +2410 3 +9 0 +943 2 +624 0 +1084 0 +2232 2 +2804 2 +323 0 +2685 2 +1381 0 +1260 0 +281 0 +136 0 +1155 1 +3220 3 +1391 0 +55 0 +17 0 +821 0 +885 1 +0 0 +1558 0 +643 1 +3356 1 +2563 2 +3277 3 +917 0 +1183 1 +241 1 +56 0 +1504 2 +1684 0 +290 1 +2328 0 +335 0 +122 0 +1098 1 +323 0 +233 0 +73 0 +1020 0 +3472 28 +3331 1 +1016 1 +704 0 +1900 0 +1238 0 +621 0 +478 0 +2920 4 +2090 2 +526 0 +2669 1 +0 0 +827 3 +413 0 +536 1 +4108 1 +2994 3 +131 1 +4911 4 +2224 0 +1356 0 +864 1 +366 0 +515 1 +283 0 +4000 26 +1501 1 +2162 1 +165 0 +4400 2 +285 2 +1617 0 +1797 0 +479 1 +4653 3 +1025 3 +2300 1 +1054 0 +4331 11 +196 0 +577 4 +1033 1 +2460 1 +306 0 +639 1 +440 463 +933 0 +1310 0 +14 0 +1575 1 +897 97 +203 0 +4439 14 +10414 1 +863 1 +8 0 +947 2 +68 0 +511 0 +679 2 +1818 2 +1039 0 +1656 0 +444 0 +4882 0 +868 0 +634 0 +15467 11 +7319 1 +1869 1 +69 0 +0 0 +251 0 +184 1 +42 0 +1108 1 +2520 6 +1716 2 +326 0 +722 3 +1633 2 +414 0 +4031 2 +288 4 +557 0 +1605 1 +1398 0 +2343 4 +328 1 +262 0 +1059 0 +6880 0 +981 1 +298 0 +54 3 +19 5 +62 2 +737 0 +8080 3 +305 0 +1888 1 +408 0 +5 0 +5642 3 +205 0 +3604 2 +489 2 +1698 0 +2638 49 +1166 0 +802 0 +1474 0 +1568 2 +2762 0 +857 0 +336 1 +4 0 +132 0 +5355 7 +1819 5 +960 1 +1172 0 +25 0 +435 0 +1505 0 +299 0 +546 0 +2387 3 +1290 0 +264 0 +378 0 +0 0 +3178 1 +1074 0 +1441 0 +0 0 +23 2 +1112 0 +497 1 +638 2 +5186 9 +1783 2 +1273 3 +432 0 +769 3 +661 0 +1171 3 +3348 5 +389 0 +1159 0 +402 2 +623 0 +1422 0 +213 0 +13275 16 +2958 2 +1198 1 +623 0 +135 0 +2595 1 +177 0 +12 0 +708 10 +33 10 +205 3 +573 0 +35 0 +14 0 +2 0 +489 0 +0 0 +1484 0 +0 0 +624 0 +473 1 +521 0 +184 0 +946 0 +276 0 +211 0 +329 1 +788 0 +538 0 +73 0 +278 1 +6514 5 +47 0 +372 0 +197 1 +262 0 +437 0 +1239 1 +816 0 +52 0 +508 0 +847 0 +68 0 +108 0 +43 0 +10311 8 +1324 1 +217 0 +2139 0 +1302 0 +745 3 +538 1 +622 1 +1609 0 +1320 3 +791 1 +6147 14 +1905 1 +636 0 +659 1 +4461 3 +2872 4 +3795 2 +798 0 +295 0 +2861 2 +1475 1 +1623 12 +1354 2 +405 0 +576 0 +1010 0 +412 0 +198 0 +1219 0 +170 2 +1 0 +1659 4 +689 0 +167 1 +357 1 +987 0 +546 0 +523 0 +196 0 +2091 1 +107 474 +1032 0 +509 0 +22230 13 +1028 1 +175 327 +1156 0 +50 1 +1030 2 +710 474 +638 0 +259 0 +948 0 +259 0 +563 0 +2272 5 +489 0 +346 0 +11 0 +763 1 +1560 0 +200 1 +1410 2 +922 0 +357 0 +1860 1 +4452 4 +942 1 +340 0 +1676 3 +551 0 +220 0 +9038 10 +545 0 +898 0 +1590 2 +751 2 +1460 0 +317 0 +1427 1 +8573 3 +508 0 +544 185 +904 0 +736 1 +408 0 +239 0 +2087 7 +1536 8 +28556 11 +966 0 +69 0 +1326 2 +3215 1 +690 3 +542 0 +1130 0 +21 0 +1060 2 +2340 1 +1582 4 +4456 2 +1687 7 +3681 4 +4443 5 +2556 0 +1974 0 +1575 1 +1430 2 +548 0 +349 0 +1760 3 +3 0 +0 0 +264 0 +598 1 +2049 0 +782 1 +890 2 +1419 2 +5697 0 +427 0 +520 0 +1121 2 +328 0 +402 1 +1863 1 +4677 5 +913 0 +2061 0 +1694 3 +634 1 +254 0 +2284 0 +1090 0 +67 0 +433 0 +501 1 +2553 3 +12900 6 +18986 20 +174 0 +1035 0 +7 0 +3271 3 +345 0 +5169 2 +2434 4 +2797 0 +9 0 +1 0 +3176 3 +239 0 +62 0 +3128 2 +5122 1 +47 0 +374 0 +684 0 +4434 4 +480 0 +1073 0 +633 2 +3320 4 +2161 4 +905 6 +1533 3 +699 0 +263 2 +1862 2 +1383 0 +0 0 +0 0 +4151 3 +1457 1 +3749 0 +1248 1 +1702 8 +605 0 +824 0 +950 1 +268 0 +728 53 +211 0 +75 0 +3311 3 +22589 12 +597 1 +1490 4 +947 0 +2585 3 +1805 1 +2619 1 +2587 2 +2190 0 +9293 4 +876 1 +811 0 +1325 1 +145 0 +983 0 +3270 5 +1800 1 +505 0 +1660 5 +462 0 +2264 7 +71 0 +32 0 +841 0 +1303 1 +2847 0 +1729 0 +824 1 +475 0 +1499 3 +849 0 +1433 2 +186 1 +139 0 +1204 1 +551 1 +34 0 +4017 2 +309 1 +2279 1 +563 0 +768 1 +1939 1 +6667 7 +2161 1 +1126 0 +471 0 +664 0 +1521 1 +15373 19 +91 105 +1060 1 +802 0 +876 0 +1750 0 +907 2 +586 0 +415 0 +1832 1 +284 0 +26 105 +2130 1 +338 0 +6676 1 +4882 27 +226 0 +763 1 +2071 0 +1886 1 +603 1 +7275 5 +516 0 +186 2 +895 0 +16 0 +971 1 +1812 3 +1690 1 +1387 1 +111 0 +1428 0 +2116 0 +972 1 +648 0 +395 0 +1073 0 +201 1 +137 0 +2191 4 +1344 1 +560 0 +755 0 +230 0 +427 1 +1218 1 +797 0 +825 6 +387 0 +577 5 +806 0 +1612 0 +1558 1 +115 0 +5479 16 +7733 5 +3571 3 +411 0 +276 0 +5509 4 +1069 0 +408 0 +25 0 +1882 1 +1765 0 +751 0 +9111 2 +2154 1 +441 3 +344 0 +2464 4 +275 1 +804 1 +1273 0 +1843 1 +1219 1 +1369 0 +1210 0 +1302 1 +3102 2 +1745 0 +743 0 +340 1 +449 0 +478 0 +3502 1 +611 0 +16035 52 +742 1 +1020 1 +257 0 +203 0 +7618 0 +10 0 +1149 0 +6179 39 +983 0 +942 0 +316 0 +11325 4 +1081 0 +2366 6 +617 0 +3901 19 +2304 1 +702 1 +129 1 +1088 0 +155 0 +449 0 +309 0 +382 0 +203 3 +3147 15 +3181 1 +166 135 +5367 9 +2604 7 +573 135 +5884 12 +2268 3 +2322 1 +41 0 +2369 568 +846 569 +5339 5 +2114 0 +169 0 +2 0 +4654 2 +749 1 +1195 0 +963 1 +2179 2 +2563 1 +2813 2 +1388 4 +4701 2 +1504 1 +135 0 +1740 1 +117 2 +395 0 +35 0 +932 2 +376 0 +476 1 +724 0 +280 1 +3938 1 +1112 1 +908 0 +6062 83 +4 0 +9 0 +511 0 +773 0 +728 4 +4 0 +3146 3 +14 0 +626 0 +294 0 +2613 0 +1071 1 +304 0 +3492 5 +1228 2 +2648 3 +3711 0 +15075 11004 +7375 11005 +9 0 +674 0 +3504 0 +656 0 +1540 0 +57 0 +4483 56 +66273 27 +56 0 +167 0 +6569 14 +382 1 +546 1 +50 0 +451 0 +182 0 +1066 0 +144 0 +670 0 +1275 1 +7729 1 +1948 1 +110 0 +288 0 +7 0 +702 0 +2186 1 +195 0 +984 0 +2645 5 +736 0 +792 0 +667 1 +1219 4 +179 0 +20 0 +323 0 +575 0 +881 0 +1268 0 +5316 1 +820 1 +392 1 +294 0 +2957 1 +289 0 +2254 0 +1948 1 +847 0 +3444 0 +301 0 +1925 9 +189 0 +431 3 +604 0 +310 0 +740 0 +100 0 +49 0 +800 1 +409 1 +342 1 +133 0 +2473 1 +3007 1 +798 1 +5188 2 +6596 8 +7473 7 +1927 0 +2 0 +2687 25 +1461 1 +510 1 +5057 1 +709 1 +687 0 +2407 1 +440 5 +658 0 +344 0 +3156 2 +1127 0 +5471 34 +1605 0 +2434 0 +20 0 +729 0 +2408 2 +45 0 +934 0 +1906 0 +3050 2 +590 0 +441 0 +2116 0 +3930 4 +33 0 +1866 1 +1159 0 +457 0 +647 0 +34 0 +2924 2 +293 0 +1047 0 +111 0 +4423 7 +997 0 +596 0 +273 0 +5879 3 +2764 0 +2293 2 +2625 1 +115601 227 +5077 0 +208 0 +181 0 +347 0 +196 0 +1090 0 +2342 1 +452 0 +230 0 +1503 0 +51 0 +1391 1 +624 0 +1434 0 +1790 2 +1880 3 +156 0 +1352 1 +68 0 +504 0 +1563 0 +337 0 +2745 2 +1548 1 +294 1 +112 0 +1003 3 +4654 0 +1748 2 +1863 0 +110 0 +1013 0 +1126 2 +1199 0 +3283 2 +2005 1 +680 2 +2370 1 +1316 6 +3667 3 +5863 7 +0 0 +51 0 +409 0 +167 0 +2751 0 +986 0 +1016 0 +76 0 +593 0 +460 0 +837 0 +438 0 +784 0 +174 0 +1047 1 +419 0 +1167 2 +111 0 +1302 0 +1223 15 +1197 0 +3325 2 +8150 4 +8 0 +4075 2 +272 0 +215 0 +17 0 +80 0 +570 0 +15579 76 +10271 3 +5043 1 +176 78 +13 896 +85 2314 +8914 20 +1116 0 +1496 2 +1775 2 +856 0 +77 0 +1894 2 +975 2 +1942 0 +2394 2 +3437 18 +101 16 +875 0 +1013 1 +2366 3 +128 0 +589 0 +1790 0 +980 2 +1226 0 +218 0 +1298 1 +2906 40 +526 1 +1801 0 +3081 1 +350 0 +9820 8 +1311 0 +984 4 +539 0 +2499 3 +1211 1 +2269 0 +2331 1 +980 6 +416 0 +4208 11 +402 2 +1251 1 +527 0 +1098 0 +2010 0 +1115 0 +541 1 +702 2 +24 0 +1582 1 +86 3 +1294 1 +478 0 +376 0 +1142 0 +88 0 +559 0 +180 0 +249 1 +248 0 +3481 0 +1775 0 +246 2 +539 0 +1155 1 +907 2 +457 0 +341 0 +660 0 +252 0 +3780 8 +7874 16 +590 0 +147 0 +365 0 +1485 2 +2842 0 +103 96 +2043 3 +2714 9 +1985 3 +227 1 +625 533 +1534 997 +10414 20 +1694 3 +475 0 +791 0 +345 0 +4350 5 +3349 3 +709 2 +1044 0 +1426 2 +5007 3 +764 2 +4 0 +844 0 +722 0 +7236 4 +1562 1 +2422 6 +2 0 +1382 0 +1569 1 +609 0 +1492 1 +287 0 +4829 2 +398 0 +566 1 +48 1 +2594 3 +662 0 +3657 8 +987 1 +352 4 +1258 0 +292 1 +6825 4 +3230 0 +2661 1 +425 0 +243 0 +20755 16 +717 0 +1340 0 +239 0 +2612 6 +1487 0 +671 4 +2887 12 +3440 1 +8388 1054 +1586 1051 +723 1 +1030 1 +576 1 +1294 1 +594 0 +626 1 +208 0 +626 1 +2257 9 +3498 3 +8470 46 +598 3 +2377 10 +1192 2 +123 0 +832 0 +2094 1 +3873 26 +2044 0 +2130 4 +2916 3 +9756 3 +484 2 +1807 11 +1978 0 +104 0 +1768 3 +1182 3 +2232 11 +2317 10 +545 1 +728 0 +859 0 +713 1 +4263 10 +5 0 +655 1 +326 1 +3507 7 +2064 7 +592 5 +7711 5 +2007 3 +1067 0 +1217 2 +0 13 +6181 36 +2214 0 +920 0 +3452 3 +0 0 +883 0 +1760 0 +13570 3 +266 0 +10336 16 +1982 1 +2695 2 +299 0 +924 0 +9 0 +1203 2 +493 0 +527 0 +63 0 +670 1 +2754 9 +533 0 +146 0 +4294 4 +596 5 +1758 3 +281 0 +416 0 +637 0 +128 0 +2617 1 +1806 5 +1215 1 +388 1 +448 0 +0 0 +273 0 +1957 3 +2047 0 +0 0 +702 1 +2297 4 +9616 3 +3496 2 +649 1 +1061 0 +805 0 +69 0 +157 0 +1189 2 +323 0 +5152 5 +2079 1 +2270 2 +2420 2 +669 0 +11 0 +1087 1 +463 1 +558 0 +1400 1 +729 0 +858 1 +1429 4 +1987 1 +1348 0 +2223 0 +555 0 +465 1 +238 0 +522 0 +539 0 +367 0 +2597 1 +1026 1 +881 2 +58 1 +437 2 +2759 4 +5383 3 +252 0 +10692 21 +832 0 +632 1 +2118 0 +753 0 +1138 0 +145 1 +767 2 +557 1 +331 0 +669 2 +344 0 +1057 0 +739 0 +1422 1 +446 1 +176 0 +2661 1 +268 0 +544 0 +706 0 +578 1 +848 1 +698 0 +7 1394 +1402 1 +10483 2 +865 0 +25 0 +141 1395 +900 2 +624 0 +4 0 +462 0 +8 0 +207 0 +2493 4 +361 0 +2538 4 +220 0 +4129 4 +13 0 +312 1 +357 0 +123 0 +1 0 +11 0 +608 0 +936 1 +757 0 +384 0 +703 1 +1078 1 +672 2 +559 1 +471 1 +809 0 +3709 4 +24682 92 +1048 1 +378 0 +24744 3 +2000 2 +3550 2 +8235 4 +48 0 +604 1 +340 0 +238 0 +1118 2 +84 1 +104 0 +486 1 +47 0 +486 28 +280 27 +483 1 +5580 6 +414 0 +418 0 +1163 1 +2040 28 +169 2 +838 4 +5130 15 +695 3 +16309 4 +663 0 +1985 1 +842 0 +6482 4 +388 1 +810 0 +140 0 +515 2 +6480 0 +637 1 +6148 3 +2158 1 +1525 4 +1858 2 +118 28 +14 28 +28 0 +1433 1 +1113 0 +1537 0 +27610 92 +674 0 +996 1 +470 0 +5 0 +1060 2 +660 57251 +329 0 +333 0 +226 0 +3584 0 +899 2 +1161 0 +255 0 +310 0 +1470 1 +3 0 +1129 0 +2594 1 +919 0 +301 0 +627 0 +68 0 +1102 0 +1 0 +341 0 +2281 802 +1742 0 +1574 3 +7223 59 +5176 27 +1582 0 +1450 3 +2353 0 +1357 0 +31 0 +1062 0 +0 0 +1 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +1 0 +2 0 +0 0 +9425 3 +27 0 +3 4 +0 4 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +698 1 +0 0 +1 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +1 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/aux_info/meta_info.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/aux_info/meta_info.json new file mode 100644 index 0000000000000000000000000000000000000000..af2ac73da956f240e60063046ac8f9773e0ca84e --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/aux_info/meta_info.json @@ -0,0 +1,50 @@ +{ + "salmon_version": "1.7.0", + "samp_type": "none", + "opt_type": "vb", + "quant_errors": [], + "num_libraries": 1, + "library_types": [ + "ISR" + ], + "frag_dist_length": 1001, + "frag_length_mean": 210.92571878829356, + "frag_length_sd": 16.63757852879853, + "seq_bias_correct": false, + "gc_bias_correct": false, + "num_bias_bins": 4096, + "mapping_type": "mapping", + "keep_duplicates": false, + "num_valid_targets": 5923, + "num_decoy_targets": 0, + "num_eq_classes": 11749, + "serialized_eq_classes": false, + "eq_class_properties": [ + "range_factorized", + "gzipped" + ], + "length_classes": [ + 669, + 1053, + 1479, + 2127, + 11412 + ], + "index_seq_hash": "521c4fd92100146ddba5122d99aa6494e7f6268f86c12cc107ce982f8cbdcfad", + "index_name_hash": "3bfae595a879cf68fb015e83d3b3b179b6626adfd02895a1aebcab510ac5cdd3", + "index_seq_hash512": "e4f0142d60affb6e0106a2ea42b62606cedd8d1ade45824ba8ea654fee0219acb88a2cd6bf49d22846a30d4ef3f8e82b7268cafcb57342780a56c1c5e358c812", + "index_name_hash512": "d8a1571371444ed2da49dab9e659625dd5be7f9394d0154cf01325199d053cc4077abbe5ca9f395476c8181935c169907a2c8d5a6184eb7795eb450517a1b2b3", + "index_decoy_seq_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "index_decoy_name_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "num_bootstraps": 0, + "num_processed": 13675957, + "num_mapped": 10676552, + "num_decoy_fragments": 0, + "num_dovetail_fragments": 39581, + "num_fragments_filtered_vm": 1727525, + "num_alignments_below_threshold_for_mapped_fragments_vm": 2098301, + "percent_mapped": 78.0680430627268, + "call": "quant", + "start_time": "Mon May 18 16:09:39 2026", + "end_time": "Mon May 18 16:10:15 2026" +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/cmd_info.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/cmd_info.json new file mode 100644 index 0000000000000000000000000000000000000000..08bb0bb24018d125df5aa3667db3195237ae1abb --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/cmd_info.json @@ -0,0 +1,10 @@ +{ + "salmon_version": "1.7.0", + "index": "salmon_index", + "libType": "A", + "mates1": "/225040511/project/bioagent-bench/dataset/deseq/data/SRR1278972_1.fastq", + "mates2": "/225040511/project/bioagent-bench/dataset/deseq/data/SRR1278972_2.fastq", + "output": "quant_SRR1278972", + "validateMappings": [], + "auxDir": "aux_info" +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/libParams/flenDist.txt b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/libParams/flenDist.txt new file mode 100644 index 0000000000000000000000000000000000000000..e98602516d48e23b105bc84122d092bef1abee7a --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/libParams/flenDist.txt @@ -0,0 +1,2 @@ +2.32977e-42 3.47264e-42 5.16787e-42 7.67837e-42 1.13902e-41 1.68694e-41 2.49444e-41 3.68256e-41 5.42788e-41 7.98766e-41 1.17358e-40 1.72152e-40 2.52125e-40 3.68661e-40 5.38198e-40 7.84444e-40 1.14153e-39 1.65851e-39 2.40576e-39 3.48413e-39 5.03779e-39 7.27263e-39 1.04821e-38 1.50837e-38 2.16708e-38 3.10847e-38 4.45169e-38 6.36513e-38 9.08644e-38 1.29505e-37 1.84283e-37 2.61812e-37 3.71362e-37 5.25911e-37 7.43586e-37 1.04968e-36 1.4794e-36 2.08171e-36 2.92456e-36 4.1021e-36 5.74457e-36 8.0318e-36 1.12118e-35 1.56257e-35 2.17426e-35 3.02057e-35 4.18959e-35 5.80174e-35 8.02141e-35 1.10726e-34 1.52599e-34 2.09971e-34 2.88452e-34 3.95633e-34 5.41772e-34 7.40705e-34 1.01107e-33 1.37791e-33 1.87484e-33 2.54692e-33 3.45438e-33 4.67768e-33 6.32406e-33 8.53625e-33 1.15039e-32 1.54784e-32 2.07927e-32 2.78871e-32 3.73423e-32 4.99233e-32 6.66362e-32 8.88021e-32 1.18152e-31 1.56951e-31 1.07453e-07 4.33898e-07 6.6106e-07 4.67046e-07 3.27217e-07 7.28798e-07 1.17404e-06 1.15401e-06 9.80753e-07 1.07861e-06 1.75121e-06 2.70048e-06 2.81315e-06 2.30307e-06 7.92285e-06 3.04111e-05 6.3579e-05 8.45756e-05 8.77802e-05 8.68052e-05 8.66101e-05 8.41985e-05 8.29175e-05 8.51463e-05 8.42276e-05 7.7468e-05 7.13784e-05 6.96465e-05 7.2624e-05 7.79342e-05 7.7582e-05 7.01678e-05 6.54219e-05 6.84581e-05 7.16594e-05 6.79884e-05 6.27883e-05 6.27818e-05 6.47499e-05 6.40597e-05 6.06414e-05 5.63471e-05 5.42586e-05 5.41405e-05 5.38459e-05 5.51382e-05 5.8295e-05 5.88108e-05 5.62294e-05 5.71978e-05 6.19957e-05 6.34065e-05 6.16751e-05 6.22765e-05 6.70115e-05 7.1005e-05 6.72318e-05 5.95191e-05 5.62733e-05 5.7784e-05 6.10215e-05 6.326e-05 6.48926e-05 7.052e-05 7.86764e-05 8.15022e-05 7.59386e-05 6.60934e-05 6.03935e-05 6.35711e-05 7.01888e-05 7.52924e-05 8.0289e-05 8.51266e-05 8.8308e-05 9.1195e-05 9.55968e-05 9.9615e-05 0.000100251 9.87111e-05 0.000100875 0.000110852 0.000122352 0.000128667 0.000136212 0.000148641 0.000158124 0.000163625 0.00016943 0.000173684 0.000177701 0.000189414 0.000210222 0.000228486 0.000236469 0.000246665 0.000275482 0.000321716 0.000371678 0.000421451 0.000482309 0.00055726 0.000638975 0.000731331 0.000837441 0.000945261 0.00106302 0.00122473 0.00144542 0.00172851 0.00208719 0.00252528 0.00304066 0.00365554 0.00439718 0.0052731 0.00629127 0.0074723 0.00884969 0.0104425 0.0122692 0.0143172 0.0164313 0.0184204 0.0202108 0.021854 0.0234827 0.0250993 0.0265025 0.0275988 0.0285057 0.0292563 0.0297505 0.0300064 0.0301438 0.0302008 0.0301621 0.0300375 0.0298297 0.029535 0.0292114 0.0289081 0.0284857 0.0277683 0.0268401 0.0258758 0.0249285 0.0240094 0.023002 0.0217259 0.0202912 0.0188716 0.0173433 0.0156704 0.0140673 0.012563 0.011042 0.00953905 0.00813049 0.0068419 0.00569808 0.0046924 0.00378275 0.00297367 0.0023078 0.0017779 0.00136013 0.00103735 0.000773554 0.000560872 0.000412849 0.000314968 0.00024128 0.000183022 0.000139843 0.000104016 7.22266e-05 5.21128e-05 4.46253e-05 4.29032e-05 4.22668e-05 3.84383e-05 3.31264e-05 3.44444e-05 4.02791e-05 4.04549e-05 3.40777e-05 3.00802e-05 3.44872e-05 4.06369e-05 3.96613e-05 3.63205e-05 3.53287e-05 3.05401e-05 2.22323e-05 1.86655e-05 2.12942e-05 2.65894e-05 3.12394e-05 3.178e-05 2.83736e-05 2.40306e-05 2.04876e-05 1.82877e-05 1.73821e-05 1.78298e-05 1.92288e-05 2.09698e-05 2.1477e-05 2.034e-05 2.36712e-05 3.21793e-05 3.40876e-05 2.56208e-05 1.66679e-05 1.17628e-05 7.84997e-06 4.74017e-06 3.10824e-06 1.94114e-06 1.34066e-06 1.52865e-06 2.05206e-06 2.97764e-06 3.76275e-06 3.39937e-06 2.41581e-06 2.04272e-06 2.69989e-06 3.62006e-06 3.80249e-06 3.41074e-06 3.11225e-06 3.11459e-06 2.9403e-06 2.83986e-06 4.33165e-06 6.21165e-06 5.60436e-06 3.40216e-06 2.02657e-06 1.95545e-06 2.38288e-06 2.61815e-06 3.05401e-06 3.96914e-06 4.94209e-06 5.48234e-06 5.34472e-06 5.04196e-06 5.31718e-06 6.09858e-06 6.34279e-06 5.63311e-06 5.90687e-06 9.05352e-06 1.30456e-05 1.44236e-05 1.36674e-05 1.29972e-05 1.184e-05 9.84e-06 9.45809e-06 1.14632e-05 1.4183e-05 1.73147e-05 2.03439e-05 2.26912e-05 2.479e-05 2.50661e-05 2.35755e-05 2.32477e-05 2.32235e-05 2.2613e-05 2.46494e-05 2.80924e-05 2.8389e-05 2.64315e-05 2.49324e-05 2.32679e-05 1.99774e-05 1.66856e-05 1.55378e-05 1.55193e-05 1.56429e-05 1.48355e-05 1.17434e-05 8.59008e-06 7.69544e-06 7.99637e-06 7.91983e-06 7.1363e-06 6.05834e-06 5.15081e-06 4.9641e-06 5.30883e-06 5.0006e-06 3.81548e-06 2.59655e-06 1.82895e-06 1.61731e-06 1.75621e-06 1.78627e-06 1.50939e-06 1.01839e-06 8.56571e-07 1.4566e-06 1.87504e-06 1.21028e-06 3.23113e-07 4.58124e-08 6.58065e-08 2.00169e-07 5.64766e-07 7.93856e-07 6.49163e-07 6.46147e-07 8.47061e-07 8.43189e-07 7.66722e-07 6.78582e-07 6.06187e-07 9.61773e-07 1.50691e-06 1.43134e-06 7.92509e-07 3.09505e-07 2.01395e-07 2.88016e-07 4.64166e-07 6.29658e-07 9.88288e-07 2.01276e-06 3.01649e-06 2.67167e-06 1.38538e-06 4.7589e-07 4.50636e-07 1.15761e-06 1.64666e-06 1.24575e-06 9.81724e-07 2.26956e-06 4.80723e-06 6.33936e-06 5.63526e-06 4.0911e-06 3.05816e-06 2.6408e-06 2.60417e-06 3.19491e-06 4.54809e-06 5.59985e-06 5.88746e-06 5.78091e-06 5.31885e-06 5.251e-06 6.41313e-06 8.54543e-06 1.03639e-05 1.05104e-05 8.92925e-06 6.49127e-06 4.7953e-06 4.92595e-06 5.29004e-06 4.8072e-06 4.87613e-06 5.6767e-06 6.61909e-06 7.47842e-06 6.84839e-06 4.79786e-06 3.28504e-06 2.85862e-06 3.16092e-06 3.40738e-06 2.92666e-06 2.70504e-06 3.09767e-06 3.07301e-06 2.7112e-06 2.53817e-06 2.26797e-06 1.76353e-06 1.28135e-06 1.14038e-06 1.43936e-06 1.55463e-06 1.09568e-06 7.80734e-07 1.3261e-06 2.38485e-06 2.85808e-06 2.49481e-06 2.05753e-06 1.57483e-06 8.26757e-07 3.85047e-07 5.80301e-07 9.75894e-07 1.05837e-06 9.2734e-07 9.41006e-07 8.75567e-07 6.35273e-07 7.46824e-07 1.05756e-06 9.1645e-07 5.7627e-07 5.98724e-07 7.52757e-07 7.62739e-07 9.8713e-07 1.23093e-06 1.01651e-06 8.72755e-07 9.2911e-07 6.10344e-07 1.68882e-07 2.46207e-08 3.61975e-08 7.84939e-08 1.39477e-07 1.9829e-07 2.77056e-07 4.00011e-07 6.24809e-07 1.06552e-06 1.39861e-06 1.14862e-06 7.04217e-07 5.75694e-07 6.17971e-07 8.42153e-07 1.39191e-06 1.63514e-06 1.01687e-06 2.51287e-07 4.38144e-08 1.72438e-07 2.57258e-07 1.71063e-07 4.27379e-08 2.08133e-10 6.94387e-10 1.93075e-09 4.31511e-09 1.49062e-07 5.77389e-07 8.61538e-07 6.28542e-07 4.00923e-07 4.82049e-07 4.63238e-07 4.52862e-07 8.76278e-07 1.20149e-06 8.28242e-07 2.80794e-07 1.05106e-07 1.83709e-07 2.49919e-07 1.66038e-07 4.14661e-08 3.37967e-08 2.56219e-07 6.86909e-07 8.6138e-07 5.18799e-07 1.24523e-07 6.04672e-09 6.72758e-09 5.72492e-09 1.09084e-08 3.17852e-08 4.72415e-08 3.26816e-08 1.94687e-08 4.146e-08 6.13925e-08 4.08783e-08 2.87127e-08 7.39821e-08 1.47901e-07 2.21645e-07 2.51907e-07 1.95439e-07 1.47803e-07 2.17376e-07 2.98465e-07 2.3397e-07 9.10534e-08 1.40045e-08 1.55375e-09 4.244e-09 1.31772e-08 1.93859e-08 1.29239e-08 7.66787e-08 2.93791e-07 4.40687e-07 2.93791e-07 7.34478e-08 3.88517e-15 1.19537e-08 4.81155e-08 7.29247e-08 4.96184e-08 1.3156e-08 3.01974e-10 2.6415e-11 9.16822e-11 1.30534e-10 8.46932e-11 4.80026e-11 1.32321e-08 5.26671e-08 7.89519e-08 5.28423e-08 1.36076e-08 1.53557e-09 5.38623e-09 9.52081e-09 8.6034e-09 4.02687e-09 2.42024e-09 5.58569e-09 7.77853e-09 4.99442e-09 5.19773e-08 2.03035e-07 3.0464e-07 2.03362e-07 1.7449e-07 4.93346e-07 7.40195e-07 4.95283e-07 1.26653e-07 2.11303e-08 7.58587e-08 1.12942e-07 1.59285e-07 3.54181e-07 5.02657e-07 3.35017e-07 8.37738e-08 5.50547e-11 1.57922e-10 2.36089e-10 1.57128e-10 1.65583e-07 7.84315e-07 1.48223e-06 1.40339e-06 8.95186e-07 1.01084e-06 1.29727e-06 8.60682e-07 2.43173e-07 3.29349e-07 1.22834e-06 2.00811e-06 1.69533e-06 8.98903e-07 5.23426e-07 5.82599e-07 1.00346e-06 1.52346e-06 1.73842e-06 1.67627e-06 1.7627e-06 2.07833e-06 2.12889e-06 2.19676e-06 2.77436e-06 3.24588e-06 3.28835e-06 3.03595e-06 2.24184e-06 1.33202e-06 1.1532e-06 1.35284e-06 1.20965e-06 8.92776e-07 7.02284e-07 6.85706e-07 6.81863e-07 4.46056e-07 1.59659e-07 4.36341e-08 2.80463e-08 4.97817e-08 6.55968e-08 6.24846e-08 9.53803e-08 1.34487e-07 1.09796e-07 6.02545e-08 3.6806e-08 2.61959e-08 1.68772e-08 1.62442e-08 1.92399e-08 1.28266e-08 3.20665e-09 2.81977e-29 2.81977e-29 1.2457e-07 5.09278e-07 7.94106e-07 5.75048e-07 1.89298e-07 4.01459e-08 3.05401e-08 1.89879e-08 5.18559e-09 6.2482e-09 2.34842e-08 3.56971e-08 1.56894e-07 5.33505e-07 8.23698e-07 6.72158e-07 5.13124e-07 7.53456e-07 9.21677e-07 5.99067e-07 1.87561e-07 4.37464e-08 2.25776e-08 1.15935e-07 4.67865e-07 7.71467e-07 8.02815e-07 9.97399e-07 1.19074e-06 7.80946e-07 2.04502e-07 1.07841e-08 1.53978e-08 9.11072e-08 2.97964e-07 4.36404e-07 3.03524e-07 1.92015e-07 4.05495e-07 6.21328e-07 4.9952e-07 2.53469e-07 1.15128e-07 5.14079e-08 1.85528e-07 6.73871e-07 1.00788e-06 6.89286e-07 2.20437e-07 7.17663e-08 4.66847e-08 1.17458e-08 2.32693e-08 2.59535e-07 8.0694e-07 1.11682e-06 7.79775e-07 3.02817e-07 9.52504e-08 3.13951e-08 3.40497e-08 2.8959e-07 9.11414e-07 1.45849e-06 1.59197e-06 1.39039e-06 8.65108e-07 4.44361e-07 5.73171e-07 7.80316e-07 6.01265e-07 3.87289e-07 4.6293e-07 7.74443e-07 1.31817e-06 1.59948e-06 1.0646e-06 3.34969e-07 6.82648e-08 3.41734e-08 1.56147e-08 3.47595e-08 6.32055e-08 8.20252e-08 2.82141e-07 7.94365e-07 1.0911e-06 9.15591e-07 9.82066e-07 1.2871e-06 1.11621e-06 6.37101e-07 2.95761e-07 1.1376e-07 3.57988e-08 1.01951e-08 1.54662e-09 1.71198e-08 6.5357e-08 9.75429e-08 6.51675e-08 1.70589e-08 1.22727e-09 8.18183e-10 4.78811e-09 2.43954e-08 5.2937e-08 7.11728e-08 8.28044e-08 8.10703e-08 4.8021e-08 1.17075e-08 2.81977e-29 2.81977e-29 2.81977e-29 2.81977e-29 2.81977e-29 2.81977e-29 2.81977e-29 2.81977e-29 2.81977e-29 9.62443e-08 4.0061e-07 6.40014e-07 4.78844e-07 1.58881e-07 1.57035e-08 1.77308e-11 9.01726e-08 3.6069e-07 5.41035e-07 3.6069e-07 2.93475e-07 8.13213e-07 1.21982e-06 8.13227e-07 2.03429e-07 4.69308e-10 2.26968e-08 1.50569e-07 3.80667e-07 4.65562e-07 2.96265e-07 1.97114e-07 3.76217e-07 5.07437e-07 3.63131e-07 2.99014e-07 6.05149e-07 1.07742e-06 1.33223e-06 1.09525e-06 5.56506e-07 2.20481e-07 1.78811e-07 2.12152e-07 2.81367e-07 3.70008e-07 4.24477e-07 4.94098e-07 4.97158e-07 3.04375e-07 8.39394e-08 5.35493e-09 6.27011e-10 6.31137e-09 1.19602e-07 4.16017e-07 5.93349e-07 4.20894e-07 2.34337e-07 2.074e-07 1.40648e-07 4.65847e-08 1.816e-07 8.65801e-07 1.78553e-06 1.85789e-06 9.66667e-07 2.00878e-07 2.77731e-13 8.62093e-08 3.51326e-07 5.43212e-07 5.22486e-07 6.6702e-07 8.3877e-07 5.54854e-07 2.03093e-07 2.57519e-07 3.86279e-07 2.72993e-07 1.26273e-07 1.01025e-07 9.46363e-08 6.46288e-08 3.29061e-08 8.43007e-09 5.23525e-10 1.33135e-08 4.94841e-08 7.24228e-08 4.76807e-08 1.183e-08 2.81977e-29 2.81977e-29 3.24321e-13 4.81943e-12 1.61371e-11 2.28404e-11 2.45553e-11 4.20403e-11 1.86459e-08 7.43925e-08 1.11541e-07 7.43544e-08 2.57132e-08 2.84984e-08 4.27476e-08 2.84984e-08 7.1246e-09 2.81977e-29 2.81977e-29 2.81977e-29 6.89584e-12 2.75977e-11 4.14322e-11 1.73245e-10 5.89256e-10 8.73469e-10 1.10026e-07 4.37922e-07 6.56664e-07 4.37776e-07 1.09444e-07 2.40154e-10 9.60615e-10 1.44092e-09 9.60615e-10 2.40154e-10 2.81977e-29 1.24942e-09 4.99768e-09 7.49652e-09 5.06754e-09 1.52887e-09 4.19183e-10 2.79455e-10 6.98638e-11 1.24432e-15 4.97726e-15 7.51063e-11 3.00404e-10 4.5061e-10 3.00419e-10 7.51143e-11 3.86664e-15 2.81977e-29 1.53886e-09 6.15545e-09 1.07677e-07 4.26341e-07 6.97843e-07 5.52237e-07 2.04085e-07 1.57777e-07 5.37295e-07 9.04942e-07 8.74139e-07 6.04028e-07 3.31412e-07 1.49882e-07 7.8988e-08 3.16025e-07 1.11432e-06 1.66716e-06 1.12459e-06 2.91475e-07 4.13083e-09 9.57519e-14 7.62916e-08 4.07007e-07 8.65112e-07 1.10718e-06 1.24752e-06 1.2477e-06 7.64184e-07 1.916e-07 6.29625e-10 3.65666e-09 1.34336e-08 1.38505e-07 4.89058e-07 7.27091e-07 5.07113e-07 1.5898e-07 7.71173e-08 2.18469e-07 3.19459e-07 2.12973e-07 5.32432e-08 1.81296e-07 7.25185e-07 1.08778e-06 7.25185e-07 1.82353e-07 4.22622e-09 6.49084e-09 2.86184e-08 2.63564e-07 8.90548e-07 1.56054e-06 1.75998e-06 1.45666e-06 9.38023e-07 4.88506e-07 2.01081e-07 4.56699e-08 2.81977e-29 + diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/lib_format_counts.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/lib_format_counts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f4c8cf2fe075138eba51aaed335bf1e0e27fbb7 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/lib_format_counts.json @@ -0,0 +1,22 @@ +{ + "read_files": "[ /225040511/project/bioagent-bench/dataset/deseq/data/SRR1278972_1.fastq, /225040511/project/bioagent-bench/dataset/deseq/data/SRR1278972_2.fastq]", + "expected_format": "ISR", + "compatible_fragment_ratio": 1.0, + "num_compatible_fragments": 10676552, + "num_assigned_fragments": 10676552, + "num_frags_with_concordant_consistent_mappings": 9672162, + "num_frags_with_inconsistent_or_orphan_mappings": 1012257, + "strand_mapping_bias": 0.00011371551809513688, + "MSF": 0, + "OSF": 0, + "ISF": 1100, + "MSR": 0, + "OSR": 0, + "ISR": 9672162, + "SF": 379098, + "SR": 632059, + "MU": 0, + "OU": 0, + "IU": 0, + "U": 0 +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/logs/salmon_quant.log b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/logs/salmon_quant.log new file mode 100644 index 0000000000000000000000000000000000000000..787429fc278762e4199bdc1e22b321ca70734e09 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/logs/salmon_quant.log @@ -0,0 +1,139 @@ +[2026-05-18 16:09:39.599] [jointLog] [info] setting maxHashResizeThreads to 104 +[2026-05-18 16:09:39.599] [jointLog] [info] Fragment incompatibility prior below threshold. Incompatible fragments will be ignored. +[2026-05-18 16:09:39.599] [jointLog] [info] Usage of --validateMappings implies use of minScoreFraction. Since not explicitly specified, it is being set to 0.65 +[2026-05-18 16:09:39.599] [jointLog] [info] Setting consensusSlack to selective-alignment default of 0.35. +[2026-05-18 16:09:39.599] [jointLog] [info] parsing read library format +[2026-05-18 16:09:39.599] [jointLog] [info] There is 1 library. +[2026-05-18 16:09:39.599] [jointLog] [info] Loading pufferfish index +[2026-05-18 16:09:39.599] [jointLog] [info] Loading dense pufferfish index. +[2026-05-18 16:09:39.638] [jointLog] [info] done +[2026-05-18 16:09:39.719] [jointLog] [info] Index contained 5923 targets +[2026-05-18 16:09:39.721] [jointLog] [info] Number of decoys : 0 +[2026-05-18 16:09:40.299] [jointLog] [info] Automatically detected most likely library type as ISR + +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.26% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.14% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.26% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.10% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.06% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.12% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.26% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.34% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.36% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.16% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.38% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.26% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.36% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.44% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.26% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.38% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.14% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.44% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.48% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.42% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.36% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.14% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.26% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.06% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.16% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.52% zero probability fragments +[2026-05-18 16:10:13.984] [jointLog] [info] Thread saw mini-batch with a maximum of 2.36% zero probability fragments +[2026-05-18 16:10:13.985] [jointLog] [info] Thread saw mini-batch with a maximum of 2.34% zero probability fragments +[2026-05-18 16:10:13.985] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:13.985] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.985] [jointLog] [info] Thread saw mini-batch with a maximum of 2.36% zero probability fragments +[2026-05-18 16:10:13.986] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:13.987] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:13.990] [jointLog] [info] Thread saw mini-batch with a maximum of 2.34% zero probability fragments +[2026-05-18 16:10:13.990] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.990] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.991] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:13.991] [jointLog] [info] Thread saw mini-batch with a maximum of 2.38% zero probability fragments +[2026-05-18 16:10:13.991] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:13.991] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:13.991] [jointLog] [info] Thread saw mini-batch with a maximum of 2.34% zero probability fragments +[2026-05-18 16:10:13.991] [jointLog] [info] Thread saw mini-batch with a maximum of 2.08% zero probability fragments +[2026-05-18 16:10:13.996] [jointLog] [info] Thread saw mini-batch with a maximum of 2.44% zero probability fragments +[2026-05-18 16:10:13.997] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:14.002] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:14.005] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:14.006] [jointLog] [info] Thread saw mini-batch with a maximum of 2.40% zero probability fragments +[2026-05-18 16:10:14.008] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:14.009] [jointLog] [info] Thread saw mini-batch with a maximum of 2.40% zero probability fragments +[2026-05-18 16:10:14.016] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:14.033] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:14.035] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:14.036] [jointLog] [info] Thread saw mini-batch with a maximum of 2.20% zero probability fragments +[2026-05-18 16:10:14.040] [jointLog] [info] Thread saw mini-batch with a maximum of 2.70% zero probability fragments +[2026-05-18 16:10:14.041] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:14.043] [jointLog] [info] Thread saw mini-batch with a maximum of 2.12% zero probability fragments +[2026-05-18 16:10:14.044] [jointLog] [info] Thread saw mini-batch with a maximum of 2.22% zero probability fragments +[2026-05-18 16:10:14.045] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:14.047] [jointLog] [info] Thread saw mini-batch with a maximum of 2.24% zero probability fragments +[2026-05-18 16:10:14.052] [jointLog] [info] Thread saw mini-batch with a maximum of 2.30% zero probability fragments +[2026-05-18 16:10:14.053] [jointLog] [info] Thread saw mini-batch with a maximum of 2.28% zero probability fragments +[2026-05-18 16:10:14.054] [jointLog] [info] Thread saw mini-batch with a maximum of 2.32% zero probability fragments +[2026-05-18 16:10:14.786] [fileLog] [info] +At end of round 0 +================== +Observed 13675957 total fragments (13675957 in most recent round) + +[2026-05-18 16:10:14.786] [jointLog] [info] Computed 11749 rich equivalence classes for further processing +[2026-05-18 16:10:14.786] [jointLog] [info] Counted 10676552 total reads in the equivalence classes +[2026-05-18 16:10:14.951] [jointLog] [info] Number of mappings discarded because of alignment score : 2098301 +[2026-05-18 16:10:14.951] [jointLog] [info] Number of fragments entirely discarded because of alignment score : 1727525 +[2026-05-18 16:10:14.951] [jointLog] [info] Number of fragments discarded because they are best-mapped to decoys : 0 +[2026-05-18 16:10:14.951] [jointLog] [info] Number of fragments discarded because they have only dovetail (discordant) mappings to valid targets : 39581 +[2026-05-18 16:10:14.951] [jointLog] [info] Mapping rate = 78.068% + +[2026-05-18 16:10:14.951] [jointLog] [info] finished quantifyLibrary() +[2026-05-18 16:10:14.952] [jointLog] [info] Starting optimizer +[2026-05-18 16:10:14.956] [jointLog] [info] Marked 0 weighted equivalence classes as degenerate +[2026-05-18 16:10:14.957] [jointLog] [info] iteration = 0 | max rel diff. = 1416.87 +[2026-05-18 16:10:15.051] [jointLog] [info] iteration = 100 | max rel diff. = 0.0457973 +[2026-05-18 16:10:15.147] [jointLog] [info] iteration = 154 | max rel diff. = 0.00265429 +[2026-05-18 16:10:15.148] [jointLog] [info] Finished optimizer +[2026-05-18 16:10:15.148] [jointLog] [info] writing output + diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/quant.sf b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/quant.sf new file mode 100644 index 0000000000000000000000000000000000000000..5e4b99c361da1c6516ef36022d33940d1e65558a --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278972/quant.sf @@ -0,0 +1,5924 @@ +Name Length EffectiveLength TPM NumReads +CPAR2_600010-T 2208 1997.075 66.576337 2112.778 +CPAR2_600020-T 2919 2708.075 44.512317 1915.492 +CPAR2_600030-T 2451 2240.075 23.794760 847.000 +CPAR2_600040-T 1473 1262.075 106.157561 2129.000 +CPAR2_600050-T 1002 791.075 45.258128 568.924 +CPAR2_600060-T 1143 932.075 73.528326 1089.043 +CPAR2_600070-T 1902 1691.075 105.025573 2822.263 +CPAR2_600080-T 2745 2534.075 43.409298 1748.001 +CPAR2_600090-T 2028 1817.075 42.390548 1224.000 +CPAR2_600100-T 1824 1613.075 146.659487 3759.276 +CPAR2_600110-T 2442 2231.075 72.903169 2584.640 +CPAR2_600120-T 1011 800.075 37.440067 476.000 +CPAR2_600130-T 2184 1973.075 24.909667 781.000 +CPAR2_600140-T 1224 1013.075 62.428783 1005.000 +CPAR2_600150-T 780 569.119 57.499062 520.000 +CPAR2_600160-T 780 569.119 56.614461 512.000 +CPAR2_600170-T 3054 2843.075 142.680109 6446.014 +CPAR2_600180-T 1083 872.075 76.864004 1065.164 +CPAR2_600190-T 2070 1859.075 80.326954 2373.000 +CPAR2_600200-T 2343 2132.075 66.341942 2247.658 +CPAR2_600210-T 345 134.296 88.564153 189.000 +CPAR2_600220-T 2712 2501.075 39.553628 1572.000 +CPAR2_600230-T 1026 815.075 42.155616 546.000 +CPAR2_600240-T 1428 1217.075 52.762154 1020.421 +CPAR2_600250-T 1050 839.075 138.449469 1846.000 +CPAR2_600260-T 2010 1799.075 222.751628 6368.097 +CPAR2_600270-T 888 677.099 75.320967 810.416 +CPAR2_600280-T 825 614.114 48.777392 476.000 +CPAR2_600290-T 1725 1514.075 0.789708 19.000 +CPAR2_600300-T 2082 1871.075 40.729907 1211.000 +CPAR2_600310-T 321 110.336 869.786723 1525.000 +CPAR2_600320-T 1548 1337.075 115.466627 2453.306 +CPAR2_600330-T 678 467.143 277.509597 2060.000 +CPAR2_600340-T 5877 5666.075 32.267309 2905.257 +CPAR2_600350-T 702 491.139 27.163877 212.000 +CPAR2_600360-T 1887 1676.075 81.571995 2172.571 +CPAR2_600370-T 252 41.408 1080.519812 710.977 +CPAR2_600380-T 765 554.123 10.107508 89.000 +CPAR2_600390-T 1251 1040.075 0.605056 10.000 +CPAR2_600400-T 1152 941.075 85.728295 1282.000 +CPAR2_600410-T 2154 1943.075 36.435488 1125.003 +CPAR2_600420-T 171 31.759 124.809756 62.988 +CPAR2_600430-T 4290 4079.075 1.409468 91.360 +CPAR2_600440-T 3477 3266.075 16.369631 849.580 +CPAR2_600450-T 1704 1493.075 14.414678 342.000 +CPAR2_600460-T 1704 1493.075 1511.131955 35852.840 +CPAR2_600470-T 1815 1604.075 69.583125 1773.651 +CPAR2_600480-T 1413 1202.075 182.516166 3486.362 +CPAR2_600490-T 1023 812.075 518.246869 6687.633 +CPAR2_600500-T 3009 2798.075 33.106171 1472.000 +CPAR2_600510-T 1899 1688.075 32.954975 884.000 +CPAR2_600520-T 1407 1196.075 38.566124 733.000 +CPAR2_600530-T 2049 1838.075 134.848866 3938.674 +CPAR2_600540-T 1878 1667.075 13.891628 368.000 +CPAR2_600560-T 714 503.137 186.113327 1488.000 +CPAR2_600570-T 1908 1697.075 58.379866 1574.359 +CPAR2_600580-T 1443 1232.075 101.438433 1986.000 +CPAR2_600590-T 465 254.184 27.233597 110.000 +CPAR2_600600-T 561 350.169 124.182972 691.002 +CPAR2_600610-T 1956 1745.075 284.177637 7880.314 +CPAR2_600620-T 3741 3530.075 60.366968 3386.279 +CPAR2_600630-T 2757 2546.075 20.910271 846.000 +CPAR2_600640-T 1359 1148.075 0.109628 2.000 +CPAR2_600650-T 3189 2978.075 48.433130 2292.016 +CPAR2_600660-T 1365 1154.075 459.049913 8418.477 +CPAR2_600670-T 2742 2531.075 48.607383 1955.000 +CPAR2_600680-T 1152 941.075 39.788093 595.000 +CPAR2_600690-T 1752 1541.075 12.577299 308.000 +CPAR2_600710-T 1197 986.075 14.600079 228.773 +CPAR2_600730-T 4260 4049.075 8.703722 560.016 +CPAR2_600740-T 1836 1625.075 100.176783 2586.902 +CPAR2_600750-T 4506 4295.075 186.518909 12730.138 +CPAR2_600760-T 1824 1613.075 221.251060 5671.259 +CPAR2_600770-T 915 704.098 56.575863 633.000 +CPAR2_600780-T 870 659.100 47.071267 493.000 +CPAR2_600790-T 267 56.381 6289.986955 5635.322 +CPAR2_600800-T 951 740.094 63.772710 750.000 +CPAR2_600810-T 1944 1733.075 25.781101 710.000 +CPAR2_600820-T 4632 4421.075 36.730310 2580.429 +CPAR2_600830-T 2097 1886.075 68.399905 2050.001 +CPAR2_600840-T 1536 1325.075 17.097101 360.000 +CPAR2_600850-T 1947 1736.075 46.507034 1283.000 +CPAR2_600860-T 507 296.175 184.642898 869.000 +CPAR2_600870-T 1581 1370.075 1076.808222 23443.490 +CPAR2_tA(UGC)1-T 73 73.000 0.000000 0.000 +CPAR2_600880-T 2523 2312.075 33.968249 1248.000 +CPAR2_600890-T 612 401.167 85.963880 548.000 +CPAR2_600900-T 1128 917.075 124.216983 1810.195 +CPAR2_600910-T 972 761.086 0.000000 0.000 +CPAR2_600920-T 2094 1883.075 0.788938 23.607 +CPAR2_600930-T 2157 1946.075 758.930990 23469.367 +CPAR2_600940-T 1488 1277.075 34.198220 694.000 +CPAR2_600950-T 1974 1763.075 126.612041 3547.197 +CPAR2_600960-T 1905 1694.075 86.516177 2329.000 +CPAR2_600970-T 2169 1958.075 20.052541 623.933 +CPAR2_600980-T 1170 959.075 374.588773 5708.828 +CPAR2_600990-T 879 668.100 123.016274 1306.000 +CPAR2_601000-T 1605 1394.075 37.474650 830.163 +CPAR2_601010-T 3129 2918.075 18.201471 844.000 +CPAR2_601040-T 2532 2321.075 17.216507 635.000 +CPAR2_601050-T 1332 1121.075 26.607502 474.000 +CPAR2_601080-T 3420 3209.075 74.458682 3796.948 +CPAR2_601090-T 1584 1373.075 45.052584 983.000 +CPAR2_601100-T 1914 1703.075 65.784074 1780.304 +CPAR2_601110-T 408 197.235 6.381274 20.000 +CPAR2_601120-T 708 497.138 337.729714 2668.000 +CPAR2_601130-T 2145 1934.075 20.727866 637.041 +CPAR2_601140-T 855 644.107 75.425819 772.000 +CPAR2_601150-T 804 593.118 7.537215 71.038 +CPAR2_601160-T 888 677.099 4.182353 45.000 +CPAR2_601170-T 3516 3305.075 67.862629 3564.113 +CPAR2_601180-T 1077 866.075 118.338314 1628.623 +CPAR2_601190-T 891 680.099 87.747022 948.297 +CPAR2_601200-T 1392 1181.075 20.193991 379.000 +CPAR2_601210-T 891 680.099 45.439744 491.075 +CPAR2_601220-T 993 782.079 18.668001 232.000 +CPAR2_601230-T 684 473.142 68.497712 515.000 +CPAR2_601240-T 2886 2675.075 17.808216 757.000 +CPAR2_601250-T 1371 1160.075 45.197063 833.174 +CPAR2_601260-T 765 554.123 49.515433 436.000 +CPAR2_601270-T 588 377.168 6.673990 40.000 +CPAR2_601280-T 1323 1112.075 60.662615 1072.000 +CPAR2_601290-T 1314 1103.075 49.567760 868.848 +CPAR2_601300-T 1815 1604.075 41.075463 1047.000 +CPAR2_601310-T 2793 2582.075 39.994496 1641.000 +CPAR2_601320-T 1002 791.075 14.637285 184.000 +CPAR2_601330-T 654 443.147 591.980032 4168.635 +CPAR2_601340-T 1977 1766.075 82.473541 2314.533 +CPAR2_601350-T 573 362.169 192.849351 1109.861 +CPAR2_601360-T 1365 1154.075 36.270717 665.166 +CPAR2_601370-T 1389 1178.075 62.872966 1177.000 +CPAR2_601380-T 2226 2015.075 82.833660 2652.391 +CPAR2_601390-T 318 107.338 290.219850 495.015 +CPAR2_601400-T 1704 1493.075 95.594657 2268.061 +CPAR2_601410-T 1578 1367.075 27.021298 587.000 +CPAR2_601420-T 744 533.131 308.910530 2617.014 +CPAR2_601430-T 1245 1034.075 152.717349 2509.458 +CPAR2_601440-T 1665 1454.075 63.940537 1477.415 +CPAR2_601450-T 546 335.169 59.894486 319.000 +CPAR2_601460-T 1434 1223.075 58.707419 1141.000 +CPAR2_601470-T 1740 1529.075 49.963213 1214.000 +CPAR2_601480-T 1416 1205.075 82.040973 1571.030 +CPAR2_601490-T 1266 1055.075 72.012484 1207.343 +CPAR2_601500-T 960 749.090 32.201542 383.310 +CPAR2_601510-T 1749 1538.075 43.983375 1074.993 +CPAR2_601520-T 1050 839.075 11.999954 160.000 +CPAR2_601530-T 1032 821.075 113.049740 1475.000 +CPAR2_601540-T 2340 2129.075 138.992778 4702.434 +CPAR2_601550-T 2127 1916.075 108.613067 3306.999 +CPAR2_601560-T 3315 3104.075 56.988767 2811.001 +CPAR2_601570-T 3267 3056.075 46.327263 2249.781 +CPAR2_601580-T 1530 1319.075 34.306277 719.089 +CPAR2_601590-T 4095 3884.075 27.365448 1689.000 +CPAR2_601600-T 2751 2540.075 71.645615 2891.849 +CPAR2_601610-T 360 149.253 4.216371 10.000 +CPAR2_601620-T 1623 1412.075 108.606953 2436.997 +CPAR2_601630-T 2544 2333.075 87.673134 3250.385 +CPAR2_601640-T 834 623.110 84.229041 834.000 +CPAR2_601650-T 1494 1283.075 47.340438 965.215 +CPAR2_601660-T 972 761.086 38.794029 469.178 +CPAR2_601670-T 1047 836.075 61.118286 812.000 +CPAR2_601680-T 696 485.141 0.000000 0.000 +CPAR2_601690-T 672 461.143 26.337968 193.000 +CPAR2_601700-T 483 272.179 98.957799 428.000 +CPAR2_601710-T 879 668.100 344.621478 3658.668 +CPAR2_601720-T 1086 875.075 51.107902 710.678 +CPAR2_601730-T 1860 1649.075 1.148749 30.103 +CPAR2_601740-T 1839 1628.075 0.000000 0.000 +CPAR2_601750-T 1827 1616.075 0.112822 2.897 +CPAR2_601760-T 1734 1523.075 0.247908 6.000 +CPAR2_601770-T 1116 905.075 376.645656 5416.979 +CPAR2_601780-T 1308 1097.075 174.400911 3040.357 +CPAR2_601790-T 1086 875.075 74.377448 1034.252 +CPAR2_601800-T 897 686.099 421.972778 4600.561 +CPAR2_601810-T 1254 1043.075 54.419181 902.001 +CPAR2_601820-T 2496 2285.075 116.658478 4236.003 +CPAR2_601830-T 414 203.233 436.291344 1409.000 +CPAR2_601840-T 1107 896.075 24.119821 343.446 +CPAR2_601850-T 621 410.166 89.621531 584.133 +CPAR2_601860-T 1194 983.075 78.229905 1222.078 +CPAR2_601870-T 8517 8306.075 3.917302 517.038 +CPAR2_601880-T 828 617.113 0.917779 9.000 +CPAR2_601890-T 1935 1724.075 39.238534 1075.000 +CPAR2_601900-T 2097 1886.075 86.948149 2605.906 +CPAR2_601910-T 834 623.110 51.304979 508.000 +CPAR2_601920-T 1572 1361.075 289.543077 6262.313 +CPAR2_601925-T 423 212.227 2.965247 10.000 +CPAR2_601950-T 1107 896.075 27.919815 397.554 +CPAR2_601960-T 1491 1280.075 9.148015 186.081 +CPAR2_601970-T 1365 1154.075 16.358657 300.000 +CPAR2_601980-T 1893 1682.075 40.798693 1090.514 +CPAR2_601990-T 990 779.081 49.676717 615.000 +CPAR2_602000-T 777 566.119 98.711033 888.000 +CPAR2_602010-T 933 722.098 77.932582 894.241 +CPAR2_602020-T 3672 3461.075 26.091521 1434.993 +CPAR2_602030-T 660 449.144 0.700560 5.000 +CPAR2_602040-T 1125 914.075 101.332400 1471.871 +CPAR2_602050-T 1737 1526.075 209.916885 5090.528 +CPAR2_602060-T 1614 1403.075 33.773381 753.000 +CPAR2_602070-T 1629 1418.075 70.289807 1583.912 +CPAR2_602080-T 1182 971.075 43.548367 671.992 +CPAR2_602090-T 639 428.160 31.306662 213.001 +CPAR2_602100-T 2547 2336.075 20.230827 751.000 +CPAR2_602110-T 759 548.124 167.508714 1459.000 +CPAR2_602120-T 1533 1322.075 55.882065 1174.000 +CPAR2_602130-T 915 704.098 88.961734 995.350 +CPAR2_602135-T 225 17.197 717.226361 196.000 +CPAR2_602140-T 1590 1379.075 36.323328 796.000 +CPAR2_602150-T 1428 1217.075 38.159798 738.011 +CPAR2_602160-T 432 221.216 390.933899 1374.227 +CPAR2_602170-T 726 515.135 26.259961 214.958 +CPAR2_602180-T 1218 1007.075 35.308484 565.042 +CPAR2_602190-T 552 341.169 30.435081 165.000 +CPAR2_602200-T 1029 818.075 55.156287 717.014 +CPAR2_602210-T 1527 1316.075 43.107726 901.520 +CPAR2_602220-T 1260 1049.075 46.129656 769.000 +CPAR2_602230-T 4908 4697.075 41.601593 3105.110 +CPAR2_602240-T 1176 965.075 67.816079 1040.000 +CPAR2_602250-T 3150 2939.075 21.026226 982.000 +CPAR2_602260-T 1914 1703.075 130.252063 3524.990 +CPAR2_602270-T 1104 893.075 51.227937 727.000 +CPAR2_602280-T 2196 1985.075 42.955903 1355.000 +CPAR2_602290-T 2523 2312.075 49.606335 1822.546 +CPAR2_602300-T 957 746.091 42.848167 508.000 +CPAR2_602310-T 657 446.145 74.357506 527.157 +CPAR2_602320-T 1176 965.075 45.188983 693.000 +CPAR2_602330-T 450 239.191 132.337554 503.000 +CPAR2_602340-T 645 434.156 70.010230 483.000 +CPAR2_602350-T 1722 1511.075 59.371753 1425.625 +CPAR2_602360-T 1296 1085.075 5.045682 87.000 +CPAR2_602370-T 1086 875.075 66.407194 923.422 +CPAR2_602380-T 642 431.159 0.000000 0.000 +CPAR2_602390-T 1227 1016.075 30.348045 490.000 +CPAR2_602400-T 1095 884.075 17.510816 246.000 +CPAR2_602410-T 1221 1010.075 15.700277 252.000 +CPAR2_602420-T 1230 1019.075 630.084960 10203.399 +CPAR2_602430-T 1152 941.075 52.159181 780.000 +CPAR2_602440-T 1914 1703.075 123.949238 3354.418 +CPAR2_602450-T 3132 2921.075 179.640051 8338.451 +CPAR2_602460-T 1242 1031.075 105.075392 1721.594 +CPAR2_602480-T 117 14.860 656.419112 155.000 +CPAR2_602490-T 4110 3899.075 17.511714 1085.000 +CPAR2_602500-T 1029 818.075 50.777795 660.095 +CPAR2_602510-T 2751 2540.075 49.748233 2008.000 +CPAR2_602520-T 1830 1619.075 77.006784 1981.233 +CPAR2_602530-T 471 260.181 1890.597892 7816.548 +CPAR2_602540-T 1710 1499.075 216.666706 5161.252 +CPAR2_602550-T 1389 1178.075 126.359227 2365.481 +CPAR2_602560-T 486 275.178 389.647402 1703.827 +CPAR2_602570-T 7785 7574.075 5.492024 661.000 +CPAR2_602580-T 396 185.237 223.881032 659.000 +CPAR2_602590-T 2712 2501.075 505.005753 20070.701 +CPAR2_602600-T 879 668.100 110.206003 1170.000 +CPAR2_602610-T 2466 2255.075 16.298665 584.053 +CPAR2_602620-T 1467 1256.075 47.996589 958.000 +CPAR2_602630-T 849 638.108 61.904663 627.707 +CPAR2_602640-T 3393 3182.075 59.230708 2995.000 +CPAR2_602650-T 1296 1085.075 56.851514 980.260 +CPAR2_602660-T 582 371.168 46.964494 277.000 +CPAR2_602670-T 1476 1265.075 55.862957 1123.000 +CPAR2_602680-T 372 161.241 965.575223 2474.013 +CPAR2_602690-T 1965 1754.075 84.691526 2360.629 +CPAR2_602700-T 648 437.154 33.829407 235.000 +CPAR2_602710-T 663 452.143 55.533798 399.000 +CPAR2_602720-T 11412 11201.075 6.635922 1181.138 +CPAR2_602730-T 1233 1022.075 1477.567788 23997.708 +CPAR2_602740-T 798 587.119 0.214370 2.000 +CPAR2_602750-T 1242 1031.075 91.794781 1504.000 +CPAR2_602760-T 2265 2054.075 100.182202 3269.990 +CPAR2_602770-T 2415 2204.075 22.868179 800.935 +CPAR2_602780-T 1668 1457.075 22.376276 518.095 +CPAR2_602790-T 384 173.239 534.352828 1471.000 +CPAR2_602800-T 675 464.143 14.914253 110.000 +CPAR2_602810-T 4119 3908.075 21.338023 1325.124 +CPAR2_602820-T 483 272.179 39.536866 171.000 +CPAR2_602830-T 429 218.220 111.026529 385.000 +CPAR2_602840-T 1146 935.075 29.813869 443.001 +CPAR2_602850-T 456 245.187 96.505276 376.000 +CPAR2_602860-T 417 206.232 190.410010 624.000 +CPAR2_602870-T 1677 1466.075 29.789536 694.000 +CPAR2_602880-T 477 266.180 13.239539 56.000 +CPAR2_602890-T 1554 1343.075 39.873994 851.000 +CPAR2_602900-T 849 638.108 40.730204 413.000 +CPAR2_602910-T 2100 1889.075 60.029684 1802.000 +CPAR2_602920-T 1437 1226.075 145.055435 2826.120 +CPAR2_602930-T 1746 1535.075 3.033630 74.000 +CPAR2_602940-T 1953 1742.075 243.438395 6739.000 +CPAR2_602950-T 1254 1043.075 132.999156 2204.469 +CPAR2_602960-T 855 644.107 107.081215 1096.000 +CPAR2_602970-T 3201 2990.075 34.199913 1624.975 +CPAR2_602980-T 3264 3053.075 13.583399 659.000 +CPAR2_602990-T 801 590.119 27.939745 262.000 +CPAR2_603000-T 3120 2909.075 76.891745 3554.464 +CPAR2_603010-T 1806 1595.075 75.778856 1920.741 +CPAR2_603020-T 471 260.181 648.939345 2682.995 +CPAR2_603030-T 738 527.132 122.964248 1030.001 +CPAR2_603040-T 765 554.123 56.005060 493.143 +CPAR2_603050-T 1104 893.075 4440.645166 63019.306 +CPAR2_603060-T 1032 821.075 29.124679 380.000 +CPAR2_603070-T 2466 2255.075 57.062678 2044.809 +CPAR2_603080-T 1761 1550.075 523.007751 12882.507 +CPAR2_603090-T 1296 1085.075 299.358510 5161.678 +CPAR2_603100-T 1542 1331.075 394.778632 8350.178 +CPAR2_603110-T 2232 2021.075 168.041861 5396.839 +CPAR2_603120-T 924 713.098 73.160160 829.017 +CPAR2_603130-T 2115 1904.075 52.186546 1579.000 +CPAR2_603140-T 1194 983.075 74.102205 1157.597 +CPAR2_603150-T 492 281.177 289.991298 1295.698 +CPAR2_603160-T 1503 1292.075 67.450085 1384.872 +CPAR2_603170-T 2364 2153.075 65.885028 2254.163 +CPAR2_603180-T 1167 956.075 33.360792 506.837 +CPAR2_603190-T 1023 812.075 65.946810 851.000 +CPAR2_603200-T 1275 1064.075 34.124319 577.000 +CPAR2_603210-T 1476 1265.075 15.569996 313.000 +CPAR2_603220-T 954 743.094 58.180000 687.000 +CPAR2_603230-T 1842 1631.075 38.196338 990.000 +CPAR2_603240-T 1128 917.075 161.230423 2349.587 +CPAR2_603250-T 1068 857.075 2.496436 34.000 +CPAR2_603260-T 2724 2513.075 81.562666 3257.140 +CPAR2_603270-T 1419 1208.075 28.129389 540.000 +CPAR2_603280-T 339 128.315 362.923560 740.000 +CPAR2_603290-T 1323 1112.075 22.239195 393.000 +CPAR2_603300-T 1020 809.075 7.466943 96.000 +CPAR2_603310-T 891 680.099 50.151907 542.000 +CPAR2_603320-T 1707 1496.075 81.014615 1926.000 +CPAR2_603330-T 1740 1529.075 160.560561 3901.281 +CPAR2_603340-T 417 206.232 12130.878416 39754.570 +CPAR2_603350-T 849 638.108 3166.575090 32108.740 +CPAR2_603360-T 477 266.180 68.418144 289.392 +CPAR2_603370-T 2502 2291.075 26.231129 954.983 +CPAR2_603375-T 246 35.431 198.928966 112.000 +CPAR2_603380-T 1170 959.075 37.991496 579.000 +CPAR2_603390-T 597 386.168 39.110689 240.000 +CPAR2_603400-T 378 167.240 37.628855 100.000 +CPAR2_603410-T 1380 1169.075 15.126010 281.000 +CPAR2_603420-T 2670 2459.075 105.135421 4108.283 +CPAR2_603430-T 2472 2261.075 98.192806 3528.045 +CPAR2_603440-T 2568 2357.075 574.736350 21526.904 +CPAR2_603450-T 2436 2225.075 81.921357 2896.552 +CPAR2_603460-T 2763 2552.075 26.842754 1088.579 +CPAR2_603470-T 2415 2204.075 64.298865 2252.004 +CPAR2_603480-T 4362 4151.075 15.235826 1005.000 +CPAR2_603490-T 1554 1343.075 77.138044 1646.298 +CPAR2_603500-T 2100 1889.075 78.533160 2357.446 +CPAR2_603510-T 2733 2522.075 71.173134 2852.421 +CPAR2_603520-T 2319 2108.075 53.405350 1789.000 +CPAR2_603530-T 1731 1520.075 244.919288 5915.992 +CPAR2_603540-T 1389 1178.075 59.186716 1107.992 +CPAR2_603550-T 1035 824.075 18.633029 244.000 +CPAR2_603560-T 3228 3017.075 42.242328 2025.226 +CPAR2_603570-T 258 47.397 531.086317 400.000 +CPAR2_603580-T 1419 1208.075 55.164723 1058.997 +CPAR2_603590-T 1902 1691.075 73.014923 1962.068 +CPAR2_603600-T 1884 1673.075 3.234795 86.001 +CPAR2_603610-T 1311 1100.075 125.510646 2194.029 +CPAR2_603620-T 1287 1076.075 50.469468 863.000 +CPAR2_603630-T 1251 1040.075 43.205552 714.075 +CPAR2_603640-T 297 86.344 206.987782 284.000 +CPAR2_603650-T 240 29.539 227.955931 107.000 +CPAR2_603660-T 1797 1586.075 22.068721 556.212 +CPAR2_603670-T 906 695.099 109.184314 1205.998 +CPAR2_603680-T 1893 1682.075 39.758684 1062.715 +CPAR2_603690-T 1929 1718.075 55.528706 1516.000 +CPAR2_603700-T 1575 1364.075 90.422883 1960.000 +CPAR2_603710-T 912 701.099 15.797700 176.000 +CPAR2_603720-T 1458 1247.075 90.125838 1786.000 +CPAR2_603730-T 1281 1070.075 280.050008 4762.000 +CPAR2_603740-T 702 491.139 43.308445 338.000 +CPAR2_603750-T 690 479.142 145.393198 1107.000 +CPAR2_603760-T 531 320.171 80.423233 409.169 +CPAR2_603770-T 1701 1490.075 43.881881 1039.042 +CPAR2_603780-T 627 416.165 56.856826 376.000 +CPAR2_603790-T 972 761.086 10.962860 132.586 +CPAR2_603800-T 4500 4289.075 10.970717 747.719 +CPAR2_100010-T 453 242.189 36.897258 142.000 +CPAR2_100020-T 2172 1961.075 23.553915 734.001 +CPAR2_100030-T 1266 1055.075 272.924618 4575.785 +CPAR2_100040-T 1281 1070.075 169.474651 2881.765 +CPAR2_100050-T 1458 1247.075 43.114420 854.387 +CPAR2_100060-T 1089 878.075 126.351699 1763.000 +CPAR2_100070-T 477 266.180 11.348176 48.000 +CPAR2_100080-T 1041 830.075 7.884540 104.000 +CPAR2_100090-T 2892 2681.075 268.393016 11434.566 +CPAR2_100100-T 564 353.169 1258.312459 7061.716 +CPAR2_100110-T 1395 1184.075 69.781333 1312.980 +CPAR2_100120-T 1332 1121.075 50.408305 898.000 +CPAR2_100130-T 1776 1565.075 180.048675 4477.799 +CPAR2_100140-T 1377 1166.075 30.279015 561.058 +CPAR2_100150-T 2934 2723.075 56.192949 2431.537 +CPAR2_100160-T 2715 2504.075 56.394408 2244.000 +CPAR2_100170-T 1281 1070.075 10.526869 179.000 +CPAR2_100180-T 1308 1097.075 68.490199 1194.000 +CPAR2_100190-T 1011 800.075 65.677429 835.000 +CPAR2_100200-T 912 701.099 0.000000 0.000 +CPAR2_100210-T 585 374.168 108.666430 646.103 +CPAR2_100220-T 714 503.137 41.775450 334.000 +CPAR2_100230-T 348 137.287 41.254787 90.000 +CPAR2_100240-T 492 281.177 51.700312 231.000 +CPAR2_100250-T 981 770.084 53.364467 653.025 +CPAR2_100260-T 780 569.119 87.464919 791.000 +CPAR2_100270-T 927 716.098 4.042463 46.000 +CPAR2_100280-T 1311 1100.075 52.343073 915.000 +CPAR2_100290-T 366 155.246 1210.180732 2985.444 +CPAR2_100300-T 1530 1319.075 10.591170 222.000 +CPAR2_100320-T 681 470.143 483.306039 3610.701 +CPAR2_100330-T 1851 1640.075 55.560394 1448.000 +CPAR2_100340-T 483 272.179 1362.981417 5895.000 +CPAR2_100350-T 2025 1814.075 5.342271 154.000 +CPAR2_100360-T 1674 1463.075 109.263824 2540.286 +CPAR2_100370-T 1236 1025.075 103.198285 1681.000 +CPAR2_100380-T 846 635.108 41.517092 419.000 +CPAR2_100390-T 303 92.343 182.638523 268.000 +CPAR2_100400-T 912 701.099 0.359039 4.000 +CPAR2_100410-T 939 728.098 45.142881 522.298 +CPAR2_100420-T 558 347.169 68.283709 376.702 +CPAR2_100430-T 663 452.143 47.600398 342.000 +CPAR2_100440-T 321 110.336 6.283145 11.016 +CPAR2_100450-T 486 275.178 75.467560 330.000 +CPAR2_100460-T 1467 1256.075 21.142547 422.000 +CPAR2_100470-T 1518 1307.075 20.943497 435.000 +CPAR2_100480-T 1026 815.075 1.003705 13.000 +CPAR2_100490-T 1776 1565.075 77.172775 1919.282 +CPAR2_100500-T 1107 896.075 78.536334 1118.290 +CPAR2_100510-T 483 272.179 34.450251 149.000 +CPAR2_100520-T 447 236.194 180.909857 679.000 +CPAR2_100530-T 636 425.161 579.184155 3913.000 +CPAR2_100540-T 732 521.133 56.784439 470.238 +CPAR2_100550-T 1434 1223.075 69.665018 1353.965 +CPAR2_100560-T 1755 1544.075 89.348233 2192.269 +CPAR2_100565-T 711 500.137 1.635743 13.000 +CPAR2_100570-T 1758 1547.075 36.202544 890.000 +CPAR2_100580-T 306 95.342 29.042223 44.000 +CPAR2_100590-T 813 602.117 17.874554 171.023 +CPAR2_100600-T 753 542.127 83.810236 722.000 +CPAR2_100610-T 4455 4244.075 13.814070 931.632 +CPAR2_100620-T 1734 1523.075 76.231688 1845.000 +CPAR2_100630-T 705 494.139 43.251943 339.621 +CPAR2_100640-T 279 68.363 377.713694 410.322 +CPAR2_100650-T 2679 2468.075 92.155680 3614.265 +CPAR2_100660-T 1356 1145.075 17.651834 321.191 +CPAR2_100670-T 3660 3449.075 165.232074 9056.001 +CPAR2_100680-T 1209 998.075 135.561289 2150.000 +CPAR2_100690-T 951 740.094 232.054474 2729.080 +CPAR2_100700-T 4902 4691.075 5.379384 401.000 +CPAR2_100710-T 1317 1106.075 124.316074 2185.000 +CPAR2_100720-T 1242 1031.075 60.446296 990.375 +CPAR2_100730-T 1296 1085.075 62.883075 1084.259 +CPAR2_100740-T 945 734.097 113.414988 1323.010 +CPAR2_100750-T 1098 887.075 36.548842 515.197 +CPAR2_100760-T 789 578.119 52.032094 478.000 +CPAR2_100770-T 102 6.552 1756.884489 182.919 +CPAR2_100780-T 102 6.552 86.442242 9.000 +CPAR2_100790-T 813 602.117 74.623906 714.000 +CPAR2_100800-T 1284 1073.075 41.755177 712.000 +CPAR2_100810-T 3504 3293.075 39.175270 2049.996 +CPAR2_100820-T 951 740.094 444.945062 5232.784 +CPAR2_100830-T 717 506.136 318.378216 2560.650 +CPAR2_100840-T 777 566.119 14.992552 134.872 +CPAR2_100850-T 858 647.105 180.008208 1851.000 +CPAR2_100850.1-T 552 341.169 0.922275 5.000 +CPAR2_100860-T 659 448.144 11.514807 82.000 +CPAR2_100870-T 957 746.091 124.182120 1472.280 +CPAR2_100880-T 1641 1430.075 54.528153 1239.137 +CPAR2_100890-T 1065 854.075 15.841738 215.000 +CPAR2_100900-T 942 731.098 44.501601 517.000 +CPAR2_100900.1-T 264 53.386 18.860405 16.000 +CPAR2_100910-T 903 692.099 78.469836 862.999 +CPAR2_100920-T 840 629.109 18.910164 189.043 +CPAR2_100940-T 906 695.099 50.258174 555.128 +CPAR2_100950-T 480 269.180 0.000000 0.000 +CPAR2_100960-T 885 674.099 35.941595 385.000 +CPAR2_100970-T 909 698.099 79.283301 879.505 +CPAR2_100980-T 1755 1544.075 5.257530 129.000 +CPAR2_100990-T 1452 1241.075 64.710867 1276.188 +CPAR2_101000-T 1473 1262.075 77.568993 1555.654 +CPAR2_101010-T 2928 2717.075 123.539944 5333.945 +CPAR2_101020-T 1350 1139.075 182.452519 3302.492 +CPAR2_101030-T 1209 998.075 70.491918 1118.001 +CPAR2_101040-T 423 212.227 51.193273 172.644 +CPAR2_tD(GUC)1-T 72 72.000 0.000000 0.000 +CPAR2_101050-T 609 398.167 87.559759 554.000 +CPAR2_101060-T 3120 2909.075 268.940731 12432.286 +CPAR2_101070-T 2991 2780.075 53.942155 2383.001 +CPAR2_101080-T 1836 1625.075 17.735871 458.000 +CPAR2_101090-T 738 527.132 21.250117 178.000 +CPAR2_101100-T 1383 1172.075 77.261977 1439.000 +CPAR2_101110-T 897 686.099 117.312472 1279.000 +CPAR2_tA(AGC)1-T 73 73.000 0.000000 0.000 +CPAR2_101120-T 3846 3635.075 244.091550 14099.562 +CPAR2_101130-T 819 608.115 94.584757 914.000 +CPAR2_101140-T 1350 1139.075 40.219761 728.000 +CPAR2_101150-T 2244 2033.075 33.772055 1091.064 +CPAR2_101160-T 831 620.112 137.309052 1353.034 +CPAR2_101170-T 234 23.994 8497.555453 3240.000 +CPAR2_101180-T 1461 1250.075 78.623565 1561.811 +CPAR2_101190-T 2388 2177.075 34.462808 1192.240 +CPAR2_101200-T 1662 1451.075 31.788832 733.000 +CPAR2_101210-T 288 77.347 425.516470 523.000 +CPAR2_101220-T 2787 2576.075 84.825430 3472.355 +CPAR2_101230-T 1527 1316.075 965.986902 20201.864 +CPAR2_101240-T 3291 3080.075 22.168124 1085.000 +CPAR2_101250-T 2139 1928.075 92.262346 2826.754 +CPAR2_101260-T 2640 2429.075 120.205013 4639.840 +CPAR2_101270-T 3378 3167.075 186.042037 9362.869 +CPAR2_101280-T 1008 797.075 164.851034 2088.000 +CPAR2_101290-T 1116 905.075 146.987636 2114.000 +CPAR2_101300-T 918 707.098 121.393489 1364.000 +CPAR2_101310-T 1122 911.075 50.630269 733.000 +CPAR2_101320-T 2673 2462.075 73.065989 2858.618 +CPAR2_101330-T 900 689.099 220.270406 2412.000 +CPAR2_101340-T 2109 1898.075 98.798989 2979.925 +CPAR2_101350-T 954 743.094 447.963759 5289.637 +CPAR2_101360-T 1197 986.075 17.422605 273.000 +CPAR2_101370-T 2100 1889.075 41.576657 1248.068 +CPAR2_101380-T 2076 1865.075 48.179006 1427.886 +CPAR2_101390-T 456 245.187 65.450281 255.005 +CPAR2_101400-T 1344 1133.075 3.498987 63.000 +CPAR2_101410-T 1329 1118.075 347.898107 6181.055 +CPAR2_101420-T 1434 1223.075 32.054971 623.000 +CPAR2_101430-T 1737 1526.075 141.854468 3440.000 +CPAR2_101440-T 5784 5573.075 14.916552 1321.000 +CPAR2_101450-T 699 488.140 137.943559 1070.004 +CPAR2_101460-T 1107 896.075 40.873235 582.000 +CPAR2_101470-T 1002 791.075 13.125826 165.000 +CPAR2_101480-T 1776 1565.075 326.418189 8118.000 +CPAR2_101490-T 765 554.123 165.240724 1455.000 +CPAR2_101500-T 738 527.132 44.410357 372.000 +CPAR2_101510-T 2454 2243.075 79.150280 2821.212 +CPAR2_101520-T 2292 2081.075 44.330917 1466.000 +CPAR2_101530-T 3036 2825.075 68.978483 3096.586 +CPAR2_101540-T 744 533.131 3.305101 28.000 +CPAR2_101550-T 2418 2207.075 91.958007 3225.122 +CPAR2_101560-T 4980 4769.075 18.209812 1380.000 +CPAR2_101570-T 1383 1172.075 70.536200 1313.733 +CPAR2_101580-T 999 788.075 55.417809 693.995 +CPAR2_101590-T 1056 845.075 23.159305 311.000 +CPAR2_101600-T 2256 2045.075 33.522512 1089.395 +CPAR2_101610-T 1587 1376.075 83.048957 1816.000 +CPAR2_101620-T 1563 1352.075 580.987540 12482.660 +CPAR2_101630-T 765 554.123 66.664127 587.000 +CPAR2_101640-T 2502 2291.075 0.324985 11.832 +CPAR2_101650-T 1224 1013.075 91.810688 1478.000 +CPAR2_101660-T 1053 842.075 109.210332 1461.350 +CPAR2_101670-T 384 173.239 180.634846 497.263 +CPAR2_101680-T 1194 983.075 140.254335 2191.001 +CPAR2_101690-T 2475 2264.075 61.065947 2196.997 +CPAR2_101700-T 1602 1391.075 27.686071 612.000 +CPAR2_101710-T 2094 1883.075 25.966527 777.000 +CPAR2_101720-T 1602 1391.075 74.239691 1641.067 +CPAR2_101730-T 2862 2651.075 117.274631 4940.440 +CPAR2_101740-T 1659 1448.075 31.507025 725.000 +CPAR2_101750-T 543 332.169 9.851541 52.000 +CPAR2_101760-T 1812 1601.075 101.619410 2585.401 +CPAR2_101770-T 2541 2330.075 539.749730 19984.894 +CPAR2_101780-T 2085 1874.075 0.953404 28.393 +CPAR2_101790-T 2541 2330.075 160.302506 5935.396 +CPAR2_101800-T 2226 2015.075 59.648926 1910.000 +CPAR2_101810-T 885 674.099 47.797654 512.000 +CPAR2_101820-T 447 236.194 128.422019 482.000 +CPAR2_101830-T 1575 1364.075 51.049105 1106.537 +CPAR2_101840-T 387 176.239 246.738822 691.000 +CPAR2_101850-T 1458 1247.075 37.968540 752.413 +CPAR2_101860-T 1731 1520.075 19.706178 476.000 +CPAR2_101870-T 2121 1910.075 49.076581 1489.581 +CPAR2_101880-T 825 614.114 341.004191 3327.730 +CPAR2_101890-T 1161 950.075 0.000000 0.000 +CPAR2_101900-T 2499 2288.075 8.086071 294.000 +CPAR2_101910-T 1623 1412.075 64.843385 1455.000 +CPAR2_101920-T 741 530.132 60.778060 512.000 +CPAR2_101930-T 948 737.096 85.376151 1000.000 +CPAR2_101940-T 7500 7289.075 9.559263 1107.226 +CPAR2_101950-T 1407 1196.075 70.057995 1331.545 +CPAR2_101960-T 1626 1415.075 59.086864 1328.648 +CPAR2_101970-T 897 686.099 30.818601 336.000 +CPAR2_101980-T 1104 893.075 21.491776 305.000 +CPAR2_101990-T 348 137.287 81.134415 177.000 +CPAR2_102000-T 3969 3758.075 186.551001 11140.444 +CPAR2_102010-T 1074 863.075 0.874970 12.000 +CPAR2_102020-T 798 587.119 43.717376 407.868 +CPAR2_102030-T 1149 938.075 40.657109 606.057 +CPAR2_102040-T 861 650.103 147.168705 1520.327 +CPAR2_102050-T 1605 1394.075 93.577994 2073.001 +CPAR2_102060-T 3186 2975.075 256.295228 12116.521 +CPAR2_tG(UCC)1-T 71 71.000 0.000000 0.000 +CPAR2_102070-T 762 551.123 336.165784 2944.027 +CPAR2_102080-T 1731 1520.075 96.861788 2339.683 +CPAR2_102090-T 1758 1547.075 58.133608 1429.151 +CPAR2_102100-T 1545 1334.075 5.754930 122.000 +CPAR2_102110-T 3657 3446.075 3.670556 201.000 +CPAR2_102120-T 201 7.902 119.462102 15.000 +CPAR2_102130-T 216 12.347 9713.011612 1905.734 +CPAR2_102140-T 777 566.119 5.335732 48.000 +CPAR2_102150-T 381 170.239 96.850676 262.000 +CPAR2_102160-T 1377 1166.075 46.520161 862.000 +CPAR2_102170-T 591 380.168 1.986397 12.000 +CPAR2_102180-T 1383 1172.075 22.174563 413.000 +CPAR2_102190-T 3450 3239.075 45.287858 2331.000 +CPAR2_102200-T 1452 1241.075 49.912565 984.345 +CPAR2_tR(UCU)1-T 73 73.000 0.000000 0.000 +CPAR2_tF(GAA)1-T 73 73.000 0.000000 0.000 +CPAR2_102210-T 1317 1106.075 68.900121 1211.000 +CPAR2_102220-T 2472 2261.075 166.757489 5991.559 +CPAR2_102230-T 1758 1547.075 0.244062 6.000 +CPAR2_102240-T 3624 3413.075 57.898038 3140.141 +CPAR2_102250-T 3609 3398.075 39.454478 2130.437 +CPAR2_102260-T 468 257.182 77.322647 316.000 +CPAR2_102270-T 2790 2579.075 164.730820 6751.159 +CPAR2_102280-T 1275 1064.075 7.924885 134.000 +CPAR2_102290-T 1386 1175.075 38.365957 716.393 +CPAR2_102300-T 1380 1169.075 58.817568 1092.670 +CPAR2_102310-T 2211 2000.075 14.095881 448.000 +CPAR2_102320-T 2262 2051.075 30.773711 1003.000 +CPAR2_102330-T 2583 2372.075 60.198753 2269.109 +CPAR2_102340-T 381 170.239 388.880459 1051.998 +CPAR2_102350-T 3165 2954.075 59.652949 2800.225 +CPAR2_102360-T 444 233.197 161.375865 598.000 +CPAR2_102370-T 1179 968.075 36.988240 569.000 +CPAR2_102380-T 483 272.179 87.628491 379.000 +CPAR2_102390-T 687 476.142 102.033197 772.000 +CPAR2_102400-T 1734 1523.075 22.157607 536.270 +CPAR2_102410-T 1206 995.075 32.569555 515.000 +CPAR2_102420-T 1194 983.075 8.193769 128.000 +CPAR2_102430-T 1647 1436.075 18.185759 415.000 +CPAR2_102440-T 189 13.685 790.944243 172.000 +CPAR2_tM(CAU)1-T 72 72.000 0.000000 0.000 +CPAR2_102450-T 423 212.227 155.379228 524.001 +CPAR2_102460-T 540 329.170 34.985750 183.000 +CPAR2_102470-T 588 377.168 197.883808 1186.000 +CPAR2_102480-T 1455 1244.075 37.381637 739.000 +CPAR2_102490-T 129 21.256 2.960596 1.000 +CPAR2_102500-T 492 281.177 43.494335 194.335 +CPAR2_102510-T 129 21.256 2.960596 1.000 +CPAR2_102520-T 129 21.256 0.000000 0.000 +CPAR2_102530-T 1386 1175.075 129.744123 2422.662 +CPAR2_102540-T 1587 1376.075 62.881232 1375.000 +CPAR2_102550-T 2163 1952.075 313.239368 9716.556 +CPAR2_102560-T 2163 1952.075 12.185849 378.000 +CPAR2_102570-T 2160 1949.075 15.078176 467.000 +CPAR2_102580-T 1218 1007.075 12.530137 200.520 +CPAR2_102590-T 1836 1625.075 1.239188 32.000 +CPAR2_102600-T 1722 1511.075 0.624692 15.000 +CPAR2_102610-T 1794 1583.075 102.064181 2567.523 +CPAR2_102620-T 1152 941.075 0.000000 0.000 +CPAR2_102630-T 1851 1640.075 12.432022 324.000 +CPAR2_102640-T 285 74.353 295.383286 349.000 +CPAR2_102650-T 2109 1898.075 29.839368 900.000 +CPAR2_102660-T 237 26.695 238.092679 101.000 +CPAR2_102670-T 660 449.144 90.372190 645.000 +CPAR2_102680-T 1395 1184.075 119.035734 2239.732 +CPAR2_102690-T 2817 2606.075 30.667670 1270.010 +CPAR2_102700-T 4539 4328.075 53.469199 3677.375 +CPAR2_102710-T 552 341.169 123.584874 670.000 +CPAR2_102720-T 1095 884.075 129.407921 1817.982 +CPAR2_102730-T 981 770.084 55.568871 680.000 +CPAR2_102740-T 2541 2330.075 25.172664 932.049 +CPAR2_102750-T 1944 1733.075 34.277987 944.000 +CPAR2_102760-T 1956 1745.075 40.172750 1114.000 +CPAR2_102770-T 582 371.168 26.957958 159.000 +CPAR2_102780-T 1707 1496.075 391.881483 9316.390 +CPAR2_102790-T 1440 1229.075 7.373005 144.000 +CPAR2_102800-T 3006 2795.075 135.765569 6030.074 +CPAR2_102810-T 537 326.170 54.408317 282.000 +CPAR2_102820-T 3888 3677.075 34.503594 2016.073 +CPAR2_102830-T 999 788.075 94.851432 1187.821 +CPAR2_102840-T 576 365.168 71.518051 415.000 +CPAR2_102850-T 882 671.099 36.852436 393.000 +CPAR2_102860-T 339 128.315 51.005473 104.000 +CPAR2_102870-T 723 512.135 26.050255 212.000 +CPAR2_102880-T 2259 2048.075 70.137755 2282.639 +CPAR2_102890-T 183 21.081 23982.009673 8033.849 +CPAR2_102900-T 1269 1058.075 65.304980 1098.000 +CPAR2_102910-T 2172 1961.075 38.571874 1202.000 +CPAR2_102920-T 1665 1454.075 57.587427 1330.620 +CPAR2_102930-T 1047 836.075 27.322584 363.000 +CPAR2_102940-T 696 485.141 53.313150 411.000 +CPAR2_102950-T 1437 1226.075 42.088362 820.009 +CPAR2_102960-T 1599 1388.075 64.015068 1412.000 +CPAR2_102970-T 2184 1973.075 27.812074 872.000 +CPAR2_102980-T 600 389.168 93.465479 578.000 +CPAR2_102990-T 3156 2945.075 28.590402 1338.000 +CPAR2_103000-T 876 665.100 197.830234 2090.830 +CPAR2_103010-T 1662 1451.075 91.772985 2116.139 +CPAR2_103020-T 2856 2645.075 17.204728 723.145 +CPAR2_103030-T 288 77.347 87.869558 108.000 +CPAR2_103040-T 192 10.918 1170.108831 203.000 +CPAR2_103050-T 543 332.169 6.441392 34.000 +CPAR2_103060-T 1791 1580.075 36.641276 920.000 +CPAR2_103070-T 1062 851.075 25.805838 349.000 +CPAR2_103080-T 735 524.133 1.560854 13.000 +CPAR2_103090-T 1689 1478.075 57.988461 1362.002 +CPAR2_103100-T 234 23.994 20.981618 8.000 +CPAR2_103110-T 438 227.205 2.492785 9.000 +CPAR2_103120-T 2793 2582.075 33.975091 1394.020 +CPAR2_103130-T 1815 1604.075 35.112608 895.009 +CPAR2_103140-T 1647 1436.075 54.236971 1237.691 +CPAR2_103150-T 1647 1436.075 12.989383 296.418 +CPAR2_103160-T 4965 4754.075 35.625040 2691.292 +CPAR2_103170-T 720 509.136 271.924679 2199.995 +CPAR2_103180-T 435 224.209 1318.313661 4696.896 +CPAR2_103190-T 1485 1274.075 27.660082 560.000 +CPAR2_103200-T 1830 1619.075 28.140516 724.000 +CPAR2_103210-T 2691 2480.075 45.367064 1787.907 +CPAR2_103220-T 348 137.287 58.215089 127.000 +CPAR2_103230-T 906 695.099 62.378229 689.000 +CPAR2_103240-T 921 710.098 149.505588 1687.000 +CPAR2_103250-T 1389 1178.075 18.654921 349.225 +CPAR2_103260-T 2691 2480.075 342.686078 13505.193 +CPAR2_103270-T 654 443.147 181.423474 1277.557 +CPAR2_103280-T 405 194.236 16.199459 50.000 +CPAR2_103290-T 2106 1895.075 62.425160 1879.860 +CPAR2_103300-T 237 26.695 34632.752188 14691.371 +CPAR2_103310-T 2022 1811.075 204.949282 5898.239 +CPAR2_103320-T 330 119.329 4.218955 8.000 +CPAR2_103330-T 1473 1262.075 76.738604 1539.000 +CPAR2_103350-T 2298 2087.075 28.343291 940.000 +CPAR2_103360-T 1272 1061.075 44.778988 755.023 +CPAR2_103370-T 1836 1625.075 7.202777 186.000 +CPAR2_103380-T 1518 1307.075 57.965373 1203.951 +CPAR2_103390-T 1557 1346.075 31.556945 675.000 +CPAR2_103400-T 3159 2948.075 20.833958 976.000 +CPAR2_103410-T 669 458.143 216.890994 1579.000 +CPAR2_103420-T 516 305.173 134.862894 654.000 +CPAR2_103430-T 531 320.171 105.352186 536.000 +CPAR2_103440-T 1029 818.075 4.846272 63.000 +CPAR2_103450-T 975 764.085 243.777019 2959.878 +CPAR2_103460-T 4362 4151.075 30.279142 1997.302 +CPAR2_103470-T 840 629.109 15.804900 158.000 +CPAR2_103480-T 1707 1496.075 11.315125 269.000 +CPAR2_103490-T 1413 1202.075 12.145541 232.000 +CPAR2_103500-T 492 281.177 18.176552 81.214 +CPAR2_103510-T 2964 2753.075 15.749315 689.000 +CPAR2_103520-T 990 779.081 55.330977 685.000 +CPAR2_103530-T 1488 1277.075 29.663261 601.970 +CPAR2_103540-T 2283 2072.075 49.322040 1624.000 +CPAR2_103550-T 3009 2798.075 71.474907 3177.989 +CPAR2_tK(CUU)1-T 74 74.000 0.000000 0.000 +CPAR2_103560-T 3885 3674.075 12.794788 747.000 +CPAR2_103570-T 1521 1310.075 31.943752 665.000 +CPAR2_103580-T 864 653.103 61.859797 641.992 +CPAR2_103590-T 309 98.341 75.057502 117.292 +CPAR2_103600-T 1002 791.075 3.182018 40.000 +CPAR2_103610-T 1413 1202.075 112.765066 2154.000 +CPAR2_tL(CAA)1-T 83 2.860 0.000000 0.000 +CPAR2_103620-T 567 356.169 124.387725 704.000 +CPAR2_103630-T 3903 3692.075 105.497858 6189.473 +CPAR2_103640-T 2031 1820.075 38.309894 1108.000 +CPAR2_103650-T 1680 1469.075 33.845587 790.106 +CPAR2_103660-T 819 608.115 75.282048 727.472 +CPAR2_103670-T 1053 842.075 25.561836 342.044 +CPAR2_103680-T 2025 1814.075 32.405903 934.155 +CPAR2_103690-T 1743 1532.075 32.161937 783.000 +CPAR2_103700-T 1212 1001.075 176.596254 2809.233 +CPAR2_103710-T 1164 953.075 60.284283 913.000 +CPAR2_103720-T 1158 947.075 52.428770 789.030 +CPAR2_103730-T 783 572.119 18.589238 169.000 +CPAR2_103740-T 1734 1523.075 54.870285 1328.000 +CPAR2_103750-T 2121 1910.075 121.053013 3674.223 +CPAR2_103760-T 2685 2474.075 81.240692 3193.934 +CPAR2_103770-T 1023 812.075 65.791823 849.000 +CPAR2_103780-T 564 353.169 104.952686 589.000 +CPAR2_103790-T 444 233.197 149.771965 555.000 +CPAR2_103800-T 237 26.695 2298.419431 975.000 +CPAR2_103810-T 2559 2348.075 27.444068 1024.000 +CPAR2_103820-T 729 518.134 31.227590 257.110 +CPAR2_103830-T 2127 1916.075 89.094808 2712.717 +CPAR2_103840-T 1050 839.075 91.124650 1215.000 +CPAR2_103850-T 675 464.143 8.948552 66.000 +CPAR2_103860-T 5865 5654.075 7.513486 675.060 +CPAR2_103870-T 1149 938.075 68.091481 1015.009 +CPAR2_103880-T 738 527.132 32.240906 270.064 +CPAR2_103890-T 684 473.142 31.389243 236.000 +CPAR2_103900-T 1011 800.075 83.532251 1062.000 +CPAR2_103910-T 1476 1265.075 161.890006 3254.437 +CPAR2_103920-T 1677 1466.075 8.413183 196.000 +CPAR2_103930-T 1227 1016.075 42.920807 693.000 +CPAR2_103940-T 288 77.347 2408.453090 2960.217 +CPAR2_103950-T 1053 842.075 98.198526 1314.000 +CPAR2_103960-T 1260 1049.075 99.787151 1663.492 +CPAR2_103970-T 561 350.169 340.024101 1892.025 +CPAR2_103980-T 3021 2810.075 54.074064 2414.607 +CPAR2_103990-T 1515 1304.075 110.314880 2286.000 +CPAR2_104000-T 2853 2642.075 50.144350 2105.264 +CPAR2_104010-T 627 416.165 127.171784 841.000 +CPAR2_104020-T 2298 2087.075 73.784019 2447.033 +CPAR2_104030-T 465 254.184 43.326178 175.000 +CPAR2_104040-T 2046 1835.075 27.160139 792.000 +CPAR2_104050-T 939 728.098 44.512110 515.000 +CPAR2_104060-T 891 680.099 72.082118 779.003 +CPAR2_104070-T 3075 2864.075 59.566916 2710.997 +CPAR2_104080-T 399 188.237 86.921980 260.000 +CPAR2_104090-T 909 698.099 67.158307 745.000 +CPAR2_104100-T 1077 866.075 66.848660 920.000 +CPAR2_104110-T 699 488.140 13.665387 106.000 +CPAR2_104120-T 1230 1019.075 19.822540 321.000 +CPAR2_104130-T 654 443.147 473.313496 3333.003 +CPAR2_104135-T 330 119.329 30.587425 58.000 +CPAR2_104140-T 3381 3170.075 17.151603 864.000 +CPAR2_104150-T 909 698.099 41.466874 460.000 +CPAR2_tM(CAU)2-T 74 74.000 0.000000 0.000 +CPAR2_104160-T 759 548.124 46.957549 409.000 +CPAR2_104170-T 918 707.098 66.748619 750.000 +CPAR2_104180-T 3078 2867.075 22.541971 1027.000 +CPAR2_104190-T 3168 2957.075 353.445674 16608.274 +CPAR2_104195-T 180 24.452 102.944260 40.000 +CPAR2_104200-T 1053 842.075 14.647573 196.000 +CPAR2_104210-T 2169 1958.075 92.001984 2862.635 +CPAR2_104220-T 1485 1274.075 67.520237 1367.000 +CPAR2_104230-T 1026 815.075 33.508310 434.000 +CPAR2_104240-T 1275 1064.075 53.049417 897.000 +CPAR2_tI(AAU)1-T 74 74.000 0.000000 0.000 +CPAR2_104250-T 1071 860.075 45.803471 626.000 +CPAR2_104260-T 909 698.099 40.988709 454.696 +CPAR2_104270-T 957 746.091 7.506864 89.000 +CPAR2_104280-T 3705 3494.075 46.305266 2571.000 +CPAR2_104290-T 942 731.098 270.245066 3139.588 +CPAR2_104300-T 2661 2450.075 30.723433 1196.158 +CPAR2_104310-T 765 554.123 137.544348 1211.124 +CPAR2_104320-T 1152 941.075 19.392172 289.995 +CPAR2_104330-T 1134 923.075 89.240717 1309.000 +CPAR2_104340-T 1431 1220.075 36.053803 699.000 +CPAR2_104350-T 360 149.253 44.271891 105.000 +CPAR2_104360-T 747 536.129 67.023706 571.001 +CPAR2_104370-T 525 314.172 377.774321 1885.990 +CPAR2_104380-T 849 638.108 72.196952 732.070 +CPAR2_104390-T 3183 2972.075 55.901916 2640.134 +CPAR2_104400-T 1437 1226.075 0.205307 4.000 +CPAR2_104410-T 549 338.169 75.553135 406.000 +CPAR2_104420-T 4275 4064.075 17.296473 1117.014 +CPAR2_104430-T 1986 1775.075 161.777347 4563.247 +CPAR2_104440-T 555 344.169 758.813706 4149.987 +CPAR2_104450-T 861 650.103 731.110445 7552.740 +CPAR2_104460-T 1002 791.075 61.810709 777.000 +CPAR2_104470-T 3165 2954.075 38.451757 1805.000 +CPAR2_104480-T 1536 1325.075 29.302532 617.000 +CPAR2_104490-T 660 449.144 137.267392 979.698 +CPAR2_104500-T 1923 1712.075 11.031708 300.127 +CPAR2_104510-T 213 11.052 51.247044 9.000 +CPAR2_104520-T 591 380.168 8.111123 49.000 +CPAR2_104530-T 1122 911.075 51.597287 747.000 +CPAR2_104540-T 1014 803.075 39.102526 499.000 +CPAR2_104550-T 669 458.143 109.613055 798.000 +CPAR2_104560-T 558 347.169 85.149634 469.746 +CPAR2_104570-T 2481 2270.075 75.652754 2729.006 +CPAR2_104580-T 1566 1355.075 87.684233 1888.097 +CPAR2_104590-T 522 311.173 578.393322 2859.988 +CPAR2_104600-T 957 746.091 59.842588 709.483 +CPAR2_104610-T 1599 1388.075 96.781931 2134.749 +CPAR2_104620-T 1383 1172.075 67.919667 1265.000 +CPAR2_104630-T 1671 1460.075 7.844345 182.000 +CPAR2_104640-T 192 10.918 5.764083 1.000 +CPAR2_104660-T 1668 1457.075 73.611361 1704.380 +CPAR2_104670-T 1632 1421.075 70.898130 1601.000 +CPAR2_104680-T 3531 3320.075 93.758865 4946.520 +CPAR2_104690-T 645 434.156 224.854393 1551.269 +CPAR2_104700-T 417 206.232 48.823080 160.000 +CPAR2_104710-T 333 122.324 235.106422 457.000 +CPAR2_104720-T 1233 1022.075 10.836532 176.000 +CPAR2_104730-T 1305 1094.075 22.029878 383.000 +CPAR2_104740-T 534 323.170 28.040864 144.000 +CPAR2_104750-T 2184 1973.075 19.296221 605.000 +CPAR2_104760-T 336 125.320 149.140368 297.000 +CPAR2_104770-T 2331 2120.075 31.107889 1048.000 +CPAR2_104780-T 954 743.094 28.454847 336.000 +CPAR2_104790-T 1179 968.075 31.336684 482.061 +CPAR2_104800-T 1983 1772.075 26.634199 750.000 +CPAR2_104810-T 1713 1502.075 17.470482 417.000 +CPAR2_104820-T 1335 1124.075 4.198812 75.000 +CPAR2_104830-T 4329 4118.075 18.643442 1220.000 +CPAR2_104840-T 276 65.367 126.117132 131.000 +CPAR2_104850-T 858 647.105 128.466149 1321.000 +CPAR2_104860-T 1458 1247.075 6.963811 138.000 +CPAR2_104870-T 876 665.100 28.006935 296.000 +CPAR2_104880-T 1059 848.075 43.260813 583.000 +CPAR2_104890-T 1188 977.075 31.430575 488.000 +CPAR2_104900-T 2304 2093.075 61.244895 2037.015 +CPAR2_104910-T 1356 1145.075 124.093899 2258.000 +CPAR2_104920-T 1371 1160.075 68.025524 1254.000 +CPAR2_104930-T 1899 1688.075 39.963502 1072.000 +CPAR2_tM(CAU)3-T 72 72.000 0.000000 0.000 +CPAR2_104940-T 1494 1283.075 0.343326 7.000 +CPAR2_104950-T 990 779.081 92.891648 1150.003 +CPAR2_104960-T 1305 1094.075 31.687294 550.899 +CPAR2_104970-T 342 131.306 12.460895 26.000 +CPAR2_104980-T 735 524.133 32.177600 268.000 +CPAR2_104990-T 1008 797.075 82.670612 1047.104 +CPAR2_105000-T 1482 1271.075 29.557220 597.000 +CPAR2_105010-T 1629 1418.075 108.689148 2449.204 +CPAR2_105020-T 2634 2423.075 21.738873 837.035 +CPAR2_105030-T 1203 992.075 28.619530 451.177 +CPAR2_105040-T 1116 905.075 27.255985 392.000 +CPAR2_105050-T 1956 1745.075 212.807647 5901.207 +CPAR2_105060-T 558 347.169 357.102707 1970.034 +CPAR2_105070-T 1260 1049.075 295.771916 4930.637 +CPAR2_105080-T 4719 4508.075 55.934709 4006.932 +CPAR2_105090-T 258 47.397 33.192895 25.000 +CPAR2_105100-T 966 755.088 110.264966 1323.044 +CPAR2_105110-T 1170 959.075 129.197332 1969.000 +CPAR2_105120-T 1473 1262.075 98.618837 1977.810 +CPAR2_105130-T 1284 1073.075 46.915930 800.000 +CPAR2_105140-T 3120 2909.075 17.716971 819.000 +CPAR2_105150-T 2610 2399.075 78.948472 3009.727 +CPAR2_105160-T 261 50.392 817.970329 655.000 +CPAR2_105170-T 630 419.164 71.313271 475.000 +CPAR2_105180-T 945 734.097 114.014220 1330.000 +CPAR2_105190-T 2247 2036.075 45.005343 1456.121 +CPAR2_105200-T 1314 1103.075 29.723031 521.000 +CPAR2_105210-T 2802 2591.075 19.192840 790.240 +CPAR2_105220-T 300 89.344 59.166601 84.000 +CPAR2_105230-T 1698 1487.075 52.685978 1244.995 +CPAR2_105240-T 1686 1475.075 32.124866 753.000 +CPAR2_105250-T 1032 821.075 151.633949 1978.422 +CPAR2_105260-T 1269 1058.075 47.699995 802.000 +CPAR2_105270-T 1638 1427.075 1041.372097 23615.236 +CPAR2_105280-T 1212 1001.075 30.425600 484.000 +CPAR2_105290-T 3963 3752.075 11.052854 659.000 +CPAR2_105300-T 2595 2384.075 96.312882 3648.747 +CPAR2_105310-T 528 317.172 149.602041 754.000 +CPAR2_105320-T 843 632.108 79.844228 802.000 +CPAR2_105330-T 759 548.124 41.102207 358.000 +CPAR2_105340-T 1644 1433.075 410.590417 9350.122 +CPAR2_105350-T 1239 1028.075 81.330391 1328.670 +CPAR2_105360-T 174 30.057 205.184291 98.000 +CPAR2_105370-T 807 596.118 19.846613 188.000 +CPAR2_105380-T 807 596.118 45.499415 431.000 +CPAR2_105390-T 1941 1730.075 66.565106 1830.000 +CPAR2_105400-T 3492 3281.075 57.328755 2989.015 +CPAR2_105410-T 1974 1763.075 26.484610 742.000 +CPAR2_105420-T 1047 836.075 10.537636 140.000 +CPAR2_105430-T 1323 1112.075 134.906579 2384.003 +CPAR2_105440-T 222 15.404 1732.205744 424.000 +CPAR2_105450-T 594 383.168 29.891152 182.000 +CPAR2_105460-T 2790 2579.075 76.765183 3146.066 +CPAR2_105470-T 1785 1574.075 9.435112 236.000 +CPAR2_105480-T 807 596.118 498.618652 4723.240 +CPAR2_105490-T 2757 2546.075 62.905414 2545.064 +CPAR2_105500-T 915 704.098 152.299005 1704.000 +CPAR2_105510-T 1224 1013.075 34.040769 548.000 +CPAR2_105520-T 5478 5267.075 103.628210 8673.352 +CPAR2_105530-T 2160 1949.075 89.805380 2781.445 +CPAR2_105540-T 1692 1481.075 20.310938 478.021 +CPAR2_105550-T 1218 1007.075 191.276635 3061.000 +CPAR2_105560-T 2709 2498.075 79.277839 3147.000 +CPAR2_105570-T 651 440.149 29.166918 204.000 +CPAR2_105580-T 2136 1925.075 6.911845 211.437 +CPAR2_105590-T 2127 1916.075 75.772910 2307.098 +CPAR2_105600-T 243 32.464 102.738293 53.000 +CPAR2_105610-T 2817 2606.075 46.967040 1945.000 +CPAR2_105620-T 903 692.099 109.566884 1205.000 +CPAR2_105630-T 2523 2312.075 41.752639 1534.000 +CPAR2_105640-T 1497 1286.075 8.660987 177.000 +CPAR2_105650-T 345 134.296 307.397274 656.000 +CPAR2_105660-T 1191 980.075 61.123757 951.939 +CPAR2_105670-T 2232 2021.075 34.439565 1106.062 +CPAR2_105680-T 972 761.086 121.547003 1470.000 +CPAR2_105690-T 945 734.097 808.521853 9431.579 +CPAR2_105700-T 1371 1160.075 18.498169 341.000 +CPAR2_105710-T 2148 1937.075 14.283840 439.674 +CPAR2_105720-T 408 197.235 89.975965 282.000 +CPAR2_105730-T 2436 2225.075 38.138379 1348.486 +CPAR2_105740-T 540 329.170 31.735708 166.000 +CPAR2_105750-T 1353 1142.075 0.358162 6.500 +CPAR2_105760-T 3282 3071.075 1.086042 53.000 +CPAR2_105770-T 948 737.096 54.640737 640.000 +CPAR2_105780-T 1191 980.075 42.011790 654.290 +CPAR2_105790-T 315 104.339 57.297991 95.000 +CPAR2_105800-T 2256 2045.075 37.541452 1220.000 +CPAR2_105810-T 1485 1274.075 34.286386 694.155 +CPAR2_105820-T 318 107.338 96.150643 164.000 +CPAR2_105830-T 459 248.186 157.968888 623.000 +CPAR2_105840-T 1395 1184.075 57.452108 1080.998 +CPAR2_105850-T 1437 1226.075 36.801248 717.000 +CPAR2_tP(UGG)1-T 72 72.000 0.000000 0.000 +CPAR2_105860-T 3072 2861.075 24.636628 1120.083 +CPAR2_105870-T 366 155.246 303.614887 749.000 +CPAR2_105880-T 1350 1139.075 34.664779 627.452 +CPAR2_105890-T 2157 1946.075 16.330229 505.000 +CPAR2_105900-T 1038 827.075 62.315974 819.000 +CPAR2_105910-T 684 473.142 100.817991 758.000 +CPAR2_105920-T 3879 3668.075 48.591852 2832.312 +CPAR2_105930-T 966 755.088 49.921783 599.000 +CPAR2_105940-T 1941 1730.075 53.739496 1477.400 +CPAR2_105950-T 4389 4178.075 17.110497 1136.000 +CPAR2_105960-T 429 218.220 788.432548 2734.000 +CPAR2_105970-T 609 398.167 471.382131 2982.485 +CPAR2_105980-T 333 122.324 144.047698 280.000 +CPAR2_105990-T 1257 1046.075 61.144004 1016.380 +CPAR2_106000-T 1275 1064.075 58.312960 986.000 +CPAR2_106010-T 1641 1430.075 53.334012 1212.000 +CPAR2_106015-T 387 176.239 102.837599 288.000 +CPAR2_106020-T 540 329.170 99.652484 521.252 +CPAR2_106030-T 1356 1145.075 18.465700 336.000 +CPAR2_106040-T 1107 896.075 125.936062 1793.222 +CPAR2_106050-T 1431 1220.075 47.968579 930.000 +CPAR2_106060-T 2319 2108.075 43.852688 1469.000 +CPAR2_106070-T 324 113.334 674.117206 1214.049 +CPAR2_106080-T 891 680.099 134.525889 1453.844 +CPAR2_106090-T 741 530.132 58.760039 495.000 +CPAR2_106100-T 603 392.168 271.190878 1690.000 +CPAR2_106110-T 1560 1349.075 148.082702 3174.534 +CPAR2_106120-T 1398 1187.075 284.537536 5367.318 +CPAR2_106130-T 1515 1304.075 103.477378 2144.310 +CPAR2_106140-T 2016 1805.075 294.452036 8445.966 +CPAR2_106150-T 492 281.177 51.476501 230.000 +CPAR2_106160-T 951 740.094 99.229662 1166.992 +CPAR2_106170-T 1098 887.075 364.955535 5144.461 +CPAR2_106180-T 990 779.081 104.199875 1289.999 +CPAR2_106190-T 810 599.118 35.397970 337.000 +CPAR2_106200-T 642 431.159 58.820474 403.000 +CPAR2_106210-T 750 539.128 426.750762 3655.992 +CPAR2_106220-T 1857 1646.075 51.375771 1343.840 +CPAR2_106230-T 2628 2417.075 80.893208 3107.003 +CPAR2_106240-T 705 494.139 14.390958 113.000 +CPAR2_106250-T 1086 875.075 77.379760 1076.000 +CPAR2_106260-T 873 662.100 235.468835 2477.401 +CPAR2_106270-T 2745 2534.075 29.851349 1202.051 +CPAR2_106280-T 1047 836.075 36.053768 479.000 +CPAR2_106290-T 357 146.259 37.433263 87.000 +CPAR2_106300-T 315 104.339 64.535632 107.000 +CPAR2_106310-T 1617 1406.075 91.391899 2042.000 +CPAR2_106320-T 384 173.239 323.299807 890.000 +CPAR2_tR(CCG)1-T 74 74.000 0.000000 0.000 +CPAR2_106330-T 765 554.123 320.714224 2823.996 +CPAR2_106340-T 1716 1505.075 1.965324 47.004 +CPAR2_106350-T 2784 2573.075 14.162488 579.071 +CPAR2_106360-T 555 344.169 6.582500 36.000 +CPAR2_106370-T 2214 2003.075 17.185042 547.000 +CPAR2_106380-T 1263 1052.075 119.810505 2003.001 +CPAR2_106390-T 1005 794.075 90.899661 1147.000 +CPAR2_106400-T 5730 5519.075 161.915771 14200.215 +CPAR2_106410-T 1860 1649.075 57.203380 1499.000 +CPAR2_106420-T 1035 824.075 43.919913 575.132 +CPAR2_106430-T 558 347.169 117.394508 647.632 +CPAR2_106440-T 663 452.143 593.770575 4266.131 +CPAR2_106450-T 510 299.173 245.475673 1167.000 +CPAR2_106460-T 762 551.123 69.082339 605.000 +CPAR2_106470-T 1932 1721.075 46.327477 1267.004 +CPAR2_106480-T 510 299.173 117.373972 558.000 +CPAR2_106490-T 690 479.142 80.823881 615.380 +CPAR2_106500-T 1656 1445.075 16.766051 385.000 +CPAR2_106510-T 2463 2252.075 86.680105 3102.000 +CPAR2_106520-T 1020 809.075 50.946039 654.996 +CPAR2_106530-T 951 740.094 126.305014 1485.412 +CPAR2_106540-T 1254 1043.075 88.114386 1460.501 +CPAR2_106550-T 1491 1280.075 177.580282 3612.183 +CPAR2_106560-T 174 30.057 3950.844469 1887.000 +CPAR2_106570-T 2421 2210.075 69.790576 2451.000 +CPAR2_106580-T 2820 2609.075 67.531629 2799.841 +CPAR2_106590-T 801 590.119 75.922913 711.954 +CPAR2_106600-T 603 392.168 280.818957 1750.000 +CPAR2_106610-T 516 305.173 100.304546 486.414 +CPAR2_106620-T 1395 1184.075 62.713816 1180.000 +CPAR2_106630-T 1080 869.075 112.815970 1558.000 +CPAR2_106640-T 4374 4163.075 19.561529 1294.066 +CPAR2_106650-T 726 515.135 25.654229 210.000 +CPAR2_106660-T 879 668.100 68.060425 722.562 +CPAR2_106670-T 1746 1535.075 14.718792 359.039 +CPAR2_106680-T 1737 1526.075 26.020398 631.000 +CPAR2_106690-T 1788 1577.075 500.132904 12533.643 +CPAR2_106700-T 1776 1565.075 14.860979 369.592 +CPAR2_106710-T 1113 902.075 38.578281 553.000 +CPAR2_106720-T 1461 1250.075 36.598120 727.000 +CPAR2_106730-T 1524 1313.075 9.297638 194.000 +CPAR2_106740-T 1446 1235.075 149.490775 2933.913 +CPAR2_106750-T 2160 1949.075 38.841518 1202.996 +CPAR2_106760-T 1491 1280.075 70.004463 1423.970 +CPAR2_106770-T 903 692.099 137.390423 1510.999 +CPAR2_106780-T 732 521.133 53.019158 439.057 +CPAR2_106790-T 498 287.177 117.675454 537.000 +CPAR2_106800-T 576 365.168 335.481058 1946.706 +CPAR2_106810-T 1167 956.075 35.609486 541.000 +CPAR2_106820-T 1485 1274.075 31.660916 641.000 +CPAR2_106830-T 741 530.132 60.659353 511.000 +CPAR2_106840-T 576 365.168 44.289492 257.000 +CPAR2_106850-T 657 446.145 87.171218 618.000 +CPAR2_106860-T 1398 1187.075 23.060649 435.000 +CPAR2_106870-T 1221 1010.075 53.518012 859.000 +CPAR2_106880-T 2175 1964.075 94.006731 2933.976 +CPAR2_106890-T 1161 950.075 76.768759 1158.996 +CPAR2_106900-T 1884 1673.075 223.256505 5935.524 +CPAR2_106910-T 1215 1004.075 14.415247 230.000 +CPAR2_106920-T 1317 1106.075 8.534284 150.000 +CPAR2_106930-T 642 431.159 117.786463 806.997 +CPAR2_106940-T 1941 1730.075 116.693086 3208.112 +CPAR2_106950-T 393 182.238 164.764622 477.136 +CPAR2_106960-T 2010 1799.075 107.360317 3069.252 +CPAR2_106970-T 645 434.156 144.224411 995.003 +CPAR2_106980-T 765 554.123 99.485137 876.000 +CPAR2_106990-T 1206 995.075 7.525781 119.000 +CPAR2_107000-T 1275 1064.075 16.322898 276.000 +CPAR2_107010-T 411 200.234 89.492369 284.750 +CPAR2_107020-T 312 101.339 885.518176 1425.985 +CPAR2_107030-T 597 386.168 135.016891 828.522 +CPAR2_107040-T 873 662.100 38.110090 400.962 +CPAR2_107050-T 591 380.168 161.042267 972.870 +CPAR2_107060-T 1338 1127.075 31.937700 572.000 +CPAR2_107070-T 810 599.118 165.750733 1578.000 +CPAR2_107080-T 3123 2912.075 24.981343 1156.000 +CPAR2_107090-T 396 185.237 442.534909 1302.614 +CPAR2_107100-T 393 182.238 713.776981 2067.000 +CPAR2_107110-T 930 719.098 37.193024 425.000 +CPAR2_107120-T 822 611.114 30.069127 292.000 +CPAR2_107130-T 2535 2324.075 64.926699 2397.800 +CPAR2_107140-T 636 425.161 168.817632 1140.541 +CPAR2_107150-T 957 746.091 11.639856 138.000 +CPAR2_107160-T 849 638.108 611.308879 6198.608 +CPAR2_107170-T 1245 1034.075 65.664375 1079.000 +CPAR2_107180-T 648 437.154 8.781887 61.004 +CPAR2_107190-T 1089 878.075 9.818595 137.000 +CPAR2_107200-T 408 197.235 1.914382 6.000 +CPAR2_107210-T 2100 1889.075 45.771636 1373.995 +CPAR2_107220-T 2010 1799.075 18.713929 535.000 +CPAR2_107230-T 1563 1352.075 0.046544 1.000 +CPAR2_107240-T 1407 1196.075 99.757377 1896.020 +CPAR2_107250-T 861 650.103 82.570989 853.000 +CPAR2_107260-T 915 704.098 76.596389 857.000 +CPAR2_107270-T 999 788.075 94.435757 1182.616 +CPAR2_107280-T 2904 2693.075 64.984987 2781.000 +CPAR2_107290-T 2964 2753.075 68.099813 2979.226 +CPAR2_107300-T 1281 1070.075 114.444646 1946.029 +CPAR2_107310-T 1542 1331.075 129.943648 2748.509 +CPAR2_107320-T 2748 2537.075 42.415081 1709.988 +CPAR2_107330-T 1059 848.075 81.698379 1101.000 +CPAR2_107340-T 1236 1025.075 59.180555 963.994 +CPAR2_107350-T 1161 950.075 0.595299 8.987 +CPAR2_107360-T 729 518.134 0.000000 0.000 +CPAR2_tT(AGU)1-T 73 73.000 0.000000 0.000 +CPAR2_107370-T 1422 1211.075 23.019353 443.000 +CPAR2_107380-T 1209 998.075 2.395967 38.000 +CPAR2_107390-T 3327 3116.075 81.033973 4012.495 +CPAR2_107400-T 1200 989.075 36.775894 578.006 +CPAR2_107410-T 750 539.128 106.959788 916.329 +CPAR2_107420-T 4065 3854.075 32.346366 1981.003 +CPAR2_107430-T 1245 1034.075 35.844594 589.000 +CPAR2_107440-T 402 191.237 69.104919 210.000 +CPAR2_107450-T 699 488.140 32.100767 249.000 +CPAR2_107460-T 408 197.235 1642.877408 5149.058 +CPAR2_107470-T 747 536.129 91.908016 783.000 +CPAR2_107480-T 1113 902.075 7.534276 108.000 +CPAR2_107490-T 5163 4952.075 15.325710 1206.000 +CPAR2_107500-T 654 443.147 219.686568 1547.000 +CPAR2_107510-T 1689 1478.075 76.253462 1791.000 +CPAR2_107520-T 1920 1709.075 64.363693 1748.001 +CPAR2_107530-T 231 21.489 1959.178451 669.000 +CPAR2_107540-T 750 539.128 14.240619 122.000 +CPAR2_107550-T 456 245.187 133.207368 518.998 +CPAR2_107560-T 1101 890.075 35.068360 496.000 +CPAR2_107570-T 915 704.098 2.323811 26.000 +CPAR2_107580-T 1161 950.075 18.812225 284.013 +CPAR2_tN(GUU)1-T 74 74.000 0.000000 0.000 +CPAR2_107590-T 495 284.177 123.346646 557.000 +CPAR2_107600-T 1059 848.075 183.642813 2474.844 +CPAR2_107610-T 1536 1325.075 54.805587 1153.997 +CPAR2_107620-T 2181 1970.075 21.916898 686.122 +CPAR2_107630-T 249 38.415 1783.980798 1089.000 +CPAR2_107640-T 2232 2021.075 80.253132 2577.413 +CPAR2_107650-T 744 533.131 76.135358 645.000 +CPAR2_107660-T 1125 914.075 6.196138 90.000 +CPAR2_107670-T 1170 959.075 36.088640 550.000 +CPAR2_107680-T 4320 4109.075 35.546070 2321.000 +CPAR2_107690-T 2196 1985.075 112.653805 3553.549 +CPAR2_107700-T 2247 2036.075 70.449591 2279.354 +CPAR2_107710-T 480 269.180 68.499290 293.000 +CPAR2_107720-T 546 335.169 392.346082 2089.648 +CPAR2_107730-T 564 353.169 32.252014 181.000 +CPAR2_107740-T 1701 1490.075 53.527063 1267.422 +CPAR2_107750-T 3720 3509.075 15.602246 870.000 +CPAR2_107760-T 2130 1919.075 17.576537 536.000 +CPAR2_107770-T 1827 1616.075 55.393436 1422.523 +CPAR2_107780-T 639 428.160 14.844852 101.000 +CPAR2_107790-T 1047 836.075 91.903236 1221.000 +CPAR2_107800-T 1707 1496.075 38.824761 923.000 +CPAR2_107810-T 2052 1841.075 39.628503 1159.361 +CPAR2_107820-T 1959 1748.075 46.528540 1292.466 +CPAR2_107830-T 726 515.135 32.251030 264.000 +CPAR2_107840-T 1917 1706.075 76.391044 2071.000 +CPAR2_107850-T 1902 1691.075 26.346981 708.000 +CPAR2_107860-T 1344 1133.075 79.603885 1433.285 +CPAR2_107870-T 588 377.168 65.791285 394.315 +CPAR2_107880-T 489 278.177 81.214422 359.000 +CPAR2_107890-T 1215 1004.075 84.855921 1353.904 +CPAR2_107900-T 1311 1100.075 245.009076 4282.960 +CPAR2_107910-T 1614 1403.075 66.335508 1478.994 +CPAR2_107920-T 267 56.381 327.038319 293.000 +CPAR2_107930-T 237 26.695 893.436886 379.000 +CPAR2_107940-T 1299 1088.075 554.282153 9583.614 +CPAR2_107950-T 1173 962.075 37.349740 571.000 +CPAR2_107960-T 1263 1052.075 7.297491 122.000 +CPAR2_107970-T 1098 887.075 69.261865 976.324 +CPAR2_107980-T 777 566.119 13.339329 120.000 +CPAR2_107990-T 894 683.099 17.780091 193.000 +CPAR2_108000-T 1011 800.075 21.865940 277.996 +CPAR2_108010-T 1725 1514.075 10.765144 259.004 +CPAR2_108020-T 606 395.168 81.376668 511.000 +CPAR2_108030-T 2316 2105.075 50.073474 1675.000 +CPAR2_108040-T 1197 986.075 85.814420 1344.652 +CPAR2_108050-T 2682 2471.075 17.979569 706.000 +CPAR2_108060-T 1776 1565.075 18.174553 452.000 +CPAR2_108070-T 1689 1478.075 25.077213 589.000 +CPAR2_108080-T 924 713.098 114.367699 1295.961 +CPAR2_108090-T 1338 1127.075 73.646549 1319.000 +CPAR2_108100-T 4026 3815.075 41.666861 2526.000 +CPAR2_108120-T 531 320.171 62.702083 319.009 +CPAR2_108130-T 2004 1793.075 16.152248 460.226 +CPAR2_108140-T 1062 851.075 433.311840 5860.140 +CPAR2_108150-T 270 59.377 1.059846 1.000 +CPAR2_108170-T 3807 3596.075 78.369028 4478.295 +CPAR2_108180-T 2691 2480.075 129.556460 5105.795 +CPAR2_108190-T 2670 2459.075 45.211014 1766.670 +CPAR2_108200-T 270 59.377 919.946428 868.000 +CPAR2_108210-T 1644 1433.075 16.446265 374.521 +CPAR2_108220-T 1656 1445.075 2.395150 55.000 +CPAR2_108230-T 996 785.076 2417.403826 30157.845 +CPAR2_108240-T 861 650.103 119.161649 1231.000 +CPAR2_108260-T 999 788.075 44.080905 552.024 +CPAR2_108270-T 3855 3644.075 14.179541 821.087 +CPAR2_108280-T 1035 824.075 863.056677 11301.750 +CPAR2_108290-T 492 281.177 63.569875 284.034 +CPAR2_108300-T 558 347.169 93.715162 517.000 +CPAR2_108320-T 996 785.076 0.000000 0.000 +CPAR2_108330-T 270 59.377 955.981195 902.000 +CPAR2_108340-T 1638 1427.075 4.189259 95.000 +CPAR2_108350-T 1626 1415.075 1.111785 25.000 +CPAR2_108360-T 1632 1421.075 0.000000 0.000 +CPAR2_108370-T 1632 1421.075 296.751359 6701.149 +CPAR2_108380-T 2217 2006.075 120.228914 3832.619 +CPAR2_108390-T 2112 1901.075 76.201432 2301.982 +CPAR2_108400-T 4203 3992.075 20.950937 1329.051 +CPAR2_108410-T 2550 2339.075 29.944124 1113.000 +CPAR2_108420-T 1053 842.075 68.910709 922.098 +CPAR2_108430-T 810 599.118 67.434709 642.000 +CPAR2_108440-T 192 10.918 691.689950 120.000 +CPAR2_108450-T 1050 839.075 71.775863 957.015 +CPAR2_108460-T 468 257.182 460.999577 1884.000 +CPAR2_108470-T 2016 1805.075 55.188188 1583.000 +CPAR2_108480-T 480 269.180 236.591403 1012.000 +CPAR2_108490-T 1035 824.075 289.803895 3794.990 +CPAR2_108500-T 1752 1541.075 49.247477 1206.000 +CPAR2_108510-T 435 224.209 87.800779 312.817 +CPAR2_108520-T 678 467.143 7.005097 52.000 +CPAR2_108530-T 972 761.086 129.673865 1568.287 +CPAR2_108540-T 1734 1523.075 51.539992 1247.398 +CPAR2_108550-T 843 632.108 21.305068 214.000 +CPAR2_108560-T 1302 1091.075 581.268152 10077.916 +CPAR2_108570-T 3540 3329.075 80.286259 4247.215 +CPAR2_108580-T 1209 998.075 76.986202 1221.000 +CPAR2_108590-T 813 602.117 814.036136 7788.681 +CPAR2_108600-T 1698 1487.075 68.386178 1615.998 +CPAR2_108610-T 429 218.220 57.676119 200.000 +CPAR2_108620-T 1227 1016.075 13.625653 220.000 +CPAR2_108630-T 1956 1745.075 19.437264 539.000 +CPAR2_108640-T 1131 920.075 40.149049 587.000 +CPAR2_108650-T 924 713.098 134.521186 1524.331 +CPAR2_108660-T 1776 1565.075 24.809095 617.001 +CPAR2_108670-T 1407 1196.075 49.036327 932.000 +CPAR2_108680-T 1296 1085.075 81.658582 1407.995 +CPAR2_108690-T 1449 1238.075 176.088957 3464.325 +CPAR2_108700-T 1620 1409.075 29.074170 651.000 +CPAR2_108710-T 837 626.110 146.609346 1458.651 +CPAR2_108720-T 2649 2438.075 72.452912 2807.000 +CPAR2_108740-T 1953 1742.075 138.427539 3832.030 +CPAR2_108750-T 4212 4001.075 23.752093 1510.143 +CPAR2_108760-T 1863 1652.075 68.772007 1805.431 +CPAR2_108770-T 1941 1730.075 25.825806 710.000 +CPAR2_108780-T 1062 851.075 72.526959 980.860 +CPAR2_108790-T 1458 1247.075 157.390909 3118.974 +CPAR2_108800-T 1095 884.075 14.592347 205.000 +CPAR2_108810-T 1443 1232.075 26.304528 515.000 +CPAR2_108820-T 3786 3575.075 36.918402 2097.334 +CPAR2_108830-T 2874 2663.075 94.658102 4005.721 +CPAR2_108840-T 1383 1172.075 43.812212 816.000 +CPAR2_108850-T 2772 2561.075 19.116914 778.000 +CPAR2_108860-T 1896 1685.075 103.566272 2773.174 +CPAR2_108870-T 987 776.081 22.136857 273.000 +CPAR2_108880-T 1665 1454.075 55.136992 1274.000 +CPAR2_tT(CGU)1-T 72 72.000 0.000000 0.000 +CPAR2_108890-T 3282 3071.075 4.157180 202.875 +CPAR2_108900-T 1263 1052.075 106.650945 1782.999 +CPAR2_108910-T 1080 869.075 199.223252 2751.293 +CPAR2_108915-T 234 23.994 437.991284 167.000 +CPAR2_108920-T 501 290.176 67.880207 313.000 +CPAR2_108930-T 753 542.127 72.202170 622.000 +CPAR2_108940-T 3486 3275.075 16.447997 856.000 +CPAR2_108950-T 393 182.238 247.538363 716.837 +CPAR2_108960-T 567 356.169 103.552204 586.077 +CPAR2_108970-T 834 623.110 153.308973 1518.000 +CPAR2_108980-T 498 287.177 140.465486 641.000 +CPAR2_108990-T 1719 1508.075 37.514331 899.000 +CPAR2_109000-T 1431 1220.075 100.424869 1947.006 +CPAR2_109010-T 546 335.169 47.878038 255.000 +CPAR2_109020-T 621 410.166 305.318922 1990.000 +CPAR2_109030-T 864 653.103 46.058616 478.004 +CPAR2_109040-T 849 638.108 69.527345 705.000 +CPAR2_109060-T 3066 2855.075 21.801283 989.097 +CPAR2_109070-T 480 269.180 52.835709 226.000 +CPAR2_109080-T 2178 1967.075 112.900221 3529.029 +CPAR2_109090-T 3816 3605.075 35.702272 2045.265 +CPAR2_109100-T 2004 1793.075 12.556570 357.774 +CPAR2_109110-T 579 368.168 75.719719 442.991 +CPAR2_109120-T 1629 1418.075 30.434623 685.815 +CPAR2_109130-T 474 263.181 21.520313 90.000 +CPAR2_109140-T 864 653.103 20.812914 216.000 +CPAR2_109150-T 1194 983.075 215.918929 3373.005 +CPAR2_109160-T 1818 1607.075 46.950854 1199.000 +CPAR2_109170-T 264 53.386 177.995073 151.000 +CPAR2_109180-T 1641 1430.075 139.091811 3160.821 +CPAR2_109190-T 1986 1775.075 72.257092 2038.153 +CPAR2_109200-T 1467 1256.075 95.581914 1907.791 +CPAR2_109210-T 1026 815.075 87.785597 1137.000 +CPAR2_109220-T 1716 1505.075 117.283030 2805.000 +CPAR2_109230-T 3048 2837.075 46.680377 2104.479 +CPAR2_109240-T 1425 1214.075 147.385135 2843.405 +CPAR2_109250-T 747 536.129 232.221971 1978.389 +CPAR2_109260-T 681 470.143 532.924785 3981.395 +CPAR2_109270-T 2028 1817.075 811.397288 23428.578 +CPAR2_109280-T 690 479.142 342.951751 2611.178 +CPAR2_109290-T 1956 1745.075 39.090899 1084.000 +CPAR2_109300-T 1740 1529.075 36.052532 876.000 +CPAR2_109310-T 1554 1343.075 85.839197 1832.000 +CPAR2_109320-T 3468 3257.075 22.140753 1145.934 +CPAR2_109330-T 576 365.168 49.670380 288.224 +CPAR2_109340-T 522 311.173 61.277584 303.000 +CPAR2_109350-T 531 320.171 45.600203 232.000 +CPAR2_109360-T 3687 3476.075 68.063710 3759.623 +CPAR2_109370-T 822 611.114 72.907335 708.000 +CPAR2_109380-T 612 401.167 360.031291 2295.117 +CPAR2_109390-T 1002 791.075 137.972313 1734.400 +CPAR2_109400-T 741 530.132 874.025375 7362.871 +CPAR2_109410-T 2514 2303.075 27.406489 1003.000 +CPAR2_109420-T 975 764.085 181.522148 2203.995 +CPAR2_109430-T 492 281.177 40.285958 180.000 +CPAR2_109440-T 4437 4226.075 13.461447 904.000 +CPAR2_109450-T 1437 1226.075 38.146264 743.205 +CPAR2_109470-T 1002 791.075 96.303798 1210.600 +CPAR2_109480-T 795 584.119 252.570130 2344.351 +CPAR2_109490-T 1146 935.075 124.437616 1849.003 +CPAR2_109500-T 1665 1454.075 99.281250 2294.001 +CPAR2_109510-T 2136 1925.075 122.913527 3759.991 +CPAR2_109520-T 1734 1523.075 37.071073 897.214 +CPAR2_109530-T 1149 938.075 58.028179 865.000 +CPAR2_109540-T 1653 1442.075 342.173222 7841.035 +CPAR2_109545-T 468 257.182 31.565258 129.000 +CPAR2_109550-T 750 539.128 61.514807 527.000 +CPAR2_109560-T 1641 1430.075 144.996345 3295.000 +CPAR2_109570-T 735 524.133 45.024627 375.000 +CPAR2_109580-T 2421 2210.075 42.540645 1494.000 +CPAR2_109590-T 3552 3341.075 58.804042 3122.000 +CPAR2_109600-T 2466 2255.075 175.956545 6305.303 +CPAR2_109610-T 1428 1217.075 103.120038 1994.344 +CPAR2_109620-T 1773 1562.075 8.540719 212.000 +CPAR2_109630-T 603 392.168 1025.070634 6388.008 +CPAR2_109640-T 966 755.088 619.377116 7431.764 +CPAR2_109650-T 1374 1163.075 260.741560 4819.007 +CPAR2_109660-T 1701 1490.075 649.441675 15377.574 +CPAR2_109670-T 2139 1928.075 33.214590 1017.636 +CPAR2_109680-T 4779 4568.075 6.296151 457.033 +CPAR2_109690-T 1587 1376.075 20.487936 448.002 +CPAR2_109700-T 900 689.099 26.848880 294.000 +CPAR2_109710-T 558 347.169 89.002214 491.000 +CPAR2_109720-T 879 668.100 30.141813 320.000 +CPAR2_109730-T 1287 1076.075 32.758809 560.158 +CPAR2_109740-T 447 236.194 406.580916 1526.000 +CPAR2_109750-T 1884 1673.075 36.259850 964.009 +CPAR2_109760-T 2241 2030.075 57.912668 1868.208 +CPAR2_109770-T 1377 1166.075 12.628443 234.000 +CPAR2_109780-T 2001 1790.075 14.413879 410.007 +CPAR2_109790-T 2490 2279.075 40.354119 1461.457 +CPAR2_109800-T 2511 2300.075 302.826020 11068.141 +CPAR2_109810-T 2229 2018.075 40.347613 1293.882 +CPAR2_109830-T 909 698.099 108.027773 1198.373 +CPAR2_109840-T 2223 2012.075 93.505395 2989.650 +CPAR2_109850-T 1500 1289.075 176.547906 3616.432 +CPAR2_109860-T 6864 6653.075 28.521998 3015.378 +CPAR2_109870-T 915 704.098 95.633764 1070.000 +CPAR2_109880-T 594 383.168 52.720110 321.000 +CPAR2_109890-T 654 443.147 49.276819 347.000 +CPAR2_109900-T 1473 1262.075 14.859071 298.000 +CPAR2_109910-T 933 722.098 74.300787 852.568 +CPAR2_109920-T 1767 1556.075 20.746617 513.000 +CPAR2_109930-T 1755 1544.075 45.909315 1126.442 +CPAR2_109940-T 270 59.377 309.475065 292.000 +CPAR2_109950-T 2970 2759.075 73.852553 3237.938 +CPAR2_109960-T 1062 851.075 69.431754 939.000 +CPAR2_109970-T 468 257.182 1098.859354 4490.787 +CPAR2_109980-T 3129 2918.075 31.029397 1438.829 +CPAR2_109990-T 1962 1751.075 24.227970 674.157 +CPAR2_110000-T 369 158.243 88.713477 223.077 +CPAR2_110010-T 4284 4073.075 59.052823 3822.105 +CPAR2_110020-T 3765 3554.075 38.706544 2186.002 +CPAR2_110030-T 864 653.103 31.990219 332.000 +CPAR2_110040-T 627 416.165 217.295902 1437.000 +CPAR2_110050-T 1956 1745.075 19.148770 531.000 +CPAR2_110060-T 1593 1382.075 27.985650 614.620 +CPAR2_110070-T 2034 1823.075 31.135975 902.000 +CPAR2_110080-T 1020 809.075 28.078816 361.000 +CPAR2_110090-T 399 188.237 53.824765 161.000 +CPAR2_110100-T 942 731.098 100.107084 1163.000 +CPAR2_110110-T 456 245.187 193.883309 755.401 +CPAR2_110120-T 1377 1166.075 13.491926 250.000 +CPAR2_110130-T 1302 1091.075 14.188645 246.000 +CPAR2_110140-T 312 101.339 370.729336 597.000 +CPAR2_110150-T 852 641.107 96.392125 982.000 +CPAR2_110160-T 1722 1511.075 4.456134 107.000 +CPAR2_110170-T 792 581.119 11.045766 102.000 +CPAR2_110180-T 1974 1763.075 47.936431 1343.000 +CPAR2_110190-T 786 575.119 240.940937 2201.951 +CPAR2_110200-T 2316 2105.075 81.642351 2731.006 +CPAR2_110210-T 1401 1190.075 163.990500 3101.220 +CPAR2_110220-T 1758 1547.075 96.974006 2384.000 +CPAR2_110230-T 798 587.119 46.196798 431.000 +CPAR2_110240-T 2895 2684.075 87.269269 3722.164 +CPAR2_110250-T 609 398.167 30.029520 190.000 +CPAR2_110260-T 4341 4130.075 40.845840 2680.682 +CPAR2_110270-T 2364 2153.075 39.434118 1349.183 +CPAR2_110280-T 603 392.168 41.882142 261.000 +CPAR2_110290-T 771 560.120 336.542380 2995.440 +CPAR2_110300-T 4392 4181.075 69.741077 4633.574 +CPAR2_110310-T 531 320.171 285.394365 1452.000 +CPAR2_110320-T 1305 1094.075 161.791908 2812.830 +CPAR2_110330-T 3105 2894.075 63.363662 2914.000 +CPAR2_110340-T 1746 1535.075 40.380072 985.000 +CPAR2_110350-T 543 332.169 112.913820 596.000 +CPAR2_110360-T 3117 2906.075 49.486183 2285.232 +CPAR2_110370-T 1941 1730.075 89.953829 2473.000 +CPAR2_110380-T 1848 1637.075 161.358098 4197.579 +CPAR2_110390-T 3486 3275.075 49.824365 2593.000 +CPAR2_110400-T 2001 1790.075 311.023646 8847.166 +CPAR2_110410-T 1872 1661.075 53.607781 1415.001 +CPAR2_110420-T 888 677.099 186.718808 2009.000 +CPAR2_110430-T 1152 941.075 132.621522 1983.252 +CPAR2_110440-T 1851 1640.075 109.624209 2856.997 +CPAR2_110450-T 1170 959.075 56.621442 862.925 +CPAR2_110460-T 1029 818.075 94.616551 1229.985 +CPAR2_110470-T 1266 1055.075 298.877944 5010.912 +CPAR2_110480-T 1878 1667.075 14.118134 374.000 +CPAR2_110490-T 2175 1964.075 11.598744 362.000 +CPAR2_300010-T 4499 4288.075 10.984130 748.458 +CPAR2_300020-T 1044 833.075 22.164474 293.414 +CPAR2_300030-T 240 29.539 244.999365 115.000 +CPAR2_300040-T 795 584.119 84.787951 787.000 +CPAR2_300050-T 705 494.139 0.509414 4.000 +CPAR2_300060-T 807 596.118 35.153841 333.000 +CPAR2_300070-T 2385 2174.075 27.324861 944.000 +CPAR2_300080-T 702 491.139 27.163877 212.000 +CPAR2_300090-T 1197 986.075 37.145443 582.043 +CPAR2_300100-T 2115 1904.075 93.171978 2819.090 +CPAR2_300110-T 2757 2546.075 6.670634 269.884 +CPAR2_300120-T 2775 2564.075 4.592400 187.116 +CPAR2_300130-T 2022 1811.075 29.118437 838.000 +CPAR2_300140-T 462 251.185 136.737835 545.785 +CPAR2_300150-T 1071 860.075 32.194133 440.000 +CPAR2_300160-T 564 353.169 39.379531 221.000 +CPAR2_300170-T 693 482.142 53.253228 408.000 +CPAR2_300180-T 447 236.194 349.830106 1313.000 +CPAR2_300190-T 2343 2132.075 89.937332 3047.067 +CPAR2_300200-T 2730 2519.075 7.494465 300.000 +CPAR2_300210-T 699 488.140 61.365321 476.000 +CPAR2_300220-T 2052 1841.075 64.465993 1886.000 +CPAR2_300230-T 816 605.115 76.438656 735.006 +CPAR2_300240-T 438 227.205 789.517454 2850.489 +CPAR2_300250-T 1437 1226.075 35.373755 689.188 +CPAR2_300260-T 2013 1802.075 63.621445 1821.864 +CPAR2_300270-T 939 728.098 149.871790 1734.000 +CPAR2_300280-T 1134 923.075 1.568019 23.000 +CPAR2_300290-T 444 233.197 162.995020 604.000 +CPAR2_300300-T 3648 3437.075 61.533021 3360.754 +CPAR2_300310-T 1839 1628.075 21.336596 552.000 +CPAR2_300320-T 1023 812.075 249.549017 3220.265 +CPAR2_300330-T 4515 4304.075 58.918048 4029.653 +CPAR2_300340-T 1044 833.075 10.348963 137.000 +CPAR2_300350-T 1221 1010.075 113.840624 1827.218 +CPAR2_300360-T 279 68.363 169.377460 184.000 +CPAR2_300370-T 963 752.090 14.752281 176.307 +CPAR2_300380-T 843 632.108 208.471216 2094.001 +CPAR2_300390-T 2292 2081.075 93.017326 3076.034 +CPAR2_300400-T 915 704.098 31.907714 357.000 +CPAR2_300410-T 1140 929.075 62.789837 927.000 +CPAR2_300420-T 1410 1199.075 37.210055 709.000 +CPAR2_300430-T 951 740.094 165.383894 1945.000 +CPAR2_300440-T 1683 1472.075 28.086388 657.000 +CPAR2_300450-T 1215 1004.075 11.782898 188.000 +CPAR2_300460-T 510 299.173 29.448675 140.000 +CPAR2_300470-T 750 539.128 26.847069 230.000 +CPAR2_300480-T 1689 1478.075 72.097661 1693.391 +CPAR2_300490-T 5013 4802.075 12.881513 982.959 +CPAR2_300500-T 1905 1694.075 36.367255 979.000 +CPAR2_300510-T 1023 812.075 25.882767 334.000 +CPAR2_300520-T 525 314.172 156.638949 782.000 +CPAR2_300530-T 1245 1034.075 63.777818 1048.000 +CPAR2_300540-T 1836 1625.075 73.499310 1898.000 +CPAR2_300550-T 1227 1016.075 93.011807 1501.770 +CPAR2_300560-T 660 449.144 105.225175 751.008 +CPAR2_300570-T 816 605.115 120.014726 1154.017 +CPAR2_300580-T 666 455.143 2.677009 19.361 +CPAR2_300590-T 1863 1652.075 52.186453 1370.021 +CPAR2_300600-T 555 344.169 2.583803 14.131 +CPAR2_300610-T 450 239.191 0.000000 0.000 +CPAR2_300620-T 1752 1541.075 11.174164 273.639 +CPAR2_300630-T 1791 1580.075 0.238938 5.999 +CPAR2_300640-T 2967 2756.075 74.409924 3258.828 +CPAR2_300650-T 654 443.147 130.934064 922.018 +CPAR2_300660-T 669 458.143 67.031542 488.000 +CPAR2_300670-T 1557 1346.075 2.010294 43.000 +CPAR2_300680-T 1764 1553.075 3.363149 83.000 +CPAR2_300690-T 1755 1544.075 65.168921 1599.000 +CPAR2_300700-T 927 716.098 86.034150 979.000 +CPAR2_300710-T 2436 2225.075 27.518764 973.001 +CPAR2_300720-T 1191 980.075 36.535357 569.000 +CPAR2_300730-T 1740 1529.075 26.886599 653.287 +CPAR2_300740-T 1881 1670.075 40.602744 1077.534 +CPAR2_300750-T 1719 1508.075 28.984172 694.582 +CPAR2_300760-T 1860 1649.075 145.409206 3810.411 +CPAR2_300770-T 1794 1583.075 120.011284 3019.000 +CPAR2_300780-T 1806 1595.075 67.553892 1712.265 +CPAR2_300790-T 1092 881.075 1004.852272 14068.724 +CPAR2_300800-T 1059 848.075 88.005701 1186.000 +CPAR2_300810-T 2982 2771.075 55.487377 2443.329 +CPAR2_300820-T 1725 1514.075 68.519828 1648.554 +CPAR2_300830-T 408 197.235 266.099129 834.000 +CPAR2_300840-T 1830 1619.075 117.421594 3021.026 +CPAR2_300850-T 2376 2165.075 42.513896 1462.660 +CPAR2_300860-T 2028 1817.075 28.468162 822.000 +CPAR2_300870-T 546 335.169 53.559442 285.259 +CPAR2_300880-T 1305 1094.075 45.497738 791.000 +CPAR2_300890-T 3351 3140.075 32.939797 1643.616 +CPAR2_300900-T 2316 2105.075 172.594827 5773.443 +CPAR2_300910-T 1074 863.075 20.124307 276.000 +CPAR2_300920-T 909 698.099 39.573821 439.000 +CPAR2_300930-T 3141 2930.075 97.400022 4535.000 +CPAR2_300940-T 552 341.169 132.142713 716.395 +CPAR2_300950-T 288 77.347 395.413010 486.000 +CPAR2_300960-T 669 458.143 61.811873 450.000 +CPAR2_300970-T 3336 3125.075 20.318447 1008.998 +CPAR2_300980-T 1230 1019.075 63.605034 1030.000 +CPAR2_300990-T 1158 947.075 47.376782 713.000 +CPAR2_301000-T 1530 1319.075 57.236673 1199.730 +CPAR2_301010-T 1554 1343.075 33.761762 720.551 +CPAR2_301020-T 1980 1769.075 991.654926 27877.020 +CPAR2_301030-T 204 8.232 5488.982973 718.000 +CPAR2_301040-T 2415 2204.075 101.416139 3552.000 +CPAR2_301050-T 798 587.119 37.652582 351.285 +CPAR2_301060-T 3501 3290.075 54.649140 2857.121 +CPAR2_301070-T 672 461.143 60.727439 445.000 +CPAR2_301080-T 867 656.101 19.854543 207.000 +CPAR2_301090-T 1317 1106.075 54.278048 954.000 +CPAR2_301100-T 1845 1634.075 23.029773 598.000 +CPAR2_301110-T 2178 1967.075 82.620450 2582.546 +CPAR2_301120-T 1656 1445.075 1.132253 26.000 +CPAR2_301130-T 1647 1436.075 0.744959 17.000 +CPAR2_301140-T 2280 2069.075 0.121659 4.000 +CPAR2_301150-T 891 680.099 52.187593 564.000 +CPAR2_301160-T 1680 1469.075 325.910889 7608.208 +CPAR2_301170-T 2331 2120.075 92.690131 3122.657 +CPAR2_301180-T 771 560.120 70.109487 624.019 +CPAR2_301190-T 1311 1100.075 55.840031 976.130 +CPAR2_301200-T 3720 3509.075 45.067176 2513.000 +CPAR2_301210-T 1314 1103.075 36.854277 646.000 +CPAR2_301220-T 1044 833.075 4.456853 59.000 +CPAR2_301230-T 465 254.184 285.752759 1154.192 +CPAR2_301240-T 2049 1838.075 54.505502 1592.000 +CPAR2_301250-T 675 464.143 62.639861 462.000 +CPAR2_301260-T 357 146.259 116.172197 270.000 +CPAR2_301270-T 2379 2168.075 37.501505 1292.000 +CPAR2_301280-T 1842 1631.075 23.380789 606.000 +CPAR2_301290-T 1320 1109.075 37.165571 655.000 +CPAR2_301300-T 1245 1034.075 39.252569 645.000 +CPAR2_301310-T 1236 1025.075 28.730992 468.000 +CPAR2_301320-T 1260 1049.075 29.933288 499.000 +CPAR2_301330-T 1314 1103.075 23.846990 418.002 +CPAR2_301340-T 942 731.098 1460.388201 16966.147 +CPAR2_301350-T 1251 1040.075 48.525512 802.000 +CPAR2_301360-T 2766 2555.075 63.999597 2598.486 +CPAR2_301370-T 1125 914.075 59.895999 870.000 +CPAR2_301380-T 2952 2741.075 48.356852 2106.291 +CPAR2_301390-T 1689 1478.075 272.290071 6395.402 +CPAR2_301400-T 2706 2495.075 84.821072 3363.000 +CPAR2_301410-T 1131 920.075 57.256244 837.116 +CPAR2_301420-T 849 638.108 62.357873 632.302 +CPAR2_301430-T 2682 2471.075 75.792113 2976.113 +CPAR2_301440-T 900 689.099 185.202481 2028.000 +CPAR2_301450-T 891 680.099 95.678542 1034.014 +CPAR2_301460-T 1548 1337.075 48.115642 1022.308 +CPAR2_301470-T 1629 1418.075 109.656402 2471.000 +CPAR2_301480-T 1545 1334.075 0.849088 18.000 +CPAR2_301490-T 723 512.135 78.642278 640.000 +CPAR2_301500-T 1317 1106.075 66.404258 1167.132 +CPAR2_301510-T 3381 3170.075 33.731037 1699.177 +CPAR2_301520-T 531 320.171 39.507070 201.000 +CPAR2_301530-T 2727 2516.075 52.398751 2095.000 +CPAR2_301540-T 726 515.135 265.460184 2173.000 +CPAR2_301550-T 1062 851.075 47.618796 644.000 +CPAR2_301560-T 207 8.931 1698.237136 241.000 +CPAR2_301570-T 3690 3479.075 92.704302 5125.110 +CPAR2_301580-T 1245 1034.075 17.952725 295.000 +CPAR2_301590-T 1386 1175.075 2.107358 39.350 +CPAR2_301600-T 1296 1085.075 134.781412 2323.964 +CPAR2_301610-T 1770 1559.075 46.641064 1155.513 +CPAR2_301620-T 924 713.098 145.667987 1650.641 +CPAR2_301630-T 1002 791.075 109.197766 1372.685 +CPAR2_301640-T 1902 1691.075 124.105362 3334.978 +CPAR2_301650-T 888 677.099 27.696468 298.000 +CPAR2_301660-T 1248 1037.075 20.934825 345.000 +CPAR2_301670-T 1413 1202.075 72.297377 1381.000 +CPAR2_301680-T 351 140.276 0.000000 0.000 +CPAR2_301690-T 1560 1349.075 8.956237 192.000 +CPAR2_301700-T 1830 1619.075 17.374048 447.000 +CPAR2_301710-T 840 629.109 104.416950 1043.846 +CPAR2_301720-T 204 8.232 2645.108786 346.000 +CPAR2_301730-T 2562 2351.075 364.503504 13617.824 +CPAR2_301740-T 3069 2858.075 62.774621 2851.000 +CPAR2_301750-T 1920 1709.075 1.473670 40.022 +CPAR2_301760-T 1677 1466.075 2.618389 61.000 +CPAR2_301770-T 1494 1283.075 92.455946 1885.066 +CPAR2_301780-T 1503 1292.075 41.058250 843.000 +CPAR2_301790-T 1821 1610.075 84.982530 2174.279 +CPAR2_301800-T 2181 1970.075 26.832245 840.000 +CPAR2_301810-T 3552 3341.075 40.904402 2171.680 +CPAR2_301820-T 1497 1286.075 98.012725 2003.034 +CPAR2_301830-T 669 458.143 18.026127 131.233 +CPAR2_301840-T 606 395.168 9.054594 56.858 +CPAR2_301850-T 1317 1106.075 73.362247 1289.427 +CPAR2_301860-T 2679 2468.075 21.596608 847.000 +CPAR2_301870-T 1131 920.075 2.804278 41.000 +CPAR2_301880-T 1656 1445.075 281.307359 6459.680 +CPAR2_301890-T 2697 2486.075 28.133873 1111.433 +CPAR2_301900-T 2682 2471.075 28.955764 1137.000 +CPAR2_301910-T 1824 1613.075 62.147216 1593.000 +CPAR2_301920-T 903 692.099 108.151221 1189.431 +CPAR2_301930-T 3204 2993.075 66.931157 3183.358 +CPAR2_301940-T 1320 1109.075 5.106720 90.000 +CPAR2_301950-T 1221 1010.075 32.895897 528.001 +CPAR2_301960-T 2046 1835.075 44.340969 1293.000 +CPAR2_301970-T 1467 1256.075 55.564348 1109.051 +CPAR2_301980-T 2301 2090.075 39.804307 1322.000 +CPAR2_301990-T 3039 2828.075 58.040321 2608.316 +CPAR2_302000-T 1878 1667.075 35.937038 952.000 +CPAR2_302010-T 1344 1133.075 55.428395 998.000 +CPAR2_302020-T 666 455.143 51.711136 374.000 +CPAR2_302030-T 1782 1571.075 110.793866 2766.000 +CPAR2_302040-T 1290 1079.075 46.904999 804.286 +CPAR2_302050-T 447 236.194 41.031102 154.000 +CPAR2_302060-T 939 728.098 180.207876 2084.985 +CPAR2_302070-T 1446 1235.075 120.197802 2359.008 +CPAR2_302080-T 567 356.169 4.770552 27.000 +CPAR2_302090-T 1452 1241.075 40.681054 802.287 +CPAR2_302100-T 7080 6869.075 43.235028 4719.255 +CPAR2_302110-T 1056 845.075 72.027973 967.244 +CPAR2_302120-T 750 539.128 41.554594 356.000 +CPAR2_302130-T 1245 1034.075 0.242372 3.983 +CPAR2_302140-T 1599 1388.075 15.051702 332.000 +CPAR2_302150-T 927 716.098 101.453092 1154.455 +CPAR2_302160-T 711 500.137 295.106042 2345.342 +CPAR2_302170-T 1470 1259.075 415.459215 8312.268 +CPAR2_302180-T 618 407.166 125.562307 812.401 +CPAR2_302190-T 2016 1805.075 48.683861 1396.432 +CPAR2_302200-T 129 21.256 0.000000 0.000 +CPAR2_302210-T 591 380.168 45.190540 273.000 +CPAR2_302220-T 4836 4625.075 30.631565 2251.269 +CPAR2_302230-T 2262 2051.075 88.542975 2885.859 +CPAR2_302240-T 1389 1178.075 60.575993 1134.000 +CPAR2_302250-T 3231 3020.075 92.124008 4421.097 +CPAR2_302260-T 750 539.128 38.636435 331.000 +CPAR2_302270-T 846 635.108 25.960568 262.000 +CPAR2_302280-T 1056 845.075 35.376556 475.062 +CPAR2_302290-T 570 359.169 80.597204 460.000 +CPAR2_302300-T 624 413.166 29.548637 194.000 +CPAR2_302310-T 1446 1235.075 104.430864 2049.565 +CPAR2_302320-T 516 305.173 112.385745 545.000 +CPAR2_302330-T 507 296.175 68.630214 323.000 +CPAR2_302340-T 1635 1424.075 21.520708 487.000 +CPAR2_302350-T 2805 2594.075 77.482684 3193.940 +CPAR2_302360-T 2049 1838.075 70.309528 2053.605 +CPAR2_302370-T 969 758.086 127.672836 1538.000 +CPAR2_302380-T 1689 1478.075 30.271475 711.000 +CPAR2_302390-T 1614 1403.075 130.592794 2911.653 +CPAR2_302400-T 594 383.168 47.457347 288.956 +CPAR2_302410-T 1803 1592.075 47.274628 1196.000 +CPAR2_302420-T 750 539.128 64.899872 556.000 +CPAR2_302430-T 990 779.081 72.212983 894.000 +CPAR2_302440-T 1341 1130.075 341.406492 6130.821 +CPAR2_302450-T 621 410.166 1.380839 9.000 +CPAR2_302460-T 1671 1460.075 86.977406 2018.000 +CPAR2_302470-T 288 77.347 65.088561 80.000 +CPAR2_302480-T 1251 1040.075 129.086911 2133.470 +CPAR2_302490-T 3114 2903.075 101.850196 4698.504 +CPAR2_302500-T 1881 1670.075 10.936266 290.232 +CPAR2_302510-T 1128 917.075 133.790236 1949.705 +CPAR2_302520-T 2022 1811.075 67.431340 1940.608 +CPAR2_302530-T 3333 3122.075 33.258382 1650.000 +CPAR2_302540-T 2022 1811.075 328.838911 9463.661 +CPAR2_302550-T 6228 6017.075 52.527635 5022.417 +CPAR2_302555-T 1110 899.075 875.630995 12509.981 +CPAR2_302560-T 1809 1598.075 71.795641 1823.202 +CPAR2_302570-T 903 692.099 99.137756 1090.302 +CPAR2_302580-T 1518 1307.075 320.214511 6650.910 +CPAR2_302590-T 2037 1826.075 26.131222 758.260 +CPAR2_302600-T 1971 1760.075 92.604094 2590.007 +CPAR2_302610-T 2286 2075.075 58.591391 1932.000 +CPAR2_302620-T 504 293.175 1414.941737 6591.816 +CPAR2_302630-T 984 773.083 63.086465 775.000 +CPAR2_302640-T 1164 953.075 12.677527 192.000 +CPAR2_302650-T 6144 5933.075 91.170294 8595.530 +CPAR2_302660-T 3564 3353.075 48.335996 2575.452 +CPAR2_302670-T 1638 1427.075 70.467240 1597.988 +CPAR2_302680-T 807 596.118 24.280430 230.000 +CPAR2_302690-T 1323 1112.075 58.478661 1033.406 +CPAR2_302700-T 762 551.123 91.006010 797.000 +CPAR2_302710-T 414 203.233 64.406387 208.000 +CPAR2_302720-T 988 777.081 2.024576 25.000 +CPAR2_302730-T 1353 1142.075 107.117902 1944.000 +CPAR2_302740-T 1290 1079.075 10.439070 179.000 +CPAR2_302750-T 1293 1082.075 19.540800 336.000 +CPAR2_302760-T 1251 1040.075 22.750115 376.000 +CPAR2_302770-T 1218 1007.075 6.561270 105.000 +CPAR2_302780-T 1218 1007.075 12.810098 205.000 +CPAR2_302790-T 1218 1007.075 35.555833 569.000 +CPAR2_302800-T 1854 1643.075 140.920727 3679.356 +CPAR2_302810-T 1470 1259.075 1.049610 21.000 +CPAR2_302820-T 636 425.161 3.700384 25.000 +CPAR2_302830-T 1077 866.075 42.797675 589.000 +CPAR2_302840-T 1071 860.075 56.225191 768.435 +CPAR2_302850-T 900 689.099 50.776465 556.011 +CPAR2_302860-T 1104 893.075 70.253443 997.000 +CPAR2_302880-T 3318 3107.075 135.795774 6704.671 +CPAR2_302890-T 903 692.099 450.865900 4958.555 +CPAR2_302900-T 843 632.108 125.739725 1263.000 +CPAR2_302910-T 891 680.099 222.815115 2408.000 +CPAR2_302920-T 693 482.142 125.362497 960.466 +CPAR2_302930-T 423 212.227 62.863229 212.000 +CPAR2_302940-T 1632 1421.075 94.634169 2137.000 +CPAR2_302950-T 1515 1304.075 16.841598 349.000 +CPAR2_302960-T 1734 1523.075 107.840352 2610.010 +CPAR2_302970-T 585 374.168 303.410285 1804.000 +CPAR2_302980-T 858 647.105 25.382033 261.000 +CPAR2_302990-T 270 59.377 7096.676515 6695.950 +CPAR2_303000-T 2700 2489.075 1.997329 79.000 +CPAR2_303010-T 594 383.168 606.692528 3694.004 +CPAR2_303020-T 579 368.168 94.474775 552.715 +CPAR2_303030-T 435 224.209 355.802582 1267.656 +CPAR2_303040-T 912 701.099 5.924137 66.000 +CPAR2_303050-T 597 386.168 150.622057 924.282 +CPAR2_303060-T 2265 2054.075 44.550198 1454.137 +CPAR2_303070-T 495 284.177 90.793761 410.000 +CPAR2_303080-T 576 365.168 72.218352 419.064 +CPAR2_303090-T 2877 2666.075 54.157200 2294.394 +CPAR2_303100-T 279 68.363 218.165532 237.000 +CPAR2_303110-T 4863 4652.075 17.328579 1281.000 +CPAR2_303120-T 3348 3137.075 42.619226 2124.565 +CPAR2_303130-T 930 719.098 46.142363 527.263 +CPAR2_303140-T 2034 1823.075 21.953969 636.000 +CPAR2_303150-T 3237 3026.075 3.348164 161.000 +CPAR2_303160-T 546 335.169 113.780748 606.000 +CPAR2_303170-T 516 305.173 81.041464 393.000 +CPAR2_303180-T 963 752.090 175.129806 2093.000 +CPAR2_303190-T 915 704.098 3.664471 41.000 +CPAR2_303200-T 861 650.103 39.672691 409.839 +CPAR2_303210-T 1158 947.075 46.115604 694.020 +CPAR2_303220-T 1611 1400.075 35.059341 780.000 +CPAR2_303230-T 3105 2894.075 37.683331 1733.000 +CPAR2_303240-T 1188 977.075 15.135625 235.000 +CPAR2_303250-T 1284 1073.075 51.607464 879.999 +CPAR2_303260-T 2619 2408.075 33.267402 1273.000 +CPAR2_303270-T 2178 1967.075 90.486869 2828.434 +CPAR2_303280-T 939 728.098 108.730515 1258.000 +CPAR2_303290-T 2064 1853.075 26.964227 794.000 +CPAR2_303300-T 1557 1346.075 44.507147 952.004 +CPAR2_303310-T 2046 1835.075 87.467644 2550.591 +CPAR2_303320-T 1272 1061.075 0.296541 5.000 +CPAR2_303330-T 768 557.122 145.274774 1286.116 +CPAR2_303340-T 1101 890.075 15.560318 220.082 +CPAR2_303350-T 1239 1028.075 79.055433 1291.505 +CPAR2_303360-T 930 719.098 75.173665 859.000 +CPAR2_303370-T 2064 1853.075 139.364776 4103.794 +CPAR2_303380-T 1086 875.075 36.532452 508.000 +CPAR2_303390-T 2382 2171.075 59.102096 2039.000 +CPAR2_303400-T 1812 1601.075 58.682498 1493.000 +CPAR2_303410-T 1596 1385.075 109.815541 2417.000 +CPAR2_303420-T 1746 1535.075 47.923151 1169.000 +CPAR2_303430-T 1509 1298.075 35.971998 742.000 +CPAR2_303440-T 1401 1190.075 36.222354 685.000 +CPAR2_303450-T 543 332.169 4380.981121 23124.404 +CPAR2_303460-T 183 21.081 223.884052 75.000 +CPAR2_303470-T 636 425.161 129.465763 874.678 +CPAR2_303480-T 633 422.163 54.558404 366.000 +CPAR2_303490-T 2310 2099.075 29.380329 979.996 +CPAR2_303500-T 2529 2318.075 44.115009 1625.000 +CPAR2_303510-T 2943 2732.075 57.582106 2499.883 +CPAR2_303520-T 3657 3446.075 40.065670 2194.000 +CPAR2_303530-T 1758 1547.075 174.192413 4282.330 +CPAR2_303540-T 1107 896.075 210.106898 2991.743 +CPAR2_303550-T 1704 1493.075 113.167864 2685.000 +CPAR2_303560-T 1659 1448.075 35.418242 815.000 +CPAR2_303570-T 1320 1109.075 105.041526 1851.235 +CPAR2_303580-T 2814 2603.075 17.672223 731.000 +CPAR2_303590-T 606 395.168 31.531468 198.000 +CPAR2_303600-T 669 458.143 63.185470 460.000 +CPAR2_303610-T 2172 1961.075 41.716669 1300.000 +CPAR2_303620-T 2352 2141.075 27.452094 934.000 +CPAR2_303630-T 1740 1529.075 37.081429 901.000 +CPAR2_303640-T 576 365.168 32.570871 189.000 +CPAR2_303650-T 1638 1427.075 53.225644 1207.000 +CPAR2_303660-T 2256 2045.075 45.809431 1488.688 +CPAR2_303670-T 5718 5507.075 4.673722 409.000 +CPAR2_303680-T 1512 1301.075 50.447821 1043.000 +CPAR2_303690-T 1548 1337.075 60.432613 1284.005 +CPAR2_303700-T 570 359.169 42.050715 240.000 +CPAR2_303710-T 2154 1943.075 40.548542 1252.000 +CPAR2_303720-T 1464 1253.075 86.078400 1714.000 +CPAR2_303730-T 1059 848.075 42.518775 573.000 +CPAR2_303740-T 1569 1358.075 323.375149 6978.626 +CPAR2_303750-T 2001 1790.075 58.051099 1651.282 +CPAR2_303760-T 1371 1160.075 45.675830 842.000 +CPAR2_303770-T 1035 824.075 34.669653 454.000 +CPAR2_303780-T 2412 2201.075 70.790657 2475.998 +CPAR2_303790-T 3726 3515.075 8.306994 464.000 +CPAR2_303800-T 330 119.329 25.841101 49.000 +CPAR2_303810-T 1905 1694.075 112.779385 3036.001 +CPAR2_303820-T 2067 1856.075 458.347017 13518.530 +CPAR2_303830-T 1662 1451.075 193.398547 4459.464 +CPAR2_303840-T 1104 893.075 424.878661 6029.655 +CPAR2_303850-T 939 728.098 65.082733 753.000 +CPAR2_303860-T 843 632.108 375.466502 3771.395 +CPAR2_303870-T 2160 1949.075 68.449107 2120.000 +CPAR2_303880-T 705 494.139 111.345653 874.303 +CPAR2_303890-T 1164 953.075 33.014394 500.000 +CPAR2_303900-T 1119 908.075 52.599949 759.009 +CPAR2_303910-T 483 272.179 31.444525 136.000 +CPAR2_303920-T 2094 1883.075 169.314772 5066.429 +CPAR2_303930-T 1335 1124.075 92.485658 1651.997 +CPAR2_303940-T 912 701.099 364.845705 4064.696 +CPAR2_303950-T 5076 4865.075 56.888726 4398.000 +CPAR2_303960-T 459 248.186 120.441769 475.000 +CPAR2_303970-T 321 110.336 58.175899 102.000 +CPAR2_303980-T 1395 1184.075 407.060112 7659.093 +CPAR2_303990-T 2322 2111.075 0.745241 25.000 +CPAR2_304000-T 1479 1268.075 43.851686 883.631 +CPAR2_304010-T 3723 3512.075 51.233130 2859.263 +CPAR2_304020-T 3150 2939.075 91.363447 4267.000 +CPAR2_304030-T 921 710.098 179.105530 2021.002 +CPAR2_304040-T 1587 1376.075 1.509150 33.000 +CPAR2_304050-T 1842 1631.075 67.210122 1742.000 +CPAR2_304060-T 1041 830.075 95.976767 1265.969 +CPAR2_304070-T 726 515.135 32.983400 269.995 +CPAR2_304080-T 603 392.168 1.444212 9.000 +CPAR2_304090-T 357 146.259 10.326417 24.000 +CPAR2_304100-T 2226 2015.075 45.821260 1467.229 +CPAR2_304110-T 408 197.235 1700.928706 5331.000 +CPAR2_304120-T 1329 1118.075 13.677155 243.000 +CPAR2_304130-T 432 221.216 333.830076 1173.493 +CPAR2_tS(CAG)1-T 82 2.421 0.000000 0.000 +CPAR2_304140-T 1305 1094.075 67.932550 1181.040 +CPAR2_304150-T 963 752.090 136.388696 1630.000 +CPAR2_304160-T 8973 8762.075 16.110516 2243.137 +CPAR2_304170-T 312 101.339 564.477331 909.000 +CPAR2_304180-T 321 110.336 204.185998 358.000 +CPAR2_304190-T 4092 3881.075 26.981233 1664.000 +CPAR2_304200-T 1035 824.075 95.991144 1257.007 +CPAR2_304210-T 2247 2036.075 154.439710 4996.803 +CPAR2_304220-T 2094 1883.075 32.951089 986.000 +CPAR2_304230-T 2679 2468.075 25.497766 1000.000 +CPAR2_304240-T 1878 1667.075 57.437455 1521.563 +CPAR2_304250-T 669 458.143 67.306262 490.000 +CPAR2_304260-T 1248 1037.075 136.046654 2242.010 +CPAR2_304270-T 1026 815.075 6.176647 80.000 +CPAR2_304280-T 1674 1463.075 31.011954 721.000 +CPAR2_304290-T 1494 1283.075 60.327247 1230.000 +CPAR2_304300-T 1968 1757.075 111.166254 3103.865 +CPAR2_304310-T 318 107.338 4181.966693 7133.000 +CPAR2_304320-T 522 311.173 18.605735 92.000 +CPAR2_304330-T 1677 1466.075 15.581558 363.000 +CPAR2_304340-T 1308 1097.075 49.618292 865.003 +CPAR2_304350-T 1512 1301.075 51.835142 1071.683 +CPAR2_304360-T 1149 938.075 56.753572 846.000 +CPAR2_304370-T 4497 4286.075 10.649288 725.304 +CPAR2_800010-T 2100 1889.075 66.859000 2007.006 +CPAR2_800020-T 1218 1007.075 350.266356 5605.313 +CPAR2_800030-T 429 218.220 139.643130 484.232 +CPAR2_800040-T 1674 1463.075 17.506054 407.000 +CPAR2_800050-T 1305 1094.075 21.052051 366.000 +CPAR2_800060-T 462 251.185 46.849910 187.000 +CPAR2_800070-T 564 353.169 1.069128 6.000 +CPAR2_800080-T 1689 1478.075 41.809548 982.000 +CPAR2_800090-T 1476 1265.075 66.673856 1340.329 +CPAR2_800100-T 2217 2006.075 73.870665 2354.825 +CPAR2_800110-T 525 314.172 108.765906 543.000 +CPAR2_800120-T 894 683.099 25.242201 274.000 +CPAR2_800130-T 1014 803.075 46.726017 596.286 +CPAR2_800140-T 5541 5330.075 38.696477 3277.511 +CPAR2_800150-T 444 233.197 179.186579 664.000 +CPAR2_800160-T 2205 1994.075 67.534048 2139.951 +CPAR2_800170-T 1791 1580.075 92.754883 2328.917 +CPAR2_800180-T 375 164.240 1306.901352 3410.849 +CPAR2_800190-T 2382 2171.075 41.946433 1447.136 +CPAR2_800200-T 600 389.168 502.069844 3104.851 +CPAR2_800210-T 2643 2432.075 286.162312 11059.332 +CPAR2_800220-T 1683 1472.075 189.430742 4431.186 +CPAR2_800230-T 2769 2558.075 15.757239 640.520 +CPAR2_800240-T 2769 2558.075 5.571556 226.480 +CPAR2_800250-T 2775 2564.075 19.904486 811.001 +CPAR2_800260-T 3933 3722.075 52.847989 3125.742 +CPAR2_800270-T 264 53.386 133.201611 113.000 +CPAR2_800280-T 1482 1271.075 37.379734 755.000 +CPAR2_800290-T 1344 1133.075 88.030067 1585.000 +CPAR2_800300-T 4743 4532.075 24.942587 1796.297 +CPAR2_800310-T 1671 1460.075 79.357000 1841.196 +CPAR2_800320-T 2556 2345.075 22.407337 835.000 +CPAR2_800330-T 897 686.099 21.295099 232.170 +CPAR2_800340-T 903 692.099 17.548887 193.000 +CPAR2_800350-T 903 692.099 30.894081 339.768 +CPAR2_800360-T 2307 2096.075 147.182978 4902.346 +CPAR2_800370-T 1197 986.075 72.562280 1137.000 +CPAR2_800380-T 186 17.248 383.103646 105.000 +CPAR2_800390-T 2421 2210.075 75.997825 2668.995 +CPAR2_800400-T 1296 1085.075 190.783753 3289.582 +CPAR2_800410-T 795 584.119 284.422098 2640.000 +CPAR2_800420-T 1215 1004.075 16.609086 265.003 +CPAR2_800430-T 1491 1280.075 7.718354 157.000 +CPAR2_800440-T 1665 1454.075 661.970345 15295.543 +CPAR2_800450-T 1506 1295.075 49.488254 1018.443 +CPAR2_800460-T 4269 4058.075 106.912628 6894.274 +CPAR2_800470-T 297 86.344 2714.163732 3724.000 +CPAR2_800480-T 240 29.539 715.676428 335.931 +CPAR2_800490-T 5445 5234.075 25.441121 2116.000 +CPAR2_800500-T 228 19.222 163.695375 50.000 +CPAR2_800510-T 1566 1355.075 309.705147 6668.856 +CPAR2_800520-T 1566 1355.075 110.088165 2370.519 +CPAR2_800530-T 1668 1457.075 345.042655 7989.033 +CPAR2_800540-T 2835 2624.075 29.833529 1244.000 +CPAR2_800550-T 1845 1634.075 8.164401 212.000 +CPAR2_800560-T 4380 4169.075 28.152538 1865.077 +CPAR2_800570-T 1188 977.075 81.497601 1265.355 +CPAR2_800580-T 1932 1721.075 14.223624 389.000 +CPAR2_800590-T 4341 4130.075 19.277228 1265.150 +CPAR2_800600-T 2964 2753.075 54.013980 2363.000 +CPAR2_800610-T 678 467.143 35.294910 262.000 +CPAR2_800620-T 2619 2408.075 67.109363 2567.986 +CPAR2_800630-T 855 644.107 69.438652 710.720 +CPAR2_800640-T 681 470.143 62.643735 468.001 +CPAR2_800650-T 1377 1166.075 48.925067 906.562 +CPAR2_800660-T 909 698.099 67.428744 748.000 +CPAR2_800670-T 924 713.098 13.237400 150.000 +CPAR2_800680-T 2541 2330.075 38.734696 1434.199 +CPAR2_800690-T 1206 995.075 27.383723 433.000 +CPAR2_800700-T 2055 1844.075 68.012593 1993.001 +CPAR2_800710-T 1443 1232.075 62.109333 1216.000 +CPAR2_800720-T 2409 2198.075 605.456163 21147.777 +CPAR2_tL(AAG)1-T 81 1.947 0.000000 0.000 +CPAR2_800730-T 687 476.142 39.650206 300.000 +CPAR2_800740-T 501 290.176 15.180877 70.000 +CPAR2_800750-T 1767 1556.075 126.488942 3127.682 +CPAR2_800760-T 1920 1709.075 40.172059 1091.000 +CPAR2_800770-T 1986 1775.075 51.074327 1440.651 +CPAR2_800780-T 963 752.090 19.663401 235.000 +CPAR2_800790-T 2364 2153.075 83.124970 2844.004 +CPAR2_800800-T 1020 809.075 23.260086 299.047 +CPAR2_800810-T 1392 1181.075 81.971865 1538.445 +CPAR2_800820-T 2652 2441.075 63.612759 2467.544 +CPAR2_800830-T 1773 1562.075 86.533538 2147.958 +CPAR2_800840-T 630 419.164 142.026009 946.000 +CPAR2_800850-T 420 209.228 33.987446 113.000 +CPAR2_800860-T 687 476.142 693.072316 5243.899 +CPAR2_800870-T 1539 1328.075 68.148475 1438.197 +CPAR2_800880-T 516 305.173 89.702384 435.000 +CPAR2_800890-T 2934 2723.075 69.584362 3011.000 +CPAR2_800900-T 1080 869.075 13.395991 185.000 +CPAR2_800910-T 993 782.079 26.714553 332.000 +CPAR2_800920-T 255 44.403 122.313050 86.302 +CPAR2_800930-T 369 158.243 5.965225 15.000 +CPAR2_800940-T 1635 1424.075 33.894010 767.000 +CPAR2_800950-T 210 9.898 0.000000 0.000 +CPAR2_800960-T 960 749.090 19.910159 237.000 +CPAR2_800970-T 1011 800.075 775.775769 9862.943 +CPAR2_800980-T 738 527.132 111.384041 933.000 +CPAR2_800990-T 555 344.169 172.973483 946.000 +CPAR2_801000-T 1785 1574.075 67.243828 1681.967 +CPAR2_801010-T 654 443.147 42.034405 296.000 +CPAR2_801020-T 3144 2933.075 38.748527 1806.001 +CPAR2_801030-T 933 722.098 188.417045 2162.000 +CPAR2_801040-T 1200 989.075 37.857184 595.000 +CPAR2_801050-T 1062 851.075 75.790786 1025.000 +CPAR2_801060-T 2574 2363.075 104.911898 3939.506 +CPAR2_801070-T 981 770.084 68.395705 836.963 +CPAR2_801080-T 2397 2186.075 7.398242 257.000 +CPAR2_801090-T 1791 1580.075 120.252377 3019.332 +CPAR2_801100-T 1407 1196.075 2956.705531 56196.084 +CPAR2_801110-T 2055 1844.075 0.580137 17.000 +CPAR2_801120-T 1074 863.075 162.922192 2234.438 +CPAR2_801130-T 2490 2279.075 15.573312 564.000 +CPAR2_801140-T 1563 1352.075 122.731411 2636.915 +CPAR2_801150-T 2091 1880.075 31.843151 951.329 +CPAR2_801160-T 780 569.119 36.158064 327.000 +CPAR2_801170-T 381 170.239 34.008634 92.000 +CPAR2_801180-T 1593 1382.075 92.796803 2038.000 +CPAR2_801190-T 741 530.132 37.037216 312.005 +CPAR2_801200-T 1626 1415.075 40.970707 921.282 +CPAR2_801210-T 561 350.169 10.962578 61.000 +CPAR2_801220-T 1476 1265.075 106.782294 2146.620 +CPAR2_801230-T 975 764.085 37.391669 454.000 +CPAR2_801240-T 1665 1454.075 99.155495 2291.095 +CPAR2_801250-T 1245 1034.075 128.135033 2105.521 +CPAR2_801260-T 3024 2813.075 12.885512 576.000 +CPAR2_801270-T 1674 1463.075 0.860248 20.000 +CPAR2_801280-T 1110 899.075 1.259903 18.000 +CPAR2_801290-T 549 338.169 0.744365 4.000 +CPAR2_801300-T 744 533.131 59.727893 506.000 +CPAR2_801310-T 804 593.118 60.265318 568.000 +CPAR2_801320-T 1026 815.075 95.583614 1238.000 +CPAR2_801330-T 2076 1865.075 24.752985 733.607 +CPAR2_801340-T 4809 4598.075 32.248436 2356.265 +CPAR2_801350-T 1386 1175.075 32.186171 601.000 +CPAR2_801360-T 3024 2813.075 36.241539 1620.046 +CPAR2_801370-T 2940 2729.075 55.733761 2416.981 +CPAR2_801380-T 891 680.099 131.949483 1426.000 +CPAR2_801390-T 2958 2747.075 60.188583 2627.388 +CPAR2_801400-T 504 293.175 158.471110 738.272 +CPAR2_801410-T 924 713.098 114.547630 1298.000 +CPAR2_801420-T 1134 923.075 11.112480 163.000 +CPAR2_801430-T 2994 2783.075 38.228101 1690.624 +CPAR2_801440-T 2796 2585.075 14.557558 598.000 +CPAR2_801450-T 1266 1055.075 51.719070 867.109 +CPAR2_801460-T 1002 791.075 167.413995 2104.501 +CPAR2_801470-T 3282 3071.075 46.576786 2273.000 +CPAR2_801480-T 1635 1424.075 112.391791 2543.355 +CPAR2_801490-T 1665 1454.075 54.098305 1250.000 +CPAR2_801500-T 1722 1511.075 13.451693 323.000 +CPAR2_801510-T 2352 2141.075 59.654687 2029.626 +CPAR2_801520-T 357 146.259 253.316802 588.743 +CPAR2_801530-T 1680 1469.075 68.881586 1608.002 +CPAR2_801540-T 693 482.142 256.215897 1963.000 +CPAR2_801550-T 4098 3887.075 22.225569 1372.825 +CPAR2_801560-T 1038 827.075 38.424379 505.000 +CPAR2_801570-T 708 497.138 349.723017 2762.745 +CPAR2_801580-T 1557 1346.075 67.929247 1453.000 +CPAR2_801590-T 1359 1148.075 59.308566 1082.000 +CPAR2_801600-T 2658 2447.075 32.997105 1283.106 +CPAR2_801610-T 162 32.713 673.303467 350.000 +CPAR2_801620-T 1638 1427.075 53.535845 1214.034 +CPAR2_801630-T 2175 1964.075 27.651150 863.000 +CPAR2_801640-T 5502 5291.075 46.575690 3916.000 +CPAR2_801650-T 3798 3587.075 18.333118 1045.000 +CPAR2_801655-T 201 7.902 0.000000 0.000 +CPAR2_801660-T 1146 935.075 0.000000 0.000 +CPAR2_801670-T 3609 3398.075 21.501055 1161.000 +CPAR2_801680-T 558 347.169 36.615982 202.000 +CPAR2_801690-T 2178 1967.075 77.550439 2424.067 +CPAR2_801700-T 3603 3392.075 64.232470 3462.259 +CPAR2_801710-T 876 665.100 56.149156 593.430 +CPAR2_801720-T 840 629.109 55.217119 552.000 +CPAR2_801730-T 2289 2078.075 52.783314 1743.000 +CPAR2_801735-T 156 32.269 1.950159 1.000 +CPAR2_801740-T 1242 1031.075 39.305744 644.000 +CPAR2_801750-T 777 566.119 3.557154 32.000 +CPAR2_801760-T 3735 3524.075 13.179570 738.050 +CPAR2_801770-T 519 308.173 3319.065182 16253.598 +CPAR2_801780-T 342 131.306 163.429229 341.000 +CPAR2_801790-T 204 8.232 214.055046 28.000 +CPAR2_801800-T 3714 3503.075 87.806059 4887.800 +CPAR2_801810-T 4710 4499.075 22.351880 1598.000 +CPAR2_801820-T 1698 1487.075 256.181086 6053.680 +CPAR2_801830-T 342 131.306 396.352529 827.000 +CPAR2_801840-T 519 308.173 0.000000 0.000 +CPAR2_801850-T 1248 1037.075 315.099127 5192.744 +CPAR2_801860-T 1299 1088.075 26.084236 451.000 +CPAR2_801870-T 2316 2105.075 56.889533 1903.003 +CPAR2_801880-T 396 185.237 1326.956037 3905.932 +CPAR2_801890-T 2313 2102.075 38.858584 1298.000 +CPAR2_801900-T 3738 3527.075 8.243047 462.000 +CPAR2_801910-T 1245 1034.075 45.885949 754.000 +CPAR2_801920-T 3105 2894.075 31.856147 1465.017 +CPAR2_801930-T 1107 896.075 52.390779 746.000 +CPAR2_801940-T 2562 2351.075 51.883070 1938.348 +CPAR2_801950-T 1485 1274.075 52.559430 1064.107 +CPAR2_801960-T 2559 2348.075 63.644612 2374.724 +CPAR2_801970-T 654 443.147 96.423516 679.000 +CPAR2_801980-T 1092 881.075 22.641582 317.000 +CPAR2_801990-T 1305 1094.075 138.011069 2399.389 +CPAR2_802000-T 2067 1856.075 35.126647 1036.029 +CPAR2_802010-T 1401 1190.075 1438.159122 27196.990 +CPAR2_802020-T 2952 2741.075 11.662812 508.000 +CPAR2_802030-T 492 281.177 210.830624 942.003 +CPAR2_802040-T 1809 1598.075 149.127432 3786.991 +CPAR2_802050-T 366 155.246 307.263130 758.000 +CPAR2_802060-T 822 611.114 16.476234 160.000 +CPAR2_802070-T 1734 1523.075 10.536087 255.000 +CPAR2_802080-T 927 716.098 90.516011 1030.000 +CPAR2_802090-T 870 659.100 91.851032 962.000 +CPAR2_802100-T 1350 1139.075 47.291367 856.000 +CPAR2_802110-T 1734 1523.075 218.397430 5285.771 +CPAR2_802120-T 1848 1637.075 88.951902 2314.000 +CPAR2_802130-T 1836 1625.075 16.574133 428.000 +CPAR2_802140-T 1113 902.075 17.091644 245.000 +CPAR2_802150-T 864 653.103 72.941554 757.000 +CPAR2_802160-T 744 533.131 49.342202 418.015 +CPAR2_802170-T 1734 1523.075 28.922592 700.000 +CPAR2_802180-T 1014 803.075 55.009966 702.000 +CPAR2_802190-T 1074 863.075 56.216813 771.000 +CPAR2_802200-T 1386 1175.075 66.621434 1243.996 +CPAR2_802210-T 1101 890.075 0.212107 3.000 +CPAR2_802220-T 957 746.091 85.443293 1013.000 +CPAR2_802230-T 1014 803.075 26.799727 342.000 +CPAR2_802240-T 1527 1316.075 3.920971 82.000 +CPAR2_802250-T 1083 872.075 32.184103 446.000 +CPAR2_802260-T 1131 920.075 0.752367 11.000 +CPAR2_802270-T 2529 2318.075 283.153878 10430.125 +CPAR2_802280-T 1938 1727.075 43.105632 1183.000 +CPAR2_802290-T 2139 1928.075 72.515852 2221.756 +CPAR2_802300-T 1272 1061.075 82.379012 1389.000 +CPAR2_802310-T 870 659.100 0.859313 9.000 +CPAR2_802320-T 663 452.143 12.665603 91.000 +CPAR2_802330-T 3231 3020.075 20.378942 978.000 +CPAR2_802340-T 1551 1340.075 42.264316 900.000 +CPAR2_802350-T 1044 833.075 183.207058 2425.303 +CPAR2_802360-T 435 224.209 30.032508 107.000 +CPAR2_802370-T 786 575.119 129.336273 1182.000 +CPAR2_802380-T 2547 2336.075 15.651279 581.000 +CPAR2_802390-T 810 599.118 26.381785 251.163 +CPAR2_802400-T 1704 1493.075 52.068122 1235.359 +CPAR2_802410-T 1008 797.075 42.949695 544.000 +CPAR2_802420-T 2283 2072.075 23.749899 782.000 +CPAR2_802430-T 2589 2378.075 28.843656 1089.972 +CPAR2_802440-T 2751 2540.075 69.440315 2802.836 +CPAR2_802450-T 1881 1670.075 22.912663 608.066 +CPAR2_802460-T 504 293.175 417.908669 1946.919 +CPAR2_802470-T 2484 2273.075 101.521454 3667.002 +CPAR2_802480-T 1227 1016.075 14.616610 236.000 +CPAR2_802490-T 1392 1181.075 66.036376 1239.368 +CPAR2_802500-T 1455 1244.075 66.770988 1320.000 +CPAR2_802510-T 744 533.131 14.518836 123.000 +CPAR2_802520-T 432 221.216 23.042521 81.000 +CPAR2_802530-T 576 365.168 53.860016 312.535 +CPAR2_802540-T 1182 971.075 65.783871 1015.107 +CPAR2_802550-T 1287 1076.075 130.813371 2236.837 +CPAR2_802560-T 513 302.173 149.532388 718.010 +CPAR2_802570-T 564 353.169 98.003357 550.000 +CPAR2_802580-T 690 479.142 56.476129 430.000 +CPAR2_802590-T 450 239.191 487.266679 1852.045 +CPAR2_802600-T 1494 1283.075 93.971898 1915.974 +CPAR2_802610-T 2034 1823.075 70.725383 2048.893 +CPAR2_802620-T 1182 971.075 54.176984 836.002 +CPAR2_802630-T 3183 2972.075 85.669525 4045.998 +CPAR2_802640-T 1734 1523.075 31.732215 768.000 +CPAR2_802650-T 903 692.099 103.747564 1141.000 +CPAR2_802660-T 2586 2375.075 44.778533 1690.000 +CPAR2_802670-T 1689 1478.075 207.426905 4871.931 +CPAR2_802680-T 378 167.240 64.359134 171.037 +CPAR2_802690-T 1347 1136.075 0.997071 18.000 +CPAR2_802700-T 1632 1421.075 9.681684 218.629 +CPAR2_802710-T 1614 1403.075 23.192786 517.099 +CPAR2_802720-T 1578 1367.075 192.946368 4191.491 +CPAR2_802730-T 2343 2132.075 16.558495 561.000 +CPAR2_802740-T 696 485.141 128.758835 992.623 +CPAR2_802750-T 2724 2513.075 47.594234 1900.638 +CPAR2_802760-T 3279 3068.075 45.596606 2222.992 +CPAR2_802770-T 2448 2237.075 59.158781 2103.000 +CPAR2_802780-T 852 641.107 354.942857 3616.000 +CPAR2_802790-T 660 449.144 175.334288 1251.387 +CPAR2_802800-T 2304 2093.075 125.911841 4187.848 +CPAR2_802810-T 1188 977.075 58.610293 910.000 +CPAR2_802820-T 2913 2702.075 17.893546 768.304 +CPAR2_802830-T 1548 1337.075 39.864662 847.000 +CPAR2_802840-T 1710 1499.075 91.305377 2175.000 +CPAR2_802850-T 588 377.168 72.796144 436.298 +CPAR2_802860-T 636 425.161 25.162613 170.000 +CPAR2_802870-T 1128 917.075 34.584864 504.000 +CPAR2_802880-T 1896 1685.075 19.718558 528.000 +CPAR2_802890-T 1668 1457.075 32.608100 755.000 +CPAR2_802900-T 882 671.099 238.946862 2548.166 +CPAR2_802910-T 618 407.166 48.376333 313.000 +CPAR2_802920-T 951 740.094 34.861782 409.993 +CPAR2_802930-T 738 527.132 71.152078 596.000 +CPAR2_802940-T 1110 899.075 44.881300 641.211 +CPAR2_802950-T 1089 878.075 17.208705 240.115 +CPAR2_802960-T 1959 1748.075 46.259777 1285.000 +CPAR2_802970-T 636 425.161 11.989245 81.000 +CPAR2_802980-T 1485 1274.075 24.059475 487.103 +CPAR2_802990-T 1596 1385.075 77.057161 1696.000 +CPAR2_803010-T 3480 3269.075 24.242219 1259.322 +CPAR2_803020-T 1926 1715.075 12.915761 352.000 +CPAR2_803030-T 1947 1736.075 9.746331 268.874 +CPAR2_803040-T 1968 1757.075 9.388147 262.126 +CPAR2_803050-T 1266 1055.075 221.038950 3705.883 +CPAR2_803060-T 1551 1340.075 71.201121 1516.197 +CPAR2_803070-T 261 50.392 93.660725 75.000 +CPAR2_803090-T 1485 1274.075 67.258788 1361.707 +CPAR2_803100-T 3327 3116.075 29.982793 1484.634 +CPAR2_803110-T 603 392.168 152.605044 951.000 +CPAR2_803120-T 1341 1130.075 24.279495 436.000 +CPAR2_803130-T 2856 2645.075 26.479981 1113.000 +CPAR2_803140-T 297 86.344 230.310349 316.000 +CPAR2_803150-T 900 689.099 257.682529 2821.669 +CPAR2_803160-T 2037 1826.075 56.000928 1625.000 +CPAR2_803170-T 2301 2090.075 66.456220 2207.176 +CPAR2_803180-T 3240 3029.075 129.668404 6241.424 +CPAR2_803190-T 1638 1427.075 4.323540 98.045 +CPAR2_803200-T 2400 2189.075 8.969215 312.000 +CPAR2_803210-T 6405 6194.075 32.115048 3161.000 +CPAR2_803220-T 897 686.099 18.252683 199.000 +CPAR2_803230-T 1248 1037.075 180.835104 2980.111 +CPAR2_803240-T 1677 1466.075 235.048323 5475.867 +CPAR2_803245-T 297 86.344 48.831625 67.000 +CPAR2_803250-T 810 599.118 41.910356 399.000 +CPAR2_803260-T 5184 4973.075 25.557227 2019.660 +CPAR2_803270-T 1992 1781.075 40.420742 1144.000 +CPAR2_803280-T 1827 1616.075 33.959020 872.080 +CPAR2_803290-T 717 506.136 28.845707 232.000 +CPAR2_803300-T 1464 1253.075 70.560182 1405.000 +CPAR2_803310-T 651 440.149 67.484241 472.000 +CPAR2_803320-T 1302 1091.075 45.738193 793.000 +CPAR2_803330-T 1548 1337.075 29.980861 637.000 +CPAR2_803340-T 1335 1124.075 74.972315 1339.170 +CPAR2_803350-T 6552 6341.075 16.574918 1670.143 +CPAR2_803360-T 756 545.125 30.938490 268.000 +CPAR2_803370-T 1419 1208.075 60.738643 1166.000 +CPAR2_803380-T 1365 1154.075 1.853981 34.000 +CPAR2_803390-T 2772 2561.075 7.690995 313.000 +CPAR2_803400-T 399 188.237 1250.340838 3740.005 +CPAR2_803410-T 393 182.238 225.191442 652.123 +CPAR2_803420-T 156 32.269 1708.338927 876.000 +CPAR2_803430-T 534 323.170 284.303202 1460.000 +CPAR2_803440-T 1260 1049.075 136.406094 2273.945 +CPAR2_803450-T 2103 1892.075 68.589063 2062.209 +CPAR2_803460-T 1269 1058.075 66.217219 1113.338 +CPAR2_803470-T 2259 2048.075 19.973498 650.039 +CPAR2_803480-T 510 299.173 318.045602 1512.000 +CPAR2_tS(CGA)1-T 82 2.421 0.000000 0.000 +CPAR2_803490-T 753 542.127 44.458892 383.000 +CPAR2_803500-T 2607 2396.075 136.747455 5206.659 +CPAR2_803510-T 1008 797.075 135.086264 1711.000 +CPAR2_803520-T 5001 4790.075 22.517959 1714.000 +CPAR2_803530-T 1305 1094.075 46.360527 806.000 +CPAR2_803540-T 987 776.081 45.408937 560.000 +CPAR2_803550-T 483 272.179 1.156049 5.000 +CPAR2_803560-T 1593 1382.075 84.509748 1856.000 +CPAR2_803570-T 4032 3821.075 57.852492 3512.749 +CPAR2_803580-T 5013 4802.075 36.793980 2807.664 +CPAR2_803590-T 453 242.189 124.062941 477.459 +CPAR2_803600-T 669 458.143 143.171659 1042.312 +CPAR2_803610-T 1104 893.075 42.665060 605.480 +CPAR2_803620-T 555 344.169 48.820212 267.000 +CPAR2_803630-T 1098 887.075 316.385864 4459.817 +CPAR2_803640-T 1287 1076.075 152.169025 2602.007 +CPAR2_803650-T 2376 2165.075 23.194789 798.000 +CPAR2_803660-T 366 155.246 172.922653 426.590 +CPAR2_803670-T 1584 1373.075 36.336056 792.815 +CPAR2_803680-T 2913 2702.075 14.812233 636.000 +CPAR2_803690-T 2211 2000.075 73.783237 2345.004 +CPAR2_803700-T 552 341.169 53.676415 291.000 +CPAR2_803710-T 675 464.143 71.181660 525.000 +CPAR2_803720-T 834 623.110 52.443820 519.276 +CPAR2_803730-T 3240 3029.075 55.032632 2648.926 +CPAR2_803740-T 498 287.177 0.657405 3.000 +CPAR2_803750-T 1014 803.075 145.910498 1862.011 +CPAR2_803760-T 2712 2501.075 154.233467 6129.779 +CPAR2_803770-T 1449 1238.075 27.854415 548.000 +CPAR2_803780-T 687 476.142 168.537340 1275.181 +CPAR2_803790-T 3813 3602.075 28.285846 1619.054 +CPAR2_803800-T 2145 1934.075 42.628195 1310.116 +CPAR2_803810-T 2682 2471.075 46.002871 1806.385 +CPAR2_803820-T 2436 2225.075 121.186028 4284.861 +CPAR2_803830-T 2184 1973.075 62.508184 1959.837 +CPAR2_803840-T 1487 1276.075 314.849029 6384.371 +CPAR2_803850-T 1464 1253.075 161.630023 3218.390 +CPAR2_803860-T 2835 2624.075 116.834805 4871.784 +CPAR2_803870-T 1647 1436.075 284.830776 6499.854 +CPAR2_803880-T 1539 1328.075 56.956371 1202.000 +CPAR2_803890-T 1656 1445.075 1344.368385 30870.824 +CPAR2_803900-T 1977 1766.075 44.469875 1248.000 +CPAR2_803910-T 1203 992.075 42.126626 664.111 +CPAR2_803920-T 858 647.105 52.320052 538.000 +CPAR2_803930-T 864 653.103 61.378825 637.000 +CPAR2_803940-T 753 542.127 68.255428 588.000 +CPAR2_803950-T 2130 1919.075 8.230804 251.000 +CPAR2_803960-T 576 365.168 38.774213 224.996 +CPAR2_803970-T 465 254.184 33.670629 136.000 +CPAR2_803980-T 1293 1082.075 52.457843 902.002 +CPAR2_803990-T 2745 2534.075 57.832762 2328.804 +CPAR2_804000-T 369 158.243 46.131075 116.000 +CPAR2_804010-T 864 653.103 39.515357 410.097 +CPAR2_804020-T 891 680.099 73.654830 796.000 +CPAR2_804030-T 5187 4976.075 32.295802 2553.715 +CPAR2_804040-T 1221 1010.075 0.872238 14.000 +CPAR2_804050-T 1227 1016.075 2.167718 35.000 +CPAR2_804060-T 6657 6446.075 114.050919 11682.442 +CPAR2_804070-T 1410 1199.075 93.345976 1778.613 +CPAR2_804080-T 636 425.161 152.159804 1028.000 +CPAR2_804090-T 1887 1676.075 30.491394 812.101 +CPAR2_804100-T 1083 872.075 59.677697 827.000 +CPAR2_804110-T 1341 1130.075 44.772279 804.000 +CPAR2_804120-T 1251 1040.075 29.950285 495.000 +CPAR2_804130-T 393 182.238 22.813418 66.065 +CPAR2_804140-T 1230 1019.075 26.244795 425.000 +CPAR2_804150-T 453 242.189 1565.245635 6023.886 +CPAR2_804160-T 1452 1241.075 84.395343 1664.394 +CPAR2_804170-T 636 425.161 80.372348 543.000 +CPAR2_804180-T 459 248.186 111.567662 440.002 +CPAR2_804190-T 2442 2231.075 96.196797 3410.470 +CPAR2_804200-T 1119 908.075 875.928537 12639.503 +CPAR2_804210-T 2235 2024.075 95.204878 3062.142 +CPAR2_804220-T 1926 1715.075 5.313656 144.816 +CPAR2_804230-T 1509 1298.075 1.377252 28.409 +CPAR2_804240-T 1209 998.075 35.372039 561.000 +CPAR2_804250-T 1662 1451.075 108.723876 2507.000 +CPAR2_804260-T 1056 845.075 16.233853 218.000 +CPAR2_804270-T 1137 926.075 49.131102 723.007 +CPAR2_804280-T 1863 1652.075 74.545517 1957.000 +CPAR2_804290-T 900 689.099 4.931427 54.000 +CPAR2_804300-T 2766 2555.075 72.822448 2956.708 +CPAR2_804310-T 1752 1541.075 24.092879 590.000 +CPAR2_804320-T 225 17.197 2177.294309 595.000 +CPAR2_804330-T 477 266.180 249.920435 1057.102 +CPAR2_804340-T 1377 1166.075 37.345651 692.000 +CPAR2_804350-T 966 755.088 218.605797 2623.001 +CPAR2_804360-T 1383 1172.075 62.663226 1167.099 +CPAR2_804370-T 1395 1184.075 87.799752 1652.008 +CPAR2_804380-T 714 503.137 57.034747 456.000 +CPAR2_804390-T 1710 1499.075 36.312253 865.000 +CPAR2_804400-T 381 170.239 104.613516 283.000 +CPAR2_804410-T 1467 1256.075 15.130449 302.000 +CPAR2_804420-T 378 167.240 40.861625 108.591 +CPAR2_804430-T 1926 1715.075 84.180831 2294.224 +CPAR2_804440-T 762 551.123 136.978437 1199.611 +CPAR2_804450-T 5157 4946.075 38.117318 2995.867 +CPAR2_804460-T 1950 1739.075 124.153071 3430.957 +CPAR2_804470-T 1011 800.075 17.304233 220.000 +CPAR2_804480-T 1494 1283.075 0.049047 1.000 +CPAR2_804490-T 1935 1724.075 16.425433 450.000 +CPAR2_804500-T 438 227.205 4.154642 15.000 +CPAR2_804510-T 684 473.142 13.699542 103.000 +CPAR2_804520-T 2742 2531.075 145.496759 5851.913 +CPAR2_804530-T 627 416.165 96.323931 637.000 +CPAR2_804540-T 2265 2054.075 57.730471 1884.347 +CPAR2_804550-T 3165 2954.075 35.085902 1647.000 +CPAR2_804560-T 1071 860.075 47.340009 647.000 +CPAR2_804570-T 828 617.113 0.509877 5.000 +CPAR2_804580-T 2079 1868.075 90.307828 2680.768 +CPAR2_804585-T 273 62.371 139.236712 138.000 +CPAR2_804590-T 804 593.118 687.098898 6475.900 +CPAR2_804600-T 1692 1481.075 427.870968 10069.999 +CPAR2_804610-T 1827 1616.075 34.545113 887.131 +CPAR2_804620-T 780 569.119 70.989227 642.000 +CPAR2_804630-T 1800 1589.075 83.603851 2111.107 +CPAR2_804640-T 2799 2588.075 38.379757 1578.406 +CPAR2_804650-T 1044 833.075 71.611804 948.000 +CPAR2_804660-T 2469 2258.075 101.857987 3654.879 +CPAR2_804670-T 993 782.079 30.576898 380.000 +CPAR2_804680-T 2175 1964.075 64.662634 2018.139 +CPAR2_804690-T 2907 2696.075 55.135475 2362.123 +CPAR2_804700-T 3135 2924.075 100.083638 4650.408 +CPAR2_804710-T 507 296.175 85.358879 401.731 +CPAR2_804720-T 1944 1733.075 40.124108 1105.000 +CPAR2_804730-T 1740 1529.075 110.433071 2683.289 +CPAR2_804740-T 2046 1835.075 314.449790 9169.479 +CPAR2_804750-T 1053 842.075 8.071112 108.000 +CPAR2_804760-T 1602 1391.075 43.807408 968.362 +CPAR2_804770-T 3957 3746.075 102.093942 6077.374 +CPAR2_804780-T 3894 3683.075 122.462181 7167.242 +CPAR2_804790-T 1125 914.075 27.951466 406.000 +CPAR2_804800-T 684 473.142 11.305448 85.000 +CPAR2_804810-T 1242 1031.075 44.330705 726.331 +CPAR2_804820-T 522 311.173 107.185214 530.000 +CPAR2_804830-T 1167 956.075 47.391552 720.000 +CPAR2_804840-T 2214 2003.075 46.874008 1492.000 +CPAR2_804850-T 339 128.315 129.475432 264.000 +CPAR2_804860-T 909 698.099 90.415815 1003.000 +CPAR2_804870-T 897 686.099 161.614210 1762.000 +CPAR2_804880-T 204 8.232 428.110093 56.000 +CPAR2_804890-T 780 569.119 43.482941 393.243 +CPAR2_804900-T 1320 1109.075 29.165121 514.001 +CPAR2_804910-T 1572 1361.075 86.215658 1864.695 +CPAR2_804920-T 747 536.129 3.638759 31.000 +CPAR2_804930-T 4149 3938.075 24.068964 1506.194 +CPAR2_804940-T 2250 2039.075 32.930520 1067.017 +CPAR2_804950-T 1386 1175.075 258.110049 4819.590 +CPAR2_804960-T 990 779.081 3.473331 43.000 +CPAR2_804970-T 1686 1475.075 54.010737 1266.000 +CPAR2_804980-T 2106 1895.075 171.300801 5158.522 +CPAR2_804990-T 2868 2657.075 419.249002 17701.715 +CPAR2_805000-T 2325 2114.075 142.967275 4802.823 +CPAR2_805010-T 1023 812.075 90.607052 1169.224 +CPAR2_805020-T 1938 1727.075 47.407509 1301.062 +CPAR2_805030-T 927 716.098 166.531884 1895.000 +CPAR2_805040-T 642 431.159 2142.879369 14681.629 +CPAR2_805050-T 738 527.132 151.852813 1271.984 +CPAR2_805060-T 867 656.101 82.391556 859.000 +CPAR2_805070-T 747 536.129 101.029908 860.713 +CPAR2_805080-T 3663 3452.075 20.636057 1132.000 +CPAR2_805090-T 747 536.129 0.000000 0.000 +CPAR2_805100-T 2868 2657.075 57.845126 2442.362 +CPAR2_805110-T 1392 1181.075 77.824211 1460.602 +CPAR2_805120-T 507 296.175 9.561485 45.000 +CPAR2_805130-T 765 554.123 28.619012 252.000 +CPAR2_805140-T 1026 815.075 12.817637 166.014 +CPAR2_805150-T 1116 905.075 5.492915 79.000 +CPAR2_805160-T 738 527.132 37.724927 316.000 +CPAR2_805170-T 441 230.202 17.495726 64.000 +CPAR2_805180-T 1326 1115.075 50.967628 903.105 +CPAR2_805190-T 255 44.403 213.637155 150.738 +CPAR2_805200-T 948 737.096 83.668628 980.000 +CPAR2_805210-T 1023 812.075 188.136399 2427.776 +CPAR2_805220-T 1833 1622.075 26.314386 678.272 +CPAR2_805230-T 1971 1760.075 3.074877 86.000 +CPAR2_805240-T 2325 2114.075 362.930680 12192.242 +CPAR2_805250-T 360 149.253 32.466053 77.000 +CPAR2_805260-T 1653 1442.075 64.061729 1468.000 +CPAR2_805270-T 2361 2150.075 39.571596 1352.000 +CPAR2_805280-T 1146 935.075 26.314233 391.000 +CPAR2_805290-T 1452 1241.075 475.908687 9385.582 +CPAR2_805300-T 1515 1304.075 29.774401 617.000 +CPAR2_805310-T 2448 2237.075 42.477299 1510.000 +CPAR2_805320-T 1257 1046.075 51.255112 852.000 +CPAR2_805330-T 1485 1274.075 76.307177 1544.898 +CPAR2_805340-T 1098 887.075 9.988748 140.803 +CPAR2_805350-T 1707 1496.075 64.609786 1536.000 +CPAR2_805360-T 741 530.132 56.860724 479.000 +CPAR2_805370-T 1071 860.075 41.120688 562.000 +CPAR2_805380-T 1365 1154.075 71.232000 1306.318 +CPAR2_805390-T 2223 2012.075 36.874838 1179.000 +CPAR2_805400-T 2268 2057.075 32.051509 1047.703 +CPAR2_805410-T 2268 2057.075 7.290028 238.297 +CPAR2_805420-T 2268 2057.075 43.716337 1429.004 +CPAR2_805430-T 465 254.184 276.544802 1117.000 +CPAR2_805440-T 2064 1853.075 45.510003 1340.107 +CPAR2_805450-T 4590 4379.075 9.800384 681.969 +CPAR2_805460-T 705 494.139 15.537140 122.000 +CPAR2_805470-T 492 281.177 70.052804 313.000 +CPAR2_805480-T 1488 1277.075 81.888076 1661.792 +CPAR2_805490-T 2898 2687.075 10.374912 443.000 +CPAR2_805500-T 1515 1304.075 288.697646 5982.537 +CPAR2_805510-T 1122 911.075 0.276291 4.000 +CPAR2_805520-T 3909 3698.075 24.964042 1467.000 +CPAR2_805530-T 336 125.320 26.614274 53.000 +CPAR2_805540-T 2133 1922.075 79.265684 2421.002 +CPAR2_805550-T 366 155.246 49.048600 121.000 +CPAR2_805560-T 795 584.119 93.406803 867.000 +CPAR2_805570-T 498 287.177 27.391865 125.000 +CPAR2_805580-T 984 773.083 54.545983 670.083 +CPAR2_805590-T 675 464.143 48.403529 357.000 +CPAR2_805600-T 1308 1097.075 41.358119 721.002 +CPAR2_805610-T 798 587.119 74.600862 696.000 +CPAR2_805620-T 2298 2087.075 19.327712 641.000 +CPAR2_805630-T 1221 1010.075 25.855616 415.000 +CPAR2_805640-T 3039 2828.075 17.935134 806.000 +CPAR2_805650-T 1707 1496.075 121.774304 2895.000 +CPAR2_805660-T 747 536.129 33.100971 282.000 +CPAR2_805670-T 579 368.168 134.007884 784.000 +CPAR2_805680-T 3123 2912.075 89.104602 4123.274 +CPAR2_805690-T 1881 1670.075 57.501480 1526.000 +CPAR2_805700-T 2841 2630.075 92.114472 3849.776 +CPAR2_805710-T 2925 2714.075 142.386115 6140.857 +CPAR2_805720-T 831 620.112 3.450400 34.000 +CPAR2_805730-T 534 323.170 80.615401 413.989 +CPAR2_805740-T 1383 1172.075 55.931650 1041.724 +CPAR2_805750-T 1140 929.075 42.602745 628.967 +CPAR2_805760-T 351 140.276 283.976505 633.000 +CPAR2_tV(UAC)1-T 73 73.000 0.000000 0.000 +CPAR2_805770-T 990 779.081 68.578101 849.000 +CPAR2_805780-T 804 593.118 27.267935 257.000 +CPAR2_805790-T 636 425.161 80.668378 545.000 +CPAR2_805800-T 1821 1610.075 204.156448 5223.345 +CPAR2_805810-T 945 734.097 68.463417 798.640 +CPAR2_805820-T 1455 1244.075 29.844608 590.000 +CPAR2_805830-T 1164 953.075 148.856416 2254.417 +CPAR2_805840-T 885 674.099 11.482639 123.000 +CPAR2_805850-T 2514 2303.075 159.164948 5824.988 +CPAR2_805860-T 1107 896.075 24.509895 349.000 +CPAR2_805870-T 2628 2417.075 42.544402 1634.075 +CPAR2_805880-T 1725 1514.075 124.891463 3004.828 +CPAR2_805890-T 2508 2297.075 143.251337 5228.937 +CPAR2_805900-T 2724 2513.075 353.307596 14109.055 +CPAR2_805910-T 606 395.168 110.684597 695.037 +CPAR2_tV(AAC)1-T 74 74.000 0.000000 0.000 +CPAR2_805920-T 171 31.759 1008.572132 508.997 +CPAR2_805930-T 2460 2249.075 20.705215 739.985 +CPAR2_805940-T 1713 1502.075 98.968962 2362.274 +CPAR2_805950-T 321 110.336 60.457307 106.000 +CPAR2_805960-T 579 368.168 544.391731 3184.911 +CPAR2_805970-T 1770 1559.075 89.564236 2218.918 +CPAR2_805980-T 3402 3191.075 74.312712 3768.249 +CPAR2_805990-T 1269 1058.075 17.545509 295.000 +CPAR2_806000-T 2445 2234.075 31.126122 1105.000 +CPAR2_806010-T 1044 833.075 497.502450 6585.958 +CPAR2_806020-T 3474 3263.075 62.856243 3259.230 +CPAR2_806030-T 2952 2741.075 23.238986 1012.226 +CPAR2_806040-T 861 650.103 0.000000 0.000 +CPAR2_806050-T 642 431.159 637.173147 4365.500 +CPAR2_806060-T 2721 2510.075 39.662517 1582.000 +CPAR2_806070-T 3399 3188.075 27.259988 1381.000 +CPAR2_806080-T 2298 2087.075 34.675303 1150.000 +CPAR2_806090-T 483 272.179 119.535436 517.000 +CPAR2_806100-T 381 170.239 213.665953 578.008 +CPAR2_806110-T 3468 3257.075 32.015129 1657.000 +CPAR2_806120-T 2301 2090.075 32.121604 1066.838 +CPAR2_806130-T 1476 1265.075 42.034015 845.000 +CPAR2_806140-T 354 143.266 329.881503 751.000 +CPAR2_806150-T 879 668.100 44.086738 468.046 +CPAR2_806160-T 972 761.086 14.056456 170.000 +CPAR2_806170-T 4365 4154.075 26.556333 1753.000 +CPAR2_806180-T 843 632.108 381.150264 3828.486 +CPAR2_806190-T 1020 809.075 11.667098 150.000 +CPAR2_806200-T 858 647.105 169.602547 1744.000 +CPAR2_806210-T 1104 893.075 22.689899 322.003 +CPAR2_806220-T 1740 1529.075 25.075409 609.279 +CPAR2_806230-T 1170 959.075 36.323277 553.576 +CPAR2_806240-T 987 776.081 69.410804 856.000 +CPAR2_806250-T 1305 1094.075 148.629780 2584.000 +CPAR2_806260-T 2643 2432.075 8.487062 328.000 +CPAR2_806270-T 702 491.139 14.478859 113.000 +CPAR2_806280-T 957 746.091 28.677907 340.000 +CPAR2_806290-T 1674 1463.075 33.263651 773.350 +CPAR2_806300-T 1581 1370.075 91.910104 2001.000 +CPAR2_806310-T 684 473.142 914.925854 6878.869 +CPAR2_806320-T 1491 1280.075 134.727917 2740.517 +CPAR2_806330-T 126 19.812 327.163433 103.000 +CPAR2_806340-T 720 509.136 43.878933 355.001 +CPAR2_806350-T 675 464.143 29.964089 221.000 +CPAR2_806360-T 1134 923.075 57.690320 846.213 +CPAR2_806370-T 2058 1847.075 79.008368 2318.981 +CPAR2_806380-T 3315 3104.075 49.469444 2440.106 +CPAR2_806390-T 4923 4712.075 19.364948 1450.000 +CPAR2_806400-T 6822 6611.075 4.952192 520.246 +CPAR2_806410-T 5016 4805.075 37.089712 2831.999 +CPAR2_806420-T 5145 4934.075 7.371954 578.000 +CPAR2_806430-T 1374 1163.075 18.937417 350.000 +CPAR2_806440-T 879 668.100 35.887596 381.000 +CPAR2_806450-T 792 581.119 23.066158 213.000 +CPAR2_806460-T 834 623.110 54.435795 539.000 +CPAR2_806470-T 393 182.238 78.387699 227.000 +CPAR2_806480-T 2565 2354.075 45.879145 1716.229 +CPAR2_806490-T 1203 992.075 4027.508144 63492.222 +CPAR2_806500-T 1458 1247.075 112.367176 2226.751 +CPAR2_806510-T 183 21.081 1573.158606 527.000 +CPAR2_806520-T 1887 1676.075 215.894931 5750.100 +CPAR2_806530-T 3030 2819.075 13.639394 611.000 +CPAR2_806540-T 1533 1322.075 93.767147 1969.910 +CPAR2_806550-T 474 263.181 2534.004946 10597.450 +CPAR2_806560-T 1530 1319.075 63.270426 1326.202 +CPAR2_806570-T 1095 884.075 638.569647 8970.920 +CPAR2_806580-T 1542 1331.075 471.243655 9967.531 +CPAR2_806590-T 1485 1274.075 28.796122 583.000 +CPAR2_806600-T 711 500.137 93.700755 744.683 +CPAR2_806610-T 618 407.166 37.928891 245.404 +CPAR2_806620-T 1152 941.075 450.055257 6730.226 +CPAR2_806630-T 939 728.098 17.407447 201.402 +CPAR2_806640-T 2970 2759.075 23.150642 1015.000 +CPAR2_806650-T 1731 1520.075 107.059602 2586.010 +CPAR2_806660-T 2655 2444.075 6.797511 264.000 +CPAR2_806670-T 1569 1358.075 214.477498 4628.551 +CPAR2_806680-T 1392 1181.075 91.187221 1711.398 +CPAR2_806690-T 3516 3305.075 12.243065 643.000 +CPAR2_806700-T 3501 3290.075 58.746839 3071.353 +CPAR2_806710-T 1068 857.075 17.181355 234.000 +CPAR2_806720-T 1059 848.075 22.706361 306.000 +CPAR2_806730-T 960 749.090 35.789322 426.017 +CPAR2_806740-T 1509 1298.075 61.539002 1269.375 +CPAR2_806750-T 2430 2219.075 125.761215 4434.638 +CPAR2_806760-T 1650 1439.075 95.986807 2195.000 +CPAR2_806770-T 897 686.099 99.701842 1087.000 +CPAR2_806780-T 1689 1478.075 397.258075 9330.582 +CPAR2_806790-T 1956 1745.075 116.759275 3237.763 +CPAR2_806800-T 981 770.084 46.498070 569.000 +CPAR2_806810-T 1119 908.075 120.722140 1742.000 +CPAR2_806820-T 1233 1022.075 180.933943 2938.613 +CPAR2_806830-T 1926 1715.075 3.455358 94.171 +CPAR2_806840-T 2130 1919.075 32.664592 996.113 +CPAR2_806850-T 1785 1574.075 111.659890 2792.944 +CPAR2_806860-T 2847 2636.075 15.732153 659.000 +CPAR2_806870-T 2007 1796.075 66.256357 1891.000 +CPAR2_806880-T 936 725.098 44.349102 511.000 +CPAR2_806890-T 1755 1544.075 124.897210 3064.507 +CPAR2_806900-T 1320 1109.075 0.453931 8.000 +CPAR2_806910-T 804 593.118 80.425749 758.012 +CPAR2_806920-T 735 524.133 163.649509 1363.000 +CPAR2_806930-T 744 533.131 8.616870 73.000 +CPAR2_806940-T 744 533.131 5.429808 46.000 +CPAR2_806950-T 1395 1184.075 85.195680 1603.010 +CPAR2_806960-T 2184 1973.075 60.412535 1894.132 +CPAR2_806970-T 2196 1985.075 27.045443 853.121 +CPAR2_806980-T 1626 1415.075 198.764445 4469.487 +CPAR2_806990-T 1245 1034.075 0.060857 1.000 +CPAR2_807000-T 987 776.081 20.434022 252.000 +CPAR2_807010-T 996 785.076 48.656133 607.000 +CPAR2_807020-T 840 629.109 316.598157 3165.000 +CPAR2_807030-T 2391 2180.075 139.120039 4819.485 +CPAR2_807040-T 756 545.125 369.183922 3198.000 +CPAR2_807050-T 2823 2612.075 18.069083 750.000 +CPAR2_807060-T 1392 1181.075 34.420365 646.000 +CPAR2_807070-T 1212 1001.075 64.120066 1020.000 +CPAR2_807080-T 228 19.222 2255.722265 689.000 +CPAR2_807090-T 1035 824.075 117.139897 1533.950 +CPAR2_807100-T 1509 1298.075 33.063211 682.000 +CPAR2_807110-T 2103 1892.075 85.934230 2583.712 +CPAR2_807120-T 366 155.246 35.266349 87.000 +CPAR2_807130-T 1176 965.075 32.484811 498.174 +CPAR2_807140-T 1263 1052.075 77.319795 1292.638 +CPAR2_807150-T 2139 1928.075 69.099442 2117.084 +CPAR2_807160-T 945 734.097 97.555024 1138.000 +CPAR2_807170-T 1452 1241.075 87.891894 1733.351 +CPAR2_807180-T 1596 1385.075 42.481395 935.000 +CPAR2_807190-T 2097 1886.075 247.016964 7403.299 +CPAR2_807200-T 2130 1919.075 4.590887 140.000 +CPAR2_807210-T 1278 1067.075 152.154631 2580.000 +CPAR2_807220-T 333 122.324 104.949037 204.000 +CPAR2_807230-T 2268 2057.075 51.658649 1688.623 +CPAR2_807240-T 2265 2054.075 84.435130 2755.999 +CPAR2_807250-T 975 764.085 84.007519 1019.998 +CPAR2_807260-T 3378 3167.075 42.085024 2117.997 +CPAR2_807270-T 3387 3176.075 45.789634 2310.987 +CPAR2_807280-T 777 566.119 647.359142 5823.614 +CPAR2_807290-T 1419 1208.075 184.699501 3545.677 +CPAR2_807300-T 2085 1874.075 50.503484 1504.000 +CPAR2_807310-T 1074 863.075 102.808765 1409.997 +CPAR2_807320-T 2589 2378.075 35.041463 1324.181 +CPAR2_807330-T 1131 920.075 53.554865 783.000 +CPAR2_807340-T 1668 1457.075 42.671262 988.000 +CPAR2_807350-T 3990 3779.075 41.900797 2516.212 +CPAR2_807360-T 4290 4079.075 129.412258 8388.351 +CPAR2_807370-T 1014 803.075 102.498153 1308.012 +CPAR2_807380-T 1479 1268.075 220.966646 4452.575 +CPAR2_tK(CUU)2-T 74 74.000 0.000000 0.000 +CPAR2_807390-T 1218 1007.075 0.999813 16.000 +CPAR2_807400-T 5655 5444.075 78.951627 6830.062 +CPAR2_807410-T 5418 5207.075 28.231862 2336.000 +CPAR2_807420-T 855 644.107 351.902044 3601.796 +CPAR2_807430-T 1800 1589.075 30.889485 780.000 +CPAR2_807440-T 1452 1241.075 58.717961 1158.000 +CPAR2_807450-T 1056 845.075 107.754063 1447.000 +CPAR2_807460-T 5853 5642.075 41.027884 3678.387 +CPAR2_807470-T 1644 1433.075 52.344106 1192.000 +CPAR2_807480-T 1848 1637.075 12.608567 328.000 +CPAR2_807490-T 1278 1067.075 152.130497 2579.591 +CPAR2_807500-T 780 569.119 39.917618 361.000 +CPAR2_807510-T 168 32.446 5335.685658 2750.999 +CPAR2_807520-T 1797 1586.075 126.092733 3177.996 +CPAR2_807530-T 1692 1481.075 268.920292 6329.074 +CPAR2_807540-T 1059 848.075 96.910157 1306.000 +CPAR2_807550-T 1485 1274.075 73.613806 1490.369 +CPAR2_807560-T 429 218.220 580.509886 2012.999 +CPAR2_807570-T 339 128.315 83.864768 171.000 +CPAR2_807580-T 765 554.123 169.826663 1495.381 +CPAR2_807590-T 1707 1496.075 389.129106 9250.956 +CPAR2_tY(GUA)1-T 75 75.000 0.000000 0.000 +CPAR2_807600-T 2175 1964.075 690.069864 21537.270 +CPAR2_807610-T 576 365.168 79.445353 461.000 +CPAR2_807620-T 582 371.168 14.581034 86.000 +CPAR2_807630-T 609 398.167 46.624849 295.000 +CPAR2_807640-T 987 776.081 84.655233 1044.000 +CPAR2_807650-T 2460 2249.075 61.877558 2211.447 +CPAR2_807660-T 1038 827.075 19.341070 254.194 +CPAR2_807670-T 3948 3737.075 8.116630 482.000 +CPAR2_807680-T 1242 1031.075 34.798175 570.146 +CPAR2_807690-T 168 32.446 230.805792 119.000 +CPAR2_807700-T 2136 1925.075 1506.592104 46087.470 +CPAR2_807710-T 2136 1925.075 211.415146 6467.304 +CPAR2_807720-T 2136 1925.075 522.884301 15995.314 +CPAR2_807730-T 1599 1388.075 39.216030 865.000 +CPAR2_807740-T 1599 1388.075 0.000000 0.000 +CPAR2_807750-T 1116 905.075 271.601310 3906.214 +CPAR2_807760-T 627 416.165 109.502085 724.148 +CPAR2_807770-T 780 569.119 128.488288 1162.000 +CPAR2_807780-T 912 701.099 27.466455 306.000 +CPAR2_807790-T 1800 1589.075 103.875794 2623.000 +CPAR2_807800-T 984 773.083 35.083456 430.991 +CPAR2_807810-T 1365 1154.075 33.864261 621.034 +CPAR2_807820-T 2313 2102.075 44.726876 1494.020 +CPAR2_807830-T 732 521.133 60.378408 500.000 +CPAR2_807840-T 267 56.381 122.778891 110.000 +CPAR2_807850-T 1140 929.075 25.739092 380.000 +CPAR2_807860-T 2190 1979.075 32.182565 1012.098 +CPAR2_807870-T 936 725.098 207.137066 2386.678 +CPAR2_807880-T 1089 878.075 436.011808 6083.724 +CPAR2_807890-T 2850 2639.075 0.023846 1.000 +CPAR2_807900-T 2832 2621.075 9.114929 379.640 +CPAR2_807910-T 2838 2627.075 10.931893 456.360 +CPAR2_807920-T 1494 1283.075 86.584744 1765.359 +CPAR2_807930-T 1878 1667.075 32.615127 864.000 +CPAR2_807940-T 1491 1280.075 21.434409 436.000 +CPAR2_807950-T 1236 1025.075 119.907167 1953.171 +CPAR2_807960-T 2361 2150.075 21.337051 729.000 +CPAR2_807970-T 996 785.076 27.814956 347.000 +CPAR2_807980-T 747 536.129 231.629357 1973.340 +CPAR2_807990-T 966 755.088 33.253408 399.000 +CPAR2_808000-T 1338 1127.075 50.373658 902.186 +CPAR2_808010-T 3387 3176.075 25.005130 1262.000 +CPAR2_808020-T 1077 866.075 210.328365 2894.629 +CPAR2_808030-T 651 440.149 254.760152 1781.850 +CPAR2_808040-T 1440 1229.075 67.022166 1308.990 +CPAR2_808050-T 417 206.232 525.763538 1723.000 +CPAR2_808060-T 1029 818.075 63.777971 829.093 +CPAR2_808070-T 927 716.098 21.354748 243.000 +CPAR2_808080-T 1365 1154.075 67.833898 1244.000 +CPAR2_808090-T 2088 1877.075 34.195880 1019.988 +CPAR2_808100-T 1047 836.075 666.371530 8853.221 +CPAR2_808110-T 2202 1991.075 22.525139 712.680 +CPAR2_808120-T 2229 2018.075 3.065948 98.320 +CPAR2_808130-T 1548 1337.075 81.162762 1724.456 +CPAR2_808140-T 804 593.118 61.220227 577.000 +CPAR2_808150-T 756 545.125 65.352773 566.109 +CPAR2_808160-T 4896 4685.075 18.348722 1366.035 +CPAR2_808170-T 795 584.119 131.976163 1225.000 +CPAR2_808180-T 2430 2219.075 21.042261 742.000 +CPAR2_808190-T 1788 1577.075 25.019329 627.000 +CPAR2_808200-T 1479 1268.075 76.177085 1535.002 +CPAR2_808210-T 1020 809.075 83.847608 1078.001 +CPAR2_808220-T 1374 1163.075 49.036189 906.283 +CPAR2_808230-T 3654 3443.075 23.139168 1266.000 +CPAR2_808240-T 1053 842.075 38.487246 515.000 +CPAR2_808250-T 342 131.306 405.175472 845.410 +CPAR2_808260-T 234 23.994 116.947043 44.590 +CPAR2_808270-T 936 725.098 8.852463 102.000 +CPAR2_808280-T 2505 2294.075 277.512071 10116.470 +CPAR2_808290-T 1965 1754.075 138.806331 3868.984 +CPAR2_808300-T 1308 1097.075 72.161365 1258.000 +CPAR2_808310-T 456 245.187 0.770006 3.000 +CPAR2_808320-T 282 71.359 68.787043 78.000 +CPAR2_808330-T 1584 1373.075 0.183327 4.000 +CPAR2_808340-T 468 257.182 2.691611 11.000 +CPAR2_808350-T 477 266.180 2.364203 10.000 +CPAR2_808360-T 480 269.180 61.485710 263.000 +CPAR2_808370-T 480 269.180 292.466250 1251.000 +CPAR2_808380-T 1317 1106.075 80.336062 1412.000 +CPAR2_808390-T 1557 1346.075 3.038817 65.000 +CPAR2_808400-T 1668 1457.075 1.986719 46.000 +CPAR2_808410-T 1557 1346.075 4.815356 103.000 +CPAR2_808420-T 1335 1124.075 126.211640 2254.417 +CPAR2_808430-T 1650 1439.075 91.164008 2084.714 +CPAR2_808440-T 1188 977.075 186.634452 2897.739 +CPAR2_808450-T 4248 4037.075 112.975749 7247.555 +CPAR2_808460-T 648 437.154 64.635760 449.000 +CPAR2_808470-T 3000 2789.075 66.448795 2945.010 +CPAR2_808480-T 1500 1289.075 41.300186 845.999 +CPAR2_808490-T 1851 1640.075 187.938555 4898.004 +CPAR2_808500-T 2592 2381.075 44.064302 1667.245 +CPAR2_808510-T 798 587.119 169.422208 1580.650 +CPAR2_808520-T 1884 1673.075 44.074877 1171.780 +CPAR2_808530-T 207 8.931 1338.096147 189.892 +CPAR2_808540-T 846 635.108 29.329497 296.000 +CPAR2_808550-T 939 728.098 21.780675 252.000 +CPAR2_808560-T 981 770.084 4.331103 53.000 +CPAR2_808570-T 1401 1190.075 89.480309 1692.160 +CPAR2_808580-T 885 674.099 62.663085 671.236 +CPAR2_808590-T 2412 2201.075 30.592109 1070.000 +CPAR2_808600-T 1551 1340.075 106.160292 2260.637 +CPAR2_808610-T 3984 3773.075 31.755453 1903.940 +CPAR2_tW(CCA)1-T 73 73.000 0.000000 0.000 +CPAR2_808620-T 1503 1292.075 320.485574 6580.150 +CPAR2_808630-T 162 32.713 144.279314 75.000 +CPAR2_808640-T 1482 1271.075 73.453147 1483.615 +CPAR2_808650-T 1116 905.075 57.015072 820.000 +CPAR2_808660-T 852 641.107 137.802750 1403.873 +CPAR2_808670-T 1011 800.075 2276.490862 28942.513 +CPAR2_808680-T 813 602.117 3.553519 34.000 +CPAR2_808690-T 2304 2093.075 77.174696 2566.843 +CPAR2_808700-T 690 479.142 248.557500 1892.476 +CPAR2_808710-T 1947 1736.075 83.468258 2302.658 +CPAR2_808720-T 1005 794.075 20.287980 256.000 +CPAR2_808730-T 2733 2522.075 120.628049 4834.436 +CPAR2_808740-T 1731 1520.075 76.782038 1854.660 +CPAR2_808750-T 888 677.099 618.061997 6650.035 +CPAR2_808760-T 1674 1463.075 64.138910 1491.172 +CPAR2_808770-T 1002 791.075 21.796827 274.000 +CPAR2_808780-T 309 98.341 245.089660 383.000 +CPAR2_808790-T 627 416.165 107.914770 713.651 +CPAR2_808800-T 2013 1802.075 54.721325 1567.000 +CPAR2_808810-T 3420 3209.075 113.112782 5768.077 +CPAR2_808820-T 1461 1250.075 39.981984 794.218 +CPAR2_808830-T 1551 1340.075 39.973105 851.210 +CPAR2_808840-T 1002 791.075 39.218378 493.000 +CPAR2_808850-T 396 185.237 0.000000 0.000 +CPAR2_808860-T 663 452.143 305.505479 2195.000 +CPAR2_808870-T 411 200.234 368.373958 1172.105 +CPAR2_808880-T 2220 2009.075 58.853799 1878.928 +CPAR2_808890-T 3279 3068.075 6.850795 334.000 +CPAR2_808900-T 414 203.233 48.656129 157.135 +CPAR2_808910-T 1047 836.075 30.486035 405.029 +CPAR2_808920-T 2655 2444.075 42.355700 1645.000 +CPAR2_808930-T 420 209.228 321.863742 1070.119 +CPAR2_808940-T 1926 1715.075 67.263420 1833.165 +CPAR2_808950-T 828 617.113 64.245206 630.006 +CPAR2_808960-T 1305 1094.075 56.771514 987.000 +CPAR2_808970-T 3822 3611.075 28.824349 1654.000 +CPAR2_808980-T 1455 1244.075 115.635211 2286.000 +CPAR2_808990-T 5397 5186.075 14.755547 1216.000 +CPAR2_809000-T 690 479.142 656.408485 4997.787 +CPAR2_809010-T 279 68.363 8.284767 9.000 +CPAR2_809020-T 1932 1721.075 168.559917 4609.923 +CPAR2_809030-T 1038 827.075 50.348550 661.716 +CPAR2_809040-T 3450 3239.075 135.143123 6955.918 +CPAR2_809050-T 1656 1445.075 39.520751 907.518 +CPAR2_809060-T 1116 905.075 9.595219 138.000 +CPAR2_200010-T 1872 1661.075 11.630800 307.000 +CPAR2_200020-T 2247 2036.075 18.915513 612.000 +CPAR2_200030-T 387 176.239 261.735972 733.000 +CPAR2_200040-T 399 188.237 148.521567 444.256 +CPAR2_200050-T 579 368.168 21.366053 125.000 +CPAR2_200060-T 1035 824.075 46.582573 610.000 +CPAR2_200070-T 1785 1574.075 19.389954 485.000 +CPAR2_200080-T 1530 1319.075 28.923129 606.254 +CPAR2_200090-T 963 752.090 22.675667 271.000 +CPAR2_200100-T 729 518.134 60.849435 501.000 +CPAR2_200110-T 5241 5030.075 116.614287 9321.068 +CPAR2_200120-T 1125 914.075 48.536413 705.000 +CPAR2_200130-T 996 785.076 69.577468 868.000 +CPAR2_200140-T 1287 1076.075 61.826886 1057.206 +CPAR2_200150-T 1425 1214.075 2.436199 47.000 +CPAR2_200160-T 633 422.163 20.571201 138.000 +CPAR2_200170-T 2013 1802.075 35.622401 1020.083 +CPAR2_200180-T 423 212.227 33.210762 112.000 +CPAR2_200190-T 1098 887.075 68.529437 966.000 +CPAR2_200200-T 2487 2276.075 35.473217 1283.000 +CPAR2_200210-T 1260 1049.075 52.848149 881.000 +CPAR2_200220-T 1629 1418.075 5.591545 126.000 +CPAR2_200230-T 777 566.119 34.015289 306.000 +CPAR2_200240-T 3042 2831.075 32.653327 1468.988 +CPAR2_200250-T 1062 851.075 66.769834 903.000 +CPAR2_200260-T 357 146.259 156.187064 363.000 +CPAR2_200270-T 471 260.181 197.125039 815.000 +CPAR2_200280-T 1104 893.075 61.163479 868.000 +CPAR2_200290-T 486 275.178 113.658719 497.000 +CPAR2_200300-T 1071 860.075 24.365105 333.000 +CPAR2_200310-T 1698 1487.075 9.860150 233.000 +CPAR2_200320-T 1509 1298.075 16.680356 344.068 +CPAR2_200330-T 702 491.139 16.851395 131.516 +CPAR2_200340-T 3015 2804.075 27.210736 1212.466 +CPAR2_200350-T 891 680.099 93.467211 1010.116 +CPAR2_200360-T 642 431.159 127.420035 873.000 +CPAR2_200370-T 390 179.238 55.284622 157.462 +CPAR2_200380-T 1542 1331.075 62.643179 1325.000 +CPAR2_200390-T 987 776.081 28.461673 351.000 +CPAR2_200400-T 2622 2411.075 14.355306 550.000 +CPAR2_200410-T 549 338.169 42.801016 230.000 +CPAR2_200420-T 1659 1448.075 104.402564 2402.380 +CPAR2_200430-T 780 569.119 181.453771 1641.000 +CPAR2_200440-T 576 365.168 35.672859 207.000 +CPAR2_200450-T 609 398.167 30.187570 191.000 +CPAR2_200460-T 828 617.113 66.080112 648.000 +CPAR2_200470-T 846 635.108 102.706242 1036.535 +CPAR2_200480-T 918 707.098 62.476708 702.000 +CPAR2_200490-T 312 101.339 1254.394029 2020.000 +CPAR2_200500-T 978 767.084 2.050962 25.000 +CPAR2_200510-T 509 298.174 11.100542 52.596 +CPAR2_200520-T 708 497.138 339.677305 2683.386 +CPAR2_200530-T 945 734.097 24.054238 280.598 +CPAR2_200540-T 1149 938.075 48.676830 725.604 +CPAR2_200550-T 1878 1667.075 65.182792 1726.743 +CPAR2_200560-T 1140 929.075 82.432784 1216.999 +CPAR2_200570-T 795 584.119 49.558396 460.000 +CPAR2_200580-T 1023 812.075 54.245320 700.000 +CPAR2_200590-T 807 596.118 124.780299 1182.000 +CPAR2_200600-T 3792 3581.075 27.237707 1549.971 +CPAR2_200610-T 324 113.334 122.713222 221.000 +CPAR2_200620-T 1164 953.075 44.066145 667.378 +CPAR2_200630-T 2022 1811.075 53.285774 1533.512 +CPAR2_200640-T 2055 1844.075 166.178835 4869.606 +CPAR2_200650-T 1563 1352.075 211.166792 4536.971 +CPAR2_200660-T 1464 1253.075 45.650680 909.000 +CPAR2_200670-T 783 572.119 6.159738 56.000 +CPAR2_200680-T 633 422.163 64.545871 433.000 +CPAR2_200690-T 2163 1952.075 146.103852 4532.081 +CPAR2_200700-T 1536 1325.075 71.854773 1512.989 +CPAR2_200710-T 282 71.359 862.484470 978.000 +CPAR2_200720-T 1437 1226.075 51.935603 1011.863 +CPAR2_200730-T 1272 1061.075 91.156617 1537.000 +CPAR2_200740-T 1632 1421.075 37.420595 845.020 +CPAR2_200750-T 399 188.237 8.692198 26.000 +CPAR2_200760-T 4182 3971.075 32.632278 2059.183 +CPAR2_200770-T 2238 2027.075 30.978831 997.871 +CPAR2_200780-T 444 233.197 78.058228 289.255 +CPAR2_200790-T 2643 2432.075 51.340414 1984.156 +CPAR2_200800-T 1506 1295.075 68.057682 1400.592 +CPAR2_200810-T 945 734.097 0.000000 0.000 +CPAR2_200820-T 2088 1877.075 22.026435 657.000 +CPAR2_200830-T 1710 1499.075 1715.233252 40858.846 +CPAR2_200840-T 807 596.118 933.633532 8843.983 +CPAR2_200850-T 357 146.259 33.991124 79.000 +CPAR2_200860-T 861 650.103 131.615979 1359.660 +CPAR2_200870-T 576 365.168 289.003307 1677.008 +CPAR2_200880-T 1704 1493.075 23.828440 565.349 +CPAR2_200890-T 324 113.334 9376.602866 16886.764 +CPAR2_200900-T 894 683.099 40.583934 440.532 +CPAR2_200910-T 561 350.169 104.484270 581.391 +CPAR2_200920-T 2175 1964.075 71.591853 2234.401 +CPAR2_200930-T 1290 1079.075 45.316981 777.056 +CPAR2_200940-T 1002 791.075 31.979286 402.000 +CPAR2_200950-T 2010 1799.075 10.423834 298.000 +CPAR2_200960-T 1749 1538.075 19.393736 474.000 +CPAR2_200970-T 1797 1586.075 1.269658 32.000 +CPAR2_200980-T 2721 2510.075 4.688300 187.000 +CPAR2_200990-T 1992 1781.075 34.001901 962.332 +CPAR2_201000-T 996 785.076 195.276149 2436.129 +CPAR2_201010-T 444 233.197 216.157304 801.000 +CPAR2_201020-T 537 326.170 1673.488309 8673.742 +CPAR2_201030-T 3399 3188.075 15.001876 760.000 +CPAR2_201040-T 1020 809.075 31.423384 404.000 +CPAR2_201050-T 1371 1160.075 46.282431 853.182 +CPAR2_201060-T 1944 1733.075 38.853208 1070.000 +CPAR2_201070-T 1041 830.075 68.307412 901.000 +CPAR2_201080-T 885 674.099 32.902513 352.446 +CPAR2_201090-T 771 560.120 54.909042 488.725 +CPAR2_201100-T 2496 2285.075 27.374514 994.000 +CPAR2_201110-T 618 407.166 289.291941 1871.749 +CPAR2_201120-T 885 674.099 48.235561 516.691 +CPAR2_201130-T 810 599.118 177.885071 1693.523 +CPAR2_201140-T 561 350.169 59.094782 328.826 +CPAR2_201150-T 894 683.099 19.849949 215.468 +CPAR2_201160-T 324 113.334 8151.411259 14680.259 +CPAR2_201170-T 1575 1364.075 170.591919 3697.739 +CPAR2_201180-T 1317 1106.075 265.790778 4671.583 +CPAR2_201190-T 339 128.315 91.711764 187.000 +CPAR2_201200-T 606 395.168 152.378588 956.852 +CPAR2_201210-T 1131 920.075 51.844939 758.000 +CPAR2_201220-T 1092 881.075 151.591666 2122.403 +CPAR2_201230-T 1200 989.075 140.994099 2216.000 +CPAR2_201240-T 1332 1121.075 241.599322 4303.977 +CPAR2_201250-T 495 284.177 75.956341 342.998 +CPAR2_201260-T 996 785.076 76.390930 953.000 +CPAR2_201270-T 1176 965.075 86.162179 1321.348 +CPAR2_201280-T 1656 1445.075 35.535319 816.000 +CPAR2_tM(CAU)4-T 74 74.000 0.000000 0.000 +CPAR2_201290-T 348 137.287 873.466479 1905.524 +CPAR2_201300-T 2739 2528.075 28.107715 1129.159 +CPAR2_201310-T 645 434.156 156.254715 1078.000 +CPAR2_201320-T 684 473.142 38.972842 293.017 +CPAR2_201330-T 351 140.276 83.435695 185.983 +CPAR2_201340-T 987 776.081 38.759771 478.000 +CPAR2_201350-T 936 725.098 73.697328 849.157 +CPAR2_201360-T 2640 2429.075 76.178157 2940.430 +CPAR2_201370-T 948 737.096 50.627949 592.999 +CPAR2_201380-T 936 725.098 89.218976 1028.000 +CPAR2_201390-T 1350 1139.075 76.579090 1386.124 +CPAR2_201400-T 2508 2297.075 56.541373 2063.864 +CPAR2_201410-T 858 647.105 70.311148 723.000 +CPAR2_201420-T 2058 1847.075 98.239011 2883.421 +CPAR2_201430-T 2022 1811.075 4.308695 124.000 +CPAR2_201440-T 1596 1385.075 26.261226 578.000 +CPAR2_201450-T 903 692.099 45.099730 496.000 +CPAR2_201460-T 1020 809.075 51.101890 657.000 +CPAR2_201470-T 318 107.338 63.318716 108.000 +CPAR2_201480-T 4623 4412.075 34.661018 2430.097 +CPAR2_201490-T 651 440.149 78.779273 551.000 +CPAR2_201500-T 1701 1490.075 74.329965 1759.996 +CPAR2_201510-T 1791 1580.075 142.180572 3569.912 +CPAR2_201520-T 1272 1061.075 48.918741 824.823 +CPAR2_201530-T 2511 2300.075 33.789787 1235.000 +CPAR2_201540-T 1998 1787.075 194.240877 5515.983 +CPAR2_201550-T 561 350.169 216.915270 1207.000 +CPAR2_201560-T 330 119.329 2683.006069 5087.527 +CPAR2_201570-T 1131 920.075 547.785851 8008.914 +CPAR2_201580-T 360 149.253 35.839150 85.000 +CPAR2_201590-T 1926 1715.075 13.120529 357.581 +CPAR2_201600-T 981 770.084 68.562317 839.002 +CPAR2_201610-T 2058 1847.075 41.974640 1232.001 +CPAR2_201620-T 453 242.189 90.684106 349.000 +CPAR2_201630-T 1602 1391.075 49.184592 1087.224 +CPAR2_201640-T 708 497.138 30.000728 237.000 +CPAR2_201650-T 573 362.169 19.113598 110.000 +CPAR2_201660-T 1527 1316.075 143.254202 2995.902 +CPAR2_201670-T 2622 2411.075 9.317899 357.000 +CPAR2_201680-T 2034 1823.075 19.956579 578.136 +CPAR2_201690-T 414 203.233 582.764119 1882.033 +CPAR2_201700-T 390 179.238 17.203861 49.000 +CPAR2_201710-T 1674 1463.075 33.248599 773.000 +CPAR2_201720-T 735 524.133 75.041044 625.000 +CPAR2_201730-T 1461 1250.075 17.166381 341.000 +CPAR2_201740-T 576 365.168 0.344665 2.000 +CPAR2_201750-T 405 194.236 127.975729 395.000 +CPAR2_201760-T 4791 4580.075 30.589706 2226.319 +CPAR2_201770-T 4113 3902.075 48.575790 3012.000 +CPAR2_201780-T 2139 1928.075 51.897223 1590.038 +CPAR2_201790-T 1734 1523.075 60.832646 1472.304 +CPAR2_201800-T 2253 2042.075 79.754108 2588.000 +CPAR2_201810-T 1200 989.075 65.788770 1034.000 +CPAR2_201820-T 687 476.142 64.365501 487.000 +CPAR2_201830-T 1707 1496.075 58.647086 1394.246 +CPAR2_201840-T 378 167.240 219.008992 582.024 +CPAR2_201850-T 1422 1211.075 90.363076 1739.008 +CPAR2_201860-T 1296 1085.075 109.207127 1883.000 +CPAR2_201870-T 975 764.085 2.223734 27.000 +CPAR2_201880-T 2703 2492.075 16.918980 670.000 +CPAR2_201890-T 450 239.191 33.676356 128.000 +CPAR2_201900-T 1698 1487.075 1.314489 31.062 +CPAR2_201910-T 804 593.118 97.481910 918.766 +CPAR2_201920-T 2337 2126.075 63.047424 2130.029 +CPAR2_201930-T 900 689.099 734.622851 8044.250 +CPAR2_201940-T 3834 3623.075 30.240012 1741.000 +CPAR2_201950-T 780 569.119 99.996257 904.329 +CPAR2_201960-T 804 593.118 68.944450 649.801 +CPAR2_201970-T 768 557.122 27.500133 243.458 +CPAR2_201980-T 1623 1412.075 45.635482 1024.000 +CPAR2_201990-T 972 761.086 213.535688 2582.519 +CPAR2_202000-T 2442 2231.075 74.778432 2651.124 +CPAR2_202010-T 666 455.143 153.197697 1108.000 +CPAR2_202020-T 471 260.181 76.189432 315.000 +CPAR2_202030-T 540 329.170 126.452883 661.437 +CPAR2_202040-T 474 263.181 42.084168 176.000 +CPAR2_202050-T 1659 1448.075 14.819166 341.000 +CPAR2_202060-T 222 15.404 93.963991 23.000 +CPAR2_202070-T 450 239.191 222.316567 845.000 +CPAR2_202080-T 291 80.345 319.564996 408.000 +CPAR2_202090-T 1254 1043.075 16.772186 278.000 +CPAR2_202100-T 3138 2927.075 89.527528 4164.184 +CPAR2_202110-T 759 548.124 97.589038 850.000 +CPAR2_202120-T 1746 1535.075 24.920945 607.902 +CPAR2_202130-T 1485 1274.075 129.212099 2616.000 +CPAR2_202140-T 1212 1001.075 105.169481 1673.000 +CPAR2_202150-T 1662 1451.075 60.455159 1394.000 +CPAR2_202160-T 2334 2123.075 53.739417 1813.000 +CPAR2_202170-T 1890 1679.075 40.514311 1080.981 +CPAR2_202180-T 1422 1211.075 79.918206 1538.000 +CPAR2_202190-T 915 704.098 46.572225 521.074 +CPAR2_202200-T 1383 1172.075 52.724991 982.000 +CPAR2_202210-T 1425 1214.075 52.326703 1009.505 +CPAR2_202220-T 2778 2567.075 27.800915 1134.063 +CPAR2_202230-T 1644 1433.075 129.717358 2953.973 +CPAR2_202240-T 615 404.167 305.647038 1963.000 +CPAR2_202250-T 1773 1562.075 124.131429 3081.223 +CPAR2_202260-T 2034 1823.075 71.661069 2076.000 +CPAR2_202270-T 522 311.173 96.668929 478.000 +CPAR2_202280-T 474 263.181 192.248133 804.000 +CPAR2_202290-T 1854 1643.075 77.060363 2012.000 +CPAR2_202300-T 1335 1124.075 37.441328 668.784 +CPAR2_202310-T 2619 2408.075 15.171108 580.533 +CPAR2_202320-T 606 395.168 51.119200 321.000 +CPAR2_202330-T 978 767.084 37.491577 457.000 +CPAR2_202340-T 1305 1094.075 66.434751 1155.000 +CPAR2_202350-T 1440 1229.075 47.464171 927.009 +CPAR2_202360-T 762 551.123 93.089399 815.246 +CPAR2_202370-T 654 443.147 63.767758 449.043 +CPAR2_202380-T 1611 1400.075 25.759788 573.104 +CPAR2_202390-T 801 590.119 62.917746 590.000 +CPAR2_202400-T 1005 794.075 83.687918 1056.000 +CPAR2_202410-T 1326 1115.075 39.787391 705.000 +CPAR2_202420-T 2088 1877.075 101.040824 3013.825 +CPAR2_202430-T 2364 2153.075 69.469379 2376.797 +CPAR2_202440-T 1791 1580.075 96.294109 2417.781 +CPAR2_202450-T 1890 1679.075 252.336769 6732.714 +CPAR2_202460-T 291 80.345 352.850520 450.497 +CPAR2_202470-T 1560 1349.075 66.999614 1436.309 +CPAR2_202480-T 1905 1694.075 51.783405 1394.000 +CPAR2_202490-T 516 305.173 288.704378 1400.034 +CPAR2_202500-T 2700 2489.075 23.765589 939.996 +CPAR2_202510-T 999 788.075 16.130365 202.000 +CPAR2_202520-T 414 203.233 435.981698 1408.000 +CPAR2_202530-T 741 530.132 118.505694 998.303 +CPAR2_202540-T 1482 1271.075 35.102294 709.000 +CPAR2_202550-T 186 17.248 153.241458 42.000 +CPAR2_202560-T 783 572.119 76.776519 697.998 +CPAR2_202570-T 1392 1181.075 55.573437 1043.000 +CPAR2_202580-T 1626 1415.075 57.190245 1286.000 +CPAR2_202590-T 549 338.169 117.051473 629.000 +CPAR2_202600-T 975 764.085 152.723593 1854.330 +CPAR2_202610-T 1884 1673.075 65.899050 1752.000 +CPAR2_202620-T 999 788.075 210.852921 2640.504 +CPAR2_202630-T 486 275.178 20.582062 90.000 +CPAR2_202640-T 843 632.108 368.557769 3702.000 +CPAR2_202650-T 1593 1382.075 0.455333 10.000 +CPAR2_202660-T 594 383.168 60.110779 366.000 +CPAR2_202670-T 2904 2693.075 25.353707 1084.999 +CPAR2_202680-T 2094 1883.075 34.658250 1037.084 +CPAR2_202690-T 1980 1769.075 70.994795 1995.778 +CPAR2_202700-T 990 779.081 143.456664 1776.000 +CPAR2_202710-T 1761 1550.075 388.305274 9564.572 +CPAR2_202720-T 921 710.098 63.362768 714.977 +CPAR2_202730-T 1188 977.075 35.101769 545.000 +CPAR2_202740-T 756 545.125 52.179847 452.000 +CPAR2_202750-T 3759 3548.075 83.062311 4683.131 +CPAR2_202760-T 1830 1619.075 45.048211 1159.002 +CPAR2_202770-T 1812 1601.075 70.916299 1804.252 +CPAR2_202780-T 2406 2195.075 58.885933 2054.000 +CPAR2_202790-T 939 728.098 48.401501 560.000 +CPAR2_202800-T 2961 2750.075 333.193459 14560.641 +CPAR2_202810-T 1287 1076.075 62.809040 1074.000 +CPAR2_202820-T 1383 1172.075 57.467737 1070.333 +CPAR2_202830-T 759 548.124 47.761639 416.004 +CPAR2_202840-T 1665 1454.075 52.280602 1208.000 +CPAR2_202850-T 2166 1955.075 122.959027 3820.000 +CPAR2_202860-T 1083 872.075 57.873656 802.000 +CPAR2_202870-T 342 131.306 8.626774 18.000 +CPAR2_202880-T 330 119.329 100.727556 191.000 +CPAR2_202890-T 324 113.334 78.292146 141.000 +CPAR2_202900-T 318 107.338 163.573350 279.000 +CPAR2_202910-T 4446 4235.075 55.757113 3752.329 +CPAR2_202920-T 1794 1583.075 160.846909 4046.260 +CPAR2_202930-T 1896 1685.075 208.992618 5596.155 +CPAR2_202940-T 2340 2129.075 142.023446 4804.968 +CPAR2_202950-T 1155 944.075 937.822647 14069.116 +CPAR2_202960-T 531 320.171 26.338046 134.000 +CPAR2_202970-T 2034 1823.075 37.019745 1072.451 +CPAR2_202980-T 1344 1133.075 34.164303 615.136 +CPAR2_202990-T 648 437.154 60.748978 422.000 +CPAR2_203000-T 633 422.163 30.870479 207.092 +CPAR2_203010-T 2613 2402.075 13.361171 510.000 +CPAR2_203020-T 1926 1715.075 66.743665 1819.000 +CPAR2_203030-T 2832 2621.075 14.765772 615.000 +CPAR2_203040-T 1689 1478.075 87.025169 2044.000 +CPAR2_203050-T 1287 1076.075 561.943574 9608.926 +CPAR2_203060-T 1212 1001.075 14.339949 228.115 +CPAR2_203070-T 1233 1022.075 52.520237 853.000 +CPAR2_203080-T 1380 1169.075 150.621289 2798.133 +CPAR2_203090-T 411 200.234 37.399806 119.000 +CPAR2_203100-T 1734 1523.075 9.312418 225.384 +CPAR2_203110-T 1134 923.075 36.614590 537.070 +CPAR2_203120-T 462 251.185 25.053428 100.000 +CPAR2_203130-T 858 647.105 137.413024 1412.999 +CPAR2_203140-T 3126 2915.075 48.205655 2232.992 +CPAR2_203150-T 1644 1433.075 7.026054 160.000 +CPAR2_203160-T 6627 6416.075 65.614029 6689.684 +CPAR2_203170-T 1275 1064.075 34.029940 575.404 +CPAR2_203180-T 684 473.142 65.172580 490.000 +CPAR2_203190-T 1083 872.075 37.524066 520.000 +CPAR2_203200-T 1617 1406.075 22.646572 506.000 +CPAR2_203210-T 312 101.339 735.257810 1184.015 +CPAR2_203220-T 411 200.234 124.872082 397.322 +CPAR2_203230-T 462 251.185 15.282591 61.000 +CPAR2_203240-T 876 665.100 39.928806 422.000 +CPAR2_203250-T 2142 1931.075 57.387947 1761.000 +CPAR2_203260-T 216 12.347 586.123909 115.000 +CPAR2_203270-T 1878 1667.075 471.179704 12481.916 +CPAR2_203280-T 1734 1523.075 12.048981 291.616 +CPAR2_203290-T 2358 2147.075 85.253405 2908.697 +CPAR2_203300-T 1896 1685.075 43.955952 1177.000 +CPAR2_203310-T 1014 803.075 14.105119 180.000 +CPAR2_203320-T 432 221.216 163.288976 574.000 +CPAR2_203330-T 1518 1307.075 8.714420 181.000 +CPAR2_203340-T 1632 1421.075 83.386121 1883.000 +CPAR2_203350-T 1113 902.075 613.565174 8795.144 +CPAR2_tH(GUG)1-T 72 72.000 0.000000 0.000 +CPAR2_203360-T 1560 1349.075 48.932774 1049.000 +CPAR2_203370-T 3135 2924.075 28.193130 1310.000 +CPAR2_203380-T 2583 2372.075 29.504050 1112.115 +CPAR2_203390-T 891 680.099 115.849055 1252.000 +CPAR2_203400-T 708 497.138 70.887796 560.000 +CPAR2_203410-T 276 65.367 101.086251 105.000 +CPAR2_203420-T 1155 944.075 22.530488 338.000 +CPAR2_203430-T 1458 1247.075 74.230184 1471.000 +CPAR2_203440-T 1140 929.075 69.127555 1020.567 +CPAR2_203450-T 1152 941.075 1523.497336 22782.718 +CPAR2_203460-T 1809 1598.075 19.807574 503.000 +CPAR2_203470-T 1599 1388.075 86.867352 1916.060 +CPAR2_203480-T 1362 1151.075 425.022941 7774.197 +CPAR2_203490-T 2130 1919.075 57.257287 1746.072 +CPAR2_203500-T 1551 1340.075 3.615947 77.000 +CPAR2_203510-T 1539 1328.075 8.908318 188.000 +CPAR2_203520-T 1509 1298.075 139.528395 2878.074 +CPAR2_203530-T 1569 1358.075 2.224221 48.000 +CPAR2_203540-T 3672 3461.075 517.812349 28478.880 +CPAR2_203550-T 1437 1226.075 332.294168 6474.099 +CPAR2_203560-T 1428 1217.075 2.091317 40.446 +CPAR2_203570-T 3630 3419.075 66.132951 3593.073 +CPAR2_203580-T 477 266.180 2187.891366 9254.243 +CPAR2_203590-T 1680 1469.075 61.565826 1437.220 +CPAR2_203600-T 423 212.227 34.693386 117.000 +CPAR2_203610-T 693 482.142 842.975289 6458.461 +CPAR2_203620-T 1161 950.075 0.331186 5.000 +CPAR2_203630-T 789 578.119 87.409563 803.000 +CPAR2_203640-T 1506 1295.075 88.291815 1817.000 +CPAR2_203650-T 654 443.147 176.075314 1239.896 +CPAR2_203660-T 4884 4673.075 42.036000 3121.502 +CPAR2_203670-T 1011 800.075 51.283454 652.000 +CPAR2_203680-T 2781 2570.075 49.218317 2010.074 +CPAR2_203690-T 612 401.167 173.667742 1107.092 +CPAR2_203700-T 390 179.238 1.053298 3.000 +CPAR2_203710-T 378 167.240 78.644308 209.000 +CPAR2_203720-T 3645 3434.075 4.471369 244.000 +CPAR2_203730-T 1359 1148.075 95.047206 1734.000 +CPAR2_203740-T 918 707.098 87.574189 984.000 +CPAR2_203750-T 2307 2096.075 50.680144 1688.046 +CPAR2_203760-T 306 95.342 626.330575 948.913 +CPAR2_203770-T 1026 815.075 1.852994 24.000 +CPAR2_203780-T 1569 1358.075 20.388692 440.000 +CPAR2_203790-T 3153 2942.075 17.967307 839.994 +CPAR2_203800-T 210 9.898 241.599660 38.000 +CPAR2_203810-T 2523 2312.075 26.401668 970.002 +CPAR2_203820-T 1776 1565.075 30.478565 758.000 +CPAR2_203830-T 1518 1307.075 125.709125 2611.000 +CPAR2_203840-T 291 80.345 55.656468 71.059 +CPAR2_203850-T 1458 1247.075 0.353237 7.000 +CPAR2_203860-T 1425 1214.075 16.016713 309.000 +CPAR2_203870-T 1443 1232.075 0.715075 14.000 +CPAR2_tR(ACG)1-T 72 72.000 0.000000 0.000 +CPAR2_tR(ACG)2-T 72 72.000 0.000000 0.000 +CPAR2_203880-T 771 560.120 125.609069 1118.000 +CPAR2_203890-T 1476 1265.075 14.973063 301.000 +CPAR2_203900-T 1149 938.075 209.296067 3119.882 +CPAR2_203910-T 1332 1121.075 491.611463 8757.825 +CPAR2_203920-T 1041 830.075 53.144835 701.000 +CPAR2_203930-T 1089 878.075 39.346048 549.000 +CPAR2_203940-T 786 575.119 9.629096 88.000 +CPAR2_203950-T 855 644.107 47.002214 481.078 +CPAR2_203960-T 444 233.197 46.955519 174.000 +CPAR2_203970-T 1110 899.075 90.286150 1289.902 +CPAR2_203980-T 1506 1295.075 60.204391 1238.975 +CPAR2_203990-T 1926 1715.075 54.718121 1491.262 +CPAR2_204000-T 2934 2723.075 37.443252 1620.215 +CPAR2_204010-T 4083 3872.075 43.593527 2682.287 +CPAR2_204020-T 333 122.324 652.330292 1268.000 +CPAR2_204030-T 447 236.194 17.851194 67.000 +CPAR2_204040-T 576 365.168 99.608273 578.000 +CPAR2_204050-T 1590 1379.075 34.041712 746.000 +CPAR2_204060-T 267 56.381 92.631757 82.991 +CPAR2_204070-T 3990 3779.075 88.976380 5343.179 +CPAR2_204080-T 744 533.131 318.352032 2697.000 +CPAR2_204090-T 156 32.269 365.142514 187.237 +CPAR2_204100-T 324 113.334 144.368496 260.000 +CPAR2_204110-T 360 149.253 891.410162 2114.165 +CPAR2_204120-T 1962 1751.075 7.908381 220.055 +CPAR2_204130-T 747 536.129 0.586897 5.000 +CPAR2_tS(GCU)1-T 82 2.421 0.000000 0.000 +CPAR2_204130.1-T 165 32.771 44.167619 23.000 +CPAR2_204140-T 1344 1133.075 10.108184 182.000 +CPAR2_204150-T 831 620.112 212.098097 2090.000 +CPAR2_204160-T 813 602.117 714.753206 6838.744 +CPAR2_204170-T 1818 1607.075 56.897074 1453.000 +CPAR2_204180-T 774 563.119 481.484867 4308.464 +CPAR2_204190-T 621 410.166 111.080854 724.000 +CPAR2_204200-T 981 770.084 56.631217 693.000 +CPAR2_204210-T 1563 1352.075 17.073235 366.823 +CPAR2_204220-T 1581 1370.075 67.436437 1468.177 +CPAR2_204230-T 1152 941.075 23.739114 355.000 +CPAR2_204240-T 753 542.127 37.726214 325.000 +CPAR2_204250-T 489 278.177 83.929188 371.000 +CPAR2_204260-T 1422 1211.075 20.629082 397.000 +CPAR2_204270-T 1140 929.075 170.559585 2518.063 +CPAR2_204280-T 1290 1079.075 2.332753 40.000 +CPAR2_204290-T 2190 1979.075 6.454971 203.000 +CPAR2_204300-T 2430 2219.075 91.459195 3225.068 +CPAR2_204310-T 738 527.132 114.368608 958.000 +CPAR2_204320-T 5754 5543.075 24.197404 2131.371 +CPAR2_204330-T 2691 2480.075 120.226184 4738.091 +CPAR2_204340-T 807 596.118 0.527835 5.000 +CPAR2_204350-T 1839 1628.075 389.639386 10080.377 +CPAR2_204360-T 1383 1172.075 127.715777 2378.699 +CPAR2_204370-T 2784 2573.075 2.714757 111.000 +CPAR2_204380-T 2778 2567.075 95.711328 3904.284 +CPAR2_204390-T 2001 1790.075 1.828069 52.000 +CPAR2_204400-T 498 287.177 38.129477 174.000 +CPAR2_204410-T 609 398.167 0.632200 4.000 +CPAR2_204420-T 2115 1904.075 175.295047 5303.874 +CPAR2_204430-T 2115 1904.075 44.527225 1347.253 +CPAR2_204440-T 1287 1076.075 224.724921 3842.672 +CPAR2_204450-T 897 686.099 99.816287 1088.248 +CPAR2_204460-T 510 299.173 301.428140 1433.000 +CPAR2_204470-T 660 449.144 9.247387 66.000 +CPAR2_204480-T 855 644.107 56.276259 576.000 +CPAR2_204490-T 864 653.103 72.190713 749.208 +CPAR2_204500-T 2775 2564.075 42.631399 1737.000 +CPAR2_204510-T 561 350.169 0.539143 3.000 +CPAR2_204520-T 2499 2288.075 45.529568 1655.401 +CPAR2_204530-T 1356 1145.075 33.084379 602.000 +CPAR2_204540-T 3450 3239.075 60.122932 3094.572 +CPAR2_204550-T 1227 1016.075 92.716991 1497.010 +CPAR2_204560-T 1320 1109.075 73.893137 1302.281 +CPAR2_204570-T 2097 1886.075 64.603413 1936.217 +CPAR2_tC(GCA)1-T 74 74.000 0.000000 0.000 +CPAR2_204580-T 774 563.119 422.651154 3782.003 +CPAR2_204590-T 2430 2219.075 29.494542 1040.047 +CPAR2_204600-T 1680 1469.075 58.650121 1369.154 +CPAR2_204610-T 837 626.110 183.722731 1827.901 +CPAR2_204620-T 645 434.156 24.641282 170.000 +CPAR2_204630-T 1128 917.075 663.915609 9675.142 +CPAR2_204640-T 1614 1403.075 40.007777 892.000 +CPAR2_204650-T 1332 1121.075 52.949291 943.266 +CPAR2_204660-T 633 422.163 118.414941 794.376 +CPAR2_204670-T 1659 1448.075 29.203753 672.000 +CPAR2_204680-T 2244 2033.075 109.138451 3525.906 +CPAR2_204690-T 699 488.140 91.145550 707.000 +CPAR2_204700-T 972 761.086 18.273393 221.000 +CPAR2_204710-T 2841 2630.075 21.271333 889.001 +CPAR2_204720-T 564 353.169 287.060743 1611.000 +CPAR2_204730-T 837 626.110 105.636223 1051.000 +CPAR2_204740-T 1248 1037.075 117.237895 1932.047 +CPAR2_204750-T 768 557.122 45.408398 402.000 +CPAR2_204760-T 2496 2285.075 8.730101 317.000 +CPAR2_204770-T 1887 1676.075 17.271293 460.000 +CPAR2_204780-T 1548 1337.075 103.349835 2195.862 +CPAR2_204790-T 1401 1190.075 45.053205 852.000 +CPAR2_204800-T 777 566.119 97.154778 874.000 +CPAR2_204810-T 789 578.119 40.929011 376.000 +CPAR2_204820-T 3237 3026.075 25.119236 1207.885 +CPAR2_tS(AGA)1-T 82 2.421 0.000000 0.000 +CPAR2_204830-T 591 380.168 2325.582188 14049.045 +CPAR2_204840-T 1485 1274.075 0.543323 11.000 +CPAR2_204850-T 2805 2594.075 26.211393 1080.469 +CPAR2_204860-T 477 266.180 220.343754 932.000 +CPAR2_204870-T 390 179.238 305.991711 871.525 +CPAR2_204880-T 1650 1439.075 89.819670 2053.972 +CPAR2_204890-T 882 671.099 56.543556 602.989 +CPAR2_204900-T 1083 872.075 33.771685 468.000 +CPAR2_204910-T 369 158.243 10.737405 27.000 +CPAR2_204920-T 822 611.114 40.057844 389.000 +CPAR2_204930-T 1149 938.075 37.969884 566.000 +CPAR2_204940-T 1896 1685.075 19.382466 519.001 +CPAR2_204950-T 2019 1808.075 16.602076 477.000 +CPAR2_204960-T 1452 1241.075 27.587999 544.074 +CPAR2_204970-T 2268 2057.075 167.644933 5479.994 +CPAR2_204980-T 864 653.103 142.960138 1483.665 +CPAR2_204990-T 2763 2552.075 56.924797 2308.524 +CPAR2_205000-T 1860 1649.075 6.868985 180.000 +CPAR2_205010-T 975 764.085 100.309282 1217.929 +CPAR2_205020-T 1056 845.075 124.583876 1673.003 +CPAR2_205030-T 1068 857.075 67.550627 920.000 +CPAR2_205040-T 837 626.110 65.029686 646.996 +CPAR2_205050-T 1383 1172.075 131.221871 2444.000 +CPAR2_205060-T 1050 839.075 72.599721 968.000 +CPAR2_205070-T 2049 1838.075 204.921097 5985.348 +CPAR2_205080-T 2295 2084.075 12.531274 415.000 +CPAR2_205090-T 1122 911.075 0.345363 5.000 +CPAR2_205100-T 1347 1136.075 17.448736 315.000 +CPAR2_205110-T 2580 2369.075 319.764003 12037.821 +CPAR2_205120-T 1605 1394.075 13.813294 306.001 +CPAR2_205130-T 3978 3767.075 27.797745 1664.000 +CPAR2_205140-T 1335 1124.075 28.104046 502.000 +CPAR2_205150-T 282 71.359 108.471973 123.000 +CPAR2_205160-T 3111 2900.075 19.247525 887.000 +CPAR2_205170-T 1131 920.075 2.393896 35.000 +CPAR2_205180-T 2175 1964.075 43.353912 1353.088 +CPAR2_205190-T 609 398.167 87.401709 553.000 +CPAR2_205200-T 1152 941.075 69.960665 1046.207 +CPAR2_205210-T 3279 3068.075 59.872670 2919.000 +CPAR2_205220-T 1335 1124.075 20.042328 358.000 +CPAR2_205230-T 522 311.173 239.794638 1185.715 +CPAR2_205240-T 837 626.110 74.578571 742.000 +CPAR2_205250-T 2847 2636.075 56.675396 2374.061 +CPAR2_205260-T 2373 2162.075 77.972290 2678.863 +CPAR2_205270-T 1653 1442.075 19.637451 450.000 +CPAR2_205280-T 621 410.166 125.809807 820.000 +CPAR2_205290-T 375 164.240 808.084769 2109.000 +CPAR2_205300-T 2349 2138.075 41.250626 1401.500 +CPAR2_205310-T 396 185.237 516.265573 1519.642 +CPAR2_205320-T 2400 2189.075 14.482899 503.797 +CPAR2_205330-T 1563 1352.075 199.403289 4284.229 +CPAR2_205340-T 1491 1280.075 74.381332 1513.000 +CPAR2_205350-T 1029 818.075 49.616596 645.000 +CPAR2_205360-T 1098 887.075 49.127836 692.512 +CPAR2_205370-T 1827 1616.075 72.594078 1864.242 +CPAR2_205380-T 1464 1253.075 15.369645 306.042 +CPAR2_205390-T 978 767.084 54.267844 661.493 +CPAR2_205400-T 6660 6449.075 3.278813 336.011 +CPAR2_205410-T 1626 1415.075 11.206798 252.000 +CPAR2_205420-T 1323 1112.075 41.994945 742.114 +CPAR2_205430-T 474 263.181 13.629532 57.000 +CPAR2_205440-T 4392 4181.075 10.445567 694.000 +CPAR2_205450-T 3078 2867.075 1.448656 66.000 +CPAR2_205460-T 216 12.347 234.449563 46.000 +CPAR2_205470-T 1989 1778.075 15.572670 440.000 +CPAR2_205480-T 1068 857.075 142.912656 1946.387 +CPAR2_205490-T 789 578.119 7.402055 68.000 +CPAR2_205500-T 828 617.113 110.661299 1085.176 +CPAR2_205510-T 2379 2168.075 49.861978 1717.842 +CPAR2_205520-T 729 518.134 18.461306 152.000 +CPAR2_205530-T 1791 1580.075 206.107524 5175.009 +CPAR2_205540-T 2316 2105.075 48.040640 1607.000 +CPAR2_205550-T 7266 7055.075 25.591129 2869.000 +CPAR2_205560-T 810 599.118 44.640957 424.996 +CPAR2_205570-T 810 599.118 37.796604 359.836 +CPAR2_205580-T 1800 1589.075 14.929918 377.000 +CPAR2_205590-T 1062 851.075 17.688483 239.220 +CPAR2_205600-T 414 203.233 95.061350 307.000 +CPAR2_205610-T 4557 4346.075 30.323793 2094.210 +CPAR2_205620-T 360 149.253 728.167025 1727.000 +CPAR2_205630-T 879 668.100 28.352143 301.000 +CPAR2_205640-T 2886 2675.075 80.905649 3439.175 +CPAR2_205650-T 1251 1040.075 24.456432 404.201 +CPAR2_205660-T 1320 1109.075 68.124412 1200.614 +CPAR2_205670-T 1842 1631.075 490.779614 12720.377 +CPAR2_205680-T 840 629.109 30.209366 302.000 +CPAR2_205690-T 1086 875.075 239.743588 3333.741 +CPAR2_tK(UUU)1-T 74 74.000 0.000000 0.000 +CPAR2_205700-T 2373 2162.075 671.133051 23057.855 +CPAR2_205710-T 291 80.345 180.930181 231.000 +CPAR2_205720-T 2373 2162.075 38.393167 1319.059 +CPAR2_205730-T 1368 1157.075 47.371493 871.000 +CPAR2_205740-T 477 266.180 289.698631 1225.354 +CPAR2_205750-T 3756 3545.075 25.513811 1437.276 +CPAR2_205760-T 804 593.118 34.270595 323.000 +CPAR2_205770-T 2277 2066.075 33.047920 1085.000 +CPAR2_205780-T 1071 860.075 330.209370 4513.000 +CPAR2_205790-T 1794 1583.075 86.964595 2187.679 +CPAR2_205800-T 855 644.107 58.425699 598.000 +CPAR2_205810-T 1839 1628.075 38.733199 1002.068 +CPAR2_205820-T 858 647.105 526.111146 5409.930 +CPAR2_205830-T 1398 1187.075 149.708674 2824.000 +CPAR2_205840-T 528 317.172 46.626153 234.998 +CPAR2_205850-T 1989 1778.075 24.031476 679.000 +CPAR2_205860-T 486 275.178 67.293296 294.256 +CPAR2_205870-T 1545 1334.075 86.486897 1833.454 +CPAR2_205875-T 309 98.341 0.000000 0.000 +CPAR2_205880-T 171 31.759 101.055917 51.000 +CPAR2_205890-T 2313 2102.075 97.086566 3242.999 +CPAR2_205900-T 1086 875.075 1.510200 21.000 +CPAR2_205910-T 1431 1220.075 18.104270 351.000 +CPAR2_205920-T 2601 2390.075 55.661377 2114.000 +CPAR2_205930-T 1593 1382.075 52.096204 1144.135 +CPAR2_205940-T 1479 1268.075 278.604553 5614.004 +CPAR2_205950-T 2946 2735.075 18.107813 787.000 +CPAR2_tG(GCC)1-T 71 71.000 0.000000 0.000 +CPAR2_205960-T 708 497.138 211.522440 1670.987 +CPAR2_205970-T 2139 1928.075 37.502186 1149.000 +CPAR2_205980-T 2403 2192.075 32.416828 1129.186 +CPAR2_205990-T 2175 1964.075 424.396517 13245.532 +CPAR2_206000-T 1164 953.075 72.531620 1098.485 +CPAR2_206010-T 2859 2648.075 27.495624 1157.000 +CPAR2_206020-T 1458 1247.075 103.750685 2056.000 +CPAR2_206030-T 894 683.099 32.820787 356.264 +CPAR2_206040-T 993 782.079 68.073831 846.000 +CPAR2_206050-T 1293 1082.075 36.471868 627.126 +CPAR2_206060-T 1254 1043.075 66.063107 1095.000 +CPAR2_206070-T 732 521.133 9.056761 75.000 +CPAR2_206080-T 4425 4214.075 26.150421 1751.138 +CPAR2_206090-T 1644 1433.075 32.495502 740.000 +CPAR2_tS(AGA)2-T 82 2.421 0.000000 0.000 +CPAR2_206100-T 708 497.138 0.126585 1.000 +CPAR2_206110-T 573 362.169 62.901113 362.000 +CPAR2_206120-T 822 611.114 32.746636 318.001 +CPAR2_206130-T 3939 3728.075 88.809905 5261.209 +CPAR2_206140-T 399 188.237 36.106053 108.000 +CPAR2_206150-T 1539 1328.075 32.316343 682.000 +CPAR2_206160-T 867 656.101 17.360735 181.000 +CPAR2_206170-T 678 467.143 141.718493 1052.000 +CPAR2_206180-T 2202 1991.075 65.683176 2078.171 +CPAR2_206190-T 1107 896.075 44.244224 630.000 +CPAR2_206200-T 765 554.123 43.496356 383.000 +CPAR2_206210-T 981 770.084 19.857699 243.000 +CPAR2_206220-T 471 260.181 697.798450 2885.000 +CPAR2_206230-T 849 638.108 62.130819 630.000 +CPAR2_206240-T 1119 908.075 72.838571 1051.048 +CPAR2_206250-T 3294 3083.075 127.569580 6249.866 +CPAR2_206270-T 2115 1904.075 179.109833 5419.298 +CPAR2_206280-T 1857 1646.075 38.536421 1008.000 +CPAR2_206290-T 1806 1595.075 18.584157 471.046 +CPAR2_206300-T 2148 1937.075 47.951301 1476.000 +CPAR2_206310-T 732 521.133 72.333332 599.000 +CPAR2_tV(AAC)2-T 74 74.000 0.000000 0.000 +CPAR2_206320-T 3909 3698.075 34.170277 2008.000 +CPAR2_206330-T 1824 1613.075 61.886205 1586.310 +CPAR2_206340-T 963 752.090 114.633443 1370.000 +CPAR2_206350-T 738 527.132 82.493433 691.000 +CPAR2_206360-T 1749 1538.075 42.387978 1036.000 +CPAR2_206370-T 1080 869.075 114.118975 1575.995 +CPAR2_206380-T 5187 4976.075 57.061467 4512.002 +CPAR2_206390-T 1596 1385.075 186.517853 4105.190 +CPAR2_206400-T 2877 2666.075 33.990472 1440.022 +CPAR2_206410-T 591 380.168 51.221701 309.435 +CPAR2_206420-T 759 548.124 55.568347 484.000 +CPAR2_206430-T 948 737.096 125.147390 1465.835 +CPAR2_206440-T 2022 1811.075 19.981646 575.052 +CPAR2_206450-T 2139 1928.075 62.899787 1927.137 +CPAR2_206460-T 1011 800.075 140.745332 1789.387 +CPAR2_206470-T 966 755.088 23.085699 277.000 +CPAR2_206480-T 1581 1370.075 79.552963 1731.970 +CPAR2_206490-T 1323 1112.075 120.363230 2127.000 +CPAR2_206500-T 234 23.994 76.058367 29.000 +CPAR2_tQ(UUG)1-T 74 74.000 0.000000 0.000 +CPAR2_206510-T 1005 794.075 127.909375 1614.000 +CPAR2_206520-T 3105 2894.075 21.614143 994.002 +CPAR2_206530-T 360 149.253 6.324556 15.000 +CPAR2_206540-T 1548 1337.075 10.778049 229.000 +CPAR2_206550-T 966 755.088 30.253101 363.000 +CPAR2_206560-T 195 9.048 824.182067 118.495 +CPAR2_206570-T 195 9.048 20.866237 3.000 +CPAR2_206580-T 672 461.143 197.466527 1447.000 +CPAR2_206590-T 2046 1835.075 69.513969 2027.055 +CPAR2_206600-T 1374 1163.075 41.986960 776.000 +CPAR2_206610-T 3327 3116.075 21.912016 1085.000 +CPAR2_206620-T 1113 902.075 156.545503 2244.000 +CPAR2_206630-T 1116 905.075 30.106739 433.000 +CPAR2_206640-T 1359 1148.075 150.979804 2754.411 +CPAR2_206650-T 930 719.098 36.930485 422.000 +CPAR2_206660-T 687 476.142 198.508877 1501.951 +CPAR2_206670-T 1686 1475.075 14.462589 339.000 +CPAR2_206680-T 390 179.238 186.433674 531.000 +CPAR2_206690-T 3054 2843.075 64.145047 2897.950 +CPAR2_206700-T 1104 893.075 44.392848 630.000 +CPAR2_206710-T 3276 3065.075 60.859953 2964.232 +CPAR2_206720-T 1233 1022.075 49.811104 809.000 +CPAR2_206730-T 948 737.096 164.235446 1923.669 +CPAR2_206740-T 1203 992.075 46.686758 736.000 +CPAR2_206750-T 2166 1955.075 41.265307 1282.000 +CPAR2_206760-T 933 722.098 151.117093 1734.000 +CPAR2_206770-T 1323 1112.075 80.558543 1423.591 +CPAR2_206780-T 438 227.205 376.993119 1361.103 +CPAR2_206790-T 3969 3758.075 20.094459 1200.000 +CPAR2_206800-T 1074 863.075 70.435113 966.001 +CPAR2_206810-T 6387 6176.075 73.592542 7222.472 +CPAR2_206820-T 2187 1976.075 156.169905 4903.885 +CPAR2_206830-T 1692 1481.075 59.570523 1402.000 +CPAR2_206840-T 597 386.168 183.910748 1128.555 +CPAR2_206850-T 147 29.692 199.226822 94.000 +CPAR2_206860-T 2577 2366.075 18.112529 681.000 +CPAR2_206870-T 2385 2174.075 487.195924 16831.301 +CPAR2_206880-T 3234 3023.075 37.537877 1803.259 +CPAR2_206890-T 3297 3086.075 9.686071 475.000 +CPAR2_206900-T 1461 1250.075 1309.356088 26009.584 +CPAR2_206910-T 201 7.902 16191.045105 2032.994 +CPAR2_206920-T 474 263.181 55.235471 231.000 +CPAR2_206930-T 1191 980.075 31.853062 496.078 +CPAR2_206940-T 432 221.216 235.261295 827.000 +CPAR2_206950-T 2568 2357.075 68.398717 2561.892 +CPAR2_206960-T 1422 1211.075 18.561416 357.208 +CPAR2_206970-T 1527 1316.075 66.082710 1382.000 +CPAR2_206980-T 435 224.209 17.682873 63.001 +CPAR2_206990-T 1524 1313.075 4.457115 93.000 +CPAR2_207000-T 1320 1109.075 35.821438 631.311 +CPAR2_207010-T 645 434.156 81.805877 564.378 +CPAR2_207020-T 750 539.128 127.348490 1091.000 +CPAR2_207030-T 1203 992.075 101.580058 1601.373 +CPAR2_207040-T 1089 878.075 53.227446 742.689 +CPAR2_207050-T 2175 1964.075 151.790566 4737.425 +CPAR2_207060-T 1377 1166.075 2000.758972 37073.265 +CPAR2_207070-T 1965 1754.075 59.770585 1666.001 +CPAR2_207080-T 3075 2864.075 174.855803 7958.000 +CPAR2_207090-T 1650 1439.075 90.972191 2080.327 +CPAR2_207100-T 1650 1439.075 36.208235 828.000 +CPAR2_207110-T 1641 1430.075 8.800992 200.000 +CPAR2_207120-T 381 170.239 82.803631 224.000 +CPAR2_207130-T 1644 1433.075 41.980675 956.000 +CPAR2_207140-T 2820 2609.075 37.409830 1551.000 +CPAR2_207150-T 1029 818.075 69.540160 904.000 +CPAR2_207160-T 630 419.164 49.429861 329.240 +CPAR2_207170-T 2256 2045.075 101.731182 3306.000 +CPAR2_207180-T 552 341.169 162.190543 879.296 +CPAR2_207190-T 447 236.194 110.304390 414.000 +CPAR2_207200-T 873 662.100 41.440366 436.000 +CPAR2_207210-T 1320 1109.075 345.009573 6080.393 +CPAR2_207220-T 1386 1175.075 43.807467 818.000 +CPAR2_207230-T 558 347.169 60.905792 336.000 +CPAR2_207240-T 444 233.197 265.001838 982.000 +CPAR2_207250-T 1578 1367.075 7.273194 158.000 +CPAR2_207260-T 1578 1367.075 2.726723 59.234 +CPAR2_207270-T 1578 1367.075 21.309873 462.927 +CPAR2_207280-T 2544 2333.075 56.757400 2104.218 +CPAR2_207290-T 576 365.168 168.196669 976.000 +CPAR2_207300-T 1848 1637.075 105.689419 2749.411 +CPAR2_207310-T 2289 2078.075 45.999916 1519.000 +CPAR2_207320-T 426 215.224 105.554727 361.000 +CPAR2_207330-T 798 587.119 100.004250 933.005 +CPAR2_207340-T 1074 863.075 29.748975 408.000 +CPAR2_207350-T 2133 1922.075 50.420932 1540.000 +CPAR2_207360-T 1233 1022.075 50.303673 817.000 +CPAR2_207370-T 924 713.098 18.002863 204.000 +CPAR2_207380-T 960 749.090 72.984298 868.766 +CPAR2_207390-T 867 656.101 28.391037 296.000 +CPAR2_207400-T 3090 2879.075 49.754278 2276.265 +CPAR2_207410-T 1086 875.075 67.455590 938.000 +CPAR2_207420-T 4824 4613.075 31.158082 2284.024 +CPAR2_207430-T 4764 4553.075 38.165608 2761.318 +CPAR2_207440-T 1437 1226.075 50.659459 987.000 +CPAR2_207450-T 1104 893.075 0.140930 2.000 +CPAR2_207460-T 651 440.149 36.458647 255.000 +CPAR2_207470-T 645 434.156 143.644177 991.000 +CPAR2_207480-T 489 278.177 175.776060 777.000 +CPAR2_207490-T 2328 2117.075 55.704955 1874.000 +CPAR2_207500-T 2040 1829.075 29.210342 849.000 +CPAR2_207510-T 1347 1136.075 110.619448 1997.000 +CPAR2_207520-T 4203 3992.075 90.451198 5737.894 +CPAR2_207530-T 537 326.170 38.394522 199.000 +CPAR2_207540-T 1752 1541.075 5.810455 142.290 +CPAR2_207550-T 552 341.169 99.605719 540.000 +CPAR2_207560-T 2931 2720.075 39.168467 1693.000 +CPAR2_207570-T 1782 1571.075 25.555490 638.000 +CPAR2_207580-T 2424 2213.075 30.284050 1065.000 +CPAR2_207590-T 2244 2033.075 374.643447 12103.502 +CPAR2_207600-T 2634 2423.075 5.298145 204.000 +CPAR2_207610-T 2568 2357.075 45.881939 1718.520 +CPAR2_207620-T 1551 1340.075 29.776260 634.072 +CPAR2_207630-T 543 332.169 148.152026 782.000 +CPAR2_207640-T 1932 1721.075 153.433260 4196.226 +CPAR2_207650-T 1719 1508.075 54.548440 1307.208 +CPAR2_207660-T 1065 854.075 70.735203 960.000 +CPAR2_207660.1-T 471 260.181 15.479758 64.000 +CPAR2_207670-T 936 725.098 42.960481 495.000 +CPAR2_207680-T 2655 2444.075 11.443615 444.444 +CPAR2_207690-T 3723 3512.075 105.062765 5863.435 +CPAR2_207700-T 1095 884.075 276.790127 3888.475 +CPAR2_207710-T 465 254.184 725.156425 2929.000 +CPAR2_207720-T 360 149.253 1592.101528 3776.000 +CPAR2_207730-T 1605 1394.075 88.296433 1956.000 +CPAR2_207740-T 393 182.238 1089.105836 3153.901 +CPAR2_207750-T 2601 2390.075 135.552925 5148.254 +CPAR2_207760-T 2673 2462.075 0.690117 27.000 +CPAR2_207770-T 2388 2177.075 143.460981 4963.028 +CPAR2_207780-T 1458 1247.075 1912.793291 37905.321 +CPAR2_207790-T 171 31.759 91.148475 46.000 +CPAR2_207800-T 780 569.119 190.963231 1727.000 +CPAR2_207810-T 666 455.143 1589.999208 11499.645 +CPAR2_207820-T 1302 1091.075 165.097135 2862.422 +CPAR2_207830-T 1170 959.075 507.339146 7731.977 +CPAR2_207840-T 1368 1157.075 27.248126 501.000 +CPAR2_207850-T 2250 2039.075 74.983004 2429.604 +CPAR2_207860-T 666 455.143 532.852977 3853.851 +CPAR2_207870-T 237 26.695 2994.569281 1270.310 +CPAR2_207880-T 450 239.191 114.446990 435.000 +CPAR2_207890-T 1917 1706.075 5.569796 151.000 +CPAR2_207900-T 1701 1490.075 14.612631 346.000 +CPAR2_207910-T 273 62.371 435.886589 432.015 +CPAR2_207920-T 2232 2021.075 13.176380 423.173 +CPAR2_207930-T 870 659.100 126.702767 1327.019 +CPAR2_207940-T 4026 3815.075 24.346947 1476.002 +CPAR2_207950-T 384 173.239 9.444713 26.000 +CPAR2_207960-T 1092 881.075 128.917144 1804.942 +CPAR2_207970-T 2400 2189.075 26.064992 906.688 +CPAR2_207980-T 3735 3524.075 22.553748 1263.000 +CPAR2_207990-T 1158 947.075 42.858379 645.000 +CPAR2_208000-T 1278 1067.075 50.895282 863.002 +CPAR2_208010-T 3102 2891.075 35.770654 1643.334 +CPAR2_208020-T 204 8.232 10090.144054 1319.866 +CPAR2_208030-T 1800 1589.075 31.998338 808.000 +CPAR2_208040-T 909 698.099 50.661703 562.000 +CPAR2_208050-T 1506 1295.075 57.241474 1178.000 +CPAR2_208060-T 2523 2312.075 52.259161 1920.012 +CPAR2_208070-T 756 545.125 163.466052 1416.000 +CPAR2_208080-T 2331 2120.075 0.445247 15.000 +CPAR2_208090-T 804 593.118 48.806420 460.000 +CPAR2_208100-T 960 749.090 65.231292 776.479 +CPAR2_208110-T 1500 1289.075 21.284759 436.000 +CPAR2_208120-T 798 587.119 72.457159 676.000 +CPAR2_208130-T 1419 1208.075 49.542064 951.059 +CPAR2_208140-T 1917 1706.075 292.781582 7937.457 +CPAR2_208150-T 999 788.075 133.674408 1674.000 +CPAR2_208160-T 1683 1472.075 391.458561 9157.044 +CPAR2_208200-T 252 41.408 28.875574 19.000 +CPAR2_208210-T 1560 1349.075 75.801485 1625.000 +CPAR2_208220-T 663 452.143 22.130010 159.000 +CPAR2_208230-T 2946 2735.075 55.197767 2399.000 +CPAR2_208240-T 1767 1556.075 10.717064 265.000 +CPAR2_208250-T 1284 1073.075 18.179923 310.000 +CPAR2_208260-T 1590 1379.075 55.100407 1207.486 +CPAR2_208270-T 1008 797.075 59.134782 749.000 +CPAR2_208280-T 2982 2771.075 37.449010 1649.028 +CPAR2_208290-T 1140 929.075 112.822514 1665.659 +CPAR2_208300-T 2754 2543.075 24.646807 996.000 +CPAR2_208310-T 909 698.099 29.297248 325.000 +CPAR2_208320-T 2058 1847.075 32.945979 967.000 +CPAR2_208330-T 2649 2438.075 23.514287 911.000 +CPAR2_208340-T 1218 1007.075 52.240232 836.000 +CPAR2_208350-T 759 548.124 18.369701 160.000 +CPAR2_208360-T 900 689.099 73.987735 810.179 +CPAR2_208370-T 1407 1196.075 36.145876 687.000 +CPAR2_208380-T 1854 1643.075 84.950367 2218.003 +CPAR2_208390-T 2334 2123.075 31.893885 1076.000 +CPAR2_208400-T 2382 2171.075 77.131314 2661.001 +CPAR2_208410-T 432 221.216 60.024345 211.000 +CPAR2_208420-T 981 770.084 14.055656 172.000 +CPAR2_208430-T 579 368.168 1601.599328 9370.000 +CPAR2_208440-T 1128 917.075 65.534478 955.024 +CPAR2_208450-T 192 10.918 1026.006758 178.000 +CPAR2_208460-T 1311 1100.075 10.926259 191.000 +CPAR2_208470-T 774 563.119 22.576639 202.022 +CPAR2_208480-T 669 458.143 68.464793 498.434 +CPAR2_208490-T 3573 3362.075 89.821281 4798.728 +CPAR2_208500-T 726 515.135 452.291023 3702.357 +CPAR2_208510-T 1296 1085.075 35.087792 605.000 +CPAR2_208520-T 2934 2723.075 43.077134 1864.000 +CPAR2_208530-T 981 770.084 4.412822 54.000 +CPAR2_208540-T 1425 1214.075 98.699492 1904.145 +CPAR2_208550-T 495 284.177 288.325553 1302.000 +CPAR2_208560-T 1452 1241.075 86.859427 1712.989 +CPAR2_208570-T 1599 1388.075 51.230189 1130.000 +CPAR2_208580-T 1218 1007.075 24.182966 387.000 +CPAR2_208590-T 2748 2537.075 193.959747 7819.598 +CPAR2_208600-T 1902 1691.075 14.512698 389.987 +CPAR2_208610-T 3594 3383.075 12.517928 672.951 +CPAR2_208620-T 1149 938.075 45.550443 679.000 +CPAR2_208630-T 2049 1838.075 37.181514 1086.000 +CPAR2_208640-T 1929 1718.075 27.178298 742.000 +CPAR2_208650-T 1002 791.075 62.530465 786.048 +CPAR2_208660-T 798 587.119 31.190878 291.000 +CPAR2_208670-T 2949 2738.075 59.790855 2601.475 +CPAR2_208680-T 3183 2972.075 175.871426 8306.050 +CPAR2_208690-T 1116 905.075 91.360186 1313.957 +CPAR2_208700-T 849 638.108 16.272357 165.000 +CPAR2_208710-T 1302 1091.075 12.285290 213.000 +CPAR2_208720-T 825 614.114 49.927467 487.223 +CPAR2_208730-T 2937 2726.075 27.124426 1175.000 +CPAR2_208740-T 528 317.172 107.737279 543.000 +CPAR2_208750-T 1437 1226.075 48.503737 945.000 +CPAR2_208760-T 1650 1439.075 18.191577 416.000 +CPAR2_208770-T 1293 1082.075 1.395771 24.000 +CPAR2_208780-T 450 239.191 355.180314 1350.000 +CPAR2_208790-T 2826 2615.075 49.476556 2056.000 +CPAR2_208800-T 999 788.075 383.842917 4806.852 +CPAR2_208810-T 888 677.099 0.092941 1.000 +CPAR2_208820-T 1339 1128.075 32.634602 585.000 +CPAR2_208830-T 288 77.347 64.274954 79.000 +CPAR2_208840-T 2019 1808.075 21.648829 622.000 +CPAR2_208850-T 312 101.339 137.007360 220.628 +CPAR2_208860-T 4788 4577.075 41.826351 3042.128 +CPAR2_208870-T 1989 1778.075 403.815529 11409.658 +CPAR2_208880-T 396 185.237 308.133682 907.000 +CPAR2_208890-T 2130 1919.075 75.771202 2310.658 +CPAR2_208900-T 1527 1316.075 11.093480 232.000 +CPAR2_208910-T 204 8.232 1864.557544 243.898 +CPAR2_208920-T 2766 2555.075 10.196642 414.000 +CPAR2_208930-T 357 146.259 433.842545 1008.309 +CPAR2_208940-T 426 215.224 139.472590 477.000 +CPAR2_208950-T 2658 2447.075 42.974884 1671.096 +CPAR2_208960-T 1146 935.075 71.001318 1055.000 +CPAR2_208970-T 3840 3629.075 85.016744 4902.752 +CPAR2_208980-T 3216 3005.075 31.935596 1525.000 +CPAR2_208990-T 903 692.099 134.662701 1481.000 +CPAR2_209000-T 1734 1523.075 22.353699 541.016 +CPAR2_209010-T 1440 1229.075 116.073630 2267.000 +CPAR2_tP(AGG)1-T 73 73.000 0.000000 0.000 +CPAR2_209020-T 2406 2195.075 21.645024 755.000 +CPAR2_209030-T 1269 1058.075 58.149301 977.689 +CPAR2_209040-T 1536 1325.075 144.068222 3033.529 +CPAR2_209050-T 1362 1151.075 20.938983 383.000 +CPAR2_209060-T 849 638.108 282.291992 2862.411 +CPAR2_209070-T 621 410.166 161.558203 1053.000 +CPAR2_209080-T 1506 1295.075 69.023421 1420.466 +CPAR2_209090-T 2382 2171.075 59.219966 2043.066 +CPAR2_209100-T 6846 6635.075 64.872798 6839.871 +CPAR2_209110-T 840 629.109 32.910203 329.000 +CPAR2_209120-T 1323 1112.075 38.197076 675.000 +CPAR2_209130-T 306 95.342 25.741970 39.000 +CPAR2_209140-T 696 485.141 39.044424 301.000 +CPAR2_209150-T 1455 1244.075 97.356776 1924.652 +CPAR2_209160-T 717 506.136 67.886879 546.000 +CPAR2_209170-T 1044 833.075 61.870708 819.047 +CPAR2_209180-T 1416 1205.075 33.473751 641.000 +CPAR2_209190-T 609 398.167 43.305729 274.000 +CPAR2_209200-T 378 167.240 40.290559 107.074 +CPAR2_209210-T 219 13.796 374.046039 82.000 +CPAR2_209220-T 1122 911.075 615.134235 8905.609 +CPAR2_209230-T 432 221.216 132.281139 465.000 +CPAR2_209240-T 1515 1304.075 125.189837 2594.246 +CPAR2_209250-T 957 746.091 62.247928 738.000 +CPAR2_209260-T 1110 899.075 55.925677 799.000 +CPAR2_209270-T 603 392.168 1.444212 9.000 +CPAR2_209280-T 597 386.168 21.021995 129.000 +CPAR2_209290-T 1119 908.075 31.046789 448.000 +CPAR2_209300-T 354 143.266 232.726914 529.820 +CPAR2_209310-T 5715 5504.075 24.654638 2156.366 +CPAR2_209340-T 2340 2129.075 10.197380 345.000 +CPAR2_209350-T 774 563.119 166.512362 1490.000 +CPAR2_209360-T 186 17.248 105.809578 29.000 +CPAR2_209370-T 882 671.099 1.687898 18.000 +CPAR2_209380-T 765 554.123 270.756349 2384.100 +CPAR2_209390-T 2187 1976.075 26.906120 844.878 +CPAR2_209400-T 3375 3164.075 39.943740 2008.330 +CPAR2_209410-T 339 128.315 239.332551 487.998 +CPAR2_209420-T 588 377.168 18.019773 108.000 +CPAR2_209430-T 1392 1181.075 75.267582 1412.619 +CPAR2_209440-T 1356 1145.075 58.311078 1061.022 +CPAR2_209450-T 324 113.334 731.837225 1318.000 +CPAR2_209460-T 1464 1253.075 315.838714 6289.006 +CPAR2_209470-T 1347 1136.075 191.835127 3463.177 +CPAR2_209480-T 1437 1226.075 30.128777 587.000 +CPAR2_209490-T 1494 1283.075 41.350953 843.096 +CPAR2_209500-T 1251 1040.075 155.468793 2569.493 +CPAR2_209510-T 333 122.324 779.208530 1514.626 +CPAR2_209520-T 1404 1193.075 48.000450 910.024 +CPAR2_209530-T 2553 2342.075 29.593193 1101.367 +CPAR2_209540-T 1341 1130.075 29.975137 538.280 +CPAR2_209550-T 1635 1424.075 147.340504 3334.222 +CPAR2_209560-T 4716 4505.075 25.462456 1822.812 +CPAR2_209570-T 1440 1229.075 97.712657 1908.397 +CPAR2_209580-T 1437 1226.075 64.261595 1252.011 +CPAR2_209590-T 1017 806.075 0.156140 2.000 +CPAR2_209600-T 1278 1067.075 109.221076 1852.000 +CPAR2_209610-T 1305 1094.075 31.405518 546.000 +CPAR2_209620-T 672 461.143 31.796614 233.000 +CPAR2_209630-T 1356 1145.075 11.980722 218.000 +CPAR2_209640-T 1041 830.075 127.651485 1683.770 +CPAR2_209650-T 2412 2201.075 47.060385 1646.000 +CPAR2_209660-T 2493 2282.075 59.000286 2139.555 +CPAR2_209670-T 1374 1163.075 82.567140 1526.000 +CPAR2_209680-T 1578 1367.075 16.755967 364.000 +CPAR2_209690-T 1578 1367.075 22.095780 480.000 +CPAR2_209700-T 1572 1361.075 17.939491 388.000 +CPAR2_209710-T 732 521.133 62.497503 517.548 +CPAR2_209720-T 1122 911.075 46.693127 676.000 +CPAR2_209730-T 612 401.167 320.011524 2040.000 +CPAR2_209740-T 219 13.796 323.869131 71.000 +CPAR2_209750-T 2313 2102.075 143.718988 4800.670 +CPAR2_209760-T 2985 2774.075 20.034195 883.140 +CPAR2_209770-T 3108 2897.075 451.943875 20805.768 +CPAR2_209780-T 1878 1667.075 282.987004 7496.545 +CPAR2_209790-T 5499 5288.075 25.312230 2127.000 +CPAR2_209800-T 1428 1217.075 27.042372 523.000 +CPAR2_209810-T 1143 932.075 67.116170 994.072 +CPAR2_209820-T 1095 884.075 246.424473 3461.884 +CPAR2_209830-T 891 680.099 94.844474 1025.000 +CPAR2_209840-T 921 710.098 222.973361 2516.000 +CPAR2_209850-T 1059 848.075 206.064897 2777.013 +CPAR2_209860-T 2073 1862.075 20.074732 594.000 +CPAR2_209870-T 186 17.248 3619.416624 992.000 +CPAR2_209880-T 300 89.344 547.995425 778.000 +CPAR2_209890-T 3372 3161.075 84.598653 4249.499 +CPAR2_209900-T 1083 872.075 7.576975 105.000 +CPAR2_209910-T 1263 1052.075 103.722353 1734.038 +CPAR2_209920-T 204 8.232 1911.205771 250.000 +CPAR2_209930-T 2124 1913.075 94.829352 2882.799 +CPAR2_209940-T 2331 2120.075 38.350565 1292.000 +CPAR2_209950-T 1269 1058.075 71.217833 1197.415 +CPAR2_209960-T 1500 1289.075 31.683048 649.000 +CPAR2_209970-T 1413 1202.075 32.772019 626.000 +CPAR2_209980-T 447 236.194 39.965359 150.000 +CPAR2_209990-T 645 434.156 46.093692 318.000 +CPAR2_210000-T 993 782.079 26.795018 333.000 +CPAR2_210010-T 798 587.119 53.163833 496.000 +CPAR2_210020-T 861 650.103 47.722740 493.000 +CPAR2_210030-T 243 32.464 283.014922 146.000 +CPAR2_210040-T 1413 1202.075 33.785433 645.358 +CPAR2_210050-T 894 683.099 188.819297 2049.603 +CPAR2_210060-T 432 221.216 71.687843 252.000 +CPAR2_210070-T 867 656.101 490.103274 5109.731 +CPAR2_210080-T 1662 1451.075 101.623824 2343.284 +CPAR2_210090-T 3219 3008.075 61.066909 2919.000 +CPAR2_210100-T 1257 1046.075 19.070270 317.000 +CPAR2_210110-T 2112 1901.075 0.264820 8.000 +CPAR2_210120-T 2142 1931.075 0.684354 21.000 +CPAR2_210130-T 429 218.220 10.958463 38.000 +CPAR2_210140-T 2274 2063.075 23.883449 782.982 +CPAR2_210150-T 1668 1457.075 0.863791 20.000 +CPAR2_210160-T 993 782.079 43.853724 545.000 +CPAR2_210170-T 2403 2192.075 51.197802 1783.390 +CPAR2_210180-T 1320 1109.075 81.598737 1438.083 +CPAR2_210190-T 411 200.234 1.885704 6.000 +CPAR2_210200-T 3510 3299.075 36.302646 1903.137 +CPAR2_210210-T 1413 1202.075 54.811918 1046.999 +CPAR2_210220-T 624 413.166 3.960127 26.000 +CPAR2_210230-T 2361 2150.075 133.048919 4545.739 +CPAR2_210240-T 729 518.134 44.504141 366.422 +CPAR2_210250-T 1200 989.075 123.115342 1935.000 +CPAR2_210260-T 1980 1769.075 32.584398 916.000 +CPAR2_210270-T 2109 1898.075 30.336690 915.000 +CPAR2_210280-T 1710 1499.075 42.399279 1010.000 +CPAR2_210290-T 3831 3620.075 209.016869 12023.707 +CPAR2_210300-T 597 386.168 70.725163 434.000 +CPAR2_210310-T 552 341.169 2476.034692 13423.514 +CPAR2_210320-T 345 134.296 246.948724 527.000 +CPAR2_210330-T 828 617.113 23.148434 227.000 +CPAR2_210340-T 375 164.240 165.908347 433.000 +CPAR2_210345-T 300 89.344 141.482591 200.866 +CPAR2_210350-T 2100 1889.075 73.754562 2214.000 +CPAR2_210360-T 567 356.169 1167.004954 6604.924 +CPAR2_210370-T 2421 2210.075 80.292084 2819.806 +CPAR2_210380-T 2220 2009.075 16.444612 525.000 +CPAR2_210390-T 579 368.168 611.752828 3579.000 +CPAR2_210400-T 1533 1322.075 72.689202 1527.093 +CPAR2_210410-T 1590 1379.075 665.721600 14588.817 +CPAR2_210420-T 2682 2471.075 104.720940 4112.055 +CPAR2_210430-T 7635 7424.075 16.630022 1961.890 +CPAR2_210440-T 756 545.125 62.338767 540.000 +CPAR2_210450-T 1665 1454.075 55.136992 1274.000 +CPAR2_210460-T 1119 908.075 57.587385 830.976 +CPAR2_210470-T 1251 1040.075 32.794049 542.000 +CPAR2_210480-T 1458 1247.075 163.296311 3236.000 +CPAR2_210490-T 1878 1667.075 29.680929 786.271 +CPAR2_210500-T 654 443.147 354.299929 2494.927 +CPAR2_210510-T 474 263.181 175.510111 734.000 +CPAR2_tI(UAU)1-T 73 73.000 0.000000 0.000 +CPAR2_210520-T 1116 905.075 59.031458 849.000 +CPAR2_210530-T 915 704.098 45.403694 508.000 +CPAR2_210540-T 414 203.233 555.814736 1795.000 +CPAR2_210550-T 1317 1106.075 53.748182 944.687 +CPAR2_210560-T 555 344.169 9.142362 50.000 +CPAR2_210570-T 1419 1208.075 98.892766 1898.445 +CPAR2_210580-T 993 782.079 113.018834 1404.562 +CPAR2_210590-T 1473 1262.075 50.411129 1011.000 +CPAR2_210600-T 558 347.169 0.362534 2.000 +CPAR2_210610-T 1659 1448.075 22.163563 510.000 +CPAR2_210620-T 2139 1928.075 67.268934 2061.000 +CPAR2_210630-T 1047 836.075 167.375493 2223.703 +CPAR2_210640-T 576 365.168 92.370302 536.000 +CPAR2_210650-T 2202 1991.075 23.777290 752.297 +CPAR2_210660-T 249 38.415 19.658191 12.000 +CPAR2_210670-T 546 335.169 912.934828 4862.321 +CPAR2_210680-T 1308 1097.075 71.700263 1249.962 +CPAR2_210690-T 1611 1400.075 15.372173 342.000 +CPAR2_210700-T 666 455.143 25.025978 181.000 +CPAR2_210710-T 1317 1106.075 61.105475 1074.000 +CPAR2_210720-T 1242 1031.075 91.855815 1505.000 +CPAR2_210730-T 453 242.189 387.062991 1489.621 +CPAR2_210740-T 1161 950.075 16.426846 248.000 +CPAR2_210750-T 1626 1415.075 30.018208 675.000 +CPAR2_210760-T 846 635.108 56.479137 570.000 +CPAR2_210770-T 474 263.181 33.236928 139.000 +CPAR2_210780-T 858 647.105 87.232503 897.000 +CPAR2_210790-T 756 545.125 18.239856 158.000 +CPAR2_210800-T 720 509.136 35.844705 290.000 +CPAR2_210810-T 747 536.129 101.180983 862.000 +CPAR2_210820-T 573 362.169 164.898221 949.000 +CPAR2_210830-T 1371 1160.075 216.555693 3992.043 +CPAR2_210840-T 3885 3674.075 31.772867 1855.000 +CPAR2_210850-T 825 614.114 54.515909 532.000 +CPAR2_210860-T 1092 881.075 109.422409 1532.000 +CPAR2_210870-T 1641 1430.075 20.946361 476.000 +CPAR2_210880-T 687 476.142 132.299521 1001.000 +CPAR2_210890-T 1704 1493.075 42.305779 1003.739 +CPAR2_210900-T 591 380.168 345.633139 2088.000 +CPAR2_210910-T 1848 1637.075 44.937242 1169.000 +CPAR2_210920-T 2820 2609.075 66.377754 2752.001 +CPAR2_210930-T 3111 2900.075 29.055611 1338.994 +CPAR2_210940-T 663 452.143 35.352342 254.000 +CPAR2_210950-T 2616 2405.075 25.433032 972.000 +CPAR2_210960-T 1506 1295.075 77.698741 1599.000 +CPAR2_210970-T 1422 1211.075 50.923174 980.000 +CPAR2_210980-T 1857 1646.075 34.101674 892.000 +CPAR2_210990-T 1731 1520.075 79.967491 1931.604 +CPAR2_211000-T 378 167.240 59.829880 159.000 +CPAR2_211010-T 876 665.100 23.086798 244.000 +CPAR2_211020-T 228 19.222 2638.769442 806.000 +CPAR2_211030-T 1002 791.075 58.469590 735.000 +CPAR2_211040-T 1419 1208.075 143.079798 2746.704 +CPAR2_211050-T 2208 1997.075 41.064153 1303.157 +CPAR2_211060-T 1437 1226.075 1.591128 31.000 +CPAR2_211070-T 777 566.119 92.200179 829.429 +CPAR2_211080-T 1197 986.075 125.979733 1974.014 +CPAR2_211090-T 1056 845.075 78.339513 1052.000 +CPAR2_211100-T 1947 1736.075 23.673370 653.083 +CPAR2_211110-T 1716 1505.075 39.236849 938.408 +CPAR2_211120-T 1077 866.075 95.860097 1319.268 +CPAR2_211130-T 3081 2870.075 273.158701 12457.984 +CPAR2_211140-T 579 368.168 137.879949 806.653 +CPAR2_211150-T 1251 1040.075 107.036564 1769.035 +CPAR2_211160-T 2829 2618.075 24.589746 1023.000 +CPAR2_211170-T 411 200.234 0.314284 1.000 +CPAR2_211180-T 402 191.237 376.786345 1145.000 +CPAR2_211190-T 1917 1706.075 35.413308 960.073 +CPAR2_211200-T 579 368.168 220.248995 1288.545 +CPAR2_211210-T 483 272.179 647.397290 2800.043 +CPAR2_211220-T 2064 1853.075 20.309650 598.047 +CPAR2_211230-T 1140 929.075 36.175072 534.072 +CPAR2_211240-T 3099 2888.075 86.713982 3979.579 +CPAR2_211250-T 2997 2786.075 42.683397 1889.693 +CPAR2_211260-T 1770 1559.075 44.440688 1101.000 +CPAR2_211270-T 324 113.334 437.547597 788.000 +CPAR2_211280-T 1140 929.075 41.245407 608.928 +CPAR2_211290-T 471 260.181 51.034826 211.000 +CPAR2_211300-T 222 15.404 53.110082 13.000 +CPAR2_211310-T 1086 875.075 44.443022 618.000 +CPAR2_211320-T 2184 1973.075 46.040239 1443.513 +CPAR2_211330-T 591 380.168 53.301662 322.000 +CPAR2_211340-T 2421 2210.075 45.188758 1587.000 +CPAR2_211350-T 3075 2864.075 43.028436 1958.301 +CPAR2_211360-T 1476 1265.075 70.221935 1411.655 +CPAR2_211370-T 2445 2234.075 120.939484 4293.440 +CPAR2_211380-T 840 629.109 104.899540 1048.670 +CPAR2_211390-T 300 89.344 829.451886 1177.589 +CPAR2_211400-T 1461 1250.075 205.872804 4089.541 +CPAR2_211410-T 2955 2744.075 72.307012 3152.941 +CPAR2_211420-T 2019 1808.075 2556.342576 73447.163 +CPAR2_211430-T 1575 1364.075 79.858153 1731.000 +CPAR2_211440-T 2013 1802.075 26.959070 772.000 +CPAR2_211450-T 3216 3005.075 30.490637 1456.000 +CPAR2_211460-T 1152 941.075 104.184621 1558.000 +CPAR2_211470-T 486 275.178 49.168259 215.000 +CPAR2_211480-T 453 242.189 1591.714276 6125.751 +CPAR2_211490-T 1104 893.075 78.286435 1111.000 +CPAR2_211500-T 1053 842.075 76.451364 1023.000 +CPAR2_211510-T 924 713.098 184.617600 2092.000 +CPAR2_211520-T 882 671.099 63.202397 674.000 +CPAR2_211530-T 2274 2063.075 28.221274 925.190 +CPAR2_211540-T 2862 2651.075 79.065758 3330.811 +CPAR2_211550-T 1647 1436.075 28.585009 652.311 +CPAR2_211560-T 2448 2237.075 104.474813 3713.912 +CPAR2_211570-T 891 680.099 56.100582 606.288 +CPAR2_211580-T 1485 1274.075 4.000833 81.000 +CPAR2_211590-T 1176 965.075 83.074719 1274.000 +CPAR2_211600-T 1458 1247.075 9.234618 183.000 +CPAR2_211610-T 1110 899.075 172.816640 2469.000 +CPAR2_211620-T 705 494.139 64.259823 504.578 +CPAR2_211630-T 2529 2318.075 373.039766 13741.120 +CPAR2_211640-T 717 506.136 211.245069 1699.000 +CPAR2_211650-T 2121 1910.075 103.425620 3139.193 +CPAR2_211660-T 624 413.166 98.850854 649.000 +CPAR2_211670-T 2274 2063.075 32.333397 1060.000 +CPAR2_211680-T 2133 1922.075 60.727185 1854.783 +CPAR2_211690-T 2601 2390.075 49.763483 1890.000 +CPAR2_211700-T 228 19.222 137.504115 42.000 +CPAR2_211710-T 1368 1157.075 120.018110 2206.723 +CPAR2_211720-T 9762 9551.075 21.198262 3217.303 +CPAR2_211730-T 741 530.132 254.508127 2144.000 +CPAR2_211740-T 1269 1058.075 1514.881806 25470.343 +CPAR2_211750-T 1014 803.075 85.335973 1089.000 +CPAR2_211760-T 4323 4112.075 53.475240 3494.244 +CPAR2_211770-T 1026 815.075 69.796112 904.000 +CPAR2_211780-T 654 443.147 9.798561 69.000 +CPAR2_211790-T 861 650.103 79.570167 822.000 +CPAR2_211800-T 2736 2525.075 63.249983 2537.898 +CPAR2_211810-T 747 536.129 544.625326 4639.874 +CPAR2_211820-T 720 509.136 113.714237 920.000 +CPAR2_211830-T 1311 1100.075 282.395702 4936.509 +CPAR2_211840-T 1200 989.075 144.348813 2268.726 +CPAR2_211850-T 1749 1538.075 39.687585 970.000 +CPAR2_211860-T 1659 1448.075 126.028251 2900.003 +CPAR2_211870-T 2277 2066.075 50.957424 1672.989 +CPAR2_211880-T 1893 1682.075 29.256466 782.000 +CPAR2_211890-T 4335 4124.075 90.271263 5915.828 +CPAR2_211900-T 1638 1427.075 19.755666 448.000 +CPAR2_211910-T 1275 1064.075 35.306722 596.993 +CPAR2_211920-T 1743 1532.075 316.874531 7714.484 +CPAR2_211930-T 7980 7769.075 9.468920 1168.986 +CPAR2_211940-T 1023 812.075 43.783722 565.000 +CPAR2_211950-T 1221 1010.075 14.890342 239.000 +CPAR2_211960-T 2355 2144.075 52.424782 1786.143 +CPAR2_211970-T 1077 866.075 58.466272 804.638 +CPAR2_211980-T 2859 2648.075 49.275002 2073.464 +CPAR2_211990-T 2913 2702.075 28.900011 1240.895 +CPAR2_212000-T 1104 893.075 63.629749 903.000 +CPAR2_212010-T 4893 4682.075 53.326800 3967.559 +CPAR2_212020-T 531 320.171 159.601618 812.005 +CPAR2_212030-T 1059 848.075 58.511990 788.531 +CPAR2_212040-T 1113 902.075 1.255713 18.000 +CPAR2_212050-T 2325 2114.075 28.752429 965.905 +CPAR2_212060-T 900 689.099 30.593112 335.000 +CPAR2_212070-T 1383 1172.075 189.019950 3520.486 +CPAR2_212080-T 1425 1214.075 80.601905 1555.000 +CPAR2_212090-T 993 782.079 665.657978 8272.586 +CPAR2_212100-T 1380 1169.075 114.333255 2124.000 +CPAR2_212110-T 1281 1070.075 158.566087 2696.275 +CPAR2_212120-T 1170 959.075 14.235212 216.948 +CPAR2_212130-T 2328 2117.075 212.118485 7135.991 +CPAR2_212140-T 1305 1094.075 135.030627 2347.572 +CPAR2_212150-T 2520 2309.075 24.064850 883.000 +CPAR2_212160-T 1269 1058.075 78.751455 1324.081 +CPAR2_212170-T 1068 857.075 45.352263 617.671 +CPAR2_212180-T 3936 3725.075 43.091879 2550.762 +CPAR2_212190-T 1782 1571.075 55.517100 1386.000 +CPAR2_212200-T 1452 1241.075 38.942482 768.000 +CPAR2_212210-T 1494 1283.075 523.296643 10669.389 +CPAR2_212220-T 843 632.108 35.242963 354.000 +CPAR2_212230-T 1635 1424.075 24.717321 559.337 +CPAR2_212240-T 1950 1739.075 80.007833 2211.008 +CPAR2_212250-T 2811 2600.075 68.456880 2828.411 +CPAR2_212260-T 1170 959.075 10.170435 155.000 +CPAR2_212270-T 642 431.159 150.043294 1028.000 +CPAR2_212280-T 1068 857.075 55.435569 755.000 +CPAR2_212290-T 3021 2810.075 39.817284 1777.989 +CPAR2_212300-T 846 635.108 90.961074 918.000 +CPAR2_212310-T 876 665.100 88.278616 933.000 +CPAR2_212320-T 918 707.098 15.841672 178.000 +CPAR2_212330-T 372 161.241 51.127607 131.000 +CPAR2_212340-T 792 581.119 19.397480 179.122 +CPAR2_212350-T 1635 1424.075 0.220952 5.000 +CPAR2_212360-T 1635 1424.075 8.131027 184.000 +CPAR2_212370-T 1644 1433.075 0.483041 11.000 +CPAR2_212380-T 294 83.345 232.558330 308.000 +CPAR2_212390-T 459 248.186 68.969045 272.001 +CPAR2_212400-T 2058 1847.075 39.082176 1147.104 +CPAR2_212410-T 1113 902.075 35.578523 510.000 +CPAR2_212420-T 1095 884.075 166.402416 2337.698 +CPAR2_212430-T 3618 3407.075 50.333441 2725.071 +CPAR2_212450-T 885 674.099 162.157352 1737.001 +CPAR2_212460-T 1701 1490.075 33.490799 793.000 +CPAR2_212470-T 2361 2150.075 80.079799 2736.000 +CPAR2_212480-T 654 443.147 32.235844 227.000 +CPAR2_212490-T 270 59.377 451.494445 426.000 +CPAR2_212500-T 1059 848.075 56.246477 758.000 +CPAR2_212510-T 1344 1133.075 1.499566 27.000 +CPAR2_212520-T 1935 1724.075 20.941704 573.730 +CPAR2_212530-T 1194 983.075 30.662620 479.000 +CPAR2_212540-T 399 188.237 208.184288 622.718 +CPAR2_212550-T 780 569.119 58.384159 528.004 +CPAR2_212560-T 1446 1235.075 18.393920 361.000 +CPAR2_212570-T 1662 1451.075 52.221563 1204.146 +CPAR2_212580-T 3987 3776.075 11.165925 670.000 +CPAR2_212590-T 1425 1214.075 171.490761 3308.459 +CPAR2_212600-T 1518 1307.075 33.220719 690.000 +CPAR2_212610-T 219 13.796 866.692041 190.000 +CPAR2_212620-T 1665 1454.075 47.130443 1089.000 +CPAR2_212630-T 474 263.181 26.541720 111.000 +CPAR2_212640-T 846 635.108 71.143847 718.000 +CPAR2_212650-T 465 254.184 28.966644 117.000 +CPAR2_212660-T 669 458.143 37.773922 275.000 +CPAR2_212670-T 1773 1562.075 0.765442 19.000 +CPAR2_212680-T 3069 2858.075 22.855158 1038.000 +CPAR2_212690-T 582 371.168 161.239110 951.000 +CPAR2_212700-T 2016 1805.075 105.552081 3027.621 +CPAR2_212710-T 960 749.090 56.874752 677.007 +CPAR2_212720-T 1281 1070.075 5.410458 92.000 +CPAR2_212730-T 1284 1073.075 261.757930 4463.438 +CPAR2_212740-T 1497 1286.075 35.426864 724.000 +CPAR2_212750-T 1230 1019.075 163.653526 2650.154 +CPAR2_212760-T 2700 2489.075 31.552741 1248.000 +CPAR2_212770-T 2151 1940.075 36.751229 1133.000 +CPAR2_212780-T 564 353.169 43.834444 246.001 +CPAR2_212790-T 1071 860.075 85.647527 1170.552 +CPAR2_212800-T 1722 1511.075 15.674840 376.382 +CPAR2_212810-T 1212 1001.075 281.002756 4470.095 +CPAR2_212820-T 759 548.124 110.220091 960.016 +CPAR2_212830-T 321 110.336 13.688447 24.000 +CPAR2_212840-T 636 425.161 71.787456 485.000 +CPAR2_212850-T 1719 1508.075 15.442515 370.067 +CPAR2_212860-T 1677 1466.075 217.405492 5064.846 +CPAR2_212870-T 2238 2027.075 116.732861 3760.127 +CPAR2_212880-T 543 332.169 174.296501 920.000 +CPAR2_212890-T 1089 878.075 28.165750 393.000 +CPAR2_212900-T 585 374.168 211.869883 1259.724 +CPAR2_212910-T 678 467.143 49.170390 365.000 +CPAR2_212920-T 636 425.161 0.592061 4.000 +CPAR2_212925-T 684 473.142 0.133005 1.000 +CPAR2_212930-T 1008 797.075 5.763470 73.000 +CPAR2_212940-T 1071 860.075 149.922224 2049.000 +CPAR2_212950-T 453 242.189 103.416258 398.000 +CPAR2_212960-T 630 419.164 31.527972 210.000 +CPAR2_212970-T 1185 974.075 27.392638 424.000 +CPAR2_212980-T 1017 806.075 220.548281 2825.002 +CPAR2_212990-T 1413 1202.075 64.601712 1234.000 +CPAR2_213000-T 912 701.099 20.286542 226.010 +CPAR2_213010-T 1482 1271.075 31.735642 641.000 +CPAR2_213020-T 1806 1595.075 81.612107 2068.594 +CPAR2_213030-T 1725 1514.075 23.400302 563.000 +CPAR2_213040-T 1329 1118.075 62.250753 1106.000 +CPAR2_213050-T 240 29.539 17226.634339 8085.992 +CPAR2_213060-T 186 17.248 1148.335680 314.733 +CPAR2_213070-T 906 695.099 0.090534 1.000 +CPAR2_213080-T 648 437.154 55.134736 383.000 +CPAR2_213090-T 1776 1565.075 79.093540 1967.051 +CPAR2_213100-T 2934 2723.075 37.599609 1626.981 +CPAR2_213110-T 1854 1643.075 163.240625 4262.115 +CPAR2_213120-T 1368 1157.075 78.295282 1439.583 +CPAR2_213130-T 2802 2591.075 53.748951 2213.041 +CPAR2_213140-T 3303 3092.075 28.391262 1395.000 +CPAR2_213150-T 1011 800.075 23.046092 293.000 +CPAR2_213160-T 975 764.085 16.801543 204.000 +CPAR2_213170-T 204 8.232 3585.422025 469.000 +CPAR2_213180-T 750 539.128 99.567610 853.000 +CPAR2_213190-T 1638 1427.075 14.552164 330.000 +CPAR2_213200-T 1560 1349.075 87.276981 1871.007 +CPAR2_213210-T 1737 1526.075 85.566285 2075.000 +CPAR2_213220-T 471 260.181 0.725614 3.000 +CPAR2_213230-T 1716 1505.075 0.587910 14.061 +CPAR2_213240-T 1731 1520.075 3.847642 92.939 +CPAR2_213250-T 1833 1622.075 22.579406 582.000 +CPAR2_213260-T 1362 1151.075 86.315389 1578.816 +CPAR2_213270-T 990 779.081 32.067734 397.000 +CPAR2_213280-T 2367 2156.075 28.282669 969.000 +CPAR2_213290-T 2004 1793.075 33.304237 948.937 +CPAR2_213300-T 357 146.259 15.489626 36.000 +CPAR2_213310-T 3771 3560.075 43.930050 2485.194 +CPAR2_213320-T 3861 3650.075 41.738144 2420.886 +CPAR2_213330-T 825 614.114 38.015436 370.978 +CPAR2_213340-T 753 542.127 39.119182 337.000 +CPAR2_213350-T 1026 815.075 23.702883 307.000 +CPAR2_213360-T 1710 1499.075 57.553872 1371.000 +CPAR2_213370-T 1202 991.075 24.065401 379.000 +CPAR2_213380-T 339 128.315 557.590228 1136.925 +CPAR2_213390-T 720 509.136 133.614229 1081.000 +CPAR2_213400-T 1215 1004.075 60.293338 962.000 +CPAR2_213410-T 1935 1724.075 26.499699 726.000 +CPAR2_213420-T 2955 2744.075 21.144404 922.000 +CPAR2_213430-T 2106 1895.075 109.916291 3310.000 +CPAR2_213440-T 3414 3203.075 39.751324 2023.290 +CPAR2_213450-T 1479 1268.075 155.877500 3141.000 +CPAR2_213460-T 2874 2663.075 19.424458 822.000 +CPAR2_213470-T 777 566.119 101.712532 915.001 +CPAR2_213480-T 981 770.084 108.789241 1331.261 +CPAR2_213490-T 651 440.149 85.469675 597.794 +CPAR2_213500-T 699 488.140 37.515354 291.000 +CPAR2_213510-T 822 611.114 46.030479 447.000 +CPAR2_213520-T 1215 1004.075 57.410288 916.000 +CPAR2_213530-T 258 47.397 17707.743672 13336.999 +CPAR2_213540-T 1131 920.075 0.341985 5.000 +CPAR2_213550-T 1413 1202.075 10.784402 206.000 +CPAR2_213560-T 1194 983.075 162.586847 2539.871 +CPAR2_213570-T 237 26.695 8315.793750 3527.598 +CPAR2_213580-T 897 686.099 33.753706 368.000 +CPAR2_213590-T 1476 1265.075 92.027133 1850.000 +CPAR2_213600-T 909 698.099 71.124704 789.000 +CPAR2_213610-T 1314 1103.075 18.712388 328.000 +CPAR2_213620-T 777 566.119 60.138141 541.000 +CPAR2_213630-T 1356 1145.075 126.157056 2295.541 +CPAR2_213640-T 2004 1793.075 308.860037 8800.345 +CPAR2_213650-T 2742 2531.075 85.926914 3456.000 +CPAR2_213660-T 777 566.119 66.203711 595.566 +CPAR2_213670-T 1161 950.075 157.446021 2377.000 +CPAR2_213680-T 681 470.143 93.786916 700.667 +CPAR2_213690-T 1599 1388.075 75.962215 1675.522 +CPAR2_213700-T 2004 1793.075 2.251807 64.161 +CPAR2_213710-T 1878 1667.075 93.126756 2467.000 +CPAR2_213720-T 1173 962.075 67.896725 1038.000 +CPAR2_tV(CAC)1-T 74 74.000 0.000000 0.000 +CPAR2_213730-T 1986 1775.075 85.109903 2400.691 +CPAR2_213740-T 726 515.135 15.392537 126.000 +CPAR2_213750-T 411 200.234 103.713747 330.000 +CPAR2_213760-T 900 689.099 117.441021 1286.000 +CPAR2_213780-T 2055 1844.075 217.586094 6376.014 +CPAR2_213770-T 2199 1988.075 44.986794 1421.207 +CPAR2_213800-T 333 122.324 20.578243 40.000 +CPAR2_213810-T 1362 1151.075 125.196528 2290.000 +CPAR2_213820-T 1212 1001.075 52.867623 841.000 +CPAR2_213830-T 4347 4136.075 38.154817 2507.710 +CPAR2_213840-T 189 13.685 1591.085511 346.000 +CPAR2_213850-T 984 773.083 105.028091 1290.241 +CPAR2_213860-T 2196 1985.075 138.342740 4363.880 +CPAR2_213870-T 2031 1820.075 10.303563 298.000 +CPAR2_213880-T 2373 2162.075 8.877477 305.000 +CPAR2_213890-T 465 254.184 0.247578 1.000 +CPAR2_213900-T 705 494.139 70.681254 555.000 +CPAR2_213910-T 2814 2603.075 22.797410 943.000 +CPAR2_213920-T 1599 1388.075 78.487724 1731.228 +CPAR2_213930-T 1029 818.075 45.924198 597.000 +CPAR2_213940-T 1068 857.075 55.362144 754.000 +CPAR2_tL(UAA)1-T 84 3.047 0.000000 0.000 +CPAR2_213950-T 1713 1502.075 57.092853 1362.740 +CPAR2_213960-T 1368 1157.075 77.067055 1417.000 +CPAR2_213970-T 1788 1577.075 44.811334 1123.000 +CPAR2_213980-T 1806 1595.075 57.731342 1463.296 +CPAR2_213990-T 1245 1034.075 91.954468 1511.000 +CPAR2_214000-T 2388 2177.075 70.443775 2437.000 +CPAR2_214010-T 2271 2060.075 148.573082 4863.654 +CPAR2_214020-T 1587 1376.075 225.342487 4927.479 +CPAR2_214030-T 2604 2393.075 16.672220 634.000 +CPAR2_214040-T 1482 1271.075 102.286797 2066.000 +CPAR2_214050-T 2133 1922.075 29.892410 913.000 +CPAR2_214060-T 570 359.169 63.776918 364.000 +CPAR2_214070-T 276 65.367 611.331135 635.000 +CPAR2_214080-T 684 473.142 144.443734 1086.000 +CPAR2_214090-T 4785 4574.075 26.883252 1954.000 +CPAR2_214100-T 2757 2546.075 115.367341 4667.599 +CPAR2_214110-T 1497 1286.075 60.773708 1242.000 +CPAR2_214120-T 810 599.118 27.204968 259.000 +CPAR2_214130-T 1065 854.075 48.188448 654.001 +CPAR2_214140-T 2139 1928.075 49.675048 1521.955 +CPAR2_214150-T 1185 974.075 193.304573 2992.086 +CPAR2_214160-T 2331 2120.075 51.691048 1741.430 +CPAR2_214170-T 1527 1316.075 70.147131 1467.000 +CPAR2_214180-T 249 38.415 131.054604 80.000 +CPAR2_700010-T 1326 1115.075 11.907999 211.000 +CPAR2_700020-T 885 674.099 4.387675 47.000 +CPAR2_700030-T 4431 4220.075 9.560629 641.130 +CPAR2_700040-T 966 755.088 152.181468 1825.990 +CPAR2_700050-T 2184 1973.075 21.082317 661.000 +CPAR2_700060-T 2640 2429.075 13.704880 529.000 +CPAR2_700070-T 2460 2249.075 59.690210 2133.274 +CPAR2_700080-T 1680 1469.075 67.896244 1585.000 +CPAR2_700090-T 759 548.124 672.790312 5860.000 +CPAR2_700100-T 1266 1055.075 601.971993 10092.510 +CPAR2_700110-T 1758 1547.075 16.880962 415.000 +CPAR2_700120-T 1812 1601.075 0.471661 12.000 +CPAR2_700130-T 1716 1505.075 38.258124 915.001 +CPAR2_700140-T 1182 971.075 51.519870 795.000 +CPAR2_700150-T 696 485.141 283.428789 2185.000 +CPAR2_700160-T 837 626.110 69.553060 692.000 +CPAR2_700170-T 939 728.098 154.247114 1784.622 +CPAR2_700180-T 1422 1211.075 157.695696 3034.803 +CPAR2_700190-T 1347 1136.075 105.370813 1902.247 +CPAR2_700200-T 1023 812.075 11.469010 148.000 +CPAR2_700210-T 294 83.345 226.517854 300.000 +CPAR2_700220-T 1782 1571.075 71.557698 1786.458 +CPAR2_700230-T 1692 1481.075 115.911831 2728.000 +CPAR2_700240-T 1632 1421.075 33.954028 766.740 +CPAR2_700250-T 1035 824.075 52.920857 693.000 +CPAR2_700260-T 609 398.167 46.625287 295.003 +CPAR2_700270-T 2382 2171.075 31.594579 1090.001 +CPAR2_700280-T 1125 914.075 0.481922 7.000 +CPAR2_700290-T 405 194.236 83.140258 256.614 +CPAR2_700300-T 405 194.236 610.231905 1883.495 +CPAR2_700310-T 987 776.081 108.251663 1335.000 +CPAR2_700320-T 2079 1868.075 25.130724 746.000 +CPAR2_700330-T 3390 3179.075 48.875289 2469.048 +CPAR2_700340-T 1512 1301.075 31.390830 649.000 +CPAR2_700350-T 5457 5246.075 44.575952 3715.991 +CPAR2_700360-T 324 113.334 468.607002 843.936 +CPAR2_700370-T 1887 1676.075 14.267590 380.000 +CPAR2_700380-T 1707 1496.075 1013.764749 24100.724 +CPAR2_700390-T 1881 1670.075 73.374236 1947.238 +CPAR2_700400-T 222 15.404 821.163572 201.000 +CPAR2_700410-T 1227 1016.075 46.402417 749.214 +CPAR2_700420-T 1863 1652.075 109.077510 2863.548 +CPAR2_700430-T 510 299.173 392.709478 1866.955 +CPAR2_700440-T 789 578.119 2.068221 19.000 +CPAR2_700450-T 2397 2186.075 275.438258 9568.169 +CPAR2_700460-T 1311 1100.075 66.421675 1161.106 +CPAR2_700470-T 696 485.141 100.659378 776.000 +CPAR2_700480-T 1023 812.075 57.341261 739.951 +CPAR2_700490-T 3903 3692.075 30.663703 1799.014 +CPAR2_700500-T 1998 1787.075 129.271288 3671.000 +CPAR2_700510-T 819 608.115 48.941327 472.934 +CPAR2_700520-T 903 692.099 73.958801 813.388 +CPAR2_700530-T 864 653.103 154.145533 1599.749 +CPAR2_700540-T 3549 3338.075 72.215056 3830.569 +CPAR2_700550-T 1746 1535.075 59.647720 1455.000 +CPAR2_700560-T 3498 3287.075 6.413509 335.000 +CPAR2_700570-T 1167 956.075 73.853077 1122.019 +CPAR2_700580-T 2487 2276.075 51.454159 1861.001 +CPAR2_700590-T 372 161.241 123.330716 316.000 +CPAR2_700600-T 1674 1463.075 26.968786 627.000 +CPAR2_700610-T 930 719.098 126.456282 1445.000 +CPAR2_700620-T 939 728.098 43.474940 503.000 +CPAR2_700630-T 2529 2318.075 213.999052 7882.770 +CPAR2_700640-T 639 428.160 16.755575 114.000 +CPAR2_700650-T 987 776.081 65.073323 802.509 +CPAR2_700660-T 1092 881.075 194.346198 2721.000 +CPAR2_700670-T 696 485.141 57.593768 444.000 +CPAR2_700680-T 7884 7673.075 19.071001 2325.318 +CPAR2_700690-T 801 590.119 58.545496 549.000 +CPAR2_700700-T 2763 2552.075 70.217567 2847.598 +CPAR2_700710-T 3195 2984.075 92.017931 4363.367 +CPAR2_700720-T 411 200.234 710.147216 2259.571 +CPAR2_700730-T 1266 1055.075 51.235413 859.000 +CPAR2_700740-T 468 257.182 72.673500 297.000 +CPAR2_700750-T 615 404.167 163.748725 1051.666 +CPAR2_700760-T 2958 2747.075 45.730441 1996.252 +CPAR2_700770-T 1269 1058.075 5.293391 89.000 +CPAR2_700780-T 198 8.076 281.419862 36.115 +CPAR2_700790-T 873 662.100 213.566348 2246.962 +CPAR2_700800-T 3189 2978.075 17.200825 814.000 +CPAR2_700810-T 1929 1718.075 57.543320 1571.001 +CPAR2_700820-T 1680 1469.075 128.258029 2994.112 +CPAR2_700830-T 1884 1673.075 257.427626 6844.002 +CPAR2_700840-T 1035 824.075 7.407393 97.000 +CPAR2_700850-T 384 173.239 219.407959 604.000 +CPAR2_700860-T 3462 3251.075 55.108824 2847.001 +CPAR2_700870-T 777 566.119 894.503044 8046.909 +CPAR2_700880-T 2718 2507.075 111.408461 4438.385 +CPAR2_700890-T 1725 1514.075 59.205830 1424.464 +CPAR2_700900-T 1986 1775.075 68.117835 1921.397 +CPAR2_700910-T 1779 1568.075 99.667201 2483.468 +CPAR2_700920-T 1656 1445.075 9.058023 208.000 +CPAR2_700930-T 2493 2282.075 28.485962 1033.000 +CPAR2_700940-T 1113 902.075 74.634218 1069.843 +CPAR2_700950-T 1113 902.075 1040.342907 14912.785 +CPAR2_700960-T 1977 1766.075 327.740410 9197.688 +CPAR2_700970-T 1929 1718.075 60.671543 1656.406 +CPAR2_700980-T 1005 794.075 255.197364 3220.159 +CPAR2_700990-T 2079 1868.075 1.111681 33.000 +CPAR2_701000-T 1995 1784.075 96.946626 2748.434 +CPAR2_701010-T 714 503.137 73.544805 588.000 +CPAR2_701020-T 795 584.119 82.848710 769.000 +CPAR2_701030-T 633 422.163 46.657870 313.000 +CPAR2_701040-T 1860 1649.075 32.856644 861.000 +CPAR2_701050-T 1347 1136.075 98.476738 1777.789 +CPAR2_701060-T 1014 803.075 158.450919 2022.044 +CPAR2_701070-T 3324 3113.075 85.329360 4221.119 +CPAR2_701080-T 1491 1280.075 3.195497 65.000 +CPAR2_701090-T 195 9.048 1809.780176 260.197 +CPAR2_701100-T 2037 1826.075 79.511625 2307.219 +CPAR2_701110-T 987 776.081 78.492592 968.000 +CPAR2_701120-T 855 644.107 66.339548 679.000 +CPAR2_701130-T 1977 1766.075 27.621027 775.155 +CPAR2_701140-T 1923 1712.075 34.845445 948.000 +CPAR2_701150-T 1161 950.075 54.314572 820.000 +CPAR2_701160-T 534 323.170 71.465257 367.000 +CPAR2_701170-T 1269 1058.075 72.441640 1217.992 +CPAR2_701180-T 1437 1226.075 85.151003 1659.000 +CPAR2_701190-T 924 713.098 48.184134 546.000 +CPAR2_701200-T 546 335.169 31.159272 165.955 +CPAR2_701210-T 2160 1949.075 49.787039 1542.000 +CPAR2_701220-T 1506 1295.075 133.827879 2754.109 +CPAR2_701230-T 795 584.119 785.500749 7291.002 +CPAR2_701240-T 834 623.110 66.050439 654.003 +CPAR2_701250-T 693 482.142 2.218884 17.000 +CPAR2_701260-T 1026 815.075 2.470659 32.000 +CPAR2_701270-T 576 365.168 308.820114 1792.000 +CPAR2_701280-T 1698 1487.075 34.235455 809.000 +CPAR2_701290-T 906 695.099 359.226662 3967.845 +CPAR2_701300-T 1410 1199.075 6.455341 123.000 +CPAR2_701310-T 1434 1223.075 50.269192 977.000 +CPAR2_701320-T 477 266.180 100.005803 423.000 +CPAR2_701330-T 1386 1175.075 24.153017 451.000 +CPAR2_701340-T 3525 3314.075 47.632809 2508.465 +CPAR2_701350-T 753 542.127 51.075490 440.000 +CPAR2_701360-T 2742 2531.075 83.432206 3355.662 +CPAR2_701370-T 1707 1496.075 57.416900 1365.000 +CPAR2_701380-T 669 458.143 2.060396 15.000 +CPAR2_701390-T 762 551.123 60.175855 527.000 +CPAR2_701400-T 1359 1148.075 89.018839 1624.021 +CPAR2_701410-T 1215 1004.075 10.090673 161.000 +CPAR2_701420-T 3279 3068.075 35.052736 1708.942 +CPAR2_701430-T 1347 1136.075 37.170141 671.028 +CPAR2_701440-T 897 686.099 107.542010 1172.477 +CPAR2_701460-T 1059 848.075 16.770058 226.000 +CPAR2_701470-T 1704 1493.075 86.629890 2055.365 +CPAR2_701480-T 981 770.084 0.326876 4.000 +CPAR2_701490-T 3009 2798.075 66.476250 2955.734 +CPAR2_701500-T 1164 953.075 62.199118 942.000 +CPAR2_701510-T 1107 896.075 148.574527 2115.575 +CPAR2_701520-T 1788 1577.075 110.443662 2767.787 +CPAR2_701530-T 1293 1082.075 80.198698 1379.000 +CPAR2_701540-T 3363 3152.075 10.641214 533.000 +CPAR2_701550-T 123 18.266 0.000000 0.000 +CPAR2_701560-T 157 32.424 1.940877 1.000 +CPAR2_701565-T 151 30.955 2.032989 1.000 +CPAR2_701570-T 1786 1575.075 2.120396 53.071 +CPAR2_701580-T 121 17.142 0.000000 0.000 +CPAR2_701590-T 1446 1235.075 22.419183 440.000 +CPAR2_701620-T 1479 1268.075 144.774145 2917.263 +CPAR2_701630-T 2766 2555.075 2.684623 109.000 +CPAR2_701640-T 2091 1880.075 15.069471 450.207 +CPAR2_701650-T 1761 1550.075 125.123931 3082.000 +CPAR2_701660-T 2262 2051.075 27.647971 901.124 +CPAR2_701670-T 1686 1475.075 208.747221 4892.990 +CPAR2_701680-T 4203 3992.075 41.804388 2651.918 +CPAR2_701690-T 2394 2183.075 25.655580 890.000 +CPAR2_701700-T 2346 2135.075 30.918815 1049.000 +CPAR2_701710-T 924 713.098 20.473845 232.000 +CPAR2_701720-T 273 62.371 172.532447 171.000 +CPAR2_701730-T 918 707.098 19.401599 218.000 +CPAR2_701740-T 369 158.243 296.670533 746.000 +CPAR2_701750-T 1023 812.075 42.001376 542.000 +CPAR2_701760-T 849 638.108 53.685355 544.364 +CPAR2_701770-T 180 24.452 481.264417 187.000 +CPAR2_701780-T 273 62.371 41.367429 41.000 +CPAR2_701790-T 1014 803.075 54.931604 701.000 +CPAR2_701800-T 666 455.143 53.877260 389.666 +CPAR2_701810-T 1029 818.075 73.463332 955.000 +CPAR2_701820-T 249 38.415 411.183820 251.000 +CPAR2_701830-T 1254 1043.075 378.921914 6280.654 +CPAR2_701840-T 948 737.096 0.170752 2.000 +CPAR2_701850-T 1134 923.075 54.880655 805.000 +CPAR2_701860-T 597 386.168 309.952212 1902.000 +CPAR2_701870-T 1113 902.075 0.418571 6.000 +CPAR2_701880-T 1122 911.075 0.621654 9.000 +CPAR2_701890-T 1146 935.075 16.017359 238.000 +CPAR2_701900-T 1206 995.075 97.202834 1537.002 +CPAR2_701910-T 2598 2387.075 83.116052 3152.757 +CPAR2_701920-T 2481 2270.075 49.915444 1800.589 +CPAR2_701930-T 1164 953.075 10.170946 154.038 +CPAR2_701940-T 972 761.086 28.870183 349.158 +CPAR2_701950-T 3255 3044.075 34.710728 1679.030 +CPAR2_701960-T 765 554.123 52.581791 463.000 +CPAR2_701970-T 2511 2300.075 36.334281 1328.000 +CPAR2_701980-T 354 143.266 88.729779 202.000 +CPAR2_701990-T 1971 1760.075 41.046032 1148.000 +CPAR2_702000-T 1329 1118.075 12.213755 217.000 +CPAR2_702010-T 273 62.371 198.765451 197.000 +CPAR2_702020-T 1833 1622.075 86.299670 2224.434 +CPAR2_702030-T 3036 2825.075 34.371338 1543.000 +CPAR2_702040-T 1107 896.075 0.070229 1.000 +CPAR2_702050-T 495 284.177 1.771586 8.000 +CPAR2_702060-T 1197 986.075 59.160224 926.999 +CPAR2_702070-T 918 707.098 60.518748 680.000 +CPAR2_702080-T 2049 1838.075 72.753883 2125.000 +CPAR2_702090-T 687 476.142 402.030555 3041.829 +CPAR2_702100-T 1158 947.075 5.980239 90.000 +CPAR2_702110-T 1104 893.075 24.874088 353.000 +CPAR2_702120-T 687 476.142 108.148223 818.267 +CPAR2_702130-T 1446 1235.075 1.324770 26.000 +CPAR2_702140-T 1209 998.075 229.760628 3644.000 +CPAR2_702150-T 1344 1133.075 172.061292 3098.000 +CPAR2_702160-T 336 125.320 73.314794 146.000 +CPAR2_702170-T 1464 1253.075 29.278709 583.000 +CPAR2_702180-T 753 542.127 6.384436 55.000 +CPAR2_702190-T 369 158.243 114.532324 288.000 +CPAR2_702200-T 1365 1154.075 25.580786 469.124 +CPAR2_702210-T 1911 1700.075 98.036807 2648.480 +CPAR2_702220-T 528 317.172 16.269718 82.000 +CPAR2_702230-T 1482 1271.075 82.272618 1661.751 +CPAR2_702240-T 3243 3032.075 50.371959 2426.992 +CPAR2_702250-T 5307 5096.075 54.939979 4449.014 +CPAR2_702260-T 747 536.129 109.162777 930.000 +CPAR2_702280-T 1707 1496.075 34.537592 821.079 +CPAR2_702290-T 204 8.232 3440.170387 450.000 +CPAR2_702300-T 1410 1199.075 69.015798 1315.026 +CPAR2_702310-T 1932 1721.075 10.128391 277.000 +CPAR2_702320-T 1260 1049.075 42.710423 712.000 +CPAR2_702330-T 981 770.084 151.105808 1849.092 +CPAR2_702340-T 420 209.228 64.666380 215.000 +CPAR2_702350-T 516 305.173 62.629752 303.715 +CPAR2_702360-T 786 575.119 33.076515 302.285 +CPAR2_702370-T 1608 1397.075 12.387208 275.000 +CPAR2_702380-T 1938 1727.075 40.445690 1110.000 +CPAR2_702390-T 852 641.107 83.827776 854.000 +CPAR2_702400-T 264 53.386 2222.303542 1885.265 +CPAR2_702410-T 831 620.112 29.272168 288.446 +CPAR2_702420-T 807 596.118 274.904285 2604.072 +CPAR2_702430-T 1044 833.075 61.640540 816.000 +CPAR2_702440-T 336 125.320 327.405791 652.000 +CPAR2_702450-T 1002 791.075 17.660203 222.000 +CPAR2_702460-T 1998 1787.075 26.976745 766.076 +CPAR2_702470-T 648 437.154 22.885818 158.979 +CPAR2_702480-T 1080 869.075 59.014772 815.000 +CPAR2_702490-T 627 416.165 36.231201 239.601 +CPAR2_702500-T 1011 800.075 9.755148 124.024 +CPAR2_702510-T 606 395.168 931.750632 5850.873 +CPAR2_702520-T 552 341.169 2.029005 11.000 +CPAR2_702530-T 393 182.238 50.762078 147.000 +CPAR2_702540-T 396 185.237 2.378099 7.000 +CPAR2_702550-T 4206 3995.075 53.254398 3380.803 +CPAR2_702560-T 894 683.099 100.013587 1085.631 +CPAR2_702570-T 768 557.122 193.154528 1709.995 +CPAR2_702580-T 684 473.142 68.231701 513.000 +CPAR2_702590-T 270 59.377 7.418923 7.000 +CPAR2_702600-T 756 545.125 249.239552 2159.000 +CPAR2_702610-T 1164 953.075 74.678558 1131.000 +CPAR2_702620-T 885 674.099 127.802711 1369.000 +CPAR2_702630-T 360 149.253 272.377539 646.000 +CPAR2_702640-T 1152 941.075 1001.081591 14970.397 +CPAR2_702650-T 1257 1046.075 39.275639 652.868 +CPAR2_702660-T 1239 1028.075 12.495274 204.132 +CPAR2_702670-T 750 539.128 57.312657 491.000 +CPAR2_702680-T 750 539.128 49.634351 425.220 +CPAR2_702690-T 3390 3179.075 42.086274 2126.086 +CPAR2_702700-T 615 404.167 101.083473 649.203 +CPAR2_702710-T 912 701.099 87.777503 977.917 +CPAR2_702720-T 1635 1424.075 27.221265 616.000 +CPAR2_702730-T 1587 1376.075 10.929901 239.000 +CPAR2_702740-T 489 278.177 512.104262 2263.704 +CPAR2_702750-T 573 362.169 37.370880 215.072 +CPAR2_702760-T 447 236.194 512.097541 1922.030 +CPAR2_702770-T 2205 1994.075 77.698017 2462.016 +CPAR2_702780-T 1146 935.075 173.835454 2583.000 +CPAR2_702790-T 4800 4589.075 49.520323 3611.171 +CPAR2_702800-T 2445 2234.075 42.985034 1526.000 +CPAR2_702810-T 2100 1889.075 103.732383 3113.889 +CPAR2_702820-T 588 377.168 56.999820 341.624 +CPAR2_702830-T 486 275.178 317.948068 1390.304 +CPAR2_702840-T 642 431.159 0.729783 5.000 +CPAR2_702850-T 1431 1220.075 57.980311 1124.104 +CPAR2_702860-T 741 530.132 60.778060 512.000 +CPAR2_702870-T 1122 911.075 62.648914 907.000 +CPAR2_702880-T 405 194.236 36.934767 114.000 +CPAR2_702890-T 864 653.103 202.972092 2106.479 +CPAR2_702900-T 639 428.160 157.390016 1070.835 +CPAR2_702910-T 2907 2696.075 71.985147 3084.000 +CPAR2_702920-T 1674 1463.075 18.373098 427.158 +CPAR2_702930-T 444 233.197 162.725161 603.000 +CPAR2_702940-T 1680 1469.075 9.074623 211.842 +CPAR2_702950-T 1677 1466.075 0.944337 22.000 +CPAR2_702960-T 1653 1442.075 0.523665 12.000 +CPAR2_702970-T 1644 1433.075 0.219564 5.000 +CPAR2_702980-T 1989 1778.075 179.936760 5084.046 +CPAR2_702990-T 705 494.139 245.792468 1930.000 +CPAR2_703000-T 999 788.075 79.294317 993.000 +CPAR2_703010-T 2712 2501.075 66.363614 2637.523 +CPAR2_703020-T 1176 965.075 107.723233 1652.000 +CPAR2_703030-T 2859 2648.075 60.729814 2555.476 +CPAR2_703040-T 1830 1619.075 42.716826 1099.020 +CPAR2_703050-T 666 455.143 254.407729 1840.000 +CPAR2_703060-T 3780 3569.075 22.904850 1299.040 +CPAR2_703070-T 369 158.243 283.944719 714.000 +CPAR2_703080-T 2097 1886.075 90.040466 2698.586 +CPAR2_703090-T 1806 1595.075 137.370100 3481.872 +CPAR2_703100-T 1023 812.075 55.485213 716.000 +CPAR2_703110-T 813 602.117 122.910237 1176.003 +CPAR2_703120-T 2655 2444.075 32.056442 1245.000 +CPAR2_703130-T 459 248.186 218.823677 863.000 +CPAR2_703140-T 1188 977.075 26.664463 414.000 +CPAR2_703150-T 2133 1922.075 167.894577 5127.982 +CPAR2_703160-T 1170 959.075 36.941644 563.000 +CPAR2_703170-T 1785 1574.075 40.000092 1000.520 +CPAR2_703180-T 2796 2585.075 52.387734 2152.000 +CPAR2_703190-T 1398 1187.075 26.135402 493.000 +CPAR2_703200-T 1398 1187.075 3.021740 57.000 +CPAR2_703210-T 480 269.180 12.624442 54.000 +CPAR2_703220-T 6225 6014.075 31.226032 2984.181 +CPAR2_703230-T 489 278.177 19.002817 84.000 +CPAR2_703240-T 831 620.112 89.013640 877.134 +CPAR2_703250-T 1098 887.075 147.584685 2080.373 +CPAR2_703260-T 810 599.118 5.356963 51.000 +CPAR2_703270-T 3417 3206.075 67.365017 3432.003 +CPAR2_703280-T 633 422.163 57.688804 387.000 +CPAR2_703290-T 789 578.119 246.183138 2261.595 +CPAR2_703300-T 387 176.239 380.642043 1066.000 +CPAR2_703310-T 1122 911.075 27.007415 391.000 +CPAR2_703320-T 1200 989.075 30.858365 485.000 +CPAR2_703330-T 1773 1562.075 83.179092 2064.694 +CPAR2_703340-T 1407 1196.075 80.026022 1521.000 +CPAR2_703350-T 2757 2546.075 77.764880 3146.257 +CPAR2_703360-T 1044 833.075 4.985632 66.000 +CPAR2_703370-T 471 260.181 113.437599 469.000 +CPAR2_703380-T 1986 1775.075 13.223688 373.000 +CPAR2_703390-T 4965 4754.075 32.896733 2485.182 +CPAR2_703400-T 681 470.143 88.005559 657.475 +CPAR2_703410-T 1458 1247.075 161.365482 3197.737 +CPAR2_703420-T 1020 809.075 63.703005 819.008 +CPAR2_703430-T 738 527.132 234.750203 1966.367 +CPAR2_703440-T 897 686.099 51.180891 558.000 +CPAR2_703450-T 3264 3053.075 450.964203 21878.575 +CPAR2_703460-T 1299 1088.075 55.638660 962.000 +CPAR2_703460.1-T 489 278.177 28.956674 128.000 +CPAR2_703470-T 2382 2171.075 49.333873 1702.000 +CPAR2_703480-T 2211 2000.075 17.588387 559.000 +CPAR2_703490-T 636 425.161 1.332138 9.000 +CPAR2_703500-T 1266 1055.075 288.798595 4841.924 +CPAR2_703510-T 4326 4115.075 72.077118 4713.187 +CPAR2_703520-T 561 350.169 21.925156 122.000 +CPAR2_703530-T 771 560.120 263.352109 2344.000 +CPAR2_703540-T 975 764.085 25.713796 312.210 +CPAR2_703550-T 1749 1538.075 43.918954 1073.418 +CPAR2_703560-T 498 287.177 14.243770 65.000 +CPAR2_703570-T 1746 1535.075 67.849995 1655.080 +CPAR2_703580-T 1740 1529.075 64.943894 1577.999 +CPAR2_703590-T 1728 1517.075 24.439209 589.161 +CPAR2_703600-T 1395 1184.075 30.506551 574.000 +CPAR2_703610-T 1548 1337.075 55.663807 1182.683 +CPAR2_703620-T 1797 1586.075 44.557057 1123.000 +CPAR2_703630-T 2784 2573.075 33.335264 1363.000 +CPAR2_703640-T 1479 1268.075 265.891480 5357.830 +CPAR2_703650-T 873 662.100 17.203455 181.000 +CPAR2_703660-T 924 713.098 39.359201 446.000 +CPAR2_703670-T 1029 818.075 30.540581 397.018 +CPAR2_703680-T 1995 1784.075 80.766957 2289.741 +CPAR2_703690-T 3156 2945.075 52.224692 2444.059 +CPAR2_703700-T 1449 1238.075 9.250919 182.000 +CPAR2_703710-T 1632 1421.075 104.996544 2371.000 +CPAR2_703720-T 1029 818.075 6.537247 84.982 +CPAR2_703730-T 669 458.143 77.745600 566.000 +CPAR2_703740-T 624 413.166 12.641943 83.000 +CPAR2_703750-T 2028 1817.075 46.777684 1350.676 +CPAR2_703760-T 975 764.085 31.873515 387.000 +CPAR2_703770-T 849 638.108 35.404705 359.000 +CPAR2_703780-T 591 380.168 29.961493 181.000 +CPAR2_703790-T 1401 1190.075 25.382087 480.000 +CPAR2_703800-T 1854 1643.075 1.302213 34.000 +CPAR2_703810-T 1647 1436.075 34.450841 786.170 +CPAR2_703820-T 2049 1838.075 35.665814 1041.729 +CPAR2_703830-T 939 728.098 92.481439 1070.000 +CPAR2_703840-T 1398 1187.075 56.861292 1072.592 +CPAR2_703850-T 264 53.386 357.168921 303.000 +CPAR2_703860-T 1608 1397.075 42.702463 948.008 +CPAR2_703870-T 3189 2978.075 24.704043 1169.077 +CPAR2_703880-T 2433 2222.075 88.844679 3137.109 +CPAR2_703890-T 750 539.128 0.350179 3.000 +CPAR2_703900-T 450 239.191 0.000000 0.000 +CPAR2_703910-T 1737 1526.075 85.978653 2085.000 +CPAR2_703920-T 669 458.143 72.251211 526.000 +CPAR2_703930-T 522 311.173 155.721914 770.000 +CPAR2_703940-T 1338 1127.075 213.848584 3830.000 +CPAR2_703950-T 1242 1031.075 45.290427 742.055 +CPAR2_703960-T 1737 1526.075 76.346107 1851.409 +CPAR2_703970-T 1569 1358.075 147.252431 3177.794 +CPAR2_703980-T 654 443.147 24.993430 176.000 +CPAR2_704000-T 3360 3149.075 57.273364 2865.993 +CPAR2_704010-T 2844 2633.075 135.426649 5666.395 +CPAR2_704020-T 2817 2606.075 54.596749 2260.962 +CPAR2_704030-T 621 410.166 89.961933 586.352 +CPAR2_704040-T 297 86.344 679.998594 933.000 +CPAR2_704050-T 1329 1118.075 76.754875 1363.693 +CPAR2_704060-T 501 290.176 237.472931 1095.003 +CPAR2_704070-T 723 512.135 116.899530 951.342 +CPAR2_704080-T 2109 1898.075 350.980176 10586.088 +CPAR2_704090-T 1743 1532.075 148.433720 3613.700 +CPAR2_704100-T 687 476.142 93.045817 704.000 +CPAR2_704110-T 1653 1442.075 332.366934 7616.320 +CPAR2_704120-T 2109 1898.075 52.716053 1589.995 +CPAR2_704130-T 3108 2897.075 57.936795 2667.188 +CPAR2_704140-T 867 656.101 57.165736 596.000 +CPAR2_704150-T 822 611.114 93.089432 903.987 +CPAR2_704160-T 501 290.176 522.872792 2411.000 +CPAR2_704170-T 426 215.224 2.631558 9.000 +CPAR2_704180-T 1266 1055.075 56.253859 943.138 +CPAR2_704190-T 1128 917.075 42.819356 624.000 +CPAR2_704200-T 1653 1442.075 47.304438 1084.000 +CPAR2_704210-T 3495 3284.075 42.790282 2233.046 +CPAR2_704220-T 3957 3746.075 47.114606 2804.604 +CPAR2_704230-T 519 308.173 65.958199 323.000 +CPAR2_704240-T 2727 2516.075 67.181420 2686.039 +CPAR2_704250-T 1077 866.075 100.345652 1381.000 +CPAR2_704260-T 528 317.172 249.998106 1260.000 +CPAR2_704270-T 495 284.177 62.226943 281.000 +CPAR2_704280-T 558 347.169 24.652344 136.000 +CPAR2_704290-T 618 407.166 178.634805 1155.786 +CPAR2_704300-T 4926 4715.075 42.980422 3220.318 +CPAR2_704310-T 1962 1751.075 49.989967 1391.000 +CPAR2_704320-T 1248 1037.075 3.337436 55.000 +CPAR2_704330-T 1500 1289.075 0.829910 17.000 +CPAR2_704340-T 966 755.088 68.423679 821.000 +CPAR2_704350-T 885 674.099 82.666113 885.505 +CPAR2_704360-T 405 194.236 0.000000 0.000 +CPAR2_704370-T 2226 2015.075 48.656035 1558.000 +CPAR2_500010-T 1740 1529.075 26.464949 643.042 +CPAR2_500020-T 4560 4349.075 48.564731 3356.274 +CPAR2_500030-T 1737 1526.075 105.726024 2563.878 +CPAR2_500040-T 1266 1055.075 195.590945 3279.228 +CPAR2_500050-T 5532 5321.075 10.845023 917.000 +CPAR2_500060-T 1113 902.075 82.562346 1183.489 +CPAR2_500070-T 531 320.171 47.413954 241.228 +CPAR2_500080-T 438 227.205 15.510664 56.000 +CPAR2_500090-T 456 245.187 386.094078 1504.286 +CPAR2_500100-T 2382 2171.075 48.812128 1684.000 +CPAR2_500110-T 843 632.108 28.901157 290.299 +CPAR2_500120-T 4122 3911.075 37.458238 2328.000 +CPAR2_500130-T 756 545.125 38.673113 335.000 +CPAR2_500140-T 1698 1487.075 5.162825 122.000 +CPAR2_500150-T 918 707.098 97.726642 1098.075 +CPAR2_500160-T 2673 2462.075 8.255849 323.000 +CPAR2_500170-T 1857 1646.075 8.907724 233.000 +CPAR2_500180-T 1344 1133.075 4.054382 73.000 +CPAR2_500190-T 888 677.099 94.799992 1020.000 +CPAR2_500200-T 3483 3272.075 66.957714 3481.476 +CPAR2_500210-T 1686 1475.075 142.108816 3331.000 +CPAR2_500220-T 1386 1175.075 54.420241 1016.168 +CPAR2_500230-T 1005 794.075 55.791945 704.000 +CPAR2_500240-T 3483 3272.075 36.541878 1900.000 +CPAR2_500250-T 1542 1331.075 58.530005 1238.000 +CPAR2_500260-T 669 458.143 85.300384 621.000 +CPAR2_500270-T 1935 1724.075 17.447460 478.000 +CPAR2_500280-T 1305 1094.075 168.111826 2922.705 +CPAR2_500290-T 2403 2192.075 60.045913 2091.599 +CPAR2_500300-T 1125 914.075 36.212983 526.000 +CPAR2_500310-T 1731 1520.075 110.505862 2669.254 +CPAR2_500320-T 789 578.119 0.000000 0.000 +CPAR2_500330-T 465 254.184 204.747446 827.001 +CPAR2_500340-T 213 11.052 2351.669904 413.000 +CPAR2_500350-T 228 19.222 1754.975786 536.049 +CPAR2_500360-T 3303 3092.075 83.612926 4108.307 +CPAR2_500370-T 2157 1946.075 96.839808 2994.698 +CPAR2_500380-T 246 35.431 234.273449 131.899 +CPAR2_500390-T 465 254.184 1216.792151 4914.780 +CPAR2_500400-T 1878 1667.075 83.953752 2224.000 +CPAR2_500410-T 2370 2159.075 39.523231 1356.000 +CPAR2_500420-T 957 746.091 72.881394 864.068 +CPAR2_500430-T 840 629.109 36.611351 366.000 +CPAR2_500440-T 954 743.094 43.698331 515.998 +CPAR2_500450-T 435 224.209 79.431774 283.000 +CPAR2_500460-T 2556 2345.075 107.603223 4009.789 +CPAR2_500470-T 2613 2402.075 39.345710 1501.839 +CPAR2_500480-T 8265 8054.075 16.892934 2162.023 +CPAR2_500490-T 1200 989.075 10.498207 165.000 +CPAR2_500500-T 1026 815.075 339.860958 4401.883 +CPAR2_500510-T 1479 1268.075 14.152822 285.186 +CPAR2_500520-T 1557 1346.075 75.596416 1617.000 +CPAR2_500530-T 987 776.081 145.714036 1797.000 +CPAR2_500540-T 1659 1448.075 20.858945 479.980 +CPAR2_500550-T 1839 1628.075 179.902465 4654.264 +CPAR2_500560-T 1371 1160.075 55.693147 1026.662 +CPAR2_500570-T 4203 3992.075 36.258369 2300.099 +CPAR2_500580-T 1401 1190.075 55.734834 1054.000 +CPAR2_500590-T 2310 2099.075 129.988947 4335.847 +CPAR2_500600-T 546 335.169 36.800374 196.000 +CPAR2_500610-T 1158 947.075 38.354687 577.221 +CPAR2_500620-T 1917 1706.075 38.106595 1033.089 +CPAR2_500630-T 2280 2069.075 74.826466 2460.203 +CPAR2_500640-T 267 56.381 341.548552 306.000 +CPAR2_500650-T 1317 1106.075 36.361397 639.094 +CPAR2_500660-T 3072 2861.075 13.009511 591.466 +CPAR2_500670-T 3837 3626.075 16.192182 933.000 +CPAR2_500680-T 1257 1046.075 78.807742 1310.000 +CPAR2_500680.1-T 252 41.408 21.276739 14.000 +CPAR2_500690-T 2067 1856.075 53.402440 1575.057 +CPAR2_500700-T 1467 1256.075 48.833162 974.698 +CPAR2_500710-T 801 590.119 21.647970 203.000 +CPAR2_500720-T 5055 4844.075 57.721052 4443.085 +CPAR2_500730-T 1149 938.075 698.678941 10414.893 +CPAR2_500740-T 1287 1076.075 50.473170 863.063 +CPAR2_500750-T 789 578.119 0.870830 8.000 +CPAR2_500760-T 1686 1475.075 40.446859 948.066 +CPAR2_500770-T 975 764.085 5.600514 68.000 +CPAR2_500780-T 966 755.088 42.587698 511.000 +CPAR2_500790-T 1770 1559.075 27.410274 679.078 +CPAR2_500800-T 1371 1160.075 98.668411 1818.879 +CPAR2_500810-T 1122 911.075 71.766507 1039.000 +CPAR2_500820-T 2163 1952.075 53.385622 1656.000 +CPAR2_500830-T 1095 884.075 31.604887 444.000 +CPAR2_500840-T 249 38.415 7997.607216 4882.000 +CPAR2_500850-T 1863 1652.075 33.063622 868.000 +CPAR2_500860-T 1440 1229.075 32.461703 634.000 +CPAR2_500870-T 1512 1301.075 748.386527 15472.762 +CPAR2_500880-T 1653 1442.075 319.429367 7319.851 +CPAR2_500890-T 2190 1979.075 59.430275 1869.001 +CPAR2_500900-T 1545 1334.075 3.254837 69.000 +CPAR2_500910-T 585 374.168 0.000000 0.000 +CPAR2_500920-T 1278 1067.075 14.802640 251.000 +CPAR2_500930-T 363 152.249 76.241350 184.452 +CPAR2_500940-T 393 182.238 14.503451 42.000 +CPAR2_500950-T 864 653.103 106.777059 1108.151 +CPAR2_500960-T 1320 1109.075 143.137698 2522.636 +CPAR2_500970-T 4374 4163.075 25.954688 1716.997 +CPAR2_500980-T 1551 1340.075 15.309075 326.000 +CPAR2_500990-T 2991 2780.075 16.356863 722.597 +CPAR2_501000-T 915 704.098 146.071264 1634.321 +CPAR2_501010-T 1767 1556.075 16.742884 414.000 +CPAR2_501020-T 1701 1490.075 170.279357 4031.899 +CPAR2_501030-T 867 656.101 27.777205 289.600 +CPAR2_501040-T 837 626.110 55.984183 557.000 +CPAR2_501050-T 4332 4121.075 24.524090 1605.990 +CPAR2_501060-T 1185 974.075 90.318180 1398.000 +CPAR2_501070-T 579 368.168 400.905590 2345.459 +CPAR2_501080-T 555 344.169 60.156066 328.996 +CPAR2_501090-T 408 197.235 83.594691 262.000 +CPAR2_501100-T 1542 1331.075 50.067266 1059.000 +CPAR2_501110-T 2409 2198.075 196.972872 6880.000 +CPAR2_501120-T 1821 1610.075 38.367371 981.630 +CPAR2_501130-T 801 590.119 31.778794 298.000 +CPAR2_501140-T 840 629.109 5.701524 56.998 +CPAR2_501150-T 840 629.109 1.900977 19.004 +CPAR2_501160-T 840 629.109 6.401840 63.999 +CPAR2_501170-T 846 635.108 73.026483 737.000 +CPAR2_501180-T 1917 1706.075 298.106773 8081.826 +CPAR2_501190-T 528 317.172 60.515415 305.000 +CPAR2_501200-T 1917 1706.075 69.657103 1888.439 +CPAR2_501210-T 1230 1019.075 25.195004 408.000 +CPAR2_501220-T 1254 1043.075 0.301658 5.000 +CPAR2_501230-T 2757 2546.075 139.502757 5644.084 +CPAR2_501240-T 450 239.191 53.934788 205.000 +CPAR2_501250-T 1113 902.075 251.553376 3605.889 +CPAR2_501260-T 774 563.119 54.864015 490.939 +CPAR2_501270-T 1692 1481.075 72.147467 1698.000 +CPAR2_501280-T 648 437.154 383.874429 2666.629 +CPAR2_501290-T 342 131.306 558.823227 1166.000 +CPAR2_501300-T 2016 1805.075 27.960156 802.000 +CPAR2_501310-T 1398 1187.075 78.141142 1474.000 +CPAR2_501320-T 1914 1703.075 57.944504 1568.143 +CPAR2_501330-T 1953 1742.075 99.773979 2762.000 +CPAR2_501340-T 2151 1940.075 27.798591 857.000 +CPAR2_501350-T 744 533.131 39.668001 336.058 +CPAR2_501360-T 459 248.186 1.014246 4.000 +CPAR2_501370-T 1158 947.075 8.771017 132.000 +CPAR2_501380-T 1365 1154.075 292.207764 5358.773 +CPAR2_501390-T 2136 1925.075 59.543215 1821.459 +CPAR2_501400-T 2607 2396.075 25.218876 960.209 +CPAR2_501410-T 2313 2102.075 35.086487 1172.000 +CPAR2_501415-T 168 32.446 48.488612 25.000 +CPAR2_501420-T 1059 848.075 32.278651 435.000 +CPAR2_501430-T 9186 8975.075 10.552587 1505.000 +CPAR2_501440-T 567 356.169 52.829446 299.000 +CPAR2_501450-T 1143 932.075 36.863976 546.000 +CPAR2_501460-T 450 239.191 628.202718 2387.727 +CPAR2_501470-T 3501 3290.075 24.674276 1290.000 +CPAR2_501480-T 1194 983.075 16.899649 264.000 +CPAR2_501490-T 1368 1157.075 20.558466 378.000 +CPAR2_tS(UGA)1-T 82 2.421 0.000000 0.000 +CPAR2_501500-T 2076 1865.075 107.264153 3178.999 +CPAR2_501510-T 2001 1790.075 37.756656 1074.000 +CPAR2_501520-T 831 620.112 146.236056 1441.000 +CPAR2_tT(UGU)1-T 73 73.000 0.000000 0.000 +CPAR2_501530-T 1761 1550.075 0.935733 23.049 +CPAR2_501540-T 3060 2849.075 24.561869 1112.000 +CPAR2_501550-T 2400 2189.075 14.315447 497.972 +CPAR2_501560-T 1023 812.075 49.472822 638.414 +CPAR2_501570-T 3609 3398.075 96.133829 5190.972 +CPAR2_501580-T 3867 3656.075 30.692749 1783.160 +CPAR2_501590-T 3471 3260.075 24.595593 1274.161 +CPAR2_501600-T 1602 1391.075 19.543109 432.000 +CPAR2_501610-T 477 266.180 182.339448 771.251 +CPAR2_501620-T 1827 1616.075 25.739518 661.000 +CPAR2_501630-T 4338 4127.075 17.857116 1171.098 +CPAR2_501640-T 3549 3338.075 63.148428 3349.640 +CPAR2_501650-T 321 110.336 221.866908 389.000 +CPAR2_501660-T 1479 1268.075 57.517358 1159.000 +CPAR2_501670-T 1392 1181.075 21.484641 403.223 +CPAR2_501680-T 468 257.182 152.443066 623.000 +CPAR2_501690-T 819 608.115 147.154840 1422.000 +CPAR2_501700-T 2241 2030.075 6.602798 213.000 +CPAR2_501710-T 3153 2942.075 284.136125 13283.719 +CPAR2_501720-T 1614 1403.075 132.717320 2959.021 +CPAR2_501730-T 1860 1649.075 45.732183 1198.400 +CPAR2_501740-T 1323 1112.075 35.254486 623.000 +CPAR2_501750-T 720 509.136 16.686328 135.000 +CPAR2_501760-T 1995 1784.075 91.537297 2595.080 +CPAR2_501770-T 495 284.177 39.196331 177.000 +CPAR2_501780-T 1077 866.075 0.871939 12.000 +CPAR2_501800-T 1449 1238.075 36.473582 717.571 +CPAR2_501810-T 1488 1277.075 1.647276 33.429 +CPAR2_501820-T 813 602.117 21.488802 205.604 +CPAR2_501830-T 480 269.180 133.959362 573.000 +CPAR2_501840-T 291 80.345 27.413664 35.000 +CPAR2_501845-T 279 68.363 12.887415 14.000 +CPAR2_501850-T 1176 965.075 0.130416 2.000 +CPAR2_501860-T 624 413.166 74.480844 489.000 +CPAR2_tQ(CUG)1-T 73 73.000 0.000000 0.000 +CPAR2_501870-T 1485 1274.075 73.299218 1484.000 +CPAR2_tE(UUC)1-T 72 72.000 0.000000 0.000 +CPAR2_501880-T 2412 2201.075 17.840632 624.000 +CPAR2_501890-T 1137 926.075 32.143979 473.026 +CPAR2_501900-T 741 530.132 61.846425 521.000 +CPAR2_501910-T 1470 1259.075 9.196586 184.000 +CPAR2_501920-T 1881 1670.075 35.646396 946.000 +CPAR2_501930-T 1263 1052.075 16.509077 276.000 +CPAR2_501940-T 336 125.320 105.954941 211.000 +CPAR2_501950-T 525 314.172 65.901088 329.003 +CPAR2_501960-T 1302 1091.075 45.449806 788.000 +CPAR2_501970-T 885 674.099 50.224878 538.000 +CPAR2_501980-T 399 188.237 24.405017 73.000 +CPAR2_501990-T 1278 1067.075 16.395031 278.001 +CPAR2_502000-T 1119 908.075 451.701100 6517.972 +CPAR2_502010-T 504 293.175 10.088610 47.000 +CPAR2_502020-T 1245 1034.075 22.638691 372.000 +CPAR2_502030-T 657 446.145 27.824024 197.258 +CPAR2_502040-T 375 164.240 100.387961 262.000 +CPAR2_502050-T 531 320.171 85.893480 437.000 +CPAR2_502060-T 1659 1448.075 53.883000 1239.888 +CPAR2_502070-T 312 101.339 506.725525 816.000 +CPAR2_502080-T 1164 953.075 3.433497 52.000 +CPAR2_502090-T 1530 1319.075 24.235650 508.000 +CPAR2_502100-T 1404 1193.075 44.676186 847.000 +CPAR2_502110-T 522 311.173 13.752065 68.000 +CPAR2_502120-T 2427 2216.075 3.066901 108.000 +CPAR2_502130-T 2742 2531.075 1.069114 43.000 +CPAR2_502140-T 1755 1544.075 420.470526 10316.764 +CPAR2_502150-T 1101 890.075 93.622261 1324.175 +CPAR2_502160-T 1392 1181.075 11.562259 217.000 +CPAR2_502170-T 1365 1154.075 116.637225 2139.000 +CPAR2_502180-T 330 119.329 686.634960 1302.000 +CPAR2_502190-T 813 602.117 77.948976 745.814 +CPAR2_502200-T 312 101.339 334.641424 538.886 +CPAR2_502210-T 6954 6743.075 5.805294 622.045 +CPAR2_502220-T 2136 1925.075 52.597956 1609.000 +CPAR2_502230-T 1641 1430.075 58.105410 1320.429 +CPAR2_502240-T 1014 803.075 62.062091 791.994 +CPAR2_502250-T 1359 1148.075 337.412706 6155.612 +CPAR2_502260-T 2709 2498.075 48.003494 1905.539 +CPAR2_502270-T 873 662.100 60.449708 636.000 +CPAR2_502280-T 1701 1490.075 27.834027 659.058 +CPAR2_502290-T 3585 3374.075 83.213386 4461.567 +CPAR2_502300-T 2703 2492.075 72.569703 2873.796 +CPAR2_502310-T 627 416.165 573.885347 3795.162 +CPAR2_502320-T 822 611.114 82.175217 798.000 +CPAR2_502330-T 945 734.097 25.288868 295.000 +CPAR2_502340-T 801 590.119 305.223654 2862.181 +CPAR2_502350-T 1431 1220.075 76.100640 1475.416 +CPAR2_502360-T 1527 1316.075 77.813288 1627.324 +CPAR2_502370-T 1722 1511.075 56.420360 1354.757 +CPAR2_502380-T 1341 1130.075 22.553200 405.000 +CPAR2_502390-T 846 635.108 57.073615 576.000 +CPAR2_502400-T 1710 1499.075 42.399279 1010.000 +CPAR2_502410-T 861 650.103 39.881884 412.000 +CPAR2_502420-T 1761 1550.075 8.038461 198.000 +CPAR2_502430-T 2373 2162.075 35.480803 1219.000 +CPAR2_502440-T 591 380.168 28.159189 170.112 +CPAR2_502450-T 816 605.115 0.103997 1.000 +CPAR2_502460-T 798 587.119 178.035516 1661.009 +CPAR2_502470-T 843 632.108 68.594355 689.000 +CPAR2_502480-T 534 323.170 32.519636 167.000 +CPAR2_502490-T 801 590.119 38.122424 357.486 +CPAR2_502500-T 2511 2300.075 27.004469 987.000 +CPAR2_502510-T 834 623.110 55.142753 546.000 +CPAR2_502520-T 957 746.091 44.113369 523.000 +CPAR2_502530-T 345 134.296 91.844307 196.000 +CPAR2_502540-T 3921 3710.075 35.471193 2091.212 +CPAR2_502550-T 1410 1199.075 8.407597 160.198 +CPAR2_502560-T 2121 1910.075 34.000848 1032.000 +CPAR2_502570-T 612 401.167 79.846013 509.000 +CPAR2_502580-T 1212 1001.075 1397.987846 22238.711 +CPAR2_502590-T 2166 1955.075 33.092019 1028.078 +CPAR2_502600-T 2370 2159.075 14.334956 491.817 +CPAR2_502610-T 1047 836.075 87.010762 1156.000 +CPAR2_502620-T 351 140.276 22.446941 50.036 +CPAR2_502630-T 3333 3122.075 20.761467 1030.009 +CPAR2_502640-T 1554 1343.075 52.984232 1130.802 +CPAR2_502650-T 1479 1268.075 31.661842 638.000 +CPAR2_502660-T 522 311.173 52.379189 259.000 +CPAR2_502670-T 1602 1391.075 42.886266 948.000 +CPAR2_502680-T 744 533.131 30.572183 259.000 +CPAR2_502690-T 1746 1535.075 23.080183 563.000 +CPAR2_502700-T 1860 1649.075 86.746024 2273.157 +CPAR2_502710-T 1131 920.075 33.446141 489.000 +CPAR2_502720-T 1410 1199.075 18.158927 346.000 +CPAR2_502730-T 702 491.139 1.409446 11.000 +CPAR2_502740-T 2325 2114.075 22.712905 763.014 +CPAR2_502750-T 1587 1376.075 71.341615 1560.000 +CPAR2_502760-T 723 512.135 24.579107 200.028 +CPAR2_502770-T 1062 851.075 104.406329 1411.999 +CPAR2_502780-T 1302 1091.075 53.178580 922.000 +CPAR2_502790-T 789 578.119 38.860790 357.000 +CPAR2_502800-T 822 611.114 191.636528 1860.974 +CPAR2_502810-T 798 587.119 477.355709 4453.562 +CPAR2_502820-T 1569 1358.075 43.650354 942.000 +CPAR2_502830-T 960 749.090 28.563097 340.000 +CPAR2_502840-T 3879 3668.075 28.754779 1676.053 +CPAR2_502850-T 306 95.342 363.687839 551.000 +CPAR2_502860-T 534 323.170 42.840209 220.000 +CPAR2_502870-T 2361 2150.075 264.715900 9044.262 +CPAR2_502880-T 1284 1073.075 31.961477 545.000 +CPAR2_502890-T 807 596.118 94.799246 898.000 +CPAR2_502900-T 4425 4214.075 23.769278 1591.687 +CPAR2_502910-T 1203 992.075 47.693580 751.872 +CPAR2_502920-T 1176 965.075 95.203341 1460.000 +CPAR2_502930-T 1104 893.075 22.337354 317.000 +CPAR2_502940-T 3090 2879.075 31.191285 1427.006 +CPAR2_502950-T 2697 2486.075 217.079143 8575.744 +CPAR2_502960-T 2457 2246.075 14.233115 508.000 +CPAR2_502970-T 1119 908.075 43.687223 630.399 +CPAR2_502980-T 1398 1187.075 47.923740 904.000 +CPAR2_502990-T 744 533.131 86.929822 736.448 +CPAR2_503000-T 1245 1034.075 24.829532 408.000 +CPAR2_503010-T 312 101.339 148.415932 239.000 +CPAR2_503020-T 2364 2153.075 61.086789 2089.998 +CPAR2_503030-T 3255 3044.075 31.784033 1537.460 +CPAR2_503040-T 2712 2501.075 718.640500 28561.296 +CPAR2_503050-T 2262 2051.075 29.638489 966.000 +CPAR2_503060-T 423 212.227 20.460202 69.000 +CPAR2_503070-T 2511 2300.075 36.332466 1327.934 +CPAR2_503080-T 1938 1727.075 117.170793 3215.660 +CPAR2_503090-T 885 674.099 64.626476 692.267 +CPAR2_503100-T 2067 1856.075 18.376561 542.000 +CPAR2_503110-T 1602 1391.075 51.119706 1130.000 +CPAR2_503120-T 228 19.222 68.752057 21.000 +CPAR2_503130-T 2226 2015.075 33.125634 1060.706 +CPAR2_503140-T 2508 2297.075 64.106503 2340.005 +CPAR2_503150-T 2826 2615.075 38.100505 1583.268 +CPAR2_503160-T 1305 1094.075 256.312183 4456.110 +CPAR2_503170-T 1458 1247.075 85.176512 1687.921 +CPAR2_503180-T 3624 3413.075 67.905087 3682.881 +CPAR2_503190-T 1386 1175.075 238.004033 4444.158 +CPAR2_503200-T 2382 2171.075 74.087767 2556.000 +CPAR2_503210-T 312 101.339 1225.828660 1974.000 +CPAR2_503220-T 1875 1664.075 59.590413 1575.755 +CPAR2_503230-T 2274 2063.075 43.669479 1431.636 +CPAR2_503240-T 1038 827.075 41.696158 548.000 +CPAR2_503250-T 882 671.099 32.726464 349.000 +CPAR2_503260-T 4356 4145.075 26.731788 1760.759 +CPAR2_503270-T 1275 1064.075 0.177423 3.000 +CPAR2_503280-T 711 500.137 0.000000 0.000 +CPAR2_503290-T 2133 1922.075 8.643588 264.000 +CPAR2_503300-T 1071 860.075 43.755367 598.008 +CPAR2_503310-T 1413 1202.075 107.268158 2049.000 +CPAR2_503320-T 723 512.135 96.150156 782.481 +CPAR2_503330-T 1122 911.075 61.474683 890.000 +CPAR2_503340-T 1374 1163.075 76.788033 1419.191 +CPAR2_503350-T 2082 1871.075 191.608820 5697.000 +CPAR2_503360-T 720 509.136 52.778238 427.000 +CPAR2_503370-T 1494 1283.075 25.504202 520.000 +CPAR2_503380-T 621 410.166 172.094683 1121.674 +CPAR2_503390-T 966 755.088 27.336135 328.000 +CPAR2_503400-T 1008 797.075 31.757946 402.246 +CPAR2_503410-T 1545 1334.075 87.916197 1863.754 +CPAR2_503420-T 912 701.099 420.017766 4679.360 +CPAR2_503430-T 1452 1241.075 46.294904 913.000 +CPAR2_503440-T 639 428.160 302.923165 2061.000 +CPAR2_503450-T 1164 953.075 111.933411 1695.221 +CPAR2_503460-T 615 404.167 98.716469 634.001 +CPAR2_503470-T 1059 848.075 18.847764 254.000 +CPAR2_503480-T 2667 2456.075 58.521435 2284.000 +CPAR2_503490-T 1452 1241.075 55.269929 1090.000 +CPAR2_503495-T 297 86.344 48.831625 67.000 +CPAR2_503500-T 873 662.100 41.155226 433.000 +CPAR2_503510-T 672 461.143 68.374587 501.037 +CPAR2_503520-T 1113 902.075 178.233016 2554.879 +CPAR2_503530-T 1764 1553.075 522.790881 12902.087 +CPAR2_503540-T 1818 1607.075 743.900982 18997.253 +CPAR2_503550-T 990 779.081 14.054876 174.000 +CPAR2_503560-T 966 755.088 86.258841 1035.000 +CPAR2_503570-T 876 665.100 0.662326 7.000 +CPAR2_503580-T 1854 1643.075 125.324125 3272.138 +CPAR2_503590-T 564 353.169 61.474833 345.000 +CPAR2_503600-T 1155 944.075 344.675508 5170.786 +CPAR2_503610-T 1083 872.075 175.781708 2435.943 +CPAR2_503620-T 2655 2444.075 72.017564 2797.000 +CPAR2_503630-T 474 263.181 2.152031 9.000 +CPAR2_503640-T 180 24.452 2.573607 1.000 +CPAR2_503650-T 1335 1124.075 177.889029 3177.489 +CPAR2_503660-T 1143 932.075 16.136429 239.000 +CPAR2_503670-T 543 332.169 11.746069 62.000 +CPAR2_503680-T 2250 2039.075 96.593231 3129.820 +CPAR2_503690-T 1206 995.075 323.955756 5122.490 +CPAR2_503700-T 450 239.191 12.365537 47.000 +CPAR2_503710-T 528 317.172 74.205787 374.000 +CPAR2_503720-T 723 512.135 84.048935 684.000 +CPAR2_503730-T 561 350.169 797.342190 4436.719 +CPAR2_503740-T 1761 1550.075 19.487179 480.000 +CPAR2_503750-T 1860 1649.075 40.946782 1073.000 +CPAR2_503760-T 1062 851.075 46.823250 633.241 +CPAR2_503770-T 7560 7349.075 28.434081 3320.560 +CPAR2_503780-T 3345 3134.075 43.415255 2162.177 +CPAR2_503790-T 678 467.143 122.148934 906.732 +CPAR2_503800-T 390 179.238 538.741917 1534.444 +CPAR2_503810-T 825 614.114 71.628985 699.000 +CPAR2_503820-T 378 167.240 99.535112 264.518 +CPAR2_503830-T 4284 4073.075 28.778814 1862.665 +CPAR2_503840-T 630 419.164 207.634219 1383.000 +CPAR2_503850-T 942 731.098 0.000000 0.000 +CPAR2_tR(CCU)1-T 73 73.000 0.000000 0.000 +CPAR2_503860-T 3759 3548.075 73.669833 4153.574 +CPAR2_503870-T 1521 1310.075 70.028463 1457.842 +CPAR2_503880-T 1551 1340.075 176.054357 3749.000 +CPAR2_503890-T 3516 3305.075 23.763629 1248.055 +CPAR2_503900-T 2274 2063.075 52.004007 1704.870 +CPAR2_503910-T 1311 1100.075 34.609354 605.000 +CPAR2_503920-T 3513 3302.075 15.703656 824.000 +CPAR2_503930-T 801 590.119 101.330008 950.204 +CPAR2_503940-T 936 725.098 23.259412 268.000 +CPAR2_503950-T 1566 1355.075 33.923412 730.470 +CPAR2_503960-T 594 383.168 34.654028 211.000 +CPAR2_503970-T 360 149.253 31.622779 75.000 +CPAR2_503980-T 2073 1862.075 111.937566 3312.170 +CPAR2_503990-T 765 554.123 2566.267011 22596.842 +CPAR2_504000-T 441 230.202 163.275589 597.268 +CPAR2_504010-T 2355 2144.075 43.797853 1492.218 +CPAR2_504020-T 1326 1115.075 53.444906 947.000 +CPAR2_504030-T 3606 3395.075 47.923221 2585.442 +CPAR2_504040-T 1506 1295.075 87.708939 1805.005 +CPAR2_504050-T 1383 1172.075 140.652052 2619.637 +CPAR2_504060-T 1281 1070.075 152.140554 2587.014 +CPAR2_504070-T 1410 1199.075 114.936561 2190.000 +CPAR2_504080-T 1986 1775.075 329.489194 9293.888 +CPAR2_504090-T 681 470.143 117.381718 876.940 +CPAR2_504100-T 1278 1067.075 47.828452 811.000 +CPAR2_504110-T 1845 1634.075 51.065994 1325.999 +CPAR2_504120-T 348 137.287 66.466046 145.000 +CPAR2_504130-T 1638 1427.075 43.347811 983.000 +CPAR2_504140-T 2061 1850.075 111.323355 3272.767 +CPAR2_504150-T 2460 2249.075 50.383334 1800.654 +CPAR2_504160-T 870 659.100 48.217018 505.000 +CPAR2_504170-T 408 197.235 529.985314 1661.064 +CPAR2_504180-T 1470 1259.075 23.091429 462.000 +CPAR2_504190-T 1815 1604.075 88.885079 2265.651 +CPAR2_504200-T 519 308.173 14.498551 71.000 +CPAR2_504210-T 924 713.098 2.823979 32.000 +CPAR2_504220-T 1545 1334.075 39.671278 841.000 +CPAR2_400010-T 1566 1355.075 60.554565 1303.916 +CPAR2_400020-T 4674 4463.075 40.143367 2847.000 +CPAR2_400030-T 1077 866.075 125.631885 1729.000 +CPAR2_400040-T 14541 14330.075 3.622305 824.846 +CPAR2_400050-T 1152 941.075 31.763604 475.000 +CPAR2_400060-T 2901 2690.075 35.113024 1500.970 +CPAR2_400070-T 747 536.129 99.655051 849.000 +CPAR2_400080-T 1623 1412.075 63.879093 1433.363 +CPAR2_400090-T 1101 890.075 13.151772 186.016 +CPAR2_400095-T 300 89.344 97.906638 139.000 +CPAR2_400100-T 1578 1367.075 55.423583 1204.000 +CPAR2_400110-T 1479 1268.075 27.350992 551.134 +CPAR2_400120-T 2532 2321.075 0.921829 34.000 +CPAR2_400130-T 2256 2045.075 123.647178 4018.213 +CPAR2_400140-T 675 464.143 42.028803 309.983 +CPAR2_400150-T 1173 962.075 149.111623 2279.607 +CPAR2_400160-T 1389 1178.075 30.074325 563.000 +CPAR2_400170-T 1284 1073.075 45.076969 768.642 +CPAR2_400180-T 2355 2144.075 56.911371 1939.003 +CPAR2_400190-T 2544 2333.075 179.957705 6671.733 +CPAR2_400200-T 1896 1685.075 80.705010 2161.022 +CPAR2_400210-T 1197 986.075 71.860270 1126.000 +CPAR2_400220-T 1413 1202.075 24.657541 471.000 +CPAR2_400230-T 1374 1163.075 35.926986 664.000 +CPAR2_400240-T 1053 842.075 113.716612 1521.648 +CPAR2_400250-T 786 575.119 1683.523681 15385.668 +CPAR2_400260-T 939 728.098 10.512111 121.624 +CPAR2_400270-T 414 203.233 328.226642 1060.006 +CPAR2_400280-T 969 758.086 66.575822 802.000 +CPAR2_400290-T 1026 815.075 67.634286 876.000 +CPAR2_400300-T 1602 1391.075 79.167686 1750.000 +CPAR2_400310-T 1629 1418.075 40.271172 907.472 +CPAR2_400320-T 1221 1010.075 36.509375 586.000 +CPAR2_400330-T 2043 1832.075 14.254938 415.000 +CPAR2_400340-T 2277 2066.075 55.801245 1832.017 +CPAR2_400350-T 708 497.138 35.950239 284.000 +CPAR2_400370-T 435 224.209 28.173311 100.376 +CPAR2_400380-T 2379 2168.075 61.840829 2130.537 +CPAR2_400390-T 1626 1415.075 15.031340 338.000 +CPAR2_400400-T 1209 998.075 420.982535 6676.777 +CPAR2_400410-T 2256 2045.075 150.613555 4894.551 +CPAR2_400420-T 717 506.136 28.099697 226.000 +CPAR2_400430-T 669 458.143 104.805738 763.002 +CPAR2_400440-T 1518 1307.075 99.710302 2071.000 +CPAR2_400450-T 1227 1016.075 116.810689 1886.027 +CPAR2_400460-T 999 788.075 48.179676 603.352 +CPAR2_400470-T 999 788.075 581.098961 7277.082 +CPAR2_400480-T 1758 1547.075 20.989340 516.000 +CPAR2_400490-T 279 68.363 172.362183 187.242 +CPAR2_400500-T 855 644.107 87.443145 895.000 +CPAR2_400510-T 1770 1559.075 0.645823 16.000 +CPAR2_400520-T 879 668.100 91.501007 971.419 +CPAR2_400570-T 1443 1232.075 92.656274 1814.060 +CPAR2_400580-T 1779 1568.075 67.823522 1690.000 +CPAR2_400590-T 3567 3356.075 26.007902 1387.000 +CPAR2_400600-T 276 65.367 106.862608 111.000 +CPAR2_400610-T 825 614.114 146.332176 1428.000 +CPAR2_400620-T 960 749.090 177.763273 2116.000 +CPAR2_400630-T 753 542.127 112.945761 972.994 +CPAR2_400640-T 1773 1562.075 26.105594 648.000 +CPAR2_400650-T 726 515.135 48.254382 395.000 +CPAR2_400660-T 1194 983.075 68.686830 1073.000 +CPAR2_400670-T 519 308.173 41.139342 201.461 +CPAR2_400680-T 1380 1169.075 7.374603 137.000 +CPAR2_400690-T 1818 1607.075 85.818577 2191.578 +CPAR2_400700-T 1089 878.075 96.323107 1344.008 +CPAR2_400710-T 1266 1055.075 33.401434 560.000 +CPAR2_400720-T 1323 1112.075 42.724137 755.000 +CPAR2_400730-T 558 347.169 41.691465 230.000 +CPAR2_400740-T 648 437.154 61.610363 427.984 +CPAR2_400750-T 1287 1076.075 71.236926 1218.112 +CPAR2_400760-T 753 542.127 92.516285 797.000 +CPAR2_400770-T 1755 1544.075 33.820791 829.835 +CPAR2_400790-T 1767 1556.075 15.650957 387.000 +CPAR2_400800-T 207 8.931 4098.849101 581.675 +CPAR2_400810-T 1245 1034.075 49.050497 806.000 +CPAR2_400820-T 5244 5033.075 20.155434 1612.000 +CPAR2_400830-T 5517 5306.075 18.489832 1558.999 +CPAR2_400840-T 324 113.334 63.855297 115.000 +CPAR2_400850-T 1875 1664.075 207.589143 5489.301 +CPAR2_400860-T 1473 1262.075 385.730597 7735.864 +CPAR2_400870-T 1272 1061.075 211.883405 3572.585 +CPAR2_400880-T 1113 902.075 28.672104 411.000 +CPAR2_400890-T 1101 890.075 19.513846 276.000 +CPAR2_400900-T 378 167.240 2073.705448 5510.945 +CPAR2_400910-T 891 680.099 98.915846 1069.000 +CPAR2_400920-T 3501 3290.075 7.803957 408.000 +CPAR2_400930-T 936 725.098 2.169721 25.000 +CPAR2_400940-T 1707 1496.075 79.189261 1882.605 +CPAR2_400950-T 3990 3779.075 29.391362 1765.000 +CPAR2_400960-T 663 452.143 104.526020 751.000 +CPAR2_400970-T 906 695.099 824.906218 9111.518 +CPAR2_400980-T 519 308.173 439.857637 2154.001 +CPAR2_400990-T 804 593.118 46.803120 441.119 +CPAR2_401000-T 1089 878.075 24.653990 344.000 +CPAR2_401010-T 2367 2156.075 72.005710 2467.007 +CPAR2_401020-T 1107 896.075 19.330126 275.245 +CPAR2_401030-T 921 710.098 71.252309 804.001 +CPAR2_401040-T 1299 1088.075 73.625794 1273.000 +CPAR2_401050-T 1659 1448.075 80.136000 1843.989 +CPAR2_401060-T 1257 1046.075 73.379973 1219.776 +CPAR2_401070-T 2451 2240.075 38.459300 1369.000 +CPAR2_401080-T 789 578.119 131.713040 1210.000 +CPAR2_401090-T 1785 1574.075 52.053074 1302.001 +CPAR2_401100-T 2352 2141.075 91.222225 3103.645 +CPAR2_401110-T 996 785.076 139.876362 1745.000 +CPAR2_401120-T 1086 875.075 53.432307 743.000 +CPAR2_401130-T 1317 1106.075 19.344388 340.000 +CPAR2_401140-T 1152 941.075 30.024964 449.000 +CPAR2_401150-T 2253 2042.075 14.730473 478.000 +CPAR2_401160-T 3195 2984.075 73.870797 3502.854 +CPAR2_401170-T 696 485.141 79.256288 611.000 +CPAR2_401180-T 2295 2084.075 485.055626 16063.657 +CPAR2_401190-T 609 398.167 117.300123 742.170 +CPAR2_401200-T 993 782.079 82.106463 1020.393 +CPAR2_401210-T 780 569.119 28.417806 257.000 +CPAR2_401220-T 534 323.170 39.529829 203.000 +CPAR2_401230-T 1080 869.075 551.625197 7618.000 +CPAR2_401240-T 324 113.334 5.552634 10.000 +CPAR2_401250-T 2106 1895.075 38.155232 1149.000 +CPAR2_401260-T 2094 1883.075 207.156451 6198.771 +CPAR2_401270-T 3465 3254.075 19.010190 983.000 +CPAR2_401280-T 975 764.085 77.583596 942.000 +CPAR2_401290-T 3474 3263.075 6.094254 316.000 +CPAR2_401300-T 1911 1700.075 419.299744 11327.452 +CPAR2_401310-T 1677 1466.075 46.401280 1081.000 +CPAR2_401320-T 4128 3917.075 38.056690 2368.822 +CPAR2_401330-T 237 26.695 1454.486963 617.000 +CPAR2_401340-T 4155 3944.075 62.371996 3909.078 +CPAR2_401350-T 669 458.143 316.603746 2304.924 +CPAR2_401360-T 1287 1076.075 41.053998 702.001 +CPAR2_401370-T 234 23.994 339.321013 129.378 +CPAR2_401380-T 1458 1247.075 54.903086 1088.000 +CPAR2_401390-T 258 47.397 205.795948 155.000 +CPAR2_401400-T 684 473.142 59.719364 449.000 +CPAR2_401410-T 1023 812.075 23.945434 309.000 +CPAR2_401420-T 1491 1280.075 18.779689 382.000 +CPAR2_401430-T 159 32.623 395.785620 205.177 +CPAR2_401440-T 5733 5522.075 35.892881 3149.562 +CPAR2_401450-T 1926 1715.075 116.733977 3181.412 +CPAR2_401460-T 714 503.137 26.439709 211.389 +CPAR2_401470-T 4089 3878.075 87.126001 5369.124 +CPAR2_401480-T 3120 2909.075 56.399343 2607.165 +CPAR2_401490-T 714 503.137 82.876889 662.611 +CPAR2_401500-T 1032 821.075 451.704098 5893.543 +CPAR2_401510-T 2691 2480.075 57.549595 2268.018 +CPAR2_401520-T 2547 2336.075 62.578144 2322.999 +CPAR2_401530-T 219 13.796 187.023019 41.000 +CPAR2_401540-T 1746 1535.075 113.928150 2779.074 +CPAR2_401550-T 1743 1532.075 41.331745 1006.244 +CPAR2_401560-T 1131 920.075 365.319191 5341.157 +CPAR2_401570-T 2745 2534.075 52.498393 2114.000 +CPAR2_401580-T 1398 1187.075 8.959195 169.000 +CPAR2_401590-T 696 485.141 0.259431 2.000 +CPAR2_401600-T 927 716.098 409.119297 4655.451 +CPAR2_401610-T 1212 1001.075 47.084713 749.007 +CPAR2_401620-T 1386 1175.075 63.997461 1195.000 +CPAR2_401630-T 885 674.099 89.994020 964.000 +CPAR2_401640-T 1242 1031.075 133.011468 2179.310 +CPAR2_401650-T 2178 1967.075 82.006577 2563.357 +CPAR2_401660-T 3360 3149.075 56.214794 2813.022 +CPAR2_401670-T 855 644.107 135.709337 1389.015 +CPAR2_401680-T 2631 2420.075 122.278150 4702.374 +CPAR2_401690-T 642 431.159 219.623806 1504.721 +CPAR2_401700-T 834 623.110 13.634197 135.000 +CPAR2_401710-T 2784 2573.075 42.555657 1740.000 +CPAR2_401720-T 342 131.306 56.553398 118.000 +CPAR2_401730-T 777 566.119 43.908624 395.000 +CPAR2_401740-T 2136 1925.075 1.144144 35.000 +CPAR2_401750-T 2130 1919.075 30.572833 932.325 +CPAR2_401760-T 300 89.344 264.840977 376.000 +CPAR2_401770-T 840 629.109 47.624307 476.095 +CPAR2_401780-T 1122 911.075 50.008615 724.000 +CPAR2_401790-T 687 476.142 37.006860 280.000 +CPAR2_401800-T 321 110.336 2246.050090 3938.007 +CPAR2_401810-T 468 257.182 272.217490 1112.491 +CPAR2_401820-T 984 773.083 73.912916 908.000 +CPAR2_401830-T 4497 4286.075 89.372430 6086.993 +CPAR2_401840-T 621 410.166 0.613706 4.000 +CPAR2_401850-T 1902 1691.075 0.334919 9.000 +CPAR2_401860-T 1662 1451.075 22.161109 511.000 +CPAR2_401870-T 597 386.168 125.969012 773.000 +CPAR2_401880-T 3147 2936.075 15.610999 728.345 +CPAR2_401885-T 207 8.931 28.186508 4.000 +CPAR2_401890-T 1563 1352.075 146.470807 3146.961 +CPAR2_401900-T 651 440.149 2.001651 14.000 +CPAR2_401910-T 2064 1853.075 21.258950 626.000 +CPAR2_401920-T 1344 1133.075 16.328605 294.000 +CPAR2_401930-T 2904 2693.075 61.059249 2613.000 +CPAR2_401940-T 3894 3683.075 18.310357 1071.635 +CPAR2_401950-T 759 548.124 34.902433 304.000 +CPAR2_401960-T 651 440.149 499.643205 3494.617 +CPAR2_401970-T 1812 1601.075 48.330745 1229.631 +CPAR2_401980-T 1692 1481.075 112.585975 2649.726 +CPAR2_401990-T 1149 938.075 248.950951 3711.000 +CPAR2_402000-T 858 647.105 2182.516648 22442.523 +CPAR2_402010-T 822 611.114 1133.690582 11009.221 +CPAR2_402020-T 717 506.136 1.119014 9.000 +CPAR2_402030-T 537 326.170 130.039737 674.000 +CPAR2_402040-T 1548 1337.075 164.918270 3504.000 +CPAR2_402050-T 1566 1355.075 30.464984 656.000 +CPAR2_402060-T 2934 2723.075 35.589478 1540.000 +CPAR2_402070-T 1551 1340.075 2.676740 57.000 +CPAR2_402080-T 246 35.431 8047.858159 4531.065 +CPAR2_402090-T 3540 3329.075 1253.169502 66293.796 +CPAR2_402100-T 633 422.163 8.347734 56.000 +CPAR2_402110-T 636 425.161 24.718567 167.000 +CPAR2_402120-T 2697 2486.075 166.499587 6577.591 +CPAR2_402130-T 987 776.081 30.975588 382.003 +CPAR2_402140-T 2280 2069.075 16.613946 546.246 +CPAR2_402150-T 936 725.098 4.339442 50.000 +CPAR2_402160-T 1323 1112.075 25.521305 451.000 +CPAR2_402170-T 1035 824.075 13.898407 182.000 +CPAR2_402180-T 1305 1094.075 61.315536 1066.000 +CPAR2_402190-T 399 188.237 48.141404 144.000 +CPAR2_402200-T 819 608.115 69.334559 670.000 +CPAR2_402210-T 2334 2123.075 37.822085 1275.999 +CPAR2_402220-T 1506 1295.075 375.606850 7729.795 +CPAR2_402230-T 1398 1187.075 103.269356 1948.001 +CPAR2_402240-T 729 518.134 13.360155 110.000 +CPAR2_402250-T 1350 1139.075 15.911114 288.000 +CPAR2_402260-T 1341 1130.075 0.389808 7.000 +CPAR2_402270-T 1266 1055.075 41.871083 702.000 +CPAR2_402280-T 2484 2273.075 60.547278 2186.996 +CPAR2_402290-T 750 539.128 22.761646 195.000 +CPAR2_402300-T 1020 809.075 76.536163 984.000 +CPAR2_402310-T 2958 2747.075 60.648899 2647.482 +CPAR2_402320-T 1275 1064.075 43.527727 736.000 +CPAR2_402330-T 1047 836.075 59.612910 792.000 +CPAR2_402340-T 1200 989.075 42.466514 667.445 +CPAR2_402350-T 3294 3083.075 24.889193 1219.367 +CPAR2_402360-T 603 392.168 28.723768 179.000 +CPAR2_402370-T 744 533.131 2.360786 20.000 +CPAR2_402380-T 1185 974.075 20.867505 323.000 +CPAR2_402390-T 747 536.129 67.493115 575.000 +CPAR2_402400-T 2154 1943.075 28.532960 881.000 +CPAR2_402410-T 1389 1178.075 67.734003 1268.000 +CPAR2_402420-T 2913 2702.075 123.819366 5316.496 +CPAR2_402430-T 1626 1415.075 36.510720 820.993 +CPAR2_402440-T 1032 821.075 30.116643 392.943 +CPAR2_402450-T 510 299.173 61.842200 294.000 +CPAR2_402460-T 1980 1769.075 105.223392 2957.999 +CPAR2_402470-T 1224 1013.075 17.952158 289.000 +CPAR2_402480-T 3165 2954.075 48.016765 2254.000 +CPAR2_402490-T 3924 3713.075 33.032237 1948.997 +CPAR2_402500-T 1290 1079.075 49.396047 847.000 +CPAR2_402510-T 1503 1292.075 167.739699 3444.000 +CPAR2_402520-T 453 242.189 78.211793 301.000 +CPAR2_402530-T 1998 1787.075 67.893512 1928.016 +CPAR2_402540-T 480 269.180 44.185549 189.000 +CPAR2_402550-T 627 416.165 65.258267 431.560 +CPAR2_402560-T 2880 2669.075 14.240874 604.000 +CPAR2_402570-T 957 746.091 26.147503 310.000 +CPAR2_402580-T 1932 1721.075 27.057794 740.000 +CPAR2_402590-T 531 320.171 19.655259 100.000 +CPAR2_402600-T 504 293.175 10.517912 49.000 +CPAR2_402610-T 282 71.359 706.390640 801.000 +CPAR2_402620-T 1383 1172.075 21.971756 409.223 +CPAR2_402630-T 390 179.238 120.186905 342.316 +CPAR2_402640-T 525 314.172 26.640636 133.000 +CPAR2_402650-T 1119 908.075 171.381216 2473.002 +CPAR2_402660-T 3282 3071.075 61.637726 3007.991 +CPAR2_402670-T 1245 1034.075 48.624355 798.998 +CPAR2_402690-T 471 260.181 1255.301472 5189.958 +CPAR2_402700-T 1296 1085.075 382.974715 6603.428 +CPAR2_402710-T 1836 1625.075 289.539007 7476.873 +CPAR2_402720-T 2547 2336.075 51.910525 1927.000 +CPAR2_402730-T 1395 1184.075 0.106295 2.000 +CPAR2_402740-T 4071 3860.075 43.914890 2693.686 +CPAR2_402750-T 1023 812.075 113.264888 1461.609 +CPAR2_402760-T 978 767.084 41.871746 510.392 +CPAR2_402770-T 285 74.353 4280.828086 5057.866 +CPAR2_402780-T 1194 983.075 45.426391 709.634 +CPAR2_402790-T 1512 1301.075 33.228814 687.000 +CPAR2_402800-T 1383 1172.075 129.259651 2407.454 +CPAR2_402810-T 2277 2066.075 13.467370 442.149 +CPAR2_402820-T 996 785.076 52.744210 658.000 +CPAR2_402830-T 582 371.168 58.324136 344.000 +CPAR2_402840-T 2928 2717.075 73.136919 3157.750 +CPAR2_402850-T 582 371.168 191.079366 1127.000 +CPAR2_402860-T 2970 2759.075 125.031411 5481.787 +CPAR2_402870-T 1509 1298.075 77.810049 1605.000 +CPAR2_402880-T 1998 1787.075 85.711336 2434.000 +CPAR2_402890-T 657 446.145 2.821075 20.000 +CPAR2_402900-T 711 500.137 91.727462 729.000 +CPAR2_402910-T 699 488.140 310.639747 2409.578 +CPAR2_402920-T 960 749.090 3.780410 45.000 +CPAR2_402930-T 2841 2630.075 22.348030 934.000 +CPAR2_402940-T 1620 1409.075 85.123454 1906.000 +CPAR2_402950-T 1167 956.075 200.838426 3051.254 +CPAR2_402960-T 1653 1442.075 25.746880 590.000 +CPAR2_402970-T 1188 977.075 28.403450 441.000 +CPAR2_402980-T 1542 1331.075 100.039976 2116.000 +CPAR2_402990-T 3867 3656.075 67.667134 3931.265 +CPAR2_403000-T 1473 1262.075 1.645467 33.000 +CPAR2_403010-T 4863 4652.075 25.242230 1866.010 +CPAR2_403020-T 1935 1724.075 42.304615 1159.000 +CPAR2_403030-T 1368 1157.075 24.855077 457.000 +CPAR2_403040-T 1143 932.075 43.683137 647.000 +CPAR2_403050-T 225 17.197 124.416818 34.000 +CPAR2_403060-T 4338 4127.075 44.592196 2924.426 +CPAR2_403070-T 369 158.243 116.520732 293.000 +CPAR2_403080-T 2250 2039.075 32.312753 1047.000 +CPAR2_403090-T 1272 1061.075 6.583204 111.000 +CPAR2_403100-T 2439 2228.075 125.015135 4426.209 +CPAR2_403110-T 2280 2069.075 30.323506 997.000 +CPAR2_403120-T 4638 4427.075 8.472077 596.000 +CPAR2_403130-T 690 479.142 35.855775 273.000 +CPAR2_403140-T 3981 3770.075 98.161683 5880.733 +CPAR2_403150-T 696 485.141 358.534176 2764.000 +CPAR2_403160-T 540 329.170 438.581043 2294.086 +CPAR2_403170-T 2466 2255.075 73.281469 2626.000 +CPAR2_403180-T 774 563.119 12939.956633 115790.414 +CPAR2_403190-T 2184 1973.075 161.928781 5077.000 +CPAR2_403200-T 1854 1643.075 7.966479 208.000 +CPAR2_403210-T 525 314.172 36.255302 181.000 +CPAR2_403220-T 2169 1958.075 11.152202 347.000 +CPAR2_403240-T 750 539.128 22.878372 196.000 +CPAR2_403250-T 4005 3794.075 18.079279 1090.000 +CPAR2_403260-T 1314 1103.075 133.634452 2342.411 +CPAR2_403270-T 915 704.098 40.398562 452.000 +CPAR2_403280-T 639 428.160 33.805108 230.000 +CPAR2_403290-T 735 524.133 180.458703 1503.000 +CPAR2_403300-T 312 101.339 31.670345 51.000 +CPAR2_403310-T 1668 1457.075 60.076667 1391.001 +CPAR2_403320-T 2112 1901.075 20.655980 624.000 +CPAR2_403330-T 2412 2201.075 40.999145 1434.000 +CPAR2_403340-T 963 752.090 149.805649 1790.348 +CPAR2_403350-T 3735 3524.075 33.601537 1881.671 +CPAR2_403360-T 474 263.181 37.301877 156.000 +CPAR2_403370-T 2175 1964.075 43.320147 1352.034 +CPAR2_403380-T 1371 1160.075 3.688784 68.000 +CPAR2_403390-T 888 677.099 46.842349 504.000 +CPAR2_403400-T 891 680.099 144.626256 1563.000 +CPAR2_403410-T 1383 1172.075 18.094014 337.000 +CPAR2_403420-T 1509 1298.075 133.130851 2746.111 +CPAR2_403430-T 1080 869.075 112.091983 1548.002 +CPAR2_403440-T 705 494.139 37.567184 294.983 +CPAR2_403450-T 246 35.431 198.928966 112.000 +CPAR2_403460-T 924 713.098 88.671020 1004.778 +CPAR2_403470-T 357 146.259 2002.464457 4654.000 +CPAR2_403480-T 2394 2183.075 50.413920 1748.874 +CPAR2_403490-T 1935 1724.075 68.001293 1863.000 +CPAR2_403500-T 1770 1559.075 4.440032 110.000 +CPAR2_403510-T 2439 2228.075 28.611467 1013.000 +CPAR2_403520-T 3705 3494.075 20.291584 1126.646 +CPAR2_403530-T 2304 2093.075 36.049137 1199.000 +CPAR2_403540-T 2985 2774.075 74.502829 3284.207 +CPAR2_403550-T 1677 1466.075 86.063466 2005.001 +CPAR2_403560-T 969 758.086 56.448328 680.000 +CPAR2_403570-T 2553 2342.075 63.707516 2370.997 +CPAR2_403580-T 1362 1151.075 71.965940 1316.346 +CPAR2_403590-T 1437 1226.075 188.353155 3669.691 +CPAR2_403600-T 4563 4352.075 84.845334 5867.645 +CPAR2_tD(GUC)5-T 72 72.000 0.000000 0.000 +CPAR2_403610-T 2553 2342.075 1.370345 51.000 +CPAR2_403620-T 1932 1721.075 14.954916 409.000 +CPAR2_403630-T 426 215.224 48.830026 167.000 +CPAR2_403640-T 1767 1556.075 111.255252 2751.000 +CPAR2_403650-T 1434 1223.075 50.732266 986.000 +CPAR2_403660-T 1035 824.075 77.586711 1016.000 +CPAR2_403670-T 1722 1511.075 3.165104 76.000 +CPAR2_403680-T 738 527.132 70.793930 593.000 +CPAR2_403690-T 1047 836.075 34.623660 460.000 +CPAR2_403700-T 1311 1100.075 47.881041 837.000 +CPAR2_403710-T 1725 1514.075 18.204853 438.000 +CPAR2_403720-T 1188 977.075 50.495022 784.000 +CPAR2_403730-T 405 194.236 56.374119 174.000 +CPAR2_403740-T 1341 1130.075 58.333248 1047.522 +CPAR2_403750-T 1281 1070.075 24.641107 419.000 +CPAR2_403760-T 2238 2027.075 36.253303 1167.769 +CPAR2_403770-T 969 758.086 9.214359 111.000 +CPAR2_403780-T 1500 1289.075 63.561368 1302.000 +CPAR2_403790-T 1389 1178.075 65.663556 1229.241 +CPAR2_403800-T 903 692.099 108.839469 1197.000 +CPAR2_403810-T 4119 3908.075 53.546680 3325.331 +CPAR2_403820-T 1722 1511.075 339.527901 8152.692 +CPAR2_403830-T 969 758.086 0.664098 8.000 +CPAR2_403840-T 5262 5051.075 50.791243 4076.732 +CPAR2_403850-T 2229 2018.075 8.481879 272.000 +CPAR2_403860-T 420 209.228 64.666380 215.000 +CPAR2_403870-T 300 89.344 11.974193 17.000 +CPAR2_403880-T 363 152.249 33.067127 80.000 +CPAR2_403890-T 1575 1364.075 26.296446 570.000 +CPAR2_403900-T 2604 2393.075 410.898109 15625.357 +CPAR2_403910-T 2412 2201.075 293.704086 10272.694 +CPAR2_403920-T 1290 1079.075 294.105471 5043.062 +CPAR2_403930-T 669 458.143 30.461853 221.767 +CPAR2_403940-T 606 395.168 37.403760 234.875 +CPAR2_403950-T 1317 1106.075 64.950053 1141.573 +CPAR2_403960-T 2529 2318.075 242.296490 8925.121 +CPAR2_403970-T 843 632.108 111.104935 1116.000 +CPAR2_403980-T 375 164.240 573.332425 1496.326 +CPAR2_403990-T 1890 1679.075 66.525687 1775.003 +CPAR2_404000-T 855 644.107 83.632774 856.000 +CPAR2_404010-T 372 161.241 30.052105 77.000 +CPAR2_404020-T 1782 1571.075 75.871733 1894.159 +CPAR2_404030-T 1713 1502.075 40.907258 976.408 +CPAR2_404040-T 1083 872.075 140.137954 1942.000 +CPAR2_404050-T 2727 2516.075 59.894552 2394.696 +CPAR2_404060-T 810 599.118 362.726051 3453.268 +CPAR2_404070-T 807 596.118 10.762816 101.952 +CPAR2_404080-T 483 272.179 202.308523 875.000 +CPAR2_404090-T 1494 1283.075 49.707631 1013.479 +CPAR2_404100-T 1632 1421.075 104.826574 2367.162 +CPAR2_404110-T 1233 1022.075 7.881114 128.000 +CPAR2_404120-T 1263 1052.075 35.231327 589.000 +CPAR2_404130-T 1866 1655.075 68.060607 1790.000 +CPAR2_404140-T 2589 2378.075 25.945564 980.456 +CPAR2_404160-T 1848 1637.075 47.128363 1226.000 +CPAR2_404170-T 537 326.170 42.060330 218.000 +CPAR2_404180-T 3006 2795.075 29.231614 1298.332 +CPAR2_404190-T 1689 1478.075 124.181713 2916.713 +CPAR2_404200-T 333 122.324 271.066173 526.899 +CPAR2_404210-T 798 587.119 193.040449 1801.000 +CPAR2_404220-T 3039 2828.075 68.563022 3081.203 +CPAR2_404230-T 3543 3332.075 6.610188 350.000 +CPAR2_404240-T 615 404.167 1529.832034 9825.256 +CPAR2_404250-T 1719 1508.075 54.706661 1311.000 +CPAR2_404260-T 1995 1784.075 34.731501 984.637 +CPAR2_404270-T 2595 2384.075 14.227524 539.000 +CPAR2_404280-T 1920 1709.075 92.031780 2499.416 +CPAR2_404290-T 1053 842.075 90.508947 1211.105 +CPAR2_404300-T 831 620.112 230.263436 2269.000 +CPAR2_404310-T 1029 818.075 179.366202 2331.704 +CPAR2_404320-T 1353 1142.075 54.052771 980.962 +CPAR2_404330-T 882 671.099 39.009194 416.000 +CPAR2_404340-T 3522 3311.075 80.054929 4212.080 +CPAR2_404350-T 333 122.324 206.812664 402.003 +CPAR2_404360-T 1206 995.075 79.119989 1251.070 +CPAR2_404370-T 1074 863.075 38.425760 527.000 +CPAR2_404380-T 1542 1331.075 51.911103 1098.000 +CPAR2_404390-T 855 644.107 196.380695 2010.000 +CPAR2_404400-T 675 464.143 151.176287 1115.000 +CPAR2_404410-T 1938 1727.075 19.748586 541.984 +CPAR2_404420-T 408 197.235 224.170556 702.589 +CPAR2_404430-T 384 173.239 8.718197 24.000 +CPAR2_404440-T 2352 2141.075 46.519751 1582.737 +CPAR2_404450-T 1029 818.075 6.617909 86.031 +CPAR2_404460-T 3093 2882.075 28.263331 1294.399 +CPAR2_404470-T 213 11.052 2721.787444 478.000 +CPAR2_404480-T 654 443.147 53.395055 376.000 +CPAR2_404490-T 1971 1760.075 40.831506 1142.000 +CPAR2_404500-T 669 458.143 12.087655 88.000 +CPAR2_404510-T 1476 1265.075 27.807117 559.000 +CPAR2_404520-T 465 254.184 44.564068 180.000 +CPAR2_404530-T 759 548.124 28.700549 249.982 +CPAR2_404540-T 912 701.099 22.260395 248.000 +CPAR2_404550-T 1083 872.075 251.194758 3481.000 +CPAR2_404560-T 3288 3077.075 36.301183 1775.000 +CPAR2_404570-T 2817 2606.075 5.942042 246.072 +CPAR2_404580-T 1050 839.075 40.424845 539.000 +CPAR2_404590-T 4164 3953.075 18.386856 1155.000 +CPAR2_404600-T 3189 2978.075 19.190048 908.137 +CPAR2_404610-T 1023 812.075 35.414444 457.000 +CPAR2_404620-T 1083 872.075 24.607128 341.000 +CPAR2_404630-T 1257 1046.075 39.704664 660.000 +CPAR2_404640-T 1101 890.075 17.816990 252.000 +CPAR2_404650-T 3399 3188.075 74.685909 3783.613 +CPAR2_404660-T 2283 2072.075 239.366878 7881.503 +CPAR2_404670-T 2508 2297.075 16.163571 590.000 +CPAR2_404680-T 522 311.173 29.728729 147.000 +CPAR2_404690-T 705 494.139 46.484068 365.000 +CPAR2_404700-T 624 413.166 226.370913 1486.226 +CPAR2_404710-T 1560 1349.075 132.570967 2842.000 +CPAR2_404720-T 1470 1259.075 6.064619 121.337 +CPAR2_404730-T 489 278.177 462.588043 2044.823 +CPAR2_404740-T 2541 2330.075 73.433864 2718.979 +CPAR2_404750-T 2106 1895.075 65.962457 1986.382 +CPAR2_404760-T 843 632.108 22.636284 227.371 +CPAR2_404770-T 3003 2792.075 25.414338 1127.575 +CPAR2_404780-T 3462 3251.075 36.323656 1876.532 +CPAR2_404790-T 7179 6968.075 94.118870 10421.470 +CPAR2_404800-T 4152 3941.075 27.062137 1694.792 +CPAR2_404810-T 651 440.149 67.913166 475.000 +CPAR2_404820-T 783 572.119 87.006298 791.000 +CPAR2_404830-T 555 344.169 63.082296 345.000 +CPAR2_404840-T 591 380.168 720.672846 4353.648 +CPAR2_404850-T 1113 902.075 233.735119 3350.474 +CPAR2_404860-T 993 782.079 57.079960 709.372 +CPAR2_404870-T 786 575.119 114.236099 1044.000 +CPAR2_404880-T 1179 968.075 92.762730 1426.994 +CPAR2_404890-T 498 287.177 1097.843371 5009.897 +CPAR2_404900-T 1413 1202.075 40.043228 764.892 +CPAR2_404910-T 1227 1016.075 0.247739 4.000 +CPAR2_404920-T 1272 1061.075 50.056073 844.000 +CPAR2_404930-T 1089 878.075 51.744712 722.000 +CPAR2_404940-T 1944 1733.075 262.819167 7237.922 +CPAR2_404950-T 1818 1607.075 61.182115 1562.429 +CPAR2_404960-T 1716 1505.075 101.379627 2424.646 +CPAR2_404970-T 1011 800.075 0.157311 2.000 +CPAR2_404980-T 2499 2288.075 38.010035 1382.000 +CPAR2_404990-T 2238 2027.075 48.710466 1569.031 +CPAR2_405000-T 1215 1004.075 38.169067 609.000 +CPAR2_405010-T 1131 920.075 102.084728 1492.532 +CPAR2_405020-T 3945 3734.075 4.836814 287.000 +CPAR2_405030-T 1503 1292.075 235.249390 4830.096 +CPAR2_405040-T 1962 1751.075 14.303384 398.000 +CPAR2_405050-T 2346 2135.075 16.683324 566.024 +CPAR2_405060-T 183 21.081 146.197786 48.976 +CPAR2_405070-T 447 236.194 691.793442 2596.474 +CPAR2_405080-T 1149 938.075 44.410005 662.000 +CPAR2_405090-T 2520 2309.075 99.748038 3660.007 +CPAR2_405100-T 1488 1277.075 48.636378 987.000 +CPAR2_405110-T 489 278.177 79.947853 353.401 +CPAR2_405120-T 1617 1406.075 56.303138 1258.000 +CPAR2_405130-T 216 12.347 1492.501792 292.835 +CPAR2_405140-T 2148 1937.075 221.778353 6826.610 +CPAR2_405150-T 1014 803.075 253.108533 3230.000 +CPAR2_405160-T 1101 890.075 188.180562 2661.589 +CPAR2_405170-T 1059 848.075 31.536613 425.000 +CPAR2_405180-T 714 503.137 30.393516 243.000 +CPAR2_405190-T 1602 1391.075 939.465526 20766.865 +CPAR2_405200-T 993 782.079 57.693778 717.000 +CPAR2_405210-T 1056 845.075 99.786071 1340.000 +CPAR2_405220-T 1125 914.075 16.454188 239.000 +CPAR2_405230-T 546 335.169 491.085823 2615.539 +CPAR2_405240-T 954 743.094 125.929636 1487.000 +CPAR2_405250-T 687 476.142 88.811434 671.962 +CPAR2_405260-T 3123 2912.075 62.470869 2890.810 +CPAR2_405270-T 3063 2852.075 75.902909 3440.003 +CPAR2_405280-T 4518 4307.075 134.703303 9219.347 +CPAR2_405290-T 4515 4304.075 26.441188 1808.424 +CPAR2_405300-T 12387 12176.075 3.736815 723.017 +CPAR2_405310-T 441 230.202 281.843495 1030.994 +CPAR2_405320-T 1698 1487.075 24.378362 576.072 +CPAR2_405330-T 561 350.169 232.673023 1294.682 +CPAR2_405340-T 999 788.075 47.432855 594.000 +CPAR2_405350-T 573 362.169 108.773756 626.000 +CPAR2_405360-T 1065 854.075 15.325961 208.000 +CPAR2_405370-T 1317 1106.075 35.673275 626.999 +CPAR2_405380-T 1542 1331.075 106.990162 2263.007 +CPAR2_405390-T 2745 2534.075 86.893179 3499.006 +CPAR2_405400-T 1647 1436.075 372.376074 8497.642 +CPAR2_405410-T 555 344.169 109.570295 599.245 +CPAR2_405420-T 1257 1046.075 143.084843 2378.461 +CPAR2_405430-T 2223 2012.075 37.285113 1192.118 +CPAR2_405440-T 1314 1103.075 7.017146 123.000 +CPAR2_405450-T 1314 1103.075 47.465570 832.000 +CPAR2_405460-T 1410 1199.075 109.898250 2094.000 +CPAR2_405470-T 1008 797.075 306.517331 3882.343 +CPAR2_405480-T 2883 2672.075 48.138521 2044.000 +CPAR2_405490-T 3981 3770.075 35.566706 2130.753 +CPAR2_405500-T 2427 2216.075 82.858280 2917.829 +CPAR2_405510-T 516 305.173 2012.126352 9757.544 +CPAR2_405520-T 711 500.137 60.900427 484.003 +CPAR2_405530-T 2286 2075.075 54.912983 1810.708 +CPAR2_405540-T 1077 866.075 143.724620 1978.000 +CPAR2_405550-T 456 245.187 26.692923 104.000 +CPAR2_405560-T 546 335.169 332.356401 1770.141 +CPAR2_405570-T 363 152.249 489.398035 1184.011 +CPAR2_405580-T 3285 3074.075 45.723374 2233.532 +CPAR2_405590-T 1458 1247.075 117.222274 2322.963 +CPAR2_405600-T 606 395.168 86.797733 545.041 +CPAR2_405610-T 2586 2375.075 19.289214 728.000 +CPAR2_405620-T 1761 1550.075 34.873931 859.000 +CPAR2_405630-T 921 710.098 63.187741 713.002 +CPAR2_405640-T 855 644.107 416.992604 4268.012 +CPAR2_405650-T 1512 1301.075 0.241840 5.000 +CPAR2_405660-T 1371 1160.075 35.585619 655.994 +CPAR2_405670-T 1539 1328.075 15.447905 326.011 +CPAR2_405680-T 786 575.119 383.921931 3508.650 +CPAR2_405690-T 1839 1628.075 79.893487 2066.928 +CPAR2_405695-T 294 83.345 448.813125 594.408 +CPAR2_405700-T 2307 2096.075 231.583541 7713.545 +CPAR2_405710-T 1674 1463.075 86.348335 2007.521 +CPAR2_405720-T 1698 1487.075 45.153560 1067.000 +CPAR2_405730-T 1191 980.075 78.207531 1218.001 +CPAR2_405740-T 1353 1142.075 0.358162 6.500 +CPAR2_405750-T 873 662.100 589.072891 6197.720 +CPAR2_405760-T 2055 1844.075 75.554356 2214.000 +CPAR2_405770-T 2127 1916.075 30.215918 920.000 +CPAR2_405780-T 1737 1526.075 142.412271 3453.527 +CPAR2_tV(AAC)3-T 74 74.000 0.000000 0.000 +CPAR2_405790-T 1677 1466.075 37.902248 883.000 +CPAR2_405800-T 5097 4886.075 22.667992 1760.000 +CPAR2_405810-T 2034 1823.075 468.468060 13571.381 +CPAR2_405820-T 855 644.107 25.988689 266.000 +CPAR2_405830-T 3903 3692.075 176.329094 10345.083 +CPAR2_405840-T 807 596.118 209.311608 1982.735 +CPAR2_405850-T 2094 1883.075 90.130677 2696.993 +CPAR2_405860-T 642 431.159 43.640997 299.000 +CPAR2_405870-T 2049 1838.075 31.635100 924.000 +CPAR2_405880-T 1278 1067.075 0.530772 9.000 +CPAR2_405890-T 2094 1883.075 40.224192 1203.634 +CPAR2_405900-T 1326 1115.075 27.822956 493.000 +CPAR2_405910-T 849 638.108 51.972923 527.000 +CPAR2_405920-T 243 32.464 122.122877 63.000 +CPAR2_405930-T 1146 935.075 45.096255 670.080 +CPAR2_405940-T 1932 1721.075 100.840998 2757.887 +CPAR2_405950-T 885 674.099 49.758104 533.000 +CPAR2_405960-T 1242 1031.075 8.910930 146.000 +CPAR2_405970-T 2256 2045.075 132.185594 4295.690 +CPAR2_405980-T 1437 1226.075 30.782797 599.742 +CPAR2_405990-T 1965 1754.075 63.088685 1758.487 +CPAR2_406000-T 483 272.179 64.969937 281.000 +CPAR2_406010-T 855 644.107 40.643965 416.000 +CPAR2_406020-T 645 434.156 92.332332 637.000 +CPAR2_406030-T 522 311.173 25.886240 128.000 +CPAR2_406040-T 1311 1100.075 149.764041 2617.999 +CPAR2_406050-T 1308 1097.075 103.691883 1807.676 +CPAR2_406060-T 2202 1991.075 38.401653 1215.002 +CPAR2_406070-T 1134 923.075 26.464537 388.187 +CPAR2_406080-T 486 275.178 102.452930 448.000 +CPAR2_406090-T 519 308.173 0.000000 0.000 +CPAR2_406100-T 1026 815.075 21.077808 273.000 +CPAR2_406110-T 1107 896.075 137.501529 1957.904 +CPAR2_406120-T 465 254.184 506.792489 2047.000 +CPAR2_tE(CUC)1-T 72 72.000 0.000000 0.000 +CPAR2_406130-T 1773 1562.075 28.287513 702.160 +CPAR2_406140-T 1569 1358.075 106.554801 2299.515 +CPAR2_406150-T 1170 959.075 631.083260 9617.868 +CPAR2_406160-T 1539 1328.075 165.732331 3497.594 +CPAR2_406170-T 342 131.306 311.044947 649.004 +CPAR2_406180-T 1830 1619.075 41.239071 1061.000 +CPAR2_406190-T 2031 1820.075 27.833452 805.000 +CPAR2_406200-T 1554 1343.075 3.233027 69.000 +CPAR2_406210-T 345 134.296 73.569165 157.000 +CPAR2_406220-T 1854 1643.075 45.548739 1189.250 +CPAR2_406230-T 1380 1169.075 17.386837 323.000 +CPAR2_406240-T 2052 1841.075 176.178181 5154.222 +CPAR2_406250-T 1341 1130.075 115.812796 2079.713 +CPAR2_406260-T 4899 4688.075 30.484659 2270.991 +CPAR2_406270-T 630 419.164 363.456722 2420.895 +CPAR2_406280-T 333 122.324 344.171108 669.000 +CPAR2_406290-T 1272 1061.075 0.652390 11.000 +CPAR2_406300-T 1338 1127.075 60.748402 1087.996 +CPAR2_406310-T 954 743.094 39.239089 463.342 +CPAR2_406320-T 1047 836.075 42.000005 558.000 +CPAR2_406330-T 1815 1604.075 54.933770 1400.244 +CPAR2_406340-T 3495 3284.075 13.969310 729.000 +CPAR2_406350-T 1113 902.075 59.855655 858.000 +CPAR2_406360-T 1095 884.075 101.850398 1430.841 +CPAR2_406370-T 7428 7217.075 17.327291 1987.153 +CPAR2_406380-T 1263 1052.075 80.631289 1348.000 +CPAR2_406390-T 1647 1436.075 97.414317 2223.000 +CPAR2_406400-T 372 161.241 216.609326 555.000 +CPAR2_406410-T 954 743.094 39.399157 465.232 +CPAR2_406420-T 1203 992.075 15.097077 238.000 +CPAR2_406430-T 840 629.109 52.216189 522.000 +CPAR2_406440-T 1029 818.075 41.462551 539.000 +CPAR2_406450-T 1524 1313.075 17.588831 367.000 +CPAR2_406460-T 2892 2681.075 60.979856 2597.974 +CPAR2_406470-T 807 596.118 108.381623 1026.661 +CPAR2_406480-T 1266 1055.075 52.636045 882.483 +CPAR2_406490-T 339 128.315 28.445360 58.000 +CPAR2_406500-T 549 338.169 81.322718 437.004 +CPAR2_406510-T 2427 2216.075 78.432210 2761.967 +CPAR2_406520-T 1779 1568.075 216.091166 5384.475 +CPAR2_406530-T 762 551.123 28.774792 252.000 +CPAR2_406540-T 1917 1706.075 394.850789 10704.605 +CPAR2_406550-T 1020 809.075 64.713504 832.000 +CPAR2_406560-T 612 401.167 99.229502 632.565 +CPAR2_406570-T 1653 1442.075 92.426936 2118.000 +CPAR2_406580-T 1422 1211.075 39.127704 753.000 +CPAR2_406590-T 2328 2117.075 33.827235 1138.000 +CPAR2_406600-T 771 560.120 16.403028 145.997 +CPAR2_406610-T 4788 4577.075 10.547244 767.126 +CPAR2_406620-T 747 536.129 65.420053 557.339 +CPAR2_406630-T 1026 815.075 25.555877 331.000 +CPAR2_406640-T 726 515.135 81.855416 670.051 +CPAR2_406650-T 1143 932.075 23.225655 344.000 +CPAR2_406660-T 1104 893.075 74.481334 1057.000 +CPAR2_406670-T 678 467.143 99.553200 739.000 +CPAR2_406680-T 1554 1343.075 66.664746 1422.774 +CPAR2_406690-T 1656 1445.075 19.432314 446.226 +CPAR2_406700-T 1533 1322.075 8.377550 176.000 +CPAR2_406710-T 1929 1718.075 97.493369 2661.685 +CPAR2_406720-T 723 512.135 32.931454 268.000 +CPAR2_406730-T 894 683.099 50.115903 544.000 +CPAR2_406740-T 1038 827.075 53.718043 706.000 +CPAR2_406750-T 1020 809.075 44.965752 578.110 +CPAR2_406760-T 1335 1124.075 47.483110 848.153 +CPAR2_406770-T 1170 959.075 45.799765 698.000 +CPAR2_406780-T 1260 1049.075 10.494716 174.951 +CPAR2_406790-T 933 722.098 122.270378 1402.997 +CPAR2_406800-T 1389 1178.075 560.065201 10484.582 +CPAR2_406810-T 597 386.168 140.961443 865.000 +CPAR2_406820-T 606 395.168 3.981246 25.000 +CPAR2_406860-T 1338 1127.075 76.350811 1367.433 +CPAR2_406870-T 633 422.163 134.288394 900.861 +CPAR2_406880-T 738 527.132 74.494793 624.000 +CPAR2_406890-T 1032 821.075 0.306576 4.000 +CPAR2_406900-T 1866 1655.075 17.566481 462.000 +CPAR2_406905-T 153 31.549 15.957632 8.000 +CPAR2_406910-T 666 455.143 28.620869 207.000 +CPAR2_406920-T 2364 2153.075 72.917419 2494.767 +CPAR2_406930-T 2022 1811.075 12.543861 361.000 +CPAR2_406940-T 1323 1112.075 143.743265 2540.161 +CPAR2_406950-T 501 290.176 47.711328 220.000 +CPAR2_406960-T 4368 4157.075 62.535631 4130.997 +CPAR2_406970-T 1074 863.075 0.947884 13.000 +CPAR2_406980-T 1086 875.075 22.450048 312.178 +CPAR2_406990-T 498 287.177 78.231168 357.000 +CPAR2_407000-T 633 422.163 18.335201 123.000 +CPAR2_407010-T 378 167.240 0.376289 1.000 +CPAR2_407020-T 345 134.296 5.154527 11.000 +CPAR2_407030-T 1734 1523.075 25.121337 608.000 +CPAR2_407040-T 1224 1013.075 58.150687 936.130 +CPAR2_407050-T 2466 2255.075 21.124935 757.000 +CPAR2_407060-T 1908 1697.075 14.239366 384.000 +CPAR2_407070-T 765 554.123 79.950896 703.994 +CPAR2_407080-T 1518 1307.075 51.942373 1078.852 +CPAR2_407090-T 1191 980.075 43.176253 672.425 +CPAR2_407100-T 768 557.122 63.220299 559.689 +CPAR2_407110-T 723 512.135 57.876420 471.005 +CPAR2_407120-T 681 470.143 108.287713 809.000 +CPAR2_407130-T 1377 1166.075 200.334761 3712.123 +CPAR2_407140-T 1356 1145.075 1360.279519 24751.508 +CPAR2_407150-T 972 761.086 86.654199 1048.003 +CPAR2_407160-T 1518 1307.075 18.199176 378.000 +CPAR2_407170-T 1155 944.075 1649.524775 24745.996 +CPAR2_407180-T 2433 2222.075 56.666349 2000.891 +CPAR2_407190-T 1341 1130.075 197.767779 3551.423 +CPAR2_407200-T 4344 4133.075 125.405778 8236.265 +CPAR2_407200.1-T 504 293.175 10.303261 48.000 +CPAR2_407210-T 1503 1292.075 29.417774 604.000 +CPAR2_407220-T 1248 1037.075 20.631422 340.000 +CPAR2_407230-T 846 635.108 23.582501 238.000 +CPAR2_407240-T 1584 1373.075 51.275785 1118.784 +CPAR2_407250-T 1575 1364.075 3.881804 84.142 +CPAR2_407260-T 873 662.100 9.884858 104.000 +CPAR2_407270-T 1326 1115.075 27.427982 486.001 +CPAR2_407280-T 846 635.108 4.657048 47.000 +CPAR2_407290-T 1575 1364.075 23.394096 507.089 +CPAR2_407300-T 1575 1364.075 13.229853 286.769 +CPAR2_407310-T 1578 1367.075 22.245869 483.260 +CPAR2_407320-T 1935 1724.075 203.822691 5584.036 +CPAR2_407330-T 243 32.464 802.521764 414.000 +CPAR2_407340-T 1008 797.075 33.001787 418.000 +CPAR2_407350-T 1179 968.075 75.638779 1163.572 +CPAR2_407360-T 837 626.110 205.929331 2048.840 +CPAR2_407370-T 630 419.164 25.380367 169.052 +CPAR2_407380-T 855 644.107 82.112592 840.441 +CPAR2_407390-T 825 614.114 526.576707 5138.662 +CPAR2_407400-T 3216 3005.075 14.577421 696.106 +CPAR2_407410-T 1119 908.075 1130.378920 16311.180 +CPAR2_407420-T 1899 1688.075 24.716232 663.000 +CPAR2_407430-T 2598 2387.075 52.342587 1985.458 +CPAR2_407440-T 894 683.099 77.569100 842.000 +CPAR2_407450-T 4140 3929.075 103.839459 6483.242 +CPAR2_407460-T 1164 953.075 25.651530 388.490 +CPAR2_407470-T 1632 1421.075 35.869760 810.000 +CPAR2_407480-T 2772 2561.075 3.440062 140.000 +CPAR2_407490-T 768 557.122 58.230660 515.515 +CPAR2_407500-T 336 125.320 3253.971660 6480.000 +CPAR2_407510-T 4353 4142.075 9.692050 637.930 +CPAR2_407520-T 1830 1619.075 239.064360 6150.655 +CPAR2_407530-T 6525 6314.075 21.508779 2158.067 +CPAR2_407540-T 1269 1058.075 90.771828 1526.185 +CPAR2_407550-T 360 149.253 783.686713 1858.676 +CPAR2_407560-T 1827 1616.075 5.612986 144.143 +CPAR2_407570-T 1818 1607.075 0.620915 15.857 +CPAR2_407590-T 210 9.898 178.020802 28.000 +CPAR2_407600-T 978 767.084 117.642739 1433.995 +CPAR2_407610-T 1029 818.075 85.617475 1113.000 +CPAR2_407620-T 993 782.079 123.675506 1537.000 +CPAR2_407630-T 3825 3614.075 481.687984 27663.203 +CPAR2_407640-T 1581 1370.075 30.958221 674.000 +CPAR2_407650-T 1017 806.075 77.818005 996.770 +CPAR2_407660-T 1083 872.075 33.915983 470.000 +CPAR2_407670-T 516 305.173 1.031062 5.000 +CPAR2_407680-T 2112 1901.075 35.128889 1061.215 +CPAR2_407690-T 1377 1166.075 1232.588237 22839.368 +CPAR2_407700-T 2481 2270.075 9.120448 329.000 +CPAR2_407710-T 249 38.415 545.514790 333.000 +CPAR2_407720-T 1218 1007.075 14.122352 226.000 +CPAR2_407730-T 1095 884.075 255.116929 3584.000 +CPAR2_407740-T 1233 1022.075 55.356082 899.058 +CPAR2_407750-T 2232 2021.075 36.150164 1161.000 +CPAR2_407760-T 855 644.107 24.913969 255.000 +CPAR2_407770-T 459 248.186 78.604102 310.000 +CPAR2_407780-T 1119 908.075 101.890415 1470.262 +CPAR2_407790-T 882 671.099 0.281316 3.000 +CPAR2_407800-T 2781 2570.075 27.644494 1129.000 +CPAR2_407810-T 2430 2219.075 73.578366 2594.548 +CPAR2_407820-T 2079 1868.075 30.958626 919.000 +CPAR2_407830-T 336 125.320 151.148992 301.000 +CPAR2_407840-T 1689 1478.075 26.695098 627.000 +CPAR2_407850-T 672 461.143 9.279699 68.000 +CPAR2_407860-T 885 674.099 102.876981 1102.000 +CPAR2_407870-T 171 31.759 1.981489 1.000 +CPAR2_407880-T 531 320.171 67.024432 341.000 +CPAR2_407890-T 795 584.119 293.514572 2724.396 +CPAR2_407900-T 1800 1589.075 68.986516 1742.000 +CPAR2_407910-T 1170 959.075 103.395470 1575.773 +CPAR2_407920-T 1206 995.075 458.208152 7245.331 +CPAR2_407930-T 1629 1418.075 230.330767 5190.279 +CPAR2_407940-T 7470 7259.075 13.714682 1582.000 +CPAR2_407950-T 798 587.119 155.642483 1452.090 +CPAR2_407960-T 3243 3032.075 48.836271 2353.000 +CPAR2_407970-T 453 242.189 352.602670 1357.000 +CPAR2_407980-T 357 146.259 13.338289 31.000 +CPAR2_407990-T 1548 1337.075 49.983791 1062.000 +CapafMp01-T 396 185.237 0.000000 0.000 +CapafMp02-T 1419 1208.075 0.052091 1.000 +CapafMt01-T 71 71.000 0.000000 0.000 +CapafMt02-T 83 2.860 0.000000 0.000 +CapafMt03-T 72 72.000 0.000000 0.000 +CapafMt04-T 72 72.000 0.000000 0.000 +CapafMp03-T 1155 944.075 0.000000 0.000 +CapafMp03.2-T 744 533.131 0.000000 0.000 +CapafMp03.1-T 1122 911.075 0.069073 1.000 +CapafMp05-T 795 584.119 0.215471 2.000 +CapafMt05-T 72 72.000 0.000000 0.000 +CapafMr01-T 2680 2469.075 240.247434 9426.111 +CapafMp06-T 1596 1385.075 1.226735 27.000 +CapafMp06.1-T 2802 2591.075 0.170012 7.000 +CapafMp06.2-T 2052 1841.075 0.000000 0.000 +CapafMp06.3-T 921 710.098 0.000000 0.000 +CapafMp06.4-T 1116 905.075 0.000000 0.000 +CapafMt06-T 81 1.947 0.000000 0.000 +CapafMt07-T 74 74.000 0.000000 0.000 +CapafMp09-T 1386 1175.075 0.000000 0.000 +CapafMt08-T 72 72.000 0.000000 0.000 +CapafMt09-T 71 71.000 0.000000 0.000 +CapafMr02-T 1325 1114.075 39.427898 698.004 +CapafMt10-T 72 72.000 0.000000 0.000 +CapafMp10-T 231 21.489 2.928518 1.000 +CapafMt11-T 71 71.000 0.000000 0.000 +CapafMp11-T 468 257.182 0.000000 0.000 +CapafMp12-T 936 725.098 0.000000 0.000 +CapafMt12-T 71 71.000 0.000000 0.000 +CapafMt13-T 71 71.000 0.000000 0.000 +CapafMt14-T 71 71.000 0.000000 0.000 +CapafMt15-T 72 72.000 0.000000 0.000 +CapafMt16-T 72 72.000 0.000000 0.000 +CapafMp13-T 810 599.118 0.000000 0.000 +CapafMt17-T 82 2.421 0.000000 0.000 +CapafMt18-T 83 2.860 0.000000 0.000 +CapafMt19-T 71 71.000 0.000000 0.000 +CapafMt20-T 72 72.000 0.000000 0.000 +CapafMt21-T 72 72.000 0.000000 0.000 +CapafMp14-T 255 44.403 1.417270 1.000 +CapafMp15-T 1668 1457.075 0.000000 0.000 +CapafMt22-T 71 71.000 0.000000 0.000 +CapafMt23-T 69 69.000 0.000000 0.000 +CapafMt24-T 74 74.000 0.000000 0.000 +CapafMp16-T 147 29.692 0.000000 0.000 +CapafMp17-T 741 530.132 0.000000 0.000 diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/aux_info/ambig_info.tsv b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/aux_info/ambig_info.tsv new file mode 100644 index 0000000000000000000000000000000000000000..219c1b83c342f2d4b9c05ad513bea99b4c087a44 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/aux_info/ambig_info.tsv @@ -0,0 +1,5924 @@ +UniqueCount AmbigCount +2140 0 +2621 1 +799 2 +2033 0 +646 4 +1145 0 +3126 2 +1696 2 +1006 0 +3585 2 +2906 4 +517 0 +830 1 +1002 1 +647 0 +544 0 +5706 16 +946 0 +2915 1 +2034 0 +305 1 +1847 4 +372 0 +1069 0 +2225 1 +6339 4 +593 0 +514 1 +15 0 +1174 0 +1759 0 +3040 5 +1822 4 +2650 5 +201 0 +2741 4 +1321 0 +156 0 +5 0 +1233 1 +1117 0 +95 0 +130 28 +926 39 +317 0 +21659 11 +1550 4 +4243 2 +5260 13 +1457 0 +821 1 +839 0 +3815 4 +419 0 +1402 0 +1376 1 +2304 4 +117 0 +687 1 +5916 9 +3409 3 +943 0 +5 0 +2474 2 +10506 7 +2023 2 +581 0 +443 0 +148 333 +658 0 +2486 14 +16277 5 +5250 1 +710 1 +478 0 +5894 3 +931 0 +679 0 +2477 3 +1902 2 +520 0 +1339 0 +524 1 +19419 10 +0 0 +1350 0 +500 0 +1531 0 +0 0 +12 6 +16400 40 +512 0 +2824 1 +2316 0 +470 6 +4951 45 +1071 0 +794 2 +908 0 +723 0 +507 0 +3323 21 +723 1 +1688 3 +31 3 +3159 3 +825 1 +795 0 +118 0 +48 0 +3489 0 +1480 2 +876 1 +354 0 +427 0 +281 0 +536 0 +1154 1 +1029 2 +479 1 +38 0 +1381 0 +1399 14 +1155 3 +2030 0 +199 0 +5773 3 +2073 1 +1143 1 +801 1 +1176 0 +2507 1 +430 2 +2030 12 +614 2 +3563 2 +2179 31 +1284 1 +242 0 +1432 0 +1229 1 +1632 0 +1188 0 +354 0 +1031 0 +140 0 +1568 0 +6542 46 +3616 3 +2222 4 +2540 0 +764 0 +1800 3 +2923 1 +12 0 +2841 1 +3164 1 +752 0 +952 0 +549 0 +1403 0 +0 0 +202 1 +456 4 +4138 4 +693 0 +11 22 +0 11 +5 19 +19 0 +4157 4 +2596 6 +1196 0 +5653 4 +890 1 +4030 4 +2373 1 +63 650 +1265 0 +1362 0 +702 0 +4 0 +1255 2 +2392 0 +422 0 +5969 16 +19 0 +51 650 +188 0 +305 0 +1237 1 +616 0 +848 0 +878 1 +1647 2 +3 0 +1382 4 +3503 1 +1094 0 +1348 2 +640 1 +306 0 +815 3 +2323 0 +1270 2 +1094 0 +149 0 +699 0 +862 0 +1977 2 +270 0 +758 0 +214 1 +734 0 +1020 3 +625 2 +3663 5 +935 0 +1649 1 +4204 2 +797 1 +1914 0 +2052 1 +612 0 +655 0 +892 0 +393 0 +609 1 +1395 3 +83 0 +926 1 +0 0 +504 0 +280 0 +297 1 +8212 16 +1076 0 +3139 0 +5471 42 +1342 2 +251 0 +1376 1 +817 9 +1869 3 +1948 1 +8510 11 +4546 4 +2759 7 +1167 4 +867 0 +1038 1 +14114 21 +559 0 +480 0 +966 0 +770 0 +3305 1 +1095 2 +172 0 +994 0 +1708 0 +2057 2 +264 0 +353 0 +1865 0 +13534 8 +4 0 +1232 0 +2808 4 +896 1 +583 0 +1625 0 +116 0 +1398 0 +184 0 +306 0 +432 1 +513 0 +650 1 +843 0 +75 0 +756 0 +487 0 +1523 0 +3150 1 +115 0 +6072 3 +3696 0 +1000 1 +1857 3 +833 0 +356 1 +4609 3 +1868 68 +2480 15 +888 0 +985 1 +62660 55 +421 1 +2423 7 +10040 11 +5693 4 +4336 13 +4366 10 +687 1 +1684 0 +1511 1 +2168 3 +1311 0 +1829 1 +600 0 +885 0 +645 0 +341 0 +684 0 +1070 1 +1947 0 +25 0 +4011 9 +462 2 +988 0 +427 0 +92 1 +545 0 +1863 1 +3443 9 +35964 27 +38186 9 +199 0 +1110 1 +134 0 +557 0 +353 0 +123 0 +453 1 +9177 5 +3627 3 +21588 27 +1730 35 +1149 0 +2705 3 +1154 0 +2158 7 +2566 3 +2680 17 +1746 1 +6128 0 +1194 2 +324 0 +2069 2 +412 0 +1280 1 +1846 4 +64 4 +2144 1 +823 0 +790 2 +343 0 +143 1 +632 1 +1497 1 +976 0 +1535 2 +2042 2 +221 0 +1680 1 +3793 3 +355 0 +798 0 +588 2 +1232 0 +346 0 +31 145 +522 511 +175 1 +671 0 +3872 2 +3081 1 +1140 0 +2166 0 +59 0 +107 0 +12162 32 +4170 6 +1693 1 +909 0 +6076 2 +709 0 +2388 0 +2282 0 +363 1 +1249 2 +914 0 +0 0 +695 0 +360 0 +138 0 +237 1 +852 1 +979 2 +32 0 +705 1 +2685 0 +243 0 +4995 1 +1239 0 +5738 1 +121 0 +2741 2 +1237 0 +542 0 +317 0 +3 0 +634 2 +549 2 +399 0 +18 0 +409 0 +390 0 +404 0 +25 0 +2374 1 +1182 0 +101 0 +514 1 +3955 1 +528 3 +1310 2 +2005 2 +16 0 +673 0 +28 0 +174 0 +569 1 +1641 6 +2024 1 +321 1 +742 1 +3137 16 +317 0 +6879 17 +2602 5 +2911 12 +662 0 +2327 1 +1064 0 +1075 1 +1174 1 +531 87 +461 2 +201 3 +12 0 +772 0 +830 0 +1766 4 +3794 2 +2671 1 +0 601 +2904 1 +0 0 +88 0 +1844 2 +1189 2 +215 0 +625 0 +13 0 +857 1 +296 0 +161 601 +0 0 +379 0 +771 0 +177 0 +1855 0 +1556 6 +4791 5 +3294 5 +1033 2 +189 0 +0 0 +399 0 +10559 16 +2392 1 +532 1 +241 0 +1366 0 +1328 0 +0 0 +15578 11 +943 0 +626 0 +1170 1 +1567 0 +2371 4 +2613 2 +1011 0 +639 0 +581 1 +2643 1 +15597 7 +1021 0 +2593 1 +5816 3 +11771 15 +1983 4 +1754 1 +841 0 +847 0 +2487 2 +3496 1 +2399 7 +7144 5 +379 2 +1163 3 +1399 0 +402 1 +63 0 +7312 4 +778 0 +3028 1 +1482 1 +1179 1 +688 0 +296 0 +7515 1 +1729 0 +312 0 +1837 2 +1439 0 +2478 2 +22 0 +2929 13 +1476 3 +1315 1 +836 1 +293 1 +1059 2 +1746 3 +7568 3 +595 1 +4 267 +1449 1 +1359 2 +738 0 +2651 1 +2362 0 +704 0 +931 1 +1901 1 +3938 3 +837 1 +71 0 +2066 1 +14154 14 +24 6 +4522 1071 +1513 0 +558 0 +367 0 +1223 3 +754 1 +710 8 +234 0 +1385 1071 +2385 4 +0 2 +561 0 +1280 2 +640 1 +1068 4 +1093 1 +1261 2 +1272 1 +369 0 +410 0 +259 0 +8968 205 +6 0 +500 0 +751 1 +1558 0 +1898 1 +8412 16 +0 0 +2323 1 +2734 1 +1404 1 +224 1 +469 0 +41 0 +2732 7 +57 1 +311 2 +1159 0 +15 0 +411 0 +2556 1 +676 1 +0 0 +0 0 +1206 0 +6638 1 +1 0 +3347 4 +2161 0 +246 0 +6659 8 +218 0 +779 2 +1044 0 +705 0 +1211 1 +2379 5 +389 0 +2570 4 +432 0 +471 0 +388 0 +595 1 +445 0 +624 1 +162 0 +419 0 +334 0 +0 0 +776 0 +209 0 +1494 7 +601 0 +0 0 +222 0 +4 0 +1 0 +1951 2 +1574 2 +9413 5 +264 0 +422 0 +412 0 +37 0 +32 0 +3384 2 +0 0 +446 0 +581 0 +1024 1 +121 0 +629 1 +1971 2 +1291 1 +4058 5 +885 1 +2160 2 +658 0 +952 0 +1090 1 +992 0 +182 0 +9086 3 +167 0 +7557 10 +423 0 +2281 0 +1290 2 +696 3 +460 2 +137 0 +203 1 +2596 0 +9569 13 +1192 0 +1225 0 +1040 2 +388 0 +523 0 +796 0 +1588 0 +1556 2 +569 0 +1429 0 +2191 4 +2133 2 +768 0 +123 0 +214 0 +39 0 +873 0 +393 0 +22 0 +1571 0 +0 0 +20 0 +1474 0 +710 1 +1210 83 +290 82 +2147 1372 +2995 4 +4984 5 +481 0 +321 0 +1850 1 +226 0 +949 1 +1680 2 +387 0 +10182 2 +1088 0 +62 0 +1768 0 +12170 7 +5037 2 +5 0 +1525 0 +798 0 +627 1 +167 0 +991 1 +785 0 +1153 0 +1504 0 +589 0 +372 0 +62 0 +3612 1 +2899 1 +248 0 +414 0 +323 0 +65 0 +636 0 +593 3 +626 0 +1428 0 +2994 15 +0 0 +1415 2 +637 0 +689 0 +80 0 +34 0 +1892 0 +0 0 +992 0 +6412 10 +1338 1 +1011 3 +925 0 +366 1 +981 1 +1596 1 +2544 0 +965 0 +973 0 +168 0 +1215 0 +4281 2 +2654 1 +767 0 +619 0 +690 6 +1310 0 +1008 2 +330 0 +2876 3 +1264 0 +114 1 +952 0 +1069 0 +325 0 +223 0 +1527 0 +4003 3 +230 0 +708 0 +2426 7 +1358 0 +1811 1 +2843 4 +2848 2 +2633 3 +1887 0 +816 2 +2288 8 +220 0 +868 1 +570 2 +800 0 +3076 2 +221 0 +650 0 +995 0 +155 0 +432 1 +3822 4 +64 0 +1037 0 +570 0 +0 0 +434 0 +886 1 +902 0 +21821 16 +47 0 +186 0 +2806 5 +1226 0 +504 0 +1104 1 +0 0 +641 0 +540 1 +192 0 +2764 0 +3977 4 +1502 6 +1055 2 +332 0 +1285 0 +753 0 +114 0 +534 0 +2772 2 +653 1 +2274 1 +7 0 +497 0 +1250 0 +2456 2 +2986 1 +6373 0 +848 0 +2261 1 +693 0 +990 0 +408 0 +16 0 +66 0 +914 1 +594 0 +1009 2 +420 0 +2836 2 +2259 3 +1646 2 +802 3 +2649 1 +1636 0 +197 0 +5 0 +1500 0 +1243 0 +6202 5 +1975 0 +154 0 +740 2 +174 1 +499 3 +215 0 +1139 0 +307 0 +996 0 +369 0 +617 0 +787 3 +516 0 +63 0 +1599 2 +182 0 +1496 0 +177 0 +586 0 +605 1 +459 0 +2511 4 +2273 1 +1157 1 +1234 1 +0 0 +9 0 +1126 1 +735 2 +57 0 +390 0 +878 0 +609 0 +2024 0 +1721 3 +456 1 +472 0 +7227 2 +1889 0 +4808 3 +5092 21 +25 0 +1213 0 +2012 1 +1919 1 +1013 1 +906 1 +3187 6 +1198 0 +502 0 +1421 1 +1574 1 +468 0 +834 1 +107 0 +1206 0 +856 1 +2204 7 +725 1 +24496 13 +910 2 +861 0 +5503 1 +700 1 +900 0 +484 0 +12603 9 +1553 1 +149 0 +289 1 +474 0 +1467 2 +2713 1 +943 1 +172 0 +2307 2 +491 0 +242 0 +3898 1 +211 0 +3925 1 +2450 1 +1849 1 +563 1 +6710 6 +1872 0 +403 0 +4584 0 +2772 3 +239 0 +257 0 +2224 6 +80 0 +2376 1 +1374 0 +1582 3 +282 0 +555 0 +1421 2 +1614 1 +1352 0 +7951 5 +423 1 +498 0 +200 0 +1190 0 +211 0 +0 18 +24 0 +689 2 +1062 3 +88 0 +1282 0 +704 2 +209 0 +562 1 +1329 0 +872 2 +0 0 +1203 0 +784 0 +1121 0 +561 0 +943 1 +850 0 +2924 1 +661 0 +1776 6 +1306 2 +3451 1 +4243 5 +378 0 +1012 0 +1731 0 +1062 0 +342 0 +561 0 +507 0 +1903 2 +907 0 +1439 2 +1394 1 +1875 2 +624 1 +1806 1 +2751 1 +6868 10 +2906 1 +11624 4 +275 0 +1365 1 +4393 4 +1248 0 +343 1 +457 0 +3586 3 +1751 1 +3234 3 +123 0 +1392 0 +2917 0 +1311 2 +598 0 +97 0 +93 0 +2270 0 +1285 0 +0 0 +1944 1 +50 1 +1127 1 +66 0 +757 0 +1700 0 +824 0 +19474 12 +1592 0 +712 0 +644 0 +5639 3 +724 1 +827 1 +1362 1 +580 0 +679 0 +658 1 +3101 2 +678 0 +1099 0 +1491 0 +4134 2 +2258 0 +2355 1 +3242 5 +773 0 +2046 0 +683 1 +1502 0 +1830 1 +1435 0 +333 0 +909 1 +382 1 +547 1 +8031 1227 +276 1227 +491 0 +653 0 +271 0 +3001 2 +1122 0 +1632 0 +1369 1 +508 0 +494 0 +2049 3 +541 0 +784 1 +547 1 +192 1 +753 3 +440 0 +858 0 +2882 3 +1177 0 +5727 18 +249 0 +172 0 +740 0 +3367 3359 +445 2 +2720 1 +1206 0 +1327 2 +130 0 +269 0 +511 190 +4 4361 +991 1 +618 0 +902 0 +945 1 +1826 1 +1189 0 +1784 3 +3195 0 +351 1 +283 0 +2383 1 +968 0 +166 0 +6401 5 +991 1 +85 0 +127 0 +9 0 +1283 1 +645 0 +2 0 +2490 0 +820 0 +777 0 +1101 1 +2540 0 +2872 1 +2276 0 +2647 2 +1854 0 +2267 2 +1049 2 +11 139 +0 0 +0 0 +530 0 +32 0 +4575 1 +678 0 +954 0 +2042 2 +717 0 +267 0 +174 0 +4840 1 +1417 2 +157 0 +1581 1 +2183 1 +1875 2 +1693 0 +676 0 +159 0 +447 0 +519 0 +38 0 +92 139 +0 0 +806 0 +2952 13 +1313 0 +697 1 +645 0 +2994 6 +746 0 +92 0 +545 1 +2621 0 +3273 9 +2012 19 +349 0 +2403 0 +188 0 +1157 0 +1298 1 +593 0 +1583 3 +146 0 +1183 1 +947 2 +1522 0 +1877 1 +367 0 +2163 0 +697 0 +1561 2 +461 1 +270 0 +1430 0 +4090 20 +1745 1 +459 0 +481 1 +6143 7 +534 0 +128 0 +1154 0 +160 0 +195 0 +242 0 +312 0 +727 0 +1616 0 +1528 0 +704 0 +442 0 +476 1 +1114 4 +1302 0 +3714 2 +369 50 +59 814 +4359 2500 +9 0 +2018 3825 +3967 2 +1930 0 +955 0 +347 0 +125 0 +134 23850 +1393 1 +664 2 +694 0 +8792 6 +221 0 +646 2 +0 23850 +1018 0 +107 0 +25 0 +1 96 +4929 97 +3787 2 +2293 0 +1639 0 +1333 1 +1289 1 +920 1 +210 0 +1139 4 +2293 1 +1672 2 +762 1 +3793 4 +1145 0 +273 0 +72 0 +1802 1 +1037 0 +179 0 +14837 3 +3425 1 +1608 1 +9214 43 +1517 1 +209 0 +308 0 +789 0 +688 0 +1603 1 +686 0 +1022 0 +1297 0 +4156 2 +816 0 +1640 1 +3251 2 +4535 8 +2157 1 +2529 1 +853 0 +655 2499 +2891 3 +220 0 +442 1 +2410 2 +3673 7 +747 0 +832 0 +2928 1 +242 0 +1152 1 +0 0 +202 0 +1672 0 +3001 1 +138 0 +360 0 +805 1 +829 0 +895 1 +568 1 +1210 0 +426 1 +966 2 +2334 1 +342 0 +2408 1 +393 0 +717 0 +1499 3 +317 0 +2904 3 +1228 3824 +69 814 +352 50 +872 0 +174 0 +261 0 +4616 2 +1295 3 +255 0 +2503 0 +1935 2 +1944 1 +1608 1 +3646 1 +2097 4 +2614 3 +3028 2 +5159 3 +11442 18 +2251 1 +1221 1 +1063 1 +1804 1 +1285 1 +309 0 +275 0 +298 1 +4055 3 +856 1 +2094 2 +187 2268 +4306 3 +1125 0 +2956 0 +289 0 +942 0 +714 0 +85 2268 +2446 1490 +1887 0 +2066 0 +3401 10 +980 7 +901 0 +5978 54 +76 0 +461 1 +3305 1 +323 1 +1201 0 +3774 2 +5189 7 +2223 0 +237 0 +9029 9 +5173 4 +4145 3 +27870 6 +961 6 +480 0 +448 0 +366 0 +469 1 +445 1 +643 0 +840 0 +1009 0 +1444 3 +186 0 +338 0 +1258 3 +8978 28 +949 0 +986 2 +2639 5 +3131 2 +3843 1 +1162 1 +411 2 +442 0 +512 2 +757 0 +531 1 +1097 9 +381 1 +2831 1 +1099 1 +4649 3 +1517 0 +696 0 +232 1 +4296 2 +2150 1 +375 2 +1287 2 +590 0 +554 4 +1273 0 +472 0 +180 0 +1035 0 +766 1 +387 0 +357 2 +542 0 +1503 1 +121 0 +163 0 +1942 4 +2641 1 +2820 3 +3947 0 +2702 1 +374 0 +3591 1 +201 1 +2378 4 +1340 1 +341 0 +5073 2 +5070 3 +2181 4 +3417 4 +3288 0 +1042 0 +613 0 +1752 3 +2219 1 +3476 7 +2399 1 +6956 29 +1311 1 +1594 0 +649 8300 +2722 3 +984 1 +1173 0 +6235 4 +434 1 +317 0 +618 497 +163 145 +74 2 +798 0 +7 1 +330 0 +1083 1 +215 0 +757 3 +2663 8 +235 196 +110 196 +901 0 +629 1 +475 0 +199 0 +483 0 +1008 3 +3653 2 +288 0 +527 1 +2282 2 +799 1 +4337 3 +1156 6 +2104 1 +2705 3 +34 0 +593 0 +3148 1 +514 0 +2787 3 +4364 9 +153 0 +1667 1 +256 0 +237 0 +1969 5 +2815 8 +384 1 +1005 1 +919 1 +2648 1 +926 0 +295 0 +199 0 +309 0 +1660 0 +1292 0 +1139 4 +317 0 +720 0 +828 0 +1781 2 +1429 4 +1056 0 +1212 376 +2 159 +1076 57 +1 149 +0 375 +217 159 +1 1 +3014 0 +798 2 +465 1 +39 0 +99 0 +1584 0 +891 0 +949 0 +666 0 +619 249 +1257 4 +402 398 +3230 59 +2565 0 +1654 2 +8426 18 +1240 1 +2309 0 +1624 5 +1170 0 +3389 2 +1361 1 +881 0 +347 0 +886 0 +1610 3 +5268 15 +414 0 +462 0 +3760 0 +684 7 +421 0 +495 0 +1155 0 +1016 0 +886 0 +1448 1 +744 1 +19778 33 +681 0 +4041 1 +413 0 +2988 1 +491 0 +327 0 +854 1 +620 0 +3081 2 +37 0 +27 0 +3 0 +662 0 +5776 13 +2471 8 +440 0 +1013 0 +2051 1 +675 0 +57 0 +1162 2 +1672 1 +524 2 +345 0 +1436 0 +689 0 +694 2 +572 5 +466 0 +419 0 +375 1 +10962 58 +711 0 +2891 1 +843 0 +2022 3 +5287 5 +3349 1 +904 0 +682 1 +3433 10 +2261 1 +1173 0 +677 0 +2257 1 +19 0 +704 0 +1193 0 +2031 2 +220 0 +1896 2 +2758 4 +468 0 +210 0 +5566 8 +478 1 +43 18 +2724 1 +980 3 +1438 1 +1143 1 +2355 1203 +312 1 +390 0 +1242 1 +8 0 +200 1 +448 1 +1252 1 +430 0 +10554 16 +2905 2 +19 1201 +64 0 +1896 3 +910 0 +2628 0 +1008 2 +1939 0 +1750 1 +207 104 +10 712 +38 2266 +981 0 +64 0 +8117 0 +1103 0 +1138 0 +1707 0 +1100 1 +2888 1 +92 0 +669 0 +1698 0 +1044 3 +1706 4 +2381 4 +1066 0 +942 0 +324 0 +2545 0 +916 0 +149 0 +2063 1 +2412 3 +36 0 +975 0 +5428 3 +1188 0 +274 0 +0 79 +381 0 +1173 4 +3192 0 +9017 15 +771 0 +1217 2 +2 0 +248 0 +2486 3 +3265 3 +1135 1 +4119 0 +312 0 +270 0 +472 0 +438 0 +200 0 +1927 1 +658 0 +317 0 +507 0 +3253 1 +2086 2 +1422 0 +772 0 +3298 0 +347 0 +1243 0 +637 1 +775 0 +5865 5 +9 0 +1894 0 +128 0 +2275 210 +3956 3 +267 1 +1526 0 +1821 6 +1719 1 +6776 4 +5053 4 +7828 25 +1482 0 +1160 0 +5249 11 +874 3 +2327 3 +1530 0 +6813 4 +738 0 +214 0 +11428 12 +2386 1 +1712 0 +234 0 +784 0 +729 0 +190 0 +16 0 +2291 1 +210 0 +408 0 +453 0 +116 0 +250 0 +670 0 +3769 1 +24 0 +27 0 +542 1 +714 1 +647 0 +860 0 +5533 11 +4202 2 +878 3 +2542 0 +896 2 +147 0 +2018 0 +506 0 +2759 0 +1615 2 +217 1 +7989 9 +60 0 +3089 2 +473 0 +1235 1 +89 0 +896 1 +1735 2 +614 0 +543 0 +2252 1 +378 4 +1419 0 +1997 2 +576 1 +653 0 +151 0 +628 0 +324 1 +2249 2 +49 0 +418 1 +598 1 +707 1 +1603 0 +221 0 +933 1 +1464 1 +2837 1 +1108 3 +830 0 +1017 0 +2563 18 +1 0 +1615 0 +307 0 +1449 2 +882 0 +4026 9 +662 0 +2080 1 +1615 0 +2255 1 +1351 1 +743 0 +551 0 +23451 5 +96 0 +808 0 +369 0 +1160 0 +1478 1 +2287 1 +1634 0 +4705 4 +2846 0 +2590 0 +1093 0 +1823 0 +886 0 +208 1 +562 1 +1283 0 +1075 0 +821 0 +253 0 +1320 1 +2790 1 +720 0 +1011 0 +1183 1 +269 0 +1423 4 +1835 0 +639 0 +7210 1 +1529 1 +824 1 +443 0 +2350 2 +636 0 +63 0 +3265 0 +13088 11 +4401 22 +6558 7 +841 2 +3399 3 +2056 2 +824 1 +678 0 +796 2 +158 1 +5053 8 +1680 0 +5857 5 +4833 2 +424 0 +95 1 +6154 17 +38 0 +851 3 +2474 4 +4650 5 +2124 0 +32 0 +1591 0 +1585 2 +309 0 +8 0 +49 0 +1938 1 +5099 0 +313 0 +1878 2 +0 0 +1276 1 +1428 0 +2999 2 +872 0 +295 0 +2006 3 +1103 0 +4570 0 +1312 0 +1250 0 +1407 1 +509 1 +2804 5 +54 0 +913 0 +1312 1 +3248 1 +8572 3 +160 0 +452 0 +834 2 +1458 1 +910 0 +895 153 +1621 1 +5561 7 +424 0 +258 0 +667 1 +390 0 +1 0 +1000 1 +1772 2 +1974 0 +618 0 +353 2 +432 1 +3560 1 +854 0 +2079 6 +2156 2 +2958 2 +1692 2 +4748 10 +9282 30 +4722 3 +1123 176 +442 176 +672 1 +3351 5 +123 0 +820 0 +1370 1 +1992 1 +1845 0 +926 0 +106 331 +208 0 +221 331 +4762 0 +1060 0 +162 0 +2832 3 +4221 8 +1786 1 +372 3 +285 0 +13194 34 +1132 6 +7613 27 +4169 2 +358 0 +2089 4 +34 0 +4013 2440 +1720 2438 +12548 4 +1228 0 +249 0 +1869 1 +1475 0 +591 0 +1408 1 +2388 4 +239 0 +2750 9 +727 2 +710 2 +938 0 +768 0 +194 0 +1468 2 +488 0 +2000 2 +1474 1 +24450 8 +0 0 +347 0 +62 0 +2904 3 +889 1 +1622 0 +284 0 +2793 0 +362 0 +1434 0 +3016 2 +2538 4 +1232 0 +126 1 +5448 8 +1845 3 +496 0 +2628 2 +266 0 +373 0 +98 0 +35 0 +805 0 +4 0 +224 0 +12409 8 +1091 1 +1204 1 +1849 2 +286 0 +1736 2 +1816 0 +592 0 +1070 0 +4175 9 +610 0 +353 1 +3106 4 +35484 134 +13 0 +2286 8 +587 0 +2331 3 +844 0 +359 1 +78 0 +1814 2 +393 4 +1396 2 +31 0 +1944 2 +519 0 +1927 0 +2078 3 +417 0 +12 0 +37 0 +0 0 +931 0 +642 1 +1232 0 +930 1 +2457 5 +736 0 +2298 5 +2202 4 +1147 1 +2474 3 +611 0 +1670 0 +298 0 +1278 3 +1266 0 +737 8 +2246 1 +2124 3 +2176 2 +1278 0 +405 0 +2008 2 +848 2 +1877 0 +1655 2 +1547 0 +583 0 +3681 3 +1317 0 +1065 0 +1456 1 +605 2 +1315 0 +975 0 +4665 2 +1211 1 +0 0 +0 0 +1205 0 +211 1 +2644 1 +3152 0 +718 0 +690 0 +1753 0 +0 0 +653 0 +62 0 +1147 0 +146 14747 +90 887 +24 0 +6819 1 +1711 1 +5712 4 +195 887 +0 14747 +10472 2 +582 2 +2413 3 +4823 2 +1476 2 +914 0 +778 1 +1630 1 +908 0 +2276 1 +967 1 +2759 3 +673 1 +388 1 +2660 4 +1190 0 +30246 5 +540 0 +1034 1 +3297 13 +800 0 +210 0 +194 0 +945 2 +754 0 +1005 3 +4817 6 +2187 0 +565 0 +252 0 +761 2 +518 0 +826 0 +801 6 +1026 0 +1617 1 +2 0 +1241 1 +386 1 +64 0 +380 0 +16 0 +9021 5 +1194 1 +2098 8 +1250 0 +14 0 +151 0 +1233 1 +975 0 +2924 0 +87 0 +1094 0 +725 0 +265 0 +1775 2 +467 0 +973 1 +1292 1 +1924 9 +755 1 +2744 1 +3693 0 +202 0 +1134 2 +1340 2 +152 0 +75 0 +378 1 +1097 3 +2544 1 +733 0 +703 1 +479 0 +2988 0 +1918 0 +1736 2 +1065 0 +3728 7 +712 1 +970 2 +1421 0 +3911 7 +223 1 +41 0 +249 0 +496 1 +2819 0 +723 0 +1166 2 +1682 0 +2707 2 +2221 1 +2654 0 +1351 0 +5322 4 +970 0 +869 0 +964 1 +1897 1 +524 0 +218 0 +618 0 +615 0 +903 1 +3005 0 +414 0 +473 0 +796 0 +875 2 +322 1 +1129 2 +114 0 +9 2259 +1794 0 +758 3 +280 1 +227 19 +252 20 +4135 3 +1542 7 +130 0 +58 2259 +1692 2 +999 0 +506 1 +1227 0 +406 2 +3774 3 +1295 0 +1876 4 +5619 7 +80 0 +489 0 +3535 1 +193 0 +2893 0 +4156 19 +105 0 +554 0 +2606 0 +1347 2 +924 0 +226 0 +1437 3 +691 0 +823 1 +668 0 +1405 0 +1907 0 +296 0 +1149 0 +30 0 +330 0 +4832 2 +1257 0 +1643 1 +1395 1 +1777 3 +2391 9 +1252 0 +896 2 +904 2 +0 0 +448 0 +4621 1 +1162 3 +1635 0 +846 0 +608 0 +17 0 +2036 0 +3638 1 +2596 1 +513 4 +598 1 +723 2 +261 0 +5435 1 +2660 0 +928 1 +575 2 +1014 0 +1002 1 +1965 3 +270 0 +616 0 +697 1 +2728 5 +0 0 +2630 1 +5923 1 +628 1 +1639 8 +1684 2 +1427 3 +1927 4 +3343 4 +1604 1 +5685 4 +4799 17 +3887 8 +5879 10 +1919 3 +30998 17 +1286 2 +747 2 +781 0 +638 0 +474 0 +423 0 +229 0 +282 0 +1087 0 +2208 1 +105 0 +434 0 +775 0 +2853 0 +12 0 +52 0 +12021 3 +1356 0 +862 0 +1164 0 +882 0 +890 0 +504 0 +68 1 +418 0 +5546 4 +1607 0 +513 0 +746 1 +4380 2 +10451 9 +2898 1 +4 2119 +23 113 +576 1 +2716 2 +276 0 +780 1 +1750 0 +47 0 +3155 3 +460 0 +492 0 +1403 2 +813 2 +2762 0 +1378 1 +1459 1 +714 4 +929 0 +376 0 +275 0 +25 113 +9 2119 +1185 0 +3198 3 +3375 2 +279 0 +4 0 +540 0 +21 0 +144 0 +7791 10 +775 0 +1352 0 +2391 1 +668 1 +16 0 +2462 5 +172 0 +7837 5 +8062 8 +1087 1 +629 0 +1800 1 +2228 4 +636 0 +3533 16 +500 1 +2216 4 +2247 3 +4623 13 +384 0 +1121 0 +3062 2 +9960 4 +92 0 +1041 0 +5569 6 +7165 5 +437 0 +83 0 +866 0 +699 0 +694 0 +1145 1 +381 0 +1181 0 +1342 2 +47 0 +425 0 +701 0 +1879 0 +39 0 +1842 2 +910 0 +3943 8 +58 0 +1482 1 +4646 7 +15905 19 +3208 1 +0 2920 +1190 1 +2804 4 +11539 6 +1095 3 +1021 0 +870 1 +1335 2 +2 0 +2736 4 +1745 0 +53 0 +243 0 +160 0 +77 0 +300 0 +68 0 +1052 0 +125 0 +791 0 +6 2920 +605 0 +67 0 +9878 41 +92 0 +1634 2 +1254 2 +437 0 +8691 7 +737 0 +1292 4 +738 0 +1472 5 +175 87 +1239 0 +378 0 +645 0 +1585 2 +1113 0 +984 188 +190 188 +1505 0 +1101 0 +1716 2 +890 0 +150 2 +298 0 +1825 4 +454 0 +5006 1 +8 0 +1575 0 +51 0 +2838 2 +245 0 +917 2 +196 0 +721 1 +450 0 +743 1 +839 1 +686 0 +586 0 +860 0 +2887 2 +290 0 +725 0 +5082 7 +1279 0 +3306 2 +4650 2 +28 0 +410 0 +1438 5 +652 0 +313 0 +0 0 +1115 0 +220 0 +374 0 +5392 14 +673 1 +716 0 +2507 6 +173 1 +4876 11 +389 0 +1774 0 +3006 0 +4044 0 +11355 33 +28 763 +0 0 +595 0 +971 2 +2685 1 +143 0 +5028 3 +2296 1 +3815 2 +293 0 +1146 0 +6251 5 +3333 1 +976 3 +0 0 +5312 4 +1779 1 +1388 1 +1142 0 +582 0 +474 0 +1591 0 +1179 0 +724 0 +836 3 +467 1 +204 0 +2592 3 +3103 2 +200 0 +2127 3 +334 0 +689 1 +690 4 +772 0 +2286 1 +382 0 +77 0 +309 0 +1024 0 +2035 1 +9221 14 +2616 31 +136 1 +328 2 +246 1 +863 1 +2069 3 +2770 0 +1565 0 +876 17 +2712 0 +674 0 +385 0 +313 0 +190 1 +554 3 +256 0 +1821 1 +56361 37 +2160 3 +955 3 +5215 3 +783 0 +1410 8 +7810 5 +1274 0 +10342 5 +6883 6 +540 0 +944 2 +126 82 +1119 8296 +194 52 +1161 1 +2920 1 +288 0 +4492 0 +1887 2 +877 1 +2694 0 +226 0 +343 1 +534 0 +1231 0 +4893 4 +1988 1 +1131 0 +7504 4 +3186 3 +949 1 +1712 0 +3251 211 +47 0 +1062 2 +2902 8 +568 0 +1858 1 +415 0 +2609 3 +8 0 +790 0 +2046 0 +75 0 +62 0 +1783 0 +2271 0 +983 0 +4361 19 +3 0 +337 0 +680 0 +2393 0 +4429 5 +3839 4 +773 0 +991 0 +907 0 +824 0 +1287 1 +601 1 +2764 3 +87 0 +556 0 +1486 0 +2225 1 +1090 0 +1572 0 +1188 0 +7623 3 +307 0 +2117 3 +222 0 +1472 0 +2645 2 +868 2 +1946 1 +2063 0 +7921 2 +2999 5 +1434 0 +1134 0 +1191 0 +697 2 +1007 1 +3013 4 +6875 3 +985 1 +3811 33 +0 0 +21 0 +6759 4 +2890 2 +4347 2 +831 0 +1012 0 +1743 1 +3736 1 +1042 0 +450 0 +2359 4 +301 0 +2846 1 +1873 2 +7347 3 +1322 0 +1519 0 +2789 0 +277 0 +1010 3 +4888 20 +0 0 +20140 6 +385 1 +79 0 +389 0 +822 0 +2437 2 +174 0 +783 0 +751 0 +118 1 +40650 31 +5169 14 +13767 13 +707 24 +0 24 +2716 10 +622 0 +1093 1 +264 0 +2965 4 +646 2 +550 0 +1404 0 +495 0 +109 0 +403 1 +1131 1 +2160 2 +9907 1 +1 0 +361 8 +486 8 +1845 4 +944 0 +376 1 +2717 1 +1031 0 +368 0 +3436 0 +498 0 +840 2 +1528 3 +2757 1 +1533 0 +1798 0 +1245 3 +1402 7 +317 0 +1179 1 +1224 0 +5821 14 +582 36 +44 36 +1533 1 +687 0 +551 0 +1705 0 +1069 0 +874 0 +676 1 +2138 2 +1121 0 +754 0 +1291 1 +575 1 +817 2 +57 0 +149 0 +7440 93 +3354 2 +2012 0 +2 7 +108 7 +5 0 +22 0 +33 0 +497 0 +2301 1 +1594 1 +60 0 +11 0 +43 0 +2392 1 +1649 0 +2369 5 +7193 11 +271 0 +2396 0 +842 1 +5330 0 +1633 1 +1671 1 +1274 0 +394 0 +227 0 +285 1 +67 0 +1943 5 +694 0 +1086 0 +2040 7 +2175 2 +0 0 +4394 3 +48 0 +1494 0 +679 0 +1390 1 +31336 15 +59 0 +3218 2 +1471 1 +2456 0 +282 2 +3774 1 +1600 1 +5459 4 +1446 0 +315 0 +312 1 +851 0 +1631 0 +5010 28 +741 0 +962 0 +475 0 +3 0 +2377 1 +1070 3 +1742 0 +463 0 +295 0 +415 0 +2475 2 +1973 0 +1863 5 +672 0 +1078 0 +1983 0 +2074 1 +1365 0 +4987 3 +8 0 +4554 3 +789 0 +7841 14 +822 0 +175 0 +383 0 +600 0 +635 0 +475 1 +99 0 +653 0 +505 0 +705 1 +359 0 +542 0 +8863 9 +822 0 +820 1 +1341 2 +36 1 +210 0 +967 0 +112 0 +967 0 +1273 1 +925 3 +96 0 +417 1 +1665 1 +1135 0 +408 0 +830 1 +1452 2 +659 1 +504 0 +441 0 +403 1 +196 0 +1324 0 +1025 0 +1204 0 +285 0 +1453 2 +426 0 +659 0 +275 0 +2500 1 +1627 0 +249 0 +288 0 +746 0 +1318 1 +909 2 +2249 3 +25 0 +81 82 +1793 1777 +286 53 +779 1 +1742 0 +1713 0 +610 0 +790 1 +1231 0 +1635 0 +209 1 +627 0 +1337 2 +4421 1 +4792 2 +923 2 +59 0 +453 4 +4855 2 +1399 1 +767 0 +1095 0 +1662 1 +923 0 +43 0 +2251 1 +1047 0 +336 1 +1689 3 +1803 17 +0 0 +480 0 +25184 550 +6998 2 +116 0 +1486 3 +1518 1 +444 546 +216 29645 +303 492 +1 940 +2394 1 +801 2 +516 0 +679 0 +645 0 +15 0 +313 0 +1086 0 +2627 1 +1345 2 +6201 1 +674 0 +613 0 +840 0 +1313 1 +898 0 +433 1 +587 0 +1282 1 +2396 0 +515 0 +1861 0 +6 940 +1 492 +153 29646 +4063 0 +3767 4 +122 0 +956 0 +844 0 +1751 1 +2431 1 +4947 0 +518 2 +848 1 +1907 0 +796 0 +0 0 +2566 1 +1161 1 +1014 0 +338 54 +172 54 +435 0 +1066 1 +3371 3 +966 0 +1133 0 +1069 0 +2111 2 +730 3 +2379 9 +180 0 +652 1 +572 0 +697 0 +83 1 +3262 3 +697 2 +1770 0 +3010 0 +817 1 +1266 1 +6282 25 +882 0 +4102 2 +10088 3 +162 0 +531 1 +728 0 +1337 0 +384 0 +1451 0 +266 0 +125 0 +2858 5 +380 0 +680 1 +1816 0 +65 0 +874 0 +482 4 +428 0 +3 0 +416 0 +2697 3 +3490 2 +1354 8 +1300 7 +2526 2 +1140 0 +654 0 +1289 1 +774 1 +1451 1 +1592 0 +7 0 +1332 0 +109 0 +26 6 +193 1154 +2625 1 +7843 20 +1621 1 +828 0 +182 1154 +400 2 +1154 0 +3107 2 +2650 1 +1279 0 +323 1 +913 2 +236 0 +341 0 +14 0 +656 0 +467 0 +263 0 +4685 3 +807 0 +1113 8 +2068 1 +1690 1 +1767 1 +1791 1 +1243 2 +1580 2 +571 0 +1210 2 +1169 1 +1329 1 +2344 1 +3044 5 +3790 4 +2503 0 +327 0 +785 0 +1865 2 +646 2 +878 2 +386 2 +550 2 +1515 3 +1048 2 +779 0 +507 1 +546 1 +585 2 +886 3 +595 0 +2310 1 +2522 14 +2657 0 +4144 6 +515 0 +1697 0 +1304 0 +972 7 +1764 3 +301 0 +1760 0 +901 7 +612 0 +73 0 +835 0 +850 0 +1242 2 +442 0 +2044 1 +1300 0 +2708 2 +249 0 +3794 3 +9 0 +285 0 +1384 3 +1200 3 +1833 3 +1290 1 +8135 13 +601 0 +482 0 +456 1 +4744 3 +1277 1 +2080 0 +2454 0 +590 0 +12321 18 +1157 2 +1021 3 +380 0 +1222 0 +4228 1 +490 0 +14 0 +112 0 +161 0 +472 0 +4027 2 +4142 2 +3809 7 +4142 5 +11174 7 +174 0 +992 1 +747 1 +524 1 +225 1 +505 0 +1806 2 +686 0 +2500 0 +8685 14 +207 0 +915 0 +2202 0 +95 0 +238 50 +536 1 +119 2 +1292 0 +2358 3 +164 0 +5111 2 +577 0 +561 0 +568 0 +520 0 +3 4360 +759 189 +44 0 +446 1 +1471 0 +127 0 +12986 5 +324 50 +2751 4 +1293 1 +186 1 +632 0 +230 0 +1669 2 +12196 4 +0 0 +1101 0 +1585 0 +1137 2 +1521 1 +640 0 +128 0 +405 0 +1399 0 +1440 15 +23091 1004 +579 0 +1772 16 +8085 17 +1922 2 +43 0 +218 0 +3476 2 +70 0 +23725 11 +4459 965 +37 961 +4459 2 +6812 22 +1245 1 +108 0 +5588 7 +2 0 +711 0 +1536 0 +1065 0 +3554 0 +515 0 +2487 2 +1465 1 +3 0 +237 0 +153 0 +1763 0 +1154 0 +1534 0 +1190 1 +22 0 +328 0 +1047 0 +20 0 +1005 3 +914 0 +2987 0 +95 0 +8 0 +412 0 +8 0 +0 0 +0 0 +1041 1 +257 0 +2629 18 +7263 5 +740 0 +783 0 +207 0 +471 0 +130 0 +1558 0 +1173 0 +1453 9 +1617 1 +2995 1 +1389 0 +81 0 +915 3 +795 0 +96 0 +5195 3 +3832 5 +108 8 +313 0 +1952 0 +517 0 +4 0 +0 0 +38 0 +258 0 +2555 2 +7782 6 +1522 0 +4207 1 +683 2 +999 0 +161 436 +868 437 +523 0 +354 1 +318 0 +491 0 +2070 2 +27 0 +216 0 +3393 1 +1053 0 +2042 0 +3731 1 +1 0 +4378 7 +3113 11 +81 0 +4140 8 +108 0 +173 0 +5 0 +5327 2 +1577 1 +3567 3 +910 2 +1642 0 +78 0 +625 1 +991 1 +1672 1 +9 0 +1512 3 +559 1 +3169 0 +1199 1 +1158 1 +1927 1 +0 0 +3201 0 +1099 0 +1581 0 +2264 2 +213 0 +7557 11 +819 1 +899 0 +535 0 +897 0 +3564 3 +1168 3 +366 0 +1428 1 +1666 0 +1096 1 +2300 2 +587 0 +448 0 +554 0 +2248 1 +882 3 +921 0 +516 0 +1346 0 +0 0 +11542 17 +9 0 +1319 12 +1162 0 +908 2 +2374 0 +577 3 +533 0 +102 0 +334 0 +735 2 +466 1 +477 1 +803 0 +3930 5 +1535 2 +2667 3 +182 0 +1131 1 +1638 3 +1129 1 +672 2 +2576 0 +1268 0 +6146 4 +468 0 +7 0 +354 0 +8131 27 +137 0 +1709 0 +591 0 +148 0 +1193 0 +41 0 +1369 0 +602 2 +1002 0 +3042 0 +401 0 +1407 2 +632 0 +2872 4 +2597 4 +445 1 +1077 0 +4587 0 +1564 8 +1362 0 +775 0 +5006 4 +1577 0 +610 0 +613 4 +2310 3 +471 0 +574 2 +691 0 +312 0 +673 0 +86 2 +850 2 +41 0 +54 0 +485 0 +1737 0 +87 0 +1154 2 +1559 2 +120 0 +4920 1 +1625 1 +2814 2 +418 17 +334 15 +464 0 +320 1 +330 0 +2057 0 +2276 1 +373 0 +3385 1 +354 0 +1172 1 +16234 15 +215 0 +3178 3 +0 0 +29252 8 +272 0 +1255 0 +945 0 +1196 1 +1753 3 +387 3 +1135 2 +4821 2 +1902 4 +585 0 +1117 1 +4998 4 +3605 1 +220 0 +974 1 +601 4 +1758 2 +0 0 +95 0 +3060 4 +27 0 +486 0 +2582 4 +1211 2 +6930 2 +889 1 +0 0 +1786 0 +1118 1 +1014 0 +10605 37 +929 1 +1263 0 +2960 2 +382 1 +829 0 +640 0 +1017 1 +88 0 +2280 1 +747 0 +0 0 +2 0 +354 0 +327 0 +5608 3 +135 0 +640 0 +263 0 +994 0 +2257 4 +767 0 +425 0 +249 0 +3761 1 +699 2 +1230 2 +6757 52 +5558 3 +1558 1 +739 2 +1604 0 +620 0 +0 0 +2210 1 +1892 2 +1390 0 +839 0 +1050 0 +1670 0 +4424 3 +3358 2 +1492 2 +267 0 +768 0 +1438 1 +684 3 +1539 4 +1557 1 +283 0 +1912 2 +2820 2 +26 0 +0 0 +1483 2 +1079 0 +21 0 +401 0 +462 0 +97 1 +5 0 +1433 1 +2095 1 +839 2 +1272 1 +1904 1 +486 0 +2653 1 +465 0 +1438 0 +429 0 +767 0 +3552 5 +723 0 +3375 2 +693 0 +1623 0 +610 0 +1410 2 +1751 0 +1626 3 +1593 1 +1382 0 +842 0 +8782 2 +4281 2 +1556 1 +1037 1 +104 0 +1608 1 +31537 54 +1546 0 +412 1 +31302 16 +3146 1 +239 0 +516 1 +715 0 +2334 8 +543 0 +1181 1 +55 0 +113 0 +1031 2 +594 0 +1024 0 +1383 1 +635 0 +5184 14 +2239 71240 +1427 0 +8016 4 +1753 0 +599 0 +231 0 +202 0 +824 0 +1583 2 +811 0 +319 2 +3094 2 +841 6 +433 0 +358 1 +8894 4 +843 0 +277 0 +1096 1 +172 1 +73 2 +430 1 +1836 5 +1135 1 +2142 0 +1701 4 +636 1 +1205 2 +520 0 +1725 1 +667 0 +202 0 +1066 2 +370 1 +2146 4 +1040 0 +2312 9 +3113 8 +910 0 +0 0 +368 0 +1313 0 +804 2 +1850 1 +771 1 +1820 3 +5723 7 +210 0 +121 68 +787 0 +1667 0 +726 0 +906 1 +12188 12 +173 0 +1863 0 +649 3 +880 1 +4034 3 +1181 0 +948 1 +77 1 +488 1 +492 1 +5020 8 +3317 1 +4027 4 +5315 3 +1911 3 +3735 5 +5972 5 +14 0 +3591 0 +36148 33 +30 0 +1394 0 +278 19162 +2542 7 +6712 1 +534 0 +2245 6 +91 19161 +1615 0 +717 0 +154 0 +596 0 +605 2 +397 0 +1089 4 +2686 4 +37 0 +1786 2 +903 4 +2201 3 +1009 0 +859 0 +1952 1 +896 7 +907 0 +608 0 +1204 0 +1863 1 +1754 1 +15 0 +421 0 +1004 0 +549 0 +728 0 +975 0 +6842 6 +1508 0 +14327 6 +26 0 +1591 0 +174 0 +2496 1 +274 0 +376 0 +1339 0 +1174 0 +1582 0 +1491 5 +1096 4 +326 0 +856 1 +931 1 +944 0 +233 0 +1261 0 +621 0 +2898 3 +1284 2 +3210 5 +236 0 +229 0 +6615 1 +947 0 +241 0 +241 0 +187 1 +524 0 +4627 2 +2628 1 +757 0 +1682 1 +69 0 +1711 0 +1135 2 +1484 6 +1093 1 +556 0 +7684 0 +666 2 +1064 0 +684 0 +1273 1 +1058 0 +982 0 +377 0 +2829 1 +6940 6 +1177 0 +162 0 +180 1 +1007 0 +1101 0 +859 0 +765 0 +421 0 +18 0 +1284 0 +2085 1 +7376 4 +1 0 +669 2 +98 0 +712 1 +325 0 +2484 0 +8394 26 +857 1 +1919 7 +284 0 +166 0 +393 1 +1363 1 +604 0 +1743 2 +883 0 +5802 8 +1908 0 +1595 2 +563 1 +2368 1 +0 0 +905 0 +886 2 +2825 8 +596 1 +2345 0 +738 0 +1645 1 +1832 7 +6652 7 +353 0 +710 0 +60 0 +329 0 +1758 1 +472 0 +898 0 +671 0 +417 0 +133 0 +46 0 +9600 2 +580 1 +3591 1 +1174 4 +798 0 +1 0 +70 0 +512 0 +700 1 +2805 2 +402 0 +1924 0 +44 0 +17 0 +3256 3 +856 0 +2123 0 +909 1 +119 1 +1222 3 +794 0 +2065 1 +7111 2 +3725 6 +469 0 +863 1 +2302 1 +1694 0 +1055 1 +1640 1 +589 0 +3117 3 +2042 5 +1659 1 +1369 1 +5 0 +1781 2 +741 0 +246 0 +290 0 +1627 1 +1684 1 +2111 1 +1962 1 +212 0 +501 1 +350 0 +480 0 +596 0 +3566 2 +131 1 +3322 14 +1027 1 +24761 19 +6001 1 +2483 3 +573 1 +938 0 +2955 2 +997 0 +2290 1 +2293 1 +613 0 +1208 0 +1393 1 +4096 1 +102 0 +1619 0 +224 0 +1669 0 +1069 0 +1045 0 +582 1 +711 0 +203 0 +503 0 +400 2 +522 0 +656 0 +192 2 +719 0 +2378 0 +315 0 +6749 3 +2539 1 +2811 4 +329 0 +8 0 +21 0 +45 0 +548 1 +23 0 +437 1 +1664 0 +1891 6 +8 0 +2026 88 +868 0 +19 0 +3533 5 +396 0 +2054 0 +990 0 +930 1 +1043 0 +11474 9 +430 0 +12176 82 +737 1 +275 0 +336 0 +191 0 +2146 0 +6833 5 +3361 4 +775 1 +2741 1 +1739 0 +16255 3 +6950 2 +2019 1 +818 0 +1494 0 +1221 1 +488 0 +3898 0 +840 0 +3795 4 +973 0 +0 0 +972 0 +622 0 +3133 3 +1308 1 +61 0 +2478 3 +1309 3 +1366 0 +0 0 +573 0 +1853 0 +2057 1 +655 0 +830 1 +33 0 +3866 0 +1693 4 +397 0 +397 0 +1572 0 +1313 1 +1356 5 +345 0 +653 1 +621 2 +191 1 +1347 0 +221 0 +366 2 +1332 1 +1139 1 +3978 5 +1936 0 +438 2 +1731 0 +717 0 +1439 4 +885 1 +2513 1 +1106 1 +2570 0 +1378 0 +270 1 +978 2 +1978 1 +1166 1 +974 0 +2434 3 +224 0 +313 0 +1377 1 +839 0 +3013 0 +1318 0 +22 0 +1084 0 +2558 1 +1062 0 +647 0 +948 0 +1292 1 +9635 6 +545 2 +1451 3 +1039 0 +2 0 +1266 2 +937 0 +1973 2 +3899 5 +816 0 +27 939 +3442 7 +1881 20 +1115 0 +789 1 +341 939 +239 0 +15 1 +567 0 +1553 4 +287 0 +1463 0 +1702 0 +1339 7 +4220 14 +919 0 +1728 1 +4000 1 +3256 7 +43146 160 +1483 3 +831 0 +1655 5 +1527 0 +228 0 +8030 5 +1021 0 +1079 0 +1991 0 +695 1 +902 0 +3091 0 +586 0 +2961 3 +875 0 +196 0 +1450 1 +321 0 +3121 2 +507 0 +16999 9 +1510 1 +2789 2 +663 1 +1090 0 +2057 0 +3370 1 +27 0 +1911 0 +4024 1 +1516 0 +14377 39 +1081 1 +3503 0 +1018 0 +70 0 +915 0 +2967 5 +6489 7 +622 0 +3863 0 +2367 0 +1080 1 +4660 1 +1620 2 +806 0 +6085 5 +537 1 +687 1 +7449 6 +1510 0 +769 0 +298 0 +1986 0 +1104 1 +2689 0 +1406 2 +1054 2 +4326 9 +785 1 +851 0 +15 0 +939 1 +357 0 +3397 2 +1318 0 +6317 10 +2116 1 +2624 5 +224 0 +5543 7 +2281 7 +820 2 +2356 2 +747 1 +2621 2 +1211 0 +766 0 +14121 5 +307 0 +520 0 +2021 0 +3502 1 +215 0 +1327 0 +888 0 +1953 1 +811 1 +784 1 +276 0 +128 0 +209 0 +7 0 +134 0 +4 0 +307 0 +336 0 +1364 1 +516 0 +2599 2 +2630 2 +1839 4 +931 0 +2293 1 +243 0 +332 0 +781 2 +17 0 +757 3 +503 1 +812 1 +621 3 +572 1 +1637 1 +863 0 +3093 11 +714 1 +205 0 +763 0 +179 0 +651 0 +166 0 +374 0 +29 0 +1425 0 +755 0 +3160 7 +935 0 +163 2 +4597 19 +710 0 +2326 1 +1412 1 +1049 1 +189 0 +1061 1 +445 1 +4224 1 +871 0 +38 0 +636 0 +223 0 +6678 2 +3567 4 +1001 0 +598 0 +1486 0 +445 0 +4 0 +1 0 +58 0 +1581 0 +508 0 +279 0 +561 0 +2437 0 +1281 2 +238 0 +660 0 +2145 4 +592 0 +1249 0 +10629 2 +197 0 +1 0 +453 0 +1602 3 +1608 1 +3849 1 +1436 3 +2359 1 +1361 0 +358 0 +248 0 +597 2 +801 0 +493 0 +1781 1 +2004 3 +2 0 +4 62 +43 62 +678 1 +2350 1 +402 0 +730 0 +829 1 +35 0 +2491 0 +2379 1 +410 1 +524 0 +324 1 +1370 1 +369 0 +706 2 +1252 1 +895 1 +1083 1 +981 1 +3362 1 +2102 2 +2937 1 +867 0 +1025 0 +1390 3 +491 0 +282 0 +412 0 +986 0 +12619 7 +6 0 +250 0 +2906 0 +3507 0 +378 1 +1733 0 +723 0 +385 0 +483 0 +2016 2 +7962 29 +2675 1 +743 0 +2888 1 +658 0 +2210 3 +90 0 +2735 3 +1654 1 +0 0 +2393 1 +181 0 +388 0 +1311 0 +7661 8 +1463 3 +22 0 +2063 0 +956 0 +2840 6 +408 1 +1238 0 +4318 15 +396 0 +429 0 +1 0 +536 0 +1126 3 +1394 0 +624 1 +1117 1 +0 0 +1324 1 +2059 0 +1110 0 +1450 5 +1449 0 +2109 3 +4697 2 +4396 29 +1151 1 +2118 0 +1110 1 +479 0 +493 0 +1148 2 +2111 1 +5305 7 +1312 1 +233 0 +719 2 +1368 0 +2605 1 +2135 3 +1367 0 +98 0 +276 0 +50 0 +732 0 +2054 2 +805 0 +808 3 +2443 2 +2215 0 +6117 3 +10755 4 +409 0 +18 0 +960 1 +765 0 +2054 0 +699 2 +1901 1 +3409 4 +2110 1 +248 0 +408 0 +1791 3 +2466 0 +814 0 +1052 0 +316 1 +1104 2 +11 0 +456 0 +1956 0 +1381 2 +794 0 +2594 2 +966 0 +3313 2 +1054 0 +412 0 +23891 3363 +1609 1 +352 0 +768 2 +2560 0 +1332 2 +21 0 +7296 30 +973 1 +971 2 +778 0 +2081 1 +3665 3 +584 1 +793 0 +1830 0 +4016 3 +1501 1 +659 1 +1275 0 +2150 1 +448 0 +615 0 +773 0 +420 0 +8999 3 +138 0 +953 4 +4076 4 +562 0 +2489 0 +707 0 +2575 4 +4235 1 +2854 3 +900 0 +244 0 +1327 0 +1890 1 +82 0 +36 0 +1698 2 +1153 1 +1901 4 +2887 6 +6071 3 +75 0 +445 0 +2753 1 +13723 12 +4403 0 +1473 2 +1833 0 +2732 0 +153 0 +1258 1 +1115 846 +12419 865 +7763 16 +1436 9 +3427 1 +32 0 +2982 3 +723 0 +638 0 +257 0 +944 0 +1880 0 +1595 3 +4122 29 +129 0 +596 0 +1991 3 +820 0 +785 1 +942 1 +1267 1 +766 0 +406 1 +1239 0 +1470 1 +434 0 +169 0 +1326 0 +2307 3 +6781 1 +634 1 +30 0 +51 0 +2129 0 +924 0 +4327 2 +141 0 +878 0 +608 1 +569 2 +2535 4 +507 0 +3498 4 +1610 0 +11 0 +671 0 +2304 2 +121 0 +1886 1 +1228 1 +1367 0 +237 0 +2184 7 +0 0 +3680 5 +990 0 +2510 1 +2908 7 +1320 0 +397 1 +0 0 +2 0 +0 1 +47 1 +0 0 +584 0 +2620 12 +113 0 +774 1 +2143 1 +920 0 +4917 0 +2557 1 +1143 0 +1043 1 +286 0 +171 0 +250 1 +587 8 +720 0 +502 0 +155 2 +53 0 +867 1 +351 2 +915 0 +421 0 +7248 1 +12 0 +1045 0 +1766 0 +6 0 +9 0 +306 0 +1501 0 +2950 9 +1902 3 +195 2 +342 0 +1624 1 +536 0 +1242 0 +174 0 +1348 0 +265 1 +237 0 +2202 1 +1620 2 +4 0 +4 0 +677 333 +691 3 +2227 2 +2645 1 +141 0 +385 2 +777 2 +23 0 +3034 0 +3647 1 +272 0 +688 2 +53 1 +386 0 +596 0 +2964 7 +107 0 +1653 1 +2735 2 +4674 2 +1027 1 +941 2 +575 0 +1452 1 +266 0 +761 0 +1725 2 +204 0 +303 1 +281 1 +349 2 +1077 0 +1038 0 +1747 0 +369 0 +2855 0 +680 2 +1287 3 +349 0 +924 1 +245 2 +856 0 +141 209 +139 2 +3798 3 +19 0 +171 0 +10 0 +2801 11 +1598 5 +837 1 +443 0 +6 0 +2307 1 +1357 0 +1385 2 +554 0 +8290 11 +732 18 +149 18 +586 0 +732 0 +2346 3 +1222 2 +1098 0 +512 0 +233 0 +4106 6 +183 0 +1925 1 +2117 0 +1746 1 +3652 1 +1526 1 +2548 0 +275 1 +1089 4 +2 0 +1266 1 +489 0 +744 0 +145 0 +2378 4 +990 1 +2325 1 +427 46 +524 0 +228 44 +16 0 +10 0 +10 0 +5050 1 +1856 0 +1100 2 +2331 2 +1885 2 +2307 1 +1076 5 +1634 1 +1330 0 +1032 0 +2236 3 +3386 2 +737 0 +1111 1 +1175 1 +748 0 +369 0 +5666 9 +630 0 +1133 0 +2297 1 +636 0 +114 0 +82 0 +3331 2 +88 0 +660 0 +2093 6 +17 0 +3232 0 +447 0 +2240 4 +937 0 +374 0 +287 0 +1575 0 +1501 0 +2955 2 +63 0 +515 0 +311 0 +2159 1373 +573 0 +3268 9 +725 0 +1723 1 +464 0 +16996 8 +1127 0 +181 0 +1920 2 +655 1 +10 0 +4942 5 +4783 1 +190 1 +2230 0 +401 0 +1121 0 +26 0 +1610 2 +1327 1 +495 1 +521 0 +1076 0 +1041 0 +1631 1 +5890 2 +196 0 +505 0 +167 405 +2532 1 +2817 0 +217 0 +2823 1 +53 405 +503 0 +96 0 +1360 2 +374 0 +402 0 +210 0 +584 0 +31 0 +1045 0 +1420 1 +1121 1 +1302 0 +406 0 +1081 0 +1446 3 +2828 7 +2 0 +0 0 +2095 1 +533 0 +681 1 +3856 3 +776 1 +1894 1 +3874 0 +194 0 +2828 0 +7025 2 +2541 14 +738 1 +774 0 +1405 1 +662 2 +330 1 +8842 11 +3591 40 +602 0 +9823 4 +1411 2 +2588 1 +562 0 +1107 0 +2533 5 +11 0 +987 1 +609 0 +1129 0 +2734 2 +3428 3 +344 1 +2929 3 +1378 1 +1539 0 +285 0 +134 0 +1061 1 +3192 3 +1851 3 +49 0 +8 0 +649 3 +697 0 +2 0 +1284 1 +630 1 +3967 2 +2486 1 +3586 2 +993 1 +1144 0 +260 0 +76 0 +2304 2 +1868 0 +271 1 +2607 2 +421 0 +117 0 +1077 0 +659 0 +361 0 +56 0 +1130 0 +3114 29 +3268 0 +1033 1 +855 1 +1943 0 +1326 2 +569 0 +550 0 +2438 4 +2181 0 +489 0 +2259 3 +0 0 +482 0 +325 0 +750 0 +4657 1 +2453 0 +136 1 +5166 3 +2270 1 +1269 2 +885 1 +403 1 +578 1 +342 0 +4304 10 +1674 2 +2667 1 +332 0 +11510 7 +392 0 +1287 0 +2338 0 +499 0 +4813 3 +917 3 +3029 1 +777 0 +2633 7 +256 1 +368 1 +1393 3 +3316 4 +246 0 +984 2 +424 348 +947 0 +1356 5 +1 0 +1556 1 +894 102 +204 0 +5145 8 +11174 1 +896 2 +12 0 +984 0 +83 0 +631 0 +767 1 +1819 1 +1175 0 +1569 0 +525 0 +4313 0 +1050 1 +707 0 +13678 10 +6723 1 +1876 0 +59 0 +0 0 +333 4 +389 1 +96 0 +1313 0 +2249 3 +1512 1 +535 0 +1052 5 +1221 0 +206 0 +6195 1 +317 4 +573 0 +2438 3 +1566 0 +3335 6 +374 0 +190 0 +1018 0 +7923 6 +980 0 +360 0 +75 4 +17 4 +112 0 +634 0 +10234 5 +314 0 +2134 0 +405 0 +6 0 +5578 4 +216 1 +3232 0 +475 0 +1670 1 +1845 17 +878 0 +910 2 +1531 0 +1817 0 +3348 1 +787 0 +363 0 +0 0 +202 1 +4996 5 +1827 1 +990 0 +960 0 +50 0 +472 0 +1885 1 +376 0 +523 0 +3088 3 +1448 0 +322 0 +472 1 +0 0 +3207 2 +1220 0 +1590 0 +0 0 +19 0 +1169 2 +639 0 +1100 1 +5091 7 +1761 1 +1697 1 +519 0 +756 1 +671 0 +1519 2 +2964 5 +346 0 +1204 2 +571 1 +1045 0 +1787 1 +223 0 +16815 22 +3095 0 +1173 1 +541 0 +160 1 +2467 1 +174 4 +20 0 +805 4 +42 4 +243 0 +640 0 +41 0 +23 0 +1 0 +583 1 +0 0 +1261 1 +0 0 +910 1 +643 2 +592 0 +250 0 +828 1 +465 0 +215 0 +360 1 +904 0 +482 1 +88 0 +385 0 +8182 2 +86 0 +457 0 +309 0 +336 0 +479 0 +1156 2 +806 1 +82 0 +420 0 +867 0 +71 0 +122 0 +42 0 +11469 7 +1079 0 +215 0 +1673 2 +1431 0 +763 0 +710 1 +889 0 +1901 3 +1338 1 +1021 0 +4964 10 +2011 1 +549 0 +621 0 +4161 4 +3496 4 +2883 1 +593 0 +416 1 +2570 1 +1693 0 +1345 13 +1354 4 +396 0 +608 0 +1005 1 +352 0 +208 0 +964 2 +206 1 +0 0 +1515 0 +661 1 +141 2 +305 0 +1045 2 +498 1 +569 1 +207 0 +2404 1 +152 663 +923 1 +500 1 +20728 10 +907 0 +172 271 +1553 0 +38 0 +1218 0 +841 664 +676 0 +448 1 +1005 0 +269 0 +700 0 +1993 3 +388 1 +449 1 +9 0 +862 1 +1855 2 +194 0 +1321 1 +862 0 +378 0 +2537 1 +3310 1 +999 0 +384 1 +1933 2 +429 0 +244 0 +9636 10 +500 0 +1111 0 +1963 1 +887 1 +1370 0 +349 0 +2214 3 +10396 3 +452 1 +601 209 +1164 0 +866 0 +477 0 +317 0 +2143 7 +1391 8 +27350 14 +956 2 +63 0 +1247 1 +3041 1 +803 0 +593 1 +1117 2 +19 0 +1037 0 +2651 2 +1750 9 +5160 9 +2234 6 +4547 1 +4613 1 +2479 6 +1499 1 +1538 2 +1382 2 +529 0 +353 2 +2307 1 +3 0 +1 0 +388 1 +747 0 +2018 1 +918 0 +1029 1 +1427 1 +6364 5 +518 0 +455 0 +1173 1 +351 0 +371 0 +1636 0 +4223 2 +832 0 +2376 1 +2055 1 +538 0 +314 0 +2457 1 +1156 0 +51 0 +488 0 +592 2 +2865 0 +10753 3 +15870 10 +277 0 +1300 1 +7 0 +4205 2 +302 0 +5790 1 +2350 3 +2774 5 +12 0 +4 0 +4904 3 +293 1 +62 0 +3020 0 +4698 3 +39 0 +699 1 +861 0 +6542 5 +504 0 +1110 0 +712 1 +3857 2 +2194 1 +856 6 +1381 5 +666 0 +412 1 +2054 3 +899 1 +0 0 +0 0 +6257 4 +1301 0 +4394 3 +1119 0 +2051 15 +651 2 +923 1 +995 1 +353 0 +833 41 +229 0 +148 1 +2843 1 +14656 14 +413 0 +1450 0 +1009 2 +2597 2 +1743 1 +2961 5 +1969 2 +2243 1 +8256 9 +694 0 +1232 0 +1236 0 +168 0 +1024 0 +3827 6 +1837 5 +530 2 +2452 0 +510 0 +2402 4 +133 0 +36 0 +848 0 +1335 0 +3039 0 +1474 1 +1444 5 +461 1 +1559 1 +991 0 +1646 0 +220 0 +206 0 +1453 1 +1000 4 +16 0 +4095 10 +405 0 +2405 0 +665 0 +875 0 +1811 0 +5506 7 +2171 1 +962 0 +447 1 +604 0 +1889 1 +13279 8 +84 89 +1344 1 +946 0 +744 0 +2085 0 +1007 1 +617 0 +327 1 +1927 2 +295 0 +40 89 +2232 0 +408 1 +5861 2 +6867 43 +309 0 +1190 0 +1642 1 +1887 1 +751 2 +8365 4 +471 0 +220 0 +851 0 +17 0 +1127 2 +1566 2 +1714 1 +1519 0 +154 1 +1368 1 +1572 2 +800 0 +817 0 +369 0 +993 0 +180 0 +162 0 +2534 1 +1213 1 +628 0 +884 0 +372 0 +497 0 +1591 1 +907 0 +1090 9 +533 0 +638 2 +1070 1 +1863 0 +1781 2 +85 0 +6302 9 +13527 15 +3256 2 +352 0 +302 0 +5490 2 +1211 2 +499 1 +22 0 +2043 2 +1811 2 +1031 1 +10334 5 +2858 1 +641 2 +332 0 +2657 3 +328 0 +1064 2 +1407 0 +2064 7 +956 1 +1159 2 +1022 1 +1371 1 +3499 0 +1391 0 +799 0 +377 0 +517 0 +654 0 +3211 0 +517 1 +9925 27 +655 1 +822 1 +383 0 +141 0 +8341 7 +17 0 +1176 1 +6205 37 +1280 0 +874 0 +327 0 +9231 3 +948 1 +3002 0 +432 0 +3748 15 +3303 2 +454 0 +126 1 +1087 0 +168 0 +454 0 +354 0 +497 0 +355 1 +3244 19 +2364 3 +296 173 +5118 14 +2111 15 +380 173 +4252 11 +2426 1 +2240 0 +48 0 +2433 430 +866 431 +7831 9 +2221 4 +173 0 +4 0 +6517 3 +700 1 +1726 1 +968 0 +2402 2 +2574 1 +2725 0 +1432 3 +4655 2 +1221 3 +205 0 +1719 0 +128 0 +524 0 +23 0 +1533 13 +394 0 +467 0 +753 0 +295 0 +4267 2 +1729 1 +915 0 +5484 97 +9 0 +9 0 +580 0 +703 0 +872 0 +8 0 +3251 1 +12 0 +684 0 +336 0 +2638 0 +1276 0 +385 0 +4859 7 +1241 0 +2992 1 +3730 1 +13186 11968 +7749 11969 +10 0 +691 1 +4192 1 +680 0 +1352 2 +99 0 +3500 49 +52427 20 +94 0 +146 1 +8436 7 +489 1 +659 1 +39 0 +516 0 +186 0 +1366 0 +300 0 +1048 1 +1362 0 +10741 1 +1952 1 +153 0 +311 0 +11 0 +793 0 +3168 1 +248 0 +957 2 +2607 10 +576 0 +681 1 +564 0 +1465 2 +206 0 +16 0 +373 0 +710 0 +908 0 +1232 0 +5523 4 +813 0 +341 0 +389 0 +3085 5 +306 0 +1961 0 +1548 1 +773 0 +3390 4 +314 0 +1872 6 +252 0 +516 0 +673 1 +321 0 +979 1 +146 0 +75 0 +862 0 +500 0 +539 0 +154 0 +2360 1 +2543 4 +818 3 +4251 2 +5535 3 +7326 1 +2149 1 +8 0 +2346 15 +1082 1 +563 1 +4763 0 +932 1 +688 0 +1810 1 +451 0 +823 0 +571 1 +2872 1 +1072 0 +4597 22 +1128 1 +2077 2 +3 0 +728 0 +2178 2 +47 0 +1530 1 +1792 1 +3572 2 +544 0 +450 0 +1952 2 +3947 3 +37 0 +1841 0 +1372 1 +481 1 +546 0 +57 0 +2838 2 +305 0 +865 1 +106 1 +4607 12 +1104 0 +786 0 +366 1 +4520 3 +1756 1 +1996 0 +3011 2 +135190 198 +6678 1 +232 0 +152 0 +430 0 +261 0 +1284 1 +2105 2 +440 0 +274 0 +1595 0 +37 0 +1623 3 +643 1 +1448 1 +1478 0 +1898 0 +217 1 +1884 2 +47 0 +409 0 +1383 0 +368 0 +3721 4 +1512 0 +472 0 +125 0 +1124 1 +2408 2 +1520 4 +1839 2 +76 0 +1564 1 +1135 0 +1185 4 +3581 0 +2484 0 +808 0 +2217 6 +1045 0 +4935 8 +6212 2 +0 0 +49 0 +518 0 +147 0 +3284 0 +557 0 +1123 1 +63 0 +576 0 +451 0 +911 2 +439 0 +914 0 +273 0 +1279 2 +519 0 +1238 0 +163 0 +1359 0 +1153 11 +767 0 +2789 2 +6535 1 +8 0 +4919 6 +280 0 +228 1 +4 0 +62 0 +504 0 +12261 68 +8800 6 +3320 4 +252 104 +3 762 +102 2266 +7732 15 +1267 0 +1431 0 +2110 1 +781 0 +128 0 +2096 0 +1034 0 +2336 1 +2103 3 +4369 48 +168 48 +566 2 +999 0 +2206 2 +119 1 +568 4 +1667 0 +914 0 +1337 0 +232 0 +1484 0 +2255 47 +455 1 +1384 1 +3651 0 +402 0 +12310 8 +1622 0 +1108 4 +778 3 +2629 2 +1337 1 +1463 0 +2399 0 +1107 1 +422 0 +4833 8 +571 0 +1273 2 +544 1 +1074 0 +2490 0 +1431 0 +464 0 +731 0 +26 0 +1722 1 +143 0 +1289 5 +422 0 +604 2 +969 0 +63 0 +550 1 +251 0 +346 0 +294 0 +2393 1 +1870 0 +295 0 +688 0 +1386 1 +1197 1 +604 0 +309 0 +557 0 +373 0 +3968 7 +6047 9 +1326 0 +191 0 +322 0 +1588 3 +3023 1 +112 102 +1987 2 +2225 2 +2523 1 +350 0 +633 412 +1519 760 +5341 7 +1704 0 +673 1 +667 4 +323 1 +5482 1 +4081 3 +663 0 +1196 0 +1319 2 +6315 2 +789 2 +2 0 +686 0 +983 1 +6275 2 +1381 0 +2942 6 +4 0 +1196 3 +1463 3 +737 3 +2573 0 +407 1 +4082 5 +369 0 +729 0 +60 0 +2807 2 +845 0 +3060 10 +1152 0 +263 6 +1146 4 +300 0 +10371 2 +3483 1 +2615 2 +469 0 +422 0 +18766 19 +605 1 +1472 1 +347 0 +2583 2 +1653 0 +696 0 +2530 3 +2550 0 +8891 1123 +1552 1120 +1053 0 +1361 0 +678 0 +1527 2 +574 1 +872 0 +232 0 +639 0 +2110 5 +3346 3 +5462 32 +592 0 +2491 2 +1394 0 +100 0 +934 1 +2243 4 +4322 22 +2101 1 +2381 0 +2618 1 +7539 1 +570 0 +1812 6 +1578 2 +78 0 +2103 0 +2148 0 +2420 5 +2288 9 +755 0 +944 1 +883 0 +1033 0 +5104 4 +1 0 +498 0 +642 2 +5201 2 +1581 14 +252 11 +6478 3 +2105 2 +996 0 +1280 1 +0 18 +4205 21 +1652 1 +785 1 +2798 0 +0 0 +900 0 +1509 0 +15723 4 +306 0 +8174 9 +2151 0 +2249 4 +244 0 +778 1 +7 0 +1323 0 +657 1 +711 1 +62 0 +885 0 +2981 7 +907 1 +244 1 +4993 6 +793 0 +1671 1 +343 0 +431 0 +772 1 +158 0 +2998 1 +2639 0 +1446 4 +417 1 +616 0 +0 0 +240 0 +1875 1 +1420 0 +0 0 +866 0 +2274 6 +13516 3 +2461 0 +658 1 +1184 1 +889 0 +58 0 +122 1 +1351 0 +326 0 +6107 10 +1607 0 +2743 5 +2473 1 +450 0 +11 0 +973 1 +526 0 +652 0 +1310 1 +983 1 +913 1 +1263 2 +2397 2 +1695 0 +2295 2 +513 0 +584 4 +227 0 +588 0 +666 0 +417 0 +2379 2 +959 0 +987 1 +60 0 +572 4 +2408 0 +5062 6 +246 0 +9824 16 +893 0 +653 1 +1765 4 +784 0 +1146 1 +301 3 +939 3 +611 0 +393 0 +999 1 +414 0 +1155 0 +870 0 +1881 3 +382 3 +186 0 +2734 2 +294 1 +738 0 +770 1 +709 1 +1109 1 +943 2 +4 1482 +1726 0 +9383 6 +1203 0 +60 0 +174 1482 +767 1 +573 0 +5 0 +511 0 +11 0 +169 0 +3036 7 +389 0 +2494 1 +220 2 +4477 2 +8 0 +433 1 +454 1 +157 1 +2 0 +22 1 +913 0 +1057 3 +719 0 +430 2 +912 1 +1265 0 +982 0 +496 0 +462 0 +1063 1 +2908 0 +20110 66 +894 0 +609 2 +12474 5 +2336 2 +5151 0 +7320 3 +40 0 +696 0 +335 1 +219 0 +1041 0 +86 0 +97 0 +449 0 +47 0 +545 19 +293 20 +485 0 +5684 5 +521 0 +489 0 +1116 1 +2154 21 +183 1 +932 4 +4535 15 +593 2 +20451 2 +592 0 +2014 2 +843 0 +6832 2 +478 0 +729 3 +191 0 +567 2 +7438 0 +768 0 +6178 4 +2161 1 +1349 7 +2618 3 +76 15 +14 15 +23 0 +1367 0 +1134 0 +1175 3 +20210 55 +596 0 +955 2 +539 0 +8 0 +1169 1 +1076 71238 +533 0 +482 1 +223 0 +4009 3 +816 2 +1739 2 +313 0 +548 2 +1509 3 +1 0 +1210 1 +2694 2 +962 1 +274 0 +809 0 +97 0 +1144 0 +6 0 +398 0 +3724 1490 +1906 0 +1312 1 +4531 38 +4398 21 +1814 1 +688 2 +2288 1 +1134 1 +41 0 +1594 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +3 0 +0 0 +0 0 +4 0 +0 0 +5491 2 +10 0 +0 4 +0 4 +0 0 +0 0 +0 0 +0 0 +1 0 +0 0 +0 0 +412 1 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 +0 0 diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/aux_info/meta_info.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/aux_info/meta_info.json new file mode 100644 index 0000000000000000000000000000000000000000..1f596d161c4528b49783de541a74fd2d469c8ecd --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/aux_info/meta_info.json @@ -0,0 +1,50 @@ +{ + "salmon_version": "1.7.0", + "samp_type": "none", + "opt_type": "vb", + "quant_errors": [], + "num_libraries": 1, + "library_types": [ + "ISR" + ], + "frag_dist_length": 1001, + "frag_length_mean": 214.95860792419647, + "frag_length_sd": 16.578752825820798, + "seq_bias_correct": false, + "gc_bias_correct": false, + "num_bias_bins": 4096, + "mapping_type": "mapping", + "keep_duplicates": false, + "num_valid_targets": 5923, + "num_decoy_targets": 0, + "num_eq_classes": 11179, + "serialized_eq_classes": false, + "eq_class_properties": [ + "range_factorized", + "gzipped" + ], + "length_classes": [ + 669, + 1053, + 1479, + 2127, + 11412 + ], + "index_seq_hash": "521c4fd92100146ddba5122d99aa6494e7f6268f86c12cc107ce982f8cbdcfad", + "index_name_hash": "3bfae595a879cf68fb015e83d3b3b179b6626adfd02895a1aebcab510ac5cdd3", + "index_seq_hash512": "e4f0142d60affb6e0106a2ea42b62606cedd8d1ade45824ba8ea654fee0219acb88a2cd6bf49d22846a30d4ef3f8e82b7268cafcb57342780a56c1c5e358c812", + "index_name_hash512": "d8a1571371444ed2da49dab9e659625dd5be7f9394d0154cf01325199d053cc4077abbe5ca9f395476c8181935c169907a2c8d5a6184eb7795eb450517a1b2b3", + "index_decoy_seq_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "index_decoy_name_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "num_bootstraps": 0, + "num_processed": 13363832, + "num_mapped": 10760762, + "num_decoy_fragments": 0, + "num_dovetail_fragments": 37503, + "num_fragments_filtered_vm": 1581953, + "num_alignments_below_threshold_for_mapped_fragments_vm": 1883657, + "percent_mapped": 80.5215300521587, + "call": "quant", + "start_time": "Mon May 18 16:10:15 2026", + "end_time": "Mon May 18 16:10:45 2026" +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/cmd_info.json b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/cmd_info.json new file mode 100644 index 0000000000000000000000000000000000000000..9cde15f7aeb7362ac1b9806276fe3d3bc21b920b --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/cmd_info.json @@ -0,0 +1,10 @@ +{ + "salmon_version": "1.7.0", + "index": "salmon_index", + "libType": "A", + "mates1": "/225040511/project/bioagent-bench/dataset/deseq/data/SRR1278973_1.fastq", + "mates2": "/225040511/project/bioagent-bench/dataset/deseq/data/SRR1278973_2.fastq", + "output": "quant_SRR1278973", + "validateMappings": [], + "auxDir": "aux_info" +} \ No newline at end of file diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/libParams/flenDist.txt b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/libParams/flenDist.txt new file mode 100644 index 0000000000000000000000000000000000000000..f04fd48e9f4d54afdc340f1e57a303e0939c599c --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/libParams/flenDist.txt @@ -0,0 +1,2 @@ +3.41573e-42 5.09132e-42 7.57674e-42 1.12574e-41 1.66994e-41 2.47326e-41 3.65715e-41 5.39909e-41 7.95798e-41 1.17109e-40 1.72062e-40 2.52398e-40 3.69649e-40 5.40504e-40 7.89066e-40 1.15009e-39 1.67361e-39 2.43156e-39 3.52713e-39 5.10812e-39 7.38596e-39 1.06625e-38 1.53679e-38 2.21145e-38 3.1772e-38 4.55739e-38 6.52668e-38 9.33201e-38 1.33218e-37 1.8987e-37 2.70181e-37 3.83847e-37 5.44462e-37 7.71048e-37 1.09019e-36 1.53895e-36 2.16898e-36 3.05204e-36 4.28776e-36 6.01415e-36 8.42218e-36 1.17755e-35 1.64377e-35 2.29091e-35 3.18771e-35 4.42849e-35 6.14238e-35 8.50598e-35 1.17602e-34 1.62336e-34 2.23726e-34 3.0784e-34 4.22901e-34 5.80039e-34 7.94294e-34 1.08595e-33 1.48233e-33 2.02015e-33 2.74871e-33 3.73404e-33 5.06447e-33 6.85794e-33 9.27166e-33 1.25149e-32 1.68657e-32 2.26926e-32 3.04839e-32 4.08848e-32 5.47468e-32 7.31914e-32 9.76939e-32 1.30191e-31 1.7322e-31 2.30102e-31 7.20406e-11 7.12633e-09 1.46021e-07 5.1902e-07 7.84329e-07 7.47988e-07 9.41681e-07 1.40692e-06 1.37348e-06 1.18955e-06 1.96642e-06 2.94008e-06 2.88573e-06 2.21797e-06 5.1362e-06 2.05708e-05 4.70506e-05 6.7793e-05 7.52715e-05 7.54367e-05 7.3052e-05 7.36584e-05 7.86522e-05 8.15614e-05 8.13124e-05 7.92594e-05 7.44097e-05 7.2841e-05 7.8585e-05 8.29359e-05 8.00834e-05 7.52507e-05 7.29892e-05 7.33088e-05 7.41203e-05 7.32087e-05 7.16783e-05 6.96159e-05 6.49973e-05 6.11018e-05 6.08171e-05 6.08461e-05 6.01963e-05 6.03214e-05 6.02472e-05 5.99162e-05 5.94894e-05 5.72644e-05 5.49774e-05 5.57986e-05 5.78468e-05 5.69087e-05 5.24924e-05 5.00733e-05 5.22058e-05 5.43266e-05 5.48748e-05 5.52618e-05 5.51425e-05 5.57963e-05 5.95296e-05 6.36057e-05 6.23424e-05 5.82641e-05 5.7888e-05 5.97006e-05 6.01229e-05 6.0521e-05 6.29521e-05 6.56114e-05 6.5381e-05 6.34187e-05 6.29997e-05 6.35374e-05 6.1652e-05 5.99764e-05 6.54207e-05 7.77673e-05 9.10894e-05 9.74094e-05 9.40913e-05 9.08865e-05 9.50428e-05 0.000103732 0.000112456 0.000117592 0.000117952 0.000116576 0.000116135 0.000116928 0.000121704 0.000131058 0.000142164 0.00015524 0.00016584 0.000171378 0.000185216 0.000212977 0.00023929 0.000264554 0.000304467 0.000346267 0.000377951 0.000412652 0.000445847 0.000480482 0.000542309 0.000625324 0.000720622 0.000847107 0.00101737 0.00124279 0.00152075 0.00183067 0.00219433 0.0026662 0.00327176 0.00402706 0.00495559 0.00605967 0.00736581 0.00889744 0.0105803 0.0123127 0.0140262 0.0157243 0.0175278 0.0194365 0.0211901 0.0226544 0.0239724 0.0251928 0.0262176 0.0269753 0.0274543 0.0277294 0.0278729 0.0279475 0.0280544 0.0281809 0.0282555 0.0282938 0.0282046 0.0277965 0.0271665 0.0266474 0.0263219 0.0260342 0.0257077 0.0252081 0.0244237 0.0235151 0.0225624 0.0214895 0.020341 0.0191252 0.0178118 0.0164361 0.0149697 0.0134269 0.0119353 0.0105162 0.00913933 0.00784526 0.00664833 0.00553015 0.00450465 0.0036176 0.00291025 0.00235862 0.00189643 0.00150188 0.00118912 0.000949131 0.000757014 0.000601793 0.000475419 0.00036341 0.000265892 0.000195983 0.000152619 0.000119445 8.94213e-05 7.05894e-05 6.37494e-05 5.67762e-05 4.56628e-05 3.92052e-05 4.18909e-05 4.59548e-05 4.34733e-05 3.79938e-05 3.34774e-05 2.84769e-05 2.50048e-05 2.39036e-05 2.32444e-05 2.45137e-05 2.76307e-05 2.98101e-05 3.06252e-05 3.01184e-05 2.88515e-05 2.8245e-05 2.77448e-05 2.73183e-05 2.84761e-05 2.97008e-05 2.65121e-05 2.1818e-05 2.68339e-05 4.07889e-05 4.63674e-05 3.58522e-05 2.10874e-05 1.26497e-05 9.63179e-06 8.3462e-06 7.47946e-06 6.92501e-06 6.51116e-06 6.03786e-06 5.19839e-06 3.86195e-06 2.66905e-06 2.25692e-06 2.53464e-06 3.24295e-06 4.19023e-06 4.70222e-06 4.50263e-06 4.16232e-06 3.78172e-06 3.13332e-06 2.35125e-06 2.12636e-06 2.9396e-06 3.52637e-06 2.71888e-06 1.50675e-06 1.15894e-06 2.11365e-06 3.78024e-06 4.59176e-06 4.20501e-06 3.75209e-06 3.93822e-06 4.20597e-06 3.5427e-06 2.21141e-06 1.47207e-06 2.18195e-06 3.78103e-06 4.63247e-06 4.76444e-06 5.60856e-06 7.20896e-06 8.5586e-06 8.84312e-06 7.90503e-06 6.80943e-06 7.07459e-06 9.11303e-06 1.24214e-05 1.56494e-05 1.63009e-05 1.43662e-05 1.33504e-05 1.51517e-05 1.88243e-05 2.26557e-05 2.51439e-05 2.5136e-05 2.24167e-05 2.05668e-05 2.24285e-05 2.31527e-05 1.98882e-05 1.82677e-05 2.02482e-05 2.18721e-05 2.19337e-05 2.17169e-05 2.18172e-05 2.23926e-05 2.29908e-05 2.16412e-05 1.82406e-05 1.54093e-05 1.36633e-05 1.19527e-05 9.98529e-06 8.11806e-06 6.87137e-06 6.00627e-06 5.79611e-06 6.09985e-06 5.0802e-06 2.99643e-06 2.01657e-06 1.97346e-06 1.45588e-06 6.9139e-07 5.82421e-07 1.07177e-06 1.71092e-06 2.17318e-06 1.97163e-06 1.39858e-06 1.57829e-06 2.24752e-06 2.04779e-06 1.15725e-06 6.39011e-07 4.59205e-07 3.93763e-07 7.34341e-07 1.07942e-06 1.00808e-06 1.23724e-06 1.80878e-06 1.77105e-06 1.15178e-06 5.6911e-07 2.0134e-07 3.94538e-08 4.86094e-08 1.59752e-07 2.6361e-07 2.95399e-07 3.59214e-07 5.48358e-07 6.36161e-07 4.06175e-07 1.67858e-07 5.27835e-07 1.71959e-06 2.76461e-06 2.42896e-06 1.21186e-06 3.46279e-07 3.21281e-07 1.31791e-06 2.64239e-06 2.93027e-06 2.43704e-06 2.3058e-06 2.27731e-06 2.127e-06 2.73729e-06 3.91089e-06 4.21398e-06 3.40752e-06 2.9052e-06 3.52613e-06 4.43926e-06 5.21744e-06 6.29555e-06 7.83878e-06 8.99787e-06 8.04137e-06 5.77767e-06 4.55959e-06 4.29441e-06 4.5516e-06 5.20899e-06 5.57086e-06 6.04143e-06 6.55022e-06 6.07772e-06 5.48117e-06 5.68816e-06 5.91572e-06 6.07211e-06 6.31666e-06 6.17854e-06 6.01722e-06 6.17481e-06 6.54301e-06 7.49049e-06 7.98438e-06 6.42116e-06 4.1237e-06 2.90681e-06 2.69459e-06 3.0249e-06 2.92942e-06 2.06361e-06 1.6567e-06 1.91261e-06 1.90913e-06 1.78687e-06 2.00522e-06 1.95728e-06 1.32393e-06 9.06324e-07 1.15498e-06 1.80375e-06 2.22021e-06 1.73936e-06 8.80251e-07 6.88764e-07 8.69752e-07 7.69123e-07 7.44213e-07 9.67467e-07 1.18478e-06 1.4672e-06 1.52384e-06 1.15371e-06 1.1843e-06 1.91015e-06 2.22249e-06 1.68084e-06 1.19389e-06 1.00074e-06 5.93401e-07 2.34135e-07 3.27287e-07 4.77257e-07 4.37399e-07 5.69832e-07 7.46748e-07 5.28695e-07 1.81943e-07 4.72003e-08 2.81904e-08 4.83277e-08 1.01388e-07 1.23656e-07 8.43187e-08 1.85708e-07 6.19045e-07 1.02562e-06 1.08828e-06 1.0342e-06 9.81007e-07 8.79986e-07 7.12925e-07 4.35602e-07 1.67129e-07 2.04531e-07 6.54773e-07 9.67747e-07 6.57103e-07 1.80412e-07 1.02297e-08 5.759e-09 1.71649e-08 5.64445e-08 9.70236e-08 8.59401e-08 3.80452e-08 6.84459e-09 6.38238e-10 9.24713e-09 3.37834e-08 4.98668e-08 1.50848e-07 4.79138e-07 7.06283e-07 4.70855e-07 1.17714e-07 6.48462e-12 1.05984e-08 4.23294e-08 6.43749e-08 4.5949e-08 3.75016e-08 8.94567e-08 1.2962e-07 8.58047e-08 2.14511e-08 1.72425e-15 6.89699e-15 1.03455e-14 6.83448e-09 2.73379e-08 4.11412e-08 2.78757e-08 9.7436e-09 9.94351e-09 1.67331e-08 1.48454e-08 1.64077e-08 3.76852e-08 5.27362e-08 3.43917e-08 8.483e-09 4.13168e-29 4.13168e-29 2.11529e-13 2.4098e-11 9.42765e-11 2.73772e-08 1.10772e-07 1.70369e-07 1.19533e-07 3.49578e-08 2.92568e-09 7.96339e-10 1.48105e-09 5.84669e-09 1.2443e-08 1.69443e-08 1.30319e-07 4.67846e-07 6.91556e-07 4.60602e-07 1.75875e-07 2.38985e-07 3.57373e-07 2.39429e-07 6.40104e-08 6.18543e-09 3.99899e-09 1.18242e-09 1.85792e-08 7.32418e-08 1.12741e-07 8.55946e-08 4.31548e-08 4.54631e-08 7.50023e-08 7.94934e-08 1.04542e-07 2.47894e-07 3.54879e-07 2.36062e-07 5.95865e-08 2.28782e-09 3.95578e-09 1.42748e-07 5.57203e-07 8.33327e-07 5.57929e-07 1.44211e-07 9.47135e-08 3.64288e-07 5.44991e-07 3.63352e-07 9.08613e-08 1.75508e-11 1.1623e-11 9.90611e-12 7.50363e-12 3.70427e-10 1.46171e-09 1.41881e-08 4.94497e-08 7.23414e-08 7.25818e-08 1.10404e-07 1.47987e-07 1.49413e-07 2.25051e-07 3.10289e-07 2.45624e-07 1.48883e-07 1.60445e-07 1.90779e-07 1.37029e-07 1.03494e-07 2.36939e-07 3.82727e-07 3.11505e-07 1.30848e-07 5.67517e-08 1.49804e-07 3.18928e-07 3.51792e-07 3.27863e-07 5.68076e-07 8.54471e-07 1.07814e-06 1.74469e-06 2.338e-06 1.878e-06 1.02852e-06 7.09029e-07 5.69306e-07 2.77045e-07 7.76169e-08 1.59767e-07 4.97549e-07 7.20338e-07 5.22558e-07 2.06076e-07 6.21775e-08 1.67044e-08 4.80514e-10 6.59579e-11 9.89379e-11 6.596e-11 3.8639e-11 3.87814e-09 1.52911e-08 2.28316e-08 1.52033e-08 3.82405e-09 2.30067e-11 5.75166e-12 2.11974e-17 3.17962e-17 3.68862e-09 1.47545e-08 2.21317e-08 1.47545e-08 1.67438e-08 5.49537e-08 8.92628e-08 6.86184e-08 2.3987e-08 2.73298e-09 4.13113e-29 4.04913e-08 1.63752e-07 2.50097e-07 3.50008e-07 7.98388e-07 1.23159e-06 9.58115e-07 3.61658e-07 1.15258e-07 1.11728e-07 7.79867e-08 3.3283e-08 6.2124e-08 1.65844e-07 3.48592e-07 6.06642e-07 7.10328e-07 5.19691e-07 2.99278e-07 2.23451e-07 2.48162e-07 3.19146e-07 3.0024e-07 1.61776e-07 1.18156e-07 2.92955e-07 4.25338e-07 2.81092e-07 7.01755e-08 2.0029e-10 1.89937e-09 8.66381e-09 2.85603e-08 6.29428e-08 1.71867e-07 4.30379e-07 6.01075e-07 4.47961e-07 2.43367e-07 1.81374e-07 1.21413e-07 6.61414e-08 1.46169e-07 3.88905e-07 5.34449e-07 3.49812e-07 8.74804e-08 1.11726e-11 8.79863e-14 1.75121e-08 1.57484e-07 4.57056e-07 6.04435e-07 3.99718e-07 1.64374e-07 1.00516e-07 6.66778e-08 2.3147e-08 9.2244e-09 5.58803e-09 1.4978e-09 3.31542e-10 4.09121e-08 1.6272e-07 2.43957e-07 1.62682e-07 1.50519e-07 5.49198e-07 1.09941e-06 1.10107e-06 7.42825e-07 8.75632e-07 1.24605e-06 1.15586e-06 1.07333e-06 1.59823e-06 2.08201e-06 1.8435e-06 1.27723e-06 7.74935e-07 4.11857e-07 2.64176e-07 1.88738e-07 2.79717e-07 7.96172e-07 1.25957e-06 1.02288e-06 4.31729e-07 9.74878e-08 1.28122e-07 4.52583e-07 6.77264e-07 4.58477e-07 1.40601e-07 4.35522e-08 2.69947e-07 9.56238e-07 1.41548e-06 9.42677e-07 2.37196e-07 1.11194e-09 2.6222e-10 3.27335e-10 1.04712e-09 1.57068e-09 4.15158e-09 1.27121e-08 1.92783e-08 1.46991e-08 6.36392e-09 2.11881e-09 5.2158e-10 4.13072e-29 1.05594e-07 4.22377e-07 6.33564e-07 4.22376e-07 1.05594e-07 4.1307e-29 4.1307e-29 4.1307e-29 8.34308e-11 3.33723e-10 6.44628e-10 9.10043e-10 1.10841e-09 8.45928e-08 3.44006e-07 5.38492e-07 4.93721e-07 6.67778e-07 1.16027e-06 1.22578e-06 8.15178e-07 6.88349e-07 8.0477e-07 7.30457e-07 6.60033e-07 7.7456e-07 8.65293e-07 7.01316e-07 3.56335e-07 1.47716e-07 1.24372e-07 1.13674e-07 1.28587e-07 2.3247e-07 3.2568e-07 3.84828e-07 5.46629e-07 7.28679e-07 7.92207e-07 7.70212e-07 6.76335e-07 6.63266e-07 7.35247e-07 7.45563e-07 8.23367e-07 8.33994e-07 7.3127e-07 9.40144e-07 1.34202e-06 1.57664e-06 1.48165e-06 9.75801e-07 5.92799e-07 5.86501e-07 5.80901e-07 6.53609e-07 7.41209e-07 4.77404e-07 1.19351e-07 5.62085e-18 4.27598e-09 1.71039e-08 2.56557e-08 3.71385e-08 8.44144e-08 1.20208e-07 8.01384e-08 2.00346e-08 4.13047e-29 4.13045e-29 4.13045e-29 4.13044e-29 4.13044e-29 4.13043e-29 2.04519e-08 8.18076e-08 1.5376e-07 2.06001e-07 2.06742e-07 1.24194e-07 3.10484e-08 4.13038e-29 4.13038e-29 4.13038e-29 4.13038e-29 4.13038e-29 4.13038e-29 4.14801e-08 1.6592e-07 2.4888e-07 1.6592e-07 4.148e-08 4.13037e-29 4.13036e-29 4.13033e-29 4.13032e-29 4.13031e-29 4.13031e-29 4.13031e-29 4.13031e-29 4.1303e-29 4.1303e-29 4.1303e-29 1.06351e-11 4.25405e-11 6.45619e-11 4.55455e-11 1.51426e-11 3.00503e-12 7.51259e-13 4.13028e-29 4.13026e-29 4.13026e-29 4.13026e-29 4.13025e-29 4.13025e-29 4.13025e-29 4.13025e-29 4.13024e-29 4.13024e-29 6.43643e-08 2.57457e-07 3.86186e-07 2.58391e-07 6.80987e-08 5.60163e-09 3.73442e-09 9.33606e-10 3.22335e-16 4.13024e-29 4.13024e-29 5.92402e-11 2.36961e-10 3.55441e-10 2.36961e-10 5.92402e-11 3.79964e-11 1.51986e-10 2.27978e-10 1.51986e-10 3.79964e-11 4.13023e-29 4.13023e-29 4.13023e-29 2.38088e-14 9.52353e-14 1.42853e-13 9.52353e-14 1.85207e-09 1.38028e-08 3.66909e-08 4.57761e-08 6.6301e-08 1.61884e-07 2.33254e-07 1.56525e-07 4.28853e-08 7.22145e-09 8.93977e-09 8.45563e-09 1.63897e-07 7.24176e-07 1.30295e-06 1.1604e-06 5.09239e-07 2.3547e-07 5.90416e-07 8.85448e-07 5.90301e-07 1.53175e-07 2.23926e-08 3.35896e-08 7.10317e-08 2.00145e-07 3.04065e-07 2.43535e-07 1.22414e-07 5.01573e-08 1.39976e-08 1.2064e-09 1.95212e-07 7.79284e-07 1.16873e-06 7.79085e-07 1.9477e-07 2.04848e-08 8.18544e-08 1.22739e-07 8.1812e-08 2.04509e-08 1.29652e-07 5.18614e-07 7.77932e-07 5.18636e-07 1.3011e-07 1.76551e-09 2.79424e-09 2.37169e-09 1.35622e-09 + diff --git a/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/logs/salmon_quant.log b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/logs/salmon_quant.log new file mode 100644 index 0000000000000000000000000000000000000000..53977864add6d2e1e6e0f1232b159870aebab5d2 --- /dev/null +++ b/react_code_bioagent_deepseek/runs/deseq_20260518_160703/quant_SRR1278973/logs/salmon_quant.log @@ -0,0 +1,139 @@ +[2026-05-18 16:10:15.988] [jointLog] [info] setting maxHashResizeThreads to 104 +[2026-05-18 16:10:15.988] [jointLog] [info] Fragment incompatibility prior below threshold. Incompatible fragments will be ignored. +[2026-05-18 16:10:15.988] [jointLog] [info] Usage of --validateMappings implies use of minScoreFraction. Since not explicitly specified, it is being set to 0.65 +[2026-05-18 16:10:15.988] [jointLog] [info] Setting consensusSlack to selective-alignment default of 0.35. +[2026-05-18 16:10:15.988] [jointLog] [info] parsing read library format +[2026-05-18 16:10:15.988] [jointLog] [info] There is 1 library. +[2026-05-18 16:10:15.989] [jointLog] [info] Loading pufferfish index +[2026-05-18 16:10:15.989] [jointLog] [info] Loading dense pufferfish index. +[2026-05-18 16:10:16.028] [jointLog] [info] done +[2026-05-18 16:10:16.111] [jointLog] [info] Index contained 5923 targets +[2026-05-18 16:10:16.112] [jointLog] [info] Number of decoys : 0 +[2026-05-18 16:10:16.687] [jointLog] [info] Automatically detected most likely library type as ISR + +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.08% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.96% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.96% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.10% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.72% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.80% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.96% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.92% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.02% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.06% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.12% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.92% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.76% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.80% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.96% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.02% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.74% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.78% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.10% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 2.08% zero probability fragments +[2026-05-18 16:10:44.795] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.86% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.92% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.76% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.74% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.92% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 2.06% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.92% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.796] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.797] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.797] [jointLog] [info] Thread saw mini-batch with a maximum of 1.80% zero probability fragments +[2026-05-18 16:10:44.802] [jointLog] [info] Thread saw mini-batch with a maximum of 1.88% zero probability fragments +[2026-05-18 16:10:44.802] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.804] [jointLog] [info] Thread saw mini-batch with a maximum of 2.18% zero probability fragments +[2026-05-18 16:10:44.805] [jointLog] [info] Thread saw mini-batch with a maximum of 1.92% zero probability fragments +[2026-05-18 16:10:44.808] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.811] [jointLog] [info] Thread saw mini-batch with a maximum of 2.02% zero probability fragments +[2026-05-18 16:10:44.811] [jointLog] [info] Thread saw mini-batch with a maximum of 1.94% zero probability fragments +[2026-05-18 16:10:44.815] [jointLog] [info] Thread saw mini-batch with a maximum of 1.90% zero probability fragments +[2026-05-18 16:10:44.822] [jointLog] [info] Thread saw mini-batch with a maximum of 1.78% zero probability fragments +[2026-05-18 16:10:44.822] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.827] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.832] [jointLog] [info] Thread saw mini-batch with a maximum of 2.04% zero probability fragments +[2026-05-18 16:10:44.840] [jointLog] [info] Thread saw mini-batch with a maximum of 1.84% zero probability fragments +[2026-05-18 16:10:44.841] [jointLog] [info] Thread saw mini-batch with a maximum of 1.82% zero probability fragments +[2026-05-18 16:10:44.843] [jointLog] [info] Thread saw mini-batch with a maximum of 2.02% zero probability fragments +[2026-05-18 16:10:44.847] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.848] [jointLog] [info] Thread saw mini-batch with a maximum of 1.98% zero probability fragments +[2026-05-18 16:10:44.849] [jointLog] [info] Thread saw mini-batch with a maximum of 2.00% zero probability fragments +[2026-05-18 16:10:44.852] [jointLog] [info] Thread saw mini-batch with a maximum of 1.80% zero probability fragments +[2026-05-18 16:10:45.534] [fileLog] [info] +At end of round 0 +================== +Observed 13363832 total fragments (13363832 in most recent round) + +[2026-05-18 16:10:45.534] [jointLog] [info] Computed 11179 rich equivalence classes for further processing +[2026-05-18 16:10:45.534] [jointLog] [info] Counted 10760762 total reads in the equivalence classes +[2026-05-18 16:10:45.674] [jointLog] [info] Number of mappings discarded because of alignment score : 1883657 +[2026-05-18 16:10:45.674] [jointLog] [info] Number of fragments entirely discarded because of alignment score : 1581953 +[2026-05-18 16:10:45.674] [jointLog] [info] Number of fragments discarded because they are best-mapped to decoys : 0 +[2026-05-18 16:10:45.674] [jointLog] [info] Number of fragments discarded because they have only dovetail (discordant) mappings to valid targets : 37503 +[2026-05-18 16:10:45.674] [jointLog] [info] Mapping rate = 80.5215% + +[2026-05-18 16:10:45.674] [jointLog] [info] finished quantifyLibrary() +[2026-05-18 16:10:45.675] [jointLog] [info] Starting optimizer +[2026-05-18 16:10:45.679] [jointLog] [info] Marked 0 weighted equivalence classes as degenerate +[2026-05-18 16:10:45.679] [jointLog] [info] iteration = 0 | max rel diff. = 1429.16 +[2026-05-18 16:10:45.747] [jointLog] [info] iteration = 100 | max rel diff. = 3.36962 +[2026-05-18 16:10:45.748] [jointLog] [info] iteration = 102 | max rel diff. = 0.00213954 +[2026-05-18 16:10:45.748] [jointLog] [info] Finished optimizer +[2026-05-18 16:10:45.748] [jointLog] [info] writing output + diff --git a/react_code_bioagent_deepseek/scripts/evaluate_bioagent_bench.sh b/react_code_bioagent_deepseek/scripts/evaluate_bioagent_bench.sh new file mode 100644 index 0000000000000000000000000000000000000000..3d2947c7dffe16f8f3e77dd6bd7b9fb170dcade1 --- /dev/null +++ b/react_code_bioagent_deepseek/scripts/evaluate_bioagent_bench.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_ROOT="/225040511/project/react_code_bioagent_deepseek" +PYTHON_BIN="${PYTHON_BIN:-/225040511/miniconda3/envs/biomni_e1/bin/python}" + +cd "${PROJECT_ROOT}" +"${PYTHON_BIN}" -m react_code_bioagent.evaluate "$@" + diff --git a/react_code_bioagent_deepseek/scripts/run_bioagent_bench_deepseek.sh b/react_code_bioagent_deepseek/scripts/run_bioagent_bench_deepseek.sh new file mode 100644 index 0000000000000000000000000000000000000000..28d15821f756b05937eec8e87a50f169ca577776 --- /dev/null +++ b/react_code_bioagent_deepseek/scripts/run_bioagent_bench_deepseek.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_ROOT="/225040511/project/react_code_bioagent_deepseek" +PYTHON_BIN="${PYTHON_BIN:-/225040511/miniconda3/envs/biomni_e1/bin/python}" + +cd "${PROJECT_ROOT}" + +RUNNER_ARGS=() +if [[ "${BIOAGENT_SKIP_COMPLETED:-1}" != "0" ]]; then + RUNNER_ARGS+=(--skip-completed) +fi +RUNNER_ARGS+=("$@") + +"${PYTHON_BIN}" -m react_code_bioagent.runner "${RUNNER_ARGS[@]}" + diff --git a/react_code_bioagent_deepseek/scripts/run_bioagent_llm_eval_table.sh b/react_code_bioagent_deepseek/scripts/run_bioagent_llm_eval_table.sh new file mode 100644 index 0000000000000000000000000000000000000000..9882734b736efd1a491ef72d2155d14246b54686 --- /dev/null +++ b/react_code_bioagent_deepseek/scripts/run_bioagent_llm_eval_table.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_ROOT="/225040511/project/react_code_bioagent_deepseek" +PYTHON_BIN="${PYTHON_BIN:-/225040511/miniconda3/envs/biomni_e1/bin/python}" +RUNS_ROOT="${RUNS_ROOT:-${PROJECT_ROOT}/runs}" +RESULTS_ROOT="${RESULTS_ROOT:-${PROJECT_ROOT}/results}" + +if [[ -z "${DEEPSEEK_API_KEY:-}" ]]; then + echo "Missing DEEPSEEK_API_KEY" >&2 + exit 2 +fi + +export DEEPSEEK_BASE_URL="${DEEPSEEK_BASE_URL:-https://api.deepseek.com/v1}" +export DEEPSEEK_MODEL_NAME="${DEEPSEEK_MODEL_NAME:-deepseek-chat}" + +mkdir -p "${RESULTS_ROOT}" +OUT="${RESULTS_ROOT}/bioagent_bench_llm_eval_$(date -u +%Y%m%d_%H%M%S).json" + +cd "${PROJECT_ROOT}" +"${PYTHON_BIN}" -m react_code_bioagent.evaluate \ + --all \ + --runs-root "${RUNS_ROOT}" \ + --judge-mode llm \ + --llm-provider deepseek \ + --llm-model "${DEEPSEEK_MODEL_NAME}" \ + --llm-base-url "${DEEPSEEK_BASE_URL}" \ + --llm-api-key "${DEEPSEEK_API_KEY}" \ + --output "${OUT}" + +"${PYTHON_BIN}" - <<'PY' +import json +from pathlib import Path + +results_root = Path("/225040511/project/react_code_bioagent_deepseek/results") +out = sorted(results_root.glob("bioagent_bench_llm_eval_*.json"))[-1] +obj = json.loads(out.read_text()) +order = [ + "alzheimer-mouse", + "comparative-genomics", + "cystic-fibrosis", + "deseq", + "evolution", + "giab", + "metagenomics", + "single-cell", + "transcript-quant", + "viral-metagenomics", +] +idx = {r["task_id"]: r for r in obj["results"]} + +print(f"source: {out}") +print("| Method | " + " | ".join(order) + " |") +print("|---|" + "|".join(["---:"] * len(order)) + "|") +print( + "| React-code (LLM Eval) | " + + " | ".join(f"{idx[t]['evaluation_results']['results_match']:.4f}" for t in order) + + " |" +) + +csv_path = out.with_name(out.stem + "_table.csv") +with csv_path.open("w", encoding="utf-8") as f: + f.write("Method," + ",".join(order) + "\n") + f.write( + "React-code (LLM Eval)," + + ",".join(f"{idx[t]['evaluation_results']['results_match']:.4f}" for t in order) + + "\n" + ) +print(f"csv: {csv_path}") +PY diff --git a/react_code_bioagent_deepseek/scripts/run_labbench_base_llm.sh b/react_code_bioagent_deepseek/scripts/run_labbench_base_llm.sh new file mode 100644 index 0000000000000000000000000000000000000000..e5fb293a03830eeab042bab33fac2d2927683027 --- /dev/null +++ b/react_code_bioagent_deepseek/scripts/run_labbench_base_llm.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_ROOT="/225040511/project/react_code_bioagent_deepseek" +PYTHON_BIN="${PYTHON_BIN:-/225040511/miniconda3/envs/biomni_e1/bin/python}" + +cd "${PROJECT_ROOT}" +"${PYTHON_BIN}" -m react_code_bioagent.labbench_runner "$@" diff --git a/react_code_bioagent_deepseek/scripts/run_labbench_base_llm_hypo_consistent.sh b/react_code_bioagent_deepseek/scripts/run_labbench_base_llm_hypo_consistent.sh new file mode 100644 index 0000000000000000000000000000000000000000..5ad53755faade6e250eca31085d630bc4ce6e768 --- /dev/null +++ b/react_code_bioagent_deepseek/scripts/run_labbench_base_llm_hypo_consistent.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_ROOT="/225040511/project/react_code_bioagent_deepseek" +LAB_BENCH_ROOT="/225040511/project/LAB-Bench" +PYTHON_BIN="${LAB_BENCH_RUNNER_PYTHON:-${BIOMNI_EXECUTION_PYTHON:-/225040511/miniconda3/envs/biomni_e1/bin/python}}" +RUNNER_MODULE="react_code_bioagent.labbench_runner" + +DEV_SIZE="${LAB_BENCH_DEV_SIZE:-45}" +TEST_SIZE="${LAB_BENCH_TEST_SIZE:-315}" +SEED="${LAB_BENCH_SUBSET_SEED:-20260514}" +N_THREADS="${LAB_BENCH_N_THREADS:-1}" +TEST_SHARD_COUNT="${LAB_BENCH_TEST_SHARD_COUNT:-10}" +SPLITS_TEXT="${LAB_BENCH_SPLITS:-test}" + +BACKGROUND=1 +RESUME=1 +while [[ $# -gt 0 ]]; do + case "$1" in + --foreground) + BACKGROUND=0 + shift + ;; + --background) + BACKGROUND=1 + shift + ;; + --fresh) + RESUME=0 + shift + ;; + --resume) + RESUME=1 + shift + ;; + *) + echo "Unknown argument: $1" >&2 + exit 2 + ;; + esac +done + +if [[ "${BACKGROUND}" -eq 1 ]]; then + SCRIPT_ABS_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" + FORWARD_ARGS=(--foreground) + if [[ "${RESUME}" -eq 0 ]]; then + FORWARD_ARGS+=(--fresh) + else + FORWARD_ARGS+=(--resume) + fi + nohup "${SCRIPT_ABS_PATH}" "${FORWARD_ARGS[@]}" > /dev/null 2>&1 < /dev/null & + echo "Started LAB-Bench base LLM Hypo-consistent run in the background." + echo "PID: $!" + exit 0 +fi + +for ENV_FILE in "${PROJECT_ROOT}/.env" "${LAB_BENCH_ROOT}/.env"; do + if [[ -f "${ENV_FILE}" ]]; then + set -a + # shellcheck disable=SC1090 + source "${ENV_FILE}" + set +a + fi +done + +if [[ -z "${DEEPSEEK_API_KEY:-}" && -z "${BIOMNI_CUSTOM_API_KEY:-}" && -z "${OPENAI_API_KEY:-}" ]]; then + echo "No LLM API key found. Set DEEPSEEK_API_KEY, BIOMNI_CUSTOM_API_KEY, or OPENAI_API_KEY." >&2 + exit 2 +fi + +export DEEPSEEK_MODEL_NAME="${DEEPSEEK_MODEL_NAME:-deepseek-chat}" +export DEEPSEEK_BASE_URL="${DEEPSEEK_BASE_URL:-https://api.deepseek.com/v1}" +read -r -a SPLIT_ARRAY <<< "${SPLITS_TEXT}" + +run_eval_batch() { + local eval_name="$1" + local eval_lower="$2" + local output_root="${PROJECT_ROOT}/labbench_runs/base_llm/${eval_lower}_batch" + local result_file="${output_root}/${eval_lower}_results.jsonl" + local reasoning_log="${output_root}/${eval_lower}_reasoning.log" + + mkdir -p "${output_root}" + if [[ "${RESUME}" -eq 0 ]]; then + : > "${result_file}" + : > "${reasoning_log}" + else + touch "${result_file}" "${reasoning_log}" + fi + + declare -a child_pids=() + for (( shard_index=0; shard_index "${shard_output_root}.log" 2>&1 & + child_pids+=("$!") + done + + for pid in "${child_pids[@]}"; do + wait "${pid}" + done + + echo "${eval_name} complete: ${result_file}" +} + +cd "${PROJECT_ROOT}" +run_eval_batch "DbQA" "dbqa" +run_eval_batch "SeqQA" "seqqa" diff --git a/react_code_bioagent_deepseek/scripts/run_llm_eval_similarity_only.sh b/react_code_bioagent_deepseek/scripts/run_llm_eval_similarity_only.sh new file mode 100644 index 0000000000000000000000000000000000000000..8d6274db6c5bb2d184ee28f5bd577ae4bceb86a3 --- /dev/null +++ b/react_code_bioagent_deepseek/scripts/run_llm_eval_similarity_only.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_ROOT="/225040511/project/react_code_bioagent_deepseek" +PYTHON_BIN="${PYTHON_BIN:-/225040511/miniconda3/envs/biomni_e1/bin/python}" +RUNS_ROOT="${RUNS_ROOT:-${PROJECT_ROOT}/runs}" +RESULTS_ROOT="${RESULTS_ROOT:-${PROJECT_ROOT}/results}" + +if [[ -z "${DEEPSEEK_API_KEY:-}" ]]; then + echo "Missing DEEPSEEK_API_KEY" >&2 + exit 2 +fi + +export DEEPSEEK_BASE_URL="${DEEPSEEK_BASE_URL:-https://api.deepseek.com/v1}" +export DEEPSEEK_MODEL_NAME="${DEEPSEEK_MODEL_NAME:-deepseek-chat}" + +mkdir -p "${RESULTS_ROOT}" +OUT="${RESULTS_ROOT}/bioagent_bench_llm_eval_selected_$(date -u +%Y%m%d_%H%M%S).json" + +cd "${PROJECT_ROOT}" +"${PYTHON_BIN}" -m react_code_bioagent.evaluate \ + --runs-root "${RUNS_ROOT}" \ + --judge-mode llm \ + --llm-provider deepseek \ + --llm-model "${DEEPSEEK_MODEL_NAME}" \ + --llm-base-url "${DEEPSEEK_BASE_URL}" \ + --llm-api-key "${DEEPSEEK_API_KEY}" \ + --task alzheimer-mouse \ + --task comparative-genomics \ + --task cystic-fibrosis \ + --task deseq \ + --task evolution \ + --task giab \ + --task metagenomics \ + --task single-cell \ + --task transcript-quant \ + --task viral-metagenomics \ + --output "${OUT}" + +export OUT +"${PYTHON_BIN}" - <<'PY' +import json +import os +from pathlib import Path + +p = Path(os.environ["OUT"]) +obj = json.loads(p.read_text()) +order = [ + "alzheimer-mouse", + "comparative-genomics", + "cystic-fibrosis", + "deseq", + "evolution", + "giab", + "metagenomics", + "single-cell", + "transcript-quant", + "viral-metagenomics", +] +idx = {r["task_id"]: r for r in obj["results"]} + +print("source:", p) +print("| " + " | ".join(order) + " |") +print("|" + "|".join(["---:"] * len(order)) + "|") +print("| " + " | ".join(f"{idx[t]['evaluation_results']['results_match']:.4f}" for t in order) + " |") +PY +