Thanks Pierre, I will try that. Do you think the above threshold can replace the filtering function from picard :
java -jar $picardTool FilterVcf \
-I input.vcf \
-O output.vcf \
--MIN_DP 50
for the second part of my question, how should I do this filtering? I tried using the code below
wget -O - "http://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_43/gencode.v43.annotation.gtf.gz" |\
gunzip -c | grep 'transcript_type "protein_coding"' |\
awk '($3=="exon") {printf("%s\t%s\t%s\n",$1,int($4)-1,$5);}' |\
sort -T . -t $'\t' -k1,1 -k2,2n | bedtools merge > coding.regions.hg38.bed
replacing 'transcript_type "protein_coding"' with 'exon "transcript"' but it didnt work. Do you think the above code will output the coding region wwithout specifying the exon/transcripts?