Example #1
0
                        type=int,
                        required=True)
    parser.add_argument("--text_count",
                        help="Text count",
                        type=int,
                        required=True)
    parser.add_argument("--qpi",
                        help="Queries per iteration",
                        type=int,
                        required=True)
    parser.add_argument("--log_file",
                        help="Whether to save logging into file as well.",
                        default=None)
    parser.add_argument("--preset", help="Some presets for certain systems.")
    parser.add_argument("--preset_info",
                        help="Extra information for a given preset.")
    args = parser.parse_args()

    # logging
    logger = get_logger(args.log_file)
    args.logger = logger

    if args.preset == "taito":
        run_taito(args)
    elif args.preset == "taito-timelimit":
        run_taito_timelimit(args)
    elif args.preset == "kale-timelimit":
        run_kale_timelimit(args)
    else:
        run_normal(args)
Example #2
0
                        help="Minimum length of hits. Default = 0",
                        default=0,
                        type=int)
    parser.add_argument("--max_length",
                        help="Maximum length of hits. Default = 100000",
                        default=100000,
                        type=int)
    parser.add_argument("--split_size", default=0, type=int)
    parser.add_argument("--language", help="Language to use.", default="FIN")
    parser.add_argument(
        "--log_file",
        help="Whether to save all logging into a file as well.",
        default=None)
    args = parser.parse_args()

    logger = text_logging.get_logger()

    dp = DataPreparer(data_location=args.data_folder,
                      output_folder=args.output_folder,
                      language=args.language,
                      threads=args.threads,
                      split_size=args.split_size,
                      logger=logger)
    dp.prepare_data()
    text_count = dp.get_text_count()
    runner = SingleBlastRunner(data=args.data_folder,
                               output_folder=args.output_folder,
                               e_value=args.e_value,
                               word_size=args.word_size,
                               threads=args.threads,
                               text_count=text_count,
if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        description=
        "Preparing the data. This should only be run if you are planning on running the software in batches."
    )
    parser.add_argument("--threads",
                        help="Number of threads to use",
                        default=1,
                        type=int)
    parser.add_argument("--data_location",
                        help="Location of the data files",
                        required=False)
    parser.add_argument(
        "--output_folder",
        help="A folder where all data will be stored in the end.",
        required=True)
    parser.add_argument("--language", help="Encoding language", default="FIN")
    parser.add_argument(
        "--split_size",
        type=int,
        help="If needed to split the data prior to entering it into the DB",
        default=-1)
    args = parser.parse_args()

    logger = get_logger()

    dp = DataPreparer(args.data_location, args.output_folder, args.threads,
                      args.language, args.split_size, logger)
    dp.prepare_data()