Question: Depth of coverage
0
gravatar for jaafari.omid
13 months ago by
jaafari.omid50
jaafari.omid50 wrote:

Hello dears all, Excuse me I think I have got stuck in a misunderstanding about depth. Could you please let me know what is the difference among depth of coverage (which we take from each sample using samtools), --minDP in vcftools and also DP in bcftools filter?

Any comment and answer is appreciated already.

Regards, Omid

sequence snp next-gen vcf genome • 445 views
ADD COMMENTlink written 13 months ago by jaafari.omid50

Hello Omid. Did you read the manual entries for these parameters?

Here it is for BCFtools: https://samtools.github.io/bcftools/bcftools.html

ADD REPLYlink written 13 months ago by Kevin Blighe56k

Hello dear Kevin, Yes I have read all it already but still I have some misunderstanding. Actually the DP in bcftools filter is solved but the --minDP option in vcftools is different from the depth out put which we take from samtools per each sample? Let's say I have a sorted.bm file and I use the following command to take the depth of coverage:

  samtools depth a-sort.bam | awk '{sum+=$3;cnt++}END{print sum/cnt" "sum}'

For example for this sample it gives me 1.6x.

Now imagine we are going to do filtering using vcftools by the following command:

vcftools --vcf myfile.vcf --out output_prefix --minDP 3 --recode --recode-INFO-all

So, here the --minDP is conceptually different from the depth of coverage taken from samtools ? I mean the number obtained from samtools is a mean depth for an individual and the --minDP says how many times each SNP should be read to be kept in the final vcf file?

Regards, Omid

ADD REPLYlink modified 13 months ago • written 13 months ago by jaafari.omid50
1

The samtools depth command outputs the read depth at each position. This, on its own, says nothing about depth of coverage. Your AWK command, which comes after the SAMtools command, then calculates the average read depth.

The VCFtools parameter, --minDP 3, will only include variants (in your input VCF) that have a position read depth of greater than (or equal to) 3.

Note that you should be using BCFtools in place of VCFtools.

ADD REPLYlink written 13 months ago by Kevin Blighe56k

Thank you very much for your giving great help and sight view. As last question can you please tell me why I should use

BCFtools

not vcftools?

ADD REPLYlink written 13 months ago by jaafari.omid50

BCFtools is an 'upgrade' to the original VCFtools - it has much broader and more rapid functionality. The new website for VCFtools now even just mentions BCFtools: https://vcftools.github.io/htslib.html

No major issue using VCFtools, however, BCFtools is the program that will be continually updated in the future.

ADD REPLYlink written 13 months ago by Kevin Blighe56k
1

Thank you very much for your kind and helpful answers.

ADD REPLYlink written 13 months ago by jaafari.omid50
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: 1284 users visited in the last hour