Question: UpSet: Error in start_col:end_col : argument of length 0
gravatar for Jonas.Koch
11 months ago by
Jonas.Koch0 wrote:


I processed 3 BAM files that were generated from 3 different pipelines, so in total 9 BAM files by writing scripts in bash and python. I extracted the mapped reads from the BAM files and stored them in python sets. Then, I performed pair-wise intersection operations to see which reads are common in which BAM files (despite different pipelines).

The output 3x3 matrix was written into a tsv file:

14659   14659   14647
14659   15731   15709
14647   15709   15709

Numbers correspond to the number of reads that are in one intersection between 2 files.

Now, I wanted to load the marix into R and create an UpSet R plot. I know that a Venn Diagram would also work, but later on, I will have more pipelines to compare and so I chose UpSet R plots. I tried this code:

upset(test_df, sets = 'reconstructed', 'shuffled', 'trimmed',
      number.angles = 30, point.size = 3.5, line.size = 2, 
      mainbar.y.label = "Read Intersections", sets.x.label = "Blabla", 
      text.scale = c(1.3, 1.3, 1, 1, 2, 0.75), mb.ratio = c(0.55, 0.45), = 'sets', keep.order = TRUE)

But an error occured:
Error in start_col:end_col : argument of length 0

Unfortunately, I am only a beginner in R w/o experience. Maybe, someone has more experience in R or the UpSet package.


upsetr R • 942 views
ADD COMMENTlink modified 11 months ago by zx87549.0k • written 11 months ago by Jonas.Koch0

i think you should have a dataframe that is 15731 rows in length (one for each read), and four columns (one read name and three logical true/false columns for being a member of that file)

ADD REPLYlink written 11 months ago by Jeremy Leipzig19k

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.

Thank you!

ADD REPLYlink written 11 months ago by genomax78k
gravatar for Friederike
11 months ago by
United States
Friederike5.3k wrote:

what does test_df look like? Can you post the result of head(test_df)?

It seems to me like the sets parameter should be a vector, i.e. sets = c("reconstructed","shuffled",trimmed"), but it's difficult to test without know what test_df looks like.

ADD COMMENTlink written 11 months ago by Friederike5.3k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 700 users visited in the last hour