from pyqi.core.command import (make_command_in_collection_lookup_f, make_command_out_collection_lookup_f) from pyqi.core.interfaces.html.output_handler import newline_list_of_strings from pyqi.core.interfaces.html import (HTMLInputOption, HTMLDownload) from biom.commands.table_summarizer import CommandConstructor from biom.interfaces.html.input_handler import ( load_biom_table_with_file_contents) cmd_in_lookup = make_command_in_collection_lookup_f(CommandConstructor) cmd_out_lookup = make_command_out_collection_lookup_f(CommandConstructor) inputs = [ HTMLInputOption(Parameter=cmd_in_lookup('table'), Type="upload_file", Handler=load_biom_table_with_file_contents, Name='input-fp'), HTMLInputOption(Parameter=cmd_in_lookup('qualitative'), Type=bool), HTMLInputOption(Parameter=None, Name='download-file', Required=True, Help='the download file') ] outputs = [ HTMLDownload(Parameter=cmd_out_lookup('biom_summary'), Handler=newline_list_of_strings, FilenameLookup='download-file', FileExtension='.biom.summary.txt') ]
cmd_out_lookup = make_command_out_collection_lookup_f(CommandConstructor) inputs = [ HTMLInputOption(Parameter=cmd_in_lookup('command'), Handler=command_handler), HTMLInputOption(Parameter=cmd_in_lookup('command_module')), HTMLInputOption(Parameter=cmd_in_lookup('author')), HTMLInputOption(Parameter=cmd_in_lookup('email')), HTMLInputOption(Parameter=cmd_in_lookup('license')), HTMLInputOption(Parameter=cmd_in_lookup('copyright')), HTMLInputOption(Parameter=cmd_in_lookup('version'), Name='command-version'), HTMLInputOption(Parameter=cmd_in_lookup('credits'), Handler=string_list_handler, Help='comma-separated list of other authors'), HTMLInputOption( Parameter=None, Name='download-file', Required=True, Help= 'The name of the file to download which contains generated Python code. (e.g. my_optparse_config)' ) ] outputs = [ HTMLDownload(Parameter=cmd_out_lookup('result'), Handler=newline_list_of_strings, FilenameLookup='download-file', FileExtension='.py') ]
# The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- __credits__ = ["Evan Bolyen"] from pyqi.core.interfaces.html import (HTMLInputOption, HTMLDownload, HTMLPage) from pyqi.core.interfaces.html.output_handler import newline_list_of_strings from pyqi.core.command import (make_command_in_collection_lookup_f, make_command_out_collection_lookup_f) from pyqi.commands.make_bash_completion import CommandConstructor cmd_in_lookup = make_command_in_collection_lookup_f(CommandConstructor) cmd_out_lookup = make_command_out_collection_lookup_f(CommandConstructor) inputs = [ HTMLInputOption(Parameter=cmd_in_lookup('command_config_module')), HTMLInputOption(Parameter=cmd_in_lookup('driver_name')), HTMLInputOption( Parameter=None, Name='download-file', Required=True, Help= 'The name of the bash completion script to download. (e.g. my_file)') ] outputs = [ HTMLDownload(Parameter=cmd_out_lookup('result'), FilenameLookup='download-file', FileExtension='.sh') ]