YuLab-SMU / ChIPseeker

:dart: ChIP peak Annotation, Comparison and Visualization
https://onlinelibrary.wiley.com/share/author/GYJGUBYCTRMYJFN2JFZZ?target=10.1002/cpz1.585
219 stars 74 forks source link

feature request #202 #207

Closed MingLi-929 closed 1 year ago

MingLi-929 commented 1 year ago

this pr is to add function of changing colors of vennpie

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
load_all()

files <- getSampleFiles()
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene

peakAnno <- annotatePeak(files[[4]], 
                         tssRegion=c(-3000, 3000),
                         TxDb=txdb, annoDb="org.Hs.eg.db")

vennpie(peakAnno)

test

users can pass the col parameter to change colors, try to be notice the colors item should equal to the items in the picture

vennpie(peakAnno,col=c(NO='white',Genic='#fee0d2',Intergenic='#fec44f',
                       Intron='#fc9272',Exon='#ffeda0', Upstream='#9ecae1',
                       Downstream='#3182bd',Distal_Intergenic='#d95f0e'))

test2

GuangchuangYu commented 1 year ago

with my update, you can:

vennpie(peakAnno,col=c(Upstream='red'))

to only change selected categories.