This is a test version of Biostars. For the public version, visit https://www.biostars.org.
VCF filter by read depth

Hi all

I would like to inquire about a question regarding VCF file. The information said that the VCF file is text file, and it can be opened on PC using Notepad. However, when I tried to use Notepad to open it, there are a lot of garbled information. I would like to inquire what cause this. Additionally, the approach of the VCF file is from the storage drive, and I would like to inquire whether it causes this troubleshooting. I greatly appreciate your help.

vcf

The information said that the VCF file is text file, and it can be opened on PC using Notepad.

First part is right, second part is a bad idea. Use notepad++ if you have to, but opening a VCF file (especially one that >10MB) on a PC takes a LOT of RAM.

when I tried to use Notepad to open it, there are a lot of garbled information

Are you sure you're trying to open a VCF file and not a vcf.gz file? It's either that or a valid VCF looks garbled to you as someone new to the format. Please read the VCF spec document to know what to expect.

Hang on, your title says you wish to filter VCF by read depth but your post looks like written by someone who doesn't know VCF files. What's happening here?

I apologize for any inconvenience. I would like to inquire whether it is possible to know the read depth of coverage and the base from the VCF file. I greatly appreciate your help.

It's no inconvenience, I was just clarifying what your goal is here. You can use bcftools view to filter using read-depth. You should use either -i 'INFO/DP > least_depth' or -e 'INFO/DP < =least_depth' where least_depth is the lowest allowable depth.

0 answers

No answers yet.

Log in to answer this question.