This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Subset a Vcf

I need to decorticate the #CHROM and #POS of a vcf, ie. to change them with new fields. I think I can arrange it on R.

But, before that, I must filter 500 variants out of 46K.

Some are just contigs, others are POS within a contig which don't suit our expectation. I have an idea of using vcftool for the latter task, but the panoply of commands (ancd required inputs) confuses me.

Can someone please shed me a light?

vcf vcftools

VCFtools sounds like a good approach. Can you clarify what filtering conditions you are looking to apply for the 500 variants you are interested in?

Simply the names of the #CHROM. They don't appear in the results of a BLAST. Same for some POS: some CHROM have POS which were not retrieved by BLAST.

Also, is there a way to do it on R?

what's the relation of a VCF with BLAST ? why don't you talk about BLAST in your initial question ? How can we know ??

enter image description here

The contigs-containing variants were BLASTed, sic simpliciter.

Some gave hits, some not.

Then I made some further filtering analyses based on the quality of the alignment.

others are POS within a contig which don't suit our expectation.

that's not clear. show us an example.

CHROM 4920 has four variants: 456, 567, 678, 898:

CHROM_4920 _456 was retrieved by BLAST

CHROM_4920 _567 was not retrieved by BLAST

CHROM_4920 _678 was retrieved by BLAST

CHROM_4920 _898 was retrieved by BLAST

0 answers

No answers yet.

Log in to answer this question.