Skip to content

Instantly share code, notes, and snippets.

@sephraim
Created March 28, 2017 22:02
Show Gist options
  • Save sephraim/3d352ba4893df07a2c35d8f227ab17ac to your computer and use it in GitHub Desktop.
Save sephraim/3d352ba4893df07a2c35d8f227ab17ac to your computer and use it in GitHub Desktop.
Import VCF file into data frame in R
library(vcfR)
# Import VCF
my.vcf <- read.vcfR('my.vcf.gz')
# Combine CHROM thru FILTER cols + INFO cols
my.vcf.df <- cbind(as.data.frame(getFIX(my.vcf)), INFO2df(my.vcf))
@ale07alvarez
Copy link

This did not work for me

Error in .setupMethodsTables(fdef, initialize = TRUE) :
no slot of name "group" for this object of class "derivedDefaultMethod"

@cjgunase
Copy link

it worked perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment