predictionScore: Predict score

Description Usage Arguments Value Examples

View source: R/ComparisonFunctions.R

Description

predictionScore

Usage

1
2
predictionScore(target, features_cc, features_global, features_TSS,
    features_TES, features_scaled)

Arguments

target

String, chromatin mark or transcription factor to be analysed. Use listAvailableElements() function to check availability. If the specific transcription factor is not available the keyword "TF" can be used to call the TF-model.

features_cc

list, with QC-metrics returned from qualityScores_EM()

features_global

list, list with QC-metrics returned from qualityScores_GM()

features_TSS

list, list with QC-metrics returned from qualityScores_LM() with option TSS

features_TES

list, list with QC-metrics returned from qualityScores_LM() with option TES

features_scaled

list, list with QC-metrics returned from qualityScores_LMgenebody()

Value

prediction

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## To execute this command the user has to run the entire pipeline
## (time intensive to run)

## To run this example code the user MUST provide 2 bam files: one for ChIP 
## and one for the input". Here we used ChIP-seq data from ENCODE. Two 
## example files can be downloaded using the following link:
## https://www.encodeproject.org/files/ENCFF000BFX/
## https://www.encodeproject.org/files/ENCFF000BDQ/
## and save them in the working directory (here given in the temporary 
## directory "filepath"

mc=4

## Not run: 
filepath=tempdir()
setwd(filepath)

system("wget 
https://www.encodeproject.org/files/ENCFF000BFX/@@download/ENCFF000BFX.bam")

system("wget 
https://www.encodeproject.org/files/ENCFF000BDQ/@@download/ENCFF000BDQ.bam")

chipName=file.path(filepath,"ENCFF000BFX")
inputName=file.path(filepath,"ENCFF000BDQ")

CC_Result=qualityScores_EM(chipName=chipName, inputName=inputName, 
read_length=36, mc=mc,savePlotPath=filepath)

##save tag.shift value
finalTagShift=CC_Result$QCscores_ChIP$tag.shift

##save the smooted profile
smoothedDensityInput=CC_Result$TagDensityInput
smoothedDensityChip=CC_Result$TagDensityChip

##caluclate GM QC-metrics
Ch_Results=qualityScores_GM(densityChip=smoothedDensityChip,
densityInput=smoothedDensityInput,savePlotPath=filepath)

##caluclate metagene profiles
Meta_Result=createMetageneProfile(smoothedDensityChip,smoothedDensityInput,
finalTagShift,annotationID="hg19",mc=mc)

##get LM QC-values
TSSProfile=qualityScores_LM(Meta_Result$TSS,tag="TSS",savePlotPath=filepath)
TESProfile=qualityScores_LM(Meta_Result$TES,tag="TES",savePlotPath=filepath)
geneBody_Plot=qualityScores_LMgenebody(Meta_Result$geneBody, 
savePlotPath=filepath)

##Finally use all calculated QC-metrics to predict the final score
##example for chromatin mark H3K4me3
predictionScore(target="H3K4me3", features_cc=CC_Result,
features_global=Ch_Results,features_TSS=TSSProfile, features_TES=TESProfile,
features_scaled=geneBody_Plot)

##example for TF not available in compendium
predictionScore(target="TF", features_cc=CC_Result,
features_global=Ch_Results,features_TSS=TSSProfile, features_TES=TESProfile,
features_scaled=geneBody_Plot)

##example for CTCF
predictionScore(target="CTCF", features_cc=CC_Result,
features_global=Ch_Results,features_TSS=TSSProfile, features_TES=TESProfile,
features_scaled=geneBody_Plot)

## End(Not run)

ChIC documentation built on Nov. 1, 2018, 2:25 a.m.