2

I have the following table mytable.tsv:

ABCI15.1    IM3
ABCK16.1    IMNCY
ABCK16.1    IM5
ABCI15.1    IM200/IM605
ABCM13.1    IM4
ABCN06.1    IM1182
ABCN20.1    IM21
ABCN06.1    IMNCY
ABCP20.1    IM4 
ABCM13.1    IM630

And I would like to make an UpsetR plot of both this table and the transposed one.

So my first plot (forming intersects out of the groups in the second column by summing up the first column) would be:

df = read.table(file="mytable.tsv", header=F)
df2 = acast(df, V1~V2, value.var="V2")
df3 = setDT(as.data.frame(df2), keep.rownames = TRUE)[]
upset(df3)

and my tranposed one:

df4 = t(df2)
df4 = setDT(as.data.frame(df4), keep.rownames = TRUE)[]
upset(df4)

However, I'm getting in both cases the following error:

Error in start_col:end_col : argument of length 0

Why is that? And how do I resolve it?

Saraha
  • 144
  • 1
  • 12

0 Answers0