15.2. What are the dependencies
There are two kind of dependencies. First, the Python libraries such as matplotlib or Pandas. Second, the external tools such as BWA (alignment) or Kraken (taxonomy). The first kind of tools can be installed using Anaconda and the default conda channel. For instance:
conda install pandas
The second kind of tools can also be installed using another conda channel called bioconda. For instance:
conda install bwa
Since version 0.12, most pipelines have been moved outside of sequana. Sequana itself only requires:
conda install kraken2 cd-hit krona
15.3. Installation issues
As explained in the previous section, most of the dependencies can be installed via Conda. If not, pip is recommended. Yet there are still a few dependencies that needs manual installation.
wget https://downloads.sourceforge.net/project/quast/quast-4.2.tar.gz tar -xzf quast-4.2.tar.gz cd quast-4.2
Alternatively, get the source code from their GitHub (takes a while):
git clone https://github.com/ablab/quast cd quast python setup.py install
graphviz provides an executable called dot. If you type dot in a shell and get this error message:
Warning: Could not load ...lib/graphviz/libgvplugin_gd.so.6" - file not found
This may be solved by re-installation graphviz using the main anaconda channel (instead of bioconda):
conda install --override-channels -c anaconda graphviz=2.38.0
- Update April 2017:
replace anaconda with conda-forge
If you get errors related to the X connection, you may need to change the backend of matplotlib. To do so, go in your home directory and in this directory
Check if the file matplotlibrc exits, if not, type:
echo "backend: Agg" > matplotlibrc
or edit the file and make sure the line starting with "backend" uses the Agg backend:
Save, exit the shell, start a new shell.
15.3.4. pysam / samtools / bzip2
We have experienced few issues with pysam and samtools. Here are some solutions.
from pysam.libchtslib import * ...ImportError: libhts.so.1: cannot open shared object file: No such file or directory
This may be solved by removing conda installation and using pip instead:
conda remove pysam pip install pysam
Another error know for pysam version 0.11.2.2 raises this error:
ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory
Downgrading to version 0.11.2.1 and upgrading to working version solves the problem:
conda install pysam=0.11.2.1
but one reason was also related to the order of the channel in the .condarc file. You may get bzip2 from the default channel and not from conda-forge (reference: https://github.com/bioconda/bioconda-recipes/issues/5188)
conda install --override-channels -c conda-forge bzip2
pysam may not compile due to a missing dependency on lzma. Under fedora, type:
yum install liblzma liblzma-devel
15.3.5. qt and pyqt
188.8.131.52. Qt Version
With PyQt 5.12.3 and python3.7, we got lots of errors:
SystemError: <built-in function connectSlotsByName> returned a result with an error set
This seems to be a PyQt bug according to several github projets based on pyqt. It may be fixed a version above. Dowgrading e.g. to pyqt 5.9.2 does not solve the problem.
184.108.40.206. Qt compatibility across platform
from PyQt5.QtWebKitWidgets import QWebView ...ImportError: libQt5WebKitWidgets.so.5: cannot open shared object file: No such file or directory
This may be solved by re-installation qt using the main anaconda channel (instead of bioconda):
conda install --override-channels -c anaconda qt
pip install PyQtWebEngine
If we believe this issue: https://github.com/conda-forge/pyqt-feedstock/issues/19
If you get this error (using conda install sequana):
ImportError: libselinux.so.1: cannot open shared object file: No such file or directory
it looks like you need to install libselinux on your environment as reported here.
15.3.7. pytz installation
If you get this error:
ImportError: C extension: No module named 'pytz.tzinfo' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
pip uninstall pytz pip install --pre pytz
15.4. Expected input format
Most of the pipelines and standalone expect FastQ files with the extension fastq.gz meaning that files are gzipped.
Besides, the filename convention is as follows:
that is _R1_ and _R2_ indicates the paired or single-ended files and the PREFIX is used to create directories or reports; it must be present.
New in version 0.2: more flexible tags are now possible in sequana pipelines and sequanix using e.g. _R in the input_readtag in the configuration file of the pipelines.
15.6. QXcbConnection issue
If you get this error:
QXcbConnection: Could not connect to display localhost:10.0
this is an issue with your Qt backend. You need to change it to Agg.
15.7. Variant Calling pipeline
If snpeff fails with this type of errors:
java.lang.RuntimeException: Error reading file 'null' java.lang.RuntimeException: Cannot find sequence for 'LN831026.gbk'
this may be because your genbank does not contain the sequences.
Another type of errors is that the sequence and genbank are not synchrone. We would recommend to use the code here to download the Fasta and genbank:
15.8. Quality Control pipeline
Please see the tutorial, user guide or pipelines section and look for the quality control.
Then, if you do not find your solution, please open an issue on github: https://github.com/sequana/sequana/issues
If you use the singularity container and get this kind of error:
singularity shell sequana-sequana-master.img ERROR : Base home directory does not exist within the container: /pasteur ABORT : Retval = 255
it means the container does not know about the Base home directory.
If you have sudo access, add the missing path as follows:
sudo singularity shell --writable sequana-sequana-master.img mkdir /pasteur exit
If you do not have sudo permissions, copy the image on a computer where you have such permission, use the same code as above and copy back the new image on the computer where you had the issue.
Finally, try to use the container again using this code:
singularity shell sequana-sequana-master.img
15.10. I got a error "main thread is not in the main loop"
Traceback (most recent call last): File ".../lib/python3.5/tkinter/__init__.py", line 627, in after_cancel data = self.tk.call('after', 'info', id) RuntimeError: main thread is not in main loop
This is related to the backend used by matplotlib. This can be ignored. We do not have any solution for now, except finding an alternated backend for matplotlib. This can be done using a special file called matplotlibrc with this content:
where you can replace tkagg with e.g. qt5agg
15.11. Installation issue on Mac
On a MacOSx conda environment (PYthon3.9), I could not build datrie with this kinf of error message:
error: command ‘llvm-ar’ failed: No such file or directory ERROR: Failed building wheel for datrie Failed to build datrie Failed to build datrie ERROR: Could not build wheels for datrie, which is required to install pyproject.toml-based projects
The solution was to set the AR variable:
Got this error when using pbindex on a bam file:
>|> 20230411 07:50:40.460 -|- FATAL -|- Run -|- 0x7f6a473e5b48|| -|- pbindex ERROR: [pbbam] BAM header ERROR: read group ID not found: a1e75744/3--3
The bam file is missing the read group entry. This happenned when subsampling the original file.
Add the RG tag with the correct ID.
You can do:
samtools view -H ORIGINAL.bam | egrp '@RG' > new_header.txt samtools reheader new_header.txt sample.bam > corrected_sample.bam