CompareM icon indicating copy to clipboard operation
CompareM copied to clipboard

A quickstart running on Mac OS X

Open ctb opened this issue 7 years ago • 10 comments

Bits and pieces of comparem are mildly incompatible with Mac OS X (Sierra, in my case). See this quickstart for getting it working.

I'll provide patches and pull requests as I can, but thought I'd leave this here for others!

ctb avatar Feb 19 '18 19:02 ctb

ctb, I see from your Quickstart that you're also running CompareM on macOS. I'm running on macOS High Sierra 10.13.3, and have been able to install comparem and run wf_aai without any errors. Both the genecalling and simliarity search seem to produce viable output (at least in query_genes.faa & hits_sorted.tsv (the .dmnd file is unreadable)). However, aai_summary.tsv only contains information for # genes in each genome; #orthologs and AAI info all contain zeros. This occurs with our without the changes in your Quickstart method. So it seems that aai_calculator.py may be the culprit for me (and seemingly others, too)... have you run into any problems such as this? Does anything in particular seem like it could cause this? Thanks

c1imbe2 avatar Mar 09 '18 18:03 c1imbe2

first question - were you able to run it on the data set I tried it on, the one that's included with sourmash? and did you see the same problem? let me know!

ctb avatar Mar 15 '18 13:03 ctb

Yes, same problem using the sourmash dataset. Terminal gives the following output, regardless if I change the 'sed' and 'sort' commands or leave them as originally written: sed: 1: "/var/folders/3j/gh2jtvw ...": invalid command code f sort: unrecognized option `--parallel=8' Usage: sort [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S memsize] [-T tmpdir] [-t separator] [-o outfile] [--batch-size size] [--files0-from file] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--mmap] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source file]] [--compress-program program] [file ...] This leads me to believe that there is an alternate 'similarity_search.py' somewhere that is being called by comparem. In fact, I can alter similiarity_search.py however I like -- even delete it -- and I still get the same exact output. A finder search of "similarity_search" only reveals the file "/opt/local/lib/python2.7/site-packages/comparem/similarity_search.py", except for "/opt/local/lib/python2.7/site-packages/comparem/pycache/similarity_search.cpython-36.pyc". Unsure what this file is, but I can alter it too, without consequence. Where is the similarity_search.py file that is being used?!

c1imbe2 avatar Mar 15 '18 17:03 c1imbe2

hi @c1imbe2 try this:

git clone https://github.com/dparks1134/CompareM.git
cd CompareM/
pip install -e .

and then modify the file. My instructions were wrong - you don't want to do a regular pip install!

ctb avatar Mar 15 '18 17:03 ctb

(The pip install -e installs it in developer mode, where changes to the source code will be reflected in the execution.)

ctb avatar Mar 15 '18 17:03 ctb

I uninstalled using pip uninstall comparem and re-installed using pip install -e comparem. Same result. I can delete similarity_search.py and comparem still runs fine.

c1imbe2 avatar Mar 15 '18 20:03 c1imbe2

Sorry - do git checkout, cd into dir, do pip install -e in that dir! :)

-- Titus Brown, [email protected]

On Mar 15, 2018, at 1:01 PM, c1imbe2 [email protected] wrote:

I uninstalled using pip uninstall comparem and re-installed using pip install -e comparem. Same result. I can delete similarity_search.py and comparem still runs fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ctb avatar Mar 15 '18 20:03 ctb

@ctb Thanks -- this worked for me. After installing in developer mode, the trick was editing the simliarity_search.py found in the the python2.7/comparem directory, not the directory containing cloned files. Thank you!!

c1imbe2 avatar Mar 20 '18 16:03 c1imbe2

great!!

ctb avatar Mar 20 '18 16:03 ctb

I am sorry @ctb but I am not able to get comparm working on my mac. I tried to follow your guide https://hackmd.io/L2llRUU_SrWfI4OYN-uozQ?view and also this conversation, but no matter what I do I end up with 0 Orthologs (which is the problem leading to all this). I guess my main problem is that I do not understand how I am supposed to edit the similarity_search.py file. I am biologist and trying to learn bioinformatics on my own for the past few month, but I have no idea what is going on exactly and which sort/gsort I have to change. Would be great If you could clarify how to solve all this. The KostaLab alternative is not an option for me since I have more than their allowed max genomes.

FWittmers avatar Jul 22 '20 15:07 FWittmers