R/wrapperFunctions_homer.R
homer_peaks.Rd
Wrapper function for Homer's makeTagDirectory and findPeaks
homer_peaks(
fileTofqs,
maketagdir = "makeTagDirectory",
findpeaks = "findPeaks",
format = "bed",
createSingleTagsTSV = TRUE,
tagdir = file.path(dirname(fileTofqs), gsub("\\.bed", "",
make.names(basename(fileTofqs)))),
style = "factor",
foldEnrichmentOverLocal = 2,
localSize = 10000,
strand = "seperate",
minDist = 50,
size = 10,
fragLength = 10,
genomeSize = NULL,
stderr = file.path(dirname(fileTofqs), paste0(basename(fileTofqs),
"_homer_stderr.txt")),
stdout = file.path(dirname(fileTofqs), paste0(basename(fileTofqs),
"_homer_stderr.txt")),
useClipRConda = ifelse(is.null(getOption("CLIPflexR.condaEnv")), FALSE, TRUE),
additional_Args = NULL,
verbose = FALSE,
writelog = T
)
path to file to process (BED).
path to makeTagDirectory from Homer toolkit.
path to findpeaks from Homer toolkit.
input format, "bed" (default).
create a single tags.tsv file for all "chromosomes".
name of Tag Directory.
type of Homer peak calling, "factor", "histone", "groseq", "tss", "dnase", "super" or "mCs".
fold enrichment over local tag count.
region to check for local tag enrichment.
find peaks using tags on "both" or "separate" (default) strands.
minimum distance between peaks.
peak size.
approximate fragment length.
genome size, default is NULL (2E9, applicable for human or mouse), set integer to specify for your genome.
path to stderr file.
path to stdout file.
use conda environment installed by Herper, TRUE (default) or FALSE.
additional arguments to be passed to system call.
print messages, TRUE or FALSE (default).
write stderr/stdout logs, TRUE (default) or FALSE.
path to unzipped file
if (FALSE) {
testFasta <- system.file("extdata/hg19Small.fa",package = "CLIPflexR")
myIndex <-suppressWarnings(bowtie2_index(testFasta, overwrite = TRUE))
testFQ <- system.file("extdata/Fox3_Std_small.fq.gz",package = "CLIPflexR")
FqFile <- decompress(testFQ,overwrite = TRUE)
FqFile_QF <- fastq_quality_filter(FqFile)
FqFile_QFCollapsed <- fastx_collapser(FqFile_QF)
FqFile_QFColStripped <- ctk_stripBarcode(FqFile_QFCollapsed)
FqFile_QFColStpClipped <- fastx_clipper(FqFile_QFColStripped)
bam <- suppressWarnings(bowtie_align(FqFile_QFColStpClipped,myIndex, overwrite = TRUE))
bed <- bamtobed(bam)
homer_peaks(bed)
}