Creating bigPsl track for UCSC genome browser

Starting point is to have a psl file.

Its also needed to have in your path pslToBigPsl, bedToBigBed, and chrom.sizes file.

The Makefile to automatize it is:


PSL=$(wildcard *.psl)
TXT:=$(addsuffix .txt, $(basename $(PSL)))
BB:=$(addsuffix .bb,$(basename $(TXT)))

.PHONY: all clear

all: $(BB)

%.txt: %.psl
        pslToBigPsl $< stdout | sort -k1,1 -k2,2n > $@ %.txt
        wget -c && \
        bedToBigBed -type=bed12+13 -tab $< chrom.sizes $@

        rm *.txt && \
        rm *.bb

A trackDb.ra snippet:

track FOOBAR
parent foo
shortLabel FOOBAR
longLabel FOOBAR
group genes
priority 4
visibility dense
color 51,153,255
altcolor 0,102,0
searchTable FOOBAR
searchType bigBed
searchMethod prefix
maxWindowToDraw 10000000
colorByStrand 50,50,150 150,50,50
type bigBed 6 +
bigDataUrl /gbdb/foo/bar
spectrum on


UCSC Genome Browser – bigPsl

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s