Skip to content

Commit

Permalink
dirs only contains folders that has transcripts.pir files
Browse files Browse the repository at this point in the history
  • Loading branch information
diegozea committed Sep 4, 2019
1 parent 614495f commit 7532f92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phylosofs/phylosofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ def doit(

# create as many directories as fasta input files
# and inside as many fasta files as transcripts
dirs = []
if not uniq and not onlyQuality:
print("prepare intputs...")
pathTransSeqs = os.path.abspath(pathTransSeqs)
Expand All @@ -461,6 +462,7 @@ def doit(
exist_ok=True)
mi.parseFromThorAxe(root, os.path.join(outputDir, root),
onlyhuman)
dirs.append(root)
# determine the number of templates that will be retained
selTemp = ""
for i in range(nbTemp):
Expand All @@ -472,7 +474,7 @@ def doit(

# the 'if' is to not perform the modelling in __pycache__
# might add a list of forbidden names for less errors
dirs = [x[0] for x in os.walk('.') if not '__pycache__' in x[0]]
# dirs = [x[0] for x in os.walk('.') if not '__pycache__' in x[0]]
# NOTE: dirs is at leat ['.'] and it has subfolders,
# e.g. ['.', './folder', './folder/subfolder']

Expand All @@ -490,8 +492,8 @@ def doit(
only3D, CONTEXTLIB)
os.chdir(outputDir)
else:
print("Molecular modelling in: {}".format(str(dirs[1:])))
for mydir in dirs[1:]:
print("Molecular modelling in: {}".format(str(dirs)))
for mydir in dirs:
os.chdir(mydir)
for trans in glob.glob('*.fasta') + glob.glob('*.faa'):
stop = False
Expand Down

0 comments on commit 7532f92

Please sign in to comment.