Skip to content
Vinh Tran edited this page Dec 13, 2023 · 34 revisions

There are some known reasons why PhyloProfile might give you an error message. Most often this will be related to input data that is not complete or cannot be fully read by R. Find some potential errors and solutions to them below.

NOTE: We do not provide support for old versions. If you encounter any failures, please create pull requests. You are responsible for resolving any issues you experience while running old versions of PhyloProfile.

Table of Contents

Problems by Installing the package and its dependencies

R keeps asking for update other libraries/packages while using demo data sets

Until PhyloProfile and its data package PhyloProfileData are published in Bioconductor, we need to install the development version of the those packages and some other dependencies. If you didn't install the PhyloProfileData package but still want to use the demo data, PhyloProfile will try to automatically install that data package. However, there will be 2 issues. First, the data package is not available to be automatically installed, you need to install it manually from Github (LINK). Second, the demo data implemented inside the data package are accessable in Bioc's ExperimentHub version 1.11.1, which is a development version. Installing this devel package will cause the request for updating other libraries/packages as well.

Therefore, if you would like to work with the demo data before the data package PhyloProfileData is offically accpeted by Bioconductor, please install the devel version of this package via github.

Other problems

Please read our instruction for installing and running PhyloProfile.

Problems with dependencies

Rcpp

Rcpp cannot be loaded, Symbol not found: _EXTPTR_PTR (Mostly related to Rcpp 1.0.5)

> library(PhyloProfile)
Error: package or namespace load failed for 'PhyloProfile' in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so, 6): Symbol not found: _EXTPTR_PTR
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so
  Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
 in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so

If you encounter this issue, please install Rcpp from source

install.packages("Rcpp", type = "source")

Another solution is downgrade Rcpp to the older working version (e.g. v1.0.4)

devtools::install_version('Rcpp', version = '1.0.4', repos = 'http://cran.us.r-project.org')

After restarting R session, Rcpp should be loaded correctly again.

xml2

Error message:

/home/worker/envs/phyloprofile_v1.16/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lxml2: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [/home/worker/envs/phyloprofile_v1.16/lib/R/share/make/shlib.mk:10: xml2.so] Error 1
ERROR: compilation failed for package ‘xml2’

Solution (only if you are using conda):

conda install -c conda-forge lxml

curl

Error message:

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/x86_64-linux-gnu
Using PKG_LIBS=-lcurl
--------------------------- [ANTICONF] --------------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
In file included from /home/worker/envs/phyloprofile_v1.16/x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
                 from /usr/include/x86_64-linux-gnu/sys/types.h:25,
                 from /usr/include/x86_64-linux-gnu/curl/system.h:430,
                 from /usr/include/x86_64-linux-gnu/curl/curl.h:38,
                 from <stdin>:1:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:492:49: error: missing binary operator before token "("
  492 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
      |                                                 ^
In file included from /home/worker/envs/phyloprofile_v1.16/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
                 from /usr/include/x86_64-linux-gnu/curl/curl.h:49:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
  228 | #if __GLIBC_USE (DEPRECATED_GETS)
      |                 ^
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’

Solution (only if you are using conda):

conda install -c conda-forge pkg-config gsl 

PhyloProfile cannot be opened

PhyloProfile was installed sucessully, but when you started it, you got this error message:

Listening on http://127.0.1:7386
Error in utils::browseURL(appUrl) : 
  'browser' must be a non-empty chracter string

This is because the R_BROWSER environment variable of R was nor correctly set. To configure it with your browser (e.g. firefox), write this line in the ~/.bashrc (or ~/.bash_profile for macOS)

export R_BROWSER=${R_BROWSER-'firefox'}

Restart the terminal (or use source ~/.bashrc and restart the R session), now your default browser (FireFox in this example) will be good to be used.

If not, please open ~/.Rprofile (or create one if not exists) and put this line into that file:

options(browser="firefox")

Restart your R session, this problem should be solved!

Issues with parsing new taxa

PhyloProfile is provided with a set of pre-identified taxa (based on the Quest for Ortholog data set). The taxonomy information in PhyloProfile is stored in different files within the PhyloProfile/PhyloProfile/data folder (to check where PhyloProfile package is installed, im R Terminal type find.package("PhyloProfile")). Two most important files are the preProcessedTaxonomy.txt and taxonomyMatrix.txt. The preProcessedTaxonomy.txt file stored a pre-processing NCBI taxonomy database. While the taxonomyMatrix.txt file is used for sorting the input taxa in the profile plot.

If your phylogenetic profiles contains taxa that are not part of that set, the new taxa will need to be parsed. Normally, if the new taxa can be found in the preProcessedTaxonomy.txt, you can easily parse the taxonomy info for those taxa by clicking on Parse taxnomoy info button in the Shiny App of PhyloProfile. In case your pre-processing NCBI taxonomy database is out-of-date and some of the new taxa are not in that old database, you will see the Add taxonomy info button instead. You have to either manually add those taxa using the Add taxonomy info button, or update the preProcessedTaxonomy.txt file by using this script

Rscript updateNCBITax4PhyloProfile.R

After update the local NCBI taxonomy database and restart PhyloProfile, you could use now the Get taxonomy info button to parse the info for your new taxa. For some technical reason, if this function not works correctly, you can download the list of those new taxa (the download button can be found at the end of the new taxa table) and manually add those taxa into the current taxonomy database of PhyloProfile by using this script

Rscript manualTaxParser.R unknowTaxa.txt

If all of the solutions above not work, please drop us a message with your input phylogenetic profile file.

Issues with input files

Rows have unequal length

If you upload input file in long or wide format, please make sure that all the rows have the same length!!

Error while parsing an orthoXML input file

OrthoXML files are parsed by a script (scripts/orthoxmlParser.py). For now this is still a Python script and requires two libraries, bs4 and lxml. Make sure these are installed if you want to use OrthoXML (pip install bs4 and pip install lxml should do the trick).

If it still does not, please try to run the scripts/orthoxmlParser.py -i yourInput.orthoxml from the command line and save the output. If it still crashes please report a bug or open an issue on GitHub so that we can fix it.

As a last resort there is an alternative perl script (perl scripts/orthoxmlParser.pl -i yourInput.orthoxml) that you can try and which does not require any special libraries.

Issues while plotting phylogenetic profile plot

Error: arguments imply differing number of rows: 0, 1

This can happen if your input matrix only contains one line. Check that your input data is formatted correctly.

Error: id variables not found in data: geneID

The header of gene column in your input file (only in long or wide format,) has to be "geneID" for PhyloProfile to recognize it.

Error: no rows to aggregate

This can happen if (1) one column of the additional information in your long input data is completely empty or full of NAs; or (2) all cells in the wide input are orthoID#NA#someValue or orthoID#someValue#NA. If that is the case, please remove the column (for long input) or all the NAs (for wide input, e.g. orthoID#NA#someValue -> orthoID#someValue or orthoID#someValue#NA -> orthoID#someValue) or replace the NAs with other values. If this is not the problem, you have found a new bug. Please be in touch ;)

Error: second argument must be a list

Please check if any of input genes are absent in all taxa, i.e. the complete row is filled with NA in wide input. The tool, unfortunately, does not accept these genes. Please remove those genes and try again.

Error in if: missing value where TRUE/FALSE needed

This happens if we fail to fetch the taxonomy information. This problem is mostly caused by missing taxonomy information in one/some of the new input taxa and it leads to am empty row in the data/taxonomyMatrix.txt file. Using the function "Reset taxonomy data" in the Function menu to reset the taxonomy files back to their original working state could solve the problem. Since the validity of taxon IDs are now being checked before processing, this error shouldn't be exist any more. However, if it happens to you, please let us know.

Why do the customized profile keep refreshing after changing the "% of present taxa"?

This can happen when changing the threshold while the plot is refreshing. You can avoid this problem by unchecking the Auto update plot button (on bottom left of the parameter panel).

Problem by showing Point's info

Error: argument is of length zero

Sometimes things go weird. Reselect the taxon/supertaxon that you want to highlight and it will work again.

Problems while plotting domain architecture

Error: Aesthetics must be either length 1 or the same as the data (1): x, y, yend, xend

Please check whether the ID of the selected sequence (that is shown as orthoID in the Detailed Plot) is present in the domain input file. This error is usually caused by the missing ID in the domain input file. Click here to see the valid format for domain files.

Problems with analysis functions

Errors in Gene Age Estimation function

Error: invalid 'times' argument

Please check if you are working with taxonomy rank Strain, but your reference species has a Species ID. If yes, please change taxonomy rank to Species and run the function again.

Other issues

The download function does not work

Problem: You clicked on the "Download plot" (or Download filtered data) button, entered a file name on to "Download file" window and clicked Save, but the file...was not saved :(

This happens if you run phyloprofile.R directly in RStudio. Click on Open in Browser to open PhyloProfile in your web browser. The download function should then work. This was reproduced on Ubuntu 14.04 LTS and it worked with Firefox. On MacOS this error wasn't observed so far.

Font of plots look awful

If you recognize that the text on your plots is difficult to read due to incorrectly redering, like this: Then you should install R Cairo package by enter this command in R terminal

install.packages("Cairo", force = TRUE)

If you have problem by installing Cairo package, please check this.

This font issue happens mostly on Linux system.

Wrong info from public databases

Links to public databases (e.g. NCBI, UniProt, PFAM, SMART) were automatically generated using the corresponding taxonomy ID and protein ID from the selected protein. Sometimes the content of the website does not show the correct information for that protein, especially when you are using your own sequence ID.

Problem with ExperimentHub

For the first time installing PhyloProfile, you could get this error:

Error in .updateHubDB(hub_bfc, .class, url, proxy, localHub) : 
Invalid Cache: sqlite file
Hub has not been added to cache
Run again with 'localHub=FALSE'

This is because there is no Cache for ExperimentHub found in your system. You can create one by using this code (run in R terminal)

library(ExperimentHub)
## create the new default caching location
newcache = tools::R_user_dir("ExperimentHub", which="cache")
setExperimentHubOption("CACHE", newcache)
eh = ExperimentHub()

In some cases, if you already have an old Cache that is not compatible any more with the working version of ExperimentalHub for PhyloProfile, please check [the solutions in this page].(https://bioconductor.org/packages/devel/bioc/vignettes/ExperimentHub/inst/doc/ExperimentHub.html#default-caching-location-update)

Timeout error while downloading taxdmp.zip

When starting for the first time, PhyloProfile will download the NCBI taxonomy file taxdmp.zip. Sometimes this process is aborted, probably because the NCBI server is currently overload.

Listening on http://127.0.0.1:6817
trying URL 'https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip'
Content type 'application/zip' length 61419476 bytes (58.6 MB)
========
downloaded 9.6 MB

Warning in utils::download.file("https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip",  :
  downloaded length 0 != reported length 0
Warning in utils::download.file("https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip",  :
  URL 'https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip': Timeout of 60 seconds was reached
Warning: Error in utils::download.file: download from 'https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip' failed
  51: utils::download.file
  50: processNcbiTaxonomy
  46: observe [/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/PhyloProfile/PhyloProfile/server.R#109]
  45: <observer>
   2: shiny::runApp
   1: runPhyloProfile

In this case, increase the timeout limit to allow more time for the download could solve the issue:

options(timeout=999)

Another solution is to create an API Key in NCBI and add that to your Rprofile file (or Renviron or bashrc, bash_profile, zshrc). See https://docs.ropensci.org/taxize/reference/taxize-authentication.html for more details.

My bug is missing!

Please open an issue on GitHub or contact us via email at [email protected].

Clone this wiki locally