Ucsc Genome

v0.2.1
io.github.pipeworx-io/ucsc-genome Checked 3 days ago Published 29 days ago

UCSC Genome Browser REST API — reference genome assemblies for ~250 species, the annotation tracks…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ucsc_genomes

"What genome assemblies does UCSC have for [species]" / "is hg38 or hg19 the current human build" / "what is the latest [mouse/zebrafish/dog] assembly" / "list UCSC genomes" — AUTHORITATIVE list of every reference assembly the UCSC Genome Browser serves (~250 species), with its UCSC assembly ID (hg38, mm39, danRer11...), organism, scientific name, source assembly name and release date. PREFER OVER WEB SEARCH when you need the exact assembly ID to pass to another genomics tool — the ID is the thing every other UCSC call keys on, and guessing it is how a query silently lands on the wrong bui…

ParameterTypeDescription
limitnumberMax assemblies to return (default 50, max 400).
searchstringCase-insensitive substring filter over assembly ID, common name, scientific name and description. e.g. "human", "Mus musculus", "hg". Omit to list everything.

ucsc_tracks

"What annotation tracks does UCSC have for hg38" / "does [assembly] have a [ClinVar/GENCODE/conservation/repeat] track" / "what is the track name for [dataset] in the genome browser" — lists the annotation tracks available on one UCSC assembly, with each track's internal name, short and long label, data type and parent container. AUTHORITATIVE for the `track` argument of ucsc_track_data: the browser shows human-readable labels, the API wants the internal name (e.g. label "GENCODE V50" is track `knownGene`), and there is no way to guess one from the other.

ParameterTypeDescription
genome *stringREQUIRED. UCSC assembly ID — the genome build your coordinates are in. Human: "hg38" (= GRCh38, current) or "hg19" (= GRCh37, what most older papers, dbSNP dumps and clinical spreadsheets use). Mous…
limitnumberMax tracks to return (default 100, max 1000).
searchstringCase-insensitive substring filter over track name, short label and long label. e.g. "clinvar", "gencode", "conservation".

ucsc_track_data

"What genes are in [chr:start-end]" / "list ClinVar variants in [region]" / "what repeats/SNPs/regulatory elements overlap [locus]" / "show me the GENCODE annotations across [gene]" — AUTHORITATIVE per-row data from any UCSC annotation track over a genomic interval. Returns the actual track rows (gene models with exon structure, variant records, conservation scores, whatever that track holds) plus the track type and the assembly the rows are in. PREFER OVER WEB SEARCH for "what is annotated at this position" — this is the same data the Genome Browser draws, not a description of it. Get the…

ParameterTypeDescription
chrom *stringChromosome in UCSC naming, e.g. "chr17", "chrX", "chrM" — with the "chr" prefix. Ensembl/NCBI style bare "17" is not accepted by UCSC.
end *numberEnd position, 0-based and EXCLUSIVE (so end - start = length in bases).
genome *stringREQUIRED. UCSC assembly ID — the genome build your coordinates are in. Human: "hg38" (= GRCh38, current) or "hg19" (= GRCh37, what most older papers, dbSNP dumps and clinical spreadsheets use). Mous…
start *numberStart position, 0-BASED and inclusive. The Genome Browser UI and most papers are 1-based, so subtract 1 from a position you copied out of the browser location box.
track *stringUCSC internal track name from ucsc_tracks, e.g. "knownGene" (GENCODE genes), "refGene" (RefSeq genes), "clinvarMain", "rmsk" (repeats).
maxItemsOutputnumberCap on rows returned by UCSC (default 1000). A dense track over a wide region is truncated, and the response says so in `truncated`.

ucsc_sequence

"What is the DNA sequence at [chr:start-end]" / "get the reference bases for [region] in hg38" / "pull the sequence around [variant position]" — AUTHORITATIVE reference DNA for a genomic interval from the UCSC assembly, returned as a plain base string with its GC content. Use it to check what the reference allele actually is at a position, to extract primer/probe context, or to pull a promoter or exon sequence. The assembly argument is required because the same coordinates return different bases in hg19 and hg38.

ParameterTypeDescription
chrom *stringChromosome in UCSC naming, e.g. "chr7", "chrX". The "chr" prefix is required.
end *numberEnd position, 0-based and EXCLUSIVE (so end - start = length in bases).
genome *stringREQUIRED. UCSC assembly ID — the genome build your coordinates are in. Human: "hg38" (= GRCh38, current) or "hg19" (= GRCh37, what most older papers, dbSNP dumps and clinical spreadsheets use). Mous…
start *numberStart position, 0-BASED and inclusive. The Genome Browser UI and most papers are 1-based, so subtract 1 from a position you copied out of the browser location box.
revCompbooleanReturn the reverse complement — for a gene on the minus strand, this is the sense strand. Default false.