drostlab / orthologr

Genome wide orthology inference and dNdS estimation
https://drostlab.github.io/orthologr/
GNU General Public License v2.0
88 stars 27 forks source link

Please check the correct path to Comeron... the interface call did not work properly #25

Closed yxj17173 closed 3 years ago

yxj17173 commented 3 years ago

Hi Dr. Drost, @HajkD The example works fine, and by use of the built-in data I could get a data frame of Divergence Stratigraphy.

test <- divergence_stratigraphy(
  query_file      = system.file('seqs/ortho_thal_cds.fasta', package = 'orthologr'),  
  subject_file    = system.file('seqs/ortho_lyra_cds.fasta', package = 'orthologr'),
  eval            = "1E-5", 
  ortho_detection = "RBH",
  comp_cores      = 30, 
  quiet           = TRUE, 
  clean_folders   = TRUE )

After blastp ran, it shows

Orthology Inference Completed.
Starting dN/dS Estimation ...
dN/dS Estimation Completed.
Initial input contains 20 rows.
Filtering done. New output table contains 20 rows.
Divergence Stratigraphy completed successfully.

But dN/dS Estimation of my datasets failed.

Xt_vs_Xl_DM <- divergence_stratigraphy(
  query_file      = "/mnt/data4/disk/YXJ/EmbroGenesis/Ref/Xenopus_tropicalis.9.0/Xtropicalis.v9_Xenbase.cds.fa",
  subject_file    = "/mnt/data4/disk/YXJ/EmbroGenesis/Ref/Xenopus_tropicalis.9.0/XENLA_9.2_Xenbase.cds.fa",
  eval            = "1E-5", 
  ortho_detection = "RBH",
  comp_cores      = 30, 
  quiet           = TRUE, 
  clean_folders   = TRUE )

After blastp ran, it shows

Starting dN/dS Estimation ...
Error in { : 
  task 1 failed - "Please check the correct path to Comeron... the interface call did not work properly."
Calls: divergence_stratigraphy ... nrow -> dNdS -> compute_dnds -> %dopar% -> <Anonymous>
Execution halted

I don't know how to figure it out. I use the Xenbase genome data. I try to set environment in the Studio, the KaKs_Calculator is the "~/usr/bin".

Sys.setenv(PATH=paste(Sys.getenv("PATH"), "~/usr/bin:~/usr/local/src/ncbi-blast-2.11.0+/bin", sep=":"))
system("KaKs_Calculator -h")
****************************************************************************************
  Program: KaKs_Calculator Toolbox
  Version: 2.0, June. 2009
  Description: A toolbox based on integrating gamma methods and sliding window strategy.
****************************************************************************************

The Error still remained. Many thanks in advance for your help!

yxj17173 commented 3 years ago

And I change the method for dN/dS inference, there are some bugs.

x <- dNdS(query_file      = system.file('seqs/ortho_thal_cds.fasta', package = 'orthologr'),
          subject_file    = system.file('seqs/ortho_lyra_cds.fasta', package = 'orthologr'),
          delete_corrupt_cds = TRUE, # coding sequences that cannot be divided by 3 (triplets) will be removed
          ortho_detection = "RBH", # perform BLAST best reciprocal hit orthology inference
          aa_aln_type     = "pairwise", # perform pairwise global alignments of AA seqs 
          aa_aln_tool     = "NW", # using Needleman-Wunsch
          codon_aln_tool  = "pal2nal", # perform codon alignments using the tool Pal2Nal
          dnds_est.method = "YN", # use YN's method for dN/dS inference
          comp_cores      = 20)
Orthology Inference Completed.
Starting dN/dS Estimation ...
Error: `x` and `y` must share the same src, set `copy` = TRUE (may be slow).
Run `rlang::last_error()` to see where the error occurred.

And rang error is

> rlang::last_error()
<error/rlang_error>
`x` and `y` must share the same src, set `copy` = TRUE (may be slow).
Backtrace:
 1. orthologr::dNdS(...)
 3. dplyr:::inner_join.data.frame(dNdS_tbl, hit.table_selected, by = "query_id")
 4. dplyr::auto_copy(x, y, copy = copy)
 5. dplyr:::glubort(...)

After I change the methods back to "Comeron", the Error still remained.

weikai-320722 commented 3 years ago

Hi,

I got same error when I run divergence_stratigraphy(). Error: x and y must share the same src, set copy = TRUE (may be slow).

did you fix this error ?

Kai

HajkD commented 3 years ago

Hey @yxj17173 and @weikai-320722

Many thanks for making me aware of this issue.

I now added copy = TRUE to the inner_join() that was affected. Could you please let me know if it works for you now?

Regarding the KaKs Calculator 2 system() call, I will have a closer look to check how this could be resolved.

Cheers, Hajk

yxj17173 commented 3 years ago

It works, thanks a lot! Sorry for long time no response.