UpSet: Error in start_col:end_col : argument of length 0
1
0
Entering edit mode
5.1 years ago
Jonas.Koch • 0

Hi!

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),
      order.by = '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.

Greetings!

R UpSetR • 6.4k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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

Thank you!

ADD REPLY
2
Entering edit mode
5.1 years ago

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 COMMENT

Login before adding your answer.

Traffic: 2550 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