-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementation for the new CLI PR (#811)
* implementation for the cli branch * watch * multigather, two test fixes, raise SystemError 1 instead of 0 * add test to make sure help is printed when cmd is called without subcmd * add import_csv * init ksize properly in lca index
- Loading branch information
Showing
51 changed files
with
401 additions
and
770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from argparse import FileType | ||
import sys | ||
|
||
|
||
def subparser(subparsers): | ||
subparser = subparsers.add_parser('import_csv') | ||
subparser.add_argument('mash_csvfile', help='CSV file with mash sketches') | ||
subparser.add_argument( | ||
'-o', '--output', type=FileType('wt'), | ||
default=sys.stdout, | ||
help='save signature generated from data here' | ||
) | ||
|
||
|
||
def main(args): | ||
import sourmash | ||
return sourmash.commands.import_csv(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,33 @@ | ||
def subparser(subparsers): | ||
subparser = subparsers.add_parser('compare') | ||
subparser.add_argument('csv1', help='taxonomy spreadsheet output by classify') | ||
subparser.add_argument('csv2', help='custom taxonomy spreadsheet') | ||
subparser.add_argument( | ||
'-q', '--quiet', action='store_true', | ||
help='suppress non-error output' | ||
) | ||
subparser.add_argument( | ||
'-d', '--debug', action='store_true', | ||
help='output debugging output' | ||
) | ||
subparser.add_argument( | ||
'-C', '--start-column', metavar='C', default=2, type=int, | ||
help='column at which taxonomic assignments start; default=2' | ||
) | ||
subparser.add_argument( | ||
'--tabs', action='store_true', | ||
help='input spreadsheet is tab-delimited; default is commas' | ||
) | ||
subparser.add_argument( | ||
'--no-headers', action='store_true', | ||
help='no headers present in taxonomy spreadsheet' | ||
) | ||
subparser.add_argument('-f', '--force', action='store_true') | ||
|
||
# Dirty hack to simultaneously support new and previous interface | ||
# If desired, this function can be removed with a major version bump. | ||
subparser = subparsers.add_parser('compare_csv') | ||
subparser.add_argument('csv1', help='taxonomy spreadsheet output by classify') | ||
subparser.add_argument('csv2', help='custom taxonomy spreadsheet') | ||
subparser.add_argument( | ||
'-q', '--quiet', action='store_true', | ||
help='suppress non-error output' | ||
) | ||
subparser.add_argument( | ||
'-d', '--debug', action='store_true', | ||
help='output debugging output' | ||
) | ||
subparser.add_argument( | ||
'-C', '--start-column', metavar='C', default=2, type=int, | ||
help='column at which taxonomic assignments start; default=2' | ||
) | ||
subparser.add_argument( | ||
'--tabs', action='store_true', | ||
help='input spreadsheet is tab-delimited; default is commas' | ||
) | ||
subparser.add_argument( | ||
'--no-headers', action='store_true', | ||
help='no headers present in taxonomy spreadsheet' | ||
) | ||
subparser.add_argument('-f', '--force', action='store_true') | ||
for cmd in ('compare', 'compare_csv'): | ||
subparser = subparsers.add_parser(cmd) | ||
subparser.add_argument('csv1', help='taxonomy spreadsheet output by classify') | ||
subparser.add_argument('csv2', help='custom taxonomy spreadsheet') | ||
subparser.add_argument( | ||
'-q', '--quiet', action='store_true', | ||
help='suppress non-error output' | ||
) | ||
subparser.add_argument( | ||
'-d', '--debug', action='store_true', | ||
help='output debugging output' | ||
) | ||
subparser.add_argument( | ||
'-C', '--start-column', metavar='C', default=2, type=int, | ||
help='column at which taxonomic assignments start; default=2' | ||
) | ||
subparser.add_argument( | ||
'--tabs', action='store_true', | ||
help='input spreadsheet is tab-delimited; default is commas' | ||
) | ||
subparser.add_argument( | ||
'--no-headers', action='store_true', | ||
help='no headers present in taxonomy spreadsheet' | ||
) | ||
subparser.add_argument('-f', '--force', action='store_true') | ||
|
||
|
||
def main(args): | ||
print(args) | ||
import sourmash | ||
return sourmash.lca.command_compare_csv.compare_csv(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.