View source: R/construct_query.R
construct_query | R Documentation |
Convert a data.table containing variant-level summary statistics into a GRanges object to be used for querying tabix-indexed files. Depending on the parameters supplied, the resulting GRanges object can contain one or more ranges, across one or more chromosomes.
construct_query(
query_chrom = NULL,
query_start_pos = NULL,
query_end_pos = query_start_pos,
query_dat = NULL,
query_chrom_col = "CHR",
query_start_col = "POS",
query_end_col = query_start_col,
query_snp_col = "SNP",
standardise_colnames = FALSE,
as_blocks = TRUE,
style = c("NCBI", "UCSC"),
samples = character(),
as_string = FALSE,
verbose = TRUE
)
query_chrom |
Which chromosome to query (e.g. 1 or "chr1"). |
query_start_pos |
The first position to query. |
query_end_pos |
The last position to query. |
query_dat |
Variant-level summary statistics. |
query_chrom_col |
Name of the chromosome column in
|
query_start_col |
Name of the starting genomic position
column in |
query_end_col |
Name of the ending genomic position
column in |
query_snp_col |
Name of the RSID or variant ID column (e.g. "SNP"). |
standardise_colnames |
Automatically rename all columns to a standard nomenclature using standardise_header. |
as_blocks |
If |
style |
Style to return GRanges in:
Uses seqlevelsStyle. |
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. |
as_string |
Convert a GRanges object
to a concatenated string of coordinates
(e.g. "chr4:70000-90000,chr10:200-150001").
This can be used for specifying
which regions you want to query (e.g. when using |
verbose |
Print messages. |
GRanges or ScanVcfParam object.
If you supply the Set 1 of parameters, you do not need to supply the Set 2 parameters (and vice versa). Extra Parameters apply to both Set 1 and Set 2.
Set 1:
query_chrom
, query_start_pos
, query_end_pos
Set 2:
query_dat
, query_chrom_col
,
query_start_col
, query_end_col
, as_blocks
Extra Parameters:
style
, samples
, as_string
, verbose
gr <- echotabix::construct_query(query_dat=echodata::BST1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.