JLSteenwyk / PhyKIT

a UNIX shell toolkit for processing and analyzing multiple sequence alignments and phylogenies
https://jlsteenwyk.com/PhyKIT/
MIT License
65 stars 8 forks source link

concatenate issue #8

Closed hverbruggen closed 2 years ago

hverbruggen commented 2 years ago

Hi Jacob, many thanks for providing this amazing toolkit.

I came across an issue trying to concatenate alignments. I'm on ubuntu (18.04.6) with phykit running in a conda environment installed according to the instructions given in the readme.

I'm getting the error output below. I will send you a link to the input data via email.

I'm using phykit version 1.11.3 and biopython 1.78.

Thanks, Heroen

--------------------
| General features |
--------------------
Total number of taxa: 48
Total number of alignments: 7301

----------------
| Output files |
----------------
Partition file output: concat.partition
Concatenated fasta output: concat.fa
Occupancy report: concat.occupancy

Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/phykit/bin/phykit", line 10, in <module>
    sys.exit(main())
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/phykit.py", line 2375, in main
    Phykit()
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/phykit.py", line 251, in __init__
    self.run_alias(args.command, sys.argv[2:])
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/phykit.py", line 345, in run_alias
    return self.create_concatenation_matrix(argv)
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/phykit.py", line 2297, in create_concatenation_matrix
    CreateConcatenationMatrix(args).run()
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/services/alignment/create_concatenation_matrix.py", line 18, in run
    self.create_concatenation_matrix(self.alignment_list_path, self.prefix)
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/services/alignment/create_concatenation_matrix.py", line 339, in create_concatenation_matrix
    self.fasta_file_write(
  File "/home/ubuntu/miniconda3/envs/phykit/lib/python3.9/site-packages/phykit/services/alignment/create_concatenation_matrix.py", line 231, in fasta_file_write
    entry = f">{x}\n{''.join(concat[x])}\n"
TypeError: sequence item 36: expected str instance, Seq found
JLSteenwyk commented 2 years ago

Dear Heroen,

Thank you for discussing this with me via email and providing your input files. As you know, this issue has been remedied in version 1.11.6.

All the best,

Jacob