Biostar Beta. Not for public use.
Question: Depth of coverage
0
Entering edit mode

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

Entering edit mode
0

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 11 months ago
Kevin Blighe
43k
Entering edit mode
0

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 11 months ago
jaafari.omid
• 40
Entering edit mode
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 11 months ago
Kevin Blighe
43k
Entering edit mode
0

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 11 months ago
jaafari.omid
• 40
Entering edit mode
0

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 11 months ago
Kevin Blighe
43k
Entering edit mode
1

Thank you very much for your kind and helpful answers.

ADD REPLYlink 11 months ago
jaafari.omid
• 40

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0