comprna / METEORE

Automatic DNA methylation detection from nanopore tools and their consensus model
MIT License
72 stars 18 forks source link

[BUG] Incorrect score in script/format_megalodon.R #32

Closed richardstoeckl closed 1 year ago

richardstoeckl commented 2 years ago

Hi, thank you for this great tool!

I think I noticed a tiny mistake in the format_megalodon.R script.

In line 15, the df is reduced to six columns. In line 16, a new column "Score" is introduced -> the 7th column. However, in line 17, columns 1,2,3,4, and 6 are kept and in line 18 the sixth column ist renamed to "Score" while it is in fact the "can_log_prob"

df <- df %>% select(1,2,4,3,5,6)
df$Score <- df$mod_log_prob - df$can_log_prob
df <- df %>% select(1,2,3,4,6)
colnames(df) <- c("ID", "Chr", "Pos", "Strand", "Score")

This therefore just renames the can_log_prob to score instead of using the calculated score, right?

zakayuen commented 1 year ago

Fixed in 7168f19