library(vcfR)
##
## ***** *** vcfR *** *****
## This is vcfR 1.13.0
## browseVignettes('vcfR') # Documentation
## citation('vcfR') # Citation
## ***** ***** ***** *****
getwd()
## [1] "/Users/wyattkriebel/Desktop/data sclicer"
You can also embed plots, for example:
list.files(pattern="vcf.gz")
## [1] "13.28080880-28320880.ALL.chr13_GRCh38.genotypes.20170504.vcf.gz"
chrom_13 <- vcfR::read.vcfR("13.28080880-28320880.ALL.chr13_GRCh38.genotypes.20170504.vcf.gz")
## Scanning file to determine attributes.
## File attributes:
## meta lines: 130
## header_line: 131
## variant count: 6932
## column count: 2513
##
Meta line 130 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
## Character matrix gt rows: 6932
## Character matrix gt cols: 2513
## skip: 0
## nrows: 6932
## row_num: 0
##
Processed variant 1000
Processed variant 2000
Processed variant 3000
Processed variant 4000
Processed variant 5000
Processed variant 6000
Processed variant: 6932
## All variants processed
head(chrom_13)
## [1] "***** Object of class 'vcfR' *****"
## [1] "***** Meta section *****"
## [1] "##fileformat=VCFv4.1"
## [1] "##FILTER=<ID=PASS,Description=\"All filters passed\">"
## [1] "##fileDate=20150218"
## [1] "##reference=ftp://ftp.1000genomes.ebi.ac.uk//vol1/ftp/technical/refe [Truncated]"
## [1] "##source=1000GenomesPhase3Pipeline"
## [1] "##contig=<ID=1,assembly=b37,length=249250621>"
## [1] "First 6 rows."
## [1]
## [1] "***** Fixed section *****"
## CHROM POS ID REF ALT QUAL FILTER
## [1,] "13" "28080881" "rs534691938" "G" "C" "100" "PASS"
## [2,] "13" "28080915" "rs9507995" "C" "T" "100" "PASS"
## [3,] "13" "28080935" "rs568036606" "A" "G" "100" "PASS"
## [4,] "13" "28080940" "rs537055761" "A" "G" "100" "PASS"
## [5,] "13" "28080963" "rs9581982" "C" "T" "100" "PASS"
## [6,] "13" "28080964" "rs577055592" "G" "A" "100" "PASS"
## [1]
## [1] "***** Genotype section *****"
## FORMAT HG00096 HG00097 HG00099 HG00100 HG00101
## [1,] "GT" "0|0" "0|0" "0|0" "0|0" "0|0"
## [2,] "GT" "0|0" "0|1" "0|0" "0|0" "0|0"
## [3,] "GT" "0|0" "0|0" "0|0" "0|0" "0|0"
## [4,] "GT" "0|0" "0|0" "0|0" "0|0" "0|0"
## [5,] "GT" "0|0" "0|0" "0|0" "0|0" "0|0"
## [6,] "GT" "0|0" "0|0" "0|0" "0|0" "0|0"
## [1] "First 6 columns only."
## [1]
## [1] "Unique GT formats:"
## [1] "GT"
## [1]
chrom_13[1:10,]
## ***** Object of Class vcfR *****
## 2504 samples
## 1 CHROMs
## 10 variants
## Object size: 0.4 Mb
## 0 percent missing data
## ***** ***** *****