diff --git a/README.md b/README.md index 8a66828..a65ee6d 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,8 @@ Let's try an example, NC_012624.fna. ## Release History +- 1.7.2.2.2 + - add code to remove temporary files (created by tempfile.NamedTemporaryFile()) once blastn search completes in case that large amounts of temporary files consume too much space. (Thanks Biancamaria for the suggestion) - 1.7.2.2 - ISEScan can output .csv (columns are separated by `,`) and .tsv (columns are separated by `tab`) result files, which are much easier for users to parse the results (Thanks oschwengers for his suggestion) - add command options `--seqfile` and `--output` to remove the positional parmater `seqfile`, `proteome` and `hmm` (Thanks oschwengers for his suggestion) diff --git a/isescan.py b/isescan.py index f261375..ddb441d 100644 --- a/isescan.py +++ b/isescan.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # ISEScan version -version = '1.7.2.2.1' +version = '1.7.2.2.2' import argparse import os diff --git a/pred.py b/pred.py index eca904a..50876b5 100755 --- a/pred.py +++ b/pred.py @@ -1434,6 +1434,8 @@ def getFullIS4seqOnStream(args): query = orfExtSeqFile blastOut4orfExt, err = tools.doBlastn2seqOnStream(nthread, query, fp.name, strand='both', task='megablast', perc_ident=constants.SIM4ISO) + tools.deleteFile(fp.name) + if len(err) > 0: #e = 'Blastn ISs in {} against {}: {}'.format(seqid, db, err) e = 'Blastn ISs in {} against {}: {}'.format(seqid, seqid, err) diff --git a/tools.py b/tools.py index bb7f179..452422c 100755 --- a/tools.py +++ b/tools.py @@ -864,6 +864,15 @@ def seq2blastdb(seqFile, db): do_cmd = shlex.split(' '.join(cmdline)) subprocess.check_call(do_cmd, shell=False, universal_newlines=False, stdout=subprocess.DEVNULL) +# delete the file pointing by full path f. +# f: /path/to/file, a character string +def deleteFile(f): + cmd = 'rm' + cmdline = [cmd, f] + do_cmd = shlex.split(' '.join(cmdline)) + subprocess.check_call(do_cmd, shell=False, universal_newlines=False, stdout=subprocess.DEVNULL) + + # Search all IS elements (Tpase) ORFs against IS element (Tpase ORF) database. # command: blastn -query /home/data/insertion_sequence/output4FragGeneScan1.19_illumina_5/NC_002754.1.fna.ffn \ # -db /home/data/insertion_sequence/blastdb/NC_002754.1.fna.ffn -out blast.6 \