extract_variants_from_vcf | R Documentation |
Aaron - Need to describe differnce between ID, and name in the header, and rename in terms of naming the sample. Need to describe differences in multiallelic choices. Also need to describe the automatic error fixing
extract_variants_from_vcf(
vcf,
id = NULL,
rename = NULL,
sample_field = NULL,
filter = TRUE,
multiallele = c("expand", "exclude"),
extra_fields = NULL
)
vcf |
Location of vcf file |
id |
ID of the sample to select from VCF. If |
rename |
Rename the sample to this value when extracting variants.
If |
sample_field |
Some algoriths will save the name of the
sample in the ##SAMPLE portion of header in the VCF (e.g.
##SAMPLE=<ID=TUMOR,SampleName=TCGA-01-0001>). If the ID is specified via the
|
filter |
Exclude variants that do not have a |
multiallele |
Multialleles are when multiple alternative variants
are listed in the same row in the vcf. One of |
extra_fields |
Optionally extract additional fields from the |
Returns a data.table of variants from a vcf
vcf_file <- system.file("extdata", "public_LUAD_TCGA-97-7938.vcf",
package = "musicatk")
library(VariantAnnotation)
vcf <- readVcf(vcf_file)
variants <- extract_variants_from_vcf(vcf = vcf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.