def convert_assocs(ont, file, outfile, p, args): assocs = p.parse(open(file, "r"), None) w = GpadWriter() fmt = args.to if fmt == 'gpad': w = GpadWriter() else: raise ValueError("Not supported: {}".format(fmt)) w.file = outfile w.write(assocs)
def write_assocs(assocs, outfile, args): w = GpadWriter() fmt = args.to if fmt is None or fmt == 'gaf': w = GafWriter() elif fmt == 'gpad': w = GpadWriter() else: raise ValueError("Not supported: {}".format(fmt)) w.file = outfile w.write(assocs)