scottzijiezhang / RADAR

The project for analyzing differential methylation of MeRIP-seq data
GNU General Public License v3.0
20 stars 9 forks source link

Error in filterBins #11

Open N0toriou5 opened 4 years ago

N0toriou5 commented 4 years ago

Hi,

I am trying to use RADAR on my m6A dataset counting 10 Ctrl samples + coupled inputs and 9 Case samples + inputs. After setting the grouping variable as follow in the radar object:

variable(radar) <- data.frame(Group = c(rep("Ctl",10),rep("Case",9)))

I am trying to filter out low-coverage bins with radar <- filterBins(radar,minCountsCutOff = 15), but get the following error:

Error in filterBins(radar, minCountsCutOff = 15) : The predictor variable must have two groups

How should I set the grouping variable?

Thank you for your kind help.

BW

amberruccia commented 3 years ago

I had this issue too. After a lot of trouble shooting, I realized the vector has to be encoded as a factor, not as characters.

Set the grouping variable with:

variable(radar) <- data.frame(Group = factor(c(rep("Ctl",10),rep("Case",9))))

and it should work.

N0toriou5 commented 3 years ago

Thanks!

scottzijiezhang commented 3 years ago

I've also modified filterBins() a little bit to avoid this error.

Hope that solves the problem.