jessieren / VirFinder

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

Error while running VF.pred on my own data #19

Closed raquelnb closed 4 years ago

raquelnb commented 5 years ago

Hi! I followed the instructions to get the viral prediction on my own contigs but the following error popped up:

Error in countSeqFeatureCpp(seqFa, w) : Not compatible with STRSXP: [type=NULL]. In addition: Warning message: In file(inFaFile, open = "r") : file("") only supports open = "w+" and open = "w+b": using the former

I don't have idea what does this mean... My contigs have headers like this:

NODE_1_length_98149_cov_21.408159_magnitude=32301

Thank you in advance for your help

raquelnb commented 5 years ago

The command that i used was:

inFaFile <- system.file("data","A04_SED_spades_contig_300.fasta",package="VirFinder") predResult <- VF.pred(inFaFile)

jessieren commented 5 years ago

Hi raquelnb,

Thanks for using VirFinder. I am not sure what the problem is from the error message. It seems like some data formatting issue but I cannot confirm. Do you mind attaching a small test example so that I can try to take a look on my side?

Thank you!

Jessie

raquelnb commented 4 years ago

Of course Jie, here it is. test.txt

Thank you!

jessieren commented 4 years ago

Hi raquelnb,

I tested the file on my computer (MacOS) and it runs well. The results are as follows,

VF.pred("/Users/jessie/Library/Containers/com.apple.TextEdit/Data/Desktop/test.txt") [1] "test.txt [1] line1-3 NODE_6501_length_3412_cov_6.880060_magnitude=599 len 3412 score 0.0067 pvalue 0.7795" [1] "test.txt [2] line3-5 NODE_6502_length_3412_cov_4.940330_magnitude=452 len 3412 score 0.1844 pvalue 0.2367" [1] "test.txt [3] line5-7 NODE_6503_length_3411_cov_15.362328_magnitude=1251 len 3411 score 6e-04 pvalue 0.9602" [1] "test.txt [4] line7-9 NODE_6504_length_3411_cov_11.642771_magnitude=794 len 3411 score 0.0278 pvalue 0.5595" [1] "test.txt [5] line9-11 NODE_6505_length_3411_cov_7.175465_magnitude=529 len 3411 score 0.0098 pvalue 0.7263" [1] "test.txt [6] line11-13 NODE_6506_length_3411_cov_5.165567_magnitude=598 len 3411 score 0.1908 pvalue 0.2317" [1] "test.txt [7] line13-15 NODE_6507_length_3411_cov_4.211458_magnitude=277 len 3411 score 0.1512 pvalue 0.2676" [1] "test.txt [8] line15-17 NODE_6508_length_3411_cov_3.177265_magnitude=199 len 3411 score 0.0076 pvalue 0.7639" [1] "test.txt [9] line17-18 NODE_6509_length_3411_cov_2.847331_magnitude=224 len 3411 score 0.5724 pvalue 0.0718" name length score 1 NODE_6501_length_3412_cov_6.880060_magnitude=599 3412 0.0067461441 2 NODE_6502_length_3412_cov_4.940330_magnitude=452 3412 0.1843632302 3 NODE_6503_length_3411_cov_15.362328_magnitude=1251 3411 0.0006201783 4 NODE_6504_length_3411_cov_11.642771_magnitude=794 3411 0.0277882418 5 NODE_6505_length_3411_cov_7.175465_magnitude=529 3411 0.0098366301 6 NODE_6506_length_3411_cov_5.165567_magnitude=598 3411 0.1908007627 7 NODE_6507_length_3411_cov_4.211458_magnitude=277 3411 0.1511859759 8 NODE_6508_length_3411_cov_3.177265_magnitude=199 3411 0.0076277105 9 NODE_6509_length_3411_cov_2.847331_magnitude=224 3411 0.5723540036 pvalue 1 0.77952947 2 0.23672083 3 0.96022314 4 0.55954402 5 0.72629154 6 0.23174873 7 0.26764492 8 0.76388552 9 0.07179238

So I am not sure what was the problem on your side...