Skip to content
New issue

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

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

Already on GitHub? # to your account

Invalid Strata object #10

Open
champ52018 opened this issue Jul 22, 2019 · 8 comments
Open

Invalid Strata object #10

champ52018 opened this issue Jul 22, 2019 · 8 comments

Comments

@champ52018
Copy link

champ52018 commented Jul 22, 2019

tid<-'47426'
strata=uniprot_strata(tid, from = 2) %>% strata_apply(f= diverse_subtree,n=5,weights=uniprot_weight_by_ref()) %>% use_recommended_prokaryotes() %>% add_taxa(c('4932', '9606')) %>% uniprot_fill_strata()

#it shows the following error
Error in is_valid_strata(strata) :
Invalid Strata object, the focal species '47426' is not found in the tree

May I know what might be the issue? I checked the organism 'A.cepistipes'; it exist in NCBI taxonomy but, the program could not identify it. Please help me solve the issue.

Any help would be appreciated! Thanks

@arendsee
Copy link
Owner

@champ52018 Thanks for the reproducible report! The problem here is that Armillaria cepistipes is not in the UniProt database. This is a real bug though, since phylostratr should give you a chance to add your own sequence before blowing up. Pull the latest version of phylostratr from github and the problem should be fixed. You will still have to provide your own proteome for the focal species. See the code below:

require('phylostratr')
tid<-'47426'
strata=uniprot_strata(tid, from = 5) %>% 
  strata_apply(f=diverse_subtree,n=2,weights=uniprot_weight_by_ref()) %>% 
  use_recommended_prokaryotes() %>%
  add_taxa(c('4932', '9606')) %>%
  uniprot_fill_strata()
strata@data$faa[[tid]] <- '/path/to/your/file.faa'

Let me know if this works for you.

@arendsee arendsee reopened this Jul 22, 2019
@champ52018
Copy link
Author

champ52018 commented Jul 23, 2019

@arendsee Thank you so much for your reply! I tried again using the latest version of pylostratr (BMC Release (https://github.com/arendsee/phylostratr/releases/tag/0.2.0) but I got the same error. It blows up again.

I am copying the steps I followed so that I can explain better:

  1. I removed the previous version that I installed from github.
  2. I downloaded the source code: https://github.com/arendsee/phylostratr/archive/0.2.0.tar.gz and installed it using

install.packages("phylostratr_v_0.2.0_bmc_release.tar.gz", repos=NULL)

  1. I tried to rerun the previous analysis but it showed the same error

tid<-'47426'
strata=uniprot_strata(tid, from = 5) %>%
strata_apply(f=diverse_subtree,n=2,weights=uniprot_weight_by_ref()) %>%
use_recommended_prokaryotes() %>%
add_taxa(c('4932', '9606')) %>%
uniprot_fill_strata()

Error in is_valid_strata(strata) :
Invalid Strata object, the focal species '47426' is not found in the tree

Any help would be highly appreciated!

Thanks again!

@arendsee
Copy link
Owner

arendsee commented Jul 23, 2019

Ah, you are downloading the last tagged release, not the most recent one. Try installing like so:

devtools::install_github("arendsee/phylostratr")

That will retrieve the very latest version.

@champ52018
Copy link
Author

Hi, at first I downloaded and installed using:

devtools::install_github("arendsee/phylostratr")

The second time, after seeing your message I did using

install.packages("phylostratr_v_0.2.0_bmc_release.tar.gz", repos=NULL)

@arendsee
Copy link
Owner

The command

install.packages("phylostratr_v_0.2.0_bmc_release.tar.gz", repos=NULL)

installs the old version, you should use the version I just committed to github. You can get that through devtools::install_github.

@champ52018
Copy link
Author

Hi I did that as well. It gives the same problem.

@arendsee
Copy link
Owner

Can you show me the output of devtools::session_info()?

@arendsee
Copy link
Owner

@champ52018 Did you find a solution to the problem?

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

No branches or pull requests

2 participants