def make_annotation(args):
    """
    Make GFF annotation. Takes GFF tables directory
    and an output directory.
    """
    tables_dir = utils.pathify(args.tables_dir)
    output_dir = utils.pathify(args.output_dir)
    print "Making GFF alternative events annotation..."
    print "  - UCSC tables read from: %s" % (tables_dir)
    print "  - Output dir: %s" % (output_dir)
    t1 = time.time()
    table_fnames = def_events.load_ucsc_tables(tables_dir)
    num_tables = len(table_fnames)
    if num_tables == 0:
        raise Exception, "No UCSC tables found in %s." % (tables_dir)
    print "Loaded %d UCSC tables." % (num_tables)
    def_events.defineAllSplicing(tables_dir,
                                 output_dir,
                                 flanking=args.flanking_rule,
                                 multi_iso=args.multi_iso,
                                 genome_label=args.genome_label,
                                 sanitize=args.sanitize)
    t2 = time.time()
    print "Took %.2f minutes to make the annotation." \
          %((t2 - t1)/60.)
Example #2
0
def make_miso_annotation(tables_dir, output_dir, org_build):
    """
    Make GFF annotation. Takes GFF tables directory
    and an output directory.

    Adapted from
    https://github.com/yarden/rnaseqlib/
    """
    tables_dir = utils.pathify(tables_dir)
    output_dir = utils.pathify(output_dir)
    print "Making GFF alternative events annotation..."
    print " - UCSC tables read from: %s" % (tables_dir)
    print " - Output dir: %s" % (output_dir)
    t1 = time.time()
    table_fnames = def_events.load_ucsc_tables(tables_dir)
    num_tables = len(table_fnames)
    if num_tables == 0:
        raise Exception("No UCSC tables found in %s." % (tables_dir))
    print "Loaded %d UCSC tables." % (num_tables)
    def_events.defineAllSplicing(tables_dir,
                                 output_dir,
                                 flanking="commonshortest",
                                 multi_iso=False,
                                 sanitize=False,
                                 genome_label=org_build)
    t2 = time.time()
    print "Took %.2f minutes to make the annotation." \
        % ((t2 - t1)/60.)
Example #3
0
def make_miso_annotation(tables_dir, output_dir, org_build):
    """
    Make GFF annotation. Takes GFF tables directory
    and an output directory.

    Adapted from
    https://github.com/yarden/rnaseqlib/
    """
    tables_dir = utils.pathify(tables_dir)
    output_dir = utils.pathify(output_dir)
    print "Making GFF alternative events annotation..."
    print " - UCSC tables read from: %s" % (tables_dir)
    print " - Output dir: %s" % (output_dir)
    t1 = time.time()
    table_fnames = def_events.load_ucsc_tables(tables_dir)
    num_tables = len(table_fnames)
    if num_tables == 0:
        raise Exception("No UCSC tables found in %s." % (tables_dir))
    print "Loaded %d UCSC tables." % (num_tables)
    def_events.defineAllSplicing(tables_dir, output_dir,
                                 flanking="commonshortest",
                                 multi_iso=False,
                                 sanitize=False,
                                 genome_label=org_build)
    t2 = time.time()
    print "Took %.2f minutes to make the annotation." \
        % ((t2 - t1)/60.)
Example #4
0
def make_annotation(args):
    """
    Make GFF annotation. Takes GFF tables directory
    and an output directory.
    """
    tables_dir = utils.pathify(args.tables_dir)
    output_dir = utils.pathify(args.output_dir)
    print "Making GFF alternative events annotation..."
    print "  - UCSC tables read from: %s" %(tables_dir)
    print "  - Output dir: %s" %(output_dir)
    t1 = time.time()
    table_fnames = def_events.load_ucsc_tables(tables_dir)
    num_tables = len(table_fnames)
    if num_tables == 0:
        raise Exception, "No UCSC tables found in %s." %(tables_dir)
    print "Loaded %d UCSC tables." %(num_tables)
    def_events.defineAllSplicing(tables_dir, output_dir,
                                 flanking=args.flanking_rule,
                                 multi_iso=args.multi_iso,
                                 genome_label=args.genome_label,
                                 sanitize=args.sanitize)
    t2 = time.time()
    print "Took %.2f minutes to make the annotation." \
          %((t2 - t1)/60.)