Mercurial > repos > petr-novak > re_utils
diff RM_custom_search.py @ 11:16150c85fb3a draft
Uploaded
author | petr-novak |
---|---|
date | Tue, 04 Feb 2020 07:39:32 -0500 |
parents | a4cd8608ef6b |
children | 62fefa284036 |
line wrap: on
line diff
--- a/RM_custom_search.py Mon Feb 03 06:44:58 2020 -0500 +++ b/RM_custom_search.py Tue Feb 04 07:39:32 2020 -0500 @@ -19,7 +19,10 @@ # extract only dirCLXXXX/reads.fas seq_list = [] for filein in z.namelist(): - if filein.lower().startswith("seqclust/clustering/clusters/dir_cl") and filein.endswith("reads.fas"): + c1 = filein.lower().startswith("seqclust/clustering/clusters/dir_cl") + c2 = filein.endswith("reads.fas") + c3 = filein.endswith("reads.fasta") # in newer RE2 versions + if c1 and (c2 or c3): outdir = filein.split("/")[3] outfile = outdir +"/reads.fas" source = z.open(filein)