def add_ice_all_partials_arguments(parser):
    """Add IceAllPartials argument parser."""
    parser.add_argument("fasta_filenames",
                        type=str,
                        help="comma delimited fasta files of " +
                             "splitted non-full-length reads")
    parser.add_argument("ref_fasta",
                        type=str,
                        help="Reference fasta file, most likely " +
                             "final.consensus.fasta from ICE output")
    parser.add_argument("out_pickle",
                        type=str,
                        help="Output pickle file.")
    parser.add_argument("--fastq_filenames",
                        default=None,
                        type=str,
                        help="(optional) comma delimited fastq files of " +
                             "splitted non-full-length reads. If not given, no QVs are used.")
    parser.add_argument("--root_dir",
                        dest="root_dir",
                        default="",
                        help="A directory for saving intermediate files.")

    parser = add_partial_argument(parser)
    # for running Partial, only relevant nproc is the gcon_nproc
    parser = add_sge_arguments(parser, blasr_nproc=False, arrow_nproc=False, gcon_nproc=False)
    # Liz: I don't think fofn (subread XML) is needed at partial step. commenting out for now.
    #parser = add_fofn_arguments(parser, bas_fofn=True, fasta_fofn=False)

    parser.add_argument("--done", dest="done_filename", type=str,
                        help="An empty file generated to indicate that " +
                             "out_pickle is done.")

    parser = add_tmp_dir_argument(parser)
    return parser
Exemple #2
0
def add_ice_arrow_all_arguments(parser):

    arg_parser = parser #parser.arg_parser.parser
    arg_parser = add_cluster_root_dir_as_positional_argument(arg_parser)
    arg_parser = add_fofn_arguments(arg_parser, subread_xml=True)
    arg_parser = add_cluster_summary_report_arguments(arg_parser)
    arg_parser = add_ice_post_arrow_hq_lq_arguments2(arg_parser)
    arg_parser = add_sge_arguments(arg_parser, blasr_nproc=True, arrow_nproc=True)
    arg_parser = add_tmp_dir_argument(arg_parser)
    return arg_parser
Exemple #3
0
def add_ice_arrow_all_arguments(parser):

    arg_parser = parser  #parser.arg_parser.parser
    arg_parser = add_cluster_root_dir_as_positional_argument(arg_parser)
    arg_parser = add_fofn_arguments(arg_parser, subread_xml=True)
    arg_parser = add_cluster_summary_report_arguments(arg_parser)
    arg_parser = add_ice_post_arrow_hq_lq_arguments2(arg_parser)
    arg_parser = add_sge_arguments(arg_parser,
                                   blasr_nproc=True,
                                   arrow_nproc=True)
    arg_parser = add_tmp_dir_argument(arg_parser)
    return arg_parser
def add_ice_all_partials_arguments(parser):
    """Add IceAllPartials argument parser."""
    parser.add_argument("fasta_filenames",
                        type=str,
                        help="comma delimited fasta files of " +
                        "splitted non-full-length reads")
    parser.add_argument("ref_fasta",
                        type=str,
                        help="Reference fasta file, most likely " +
                        "final.consensus.fasta from ICE output")
    parser.add_argument("out_pickle", type=str, help="Output pickle file.")
    parser.add_argument(
        "--fastq_filenames",
        default=None,
        type=str,
        help="(optional) comma delimited fastq files of " +
        "splitted non-full-length reads. If not given, no QVs are used.")
    parser.add_argument("--root_dir",
                        dest="root_dir",
                        default="",
                        help="A directory for saving intermediate files.")

    parser = add_partial_argument(parser)
    # for running Partial, only relevant nproc is the gcon_nproc
    parser = add_sge_arguments(parser,
                               blasr_nproc=False,
                               arrow_nproc=False,
                               gcon_nproc=False)
    # Liz: I don't think fofn (subread XML) is needed at partial step. commenting out for now.
    #parser = add_fofn_arguments(parser, bas_fofn=True, fasta_fofn=False)

    parser.add_argument("--done",
                        dest="done_filename",
                        type=str,
                        help="An empty file generated to indicate that " +
                        "out_pickle is done.")

    parser = add_tmp_dir_argument(parser)
    return parser
Exemple #5
0
def add_ice_arrow_arguments(parser):
    """Add arguments for IceArrow2, not including IceArrowPostprocess2."""
    parser = add_cluster_root_dir_as_positional_argument(parser)
    parser = add_fofn_arguments(parser, subread_xml=True)
    parser = add_sge_arguments(parser, arrow_nproc=True, blasr_nproc=True)
    return parser
    from argparse import ArgumentParser
    parser = ArgumentParser("run IceIterative2.")

    parser.add_argument("fasta_filenames")
    parser.add_argument("fastq_filenames")
    parser.add_argument("all_fasta_filename")

    parser = add_cluster_root_dir_as_positional_argument(parser)
    parser.add_argument("--init_uc_pickle",
                        default=None,
                        type=str,
                        help="Init2 pickle (ex: init.uc.pickle)")

    parser = add_ice_arguments(parser)
    parser = add_sge_arguments(parser,
                               blasr_nproc=True,
                               gcon_nproc=True,
                               arrow_nproc=False)

    args = parser.parse_args()

    # currently, the user is NOT allowed to set the definition for full missed start/end
    # (i.e. how much of the query must be mapped to consider it a hit)
    ice_opts = IceOptions2(
        ece_penalty=args.ece_penalty,
        ece_min_len=args.ece_min_len,
        max_missed_start=args.max_missed_start,
        max_missed_end=args.max_missed_end,
        full_missed_start=30,
        full_missed_end=20,
        aligner_choice=args.aligner_choice,
    )
    icec.run()


if __name__ == "__main__":
    from argparse import ArgumentParser
    parser = ArgumentParser("run IceIterative2.")

    parser.add_argument("fasta_filenames")
    parser.add_argument("fastq_filenames")
    parser.add_argument("all_fasta_filename")

    parser = add_cluster_root_dir_as_positional_argument(parser)
    parser.add_argument("--init_uc_pickle", default=None, type=str, help="Init2 pickle (ex: init.uc.pickle)")

    parser = add_ice_arguments(parser)
    parser = add_sge_arguments(parser, blasr_nproc=True, gcon_nproc=True, arrow_nproc=False)


    args = parser.parse_args()

    # currently, the user is NOT allowed to set the definition for full missed start/end
    # (i.e. how much of the query must be mapped to consider it a hit)
    ice_opts = IceOptions2(ece_penalty=args.ece_penalty,
                           ece_min_len=args.ece_min_len,
                           max_missed_start=args.max_missed_start,
                           max_missed_end=args.max_missed_end,
                           full_missed_start=30,
                           full_missed_end=20,
                           aligner_choice=args.aligner_choice,
                           )