Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.7 kB
0
Indexable
Never
import os

from config import *
import subprocess
from datetime import datetime


def svision(OUT, BAM, REF, BAM_NAME, s, t, LOG):
    command = svision_command % (OUT, BAM, REF, BAM_NAME, s, t, LOG)
    print(command)
    p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    return p

def cutesv(BAM, REF, VCF, WORKSPACE, param, LOG):
    command = cutesv_command % (BAM, REF, VCF, WORKSPACE, param[0], param[1], param[2], param[3], LOG)
    print(command)
    p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    return p

def call_ccs_37():
    time = datetime.now().strftime('%Y-%m-%d-%H:%M:%S')
    # HiFi GRCh37 svision:38205s
    hifi_37_cutesv = cutesv(HG002Data['PacBioCCS']['hs37d5'], REF['hs37d5'], 'cuteSV_hg002_PacBioCCS_hs37d5_%s.vcf' % (time), '/home/chensm/pycharm/cuteSV/HG002PacBioCCS/37', cutesv_param['PacBioCCS'], './log/HG002_HiFi_hs37d5_cutesv_' +  time + '.log')
    hifi_37_svision = svision('/home/chensm/pycharm/SVision/out', HG002Data['PacBioCCS']['hs37d5'], REF['hs37d5'], 'HG002_PacBioCCS_hs37d5', 5, 10, './log/HG002_HiFi_hs37d5_svision_' + time + '.log')


def call_ont_37():
    time = datetime.now().strftime('%Y-%m-%d-%H:%M:%S')
    # HiFi GRCh37 svision:38205s
    ont_37_cutesv = cutesv(HG002Data['ONT']['hs37d5'], REF['hs37d5'], 'cuteSV_hg002_ONT_hs37d5_%s.vcf' % (time), '/home/chensm/pycharm/cuteSV/HG002ONT/37', cutesv_param['ONT'], './log/HG002_ONT_hs37d5_cutesv_' +  time + '.log')
    ont_37_svision = svision('/home/chensm/pycharm/SVision/out', HG002Data['ONT']['hs37d5'], REF['hs37d5'], 'HG002_ONT_hs37d5', 5, 10, './log/HG002_ONT_hs37d5_svision_' +  time + '.log')


if __name__ == '__main__':
    call_ont_37()