This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to make a venn plot with data frame in R

I want to create a Venn plot with my data but this error occurred!

ggvenn(venn_cpg_region2)

Error in prepare_venn_data(data, columns, show_elements,show_percentage,:logical columns in data.frame data or vector columns should be length between 2 and 4

 > head(venn_cpg_region2)
           cds  downstream       exon1       exons    intron1    introns       other    promoter            UTR3        UTR5
  1  1_47963035  1_68276036  1_68276036  1_47963035 1_33831751 1_33831751  1_32347715  1_48132522     11_18394188  1_68276036
  2  1_48088881  10_2648462 1_104414426  1_48088881 1_33831751 1_33831751  14_2527831  1_68276036     11_18394188  12_3142614
  3 1_168677980   12_396767 1_168677980  1_68276036 1_34481401 1_33831751  15_7112579  1_70154145      12_3134049 2_120841166
  4  10_2627156 14_12686663  12_3142614 1_104414426 1_48132522 1_33831751 17_10524429  1_70154145      13_9959153 20_13434035
  5  10_2627156 14_12686663  14_3960061 1_168677980 1_68276036 1_33831751  19_7740157 1_104414426      13_9959153   26_663159
  6  10_2627156  15_7007155 17_11003840  10_2627156 1_68276036 1_34188568   2_5702062 1_104414426      16_2178551   26_663159
plot r venn

What are the columns you are trying to intersect?

Thanks, this is a example of my data. i want to find number of features that overlap or not overlap with the column names, with the venn plot

Do you mean the overlap between the elements of 10 columns? There is no venn diagram that can plot 10 subsets intersection as far as I know. Just think of how such a plot would look like, even venn diagrams with 5 subsets are quite tricky to interpret.

I want to know how many of features are common between column names and how many are not overlap. for example, some features are only in cds and some in downstream only and some in both of them are share.

You could look into upset plots (UpSetR or ggupset)

0 answers

No answers yet.

Log in to answer this question.