How to use the pypeline.ui.print_err function in Pypeline

To help you get started, we’ve selected a few Pypeline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MikkelSchubert / paleomix / pypeline / commands / unicat.py View on Github external
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option("--output")

    config, args = parser.parse_args(argv)
    if not args:
        pypeline.ui.print_err("%s takes at least one input file" % sys.argv[0])
        sys.exit(1)
                               
    return call(input_files   = args,
                output_file   = config.output)
github MikkelSchubert / paleomix / pypeline / commands / sam_to_bam.py View on Github external
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option("-q", "--min-quality", type = int, default = 0)
    parser.add_option("-F", "--exclude-flags", type = int, default = 0)
    parser.add_option("--flag-as-sorted", default = False, action = "store_true")

    config, args = parser.parse_args(argv)
    if args:
        pypeline.ui.print_err("%s does not take any arguments." % sys.argv[0])
        sys.exit(1)
                               
    return call(min_quality    = config.min_quality,
                exclude_flags  = config.exclude_flags,
                flag_as_sorted = config.flag_as_sorted)
github MikkelSchubert / paleomix / pypeline / tools / bam_pipeline / move.py View on Github external
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option("--jar-root", default = os.path.join(os.path.expanduser('~'), "install", "picard-tools"),
                      help = "Folder containing Picard JARs (http://picard.sf.net)")
    options, args = parser.parse_args(argv)

    if len(args) != 2:
        ui.print_err("Usage: bam_pipeline move SRC DST")
        ui.print_err("  where: SRC and DST are paths in the form TARGET/reads/SAMPLE/LIBRARY/LANE")
        ui.print_err("Note that the second folder of the path (here \"reads/\") is ignored.")

        return 1

    source      = parse_args(args[0])
    destination = parse_args(args[1])

    move_reads(source, destination)
    move_bams(source, destination)
    retag_bams(options, source, destination)
    rm_files(source)
    rm_files(destination)
    print

    return 0
github MikkelSchubert / paleomix / pypeline / tools / bam_pipeline / move.py View on Github external
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option("--jar-root", default = os.path.join(os.path.expanduser('~'), "install", "picard-tools"),
                      help = "Folder containing Picard JARs (http://picard.sf.net)")
    options, args = parser.parse_args(argv)

    if len(args) != 2:
        ui.print_err("Usage: bam_pipeline move SRC DST")
        ui.print_err("  where: SRC and DST are paths in the form TARGET/reads/SAMPLE/LIBRARY/LANE")
        ui.print_err("Note that the second folder of the path (here \"reads/\") is ignored.")

        return 1

    source      = parse_args(args[0])
    destination = parse_args(args[1])

    move_reads(source, destination)
    move_bams(source, destination)
    retag_bams(options, source, destination)
    rm_files(source)
    rm_files(destination)
    print

    return 0
github MikkelSchubert / paleomix / pypeline / tools / bam_pipeline / move.py View on Github external
def main(argv):
    parser = optparse.OptionParser()
    parser.add_option("--jar-root", default = os.path.join(os.path.expanduser('~'), "install", "picard-tools"),
                      help = "Folder containing Picard JARs (http://picard.sf.net)")
    options, args = parser.parse_args(argv)

    if len(args) != 2:
        ui.print_err("Usage: bam_pipeline move SRC DST")
        ui.print_err("  where: SRC and DST are paths in the form TARGET/reads/SAMPLE/LIBRARY/LANE")
        ui.print_err("Note that the second folder of the path (here \"reads/\") is ignored.")

        return 1

    source      = parse_args(args[0])
    destination = parse_args(args[1])

    move_reads(source, destination)
    move_bams(source, destination)
    retag_bams(options, source, destination)
    rm_files(source)
    rm_files(destination)
    print

    return 0