Mercurial > repos > galaxy-australia > alphafold2
diff scripts/validate_fasta.py @ 18:e4a053d67e24 draft
planemo upload for repository https://github.com/usegalaxy-au/tools-au commit ef97511263dcac81f8563ae6a98d1db2400fcf1d
author | galaxy-australia |
---|---|
date | Fri, 01 Sep 2023 00:09:46 +0000 |
parents | f9eb041c518c |
children | 2f7702fd0a4c |
line wrap: on
line diff
--- a/scripts/validate_fasta.py Wed May 31 01:30:22 2023 +0000 +++ b/scripts/validate_fasta.py Fri Sep 01 00:09:46 2023 +0000 @@ -6,6 +6,7 @@ from typing import List MULTIMER_MAX_SEQUENCE_COUNT = 10 +STRIP_SEQUENCE_CHARS = ['\n', '\r', '\t', ' '] class Fasta: @@ -67,6 +68,9 @@ fasta_count = len(self.fastas) header = f'>sequence_{fasta_count}' + for char in STRIP_SEQUENCE_CHARS: + sequence = sequence.replace(char, '') + # Create new Fasta self.fastas.append(Fasta(header, sequence)) @@ -109,7 +113,6 @@ 'Multimer mode requires multiple input sequence.' f' Only {fasta_count} sequences were detected in' ' the provided file.') - self.fasta_list = self.fasta_list elif fasta_count > MULTIMER_MAX_SEQUENCE_COUNT: sys.stderr.write(