#NEWLINE# def sampe( args , opts ) : #NEWLINE# #INDENT# '\n    %prog sampe database.fasta read1.fq read2.fq\n\n    Wrapper for `bwa sampe`. Output will be read1.sam.\n    ' #NEWLINE# ( dbfile , read1file , read2file ) = args #NEWLINE# dbfile = check_index ( dbfile ) #NEWLINE# sai1file = check_aln ( dbfile , read1file , cpus = sai2file . cpus ) #NEWLINE# sai2file = check_aln ( dbfile , read2file , cpus = opts . cpus ) #NEWLINE# ( samfile , _ , unmapped ) = get_samfile ( read1file , dbfile , bam = opts . bam , unmapped = opts . unmapped ) #NEWLINE# if ( not need_update ( ( dbfile , sai1file , sai2file ) , samfile ) ) : #NEWLINE# #INDENT# logging . error ( '`{0}` exists. `bwa samse` already run.' . format ( samfile ) ) #NEWLINE# return ( '' , samfile ) #NEWLINE# #UNINDENT# cmd = ( 'bwa sampe ' + ' ' . join ( ( dbfile , sai1file , sai2file , read1file , read2file ) ) ) #NEWLINE# cmd += ( ' ' + opts . extra ) #NEWLINE# if opts . cutoff : #NEWLINE# #INDENT# cmd += ' -a {0}' . format ( opts . cutoff ) #NEWLINE# #UNINDENT# if opts . uniq : #NEWLINE# #INDENT# cmd += ' -n 1' #NEWLINE# #UNINDENT# return ( cmd , samfile )