Skip to content

Genome Aliases

Genome aliases provide human-readable names for reference genomes, mapping them to their underlying cryptographic digests. Instead of referring to genomes by their unique digest strings (e.g., a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7), you can use memorable names like hg38, mm10, or GRCh38.

Refgenie identifies genomes by their content-derived digest - a unique hash computed from the genome’s sequences. While digests guarantee uniqueness and enable compatibility checking, they are difficult to remember and type. Aliases solve this problem by providing:

  • Human-readable names: Use familiar names like hg38 or mm10 instead of digest strings
  • Multiple aliases per genome: A single genome can have multiple aliases (e.g., hg38, GRCh38, human)
  • Consistent references: Once set, aliases work throughout refgenie commands

To see all configured aliases, use the alias get command:

Terminal window
refgenie alias get

This displays a table showing all aliases and their corresponding genome digests:

Terminal window
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Alias ┃ Genome Digest ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ hg38 │ a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7 │
│ GRCh38 │ a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7 │
│ mm10 │ c3d45e6f7a8b9c0d1e2f3a4b5c6d7e8f │
└───────────┴──────────────────────────────────┘

To look up the digest for specific aliases:

Terminal window
refgenie alias get -a hg38 GRCh38

To find all aliases for a specific genome digest:

Terminal window
refgenie alias get -g a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7

To assign an alias to a genome, use the alias set command with the -a (alias) and -d (digest) options:

Terminal window
refgenie alias set -a hg38 -d a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7

You can set multiple aliases for the same genome in a single command:

Terminal window
refgenie alias set -a hg38 GRCh38 human -d a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7

The --reset flag removes all existing aliases for a genome before setting new ones:

Terminal window
refgenie alias set -a hg38_v2 -d a5b35a4c5b27c7f3e8e2f4c3a1b2d9e7 --reset

This is useful when you want to rename a genome or consolidate aliases. Without --reset, new aliases are added to any existing ones.

To remove aliases, use the alias remove command:

Terminal window
refgenie alias remove -a hg38

You can remove multiple aliases at once:

Terminal window
refgenie alias remove -a hg38 GRCh38

Once set, aliases can be used anywhere a genome identifier is expected:

Terminal window
# Pull an asset using an alias
refgenie pull hg38/fasta
# List assets for an aliased genome
refgenie list -g hg38
# Get sequence using an alias
refgenie getseq -g hg38 -l chr1:1-100
# Compare genomes using aliases
refgenie compare hg38 mm10

List aliases with optional filtering.

Terminal window
refgenie alias get [-a ALIASES...] [-g DIGESTS...]
OptionDescription
-a, --aliasesFilter by specific alias names
-g, --genome-digestsFilter by specific genome digests

Set one or more aliases for a genome digest.

Terminal window
refgenie alias set -a ALIASES... -d DIGEST [--reset]
OptionDescription
-a, --aliasesOne or more alias names to set (required)
-d, --digestGenome digest to associate with the aliases
-r, --resetRemove all existing aliases before setting new ones
-f, --forceForce the action if genome does not exist

Remove one or more aliases.

Terminal window
refgenie alias remove -a ALIASES...
OptionDescription
-a, --aliasesOne or more alias names to remove (required)