def run_coral(clus_obj, out_dir, args):
if not args.bed:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>workdir = op.abspath(op.join(args.out, '<STR_LIT>'))<EOL>safe_dirs(workdir)<EOL>bam_in = op.abspath(args.bam)<EOL>bed_in = op.abspath(args.bed)<EOL>reference = op.abspath(args.ref)<EOL>with chdir(workdir):<EOL><INDENT>bam_clean = coral.prepare_bam(bam_in, bed_in)<EOL>out_dir = op.join(workdir, "<STR_LIT>")<EOL>safe_dirs(out_dir)<EOL>prefix = "<STR_LIT>"<EOL>loci_file = coral.detect_regions(bam_clean, bed_in, out_dir, prefix)<EOL>coral.create_features(bam_clean, loci_file, reference, out_dir)<EOL><DEDENT>
Run some CoRaL modules to predict small RNA function