2
$\begingroup$

I can create an Upset plot with the input file, which can be found here

> library("UpSetR")
> orthogroups_df<- read.table("Orthogroups.GeneCount.tsv.txt",  header=T, stringsAsFactors = F)
> #All species
> selected_species <- colnames(orthogroups_df)[2:(ncol(orthogroups_df) -1)] 
> selected_species
 [1] "Atha" "Vvin" "Slyc" "Stub" "Cann" "Natt" "Ntab" "Ntom" "Nsyl" "Ngla" "NQLD" "Nlab"
> head(orthogroups_df)
  Orthogroup Atha Vvin Slyc Stub Cann Natt Ntab Ntom Nsyl Ngla NQLD Nlab Total
1  OG0000000    0    0    0    0    0    0    0    0    0    0  965    3   968
2  OG0000001    0    0    0    0    1    0    0    0    0    0    3  448   452
3  OG0000002    0    0    0    0    1    0    0    1    1    0  313  120   436
4  OG0000003    0   26   25   39   93   21   63   36   33   46   15   16   413
5  OG0000004    1    0    9    4   42   34  154   11    8  109    2    6   380
6  OG0000005    0    0   20    1    2    1   70   43   91   34   61   44   367
> ncol(orthogroups_df)
[1] 14
> orthogroups_df[orthogroups_df > 0] <- 1
> upset(orthogroups_df, nsets = ncol(orthogroups_df), sets = rev(selected_species), keep.order = T, order.by = "freq")

I read this paper, and in Figure 2b and Supplementary Table S4, they had the gene numbers additionally to a number of families.

Figur2b Supplementary Table S4

How can the upset plot be reproduced with gene numbers or/and create such a table?

Thank you in advance,

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.