WigRepeatAnalyzer: WIG Repeat Analyzer

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

Description

This script aims at analyzing the distribution (in coverage and score) of a signal (stored in a WIG file) according to genome repeat annotations.

Usage

1
2
3
4
5
WigRepeatAnalyzer(filename, 
                  inputFolder, 
                  outputFolder="./",
                  repeatMaskerFilePath,
                  isRegex=FALSE) 

Arguments

filename

An atomic character string. The file name of the wig file (fixed step WIG).

inputFolder

An atomic character string. The path to the wig file (fixed step WIG).

outputFolder

An atomic character string. The path to the folder where analysis results must be stored.

repeatMaskerFilePath

An atomic character string. The path to the file containing the repeat annotations (Repeat Masker file).

isRegex

An atomic logical. If TRUE, the filename parameter is interpreted as a regular expression (LC_SYNTAX) and the script will search for a unique file corresponding to the provided regular expression. If no or several file are found, the scripts ends with error.

Details

The script consider the part of the signal contained in the WIG file that fall into repeat annotations provided by user.

This annotation file must formatted as the Repeat Masker annotations file provided by UCSC. The required information are:

The script compute the coverage of each repeat class and family (i.e. the percentage of positions falling into each annotations) and the weight of each class and family (i.e. the percentage of score falling into each annotations). All results are provided as barplots figures and text files.

Value

Barplot figures and text files of raw data for coverage and weight of repeat classes and families.

Author(s)

Lionel Spinelli

See Also

processPipeline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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) 

Pasha documentation built on Jan. 15, 2017, 6:21 p.m.