{"id":51083041,"url":"https://github.com/griffan/agenticigv","last_synced_at":"2026-06-23T20:01:07.427Z","repository":{"id":351239653,"uuid":"1210108123","full_name":"Griffan/AgenticIGV","owner":"Griffan","description":"Agentic IGV is a LangGraph-powered, multi-agent chat assistant for visualizing BAM alignment files.  Users load a genomic region, inspect coverage and read pileups via an embedded IGV.js browser, and ask questions in natural language.","archived":false,"fork":false,"pushed_at":"2026-06-01T00:57:03.000Z","size":41441,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T02:18:25.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Griffan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-14T05:08:19.000Z","updated_at":"2026-06-01T00:57:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Griffan/AgenticIGV","commit_stats":null,"previous_names":["griffan/agenticigv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Griffan/AgenticIGV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Griffan%2FAgenticIGV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Griffan%2FAgenticIGV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Griffan%2FAgenticIGV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Griffan%2FAgenticIGV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Griffan","download_url":"https://codeload.github.com/Griffan/AgenticIGV/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Griffan%2FAgenticIGV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34704748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-23T20:01:06.140Z","updated_at":"2026-06-23T20:01:07.410Z","avatar_url":"https://github.com/Griffan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agentic IGV\n\nA LangGraph-powered, multi-agent chat assistant for visualizing BAM alignment files. Load a region, inspect coverage and read pileups, and ask for context in natural language.\n\n## Features\n- LangGraph multi-agent pipeline: intent parsing, BAM retrieval, response drafting\n- **Intelligent chat interface**: Ask questions in natural language about your alignments\n- FastAPI backend with chat and region endpoints\n- IGV.js browser embedded in the UI for full alignment visualization\n- Dual runtime modes:\n  - `Path` mode: existing server-side BAM/BAI access via filesystem paths\n  - `Edge` mode: browser-local BAM/BAI loading with local feature extraction for chat\n- **Fully offline**: No network required after setup; IGV.js runs locally\n- Supports custom FASTA references or reference-free viewing\n- **LLM-powered analysis**: Get intelligent insights about coverage, reads, and quality (when OPENAI_API_KEY is set)\n\n## Requirements\n- Python 3.10+\n- A BAM file with a matching .bai index\n- Optional: FASTA reference file with .fai index for nucleotide display\n\n## Setup\n\n1. Create a virtual environment:\n\n```{bash}\n    python -m venv .venv\n```\n\n```{bash}\n    source .venv/bin/activate\n```\n\n2. Install dependencies:\n\n```{bash}\n   pip install -r requirements.txt\n```\n\n3. Copy environment template and add your key (optional for basic summaries):\n\n```{bash}\n   cp .env.example .env\n```\n\n## Run\n\n1. Start the API server\n\n```{bash}\nuvicorn app.main:app --reload --port 8000\n```\n\n2. SSH Tunneling (optional if running on a remote server)\n\n```{bash}\nssh -L 8000:localhost:8000 user@remote-server-address\n```\n\n3. Access the UI\n\n```{bash}\nOpen http://localhost:8000 in your browser.\n```\n\n## Usage\n1. Choose mode:\n  - `Path`: provide BAM path (and optional FASTA path)\n  - `Edge`: select local BAM + BAI files (drag/drop supported)\n2. Enter a region (example: `20:59000-61000` or `chr1:1000-2000`).\n3. Click \"Load region\" to populate tracks.\n- **Chat with your data**: Ask questions like:\n  - \"Load \"resource/test.bam\" and \"resource/test2.bam\" in region 20:56000-65000\"\n  - \"Show me region 20:59000-61000\"\n  - \"What's the coverage like?\"\n  - \"How many reads are there?\"\n  - \"What's the average mapping quality?\"\n  - \"Are reads evenly distributed across strands?\"\n\n**Quick test with tracked sample BAM:**\n```\nBAM: resource/test.bam\nFASTA: resource/chr20.fa\nRegion: 20:59000-61000\nChat: \"Analyze the coverage in this region\"\n```\n\n## Notes\n- The BAM index must exist next to the BAM file (sample.bam.bai or sample.bai).\n- Edge mode requires both `.bam` and `.bai` files loaded in the browser.\n- In Edge mode, chat sends extracted region-level read/coverage signals to backend analysis (no server BAM path required).\n- Edge mode keeps BAM parsing local in the browser; chat/variant response generation still runs through backend APIs.\n- If using a FASTA reference, ensure the .fai index exists (create with `samtools faidx`).\n- Coverage is capped to 2000 points for fast rendering.\n- **LLM Chat Features**:\n  - Without OPENAI_API_KEY: Basic pattern-matching responses\n  - With OPENAI_API_KEY: Intelligent analysis and natural language understanding\n  - The system works fully offline, LLM is optional for enhanced chat\n- IGV.js runs completely offline using local files via /api/file and /api/index endpoints.\n- IGV.js library is bundled in static/ and requires no external network calls.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgriffan%2Fagenticigv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgriffan%2Fagenticigv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgriffan%2Fagenticigv/lists"}