Chrom Alias: Difference between revisions

From genomewiki
Jump to navigationJump to search
(adding track hub genome example)
(add bigBed note)
Line 57: Line 57:
  htmlPath html/GCF_000001405.39_GRCh38.p13.description.html
  htmlPath html/GCF_000001405.39_GRCh38.p13.description.html


Working examples:
[https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/405/GCF_000001405.39/hub.txt hub.txt]
  [https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/405/GCF_000001405.39/GCF_000001405.39.chromAlias.txt chromAlias.txt]
  [https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/405/GCF_000001405.39/GCF_000001405.39.chromAlias.txt chromAlias.txt]
== best performance ==
For best usage performance, the chromAlias.txt file can be converted to a '''bigBed''' format
file to allow appropriate searching for names without reading the entire text file.  This is
important for assemblies with high count numbers of sequences.  The perl script:
  [https://genome-source.gi.ucsc.edu/gitlist/kent.git/blob/master/src/hg/utils/automation/aliasTextToBed.pl aliasTextToBed.pl]
can convert the chromAlias.txt file into a bed file and the bigBed file:
  aliasTextToBed.pl -chromSizes=asmId.chrom.sizes -aliasText=asmId.chromAlias.txt \
    -aliasBed=asmId.chromAlias.bed -aliasAs=asmId.chromAlias.as -aliasBigBed=asmId.chromAlias.bb
The inputs are the chrom.sizes and the chromAlias.txt files, the outputs are the chromAlias.bed,
chromAlias.as and chromAlias.bb file.

Revision as of 21:52, 6 May 2022

Usage

The chrom alias mechanism functions automatically in the genome browser for custom track data and track hub data. It will convert chromosome names from alternate naming schemes to the names used in the assembly in the genome browser.

Format

The first line of the chromAlias.txt file begins with the pound symbol # followed by a blank space. Subsequent words, separated by a tab character, on this first line are the identification of the source authority for names in that column of the file. The first column set of names are the names of sequences used in the genome browser sequence. Subsequent columns are alternate naming schemes.

The lines following that first column header title line are columns of sequence names separated by a tab character. For the case of no equivalent name in that name space, the column is empty, there will be two adjacent tab characters.

Example

# ucsc  assembly        genbank ncbi    refseq
chr1    1       CM000663.2      1       NC_000001.11
chr10   10      CM000672.2      10      NC_000010.11
chrX    X       CM000685.2      X       NC_000023.11
chrM    MT      J01415.2        MT      NC_012920.1

In this example the columns are:

  1. ucsc - UCSC style chrN names
  2. assembly - names from NCBI file assembly_report.txt
  3. genbank - INSDC names
  4. ncbi - from chr2acc file in assembly_structure/ hierarchy
  5. refseq - names from RefSeq annotations

track hub

To use the chromAlias.txt file in a track hub, in the genome stanza, specify

 chromAlias thisGenome.chromAlias.txt

which is a relative path reference from this hub.txt file.

For example:

genome GCF_000001405.39
taxId 9606
groups groups.txt
description human
twoBitPath GCF_000001405.39.2bit
twoBitBptUrl GCF_000001405.39.2bit.bpt
chromSizes GCF_000001405.39.chrom.sizes.txt
chromAlias GCF_000001405.39.chromAlias.txt
organism human
defaultPos chr1:82985474-82995474
scientificName Homo sapiens
htmlPath html/GCF_000001405.39_GRCh38.p13.description.html

Working examples:

hub.txt
chromAlias.txt

best performance

For best usage performance, the chromAlias.txt file can be converted to a bigBed format file to allow appropriate searching for names without reading the entire text file. This is important for assemblies with high count numbers of sequences. The perl script:

 aliasTextToBed.pl

can convert the chromAlias.txt file into a bed file and the bigBed file:

 aliasTextToBed.pl -chromSizes=asmId.chrom.sizes -aliasText=asmId.chromAlias.txt \
   -aliasBed=asmId.chromAlias.bed -aliasAs=asmId.chromAlias.as -aliasBigBed=asmId.chromAlias.bb

The inputs are the chrom.sizes and the chromAlias.txt files, the outputs are the chromAlias.bed, chromAlias.as and chromAlias.bb file.