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

problem running in virtual machine #69

Closed
rec3141 opened this issue Nov 15, 2017 · 11 comments
Closed

problem running in virtual machine #69

rec3141 opened this issue Nov 15, 2017 · 11 comments

Comments

@rec3141
Copy link

rec3141 commented Nov 15, 2017

I'm running Unicycler in virtualbox (because I can't get racon to compile on macosx), and SPAdes doesn't like that I've mounted my working directory using vboxfs (something about a bug in mmap). The SPAdes folks suggested I use '--tmp-dir' and point it to a virtualbox-local site like /tmp, and that works.

To get Unicycler to work in the vbox, I hacked spades_func.py to include '--tmp-dir /tmp' in the 'command' for SPAdes and it worked. You might want to include something like this, or an option to pass-through arguments to SPAdes.

thanks!

@rrwick
Copy link
Owner

rrwick commented Nov 26, 2017

That's very interesting. I've run into issues when running Unicycler on a network mount (SPAdes error correction failed) and I you might have solved it with --tmp-dir.

On a related note, I'm keen to try out alternative read error correction tools. This article is informative on the topic: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5563063/

If I find a better alternative, I might try to integrate it into Unicycler, at which point I'd stop using SPAdes read error correction and these issue would go away.

Ryan

@rrwick
Copy link
Owner

rrwick commented Nov 26, 2017

Also, regarding getting Racon to compile on a Mac, I had to use GCC instead of the Clang compiler which comes with Xcode.

There are probably multiple ways of doing it, but here's what I did:

  • Install GCC v5 with Homebrew: brew install gcc@5
  • In a directory of your choice, make symlinks to GCC v5:
ln -s /usr/local/bin/gcc-5 cc
ln -s /usr/local/bin/gcc-5 gcc
ln -s /usr/local/bin/g++-5 g++
ln -s /usr/local/bin/g++-5 c++ 
  • Then whenever you want to use GCC instead of Clang (e.g. before compiling Racon), add the directory with your symlinks to the front of your path: export PATH=/path/to/gcc5_symlinks_dir:"$PATH"

@kapsakcj
Copy link

Hi @rec3141 ,

I too am experiencing the same issue that you mentioned and I was wondering if you could help me resolve it.

I've been able to locate the spades_func.py file, however I cannot locate where I should type "--tmp-dir /tmp" into the file.

Could you (or possibly @rrwick ) show me where to enter that fix into the script?

Best,
Curtis

@rec3141
Copy link
Author

rec3141 commented Jan 24, 2018

@kapsakcj Hi Curtis, I've attached a patch, and the changes are shown below

line 251
old: command += ['-o', read_correction_dir, '--threads', str(threads), '--only-error-correction']
new: command += ['-o', read_correction_dir, '--threads', str(threads), '--only-error-correction', '--tmp-dir', '/tmp']

line 345
old: command = [spades_path, '-o', out_dir, '-k', kmer_string, '--threads', str(threads)]
new: command = [spades_path, '-o', out_dir, '-k', kmer_string, '--threads', str(threads), '--tmp-dir', '/tmp']

@kapsakcj
Copy link

Wow, thank you for the fast response, I will test this out as soon as I can.

One more question, will I need to move my data to the /tmp directory w/in my virtualbox (and subsequently alter my unicycler command) in order for this to work? Or can I leave the data in the vboxsf folders that they currently reside in?

Thanks!

@kapsakcj
Copy link

This did in fact fix the error with SPAdes. Unicycler worked like a charm afterwards and generated an assembly. Thanks a lot! @rec3141

@rec3141
Copy link
Author

rec3141 commented Jan 25, 2018 via email

@rrwick
Copy link
Owner

rrwick commented Jan 30, 2018

Thanks for the help @rec3141!

@rrwick rrwick closed this as completed Jan 30, 2018
@rrwick
Copy link
Owner

rrwick commented Jan 30, 2018

Oops - I just closed the issue, but I think I'll leave it open as an enhancement request. I'll close it when I add some Unicycler options to make this easier.

@rrwick rrwick reopened this Jan 30, 2018
@rrwick
Copy link
Owner

rrwick commented Jan 31, 2018

Okay, I've added a --spades_tmp_dir option in this commit: 0ea7b98

I've also added a note in the Unicycler FAQs.

The change is currently just in the development branch, but it should make it into the next release. Thanks again!

@rrwick rrwick closed this as completed Jan 31, 2018
@rrwick
Copy link
Owner

rrwick commented Jan 20, 2022

In case anyone still runs into this issue, I thought I'd mention that in the upcoming version of Unicycler (v0.5.0), I've removed the --spades_tmp_dir option because there is now the more general --spades_options which lets you pass any option to SPAdes.

So instead of --spades_tmp_dir path/to/dir you can use --spades_options "--tmp-dir path/to/dir".

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

No branches or pull requests

3 participants