Question: MIN and MAX read depth for vcfutils.pl
0
gravatar for nickmarinakis92
2.7 years ago by
nickmarinakis920 wrote:

I am trying to filter vcf files for Whole Exome Sequencing and I want to know what value is the minimum and maximum depth and how can I calculate.

sequencing alignment next-gen • 927 views
ADD COMMENTlink modified 2.7 years ago by Pierre Lindenbaum124k • written 2.7 years ago by nickmarinakis920
1
gravatar for Pierre Lindenbaum
2.7 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

using bioalcidae:

 java -jar dist/bioalcidae.jar -e 'var m=null,M=null;while(iter.hasNext()) {var ctx=iter.next();if(!ctx.hasAttribute("DP")) continue; var dp= ctx.getAttributeAsInt("DP",-1);if(m==null || m> dp) m=dp; if(M==null||M<dp) M=dp;} out.println("min "+m+" max "+M);'  input.vcf.gz

using std linux:

$ gunzip -c input.vcf.gz | grep -v "#" | cut -f 8 | tr ";" "\n" | grep 'DP=' | cut -c 4- | sort -n | tail -1

$ gunzip -c input.vcf.gz | grep -v "#" | cut -f 8 | tr ";" "\n" | grep 'DP=' | cut -c 4- | sort -n | head -n 1

or even:

$ gunzip -c input.vcf.gz | grep -v "#" | cut -f 8 | tr ";" "\n" | grep 'DP=' | cut -c 4- | sort -n | tee >(head -n 1) >(tail -1) > /dev/null
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by Pierre Lindenbaum124k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2103 users visited in the last hour