コード例 #1
0
ファイル: addindel.py プロジェクト: elephanthunter/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()
コード例 #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
ファイル: addsv.py プロジェクト: huyvuong/bamsurgeon
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
ファイル: addsv.py プロジェクト: nordhuang/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()