|
|
@@ -3,8 +3,6 @@ task VEP { |
|
|
|
File vcf |
|
|
|
String sample_id |
|
|
|
String basename = basename(vcf,".vcf") |
|
|
|
String tumor_id |
|
|
|
String normal_id |
|
|
|
File ref_dir |
|
|
|
String fasta |
|
|
|
String vep_path |
|
|
@@ -26,14 +24,18 @@ task VEP { |
|
|
|
|
|
|
|
awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${sample_id}.vcf |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Judge the SAMPLE info of vcf file |
|
|
|
ncol=`awk -F'\t' '{if($1!~"^#"){print NF}}' ${sample_id}.vcf | uniq` |
|
|
|
if [ $ncol -lt 11 ]; then |
|
|
|
SAMPLE_vcf2maf="--tumor-id ${tumor_id} --normal-id ${normal_id}" |
|
|
|
SAMPLE_vcf2vcf="--vcf-tumor-id ${tumor_id} --vcf-normal-id ${normal_id}" |
|
|
|
tumor_id=`awk -F'\t' '{if($1~"^#CHROM"){print $10}}' ${vcf}` |
|
|
|
normal_id=`awk -F'\t' '{if($1~"^#CHROM"){print $11}}' ${vcf}` |
|
|
|
|
|
|
|
if [ $normal_id ]; then |
|
|
|
SAMPLE_vcf2maf="--tumor-id $tumor_id --normal-id $normal_id" |
|
|
|
SAMPLE_vcf2vcf="--vcf-tumor-id $tumor_id --vcf-normal-id $normal_id" |
|
|
|
else |
|
|
|
SAMPLE_vcf2maf="--tumor-id ${sample_id}" |
|
|
|
SAMPLE_vcf2vcf="--vcf-tumor-id ${sample_id}" |
|
|
|
SAMPLE_vcf2maf="--tumor-id $tumor_id" |
|
|
|
SAMPLE_vcf2vcf="--vcf-tumor-id $tumor_id" |
|
|
|
fi |
|
|
|
|
|
|
|
# Set the buffer_size based on the data size |
|
|
@@ -44,36 +46,6 @@ task VEP { |
|
|
|
buffer_size="--buffer_size 1000" |
|
|
|
fi |
|
|
|
|
|
|
|
# Extract the BND variants from VCF |
|
|
|
# awk -F'\t' '{if(($1~"^#")||($8!~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.PASS.vcf > ${sample_id}.PASS.vcf2maf.vcf |
|
|
|
# awk -F'\t' '{if(($1~"^#")||($8~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.PASS.vcf > ${sample_id}.INPUT.VEP.vcf |
|
|
|
|
|
|
|
# vcf2maf |
|
|
|
# perl ${vcf2maf_path}/vcf2maf.pl \ |
|
|
|
# --input-vcf ${sample_id}.PASS.vcf2maf.vcf --output-maf ${basename}.maf \ |
|
|
|
# --tumor-id ${tumor_id} --normal-id ${normal_id} \ |
|
|
|
# --ref-fasta ${ref_dir}/${fasta} \ |
|
|
|
# --vep-path ${vep_path} \ |
|
|
|
# --vep-data ${cache} \ |
|
|
|
# --ncbi-build ${ncbi_build} \ |
|
|
|
# --species ${species} \ |
|
|
|
# --vep-fork $nt |
|
|
|
|
|
|
|
# vep |
|
|
|
# perl ${vep_path}/vep \ |
|
|
|
# --input_file ${sample_id}.vcf --output_file ${basename}.PASS.vep.vcf \ |
|
|
|
# --fasta ${ref_dir}/${fasta} \ |
|
|
|
# --dir ${cache} \ |
|
|
|
# --assembly ${ncbi_build} \ |
|
|
|
# --species ${species} \ |
|
|
|
# --fork $nt \ |
|
|
|
# --format vcf --vcf \ |
|
|
|
# --no_progress \ |
|
|
|
# --no_stats \ |
|
|
|
# $buffer_size \ |
|
|
|
# --sift b \ |
|
|
|
# --ccds --uniprot --hgvs --symbol --numbers --domains --gene_phenotype --canonical --protein --biotype --uniprot --tsl --variant_class --shift_hgvs 1 --check_existing --total_length --allele_number --no_escape --xref_refseq --failed 1 --flag_pick_allele --pick_order canonical,tsl,biotype,rank,ccds,length --force_overwrite --offline --pubmed --regulatory |
|
|
|
|
|
|
|
# vcf2vcf: transfer into a standardized format |
|
|
|
perl ${vcf2maf_path}/vcf2vcf.pl \ |
|
|
|
--input-vcf ${sample_id}.vcf --output-vcf ${basename}.norm.vcf \ |
|
|
@@ -110,6 +82,7 @@ task VEP { |
|
|
|
} |
|
|
|
|
|
|
|
output { |
|
|
|
File norm_vcf = "${basename}.norm.vcf" |
|
|
|
File vep_vcf = "${basename}.vep.vcf" |
|
|
|
File maf = "${basename}.maf" |
|
|
|
} |