jlab-code / MethylStar

A fast and robust pre-processing pipeline for bulk or single-cell whole-genome bisulfite sequencing (WGBS) data.
GNU General Public License v3.0
30 stars 6 forks source link

Issue with Methimpute-Part #6

Closed laurasteinmann closed 4 years ago

laurasteinmann commented 4 years ago

Hi, thank your for your really helpful Pipeline. I try to use the Pipeline in your prepared Docker but I just get stuck with a Error Message in the Methimpute-Part:

HMM: Convergence reached!
Time spent in Baum-Welch: 1574.5s
Compiling results ... 31.02s
ERROR : Can't join on 'seqnames' x 'seqnames' because of incompatible types (integer / character) 
Warning messages:
1: In nls.lm(par = start, fn = FCT, jac = jac, control = control, lower = lower,  :
  lmdif: info = -1. Number of iterations has reached `maxiter' == 50.

2: In nls.lm(par = start, fn = FCT, jac = jac, control = control, lower = lower,  :
  lmdif: info = -1. Number of iterations has reached `maxiter' == 50.

sort: cannot read: /mnt/meth2/Results_Methylstar/methimpute-out/file-processed.lst: No such file or directory

I use a customized Arabidopsis reference genome without mitochondrial and chloroplast sequences. Can you tell me which files causes the Error so I can look at them more closely? I just can't find this in your code. Or do you even had the same problem once? Thank you very much Laura

shahryary commented 4 years ago

Hi, Thank you for using the Pipeline. This error is because of converting data types. Please modify these lines of code in "src/bash/methimpute.R" file, should be solve the problem. (~ lines 34-40) (Please add Bold lines) Change into: ` ........ df <- df %>% mutate_if(is.factor, as.character)

df$seqnames <-as.character(df$seqnames)

col.names <- c("seqnames","start","context.trinucleotide") Cx <- fread(original_file, skip=0, sep='\t', col.names =col.names, select=c(1,2,7), stringsAsFactors = FALSE )

Cx$seqnames <-as.character(Cx$seqnames)

final_dataset <- df %>% left_join(Cx, by = c("seqnames", "start")) ` Please let me know if you solved this problem then I can fix the bug and will update the package.

laurasteinmann commented 4 years ago

Thank you very much for your help. With the two extra lines of code it works now.