Learn R Programming

bedr (version 1.1.3)

is.valid.ref: verifies the reference sequence in a vcf

Description

verifies the reference sequence in a vcf

Usage

is.valid.ref(
	x,
	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

Arguments

x

input bed object

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

Examples

Run this code
	if (FALSE) {
		vcf.path <- system.file("data/callerA.vcf.gz", package = "bedr");
		vcf.data <- read.vcf(vcf.path, split.info = TRUE);
		vcf.data$vcf <- vcf.data$vcf[, 
			c("CHROM", "POS", "END", 
			setdiff(colnames(vcf.data$vcf), 
			c("CHROM", "POS", "END")))
			];
		vcf.data$vcf$CHROM <- paste("chr", vcf.data$vcf$CHROM, sep = "");

		# need reference sequence FASTA and index file to run this, as 'fasta' parameter
		is.valid.ref(vcf.data);
	}

Run the code above in your browser using DataLab