I am using a program (Bamsplit) that relies on ssw to run, and get the following SSW error:
File "[...]/bamsplit-master/bamsplit.py", line 266, in <module>
main(parsed)
File "[...]/bamsplit-master/bamsplit.py", line 235, in main
run_bamsplit(ref, bam_in, vcf, vcf.header.samples[0], bams_out, bed_out, region)
File "[...]Software/bamsplit-master/bamsplit.py", line 225, in run_bamsplit
split_contig(contig, ref, bam_in, vcf, sample, bams_out, bed_out)
File "[...]/Software/bamsplit-master/bamsplit.py", line 211, in split_contig
last_read = split(phased_sites, ref, bam_iter, sample, bams_out, bed_out, last_read)
File "[...]/Software/bamsplit-master/bamsplit.py", line 194, in split
scores = calculate_alignment_scores(read.query_sequence, genotype)
File "[...]/Software/bamsplit-master/bamsplit.py", line 159, in calculate_alignment_scores
return [calculate_alignment_score(read, haplotype) for haplotype in genotype]
File "[...]/Software/bamsplit-master/bamsplit.py", line 159, in <listcomp>
return [calculate_alignment_score(read, haplotype) for haplotype in genotype]
File "[...]/Software/bamsplit-master/bamsplit.py", line 155, in calculate_alignment_score
alignment = aligner.align(reference=haplotype, query=read)
File "[...]/.local/lib/python3.7/site-packages/ssw-0.3.1-py3.7-linux-x86_64.egg/ssw/sswobj.py", line 99, in align
res = self._align(query, reference, flags, filter_score, filter_distance, mask_length)
File "[...].local/lib/python3.7/site-packages/ssw-0.3.1-py3.7-linux-x86_64.egg/ssw/sswobj.py", line 109, in _align
_reference = self.matrix.convert_sequence_to_ints(reference)
File "[...]/.local/lib/python3.7/site-packages/ssw-0.3.1-py3.7-linux-x86_64.egg/ssw/sswobj.py", line 64, in convert_sequence_to_ints
return _seq_type(*seq_generator)
File "[...]/.local/lib/python3.7/site-packages/ssw-0.3.1-py3.7-linux-x86_64.egg/ssw/sswobj.py", line 63, in <genexpr>
seq_generator = (self.symbol_map[symbol.upper()] for symbol in seq)
KeyError: '<'
I thought it might be a problem with "<" not being able to run through "symbol.upper()", so I attempted to manually remove all ".upper()" commands, in the sswobj.py file, but that was unable to correct the problem. Any idea on what what the issue is?