bug
parent
1b53f9d6a0
commit
ed291660cf
|
|
@ -9,6 +9,7 @@ import time
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
def get_branch_nodes(graph, start_node):
|
def get_branch_nodes(graph, start_node):
|
||||||
|
|
@ -62,6 +63,17 @@ def get_catecode(project, start_node='addQc'):
|
||||||
return cate_dict
|
return cate_dict
|
||||||
|
|
||||||
|
|
||||||
|
def send_ding(msg):
|
||||||
|
'''
|
||||||
|
发送钉钉消息功能
|
||||||
|
'''
|
||||||
|
url = 'https://oapi.dingtalk.com/robot/send?access_token=d4a0749cc7ff87bd12079a79dd74ca3423becb1ce161c3088acc6628a7a188dd'
|
||||||
|
data = {"msgtype": "text", "text": {"content": "pipeline:" + str(msg)}, "at": {"isAtAll": True}}
|
||||||
|
headers = {'Content-Type': 'application/json;charset=UTF-8'}
|
||||||
|
send_data = json.dumps(data).encode('utf-8')
|
||||||
|
ret = requests.post(url=url, data=send_data, headers=headers)
|
||||||
|
|
||||||
|
|
||||||
def run(barcode, normal, umi, input_dir, output_dir, project, cancer, probe, wdl, start_node):
|
def run(barcode, normal, umi, input_dir, output_dir, project, cancer, probe, wdl, start_node):
|
||||||
input_dir = os.path.realpath(input_dir)
|
input_dir = os.path.realpath(input_dir)
|
||||||
output_dir = os.path.realpath(output_dir)
|
output_dir = os.path.realpath(output_dir)
|
||||||
|
|
@ -108,6 +120,8 @@ def run(barcode, normal, umi, input_dir, output_dir, project, cancer, probe, wdl
|
||||||
output, error = ret.communicate()
|
output, error = ret.communicate()
|
||||||
print(output, error)
|
print(output, error)
|
||||||
|
|
||||||
|
send_ding(msg=f'样本{barcode}已开始分析,分析地址\n{output_dir}')
|
||||||
|
|
||||||
stdout = open(os.path.join(output_dir, f'{args.barcode}_{logname}_stdout.log'), 'w')
|
stdout = open(os.path.join(output_dir, f'{args.barcode}_{logname}_stdout.log'), 'w')
|
||||||
stderr = open(os.path.join(output_dir, f'{args.barcode}_{logname}_stderr.log'), 'w')
|
stderr = open(os.path.join(output_dir, f'{args.barcode}_{logname}_stderr.log'), 'w')
|
||||||
|
|
||||||
|
|
@ -159,6 +173,7 @@ def run(barcode, normal, umi, input_dir, output_dir, project, cancer, probe, wdl
|
||||||
stderr.write(file_path + '\n')
|
stderr.write(file_path + '\n')
|
||||||
stderr.write(f.read())
|
stderr.write(f.read())
|
||||||
stderr.write('\n\n')
|
stderr.write('\n\n')
|
||||||
|
send_ding(msg=f'样本{barcode}已分析完成,分析地址\n{output_dir}, 请查看!')
|
||||||
stdout.close()
|
stdout.close()
|
||||||
stderr.close()
|
stderr.close()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ task run_msi {
|
||||||
msisensor2 msi \
|
msisensor2 msi \
|
||||||
-M /dataseq/jmdna/software/msisensor2/models_hg19_GRCh37 \
|
-M /dataseq/jmdna/software/msisensor2/models_hg19_GRCh37 \
|
||||||
-t ${tumor_rmdup_bam} -e $PUBLIC/msi/624_650_160_intersect_74.bed \
|
-t ${tumor_rmdup_bam} -e $PUBLIC/msi/624_650_160_intersect_74.bed \
|
||||||
-b 10 ${output_dir}/msi/${name}.msi.txt
|
-b 10 -o ${output_dir}/msi/${name}.msi.txt
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "未知的选项: ${probe}"
|
echo "未知的选项: ${probe}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue