Learn R Programming

bedr (version 1.0.7)

is.valid.seq: verifies that sequences are correct given coordinates and a reference

Description

verifies that sequences are correct given coordinates and a reference

Usage

is.valid.seq(
	x,
	querySeq,
	fasta = NULL,
	strand = FALSE,
	check.zero.based = TRUE,
	check.chr = TRUE,
	check.valid = TRUE,
	check.sort = TRUE,
	check.merge = TRUE,
	verbose = TRUE
	)

Value

a logical vector the length of the input querySeq

Arguments

x

input bed object

querySeq

a vector of sequences the same length as x

fasta

a reference build in fasta format

strand

should strand be used. if reverse then the sequence will be reverse complemented

check.zero.based

should 0 based coordinates be checked

check.chr

should chr prefix be checked

check.valid

should the region be checkded for integerity

check.sort

should regions be checked for sort order

check.merge

should overlapping regions be checked

verbose

should log messages and checking take place

Author

Daryl Waggott, Syed Haider

Examples

Run this code
if (check.binary("bedtools")) {
  index <- get.example.regions();
  a <- index[[1]];
  a <- get.fasta(bedr.sort.region(a));
  is.valid.seq(x = a, querySeq = a$sequence);
}

Run the code above in your browser using DataLab