query_vcf | R Documentation |
Query a Variant Call Format (VCF) file. The VCF file can be either local or remote.
query_vcf(
target_path,
target_index = paste0(target_path, ".tbi"),
target_genome = "GRCh37",
query_granges,
samples = character(),
method = c("variantannotation", "conda", "rtracklayer", "seqminer"),
overlapping_only = FALSE,
query_save = TRUE,
save_path = construct_vcf_path(target_path = target_path, query_granges =
query_granges),
force_new = FALSE,
as_datatable = FALSE,
cleanup_tbi = TRUE,
conda_env = "echoR_mini",
verbose = TRUE
)
target_path |
Path to local VCF file or remote URL. |
target_index |
Tabix index file for |
target_genome |
Genome build of the VCF file. |
query_granges |
GRanges object
to be used for querying the |
samples |
[Optional] Sample names to subset the VCF by. If this option is used, the GRanges object will be converted to a ScanVcfParam for usage by readVcf. |
method |
Method to query VCF with. |
overlapping_only |
Remove variants that do not overlap with the
positions in |
query_save |
Whether to save the results of the query on disk. Note: Writing to disk can take some time. |
save_path |
File path to save query subset to (as VCF). |
force_new |
Force the creation of a new VCF subset file even if one exists. |
as_datatable |
Return the VCF subset
file as a data.table
(using vcf_to_dt).
If |
cleanup_tbi |
Remove local copies of tabix index file (.tbi) after completing queries. |
conda_env |
Conda environments to search in.
If |
verbose |
Print messages. |
VCF object,
or data.table (when as_datatable=TRUE
).
Other tabix functions:
construct_tabix_path()
,
construct_vcf_path()
,
convert()
,
index
,
query_table()
,
read_bgz()
,
run_bgzip()
query_dat <- echodata::BST1
target_path <- system.file("extdata", "BST1.1KGphase3.vcf.bgz",
package = "echodata")
#### Import ####
vcf <- query_vcf(
query_granges = query_dat,
target_path = target_path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.