Creating Upset plot with Orthofinder result
1
2
Entering edit mode
2.5 years ago
AP ▴ 80

enter image description hereHello all,

I have the file that I generated from orthofinder which looks like this:

Orthogroup      F105    F109    F23     F79     HDV247  T415
OG0000000       12      15      31      17      1       1
OG0000001       23      18      1       12      0       6
OG0000002       0       27      27      0       0       1
OG0000003       48      1       0       0       0       1
OG0000004       46      0       2       0       1       0
OG0000005       11      7       13      9       1       7
OG0000006       13      9       5       9       3       3
OG0000007       9       16      0       14      0       0
OG0000008       1       0       1       1       31      1

column 1 is a orthogroup and F105 to T415 represents different genomes. The numbers represent the count of that particular orthogroup in that genome. I want to make upset plot using this data in R but from what I can see looks like it requires a binary input file. Can I use this data to make upset plot? if not how can I modify this file to make upset plot?

so far with this data I have done this,

 orthogroups<- read.table("All_Orthogroups.tsv",  header=T, sep="\t")
data<- orthogroups[2:7]
str(data)
upset(fromList(data), order.by = "freq")

I have attached the upset plot generated. As you can see the numbers in the upset plot are wrong. It is only considering the numbers 0 and 1 from the file and ignoring everything else. Please help.

orthofinder UpsetR R • 1.9k views
ADD COMMENT
0
Entering edit mode
2.3 years ago
Md ▴ 10

You have to make it as a binary file, I mean u have to convert yout data run this comand u will get in binary formate, hope, it help

data[data > 0] <- 1

ADD COMMENT

Login before adding your answer.

Traffic: 2311 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6