chg60 / DEPhT

Fast and sensitive discovery of complete phages and prophages in bacterial genome sequences
GNU General Public License v3.0
16 stars 3 forks source link

HTML Output Issue #47

Open bbshockey opened 6 months ago

bbshockey commented 6 months ago

I have been attempting to run the DEPtH program on a few myco genomes to understand the software and I am encountering an issue with the html output. Regardless of the genome I get the following errors:

(depht) ip-128-239-106-199:~ margaretsaha$ depht /Users/margaretsaha/Desktop/Bjorn2023/Mycobacteroides_abscessus_ATCC_23006.fasta /Users/margaretsaha/Desktop/Bjorn2023 -v

Running DEPhT with existing 'Mycobacterium' model. parsing '/Users/margaretsaha/Desktop/Bjorn2023/Mycobacteroides_abscessus_ATCC_23006.fasta' as fasta... annotating t(m)RNA and CDS genes de novo... masking conserved bacterial features... looking for high-probability prophage regions... searching for phage gene homologs... searching for attL/R... generating final reports... /Users/margaretsaha/anaconda3/envs/depht/lib/python3.9/site-packages/Bio/SeqIO/InsdcIO.py:726: BiopythonWarning: Increasing length of locus line to allow long name. This will result in fields that are not in usual positions. warnings.warn( Traceback (most recent call last): File "/Users/margaretsaha/anaconda3/envs/depht/bin/depht", line 10, in sys.exit(main()) File "/Users/margaretsaha/anaconda3/envs/depht/lib/python3.9/site-packages/depht/main.py", line 372, in main write_prophage_output(genome_outdir, contigs, prophages, draw_dir, File "/Users/margaretsaha/anaconda3/envs/depht/lib/python3.9/site-packages/depht/main.py", line 553, in write_prophage_output draw_complete_diagram(outdir, [contig.record for contig in contigs], File "/Users/margaretsaha/anaconda3/envs/depht/lib/python3.9/site-packages/depht/functions/visualization.py", line 47, in draw_complete_diagram host_graphic_resources = create_host_graphic_resources(contigs, File "/Users/margaretsaha/anaconda3/envs/depht/lib/python3.9/site-packages/depht/functions/visualization.py", line 169, in create_host_graphic_resources graphic_record = host_translator.translate_record( File "/Users/margaretsaha/anaconda3/envs/depht/lib/python3.9/site-packages/dna_features_viewer/BiopythonTranslator/BiopythonTranslatorBase.py", line 89, in translate_record sequence=str(record.seq) if record.seq.defined else None, AttributeError: 'Seq' object has no attribute 'defined'

I get the correct csv and gbk outputs but no HTML file.

My computer operating system is macOS Monterey version 12.4

My DEPhT dependencies are as follows: (depht) ip-128-239-106-199:~ margaretsaha$ conda list -n depht

packages in environment at /Users/margaretsaha/anaconda3/envs/depht:

#

Name Version Build Channel

aragorn 1.2.41 h1e3017b_1 bioconda argtable2 2.13 h1de35cc_1001 conda-forge biopython 1.79 py39ha30fb19_3 conda-forge bitarray 2.0.1 py39h89e85a6_0 conda-forge blast 2.9.0 pl526hce2a5c9_7 bioconda bokeh 2.4.3 pyhd8ed1ab_3 conda-forge brotlipy 0.7.0 py39ha30fb19_1005 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge ca-certificates 2022.9.24 h033912b_0 conda-forge certifi 2022.9.24 pyhd8ed1ab_0 conda-forge cffi 1.14.4 py39h8b0fd8b_0 conda-forge charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge clustalo 1.2.4 hb19a6fa_6 bioconda cryptography 38.0.3 py39h7eb6a14_0 conda-forge curl 7.71.1 hbdca1c0_1 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge depht 1.2.2 py_0 laa89 dna_features_viewer 3.1.3 pyh7cba7a3_0 bioconda entrez-direct 16.2 h193322a_1 bioconda freetype 2.12.1 h3f81eb7_0 conda-forge gawk 5.1.0 h8a989fb_0 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge hhsuite 3.3.0 py39pl5262he2a1a62_2 bioconda idna 3.4 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jpeg 9e hac89ed1_2 conda-forge kaleido-core 0.2.1 h0d85af4_0 conda-forge kiwisolver 1.4.4 py39h92daf61_1 conda-forge krb5 1.17.2 h60d9502_0 conda-forge lcms2 2.14 h90f4b2a_0 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libblas 3.9.0 16_osx64_openblas conda-forge libcblas 3.9.0 16_osx64_openblas conda-forge libcurl 7.71.1 he6690cf_1 conda-forge libcxx 14.0.6 hccf4f1f_0 conda-forge libdeflate 1.14 hb7f2c08_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libffi 3.2.1 1 bioconda libgfortran 5.0.0 9_5_0_h97931a8_26 conda-forge libgfortran5 11.3.0 h082f757_26 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libidn2 2.3.4 hb7f2c08_0 conda-forge liblapack 3.9.0 16_osx64_openblas conda-forge libopenblas 0.3.21 openmp_h429af6e_3 conda-forge libpng 1.6.38 ha978bb4_0 conda-forge libsqlite 3.40.0 ha978bb4_0 conda-forge libssh2 1.10.0 h7535e13_3 conda-forge libtiff 4.4.0 hdb44e8a_4 conda-forge libunistring 0.9.10 h0d85af4_0 conda-forge libwebp-base 1.2.4 h775f41a_0 conda-forge libxcb 1.13 h0d85af4_1004 conda-forge libzlib 1.2.13 hfd90126_4 conda-forge llvm-openmp 15.0.5 h61d9ccf_0 conda-forge markupsafe 2.1.1 py39ha30fb19_2 conda-forge mathjax 2.7.7 h694c41f_3 conda-forge matplotlib-base 3.4.3 py39hb07454d_2 conda-forge mmseqs2 13.45111 h14b862d_1 bioconda ncurses 6.3 h96cf925_1 conda-forge numpy 1.22.4 py39h677350a_0 conda-forge openjpeg 2.5.0 h5d0d7b0_1 conda-forge openssl 1.1.1s hfd90126_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandas 1.4.4 py39hca71b8a_0 conda-forge pcre 8.45 he49afe7_0 conda-forge perl 5.26.2 hbcb3906_1008 conda-forge perl-archive-tar 2.32 pl526_0 bioconda perl-carp 1.38 pl526_3 bioconda perl-common-sense 3.74 pl526_2 bioconda perl-compress-raw-bzip2 2.087 pl526h6de7cb9_0 bioconda perl-compress-raw-zlib 2.087 pl526h770b8ee_0 bioconda perl-exporter 5.72 pl526_1 bioconda perl-exporter-tiny 1.002001 pl526_0 bioconda perl-extutils-makemaker 7.36 pl526_1 bioconda perl-io-compress 2.087 pl526h6de7cb9_0 bioconda perl-io-zlib 1.10 pl526_2 bioconda perl-json 4.02 pl526_0 bioconda perl-json-xs 2.34 pl526h04f5b5a_3 bioconda perl-list-moreutils 0.428 pl526_1 bioconda perl-list-moreutils-xs 0.428 pl526_0 bioconda perl-pathtools 3.75 pl526h1de35cc_1 bioconda perl-scalar-list-utils 1.52 pl526h01d97ff_0 bioconda perl-types-serialiser 1.0 pl526_2 bioconda perl-xsloader 0.24 pl526_0 bioconda phamclust 0.1.2 py_0 laa89 pillow 9.2.0 py39h35d4919_3 conda-forge pip 22.3.1 pyhd8ed1ab_0 conda-forge plotly 5.1.0 pyhd8ed1ab_1 conda-forge pretty_html_table 0.9.11 pyhd8ed1ab_0 conda-forge prodigal 2.6.3 h2413b67_7 bioconda pthread-stubs 0.4 hc929b4f_1001 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 22.1.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.9.0 ha017127_4_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-kaleido 0.2.1 pyhd8ed1ab_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytz 2022.6 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py39ha30fb19_5 conda-forge readline 8.1.2 h3899abd_0 conda-forge requests 2.28.1 pyhd8ed1ab_1 conda-forge setuptools 65.5.1 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.40.0 h9ae0607_0 conda-forge tenacity 8.1.0 pyhd8ed1ab_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge tornado 6.2 py39ha30fb19_1 conda-forge typing_extensions 4.4.0 pyha770c72_0 conda-forge tzdata 2022f h191b570_0 conda-forge urllib3 1.26.11 pyhd8ed1ab_0 conda-forge wget 1.20.3 h52ee1ee_1 conda-forge wheel 0.38.4 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.9 h35c211d_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zlib 1.2.13 hfd90126_4 conda-forge zstd 1.5.2 hfa58983_4 conda-forge

chg60 commented 4 months ago

I am so sorry for the VERY delayed response! Somehow I missed the GitHub notification that was sent to my inbox when you posted this issue.

I will investigate and fix this issue ASAP - hopefully sometime this weekend.

Best, Christian

chg60 commented 4 months ago

It looks like what's happened is that the DnaFeaturesViewer library has integrated some features that only work with fairly recent versions of Biopython. The error is thrown because DnaFeaturesViewer references a Seq object property that did not exist before Biopython 1.80.

Easiest fix will be for me to force a higher version of Biopython in the DEPhT package requirements, which I won't be able to get to until tomorrow. In the meantime, if you manually upgrade your Biopython version it should solve the problem.

conda activate depht
pip uninstall biopython
pip install biopython==1.83
bbshockey commented 4 months ago

Hello Christian,

Thank you for getting back to me. I got it running on a separate desktop so it makes sense that this was the issue!

Best,

Bjorn S

On Thu, May 2, 2024 at 10:01 AM Christian Gauthier @.***> wrote:

It looks like what's happened is that the DnaFeaturesViewer library has integrated some features that only work with fairly recent versions of Biopython. The error is thrown because DnaFeaturesViewer references a Seq object property that did not exist before Biopython 1.80.

Easiest fix will be for me to force a higher version of Biopython in the DEPhT package requirements, which I won't be able to get to until tomorrow. In the meantime, if you manually upgrade your Biopython version it should solve the problem.

conda activate depht pip uninstall biopython pip install biopython==1.83

— Reply to this email directly, view it on GitHub https://github.com/chg60/DEPhT/issues/47#issuecomment-2090575470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY47IQ2FBSXBRHXLDPG7V53ZAJBL5AVCNFSM6AAAAABD4HPQEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQGU3TKNBXGA . You are receiving this because you authored the thread.Message ID: @.***>