VirFinder icon indicating copy to clipboard operation
VirFinder copied to clipboard

Multi-threaded operation

Open limeng849 opened this issue 4 years ago • 2 comments

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

limeng849 avatar Sep 27 '20 01:09 limeng849

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.

jessieren avatar Sep 29 '20 07:09 jessieren

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";<[email protected]>; Send time: Tuesday, Sep 29, 2020 3:15 PM To: "jessieren/VirFinder"<[email protected]>; Cc: "Lee"<[email protected]>; "Author"<[email protected]>; 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.

limeng849 avatar Sep 29 '20 09:09 limeng849