This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting narrowpeak files to make it compatible with UCSC trackhub

Hi,

I am trying to create a trackhub on UCSC genome browser. I have trackfiles in bigwig format and some narrowpeak files as well. Narrowpeak isn't in the list of accepted formats for trackhub. So I tried to convert it to bigbed file using the ucsc utility bedToBigBed. This is the command i gave

./bedToBigBed -type=bed6+4 samp1_peaks.narrowPeak ~/mm9_data/mm9.chrom.sizes samp1_peaks.bb

I'm getting this error

pass1 - making usageList (22 chroms): 6198 millis
Error line 28 of samp1_peaks.narrowPeak: score (1186) must be between 0 and 1000

I don't understand what is wrong.I looked up line 28 and the actual score is 118.67400 and not 1186.

Also, is there a better way to create a trackhub with narrowpeak files?

Thanks

ucsc genomebrowser narrowpeakfile ucscutilites

1 answer

Found this in a google groups thread. It worked.

There is a way to circumvent this error from bedToBigBed. Instead of declaring your bigBed as a 6+4, you can make a bed4+6, and supply the narrowPeak.as AutoSql file like so:

$ bedToBigBed -type=bed4+6 -as=narrowPeak.as narrowPeakFile chrom.sizes bigBedFile

Log in to answer this question.