Skip to content

Commit

Permalink
Merge pull request #67 from martinghunt/flag_reference_opt_as_experim…
Browse files Browse the repository at this point in the history
…ental

Flag reference opt as experimental
  • Loading branch information
martinghunt committed May 12, 2016
2 parents 55fd597 + 13d5d21 commit 6abf6ae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iva/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import os
import sys
import subprocess
version = '1.0.5'
version = '1.0.6'

class abspathAction(argparse.Action):
def __call__(self, parser, namespace, value, option_string):
Expand Down
7 changes: 6 additions & 1 deletion scripts/iva
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ io_group.add_argument('-r', '--reads_rev', action=iva.common.abspathAction, help
io_group.add_argument('--fr', action=iva.common.abspathAction, dest='reads', help='Name of interleaved fasta/q file', metavar='filename[.gz]')
io_group.add_argument('--keep_files', action='store_true', help='Keep intermediate files (could be many!). Default is to delete all unnecessary files')
io_group.add_argument('--contigs', action=iva.common.abspathAction, help='Fasta file of contigs to be extended. Incompatible with --reference', metavar='filename[.gz]')
io_group.add_argument('--reference', action=iva.common.abspathAction, help='Fasta file of reference genome, or parts thereof. IVA will try to assemble one contig per sequence in this file. Incompatible with --contigs', metavar='filename[.gz]')
io_group.add_argument('--reference', action=iva.common.abspathAction, help='EXPERIMENTAL! This option is EXPERIMENTAL, not recommended, and has not been tested! Fasta file of reference genome, or parts thereof. IVA will try to assemble one contig per sequence in this file. Incompatible with --contigs', metavar='filename[.gz]')
io_group.add_argument('-v', '--verbose', action='count', help='Be verbose by printing messages to stdout. Use up to three times for increasing verbosity.', default=0)


Expand Down Expand Up @@ -112,6 +112,9 @@ if options.contigs and options.reference:
print('Error! Cannot use both of --contgs and --reference. Cannot continue', file=sys.stderr)
sys.exit(1)

if options.reference:
print('WARNING. The option --reference has been used. It is EXPERIMENTAL and it is probably better to not use it!', file=sys.stderr)

if os.path.exists(options.outdir):
print('Error! Output directory', options.outdir, 'already exists. Cannot continue', file=sys.stderr)
sys.exit(1)
Expand Down Expand Up @@ -209,6 +212,8 @@ if options.contigs:
contigs = 'contigs_to_extend.fasta'
pyfastaq.tasks.to_fasta(options.contigs, contigs, line_length=60, strip_after_first_whitespace=True)
elif options.reference:
print('WARNING. The option --reference has been used. Trying to use reference file to generate starting contig.', file=sys.stderr)
print(' ... if this throws errors, then try running without the --reference option', file=sys.stderr)
reference = 'reference_in.fasta'
pyfastaq.tasks.to_fasta(options.reference, reference, line_length=60, strip_after_first_whitespace=True)
p = iva.seed_processor.SeedProcessor(
Expand Down
Empty file modified scripts/iva_qc
100644 → 100755
Empty file.
Empty file modified scripts/iva_qc_make_db
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

setup(
name='iva',
version='1.0.5',
version='1.0.6',
description='Iterative Virus Assembler',
packages = find_packages(),
package_data={'iva': ['gage/*', 'ratt/*', 'read_trim/*', 'test_run_data/*']},
Expand Down

0 comments on commit 6abf6ae

Please sign in to comment.