diff fetch_fasta_from_NCBI.py @ 6:4af77e1af12a draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/fetch_fasta_from_ncbi commit 1a90ac7cdeb35399011207ab43c78043fd5c7287
author artbio
date Sat, 14 Oct 2023 22:34:56 +0000
parents 706fe8139955
children
line wrap: on
line diff
--- a/fetch_fasta_from_NCBI.py	Tue Mar 16 23:26:58 2021 +0000
+++ b/fetch_fasta_from_NCBI.py	Sat Oct 14 22:34:56 2023 +0000
@@ -205,7 +205,7 @@
                 fasta = response.read()
                 self.logger.debug("Did all that")
                 response.close()
-                if((response_code != 200) or
+                if ((response_code != 200) or
                    (b"Resource temporarily unavailable" in fasta) or
                    (b"Error" in fasta) or (not fasta.startswith(b">"))):
                     serverTransaction = False
@@ -260,7 +260,7 @@
         return querylog
 
     def sanitiser(self, db, fastaseq):
-        if(db not in "nuccore protein"):
+        if (db not in "nuccore protein"):
             return fastaseq
         regex = re.compile(r"[ACDEFGHIKLMNPQRSTVWYBZ]{49,}")
         sane_seqlist = []