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

How to set PATH to OrthoFinder2 correctly? #22

Open
janstrauss1 opened this issue Aug 3, 2020 · 5 comments
Open

How to set PATH to OrthoFinder2 correctly? #22

janstrauss1 opened this issue Aug 3, 2020 · 5 comments

Comments

@janstrauss1
Copy link

Hi @drostlab,

I'm trying to set up orthologr for detection of orthologs in multiple species.

I've installed orthofinder into my PATH using conda install orthofinder.
Calling orthofinder -h from terminal shows OrthoFinder version 2.4.0 Copyright (C) 2014 David Emms suggesting that orthofinder is installed correctly.

Yet, I still run into the following issue when running the example code:

# specify species names
orgs <- c("Arabidopsis lyrata", 
          "Capsella rubella", "Solanum lycopersicum")
# download proteome files for all species          
biomartr::getProteomeSet(db = "refseq", organisms = orgs, path = "of_proteomes")
# download annotation files for all species          
biomartr::getGFFSet(db = "refseq", organisms = orgs, path = "of_gff")
# select longest splice variant per gene locus
retrieve_longest_isoforms_all(proteome_folder = "of_proteomes", 
                              annotation_folder = "of_gff",
                              annotation_format = "gff", 
                              output_folder = "of_proteomes_longest_sv")
> orthofinder2(proteome_folder = "of_proteomes_longest_sv", comp_cores = 4)
sh: orthofinder: command not found
Error: It seems like you don't have OrthoFinder2 installed locally on your machine or the PATH variable to the OrthoFinder2 program is not set correctly.

How should I setup orthofinder correctly?

Many thanks in advance for your help!

@HajkD
Copy link
Member

HajkD commented Aug 3, 2020

Hi Jan,

Many thanks for your feedback.

So far, orthologr didn't support the conda path version of Orthofinder2, but assumed that it is installed as system tool accessed via usr/local/bin. I realise that most people will install OF2 via conda, so I now changed the default path to the miniconda path /opt/miniconda3/bin/orthofinder. I just pushed the new version of orthologr and this new feature should be accessible to you now.

Please also make sure you have DIAMOND installed as executable tool (/usr/local/bin).

Does this work for you?

Best wishes,
Hajk

@janstrauss1
Copy link
Author

Hi Hajk,

Many thanks for your quick response!

Unfortunately, this still doesn't seem to work for me and I get the error:

...
> # run orthofinder2 to infer ortho groups for the specified species
> orthofinder2(proteome_folder = "of_proteomes_longest_sv", comp_cores = 4)
sh: /opt/miniconda3/bin/orthofinder: No such file or directory
Error: It seems like you don't have OrthoFinder2 installed locally on your machine or the PATH variable to the OrthoFinder2 program is not set correctly.

I'm in a macOS environment and my path to OF2 appears to be /Users/janstrauss/miniconda3/bin/orthofinder and /Users/janstrauss/miniconda3/bin/diamond for DIAMOND.

Is there maybe a way to set a custom path in orthologr as for the orthologs() function?

Many thanks in advance for your help!

Jan

HajkD added a commit that referenced this issue Aug 8, 2020
…ir own orthofinder path (Many thanks to Jan Strauss) #22
@HajkD
Copy link
Member

HajkD commented Aug 8, 2020

Hi Jan,

Thank you very much for coming back to me and for this great feature request.

I now added a new path argument to orthofinder2() that allows you to specify your own path.

The only problem that I still see is that you cannot pass the diamond path to the orthofinder command line call.
So far, orthofinder assumes that DIAMOND is installed in the classic usr/local/bin environment and not in the conda/miniconda path. See also details here: davidemms/OrthoFinder#406 .

I will see if I can find a way around this so that users can also set the diamond path in orthofinder2(), but would be grateful if you could also share some ideas on how to approach this. I would then implement whatever is required.

I hope this helps?

Many thanks,
Hajk

@mcatto
Copy link

mcatto commented Aug 1, 2022

Hi, when I try to set the dNdS functions param ortho_detection to "Orthofinder2" I get the error "Error: Please choose a orthology detection method that is supported by this function." Is there something else I should be doing? Or is this not included in the dNdS function?

@HajkD
Copy link
Member

HajkD commented Aug 3, 2022

Hi @mcatto

Thank you for your question. Unfortunately, dNdS with orthogroups is not supported yet. It is on my long ToDo list, but it may require a while until this feature is available.

I hope you find pairwise dNdS useful anyway.

Cheers,
Hajk

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

3 participants