jessieren / VirFinder

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

Wrapper error #7

Closed snayfach closed 6 years ago

snayfach commented 6 years ago

I get an error when I run the VirFinder_wrapper.R script. If I open R and run the exact same commands, it runs fine and I get the desired output. Any ideas what's wrong? Here's the error:

$ Rscript VirFinder_wrapper.R \
> -f genome.fna \
> -o out.virfinder \
> --qvalue
Loading required package: glmnet
Loading required package: Matrix

Attaching package: 'Matrix'

The following object is masked from 'package:base':

    crossprod, tcrossprod

Loading required package: foreach
Loaded glmnet 2.0-13

Loading required package: qvalue
Warning message:
In fun(libname, pkgname) : no DISPLAY variable so Tk is not available
[1] "Running VirFinder on /global/projectb/scratch/snayfach/projects/dc4/0_input_data/genomes/DC416SNEG_AHWWO/DC416SNEG_AHWWO.fsystem.file                package:base                R Documentation

Find Names of R System Files

Description:

     Finds the full file names of files in packages etc.

na"
Error in rbind2(.Call(dense_to_Csparse, x), y) :
  error in evaluating the argument 'x' in selecting a method for function 'rbind2': Error: could not find function "getClass"
Calls: VF.pred ... predict.glmnet -> <Anonymous> -> <Anonymous> -> rbind2
Execution halted
snayfach commented 6 years ago

The trick for me was to include library(methods) as the first line in my script. Then calling via Rscript works fine.

jessieren commented 6 years ago

Thank you very much for reporting the bug and provide the solution.

Jessie