def samse(args, opts):
    """
    %prog samse database.fasta short_read.fastq

    Wrapper for `bwa samse`. Output will be short_read.sam.
    """
    dbfile, readfile = args
    dbfile = check_index(dbfile)
    saifile = check_aln(dbfile, readfile, cpus=opts.cpus)

    samfile, _, unmapped = get_samfile(readfile, dbfile,
                                       bam=opts.bam, unmapped=opts.unmapped)
    if not need_update((dbfile, saifile), samfile):
        logging.error("`{0}` exists. `bwa samse` already run.".format(samfile))
        return "", samfile

    cmd = "bwa samse {0} {1} {2}".format(dbfile, saifile, readfile)
    cmd += " " + opts.extra
    if opts.uniq:
        cmd += " -n 1"

    return cmd, samfile
def samse ( args , opts ) : dbfile , readfile = args dbfile = check_index ( dbfile ) saifile = check_aln ( dbfile , readfile , cpus = opts . cpus ) samfile , _ , unmapped = get_samfile ( readfile , dbfile , bam = opts . bam , unmapped = opts . unmapped ) if not need_update ( ( dbfile , saifile ) , samfile ) : logging . error ( "`{0}` exists. `bwa samse` already run." . format ( samfile ) ) return "" , samfile cmd = "bwa samse {0} {1} {2}" . format ( dbfile , saifile , readfile ) cmd += " " + opts . extra if opts . uniq : cmd += " -n 1" return cmd , samfile
%prog samse database.fasta short_read.fastq

    Wrapper for `bwa samse`. Output will be short_read.sam.