Hi Darya,
Thank you for your question about maintaining the BLAT alignment
track coloring in a custom track.
The instructions provided in that answer will produce a custom track
that contains only the regions that were cover by the resulting BLAT
hits. As you noted, this is because you are converting your PSL
alignment into a bigBed file that is absent of the
match/mismatch/etc. information.
We have a format that is currently under development called bigPsl
that will provide you with the display you are interested in. There
is no official documentation currently for this format, but support
exists for in the Genome Browser. We hope to have this documentation
available sometime in the future. Here is a set of instructions that
you can use to create a bigPsl custom track from your PSL results:
1. Save the results of your BLAT search to a file as indicated in
steps 1 and 2 of this previous mailing list question:
https://groups.google.com/a/soe.ucsc.edu/forum/#!topic/genome/u6UmVz06Mis
2. Take the sequences that you used to create those BLAT results and
place them in a FASTA formatted file. You can more on the FASTA
format here:
http://genetics.bwh.harvard.edu/pph/FASTA.html. Ensure
that the sequence names used in your FASTA file are the same as
those in the qName (column 10) field of the PSL file of your BLAT
results.
3. Download the utilities pslToBigPsl and bedToBigBed from our
downloads server:
http://hgdownload.soe.ucsc.edu/admin/exe/
4. Run the pslToBigPsl to create your bigPsl file:
pslToBigPsl -fa=yourFastaFile.fa yourBlatResults.psl stdout |
sort -k1,1 -k2,2n > yourBlatResults.bigPslInput
Here, "yourFastaFile.fa" is the FASTA file you created in step 2 and
"yourBlatResults.psl" is the file you created in step 1.
5. Next convert this bigPsl file into a special bigBed file for
loading as a custom track. This will be a special bigBed file that
will contain all of the information needed to display the
matches/mismatches/etc. You can use the following command to carry
out this conversion:
bedToBigBed -type=bed12+12 -tab -as=bigPsl.as
yourBlatResults.bigPslInput chrom.sizes myBigPsl.bb
Here "yourBlatResults.bigPslInput" is the file you created in step
4. The chrom.sizes file for mm10 can be found here:
http://hgdownload.soe.ucsc.edu/goldenPath/mm10/bigZips/mm10.chrom.sizes.
I've also attached the bigPsl.as file you will need for this step to
this email.
6. Lastly, upload your custom track to the Genome Browser. You can
use something like the following track line to do so:
track name="BLAT Results" description="BLAT Results in bigPsl
Format" type=bigPsl
bigDataUrl=
http://yoursite/path/to/file/myBigPsl.bb
Here "myBigPsl.bb" is the file you created in step 5. Note that even
though we've created a bigBed file, the "type=bigPsl" in the track
line is what tells the browser to interpret and display the file as
a PSL.
I hope this is helpful. If you have any further questions, please
reply to
gen...@soe.ucsc.edu. All messages sent to that address are
archived on a publicly-accessible Google Groups forum. If your
question includes sensitive data, you may send it instead to
genom...@soe.ucsc.edu.
Matthew Speir
UCSC Genome Bioinformatics Group