BIMSBbioinfo / ciRcus

An R package for annotation of circular RNAs
10 stars 5 forks source link

summarizeCircs Issue #56

Closed marvel479 closed 4 years ago

marvel479 commented 4 years ago

Hello! I have already created a annot.list, and as far as I understand, if I have 4 samples for my experiment, this is what I do:

cdata <- data.frame(sample=c("Control_untreated", "Control_treated", "Mutant_untreated", "Mutant_treated"),
                    filename=list.files((system.file('localofdirectory"),
                                        pattern='sites.bed',
                                        full.names=TRUE)[1:4])

**Error in data.frame(sample = c("Control_untreated", "Control_treated", "Mutant_untreated",  : 
  arguments imply differing number of rows: 55, 4**

My sites.bed files have different no. of rows, as after using merge.py on the output of find_circ.py, all the files had different no. of rows and some circRNAs with overlapping genomic intervals were combined

mschilli87 commented 4 years ago

This looks far more complicated than needed. You can construct the filename column the same way you did with the sample one: using c(...) and fixed strings ("..."). cdata should have one row per sample, so four in your case. My best guess is that list.files(...) lists the whole working dir with 55 records. The first thing wrong with your code is mixing ' and " in 'localofdirectory". If you want to track this down your way, I recommend actually looking at the output of single function calls before pasting them together in a nested fashion into one huge command.

Finally, please note that you are not using a single ciRcus function in the code in question, so the ciRcus bug tracker definitely is the wrong place for basic R questions. I recommend StackOverflow or the RStudio community instead.