Skip to contents

Finds nucleotides up and downstream of a variant within a genome

Usage

querySeqs(x, up, down, bs_genome_obj, variant = TRUE, allele = NULL)

Arguments

x

A VRanges or GRanges object with one or more variants. seqnames and ranges fields are required.

up

Numeric, number of bases to return upstream of variant

down

Numeric, number of bases to return downstream of variant

bs_genome_obj

A BSgenome object for the genome build to use.

variant

Boolean to indicate whether the provided query is a variant or a single position.

allele

If providing a GRanges object, can optionally provide an allele to score for the indicated range. Otherwise, will query the BSgenome object for the sequence at the indicated genomic position in x.

Value

a named nested list withupstream, downstream, ref_seq, and alt_seq fields when x is a VRanges object or just upstream, downstream, and seq if x is a GRanges object.