jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
346 stars 81 forks source link

exportKrona error #795

Closed diegorojasa closed 2 months ago

diegorojasa commented 4 months ago

Hello, sorry for uploading a lot of issues T_T SqueezeMeta worked perfectly and SQMTools too, but now i want to have a Krona graph, and i have tried to but i get the next error:

Error in exportKrona(intento3) : ktImportText (from KronaTools) is not present in your PATH. KronaTools can be downloaded from https://github.com/marbl/Krona Además: Warning message: In system("ktImportText", ignore.stdout = TRUE, ignore.stderr = TRUE) : 'ktImportText' not found

I installed KronaTools following the instructions and everything is installed correctly, KronaTools is in my working directory and the taxonomy files too. I searched up and ktImportText is in my /usr/local/bin/ktImportText That may be the problem??? Should i change the Krona files present in /usr/local/bin/ to mnt/c/User/myuser/Desktop/MyWorkingDirectoryForR ???

Thanks in advance ^-^

fpusan commented 4 months ago

What happens if you just run which ktImportText in your bash terminal?

fpusan commented 4 months ago

Point is, this should work as long as ktImportText is findable (ie is in a directory included in your $PATH environment variable, and I think /usr/local/bin should be included by default. Is that dir present when running echo $PATH?

diegorojasa commented 4 months ago

when running which ktImportText: /usr/local/bin/ktImportText

when running echo $PATH: /home/diegorojasadones2/anaconda3/bin:/home/diegorojasadones2/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0:/mnt/c/windows/System32/OpenSSH:/mnt/c/Users/diego/AppData/Local/Microsoft/WindowsApps:/snap/bin

The bold part i assume is the one we're referring to, so i don't know what may be the problem :(

fpusan commented 4 months ago

Can you try running ktImportText from your terminal and seeing whether It works? Otherwise the SqueezeMeta conda environment should provide a working KronaTools installation

diegorojasa commented 4 months ago

It works without problem Captura de pantalla 2024-02-20 171551

Should i activate the SqueezeMeta conda environment maybe??

fpusan commented 4 months ago

Yes, it should work from there

diegorojasa commented 4 months ago

I activated the SqueezeMeta environment and i have the same output as the image before on my terminal. Then I ran exportKrona on RStudio and i have the same initial error :(

fpusan commented 4 months ago

I didn't realize this was RStudio. RStudio may not be aware of where your KronaTools is located. Can you try inside a normal R session? (Just run R when in the SqueezeMeta environment and input the commands in the terminal)

diegorojasa commented 4 months ago

It didn't work :( in my terminal i installed SQMtools but when i run the loadSQM it says that my object is not a SqueezeMeta one, but in RStudio if i do loadSQM with the same file, it gets read without problem

fpusan commented 4 months ago

This should work similarly in RStudio and base R, please check that you are passing the right path to loadSQM

fpusan commented 2 months ago

Closing due to lack of activity, feel free to reopen