diff --git a/atram.py b/atram.py index 59eba78..53417a9 100644 --- a/atram.py +++ b/atram.py @@ -41,7 +41,7 @@ def assemble(args): assembler.write_final_output(blast_db, query) except (TimeoutError, RuntimeError): pass - except Exception as err: + except Exception as err: # pylint: disable=broad-except log.error('Exception: ' + err) db.aux_detach(db_conn) diff --git a/atram_preprocessor.py b/atram_preprocessor.py index 3da582b..94ebcd3 100644 --- a/atram_preprocessor.py +++ b/atram_preprocessor.py @@ -184,12 +184,8 @@ def parse_command_line(temp_dir_default): formatter_class=argparse.RawDescriptionHelpFormatter, description=textwrap.dedent(description)) - parser.add_argument('--mixed-ends', '-m', metavar='FASTA_or_FASTQ', nargs='+', - help='''Sequence read archive files that have a mix of - both end 1 and end 2 sequences (or single ends). - The files are in fasta or fastq format. You may - enter more than one file or you may use wildcards. - ''') + parser.add_argument('--version', action='version', + version='%(prog)s {}'.format(db.ATRAM_VERSION)) parser.add_argument('--end-1', '-1', metavar='FASTA_or_FASTQ', nargs='+', help='''Sequence read archive files that have only @@ -207,16 +203,22 @@ def parse_command_line(temp_dir_default): enter more than one file or you may use wildcards. ''') - parser.add_argument('--single-ends', '-0', metavar='FASTA_or_FASTQ', nargs='+', + parser.add_argument('--mixed-ends', '-m', metavar='FASTA_or_FASTQ', + nargs='+', + help='''Sequence read archive files that have a mix of + both end 1 and end 2 sequences (or single ends). + The files are in fasta or fastq format. You may + enter more than one file or you may use wildcards. + ''') + + parser.add_argument('--single-ends', '-0', metavar='FASTA_or_FASTQ', + nargs='+', help='''Sequence read archive files that have only unpaired sequences. Any sequence suffix will be ignored. The files are in fasta or fastq format. You may enter more than one file or you may use wildcards.''') - parser.add_argument('--version', action='version', - version='%(prog)s {}'.format(db.ATRAM_VERSION)) - group = parser.add_argument_group('preprocessor arguments') blast_db = os.path.join('.', 'atram_' + date.today().isoformat()) diff --git a/lib/assemblers/base.py b/lib/assemblers/base.py index 67c9f36..e7e7d16 100644 --- a/lib/assemblers/base.py +++ b/lib/assemblers/base.py @@ -118,7 +118,7 @@ def assembled_contigs_count(self, high_score): if not count: log.info('No contigs had a bit score greater than {} and are at ' - 'least {} long in iteration {}. The highest score for ' + 'least {} bp long in iteration {}. The highest score for ' 'this iteration is {}'.format( self.args['bit_score'], self.args['contig_length'], diff --git a/lib/db.py b/lib/db.py index 33a4707..8ba7a32 100644 --- a/lib/db.py +++ b/lib/db.py @@ -6,7 +6,7 @@ from os.path import basename, join, exists -ATRAM_VERSION = '2.0' +ATRAM_VERSION = '2.0.alpha.5' DB_VERSION = '2.0' BATCH_SIZE = 1e6 # How many sequence records to insert at a time diff --git a/lib/log.py b/lib/log.py index 078e359..2c3bf40 100644 --- a/lib/log.py +++ b/lib/log.py @@ -5,6 +5,7 @@ import logging import tempfile import subprocess +import lib.db as db LOGGER = None # Global logger so we can switch between queries & blast DBs FORMATTER = logging.Formatter('%(asctime)s %(levelname)s: %(message)s', @@ -32,7 +33,8 @@ def setup(log_file, blast_db, query_file=''): LOGGER.addHandler(handler) LOGGER.addHandler(stream) - info(" ".join(sys.argv[:])) + info('aTRAM version: {}'.format(db.ATRAM_VERSION)) + info(' '.join(sys.argv[:])) def file_name(log_file, blast_db, query_file=''): diff --git a/tests/lib/assemblers/test_base.py b/tests/lib/assemblers/test_base.py index 297972b..82ef294 100644 --- a/tests/lib/assemblers/test_base.py +++ b/tests/lib/assemblers/test_base.py @@ -275,7 +275,7 @@ def test_assembled_contigs_count_0(self, assembled_contigs_count, info): assembler.args['contig_length']) expect = ('No contigs had a bit score greater than {} and are at ' - 'least {} long in iteration {}. The highest score for ' + 'least {} bp long in iteration {}. The highest score for ' 'this iteration is {}').format( assembler.args['bit_score'], assembler.args['contig_length'],