Script to annotate genetic variants from VCF file.
This script first takes a .vcf file and converts it a GRanges data object. It then creates a separate data frame of annotations including the depth of sequence coverage, variant type, alternate allele frequency, and a few others. Lastly, it saves this annotation data frame as a .csv file in the working directory.
var.type
andvar.effect
columnsdepth
columnvar.num
columnpercent.var
andpercent.ref
columns- not completed
perc.ref.for
- Make sure you have the following packages installed from CRAN or Bioconductor.
BiocManager::install("VariantAnnotation")
install.packages("here")
BiocManager::install("BSgenome.Hsapiens.UCSC.hg19")
BiocManager::install("TxDb.Hsapiens.UCSC.hg19.knownGen")
- No installation necessary
- Create a directory that contains the script and the VCF data file.
- Open R from that directory.
- Simply run script from top to bottom.
Contact the Author.
ex. Abby Spangler
ex. LinkedIn
Inspiration, most helpful packages, etc.
Thank you for interviewing me, Tempus!