Esempio n. 1
0
def replace(origbamfile, mutbamfile, outbamfile, seed=None):
    ''' open .bam file and call replacereads
    '''
    origbam = pysam.Samfile(origbamfile, 'rb')
    mutbam  = pysam.Samfile(mutbamfile, 'rb')
    outbam  = pysam.Samfile(outbamfile, 'wb', template=origbam)

    rr.replaceReads(origbam, mutbam, outbam, keepqual=True, seed=seed)

    origbam.close()
    mutbam.close()
    outbam.close()
Esempio n. 2
0
def replace(origbamfile, mutbamfile, outbamfile, seed=None):
    """ open .bam file and call replacereads
    """
    origbam = pysam.Samfile(origbamfile, "rb")
    mutbam = pysam.Samfile(mutbamfile, "rb")
    outbam = pysam.Samfile(outbamfile, "wb", template=origbam)

    rr.replaceReads(origbam, mutbam, outbam, keepqual=True, seed=seed)

    origbam.close()
    mutbam.close()
    outbam.close()
Esempio n. 3
0
def replace(origbamfile, mutbamfile, outbamfile, excludefile):
    ''' open .bam file and call replacereads
    '''
    origbam = pysam.Samfile(origbamfile, 'rb')
    mutbam  = pysam.Samfile(mutbamfile, 'rb')
    outbam  = pysam.Samfile(outbamfile, 'wb', template=origbam)

    rr.replaceReads(origbam, mutbam, outbam, excludefile=excludefile, allreads=True)

    origbam.close()
    mutbam.close()
    outbam.close()
Esempio n. 4
0
def replace(origbamfile, mutbamfile, outbamfile, excludefile, keepsecondary=False):
    ''' open .bam file and call replacereads
    '''
    origbam = pysam.Samfile(origbamfile, 'rb')
    mutbam  = pysam.Samfile(mutbamfile, 'rb')
    outbam  = pysam.Samfile(outbamfile, 'wb', template=origbam)

    rr.replaceReads(origbam, mutbam, outbam, excludefile=excludefile, allreads=True, keepsecondary=keepsecondary)

    origbam.close()
    mutbam.close()
    outbam.close()
Esempio n. 5
0
def replace(origbamfile, mutbamfile, outbamfile, excludefile, keepsecondary=False, seed=None):
    ''' open .bam file and call replacereads
    '''
    origbam = pysam.Samfile(origbamfile, 'rb')
    mutbam  = pysam.Samfile(mutbamfile, 'rb')
    outbam  = pysam.Samfile(outbamfile, 'wb', template=origbam)

    rr.replaceReads(origbam, mutbam, outbam, excludefile=excludefile, allreads=True, keepsecondary=keepsecondary, seed=seed)

    origbam.close()
    mutbam.close()
    outbam.close()
Esempio n. 6
0
def replace(origbamfile, mutbamfile, outbamfile, excludefile, keepsecondary=False, seed=None):
    """ open .bam file and call replacereads
    """
    origbam = pysam.Samfile(origbamfile, "rb")
    mutbam = pysam.Samfile(mutbamfile, "rb")
    outbam = pysam.Samfile(outbamfile, "wb", template=origbam)

    rr.replaceReads(
        origbam, mutbam, outbam, excludefile=excludefile, allreads=True, keepsecondary=keepsecondary, seed=seed
    )

    origbam.close()
    mutbam.close()
    outbam.close()