Re: [biostar] The scores of 5th column (integer score for display) in macs2 NAME_peaks.narrowPeak file are larger than 1000

318 views
Skip to first unread message

Yung-Chih Lai

unread,
Dec 5, 2016, 4:59:03 PM12/5/16
to UCSC Genome Browser Discussion List

Hi ChrisL,

 

Many thanks for your helpful information.

 

You are right, the narrowPeak produced by macs2 can be loaded directly onto the Genome Browser, even some scores in the 5th column larger than 1000. However, in my case, I prefer bigBed files, but not Bed or narrowPeak files. It is because I have to download Bed or narrowPeak files from our lab Network Storage Attached (NSA), to modify their track header lines, and upload them onto our lab NSA again. If they are bigBed files, it is easier to change any parameter directly for me.

 

In fact, FemaleOnly_H3K4me3.bed is a manipulated file, using a command below. Both F_H3K4me3_C216_222_peaks.narrowPeak & M_H3K4me3_C213_219_peaks.narrowPeak are produced by macs2. Thanks again.

 

bedtools intersect -a F_H3K4me3_C216_222_peaks.narrowPeak -b M_H3K4me3_C213_219_peaks.narrowPeak -v > FemaleOnly_H3K4me3.bed

 

Best,

 

Gary


On Fri, Dec 2, 2016 at 8:57 AM, genecats.ucsc on Biostar <mai...@biostars.org> wrote:
Activity on a post you are following on Biostar

User genecats.ucsc wrote Answer: The scores of 5th column (integer score for display) in macs2 NAME_peaks.narrowPeak file are larger than 1000:

Hi Gary,

narrowPeak files can be visualized directly on the UCSC Genome Browser as a custom track, no need to convert to bigBed first. However if you wanted to, example 3 on this page: http://genome.ucsc.edu/goldenPath/help/bigBed.html is a good example of how to convert a non-standard bed file to a bigBed file, in that you need to supply bedToBigBed with an autoSql file that describes your data. For more information see this question from our mailing list archive: https://groups.google.com/a/soe.ucsc.edu/d/msg/genome/9PXjH2mlqrE/MrBs3pZ9WLEJ

That being said, I'm slightly confused by the bedToBigBed command you're running, what is FemaleOnly_H3K4me3.bed? Did that come from macs2? According to the macs2 documentation here: https://github.com/taoliu/MACS it appears that this file can be loaded directly onto the Genome Browser. Have you tried that already? I also found this issue: https://github.com/taoliu/MACS/issues/123, which seems to be unresolved, perhaps you could ask there for more information? Lastly, since the number in the score field only determines the darkness of the peak in the genome browser, perhaps you could write a little awk script to check if the values are over 1000 and if so, convert them to 1000.

It would be nice if you could send follow up questions to our mailing list at: https://groups.google.com/a/soe.ucsc.edu/forum/#!forum/genome, this way our entire team will see your question and can help you out, in addition to all the people that follow that list and may not see the question here.


You may reply via email or visit http://www.biostars.org/p/224174/#225196


I use macs2 for peak calling, and obtain a NAME_peaks.narrowPeak file. Its 5th column (integer score for display) is for display purpose on UCSC Genome Browser. However, I find that some scores are larger than 1000 when I convert bed to bigbed using bedToBigBed as the below. Any suggestion to deal with this kind of error? Many thanks.

gary > bedToBigBed -type=bed6+4 FemaleOnly_H3K4me3.bed galGal4.chrom.sizes FemaleOnly_H3K4me3.bigbed

pass1 - making usageList (445 chroms): 3 millis

Error line 1358 of FemaleOnly_H3K4me3.bed: score (1137) must be between 0 and 1000

Christopher Lee

unread,
Dec 6, 2016, 6:17:22 PM12/6/16
to Yung-Chih Lai, UCSC Genome Browser Discussion List

Hi Gary,

Thank you for your question about narrowPeaks and bigBeds. Luckily 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

You can find the narrowPeak AutoSql definition here:
http://genome-source.cse.ucsc.edu/gitweb/?p=kent.git;a=blob_plain;f=src/hg/lib/encode/narrowPeak.as;hb=HEAD

Note that you technically don't need to supply the -as parameter, but it does make the resulting details page's significantly more clear.

Also note that this does not fix the underlying issue of macs2 outputting narrowPeak files with invalid score fields. I would suggest commenting on the open issue so the developer knows this is still an issue, as it appears they are still actively maintaining the project:
https://github.com/taoliu/MACS/issues/123

Thank you again for your inquiry and using the UCSC Genome Browser. 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 forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Christopher Lee
UCSC Genomics Institute


--

---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.

Reply all
Reply to author
Forward
0 new messages