Esempio n. 1
0
def test_alignment_parser_input_choices():
    # kind of a hack. make sure input choices
    # are correct based upon whether or not they
    # appear in --help
    all_choices = ("bowtie","tagalign","wiggle","BAM","bigwig")
    for chosen in itertools.chain.from_iterable(itertools.combinations(all_choices,K) for K in range(len(all_choices))):
        tmp_str = "  --countfile_format {%s}" % ",".join(list(chosen))
        parser = get_alignment_file_parser(input_choices=chosen)
        assert_in(tmp_str,parser.format_help())
Esempio n. 2
0
    "annotation_format",
    "add_three",
    "annotation_files",
    "tabix"
}
annotation_file_gff_opts = { "gff_exon_types", "gff_transcript_types"}
annotation_file_parser_disableable = annotation_file_parser_opts - set(["annotation_files"])


ivcollection_file_parser_opts        = annotation_file_parser_opts - set(["add_three"])
ivcollection_file_parser_disableable = annotation_file_parser_disableable - set(["add_three"])

mask_file_parser_opts        = ivcollection_file_parser_opts
mask_file_parser_disableable = ivcollection_file_parser_disableable

alignment_file_parser    = get_alignment_file_parser()
annotation_file_parser   = get_annotation_file_parser()
ivcollection_file_parser = get_segmentchain_file_parser()
sequence_file_parser     = get_sequence_file_parser()
mask_file_parser         = get_mask_file_parser()

def check_prefix(parser_fn,opts):
    """Helper function to test prefix appending to various parsers

    Parameters
    ----------
    parser_fn : function
        Function that returns a :py:class:`~argparse.ArgumentParser`

    opts : list
        list of strings of options, without prefixes, included