scottzijiezhang / MeRIPtools

8 stars 13 forks source link

One sample shows no right message for MeRIP object #1

Closed gnilihzeux closed 4 years ago

gnilihzeux commented 4 years ago

Dear author, Happy to see a new tool specificially for merip-seq analysis. I found a bug for one sample m6A experiment. The message is

MeRIP dataset of 1 samples.
The total read count for Input and IP samples are (Million reads):
Error in colSums(object@reads[, 1:length(object@samplenames)]) :
  'x' must be an array of at least two dimensions

BTW, if there is only one sample, the step calling peak could not carry on.

Wish your update.

scottzijiezhang commented 4 years ago

Hi Jinwen, In most case, we are interested in analyzing the variability across multiple samples. Even for simple peak calling, it is kind of dangerous to proceed without replicates. Therefore, we didn't write the code to handle single sample scenario. Nevertheless, there is a way to trick the software to handle single sample scenario: you can put the same sample name twice, e.g. samplenames = c("sample1", "sample1"). This will by pass the errors due to single sample. Because your "two" samples are identical, the peak calling result of these two will be essentially the same as if two replicates perfectly repeated each other.

kevinlkx commented 4 years ago

Thanks Jinwen. Maybe you can try the trick that Scott suggested.

Scott, this should be easy to fix. Maybe we can also give a warning message for one sample case without replicates.

gnilihzeux commented 4 years ago

Actually I had found the trick before. Thank you.