VariantAnnotation package, subseting vcfs on fixed fields
2
0
Entering edit mode
Anna N. • 0
@anna-n-6889
Last seen 9.9 years ago
France

Hello

I have a large vcf file and I would like to keep only the pass entries in the filter column.

Is there a way to do this with Variant Annotation?

I know that we can subset on the fields
eg

## Subset on 'fixed', 'info' or 'geno' fields:
  param <- ScanVcfParam(fixed="ALT", geno=c("GT", "HQ"), info=c("NS", "AF"))
  vcf_tab <- readVcf(tab, "hg19", param)

 

but can we further select entries within these fields?

 

Thank you in advance
Anna

variantannotation vcf fixed filter • 1.5k views
ADD COMMENT
3
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States

Hi Anna,

You can filter on field values with filterVcf(). This function outputs another VCF file which you can then read in with readVcf().

Examples of how to construct the filters are on the man page,

?filterVcf

and in the 'filterVcf Overview' vignette,

browseVignettes("VariantAnnotation").

 

Valerie

ADD COMMENT
0
Entering edit mode
Anna N. • 0
@anna-n-6889
Last seen 9.9 years ago
France

much obliged!

I can filter my vcfs using other tools, but I would prefer to have a full pipeline using VariantAnnotation.
 

Anna

ADD COMMENT

Login before adding your answer.

Traffic: 641 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6