genomic-coordinates

Convert genomic intervals between coordinate conventions and detect assembly or contig-naming mismatches.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/Mzane0803/latent-minds-skills-marketplace --skill genomic-coordinates-mzane0803
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: genomic-coordinates
Source: https://github.com/Mzane0803/latent-minds-skills-marketplace/tree/main/plugins/genomics/skills/genomic-coordinates
Command: npx skills add https://github.com/Mzane0803/latent-minds-skills-marketplace --skill genomic-coordinates-mzane0803

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Coordinate errors are the quietest class of bug in genomics: an off-by-one BED file parses and intersects without complaint, a GRCh37 VCF joined against GRCh38 annotation returns rows, and a right-shifted indel silently fails to match its ClinVar entry. This Skill converts intervals between coordinate conventions correctly, normalizes variant representations, and audits files for convention violations before they corrupt an analysis. ## Core Features & Use Cases - Coordinate Conversion: Convert intervals between BED, GFF/GTF, VCF, SAM/BAM, WIG, PSL, genePred, Picard interval_list, and region strings, reconciling 0-based half-open with 1-based inclusive conventions. - Variant Normalization: Trim and left-align indels against a reference FASTA, split multi-allelic records, and check whether two variant records describe the same change. - Assembly and Convention Auditing: Identify GRCh37 vs hg19 vs GRCh38 vs T2T from contig lengths, detect chr-prefix mismatches, and audit BED/GTF/VCF files for convention violations as a CI gate. - Use Case: Before joining a cohort VCF against a GENCODE annotation, run the contig check to confirm both files use the same assembly and naming scheme, then normalize the variants so indel lookups against ClinVar actually match. ## Quick Start Ask the AI to convert chr7:5,530,601-5,530,625 from UCSC browser coordinates to BED format and audit your peaks.bed file for coordinate convention violations.

Frequently Asked Questions about genomic-coordinates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert between BED and GFF coordinate systems?▼

Convert BED to GFF by subtracting 1 from the start only: BED is 0-based half-open while GFF is 1-based inclusive, and the end coordinate never changes. The convert_coords.py script handles this via a canonical 0-based half-open form for any format pair.

How to normalize and left-align indels in a VCF file?▼

Normalize indels by trimming shared flanking bases to parsimony, then left-aligning against the reference FASTA, the procedure bcftools norm implements. The normalize_variant.py script checks each REF against the FASTA first and requires splitting multi-allelic records before normalizing.

What is the difference between GRCh37 and hg19?▼

GRCh37 and hg19 differ only in the mitochondrion: hg19 uses the 16,571 bp NC_001807 sequence while GRCh37 uses the 16,569 bp rCRS. Nuclear coordinates are identical, so mixed pipelines run fine and only mitochondrial variant results are wrong.

Why does my VCF join against annotation return wrong results?▼

Wrong join results usually come from a chr-prefix mismatch, an assembly mismatch, or unnormalized indels that fail to match equivalent records. The check_contigs.py script reports naming style, assembly identity, and coordinates past contig ends for each file before you join.

Does this require third-party Python packages or network access?▼

No third-party packages or network access are required; the scripts use only the Python 3.11+ standard library. Variant normalization needs a local reference FASTA and uses its .fai index for random access when one is present.

When should I not convert genomic coordinates by hand?▼

Avoid manual conversion for transcript, CDS, and protein positions, since c. notation counts spliced bases in transcription order and depends on a versioned transcript accession. Use a tool holding the transcript model such as VEP, bcftools csq, Mutalyzer, or the hgvs package.