View Single Post
Old 05-01-2019, 10:22 AM   #9
XeroxHero69
Member
 
Location: USA

Join Date: Apr 2019
Posts: 11
Default

Quote:
Originally Posted by questor2010 View Post
Sure - here's an example:

bcftools view -f PASS --threads 8 -T target.bed -o gnomad.genomes.r2.1.sites.target.vcf.gz -O z gnomad.genomes.r2.1.sites.vcf.bgz

In this case, I'm using a bed file, instead of a single region. It is pulling out the FILTER=PASS variants that intersect the bed file into a new compressed vcf file. The source vcf file in this case is 465GB. If you have a single variant, you could use -t 1:11022. It might be best to specify a short range (1:11015-11030) if you're looking at indels - variant callers represent indels in different ways and you want to be sure you properly intersect them.
Thanks so much. I tried this command:

bcftools view -f PASS --threads 8 -r chr9:55252802-55252802 -o 722g.990.SNP.INDEL.chrAll.vcf.gz -O z 722g.990.SNP.INDEL.chrAll.vcf.gz

and it returned:
[W::hts_idx_load2] The index file is older than the data file: 722g.990.SNP.INDEL.chrAll.vcf.gz.tbi
[W::hts_idx_load2] The index file is older than the data file: 722g.990.SNP.INDEL.chrAll.vcf.gz.tbi
[W::bgzf_read_block] EOF marker is absent. The input is probably truncated

Do you think you could point out what I did wrong?
Edit: I think i see my error, i made it output the data to the same file and now I think i ruined that data file... its only 16.1 kb now

Last edited by XeroxHero69; 05-01-2019 at 10:38 AM.
XeroxHero69 is offline   Reply With Quote