jessieren / VirFinder

VirFinder: a novel k-mer based tool for identifying viral sequences from assembled metagenomic data
Other
130 stars 24 forks source link

Multi-threaded operation #24

Open limeng849 opened 3 years ago

limeng849 commented 3 years ago

Due to the big data about the metagenomic analysis, I wonder weather VirFinder can use Multi-threaded to predict Virus sequences.

jessieren commented 3 years ago

Thanks for your support. Currently VirFinder does not support multi-threads. To make it happen, one possibility is to use the doParallel package in R https://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf. The main change is to replace for loop with foreach loop in doParallel package. Hopefully it won't take too much time to make it work.

limeng849 commented 3 years ago

Thanks for your reply. I have do the multi-sent by R but I wander how to reload the result because I store the print result into a .txt file but when I use read.csv or read.table to load the result it appears a problem:

> inFaFile <- read.file('a.txt')

Error in read.file("a.txt") : could not find function "read.file"

> inFaFile <- read.csv('a.txt')

> predResult <- VF.pred(inFaFile)

Error in file(inFaFile, open = "r") : invalid 'description' argument

> inFaFile <- read.table('a.txt')

> predResult <- VF.pred(inFaFile) Error in file(inFaFile, open = "r") : invalid 'description' argument 

I wonder weather the VF.pred can input a result file or can it only read the printed result?  Hope for your reply!  Thank you!

Best regard!

------------------ Original ------------------ From:  "Jessie Jie Ren";<notifications@github.com>; Send time: Tuesday, Sep 29, 2020 3:15 PM To: "jessieren/VirFinder"<VirFinder@noreply.github.com>; Cc: "Lee"<2920515558@qq.com>; "Author"<author@noreply.github.com>; Subject:  Re: [jessieren/VirFinder] Multi-threaded operation (#24)

Thanks for your support. Currently VirFinder does not support multi-threads. To make it happen, one possibility is to use the doParallel package in R https://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf. The main change is to replace for loop with foreach loop in doParallel package. Hopefully it won't take too much time to make it work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.