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

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/writeHits.R

Description

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

Usage

1
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

Author(s)

Lihua Julie Zhu

References

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

See Also

searchPattern, buildREmap

Examples

1
2
3
4
	library(REDseq)
	x <- DNAString("AAGCGCGATATG")
	m <- matchPattern("GCGC", x)
	REDseq:::writeHits(seqname="chr1", m, strand="+",file="exampleWriteHits.bed", append=FALSE)

REDseq documentation built on Nov. 8, 2020, 8:19 p.m.