VEP (Variant Effect Predictor) predicts the functional effects of genomic variants. The annotated VCF will be converted into MAF based on vcf2maf.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- task VEP {
-
- File vcf
- String sample_id
- String basename = basename(vcf,".vcf")
- File ref_dir
- String fasta
- String vep_path
- File cache
- String ncbi_build
- String species
- String vcf2maf_path
- String docker
- String cluster_config
- String disk_size
-
-
- command <<<
- set -o pipefail
- set -e
- nt=$(nproc)
-
- source /etc/profile
-
- awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${sample_id}.vcf
-
-
-
- # Judge the SAMPLE info of vcf file
- 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 $tumor_id"
- SAMPLE_vcf2vcf="--vcf-tumor-id $tumor_id"
- fi
-
- # Set the buffer_size based on the data size
- nrow=`awk -F'\t' '{if($1~"^chr"){print $0}}' ${sample_id}.vcf | wc -l`
- if [ $nrow -lt 5000 ]; then
- buffer_size="--buffer_size 5000"
- else
- buffer_size="--buffer_size 1000"
- fi
-
- # vcf2vcf: transfer into a standardized format
- perl ${vcf2maf_path}/vcf2vcf.pl \
- --input-vcf ${sample_id}.vcf --output-vcf ${basename}.norm.vcf \
- $SAMPLE_vcf2vcf \
- --ref-fasta ${ref_dir}/${fasta}
-
- # VEP annotation
- perl ${vep_path}/vep --format vcf --vcf \
- --assembly ${ncbi_build} \
- --species ${species} \
- --everything --af_exac \
- --offline \
- --cache --dir_cache ${cache} \
- --fasta ${ref_dir}/${fasta} \
- $buffer_size \
- --input_file ${basename}.norm.vcf --output_file ${basename}.vep.vcf
-
- # vcf2maf
- perl ${vcf2maf_path}/vcf2maf.pl \
- --inhibit-vep \
- --input-vcf ${basename}.vep.vcf --output-maf ${basename}.maf \
- $SAMPLE_vcf2maf \
- --ref-fasta ${ref_dir}/${fasta} \
- --ncbi-build ${ncbi_build} \
- --species ${species} \
- --vep-fork $nt
- >>>
-
- runtime {
- docker: docker
- cluster: cluster_config
- systemDisk: "cloud_ssd 40"
- dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
- }
-
- output {
- File norm_vcf = "${basename}.norm.vcf"
- File vep_vcf = "${basename}.vep.vcf"
- File maf = "${basename}.maf"
- }
- }
|