def get_parser(): """Returns arg parser.""" parser = argparse.ArgumentParser(prog='tofu_wrap') helpstr = "Input full-length non-chimeric reads in FASTA or ContigSet format " + \ "(e.g., isoseq_flnc.fasta|contigset.xml)" parser.add_argument("flnc_fa", type=str, help=helpstr) helpstr = "Output collapsed filtered isoforms in FASTA/FASTQ format (e.g., tofu_out.fastq)" parser.add_argument("collapsed_filtered_fn", type=str, help=helpstr) parser = add_nfl_fa_argument(parser, positional=False, required=True) parser.add_argument("--nfl_reads_per_split", type=int, dest="nfl_reads_per_split", default=60000, help="Number of nFL reads per split file (default: 60000)") parser = add_fofn_arguments(parser, ccs_fofn=True, bas_fofn=True, fasta_fofn=True) # tofu output arguments parser = add_tofu_output_arguments(parser) parser = add_ice_arguments(parser) # Add Ice options, including --quiver parser = add_sge_arguments(parser, blasr_nproc=True, quiver_nproc=True, gcon_nproc=True) # Sge parser = add_ice_post_quiver_hq_lq_qv_arguments(parser) # IceQuiver HQ/LQ QV options. parser = add_separate_flnc_arguments(parser) # separate_flnc options parser = add_gmap_arguments(parser) # map to gmap reference options parser = add_post_mapping_to_genome_arguments(parser) # post mapping to genome options misc_group = parser.add_argument_group("Misc arguments") misc_group.add_argument("--mem_debug", default=False, action="store_true", help=argparse.SUPPRESS) misc_group.add_argument("--keep_tmp_files", default=False, action="store_true", help="False: delete tmp files; True: keep tmp files (default: False).") misc_group.add_argument("--version", action='version', version='%(prog)s ' + str(get_version())) return parser
def add_ice_partial_split_arguments(parser): """Add arguments for ice_partial split.""" parser = add_cluster_root_dir_as_positional_argument(parser) parser = add_nfl_fa_argument(parser, positional=True) helpstr = "Split non-full-length reads into N chunks, N < 100." parser.add_argument("N", help=helpstr, type=int)
def add_ice_polish_arguments(parser): """Set up argument parser.""" parser = add_cluster_root_dir_as_positional_argument(parser) parser = add_nfl_fa_argument(parser, positional=True) parser = add_fofn_arguments(parser, ccs_fofn=True, bas_fofn=True) parser = add_ice_post_quiver_hq_lq_arguments(parser) parser = add_sge_arguments(parser, quiver_nproc=True, blasr_nproc=True) parser = add_tmp_dir_argument(parser) return parser