RiboVIEW-package: Visualization, quality control and statistical analysis of...

Description Examples

Description

Tools to visualize ribosome profiling (RiboMine) and to perform robust statistic and quality control of the data (RiboQC). We offer the user a webpage view to scan own data on the following aspects: periodicity, ligation and digestion of footprints; reproducibility and batch effects of replicates; drugs-related artifacts; codon enrichment including variability observed between mRNAs/positions for A, P and E sites; mining of causal or confounding factors.

This is a template workflow corresponding to the package vignette Intro_RiboVIEW.pdf. The package vignette contains additional information such as command results, plots, and explanations. The following R command :

'vignette("Intro_RiboVIEW")'

can be used to display the vignette.

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
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Sequenced reads aligned to mRNA (and containing no rRNA, depleted previously),
#   in bam format
readsBAM.1.1  <- paste(system.file(package="RiboVIEW", mustWork = TRUE), 
                                              "/extdata/Cond1-Rep1.bam",sep="")
readsBAM.1.2  <- paste(system.file(package="RiboVIEW", mustWork = TRUE), 
                                              "/extdata/Cond1-Rep2.bam",sep="")
readsBAM.1.3  <- paste(system.file(package="RiboVIEW", mustWork = TRUE), 
                                              "/extdata/Cond1-Rep3.bam",sep="")
readsBAM.2.1  <- paste(system.file(package="RiboVIEW", mustWork = TRUE), 
                                              "/extdata/Cond2-Rep1.bam",sep="")
readsBAM.2.2  <- paste(system.file(package="RiboVIEW", mustWork = TRUE), 
                                              "/extdata/Cond2-Rep2.bam",sep="")
readsBAM.2.3  <- paste(system.file(package="RiboVIEW", mustWork = TRUE), 
                                              "/extdata/Cond2-Rep3.bam",sep="")

list.bam <- list(readsBAM.1.1, readsBAM.1.2, readsBAM.1.3, 
                 readsBAM.2.1, readsBAM.2.2, readsBAM.2.3)


#
## Experimental conditions, in text and as indicators :
#    0 for control
#    1 for a condition, treatment, case, etc...
#    2, 3, etc. for further conditions

XP.conditions   <- c("cond1","cond1","cond1","cond2", "cond2","cond2")
XP.conditions.i <- c( 1,1,1,2,2,2)
XP.names        <- c("C1.R1", "C1.R2", "C1.R3", 
                     "C2.R1", "C2.R2", "C2.R3")

#
## Reference annotation for mRNAs' CDS.
#

refCDS <- paste(system.file(package="RiboVIEW", mustWork = TRUE), "/extdata/synth.tsv", sep="")
# Note : CDS annotation can be obtained from a GTF file, 
#        using gtf2table(my-gtf-file, outfile = my-cds-file)
#        (for example GTF file as provided by Ensembl.org work well with gtf2table)

#
## Reference sequences for mRNAs.
#

refFASTA <- paste(system.file(package="RiboVIEW", mustWork = TRUE), "/extdata/synth.fasta", sep="")

#
## Work and output folder.
#

pathout  <-  paste(tempdir(),"/", sep="")
  ## !! This is a temporary directory, which will be erased when you leave R !!
  ##   For your own analyses you would probably prefer to point to a permanent repository :
  #      pathout <- /home/me/address-to-my-output-repository/ # Define address, 
  #                                                   #including a final slash.
  #      system(paste('mkdir',pathout)) # Create folder at said address.
  #      setwd(pathout)  # Go to this directory. This is useful if you want to 
  #                                         #save additional tables or figures.

# 
## A-site coverage periodicity by length
#

periodicity(list.bam, refCDS, refFASTA, pathout, XP.names, versionStrip = FALSE)

# 
## Select footprint length with sufficient periodicity
#

attach(listminmax <- select.FPlen(list.bam, pathout, XP.names))

#
## Codon occupancy, codon enrichment.
# 

enrichmentNoccupancy(list.bam, refCDS, refFASTA, mini, maxi, XP.names,  
                       pathout, versionStrip = FALSE)
 
#
## Visualisation.
#

generate.m.s(XP.conditions, XP.names, pathout, B=1000)

visu.m.s.enrichmnt.res <- visu.m.s.enrichmnt(XP.conditions, XP.names, pathout)
visu.m.s.enrichmnt.res

visu.tracks.res <- visu.tracks(XP.conditions, XP.names, pathout, refCDS, 
                               mRNA="random", 
                               codon.labels=FALSE, codon.col="darkslateblue")
visu.tracks.res

Venn.all.res <- Venn.all(XP.names, pathout)
Venn.all.res

enricht.aroundA.res <- enricht.aroundA(XP.conditions, 
  XP.names, pathout)
enricht.aroundA.res


#
## Replicates.
#

repl.correl.counts.Venn.res <- repl.correl.counts.Venn(XP.conditions, XP.names, 
                                                       pathout)
repl.correl.counts.Venn.res

repl.correl.gene.res <- repl.correl.gene(XP.conditions, XP.names, pathout)
repl.correl.gene.res

repl.correl.codon.res <- repl.correl.codon(list.bam, refCDS, refFASTA, 
                                           mini, maxi, 
                                           XP.names, XP.conditions, pathout)
repl.correl.codon.res

repl.correl.heatmap.res <- repl.correl.heatmap(XP.conditions.i, XP.names, pathout)
repl.correl.heatmap.res

#
## Potential artefacts due to Cycloheximide or other drugs
#

chx.artefacts.res <- chx.artefacts(XP.conditions, XP.names, pathout)
chx.artefacts.res

#
## Nucleotide and codon frequency at footprint boundaries.
#

ntcodon.freq.nt.res <- ntcodon.freq.nt(XP.conditions, XP.names, pathout)
ntcodon.freq.nt.res

ntcodon.freq.cod.res <- ntcodon.freq.cod(XP.conditions, XP.names, pathout)
ntcodon.freq.cod.res

#
## Batch effects
#

batch.effects.lm.e.res <- batch.effects.lm.e(XP.conditions, XP.names, pathout)
batch.effects.lm.e.res

batch.effects.pca.res <- batch.effects.pca(XP.conditions, XP.names, pathout)
batch.effects.pca.res

#
## Metagene
#

metagene.res <- metagene.all(XP.conditions, XP.names, pathout) 

##   Efficacy of monosome selection

metagene.monosome.res <- metagene.res[[1]]
metagene.monosome.res

##   Inflation of CDS-start codons coverage

metagene.inflation.res <- metagene.res[[2]]
metagene.inflation.res

##   Leakage of start and stop codons,

metagene.leakage.res <- metagene.res[[3]]
metagene.leakage.res

#
## Output Page in Html, readable in firefox, brave, chrome, safari or internet explorer.
#

outputQc(pathout, XP.conditions)

outputMine(pathout, XP.conditions)

carinelegrand/RiboVIEW documentation built on July 17, 2020, 3:02 p.m.