Welcome to the Genome Toolbox! I am glad you navigated to the blog and hope you find the contents useful and insightful for your genomic needs. If you find any of the entries particularly helpful, be sure to click the +1 button on the bottom of the post and share with your colleagues. Your input is encouraged, so if you have comments or are aware of more efficient tools not included in a post, I would love to hear from you. Enjoy your time browsing through the Toolbox.
Showing posts with label track. Show all posts
Showing posts with label track. Show all posts

Monday, July 14, 2014

Add Custom BedGraph Track to UCSC Genome Browser

Previously, I made a post on adding custom tracks to the UCSC Genome Broswer and have even expanded on coloring these tracks.  For most of my applications, I have simply used standard .bed files that plot features of interest in the Genome Browser in relation to other UCSC tracks.  Today I wanted to plot data from overlapping features in a depth plot similar to what one would see after next-generation sequencing.  I found the easiest way to do this was by importaing a BedGraph file into the Genome Browser.  Following steps similar to the custom tracks post, you go to the My Data -> Custom Tracks -> Add Custom Tracks and then upload the BedGraph file.  Below is an example of what the header and the first few lines need to look like.


More details and options on the BedGraph track format can be found here on the UCSC webpage.

Friday, April 4, 2014

Merge Changes from Multiple Word Files into One Document

Collaborations get you access to lots of data.  However, collaborations lead to long author lists; long author lists lead to many comments from co-authors; and many comments from co-authors can lead to great headaches trying to track changes and get a final clean manuscript together.  Well, fortunately Microsoft Word has a built in feature that enables users to merge changes together from many different contributors into one master document (.doc or .docx file).  This is done iteratively, two at a time, until all the comments from reviewers are in one merged MS Word document.  To do this follow these steps:


1) Open a blank document in Microsoft Word
2) Go to the Review tab and click the Compare icon and then select Combine....
3) In the dialogue box that pops up, input your original file name in the Original document field and one of the changed document file names into the Revised document field.
4) Click on the more button and ensure the the radio button next to Original document is selected under the Show changes in... heading.
5) Click OK and a document will be generated that merges changes from your original and revised document.
6) Repeat steps 2-5, over again for each revised document you want to combine with the merged document.

It is a bit repetitive, but eventually all the changes from each file will be combined and tracked into one master document.  Ideally, the developers at Microsoft will improve the functionality of this so that many changes from many documents can be merged into one document in a single step.  A final note is that Word can only store one set of formatting changes at a time, so if formatting does change from draft to draft a dialogue box will appear asking you which formatting you want to use.  Hope this saves you a lot of time and frustration.

Wednesday, August 14, 2013

UCSC Tools for BigWig Files

Several UCSC data tracks are downloaded in BigWig format (.bw).  This is a compressed file that cannot be read by common text editors.  Rather, you need to use utilities built to handle these files.  Several are available at the ftp website: http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/.  Here are a few UNIX programs I have found useful:

bigWigAverageOverBed bigWigSummary

Download Data Track from UCSC Genome Browser

Did you know you can download tracks you visualize in the UCSC Genome Browser for personal use and analysis?  Here's how to do it.

(1) Click on the grey bar on the far left side of the UCSC data track.  This will bring you to the track settings page.
(2) Click on the link called View table schema.  This will bring up a new page with track information and a description of data fields.
(3) Look for the field called Primary Table and copy the name.
(4) Go to the UCSC FTP site (link) and find the correct genome build you are after.  Usually you will want to select hg19 or hg18.
(5) Click on the database link and then search for the name of the field you copied from the Primary Table field in step 3.
(6) There will usually be a .sql and a .txt.gz for most tracks.  You are interested in the .txt.gz file.  You can click on it to download via your internet web browser or right click on the link to copy the web address and use the wget command to download it.  Here's and example script to download the NHGRI GWAS catalog using the wget command:
(7) Extract the compressed .txt.gz file with the following command, where filename is the name of the file you downloaded

This method should work for downloading the majority of the UCSC data tracks.  Sometimes it takes a bit of digging around the UCSC FTP site to find the dataset you are looking for, but in most cases I have been successful in finding it on the UCSC FTP site.

One final note:  If you are interested in downloading only a small portion of the track (for example, just a region on chromosome 8), you can download this region using the UCSC Table browser.  Here's how to do this:

(1) Follow steps (1) and (2) above.
(2) Once on the Table Schema page for the track of interest go to the link bar on the top of the page and select Tools > Table Browser.  This will take you to the UCSC Table Browser where all the fields will already be filled in with the track you are interested in.
(3) To download your region of interest click on the radio button next to position and type in your desired coordinates (ex: chr8:128362121-129551294).
(4) Make sure all the filters are cleared and give your output a filename.  Select get output and your file will be downloaded.  There is no need to unzip unless you chose the gzip compressed option.

Best wishes and good luck analyzing UCSC data tracks!

Tuesday, May 28, 2013

Custom Tracks in UCSC Genome Browser

One of my colleagues recently shared a web link to a custom track they had uploaded and visualized on the standard UCSC Genome Browser.  A bit impressed, I looked into how to do this myself.  UCSC has a pretty informative webpage detailing how to add custom tracks to Genome Browser.  Here's a quick summary of what you need to do.

First get your data in one of the formats supported by Genome Browser (.gtf, .gff, .bed, .wig, or .psl).  I usually prefer .bed when appropriate.  Next login to your account on Genome Browser.  If you don't have an account, sign up for a free one here.  Then go to the UCSC Add Custom Tracks link.  Select the appropriate genome and assembly and then upload your data under the "Paste URLs or data" section.  After pressing Submit, it will take you to a new page where you will see that your new track is generated and where you can follow a link to see it in the Genome Browser.  You can now explore how other tracks match up to your custom track.  You can also save your session and share it with others by creating a URL link to it.  Here is an example of a custom track I made from FASTA files where I wanted to compare gaps in FASTA files to the Gaps track at UCSC.  Have fun with custom tracks on UCSC Genome Browser.