swarris / pyPaSWAS

Program for DNA/RNA/protein sequence alignment, read mapping and trimming. Extended python version of PaSWAS, supporting OpenCL and CUDA devices.
MIT License
27 stars 8 forks source link

Sequence processing throws error on latest BioPython version #9

Closed nik875 closed 1 year ago

nik875 commented 2 years ago

I was attempting to perform a pairwise alignment of a test sequence with a large dataset of FASTQ sequences when I received this error:

DEBUG - Initializing reader finished.
DEBUG - Reading from fastq file...
ERROR - 'Seq' object has no attribute 'alphabet'
Traceback (most recent call last):
  File "pyPaSWAS/pypaswas.py", line 11, in <module>
    ppw.run()
  File "/cluster/2022nkalidas/pyPaSWAS/pyPaSWAS/pypaswasall.py", line 207, in run
    query_sequences = self._get_query_sequences(self.arguments[0], start=query_start, end=query_end)
  File "/cluster/2022nkalidas/pyPaSWAS/pyPaSWAS/pypaswasall.py", line 104, in _get_query_sequences
    reader.read_records(start,end)
  File "/cluster/2022nkalidas/pyPaSWAS/pyPaSWAS/Core/Readers.py", line 105, in read_records
    self.records = [SWSeqRecord(Seq(str(record.seq), record.seq.alphabet),
  File "/cluster/2022nkalidas/pyPaSWAS/pyPaSWAS/Core/Readers.py", line 105, in <listcomp>
    self.records = [SWSeqRecord(Seq(str(record.seq), record.seq.alphabet),
AttributeError: 'Seq' object has no attribute 'alphabet'

Here is the command I ran to produce this: python pyPaSWAS/pypaswas.py --filetype1="fastq" --filetype2="fastq" --device_type=GPU --platform_name=NVIDIA --framework=CUDA --device=0 temp.fq Data/converted_data/IonXpress_018_rawlib.basecaller.fq. It seems to be an IO-related error. If I remember correctly, sequence alphabets were deprecated on BioPython, so that may be the source of the problem. Would it be possible to update the tool to function on the latest BioPython version? Or add a new requirements.txt file or a section of the README detailing which BioPython version is required for the tool to function correctly?

nik875 commented 1 year ago

This should also be closed.