Skip to content

Commit

Permalink
allow for template names for encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
anazhmetdin committed Dec 25, 2020
1 parent 6bd36d6 commit 3b589f5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
34 changes: 25 additions & 9 deletions protencoder/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,32 @@ def main():
if Protfilter != "":
encoder.load_filter(Protfilter)
if chopSize == -1:
encoder.read(seqPath)
encoder.encode()
encoder.dump(outPrefix)
else:
devide(seqPath, chopSize, outPrefix)
for name in glob.glob(outPrefix+"_part*.fasta"):
encoder.read(name)
if '*' in seqPath:
for name in glob.glob(seqPath):
encoder.read(name)
encoder.encode()
encoder.dump(name)
else:
encoder.read(seqPath)
encoder.encode()
num = name[name.find("part") + 4:-6]
encoder.dump(outPrefix+"_part"+num)
encoder.dump(outPrefix)
else:
if '*' in seqPath:
for name1 in glob.glob(seqPath):
devide(name1, chopSize, name1.rstrip(".fasta"))
name1 = name1.rstrip(".fasta")
for name in glob.glob(name1+"_part*.fasta"):
encoder.read(name)
encoder.encode()
num = name[name.find("part") + 4:-6]
encoder.dump(name1+"_part"+num)
else:
devide(seqPath, chopSize, outPrefix)
for name in glob.glob(outPrefix+"_part*.fasta"):
encoder.read(name)
encoder.encode()
num = name[name.find("part") + 4:-6]
encoder.dump(outPrefix+"_part"+num)

elif not (GOfile is None):
if outPrefix == GOfile:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/anegm98/protencoder',
version='1.4.5',
version='1.4.6',
zip_safe=False,
package_data={'protencoder': ['data/*']}
)

0 comments on commit 3b589f5

Please sign in to comment.