Question about Creating BED12 file from wgEncodeGencodeCompV28 Table

383 views
Skip to first unread message

Mustafa Albahrani

unread,
Aug 3, 2018, 11:52:53 AM8/3/18
to gen...@soe.ucsc.edu
Dear UCSC Genome Browser Support,

Let me start with some context.  I am trying to figure out how to use a Python library, pyGenomeTracks, to plot genes.  To do so, I used UCSC Data Integrator to retrieve genome annotations from these tables: wgEncodeGencodeCompV28 and wgEncodeGencodeAttrsV28,
to create a BED file that has genes information including exons.

My question is, can I create a BED12 file from the wgEncodeGencodeCompV28 table as is?  If so, could you please help me in finding the appropriate columns in the wgEncodeGencodeCompV28  table for creating the BED file?  I am perplexed whether the description of the BED12 file (thickStart, thickEnd, blockCount, blockSizes, blockStarts) could be matched with the wgEncodeGencodeCompV28 columns.

I have attached a snippet of the joint tables: wgEncodeGencodeCompV28   and  wgEncodeGencodeAttrsV28


Thanks,

--
 Mustafa
FILE.csv

Matthew Speir

unread,
Aug 3, 2018, 2:00:40 PM8/3/18
to Mustafa Albahrani, UCSC Genome Browser Discussion List
Hello, Mustafa.

Thank you for your question about creating a BED12 file from the GENCODE data in the UCSC Genome Browser. 

This can be done using either the command line or using our Table Browser tool.

A) Using the command line:

You can use the command-line MySQL client to query out public MySQL server. You can combine the output from a query to this MySQL server with our utility 'genePredToBed' to turn the genePred data into BED12. You can download 'genePredToBed' from our download server here: http://hgdownload.soe.ucsc.edu/admin/exe/.

Here's a command you could use to get the information from the MySQL server and then convert it into BED12: 

mysql --user=genome --host=genome-mysql.soe.ucsc.edu -A -P 3306 -Ne "select * from wgEncodeGencodeCompV28" hg38 | cut -f2- | genePredToBed stdin wgEncodeGencodeCompV28.bed

B) Using the UCSC Table Browser

You can also obtain a BED12 file of the wgEncodeGencodeCompV28 table using the following settings on the Table Browser:

1. Navigate to the Table Browser, https://genome.ucsc.edu/cgi-bin/hgTables.
2. Make the following selections:
clade: Mammal
genome: Human
assembly: Dec 2013 (GRCh38/hg38)
group: Genes and Gene Predictions
track: All GENCODE V28
table: Comprehensive (wgEncodeGencodeCompV28)
region: genome
output format: BED - browser extensible data
output file: enter a file name or leave blank to view results in web browser

3. Click 'get output'.
4. Under the 'Create one BED record per' section, select 'Whole Gene'.
5. Click 'get BED'.

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 Genomics Institute

Training videos & resources: http://genome.ucsc.edu/training/index.html
Want to share the Browser with colleagues?

--

---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser Public Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.
To post to this group, send email to gen...@soe.ucsc.edu.
Visit this group at https://groups.google.com/a/soe.ucsc.edu/group/genome/.
To view this discussion on the web visit https://groups.google.com/a/soe.ucsc.edu/d/msgid/genome/CABFe0reAvkzd-Nb9NBevBXQAYoLDtJ6SQOd19hfxwCu%3DqyC2kQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/soe.ucsc.edu/d/optout.



--
Matthew Speir
Outreach, User Experience, Quality Assurance and User Support
HCA, CIRM, and UCSC Genome Browser
UCSC Genomics Institute

Mustafa Albahrani

unread,
Aug 20, 2018, 4:05:07 PM8/20/18
to msp...@soe.ucsc.edu, gen...@soe.ucsc.edu
Thank you so much for the thorough explanation, Matthew.
--
 Mustafa Albahrani 
Reply all
Reply to author
Forward
0 new messages