deeptools / pyGenomeTracks

python module to plot beautiful and highly customizable genome browser tracks
GNU General Public License v3.0
774 stars 111 forks source link

gappedPeak not working #462

Closed NMaziak closed 1 year ago

NMaziak commented 1 year ago

Hello,

Thanks for providing a wonderful tool! I have pyGenomeTracks version 3.8. I have a gappedPeak file, the first two lines look like this:

chrY    887530  917120  Peak_7  .       .       887570  887820  255,0,0 3       1,250,1 0,40,29589      294.0   -1      -1
chrY    925470  955780  Peak_12 .       .       931520  933260  255,0,0 3       1,1740,1        0,6050,30309    77.0    -1      -1

However, when I plot it, it comes out looking like a normal peak, in the .ini file, I have the following:

[HMMRATAC]
file = ATAC_bw/sample_peaks.gappedPeak
file_type = bed

Would you happen to know why it won't work?

Any help is greatly appreciated.

Best, Noura ATAC2

lldelisle commented 1 year ago

Hi, Do you have tabulations in your file? Do you have an error message? Thanks, Lucille

lldelisle commented 1 year ago

I will have a closer look tomorrow.

lldelisle commented 1 year ago

It seems that your 'gappedPeak' does not follow exactly the format described by UCSC: https://genome.ucsc.edu/FAQ/FAQformat.html#format14 And this is what pyGenomeTracks gives as message:

Warning: The block field 5 (score) is not valid: ..
Error message: could not convert string to float: '.'
Only the first 4 fields will be used.

There are 2 ways to convert your gappedPeak file to a 'conform' gappedPeak file:

Here is the result: test

Feel free to reopen the issue if the error is still here.

NMaziak commented 1 year ago

Hi Lucille, thank you so much for the prompt reply. I didn't catch the warning, very sorry about that. Will fix it!