Category

Format Conversion


Usage

genePredToBed in.genePred out.bed


Manual

This tool is part of UCSC Genome Browser's Utility Tools.

Options

  • -tab: genePred fields are separated by tab instead of just white space
  • -fillSpace: when tab input, fill space chars in 'name' with underscore: _
  • -score=N: set score to N in bed output (default 0)

Example

Assuming you want to convert an annotation file in gff3 format to standard bed format, you can first use gff3ToGenePred to convert it to genePred format, then convert the genePred file to bed format:

# download annotations in gff3 format
wget ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_32/gencode.v32.long_noncoding_RNAs.gff3.gz
# convert GFF3 to genePred, making sure to include -geneNameAttr=gene_name 
# so that gene symbol is used as the name2 instead of ID number, and sorting by chromosome and position:
gff3ToGenePred -geneNameAttr=gene_name gencode.v32.long_noncoding_RNAs.gff3.gz stdout | sort -k2,2 -k4n,4n > gencode.v32.lncRNAs.genePred
genePredToBed gencode.v32.lncRNAs.genePred gencode.v32.lncRNAs.bed


Share your experience or ask a question