how to import/read .vcf files in R
1
1
Entering edit mode
anamarija ▴ 10
@anamarija-22787
Last seen 16 months ago

Hello,

I tried doing:

> library(vcfR)
> vcf <- read.vcfR("ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf", verbose = FALSE )


but this takes forever to load and I am not sure it is even working.

Any other suggestion on how I can read in .vcf file in R?

I intend to create covariance matrix file from this data.

Thanks

vcf • 720 views
ADD COMMENT
1
Entering edit mode
@martin-morgan-1513
Last seen 8 days ago
United States

The relevant Bioconductor packages might include VariantAnnotation and VariantFiltering depending on use case, which it would be helpful for you to present. If the VCF file is large (sounds like it is) then you'll either want to process the file by iterating through it, or by querying for ranges of interest (using VcfParam()). Both of these approaches are discussed in the VariantAnnotation vignettes here and here.

ADD COMMENT
0
Entering edit mode

Hi,

thanks for getting back to me. I intend to create covariance matrix file but I also have to account for population and relatedness in files which I downloaded from here: ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/. Taken that in account which software you would use for this purpose?

ADD REPLY

Login before adding your answer.

Traffic: 288 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