Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings running example_data set + what output files to expect? + how to launch uBin? #7

Open
Dwrgi opened this issue Dec 4, 2023 · 5 comments

Comments

@Dwrgi
Copy link

Dwrgi commented Dec 4, 2023

I've been trying to get off the ground with uBin (again) and have a few questions, that you can hopefully help me with:

When I try running uBin_wrapper.sh on the example_dataset (see output below), I get some warnings that I don't understand?

I've got diamond version 2.0.14 installed. Which one should I use?

Also I'm not sure which output files I should get? I've listed the ones I've got below, are there any missing?

And finally, how do I actually launch uBin after it has been installed?

Thanks!

Command:
bash uBin-helperscripts/bin/uBin_wrapper.sh -s uBin-helperscripts/example_dataset/scaffolds.fasta -p pdbg -r1 uBin-helperscripts/example_dataset/BG_1_S1_L001_trim_clean.PE.1.fastq.gz -r2 uBin-helperscripts/example_dataset/BG_1_S1_L001_trim_clean.PE.2.fastq.gz -e diamond -t 10 -b uBin-helperscripts/example_dataset/das_tool_DASTool_scaffolds2bin.txt

Output on screen:
all files will get generated from scratch
creating mapping index
Building a SMALL index
mapping...
calculating coverage...
calculating GC content...
parsing length of each scaffold...
cleaning up...
...done!
diamond v0.9.14.115 | by Benjamin Buchfink [email protected]
Licensed under the GNU AGPL https://www.gnu.org/licenses/agpl.txt
Check http://github.com/bbuchfink/diamond for updates.

#CPU threads: 10
Scoring parameters: (Matrix=BLOSUM62 Lambda=0.267 K=0.041 Penalties=11/1)
#Target sequences to report alignments for: 1
Temporary directory:
Opening the database... [0.006998s]
Error: Database was built with a different version of diamond as is incompatible.
/home/sara/uBin-helperscripts/bin/07_01classifier.rb:44:in initialize': No such file or directory @ rb_sysopen - pdbg_min1000.genes.faa-vs-FunTaxDB.b6 (Errno::ENOENT) from /home/sara/uBin-helperscripts/bin/07_01classifier.rb:44:in open'
from /home/sara/uBin-helperscripts/bin/07_01classifier.rb:44:in `

'
pdbg_min1000.genes.faa.bacteria.scg pdbg_min1000.genes.faa.archaea.scg
running blast for bacterial SCGs... this may take a while...
/home/sara/uBin-helperscripts/bin/08_02scg_metagenome.rb:69: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
/home/sara/uBin-helperscripts/bin/src/scg_blank_diamond.rb:39: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
/home/sara/uBin-helperscripts/bin/src/scg_blank_diamond.rb:39: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
SCG prediction worked

Output files generated:
pdbg_min1000.genes pdbg_min1000.genes.faa.findSCG.b6
pdbg_min1000.fasta
pdbg_min1000.genes.faa pdbg_min1000.genes.faa.scg.candidates.faa
pdbg_min1000.fasta.overview.txt pdbg_min1000.genes.faa.all.b6
pdbg_min1000.genes.fna
pdbg_min1000.fasta.overview_bincol.txt pdbg_min1000.genes.faa.archaea.scg
pdbg_min1000_SCGS.csv
pdbg_min1000.fasta.scaff2tax.txt pdbg_min1000.genes.faa.bacteria.scg

@till-bornemann
Copy link

till-bornemann commented Dec 4, 2023

Dear Dwrgi,

You can use whatever diamond version you used to compile the database with. So if you compiled it with 2.0.14, then you can use 2.0.14 (indeed, you can also use different other minor diamond versions as far as i know, just the major version changes, i.e., 0.X, 1.X, 2.X have incompatible binaries).
The diamond makedb --in FunTaxDBv1.1.fasta -d FunTaxDBv1.1 will compile the database with the diamond version you would get if you typed which diamond(this should give you a PATH). If the diamond version has been installed in the uBin wrapper conda environment and you have loaded that environment via conda source , the PATH will likely be /home/{username}/miniconda/envs/{envname}/.../diamond. The error to me indicates that you are mixing diamond versions, maybe there is s globally installed one in /opt/bin/bio/ as a typical location for globally installed binaries on linux systems? And you used this version to build the db?

The classifier error will then be caused by the missing database.

I've never seen a "Insecure world writable dir /mnt/c in PATH" error before, but some googling indicates that you might be using a windows system as /mnt/c is apparently how windows would refer to it's normal drives (ie. C: / D: and so on). Are you using a windows system (or want to write to a windows system)? The following link indicates that it could be caused by that.

https://stackoverflow.com/questions/59580024/how-to-fix-insecure-world-writable-dir-mnt-c-in-path-mode-040777-error-after

or

microsoft/WSL#1426

Best,
till

@Dwrgi
Copy link
Author

Dwrgi commented Dec 6, 2023

Hi Till,
Thanks for your help!
I've just gone through the setup outlined in your helperscripts for a literally new installation of wsl1. When it came to run the diamond command it said diamond wasn't installed and to install it, so I did that, but now I can see there's an older version (0.9.14) listed in the miniconda directory as well. Perhaps that's why. I have now removed the newer diamond and am using the older one in miniconda3, seems to have worked a lot better with no warnings about diamond or insecure paths (I have no idea why that was coming up either!)

This time I got a few more utput files:
pdbg_min1000.fasta
pdbg_min1000.fasta.overview.txt
pdbg_min1000.fasta.overview_bincol.txt
pdbg_min1000.fasta.scaff2tax.txt
pdbg_min1000.genes
pdbg_min1000.genes.faa
pdbg_min1000.genes.faa-vs-FunTaxDB.b6
pdbg_min1000.genes.faa.all.b6
pdbg_min1000.genes.faa.archaea.scg
pdbg_min1000.genes.faa.bacteria.scg
pdbg_min1000.genes.faa.findSCG.b6
pdbg_min1000.genes.faa.scg.candidates.faa
pdbg_min1000.genes.fna
pdbg_min1000_SCGS.csv

So, after installing uBin using the .deb file - how do I actually launch it? I can see that it's installed but that's all and I don't know how to get to it, so to speak. Or is it better to install it by cloning it from github?

I'm mid-way through reinstalling everything in wsl2 (finally got it to find the internet...!) since you can open GUI from wsl2 but not wsl1, so I'd rather install uBin using the best method (for this situation).

Thanks,
Sara

@till-bornemann
Copy link

Hi Dwrgi,

Maybe you could verify that the files you generated have some filesize (ie. 'ls -alhF' in the directory with the files would show you the file sizes).

In principle, installing it via the .deb setup file should put it into your program/app listing. In MacOS this would be /Applications and you should be able to see it in the launchpad. In Unix it should also be listed in your Programs (in Ubuntu on the desktop screen the ~9 dots in the left bottom corner to open up the program listing and there it should appear). Are you running the application on a server, and if so, does the server have a display port? uBin is GUI-based and hence the system needs to be able to display it. I'm asking because our servers do not have display ports (and hence cannot execute the uBin GUI) and thus we generally prepare the files on the servers before pulling them to our local systems where we run the GUI.

Hope this helps,
Best,
Till

@Dwrgi
Copy link
Author

Dwrgi commented Dec 6, 2023

Hi again,
I'm running it in the windows linux subsystem. You can't open GUIs (easily) in WSL1, but with wsl2 I can launch firefox so that it opens a window, so it should be ok from that side. When I installed uBin using the .deb package I found no way of calling it from the CLI so to speak other than to see that it was installed. I'll try again with WSL2 once I've got it to install everything for the helperscript side of things.

I might have to try installing uBin itself in my Ubuntu in Virtual Box and move the files from the helperscript over as you suggested. I just don't have enough memory or capacity to install and run the helperscript on that, or this would have been a lot easier. :)

@till-bornemann
Copy link

Hi Dwrgi,

Sorry for the late reply, the mail notification ended up in my spam folder and i just now checked it through... . If i install either the .exe (windows) or .dmg (mac), i then find it in the programs list like any other type of program and can start it.

I just now tested opening the installed Mac app (thats the OS i have locally) via
open /Applications/uBin.app (Mac always puts installed programs into /Applications/{Appname}.app) and the GUI opened as usual. I usually open it via the programs listing and hence hadnt actually tried opening it via the CLI but at least on Mac it works. Maybe you can check where the package is installed and then use the open command with it? If you do find the program and it doesnt want to open, on Mac at least the usual cause is that it blocks any downloaded and then installed apps from executing (so you'd need to go to Safety & Security and there will then be a notice where you can basically click 'open anyway'). I could imagine something similar to happen on Linux (no idea if the surrounding windows system could actually basically enforce something like that for the WSL - in that case, other GUI-based apps should have the same problem though; maybe pretty standard applications like firefox are exempt from that since it has to do with certificates and they probably have them very much up to date).

Sorry that i cannot be of too much help. I've not used any WSL's so far and thus have limited ideas on what could be going wrong there.

Best,
Till

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants