genomic-coordinates
Convert genomic intervals between coordinate conventions, normalise and compare variant representations, and detect assembly or contig-naming mismatches before they corrupt an analysis. Use whenever coordinates cross a format, tool, or assembly boundary - converting between BED, GFF/GTF, VCF, SAM/BAM, WIG, PSL, genePred, Picard interval_list, or region strings; reconciling 0-based half-open with 1-based inclusive; left-aligning or trimming indels; checking whether two variant records describe the same change; mapping genomic to transcript, CDS, or protein positions; auditing a BED/GTF/VCF for
npx skills add K-Dense-AI/scientific-agent-skills --skill genomic-coordinates --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Genomic Coordinates ## When to use Any time a coordinate crosses a boundary: between two file formats, between two tools, between two assemblies, or between the genome and a transcript. ## The rule **A coordinate is three facts, not one: the number, the convention it is written in, and the assembly it was measured against.** Carry all three or the number is not interpretable. Coordinate errors are the quietest class of bug in genomics. An off-by-one BED file parses, sorts, and intersects without complaint. A GRCh37 VCF joined against a GRCh38 annotation returns rows. A right-shifted indel simply fails to match its entry in ClinVar, and the result is a variant reported as novel. Nothing raises an error; the answer is just wrong, and it is wrong in a direction that looks plausible. So: convert with the table, not from memory, and verify against the reference whenever a reference is available. ## The two conversions ``` 1-based inclusive -> 0-based half-open : start - 1, end 0-based half-open -> 1-based inclusive : start + 1, end ``` The end coordinate never moves. If a conversion changed both numbers, it is wrong. ## Which format is which | 0-based, half-open | 1-based, inclusive |
- When to use
- The rule
- The two conversions
- Which format is which
- Variants are not intervals
- Check the assembly before trusting a join
- Audit a file against its own format
- Transcript, CDS, and protein positions
- Reporting results
- References
cd skills/genomic-coordinates/scripts python3 convert_coords.py --list # the table python3 convert_coords.py --from bed --to gff chr1 999 1000 python3 convert_coords.py --from ucsc --to bed "chr7:5,530,601-5,530,625" python3 convert_coords.py --from granges --to pyranges --input regions.tsv python3 normalize_variant.py --fasta ref.fa chr1 7 CAC C python3 normalize_variant.py --fasta ref.fa --split --input cohort.vcf python3 normalize_variant.py --fasta ref.fa --compare chr1:7:CAC:C chr1:2:GCA:G python3 check_contigs.py --identify unknown.fa.fai python3 check_contigs.py variants.vcf annotation.gtf --genome GRCh38.fa.fai
What does the genomic-coordinates skill do?
Convert genomic intervals between coordinate conventions, normalise and compare variant representations, and detect assembly or contig-naming mismatches before they corrupt an analysis. Use whenever coordinates cross a format, tool, or assembly boundary - converting between BED, GFF/GTF, VCF, SAM/BAM, WIG, PSL, genePred, Picard interval_list, or region strings; reconciling 0-based half-open with 1-based inclusive; left-aligning or trimming indels; checking whether two variant records describe the same change; mapping genomic to transcript, CDS, or protein positions; auditing a BED/GTF/VCF for
How do I install it?
Run `npx skills add K-Dense-AI/scientific-agent-skills --skill genomic-coordinates --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
