jinghuazhao / R

R packages
https://jinghuazhao.github.io/R/
12 stars 4 forks source link

read.ms.output() #7

Open suiyuano opened 4 days ago

suiyuano commented 4 days ago

when using gap to read an input file of msms, it reports that:

"Error in gap::read.ms.output(hap_file, verbose = verbose) : 不是所有的length(marker) == ndraws都是TRUE"

could u plz tell me how to solve the issue?

jinghuazhao commented 4 days ago

Thanks for letting me know .

I haven't used it for a long time and just experimented with it. It worked as follows,

  1. Compiled from inst/ms/ with bash clms which gives ms.
  2. Move ms into a folder/directory that is in the search path, in my case ~/bin
  3. Start R, load gap and run the documentation example,

     system("ms 5 4 -s 5 > ms.out")
     msout1 <- read.ms.output("ms.out")
    
     system("ms 50 4 -s 5 > ms.out")
     msout2 <- read.ms.output("ms.out",outfile="out",outfileonly=TRUE)
    
     msout <- system("ms 5 4 -s 5 -L", intern=TRUE)
     msout3 <- read.ms.output(msout,FALSE)

Hope this helps

suiyuano commented 4 days ago

Thank you very much for your reply, in fact, I checked the code you published for the "read.ms.output()" section and I found that the problem occurred when read.ms.output() processed the headers in the ms output, because I was using msms. I have solved the problem. Thank you very much again!

mango @.***

 

------------------ 原始邮件 ------------------ 发件人: "jinghuazhao/R" @.>; 发送时间: 2024年6月24日(星期一) 晚上6:38 @.>; @.**@.>; 主题: Re: [jinghuazhao/R] read.ms.output() (Issue #7)

Thanks for letting me know .

I haven't used it for a long time and just experimented with it. It worked as follows,

I compiled ms from inst/ms/ with bash clms which gives ms.

Move ms into a folder/directory that is in the search path, in my case ~/bin

Start R, load gap and run the documentation example, system("ms 5 4 -s 5 > ms.out") msout1 <- read.ms.output("ms.out") system("ms 50 4 -s 5 > ms.out") msout2 <- read.ms.output("ms.out",outfile="out",outfileonly=TRUE) msout <- system("ms 5 4 -s 5 -L", intern=TRUE) msout3 <- read.ms.output(msout,FALSE)

Hope this helps

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jinghuazhao commented 3 days ago

Thanks for the feedback. In fact read.ms.output() was based author of ms himself and it would indeed be nice to mirror a read.msms.output().