Description Usage Arguments Value Examples
View source: R/createMetageneProfile.R
Metagene plots show the signal enrichment around a region of interest like the TSS or over a predefined set of genes. The tag density of the immunoprecipitation is taken over all RefSeg annotated human genes, averaged and log2 transformed. The same is done for the input. The normalized profile is calculated as the signal enrichment (immunoprecipitation over the input). Two objects are created: a non-scaled profile for the TSS and TES, and a scaled profile for the entire gene, including the gene body. The non-scaled profile is constructed around the TSS/TES, with 2KB up- and downstream regions respectively.
CreateMetageneProfile
1 2 3 4 5 6 7 8 9 10 | createMetageneProfile(
selectedTagsChip,
selectedTagsInput,
smoothed.densityChip = NULL,
smoothed.densityInput = NULL,
tag.shift,
annotationID,
debug = FALSE,
mc = 1
)
|
selectedTagsChip |
Data-structure with selected tag information for ChIP (returned by qualityScores_EM). |
selectedTagsInput |
Data-structure with selected tag information for Input (returned by qualityScores_EM) |
smoothed.densityChip |
Optional, output of tagDensity on the ChIP taglist object. It is just used as part of the ChIC_wrapper workflow to skip the call to tagDensity function as it is already performed in the qualityScores_GM function. |
smoothed.densityInput |
Optional, output of tagDensity on the Input taglist object. It is just used as part of the ChIC_wrapper workflow to skip the call to tagDensity function as it is already performed in the qualityScores_GM function. |
tag.shift |
Integer containing the value of the tag shif, calculated by getCrossCorrelationScores() |
annotationID |
String indicating the genome assembly |
debug |
Boolean, to enter debugging mode. Intermediate files are saved in working directory |
mc |
Integer, the number of CPUs for parallelization (default=1) |
list with 3 objects: scaled profile ("geneBody"), non-scaled profile for TSS (TSS) and TES (TES). Each object is made of a list containing the chip and the input profile
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ## This command is time intensive to run
##
## To run the example code the user must provide two bam files for the ChIP
## and the input and read them with the readBamFile() function. To make it
## easier for the user to run the example code we provide tow bam examples
## (chip and input) in our ChIC.data package that have already been loaded
##with the readBamFile() function.
mc=4
finalTagShift=98
## Not run:
filepath=tempdir()
setwd(filepath)
data("chipSubset", package = "ChIC.data", envir = environment())
chipBam=chipSubset
data("inputSubset", package = "ChIC.data", envir = environment())
inputBam=inputSubset
## calculate binding characteristics
chip_binding.characteristics<-spp::get.binding.characteristics(
chipBam, srange=c(0,500), bin=5,accept.all.tags=TRUE)
input_binding.characteristics<-spp::get.binding.characteristics(
inputBam, srange=c(0,500), bin=5,accept.all.tags=TRUE)
##get chromosome information and order chip and input by it
chrl_final=intersect(names(chipBam$tags),names(inputBam$tags))
chipBam$tags=chipBam$tags[chrl_final]
chipBam$quality=chipBam$quality[chrl_final]
inputBam$tags=inputBam$tags[chrl_final]
inputBam$quality=inputBam$quality[chrl_final]
##remove sigular positions with extremely high read counts with
##respect to the neighbourhood
selectedTags=removeLocalTagAnomalies(chipBam, inputBam,
chip_binding.characteristics, input_binding.characteristics)
inputBamSelected=selectedTags$input.dataSelected
chipBamSelected=selectedTags$chip.dataSelected
##smooth input and chip tags
smoothedChip <- tagDensity(chipBamSelected,
tag.shift = finalTagShift, mc = mc)
smoothedInput <- tagDensity(inputBamSelected,
tag.shift = finalTagShift, mc = mc)
##calculate metagene profiles
Meta_Result <- createMetageneProfile(
smoothed.densityChip = smoothedChip,
smoothed.densityInput = smoothedInput,
tag.shift = finalTagShift, mc = mc)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.