@@ -0,0 +1,13 @@ | |||
import pandas as pd | |||
import sys, argparse, os | |||
men = pd.read_table(sys.argv[1],header=None,low_memory=False) | |||
vote = pd.read_table(sys.argv[2],low_memory=False) | |||
men[1]=men[1].astype(str) | |||
merged_df = pd.merge(vote, men, how='inner', left_on=['CHROM','POS'], right_on = [0,1]) | |||
lcl5_dat = merged_df[(merged_df[5]!='./.') & (merged_df[5]!='0/0')] | |||
sub = lcl5_dat[['CHROM','POS','REF','ALT',4,5,6,7,8,'LCL5_consensus_calls', 'LCL5_detect_number','LCL5_same_diff',11]] | |||
sub['mendelian_state'] = 'MIE' | |||
sub.loc[sub[11]=='1:1:1','mendelian_state'] = 'MC' | |||
sub.columns=['CHROM','POS','REF','ALT','variant_type','LCL5','LCL6','LCL7','LCL8','LCL5_consensus_calls','LCL5_detect_number','LCL5_same_diff','mendelian_detail','mendelian_state'] | |||
sub.to_csv(sys.argv[3],sep="\t",index=0) |
@@ -1,16 +0,0 @@ | |||
import pandas as pd | |||
import sys, argparse, os | |||
men = pd.read_table(sys.argv[1],header=None,low_memory=False) | |||
vote = pd.read_table(sys.argv[2],low_memory=False) | |||
men[1]=men[1].astype(str) | |||
merged_df = pd.merge(vote, men, how='inner', left_on=['CHROM','POS'], right_on = [0,1]) | |||
lcl5_dat = merged_df[(merged_df[5]!='./.') & (merged_df[5]!='0/0')] | |||
merged_df['mendelian_check'] = 'MIE' | |||
merged_df.loc[merged_df[2]=='1:1:1','mendelian_check'] = 'MP' | |||
sub = merged_df[['CHROM','POS','LCL5_detected_num','mendelian_check',2]] | |||
sub.columns=['CHROM','POS','detected_num','mendelian','detail'] | |||
genotype_sub = pd.merge(sub, mut, how='inner', left_on=["CHROM","POS"], right_on = [0,1]) | |||
genotype_sub = genotype_sub[['CHROM','POS','detected_num','mendelian','detail',2,3]] | |||
genotype_sub.to_csv(sys.argv[4],header=0,sep="\t",index=0) |
@@ -2,9 +2,10 @@ | |||
"{{ project_name }}.fasta": "GRCh38.d1.vd1.fa", | |||
"{{ project_name }}.family_vcf": "{{ family_vcf }}", | |||
"{{ project_name }}.disk_size": "500", | |||
"{{ project_name }}.vote_summary": "{{ vote_summary }}", | |||
"{{ project_name }}.SMALLcluster_config": "OnDemand bcs.ps.g.xlarge img-ubuntu-vpc", | |||
"{{ project_name }}.BIGcluster_config": "OnDemand bcs.a2.7xlarge img-ubuntu-vpc", | |||
"{{ project_name }}.MENDELIANdocker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/vbt:v1.1", | |||
"{{ project_name }}.DIYdocker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/high_confidence_call_manuscript:v1.4", | |||
"{{ project_name }}.ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/" | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
task count_mendelian { | |||
File project_mendelian | |||
File vote_summary | |||
File family_vcf | |||
String family_name = basename(family_vcf,".vcf") | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
command <<< | |||
python /opt/count_mendelian.py ${project_mendelian} ${vote_summary} ${family_name}.mendelian.count.summary.txt | |||
>>> | |||
runtime { | |||
docker:docker | |||
cluster: cluster_config | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { | |||
File mendelian_summary = "${family_name}.mendelian.count.summary.txt" | |||
} | |||
} |
@@ -2,7 +2,7 @@ task merge_mendelian { | |||
File D5_trio_vcf | |||
File D6_trio_vcf | |||
File family_vcf | |||
String family_name = basename(family_vcf,".family.vcf") | |||
String family_name = basename(family_vcf,".vcf") | |||
String docker | |||
String cluster_config | |||
String disk_size |
@@ -1,9 +1,11 @@ | |||
import "./tasks/mendelian.wdl" as mendelian | |||
import "./tasks/merge_mendelian.wdl" as merge_mendelian | |||
import "./tasks/count_mendelian.wdl" as count_mendelian | |||
workflow {{ project_name }} { | |||
File family_vcf | |||
File ref_dir | |||
File vote_summary | |||
String fasta | |||
String MENDELIANdocker | |||
String DIYdocker | |||
@@ -31,4 +33,13 @@ workflow {{ project_name }} { | |||
disk_size=disk_size | |||
} | |||
call count_mendelian.count_mendelian as count_mendelian { | |||
input: | |||
project_mendelian=merge_mendelian.project_mendelian, | |||
vote_summary=vote_summary, | |||
family_vcf=family_vcf, | |||
docker=DIYdocker, | |||
cluster_config=SMALLcluster_config, | |||
disk_size=disk_size | |||
} | |||
} |