deeptools / pyGenomeTracks

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

How to display multiple gene colors in gtf file? #484

Open Simple53 opened 2 months ago

Simple53 commented 2 months ago

Hi, I would like to display different types of genes when using gtf file. Is there any aproach to display different types with different colors? In another word, that means anything like the color=bed_rgb in bed files. Thanks.

lldelisle commented 2 months ago

Hi, Unfortunately this is not implemented. The way I do it is that I use an external python script to convert gtf to bed12 and then I assign colors in the 9th field. The python script mimics the way pyGenomeTracks deal with gtf. It is available at https://github.com/lldelisle/tools-lldelisle/blob/master/tools/fromgtfTobed12/fromgtfTobed12.py Tell me if you need more help.

Simple53 commented 2 months ago

Thank you for the suggestions!