# Build temp dir
exampleFolder <- tempdir()
# Generate artificial wig fixed step files with random counts
nbChromosomes <- 1
bin_size <- 200
wigScoresContent <- lapply(as.list(1:nbChromosomes),
function(y) {sample(x=1:20,
size=floor(4333587/bin_size),
replace=TRUE,
prob=NULL)})
names(wigScoresContent) <- 1:nbChromosomes
writeWIG(wigScoresContent,
"wigFileExample",
folder=exampleFolder,
fixedStep=bin_size)
# Define input file
my_wig_file <- "wigFileExample.wig"
# Define the RepeatMasker file
my_repeat_masker_file <- system.file("extdata",
"mm9_RepeatMasker_2000l.txt",
package="Pasha")
## Not run:
# # Launch the script
# result <- WigRepeatAnalyzer(filename=my_wig_file,
# inputFolder=exampleFolder,
# outputFolder=exampleFolder,
# repeatMaskerFilePath=my_repeat_masker_file)
# ## End(Not run)
Run the code above in your browser using DataLab