Error with installation

110 views
Skip to first unread message

Gonzalo Ferreira

unread,
May 14, 2023, 5:35:00 PM5/14/23
to picrust-users
Hello, I'm having some error when I run the tests to verify the installation, I have installed from bioconda and from source previously.

(picrust2) manager@bl8vbox[picrust2-2.5.2] pytest                 [ 3:39AM]

============================= test session starts ==============================

platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0

rootdir: /home/manager/Desktop/picrust2-2.5.2

plugins: cov-4.0.0

collected 61 items                                                         


tests/test_hsp.py ........                                           [ 13%]

tests/test_metagenome_pipeline.py ...............                    [ 37%]

tests/test_pathway_pipeline.py ....                                  [ 44%]

tests/test_place_seqs.py ........F                                   [ 59%]

tests/test_util.py ....................                              [ 91%]

tests/test_workflow.py .....                                         [100%]


=================================== FAILURES ===================================

______________ place_seqs_tests.test_run_place_seqs_pipeline_sepp ______________


self = <tests.test_place_seqs.place_seqs_tests testMethod=test_run_place_seqs_pipeline_sepp>


def test_run_place_seqs_pipeline_sepp(self):

     '''Basic test of full place seqs pipeline with SEPP. Just run to

        see if any errors occur'''

     with TemporaryDirectory() as temp_dir:

         tmp_tree = path.join(temp_dir, "out.tre")

    

>       place_seqs_pipeline(study_fasta=test_study_seqs,

                             ref_dir=default_ref_dir,

                             placement_tool="sepp",

                             out_tree=tmp_tree,

                             threads=1,

                             out_dir=temp_dir,

                             min_align=0.8,

                             chunk_size=5000,

                             verbose=True)


tests/test_place_seqs.py:160:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

picrust2/place_seqs.py:95: in place_seqs_pipeline

run_sepp(tree=tree,

picrust2/place_seqs.py:458: in run_sepp

system_call_check(sepp_command, print_command=print_cmds,

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


cmd = ['run_sepp.py', '--tree', '/home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre...l', '/home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.raxml_info', '--cpu', ...]

print_command = True, print_stdout = True, print_stderr = True


def system_call_check(cmd, print_command=False, print_stdout=False,

                       print_stderr=False):

     '''Run system command and throw and error if return is not 0. Input command

     can be a list containing the command or a string.'''

    

     # Convert command to list if input as string.

     if type(cmd) is str:

         cmd = cmd.split()

    

     # Print command out if option set.

     if print_command:

         print(" ".join(cmd), file=sys.stderr)

    

     stdout_log = ""

     stderr_log = ""

    

     # Write stdout and stderr of command to temporary files.

     # Only output the content of these files if the job fails.

     with TemporaryDirectory() as temp_dir:

    

         stdout_file = join(temp_dir, "stdout.txt")

         stderr_file = join(temp_dir, "stderr.txt")

    

         with open(stdout_file, "wb") as stdout_fh, \

              open(stderr_file, "wb") as stderr_fh:

    

             return_value = call(cmd, stdout=stdout_fh,

                                 stderr=stderr_fh)

    

         # Capture stdout and stderr.

         with open(stdout_file, 'r') as stdout_fh:

             stdout_log = stdout_fh.read()

    

         with open(stderr_file, 'r') as stderr_fh:

             stderr_log = stderr_fh.read()

    

         # Exit with error if command did not finish successfully.

         if return_value != 0:

             print("\nError running this command:\n" + " ".join(cmd),

                   file=sys.stderr)

    

             if stdout_log:

                 print("\nStandard output of the above failed command:\n" +

                       stdout_log, file=sys.stderr)

    

             if stderr_log:

                 print("\nStandard error of the above failed command:\n" +

                       stderr_log, file=sys.stderr)

    

>           sys.exit(1)

E           SystemExit: 1


picrust2/util.py:258: SystemExit

----------------------------- Captured stdout call -----------------------------


----------------------------- Captured stderr call -----------------------------

hmmalign --trim --dna --mapali /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.fna --informat FASTA -o /tmp/tmpboytnokt/query_align.stockholm /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.hmm /home/manager/Desktop/picrust2-2.5.2/tests/test_data/place_seqs/study_seqs_test.fasta


All raw input sequences were the same length (400)


run_sepp.py --tree /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre --raxml /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.raxml_info --cpu 1 --molecule dna --outdir /tmp/tmpboytnokt/sepp_out -seed 297834 --alignment /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.fna --fragment /tmp/tmpboytnokt/study_seqs_filtered.fasta


Error running this command:

run_sepp.py --tree /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre --raxml /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.raxml_info --cpu 1 --molecule dna --outdir /tmp/tmpboytnokt/sepp_out -seed 297834 --alignment /home/manager/Desktop/picrust2-2.5.2/picrust2/default_files/prokaryotic/pro_ref/pro_ref.fna --fragment /tmp/tmpboytnokt/study_seqs_filtered.fasta


Standard error of the above failed command:

Traceback (most recent call last):

  File "/home/manager/miniconda3/envs/picrust2/bin/run_sepp.py", line 3, in <module>

from sepp.exhaustive import ExhaustiveAlgorithm

  File "/home/manager/miniconda3/envs/picrust2/lib/python3.8/site-packages/sepp/exhaustive.py", line 6, in <module>

from sepp.algorithm import AbstractAlgorithm

  File "/home/manager/miniconda3/envs/picrust2/lib/python3.8/site-packages/sepp/algorithm.py", line 11, in <module>

from sepp.tree import PhylogeneticTree

  File "/home/manager/miniconda3/envs/picrust2/lib/python3.8/site-packages/sepp/tree.py", line 25, in <module>

from dendropy.datamodel.treemodel import _convert_node_to_root_polytomy as \

ImportError: cannot import name '_convert_node_to_root_polytomy' from 'dendropy.datamodel.treemodel' (/home/manager/miniconda3/envs/picrust2/lib/python3.8/site-packages/dendropy/datamodel/treemodel/__init__.py)


=========================== short test summary info ============================

FAILED tests/test_place_seqs.py::place_seqs_tests::test_run_place_seqs_pipeline_sepp - SystemExit: 1

=================== 1 failed, 60 passed in 106.33s (0:01:46) ===================


Jörn Horst Bethke Riegel

unread,
Apr 1, 2024, 3:29:45 PMApr 1
to picrust-users
Hi Gonzalo I'm starting to use Picrust2 and got the same error when running the pytest on the test_place_seqs.py. Did you solve the problem? can you guide me through on how to solve it. 

Hola Gonzalo estoy empezando a utilizar Picrust2 y cuando corro el pytest para ver si quedó correctamente instalado me aparece el mismo error de place_seqs. Encontraste algiuna solucion, me puedes guiar a como corregir el error.

Robyn Wright

unread,
Apr 1, 2024, 3:32:45 PMApr 1
to picrust-users

Hi there,

Could you see if the fix mentioned here works? 

Thanks,
Robyn
Reply all
Reply to author
Forward
0 new messages