src/toil_lib/tools/preprocessing.py
def run_sambamba_markdup(job, bam):
    """
    Marks reads as PCR duplicates using Sambamba

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str bam: FileStoreID for BAM file
    :return: FileStoreID for sorted BAM file
    :rtype: str
    """
    work_dir = job.fileStore.getLocalTempDir()
    job.fileStore.readGlobalFile(bam, os.path.join(work_dir, 'input.bam'))
    command = ['/usr/local/bin/sambamba',
               'markdup',
               '-t', str(int(job.cores)),
               '/data/input.bam',
               '/data/output.bam']

    start_time = time.time()
    dockerCall(job=job, workDir=work_dir,
               parameters=command,
               tool='quay.io/biocontainers/sambamba:0.6.6--0')
    end_time = time.time()
    _log_runtime(job, start_time, end_time, "sambamba mkdup")
    return job.fileStore.writeGlobalFile(os.path.join(work_dir, 'output.bam'))
def run_sambamba_markdup(job, bam):
    work_dir = job.fileStore.getLocalTempDir()
    job.fileStore.readGlobalFile(bam, os.path.join(work_dir, 'input.bam'))
    command = ['/usr/local/bin/sambamba',
               'markdup',
               '-t', str(int(job.cores)),
               '/data/input.bam',
               '/data/output.bam']

    start_time = time.time()
    dockerCall(job=job, workDir=work_dir,
               parameters=command,
               tool='quay.io/biocontainers/sambamba:0.6.6--0')
    end_time = time.time()
    _log_runtime(job, start_time, end_time, "sambamba mkdup")
    return job.fileStore.writeGlobalFile(os.path.join(work_dir, 'output.bam'))
def run_sambamba_markdup ( job , bam ) : work_dir = job . fileStore . getLocalTempDir ( ) job . fileStore . readGlobalFile ( bam , os . path . join ( work_dir , 'input.bam' ) ) command = [ '/usr/local/bin/sambamba' , 'markdup' , '-t' , str ( int ( job . cores ) ) , '/data/input.bam' , '/data/output.bam' ] start_time = time . time ( ) dockerCall ( job = job , workDir = work_dir , parameters = command , tool = 'quay.io/biocontainers/sambamba:0.6.6--0' ) end_time = time . time ( ) _log_runtime ( job , start_time , end_time , "sambamba mkdup" ) return job . fileStore . writeGlobalFile ( os . path . join ( work_dir , 'output.bam' ) )
Marks reads as PCR duplicates using Sambamba

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str bam: FileStoreID for BAM file
    :return: FileStoreID for sorted BAM file
    :rtype: str
Marks reads as PCR duplicates using Sambamba