Skip to content

Gene names and intervals from genomic DNA: parameters and notes

See the tutorial for usage and examples.

Each function includes its purpose, API, inputs, outputs, example code and result description. Prepare any required credentials, local files and optional dependencies; remote results vary with database releases and query time.

Each function includes its purpose, API, inputs, outputs, example code and result description. Prepare any required credentials, local files and optional dependencies; remote results vary with database releases and query time.

Retrieve a cross-species gene family tree

dnakit.databases.ensembl_compara_get_gene_tree(*, gene, species=None, verbose=True)

Parameter Type Required / default Description and constraints
gene string Required Gene symbol or Ensembl gene ID. Examples: 'TP53', 'BRCA1', 'ENSG00000141510'. Ensembl IDs are more reliable than symbols for gene tree retrieval.
species string None Species (default: 'human'). Used when providing a gene symbol. Examples: 'human', 'mouse'.
verbose bool True Progress flag.

Retrieve orthologous genes across species

dnakit.databases.ensembl_compara_get_orthologues(*, gene, species=None, target_species=None, target_taxon=None, verbose=True)

Parameter Type Required / default Description and constraints
gene string Required Gene symbol or Ensembl gene ID. Examples: 'BRCA1', 'TP53', 'ENSG00000141510', 'ENSG00000012048'.
species string None Source species (default: 'human'). Examples: 'human', 'mouse', 'zebrafish', 'drosophila_melanogaster'.
target_species string None Target species to limit orthologue search. Examples: 'mouse', 'zebrafish', 'rat', 'drosophila_melanogaster'. Default: all species.
target_taxon integer None NCBI taxon ID to limit orthologue search. Examples: 10090 (mouse), 7955 (zebrafish), 7227 (fruit fly). Alternative to target_species.
verbose bool True Progress flag.

Retrieve paralogous genes

dnakit.databases.ensembl_compara_get_paralogues(*, gene, species=None, verbose=True)

Parameter Type Required / default Description and constraints
gene string Required Gene symbol or Ensembl gene ID. Examples: 'TP53', 'BRCA1', 'ENSG00000141510'.
species string None Species (default: 'human'). Examples: 'human', 'mouse', 'zebrafish'.
verbose bool True Progress flag.

Retrieve gene homology by symbol

dnakit.databases.ensembl_get_homology(*, species, symbol, target_species=None, target_taxon=None, type=None, sequence=None, aligned=None, verbose=True)

Parameter Type Required / default Description and constraints
species string Required Source species (e.g., 'human', 'homo_sapiens')
symbol string Required Gene symbol (e.g., 'BRCA2', 'TP53')
target_species string None Target species to find homologues in (optional, e.g., 'mouse', 'mus_musculus'). Leave empty to search all species.
target_taxon string None Target taxonomic group (optional, e.g., 'Mammalia', 'Primates')
type string None Homology type: 'orthologues' (different species), 'paralogues' (same species), 'all' (both)
sequence string None Include sequences in response
aligned boolean None Return aligned sequences
verbose bool True Progress flag.

Retrieve annotations overlapping a genomic interval

dnakit.databases.ensembl_get_overlap_features(*, species, region, feature=None, biotype=None, verbose=True)

Parameter Type Required / default Description and constraints
species string Required Species (e.g., 'human', 'homo_sapiens')
region string Required Genomic region (e.g., '7:140424943-140624564')
feature string None Feature type to retrieve
biotype string None Filter by biotype (optional, e.g., 'protein_coding', 'lincRNA', 'miRNA')
verbose bool True Progress flag.

Retrieve regulatory features in a genomic interval

dnakit.databases.ensembl_get_regulatory_features(*, region, species=None, feature, verbose=True)

Parameter Type Required / default Description and constraints
region string Required Genomic region in format 'chromosome:start-end' (e.g., '1:1000000-2000000')
species string None Species name (default 'human')
feature string Required Feature type (must be 'regulatory' for this tool)
verbose bool True Progress flag.

Look up Ensembl genes by identifier or symbol

dnakit.databases.ensembl_lookup_gene(*, gene_id=None, species=None, id=None, verbose=True)

Parameter Type Required / default Description and constraints
gene_id string None Ensembl gene ID or symbol (e.g., 'ENSG00000139618' or 'BRCA1'). If using a stable ID, the tool will automatically route to /lookup/id endpoint.
species string None Species name required for gene symbols (default 'homo_sapiens'). Examples: 'homo_sapiens', 'mus_musculus', 'rattus_norvegicus'
id string None DNAKit optional alias for gene_id
verbose bool True Progress flag.

Retrieve HGNC annotations by official gene symbol

dnakit.databases.hgnc_fetch_gene_by_symbol(*, symbol, verbose=True)

Parameter Type Required / default Description and constraints
symbol string Required Official HGNC gene symbol. Examples: 'TP53', 'BRCA1', 'EGFR', 'INS', 'ACE2'.
verbose bool True Progress flag.

Batch-query gene annotations and identifier mappings

dnakit.databases.my_gene_batch_query(*, gene_ids, species=None, fields=None, verbose=True)

Parameter Type Required / default Description and constraints
gene_ids array Required List of gene IDs to query. Can mix different ID types (Entrez, Ensembl, symbols). {"items": {"type": "string"}}
species string None Species filter for the query.
fields string None Comma-separated list of fields to return for each gene.
verbose bool True Progress flag.

Retrieve comprehensive annotations for a gene identifier

dnakit.databases.my_gene_get_gene_annotation(*, gene_id, fields=None, verbose=True)

Parameter Type Required / default Description and constraints
gene_id string Required Gene ID to query. Can be Entrez Gene ID (e.g., '1017' for CDK2) or Ensembl ID (e.g., 'ENSG00000123374').
fields string None Comma-separated list of fields to return. Available fields include: symbol, name, summary, go (gene ontology), pathway (KEGG/Reactome), interpro (protein domains), generif (gene references), pdb, uniprot.
verbose bool True Progress flag.

Search genes by keyword or identifier

dnakit.databases.my_gene_query_genes(*, query=None, species=None, fields=None, size=None, q=None, verbose=True)

Parameter Type Required / default Description and constraints
query string None Search query. Can be gene symbol (e.g., 'CDK2'), name ('cyclin dependent kinase'), Entrez ID ('1017'), or Ensembl ID ('ENSG00000123374'). Supports wildcards (*) and boolean operators (AND, OR, NOT).
species string None Species filter. Use common name or NCBI taxonomy ID. Examples: 'human', 'mouse', '9606' (human), 'all'.
fields string None Comma-separated list of fields to return. Common fields: symbol, name, entrezgene, ensembl.gene, summary, go, pathway, interpro.
size integer None Maximum number of results to return (1-100).
q string None DNAKit optional alias for query
verbose bool True Progress flag.

Retrieve gene details by NCBI Gene ID

dnakit.databases.ncbidatasets_get_gene(*, gene_id, verbose=True)

Parameter Type Required / default Description and constraints
gene_id string Required NCBI Gene ID (numeric). Examples: '7157' (TP53), '672' (BRCA1), '3630' (INS), '22059' (mouse Trp53).
verbose bool True Progress flag.

Look up NCBI genes by symbol and organism

dnakit.databases.ncbidatasets_get_gene_by_symbol(*, symbol, taxon=None, organism=None, species=None, verbose=True)

Parameter Type Required / default Description and constraints
symbol string Required Gene symbol. Examples: 'TP53', 'BRCA1', 'INS', 'EGFR'. {"minLength": 1, "pattern": ".\S."}
taxon string None Organism as common name or taxonomy ID. Examples: 'human', 'mouse', 'rat', '9606', '10090'. Default: 'human' (reported as metadata.query_taxon_defaulted). Synonyms organism and species are accepted. {"minLength": 1, "pattern": ".\S."}
organism string None Synonym for taxon. Used when taxon is not supplied. {"minLength": 1, "pattern": ".\S."}
species string None Synonym for taxon. Used when neither taxon nor organism is supplied. {"minLength": 1, "pattern": ".\S."}
verbose bool True Progress flag.

Retrieve orthologs for an NCBI Gene ID

dnakit.databases.ncbidatasets_get_orthologs(*, gene_id, page_size=None, verbose=True)

Parameter Type Required / default Description and constraints
gene_id string Required NCBI Gene ID (numeric). Examples: '7157' (TP53), '672' (BRCA1), '3630' (INS).
page_size integer None Maximum number of orthologs to return (1-100). Default: 20.
verbose bool True Progress flag.

Retrieve NCBI gene summaries and functional information

dnakit.databases.ncbigene_get_summary(*, id, verbose=True)

Parameter Type Required / default Description and constraints
id string Required NCBI Gene ID (Entrez Gene ID). Can be a single ID or comma-separated list. Examples: '7157' (TP53), '672' (BRCA1), '1956' (EGFR), '3845' (KRAS). Get IDs from NCBIGene_search.
verbose bool True Progress flag.

Search NCBI Gene IDs by organism and keyword

dnakit.databases.ncbigene_search(*, term, retmax=None, verbose=True)

Parameter Type Required / default Description and constraints
term string Required Search query. Use gene symbol with organism filter for best results. Format: 'GENE[Symbol] AND Organism[Organism]'. Examples: 'TP53[Symbol] AND Homo sapiens[Organism]', 'BRCA1[Symbol] AND Homo sapiens[Organism]', 'insulin AND Homo sapiens[Organism]', 'EGFR AND Mus musculus[Organism]'.
retmax integer None Maximum number of results to return (default 10, max 100).
verbose bool True Progress flag.

Retrieve MANE transcripts and RefSeq mappings

dnakit.databases.tark_get_mane_transcripts(*, gene=None, ensembl_id=None, refseq_id=None, verbose=True)

Parameter Type Required / default Description and constraints
gene string | null None HGNC gene symbol, e.g. 'BRCA2', 'CFTR'.
ensembl_id string | null None Ensembl transcript id, e.g. 'ENST00000380152' (version optional).
refseq_id string | null None RefSeq transcript id, e.g. 'NM_000059' (version optional).
verbose bool True Progress flag.

Retrieve archived Ensembl transcript records

dnakit.databases.tark_get_transcript(*, stable_id, verbose=True)

Parameter Type Required / default Description and constraints
stable_id string Required Ensembl transcript stable id, e.g. 'ENST00000380152' (version optional).
verbose bool True Progress flag.

Retrieve gene transcripts and MANE annotations

dnakit.databases.variant_validator_gene2transcripts(*, gene_symbol, gene=None, gene_name=None, transcript_set=None, genome_build=None, verbose=True)

Parameter Type Required / default Description and constraints
gene_symbol string Required HGNC gene symbol (e.g., 'TP53', 'BRCA1', 'EGFR'). Aliases: gene, gene_name.
gene string None Alias for gene_symbol.
gene_name string None Alias for gene_symbol.
transcript_set string None Transcript filter: 'mane' for MANE Select/Plus Clinical only, 'refseq' for RefSeq transcripts, 'ensembl' for Ensembl, 'all' for everything
genome_build string None Reference genome assembly: 'GRCh37' or 'GRCh38' (default: GRCh38)
verbose bool True Progress flag.