Learn R Programming

REDseq (version 1.18.0)

writeHits: write the hits of pattern search to a bed file

Description

write the hits of pattern search to a bed file, internal function used by searchPattern

Usage

writeHits(seqname, matches, strand, file = "", append = FALSE)

Arguments

seqname
Chromosome name
matches
XStringViews object storing matched chromosome locations
strand
strand of the match
file
file path where the hits is written to
append
TRUE if append to existing file, false if start a new file

Value

results are saved in the file specified by outfile

References

http://bioconductor.org/packages/2.8/bioc/vignettes/BSgenome/inst/doc/GenomeSearching.pdf

See Also

searchPattern, buildREmap

Examples

Run this code
	library(REDseq)
	x <- DNAString("AAGCGCGATATG")
	m <- matchPattern("GCGC", x)
	REDseq:::writeHits(seqname="chr1", m, strand="+",file="exampleWriteHits.bed", append=FALSE)

Run the code above in your browser using DataLab