This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Tax4Fun2 - error

Hi, I want to use Tax4Fun2 for annotating metabolic potential to microbial communities. I installed everything successfully. I have tested reference data, built the dependencies, and added the bin to PATH. (according to : https://github.com/bwemheu/Tax4Fun2)

When trying to run with the test data using the command: runRefBlast(path_to_otus = "~/Thesis_Data/seqs/seqs.fasta", path_to_reference_data = PATH, path_to_temp_folder = "~/Thesis_Data/seqs/REF99NR", database_mode = "Ref99NR", use_force = T, num_threads = 4) Then, I get this: Copy and generate database Reference blast started Error in if (file.size(path_to_blast_file) == 0) stop("Blast file empty!") : missing value where TRUE/FALSE needed

Anyone has encountered the same problem and knows a solution?

I used tax4fun version 1.1.5.

Thank you in advance!

tax4fun silva blast

I have the same problem with this package. It is no more maintained on github. Plz if you have a solution for that post here!

Thank you

Yes, I solved it a few weeks ago. I remember the error was in the specification of the paths (at least, it was for me). So I did as follows: (change your paths to format : "C:/Users/NAME/folder..."

otus_path <- "path to sequences (fasta)" 
temp_path <- "path to an empty temporal folder"
otu_table_path <- "path to your OTU table"

runRefBlast(path_to_otus = otus_path, 
            path_to_reference_data = PATH, 
            path_to_temp_folder = temp_path, 
            database_mode = "Ref100NR", 
            use_force = FALSE, num_threads = 6)

This worked for me :) let me know if that helped

Hi ymj and everybody,

I am trying the above code in R, but always I get the next ERROR:

  PATH = "~/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/Tax4Fun2_ReferenceData_v2/"

  runRefBlast(path_to_otus = "~/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/fasta", 
            path_to_reference_data = PATH, 
            path_to_temp_folder = "~/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Ref100NR", 
            database_mode = "Ref100NR", 
            use_force = T, num_threads = 4)

  chmod: can't access to '/home/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/blastn': It doesn't exist the file or directory
sh: 1: /home/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/blastn: not found
**Error in system(command = paste(blast_bin, "-help"), intern = T) : 
  error in running command**
> 

But all these folders and files have root permissions.And also I have tried it using nautilus, but the error is the same.

Please, could you help me to solve this error if you know how?.

I use Ubuntu 16.0 and R 4.1.1.

Thank you very much.strong text

Sorry,

The PATH that I wrote before (my last post) is not correct.The PATH correct is :

PATH = "~/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2/"

Thank you

can't access to '/home/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/blastn'

Error is about not being able to find blastn executable. Where is your blast install located? Make sure that directory is in your $PATH or Tax4Fun2 is configured correctly to find blastn.

Thank you Genomax for your answer,

My blast install is located into the folder Tax4Fun2_ReferenceData_v2 (it includes the bin folder with blastn inside).

Now I had export PATH (as you told me) :

(base) juanm@juanm-Compaq-CQ58-Notebook-PC:~$ export PATH=$PATH:/media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2/bin/blastn

And when I try again in R the runRefBlast() script, the output is the same (the same ERROR).

Please, could you write me the code of $export PATH and the runRefBlast() script to solve this ERROR?

Thank you very much for your help.

You need to set the PATH to include the directory containing the blastn executable. So use the following and see if that fixes the issue:

export PATH=$PATH:/media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2/bin/

Again the same ERROR:

  (base) juanm@juanm-Compaq-CQ58-Notebook-PC:~$ export PATH=$PATH:/media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2/bin/

   (base) juanm@juanm-Compaq-CQ58-Notebook-PC:~$ R

R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)

> library(Tax4Fun2)
> library(phyloseq)
> runRefBlast(path_to_otus = "media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/fasta", 
            path_to_reference_data = PATH, 
            path_to_temp_folder = "media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Ref100NR", 
            database_mode = "Ref100NR", 
            use_force = T, num_threads = 4)

chmod: can't access to '/media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/blastn': It doesn't exist the file or directory
sh: 1: /media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/blastn: not found
Error in system(command = paste(blast_bin, "-help"), intern = T) : 
  error in running command
> 

Thank you

So the program path being checked (and which generates the error that blastn is not found) is

/media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/blastn

Where as you are setting the $PATH to

/media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2/bin/

those two paths are not the same. Which exact directory is your blastn executable located in?

    Hi GenoMax,

    My blastn executable is located in the directory (inside of the bin folder):

   " /media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2/bin/blastn"



   Thank you

If that is correct then you need to make sure that Tax4Fun2 is configured accordingly. Currently it appears to be looking for blastn in /media/juanm/d631a66f-81da-495d-8136-67bc214cb51d2/Tax4Fun2/R/Tax4Fun2_ReferenceData_v2//blast_bin/bin/.

1 answer

You have to follow this step to solve the issue. (Mostly this problem occurs in the Windows version)

  1. If you are using R studio in Windows, try to Install the standalone version of the BLAST (https://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/)
  2. Once you have done the installation, go to the installation directory in Windows, (Example: C:\Program Files\NCBI\blast-2.15.0+\bin)
  3. copy all the binary files from the folder, and paste (replace) them into the binary folder of Tax4Fun2_ReferenceData_v2 (Tax4Fun2_ReferenceData_v2\blast_bin\bin).
  4. That's it. Now you can run the command. It will work.

good luck....

Dr. Antony Stalin

Log in to answer this question.