Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangrengang committed Sep 11, 2019
1 parent 3f49e67 commit f42fca4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions LTR_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,13 +773,14 @@ def __init__(self,):
def check(self):
pass
def check_hmmer(self, db, program='hmmscan'):
dp_version = self.get_hmm_version(db)
dp_version = self.get_hmm_version(db)[:3]
if self.check_presence(program):
version = self.check_hmmer_verion(program)
if version == dp_version:
logger.info('hmmer\t{}\tOK'.format(version))
version0 = self.check_hmmer_verion(program)
version = version0[:3]
if version >= dp_version:
logger.info('hmmer\t{}\tOK'.format(version0))
elif version < dp_version:
logger.info('hmmer version {} is too low. Please update to {} from http://hmmer.org/download.html'.format(version, dp_version))
logger.warn('hmmer version {} is too low. Please update to {} from http://hmmer.org/download.html'.format(version, dp_version))
else:
logger.info('hmmer version {} is too high. You may use the version {}. However, I update the database first.'.format(version, dp_version))
self.update_hmmer(db)
Expand All @@ -792,6 +793,8 @@ def get_hmm_version(self, db):
def update_hmmer(self, db):
from small_tools import backup_file
bk_db, db = backup_file(db)
for suffix in ['.h3f', '.h3i', '.h3m', '.h3p']:
backup_file(bk_db + suffix)
cmd = 'hmmconvert {} > {}'.format(bk_db, db)
out, err, status0 = run_cmd(cmd, logger=logger)
cmd = 'hmmpress {}'.format(db)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Dependencies:
+ [python 2.7](https://www.python.org/)
+ [biopython](https://biopython.org/): quickly install by `pip install biopython`
+ [parallel python](https://www.parallelpython.com/): quickly install by `pip install pp`
+ [hmmscan 3.1b2](http://hmmer.org/)
+ [hmmscan 3.1x or 3.2x](http://hmmer.org/)
+ [blast+](https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download)

`git clone https://github.com/zhangrengang/LTR_classifier`
Expand Down

0 comments on commit f42fca4

Please sign in to comment.