예제 #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()
예제 #2
0
파일: addsnv.py 프로젝트: jpfeil/bamsurgeon
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()
예제 #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()
예제 #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()
예제 #5
0
파일: addsv.py 프로젝트: jpfeil/bamsurgeon
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()
예제 #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()