Skip to content

Commit

Permalink
New task expandflag
Browse files Browse the repository at this point in the history
  • Loading branch information
martinghunt committed Jun 27, 2017
1 parent 92db92c commit 5de0da1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions ariba/tasks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__all__ = [
'aln2meta',
'expandflag',
'flag',
'getref',
'micplot',
Expand Down
8 changes: 8 additions & 0 deletions ariba/tasks/expandflag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import argparse
import sys
import ariba

def run(options):
expander = ariba.report_flag_expander.ReportFlagExpander(options.infile, options.outfile)
expander.run()

12 changes: 12 additions & 0 deletions scripts/ariba
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ subparser_aln2meta.add_argument('outprefix', help='Prefix of output filenames')
subparser_aln2meta.set_defaults(func=ariba.tasks.aln2meta.run)


#---------------------------- expandflag ------------------------------
subparser_expandflag = subparsers.add_parser(
'expandflag',
help='Expands flag column of report file',
usage='ariba expandflag <in.report.tsv> <out.tsv',
description='Expands the flag column in a report file from number to comma-separated list of flag bits',
)

subparser_expandflag.add_argument('infile', help='Name of input report TSV file')
subparser_expandflag.add_argument('outfile', help='Name of output report TSV file')
subparser_expandflag.set_defaults(func=ariba.tasks.expandflag.run)


#---------------------------- flag ------------------------------------
subparser_flag = subparsers.add_parser(
Expand Down

0 comments on commit 5de0da1

Please sign in to comment.