Skip to content

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
fannyhb committed May 10, 2019
1 parent 86a07f4 commit ab972bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 0 additions & 7 deletions fargene_analysis/fargene_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def main():
exit()
else:
utils.create_dir(options.out_dir)
# outdir = path.abspath(options.out_dir)

for infile in options.infiles:
if not path.isfile(infile):
Expand All @@ -160,12 +159,6 @@ def main():
logger.info('Exiting pipeline')
exit()

# options.hmm_out_dir = '%s/hmmsearchresults' %(outdir)
# options.res_dir = '%s/retrievedFragments' %(outdir)
# if not options.tmp_dir:
# options.tmp_dir = '%s/tmpdir' %(outdir)
# options.final_gene_dir = '%s/predictedGenes' %(outdir)
# options.assembly_dir = '%s/spades_assembly' %(outdir)

check_arguments(options, logger)

Expand Down
3 changes: 2 additions & 1 deletion fargene_analysis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def retrieve_predicted_orfs(options,orfFile):
aminoOut = '%s/predicted-orfs-amino.fasta' %(abspath(options.final_gene_dir))
hmmOut = '%s/orfs-%s-hmmsearched.out' %(abspath(options.hmm_out_dir),modelName)
hitFile = '%s/orfs-positives.out' %(abspath(options.tmp_dir))
if isfile(orfFile):
if isfile(orfFile) and getsize(orfFile) > 0:
translate_sequence(orfFile,aminoFile,options,frame)
perform_hmmsearch(aminoFile,options.hmm_model,hmmOut,options)
hitDict = orf_classifier(hmmOut,hitFile,options)
Expand All @@ -292,6 +292,7 @@ def retrieve_predicted_orfs(options,orfFile):
return fastaOut
else:
logging.error('The file %s does not exist' %(orfFile))
return fastaOut

def orf_classifier(hmmOut,hitFile,options):
threshold = "$14>%s" %(options.long_score)
Expand Down

0 comments on commit ab972bf

Please sign in to comment.