Statistiques
| Branche: | Révision :

root / doc / sphinx_doc / rref.rst @ 9fdbfada

Historique | Voir | Annoter | Télécharger (28,19 ko)

1 1d833b97 Florent Chuffart
Arabic to Roman pair list.
2 1d833b97 Florent Chuffart
--------------------------
3 1d833b97 Florent Chuffart
4 1d833b97 Florent Chuffart
Description
5 1d833b97 Florent Chuffart
~~~~~~~~~~~
6 1d833b97 Florent Chuffart
7 1d833b97 Florent Chuffart
Util to convert Arabicto Roman
8 1d833b97 Florent Chuffart
9 1d833b97 Florent Chuffart
Usage
10 1d833b97 Florent Chuffart
~~~~~
11 1d833b97 Florent Chuffart
12 1d833b97 Florent Chuffart
::
13 1d833b97 Florent Chuffart
14 1d833b97 Florent Chuffart
    ARAB2ROM()
15 1d833b97 Florent Chuffart
16 1d833b97 Florent Chuffart
Author(s)
17 1d833b97 Florent Chuffart
~~~~~~~~~
18 1d833b97 Florent Chuffart
19 1d833b97 Florent Chuffart
Florent Chuffart
20 1d833b97 Florent Chuffart
21 1d833b97 Florent Chuffart
R: False Discovery Rate
22 1d833b97 Florent Chuffart
23 935a568c Florent Chuffart
False Discovery Rate
24 935a568c Florent Chuffart
--------------------
25 935a568c Florent Chuffart
26 935a568c Florent Chuffart
Description
27 935a568c Florent Chuffart
~~~~~~~~~~~
28 935a568c Florent Chuffart
29 935a568c Florent Chuffart
From a vector x of independent p-values, extract the cutoff
30 935a568c Florent Chuffart
corresponding to the specified FDR. See Benjamini & Hochberg 1995 paper
31 935a568c Florent Chuffart
32 935a568c Florent Chuffart
Usage
33 935a568c Florent Chuffart
~~~~~
34 935a568c Florent Chuffart
35 935a568c Florent Chuffart
::
36 935a568c Florent Chuffart
37 935a568c Florent Chuffart
    FDR(x, FDR)
38 935a568c Florent Chuffart
39 935a568c Florent Chuffart
Arguments
40 935a568c Florent Chuffart
~~~~~~~~~
41 935a568c Florent Chuffart
42 935a568c Florent Chuffart
``x``
43 935a568c Florent Chuffart
44 935a568c Florent Chuffart
A vector x of independent p-values.
45 935a568c Florent Chuffart
46 935a568c Florent Chuffart
``FDR``
47 935a568c Florent Chuffart
48 935a568c Florent Chuffart
The specified FDR.
49 935a568c Florent Chuffart
50 935a568c Florent Chuffart
Value
51 935a568c Florent Chuffart
~~~~~
52 935a568c Florent Chuffart
53 935a568c Florent Chuffart
Return the the corresponding cutoff.
54 935a568c Florent Chuffart
55 935a568c Florent Chuffart
Author(s)
56 935a568c Florent Chuffart
~~~~~~~~~
57 935a568c Florent Chuffart
58 935a568c Florent Chuffart
Gael Yvert, Florent Chuffart
59 935a568c Florent Chuffart
60 935a568c Florent Chuffart
Examples
61 935a568c Florent Chuffart
~~~~~~~~
62 935a568c Florent Chuffart
63 935a568c Florent Chuffart
::
64 935a568c Florent Chuffart
65 935a568c Florent Chuffart
    print("example")
66 935a568c Florent Chuffart
67 1d833b97 Florent Chuffart
R: Roman to Arabic pair list.
68 1d833b97 Florent Chuffart
69 1d833b97 Florent Chuffart
Roman to Arabic pair list.
70 1d833b97 Florent Chuffart
--------------------------
71 1d833b97 Florent Chuffart
72 1d833b97 Florent Chuffart
Description
73 1d833b97 Florent Chuffart
~~~~~~~~~~~
74 1d833b97 Florent Chuffart
75 1d833b97 Florent Chuffart
Util to convert Roman to Arabic
76 1d833b97 Florent Chuffart
77 1d833b97 Florent Chuffart
Usage
78 1d833b97 Florent Chuffart
~~~~~
79 1d833b97 Florent Chuffart
80 1d833b97 Florent Chuffart
::
81 1d833b97 Florent Chuffart
82 1d833b97 Florent Chuffart
    ROM2ARAB()
83 1d833b97 Florent Chuffart
84 1d833b97 Florent Chuffart
Author(s)
85 1d833b97 Florent Chuffart
~~~~~~~~~
86 1d833b97 Florent Chuffart
87 1d833b97 Florent Chuffart
Florent Chuffart
88 1d833b97 Florent Chuffart
89 935a568c Florent Chuffart
R: Aggregate replicated sample's nucleosomes.
90 935a568c Florent Chuffart
91 935a568c Florent Chuffart
Aggregate replicated sample's nucleosomes.
92 935a568c Florent Chuffart
------------------------------------------
93 935a568c Florent Chuffart
94 935a568c Florent Chuffart
Description
95 935a568c Florent Chuffart
~~~~~~~~~~~
96 935a568c Florent Chuffart
97 935a568c Florent Chuffart
This function aggregates nucleosome for replicated samples. It uses
98 935a568c Florent Chuffart
TemplateFilter ouput of each sample as replicate. Each sample owns a set
99 935a568c Florent Chuffart
of nucleosomes computed using TemplateFilter and ordered by the position
100 935a568c Florent Chuffart
of their center. Adajacent nucleosomes are compared two by two.
101 935a568c Florent Chuffart
Comparison is based on a log likelihood ratio score. The issue of
102 935a568c Florent Chuffart
comparison is adjacents nucleosomes merge or separation. Finally the
103 935a568c Florent Chuffart
function returns a list of clusters and all computed *lod\_scores*. Each
104 935a568c Florent Chuffart
cluster ows an attribute *wp* for "well positionned". This attribute is
105 935a568c Florent Chuffart
set as *TRUE* if the cluster is composed of exactly one nucleosomes of
106 935a568c Florent Chuffart
each sample.
107 935a568c Florent Chuffart
108 935a568c Florent Chuffart
Usage
109 935a568c Florent Chuffart
~~~~~
110 935a568c Florent Chuffart
111 935a568c Florent Chuffart
::
112 935a568c Florent Chuffart
113 729c934e Florent Chuffart
    aggregate_intra_strain_nucs(samples, lod_thres = 20, coord_max = 2e+07)
114 935a568c Florent Chuffart
115 935a568c Florent Chuffart
Arguments
116 935a568c Florent Chuffart
~~~~~~~~~
117 935a568c Florent Chuffart
118 935a568c Florent Chuffart
``samples``
119 935a568c Florent Chuffart
120 935a568c Florent Chuffart
A list of samples. Each sample is a list like *sample = list(id=...,
121 935a568c Florent Chuffart
marker=..., strain=..., roi=..., inputs=..., outputs=...)* with *roi =
122 935a568c Florent Chuffart
list(name=..., begin=..., end=..., chr=..., genome=...)*.
123 935a568c Florent Chuffart
124 935a568c Florent Chuffart
``lod_thres``
125 935a568c Florent Chuffart
126 935a568c Florent Chuffart
Log likelihood ration threshold.
127 935a568c Florent Chuffart
128 935a568c Florent Chuffart
``coord_max``
129 935a568c Florent Chuffart
130 935a568c Florent Chuffart
A too big value to be a coord for a nucleosome lower bound.
131 935a568c Florent Chuffart
132 935a568c Florent Chuffart
Value
133 935a568c Florent Chuffart
~~~~~
134 935a568c Florent Chuffart
135 935a568c Florent Chuffart
Returns a list of clusterized nucleosomes, and all computed lod scores.
136 935a568c Florent Chuffart
137 935a568c Florent Chuffart
Author(s)
138 935a568c Florent Chuffart
~~~~~~~~~
139 935a568c Florent Chuffart
140 935a568c Florent Chuffart
Florent Chuffart
141 935a568c Florent Chuffart
142 935a568c Florent Chuffart
Examples
143 935a568c Florent Chuffart
~~~~~~~~
144 935a568c Florent Chuffart
145 935a568c Florent Chuffart
::
146 935a568c Florent Chuffart
147 935a568c Florent Chuffart
    # Dealing with a region of interest
148 935a568c Florent Chuffart
    roi =list(name="example", begin=1000,  end=1300, chr="1", genome=rep("A",301))
149 935a568c Florent Chuffart
    samples = list()
150 935a568c Florent Chuffart
    for (i in 1:3) {
151 935a568c Florent Chuffart
        # Create TF output
152 935a568c Florent Chuffart
        tf_nuc = list("chr"=paste("chr", roi$chr, sep=""), "center"=(roi$end + roi$begin)/2, "width"= 150, "correlation.score"= 0.9)
153 935a568c Florent Chuffart
        outputs = dfadd(NULL,tf_nuc)
154 935a568c Florent Chuffart
        outputs = filter_tf_outputs(outputs, roi$chr, roi$begin, roi$end)
155 935a568c Florent Chuffart
        # Generate corresponding reads
156 935a568c Florent Chuffart
        nb_reads = round(runif(1,170,230))
157 935a568c Florent Chuffart
        reads = round(rnorm(nb_reads, tf_nuc$center,20))
158 935a568c Florent Chuffart
        u_reads = sort(unique(reads))
159 935a568c Florent Chuffart
        strands = sample(c(rep("R",ceiling(length(u_reads)/2)),rep("F",floor(length(u_reads)/2))))
160 935a568c Florent Chuffart
        counts = apply(t(u_reads), 2, function(r) { sum(reads == r)})
161 935a568c Florent Chuffart
        shifts = apply(t(strands), 2, function(s) { if (s == "F") return(-tf_nuc$width/2) else return(tf_nuc$width/2)})
162 935a568c Florent Chuffart
        u_reads = u_reads + shifts
163 55c1cdff Florent Chuffart
        inputs = data.frame(list("V1" = rep(roi$chr, length(u_reads)),
164 55c1cdff Florent Chuffart
                                 "V2" = u_reads,
165 55c1cdff Florent Chuffart
                                                         "V3" = strands,
166 935a568c Florent Chuffart
                                                         "V4" = counts), stringsAsFactors=FALSE)
167 935a568c Florent Chuffart
        samples[[length(samples) + 1]] = list(id=1, marker="Mnase_Seq", strain="strain_ex", total_reads = 10000000, roi=roi, inputs=inputs, outputs=outputs)
168 935a568c Florent Chuffart
    }
169 935a568c Florent Chuffart
    print(aggregate_intra_strain_nucs(samples))
170 935a568c Florent Chuffart
171 935a568c Florent Chuffart
R: Aligns nucleosomes between 2 strains.
172 935a568c Florent Chuffart
173 935a568c Florent Chuffart
Aligns nucleosomes between 2 strains.
174 935a568c Florent Chuffart
-------------------------------------
175 935a568c Florent Chuffart
176 935a568c Florent Chuffart
Description
177 935a568c Florent Chuffart
~~~~~~~~~~~
178 935a568c Florent Chuffart
179 935a568c Florent Chuffart
This function aligns nucs between two strains for a given genome region.
180 935a568c Florent Chuffart
181 935a568c Florent Chuffart
Usage
182 935a568c Florent Chuffart
~~~~~
183 935a568c Florent Chuffart
184 935a568c Florent Chuffart
::
185 935a568c Florent Chuffart
186 935a568c Florent Chuffart
    align_inter_strain_nucs(replicates, wp_nucs_strain_ref1 = NULL, 
187 729c934e Florent Chuffart
        wp_nucs_strain_ref2 = NULL, corr_thres = 0.5, lod_thres = 100, 
188 1d833b97 Florent Chuffart
        config = NULL, ...)
189 935a568c Florent Chuffart
190 935a568c Florent Chuffart
Arguments
191 935a568c Florent Chuffart
~~~~~~~~~
192 935a568c Florent Chuffart
193 935a568c Florent Chuffart
``replicates``
194 935a568c Florent Chuffart
195 935a568c Florent Chuffart
Set of replicates, ideally 3 per strain.
196 935a568c Florent Chuffart
197 935a568c Florent Chuffart
``wp_nucs_strain_ref1``
198 935a568c Florent Chuffart
199 935a568c Florent Chuffart
List of aggregates nucleosome for strain 1. If it's null this list will
200 935a568c Florent Chuffart
be computed.
201 935a568c Florent Chuffart
202 935a568c Florent Chuffart
``wp_nucs_strain_ref2``
203 935a568c Florent Chuffart
204 935a568c Florent Chuffart
List of aggregates nucleosome for strain 2. If it's null this list will
205 935a568c Florent Chuffart
be computed.
206 935a568c Florent Chuffart
207 935a568c Florent Chuffart
``corr_thres``
208 935a568c Florent Chuffart
209 935a568c Florent Chuffart
Correlation threshold.
210 935a568c Florent Chuffart
211 935a568c Florent Chuffart
``lod_thres``
212 935a568c Florent Chuffart
213 935a568c Florent Chuffart
LOD cut off.
214 935a568c Florent Chuffart
215 1d833b97 Florent Chuffart
``config``
216 1d833b97 Florent Chuffart
217 1d833b97 Florent Chuffart
GLOBAL config variable
218 1d833b97 Florent Chuffart
219 935a568c Florent Chuffart
``...``
220 935a568c Florent Chuffart
221 935a568c Florent Chuffart
A list of parameters that will be passed to
222 935a568c Florent Chuffart
*aggregate\_intra\_strain\_nucs* if needed.
223 935a568c Florent Chuffart
224 935a568c Florent Chuffart
Value
225 935a568c Florent Chuffart
~~~~~
226 935a568c Florent Chuffart
227 935a568c Florent Chuffart
Returns a list of clusterized nucleosomes, and all computed lod scores.
228 935a568c Florent Chuffart
229 935a568c Florent Chuffart
Author(s)
230 935a568c Florent Chuffart
~~~~~~~~~
231 935a568c Florent Chuffart
232 935a568c Florent Chuffart
Florent Chuffart
233 935a568c Florent Chuffart
234 935a568c Florent Chuffart
Examples
235 935a568c Florent Chuffart
~~~~~~~~
236 935a568c Florent Chuffart
237 935a568c Florent Chuffart
::
238 935a568c Florent Chuffart
239 1d833b97 Florent Chuffart
240 1d833b97 Florent Chuffart
        # Define new translate_roi function...
241 1d833b97 Florent Chuffart
        translate_roi = function(roi, strain2, big_roi=NULL, config=NULL) {
242 1d833b97 Florent Chuffart
          return(roi)
243 1d833b97 Florent Chuffart
        }
244 1d833b97 Florent Chuffart
        # Binding it by uncomment follwing lines.
245 1d833b97 Florent Chuffart
        unlockBinding("translate_roi", as.environment("package:nucleominer"))
246 1d833b97 Florent Chuffart
        unlockBinding("translate_roi", getNamespace("nucleominer"))
247 1d833b97 Florent Chuffart
        assign("translate_roi", translate_roi, "package:nucleominer")
248 1d833b97 Florent Chuffart
        assign("translate_roi", translate_roi, getNamespace("nucleominer"))
249 1d833b97 Florent Chuffart
        lockBinding("translate_roi", getNamespace("nucleominer"))
250 55c1cdff Florent Chuffart
        lockBinding("translate_roi", as.environment("package:nucleominer"))
251 1d833b97 Florent Chuffart
252 935a568c Florent Chuffart
    # Dealing with a region of interest
253 935a568c Florent Chuffart
    roi =list(name="example", begin=1000,  end=1300, chr="1", genome=rep("A",301), strain_ref1 = "STRAINREF1")
254 935a568c Florent Chuffart
    roi2 = translate_roi(roi, roi$strain_ref1)
255 935a568c Florent Chuffart
    replicates = list()
256 935a568c Florent Chuffart
    for (j in 1:2) {
257 935a568c Florent Chuffart
        samples = list()
258 935a568c Florent Chuffart
        for (i in 1:3) {
259 935a568c Florent Chuffart
            # Create TF output
260 935a568c Florent Chuffart
            tf_nuc = list("chr"=paste("chr", roi$chr, sep=""), "center"=(roi$end + roi$begin)/2, "width"= 150, "correlation.score"= 0.9)
261 935a568c Florent Chuffart
            outputs = dfadd(NULL,tf_nuc)
262 935a568c Florent Chuffart
            outputs = filter_tf_outputs(outputs, roi$chr, roi$begin, roi$end)
263 935a568c Florent Chuffart
            # Generate corresponding reads
264 935a568c Florent Chuffart
            nb_reads = round(runif(1,170,230))
265 935a568c Florent Chuffart
            reads = round(rnorm(nb_reads, tf_nuc$center,20))
266 935a568c Florent Chuffart
            u_reads = sort(unique(reads))
267 935a568c Florent Chuffart
            strands = sample(c(rep("R",ceiling(length(u_reads)/2)),rep("F",floor(length(u_reads)/2))))
268 935a568c Florent Chuffart
            counts = apply(t(u_reads), 2, function(r) { sum(reads == r)})
269 935a568c Florent Chuffart
            shifts = apply(t(strands), 2, function(s) { if (s == "F") return(-tf_nuc$width/2) else return(tf_nuc$width/2)})
270 935a568c Florent Chuffart
            u_reads = u_reads + shifts
271 55c1cdff Florent Chuffart
            inputs = data.frame(list("V1" = rep(roi$chr, length(u_reads)),
272 55c1cdff Florent Chuffart
                                     "V2" = u_reads,
273 55c1cdff Florent Chuffart
                                                             "V3" = strands,
274 935a568c Florent Chuffart
                                                             "V4" = counts), stringsAsFactors=FALSE)
275 935a568c Florent Chuffart
            samples[[length(samples) + 1]] = list(id=1, marker="Mnase_Seq", strain=paste("strain_ex",j,sep=""), total_reads = 10000000, roi=roi, inputs=inputs, outputs=outputs)
276 935a568c Florent Chuffart
        }
277 935a568c Florent Chuffart
        replicates[[length(replicates) + 1]] = samples
278 935a568c Florent Chuffart
    }
279 935a568c Florent Chuffart
    print(align_inter_strain_nucs(replicates))
280 935a568c Florent Chuffart
281 935a568c Florent Chuffart
R: Launch deseq methods.
282 935a568c Florent Chuffart
283 935a568c Florent Chuffart
Launch deseq methods.
284 935a568c Florent Chuffart
---------------------
285 935a568c Florent Chuffart
286 935a568c Florent Chuffart
Description
287 935a568c Florent Chuffart
~~~~~~~~~~~
288 935a568c Florent Chuffart
289 935a568c Florent Chuffart
This function is based on deseq example. It mormalizes data, fit data to
290 935a568c Florent Chuffart
GLM model with and without interaction term and compare the two
291 935a568c Florent Chuffart
l;=models.
292 935a568c Florent Chuffart
293 935a568c Florent Chuffart
Usage
294 935a568c Florent Chuffart
~~~~~
295 935a568c Florent Chuffart
296 935a568c Florent Chuffart
::
297 935a568c Florent Chuffart
298 935a568c Florent Chuffart
    analyse_design(snep_design, reads)
299 935a568c Florent Chuffart
300 935a568c Florent Chuffart
Arguments
301 935a568c Florent Chuffart
~~~~~~~~~
302 935a568c Florent Chuffart
303 935a568c Florent Chuffart
``snep_design``
304 935a568c Florent Chuffart
305 935a568c Florent Chuffart
The design to considere.
306 935a568c Florent Chuffart
307 935a568c Florent Chuffart
``reads``
308 935a568c Florent Chuffart
309 935a568c Florent Chuffart
The data to considere.
310 935a568c Florent Chuffart
311 935a568c Florent Chuffart
Author(s)
312 935a568c Florent Chuffart
~~~~~~~~~
313 935a568c Florent Chuffart
314 935a568c Florent Chuffart
Florent Chuffart
315 935a568c Florent Chuffart
316 61914235 Florent Chuffart
R: Stage replicates data
317 61914235 Florent Chuffart
318 61914235 Florent Chuffart
Stage replicates data
319 61914235 Florent Chuffart
---------------------
320 61914235 Florent Chuffart
321 61914235 Florent Chuffart
Description
322 61914235 Florent Chuffart
~~~~~~~~~~~
323 61914235 Florent Chuffart
324 61914235 Florent Chuffart
This function loads in memory data corresponding to the given
325 61914235 Florent Chuffart
experiments.
326 61914235 Florent Chuffart
327 61914235 Florent Chuffart
Usage
328 61914235 Florent Chuffart
~~~~~
329 61914235 Florent Chuffart
330 61914235 Florent Chuffart
::
331 61914235 Florent Chuffart
332 61914235 Florent Chuffart
    build_replicates(expe, roi, only_fetch = FALSE, get_genome = FALSE, 
333 61914235 Florent Chuffart
        all_samples, config = NULL)
334 61914235 Florent Chuffart
335 61914235 Florent Chuffart
Arguments
336 61914235 Florent Chuffart
~~~~~~~~~
337 61914235 Florent Chuffart
338 61914235 Florent Chuffart
``expe``
339 61914235 Florent Chuffart
340 61914235 Florent Chuffart
a list of vector corresponding to vector of replicates.
341 61914235 Florent Chuffart
342 61914235 Florent Chuffart
``roi``
343 61914235 Florent Chuffart
344 61914235 Florent Chuffart
the region that we are interested in.
345 61914235 Florent Chuffart
346 61914235 Florent Chuffart
``only_fetch``
347 61914235 Florent Chuffart
348 61914235 Florent Chuffart
filter or not inputs.
349 61914235 Florent Chuffart
350 61914235 Florent Chuffart
``get_genome``
351 61914235 Florent Chuffart
352 61914235 Florent Chuffart
Load or not corresponding genome.
353 61914235 Florent Chuffart
354 61914235 Florent Chuffart
``all_samples``
355 61914235 Florent Chuffart
356 61914235 Florent Chuffart
Global list of samples.
357 61914235 Florent Chuffart
358 61914235 Florent Chuffart
``config``
359 61914235 Florent Chuffart
360 61914235 Florent Chuffart
GLOBAL config variable.
361 61914235 Florent Chuffart
362 61914235 Florent Chuffart
Author(s)
363 61914235 Florent Chuffart
~~~~~~~~~
364 61914235 Florent Chuffart
365 61914235 Florent Chuffart
Florent Chuffart
366 61914235 Florent Chuffart
367 61914235 Florent Chuffart
Examples
368 61914235 Florent Chuffart
~~~~~~~~
369 61914235 Florent Chuffart
370 61914235 Florent Chuffart
::
371 61914235 Florent Chuffart
372 61914235 Florent Chuffart
    # library(rjson)
373 61914235 Florent Chuffart
    # library(nucleominer)
374 55c1cdff Florent Chuffart
    #
375 61914235 Florent Chuffart
    # # Read config file
376 61914235 Florent Chuffart
    # json_conf_file = "nucleo_miner_config.json"
377 61914235 Florent Chuffart
    # config = fromJSON(paste(readLines(json_conf_file), collapse=""))
378 61914235 Florent Chuffart
    # # Read sample file
379 55c1cdff Florent Chuffart
    # all_samples = get_content(config$CSV_SAMPLE_FILE, "cvs", sep=";", head=TRUE, stringsAsFactors=FALSE)
380 61914235 Florent Chuffart
    # # here are the sample ids in a list
381 61914235 Florent Chuffart
    # expes = list(c(1))
382 61914235 Florent Chuffart
    # # here is the region that we wnt to see the coverage
383 55c1cdff Florent Chuffart
    # cur = list(chr="8", begin=472000, end=474000, strain_ref="BY")
384 61914235 Florent Chuffart
    # # it displays the corverage
385 61914235 Florent Chuffart
    # replicates = build_replicates(expes, cur, all_samples=all_samples, config=config)
386 55c1cdff Florent Chuffart
    # out = watch_samples(replicates, config$READ_LENGTH,
387 55c1cdff Florent Chuffart
    #       plot_coverage = TRUE,
388 55c1cdff Florent Chuffart
    #       plot_squared_reads = FALSE,
389 55c1cdff Florent Chuffart
    #       plot_ref_genome = FALSE,
390 55c1cdff Florent Chuffart
    #       plot_arrow_raw_reads = FALSE,
391 55c1cdff Florent Chuffart
    #       plot_arrow_nuc_reads = FALSE,
392 55c1cdff Florent Chuffart
    #       plot_gaussian_reads = FALSE,
393 55c1cdff Florent Chuffart
    #       plot_gaussian_unified_reads = FALSE,
394 55c1cdff Florent Chuffart
    #       plot_ellipse_nucs = FALSE,
395 55c1cdff Florent Chuffart
    #       plot_wp_nucs = FALSE,
396 55c1cdff Florent Chuffart
    #       plot_wp_nuc_model = FALSE,
397 55c1cdff Florent Chuffart
    #       plot_common_nucs = FALSE,
398 61914235 Florent Chuffart
    #       height = 50)
399 61914235 Florent Chuffart
400 5bfac5a3 Florent Chuffart
R: Extract a sub part of the corresponding c2c file
401 5bfac5a3 Florent Chuffart
402 5bfac5a3 Florent Chuffart
Extract a sub part of the corresponding c2c file
403 5bfac5a3 Florent Chuffart
------------------------------------------------
404 5bfac5a3 Florent Chuffart
405 5bfac5a3 Florent Chuffart
Description
406 5bfac5a3 Florent Chuffart
~~~~~~~~~~~
407 5bfac5a3 Florent Chuffart
408 5bfac5a3 Florent Chuffart
This fonction allow to acces to a specific part of the c2c file.
409 5bfac5a3 Florent Chuffart
410 5bfac5a3 Florent Chuffart
Usage
411 5bfac5a3 Florent Chuffart
~~~~~
412 5bfac5a3 Florent Chuffart
413 5bfac5a3 Florent Chuffart
::
414 5bfac5a3 Florent Chuffart
415 5bfac5a3 Florent Chuffart
    c2c_extraction(strain1, strain2, chr = NULL, lower_bound = NULL, 
416 5bfac5a3 Florent Chuffart
        upper_bound = NULL, config = NULL)
417 5bfac5a3 Florent Chuffart
418 5bfac5a3 Florent Chuffart
Arguments
419 5bfac5a3 Florent Chuffart
~~~~~~~~~
420 5bfac5a3 Florent Chuffart
421 5bfac5a3 Florent Chuffart
``strain1``
422 5bfac5a3 Florent Chuffart
423 5bfac5a3 Florent Chuffart
the key strain
424 5bfac5a3 Florent Chuffart
425 5bfac5a3 Florent Chuffart
``strain2``
426 5bfac5a3 Florent Chuffart
427 5bfac5a3 Florent Chuffart
the target strain
428 5bfac5a3 Florent Chuffart
429 5bfac5a3 Florent Chuffart
``chr``
430 5bfac5a3 Florent Chuffart
431 5bfac5a3 Florent Chuffart
if defined, the c2c will filtered according to the chromosome value
432 5bfac5a3 Florent Chuffart
433 5bfac5a3 Florent Chuffart
``lower_bound``
434 5bfac5a3 Florent Chuffart
435 5bfac5a3 Florent Chuffart
if defined, the c2c will filtered for part of the genome upper than
436 5bfac5a3 Florent Chuffart
lower\_bound
437 5bfac5a3 Florent Chuffart
438 5bfac5a3 Florent Chuffart
``upper_bound``
439 5bfac5a3 Florent Chuffart
440 5bfac5a3 Florent Chuffart
if defined, the c2c will filtered for part of the genome lower than
441 5bfac5a3 Florent Chuffart
upper\_bound
442 5bfac5a3 Florent Chuffart
443 5bfac5a3 Florent Chuffart
``config``
444 5bfac5a3 Florent Chuffart
445 5bfac5a3 Florent Chuffart
GLOBAL config variable
446 5bfac5a3 Florent Chuffart
447 5bfac5a3 Florent Chuffart
Author(s)
448 5bfac5a3 Florent Chuffart
~~~~~~~~~
449 5bfac5a3 Florent Chuffart
450 5bfac5a3 Florent Chuffart
Florent Chuffart
451 5bfac5a3 Florent Chuffart
452 59ad95ca Florent Chuffart
R: reformat an "apply manipulated" list of regions
453 59ad95ca Florent Chuffart
454 59ad95ca Florent Chuffart
reformat an "apply manipulated" list of regions
455 59ad95ca Florent Chuffart
-----------------------------------------------
456 59ad95ca Florent Chuffart
457 59ad95ca Florent Chuffart
Description
458 59ad95ca Florent Chuffart
~~~~~~~~~~~
459 59ad95ca Florent Chuffart
460 59ad95ca Florent Chuffart
Utils to reformat an "apply manipulated" list of regions
461 59ad95ca Florent Chuffart
462 59ad95ca Florent Chuffart
Usage
463 59ad95ca Florent Chuffart
~~~~~
464 59ad95ca Florent Chuffart
465 59ad95ca Florent Chuffart
::
466 59ad95ca Florent Chuffart
467 59ad95ca Florent Chuffart
    collapse_regions(regions)
468 59ad95ca Florent Chuffart
469 59ad95ca Florent Chuffart
Arguments
470 59ad95ca Florent Chuffart
~~~~~~~~~
471 59ad95ca Florent Chuffart
472 59ad95ca Florent Chuffart
+---------------+----+
473 59ad95ca Florent Chuffart
| ``regions``   |    |
474 59ad95ca Florent Chuffart
+---------------+----+
475 59ad95ca Florent Chuffart
476 59ad95ca Florent Chuffart
Author(s)
477 59ad95ca Florent Chuffart
~~~~~~~~~
478 59ad95ca Florent Chuffart
479 59ad95ca Florent Chuffart
Florent Chuffart
480 59ad95ca Florent Chuffart
481 1d833b97 Florent Chuffart
R: Compute Common Uninterrupted Regions (CUR)
482 1d833b97 Florent Chuffart
483 1d833b97 Florent Chuffart
Compute Common Uninterrupted Regions (CUR)
484 1d833b97 Florent Chuffart
------------------------------------------
485 1d833b97 Florent Chuffart
486 1d833b97 Florent Chuffart
Description
487 1d833b97 Florent Chuffart
~~~~~~~~~~~
488 1d833b97 Florent Chuffart
489 1d833b97 Florent Chuffart
CURs are regions that can be aligned between the genomes
490 1d833b97 Florent Chuffart
491 1d833b97 Florent Chuffart
Usage
492 1d833b97 Florent Chuffart
~~~~~
493 1d833b97 Florent Chuffart
494 1d833b97 Florent Chuffart
::
495 1d833b97 Florent Chuffart
496 5bfac5a3 Florent Chuffart
    compute_inter_all_strain_curs(diff_allowed = 30, min_cur_width = 4000, 
497 5bfac5a3 Florent Chuffart
        config = NULL)
498 1d833b97 Florent Chuffart
499 1d833b97 Florent Chuffart
Arguments
500 1d833b97 Florent Chuffart
~~~~~~~~~
501 1d833b97 Florent Chuffart
502 1d833b97 Florent Chuffart
``diff_allowed``
503 1d833b97 Florent Chuffart
504 1d833b97 Florent Chuffart
the maximum indel width allowe din a CUR
505 1d833b97 Florent Chuffart
506 1d833b97 Florent Chuffart
``min_cur_width``
507 1d833b97 Florent Chuffart
508 1d833b97 Florent Chuffart
The minimum width of a CUR
509 1d833b97 Florent Chuffart
510 1d833b97 Florent Chuffart
``config``
511 1d833b97 Florent Chuffart
512 1d833b97 Florent Chuffart
GLOBAL config variable
513 1d833b97 Florent Chuffart
514 1d833b97 Florent Chuffart
Author(s)
515 1d833b97 Florent Chuffart
~~~~~~~~~
516 1d833b97 Florent Chuffart
517 1d833b97 Florent Chuffart
Florent Chuffart
518 1d833b97 Florent Chuffart
519 935a568c Florent Chuffart
R: Crop bound of regions according to region of interest bound
520 935a568c Florent Chuffart
521 935a568c Florent Chuffart
Crop bound of regions according to region of interest bound
522 935a568c Florent Chuffart
-----------------------------------------------------------
523 935a568c Florent Chuffart
524 935a568c Florent Chuffart
Description
525 935a568c Florent Chuffart
~~~~~~~~~~~
526 935a568c Florent Chuffart
527 935a568c Florent Chuffart
The fucntion is no more necessary since we remove "big\_roi" bug in
528 935a568c Florent Chuffart
translate\_roi function.
529 935a568c Florent Chuffart
530 935a568c Florent Chuffart
Usage
531 935a568c Florent Chuffart
~~~~~
532 935a568c Florent Chuffart
533 935a568c Florent Chuffart
::
534 935a568c Florent Chuffart
535 1d833b97 Florent Chuffart
    crop_fuzzy(tmp_fuzzy_nucs, roi, strain, config = NULL)
536 935a568c Florent Chuffart
537 935a568c Florent Chuffart
Arguments
538 935a568c Florent Chuffart
~~~~~~~~~
539 935a568c Florent Chuffart
540 935a568c Florent Chuffart
``tmp_fuzzy_nucs``
541 935a568c Florent Chuffart
542 935a568c Florent Chuffart
the regiuons to be croped.
543 935a568c Florent Chuffart
544 935a568c Florent Chuffart
``roi``
545 935a568c Florent Chuffart
546 935a568c Florent Chuffart
The region of interest.
547 935a568c Florent Chuffart
548 935a568c Florent Chuffart
``strain``
549 935a568c Florent Chuffart
550 935a568c Florent Chuffart
The strain to consider.
551 935a568c Florent Chuffart
552 1d833b97 Florent Chuffart
``config``
553 1d833b97 Florent Chuffart
554 1d833b97 Florent Chuffart
GLOBAL config variable
555 1d833b97 Florent Chuffart
556 935a568c Florent Chuffart
Author(s)
557 935a568c Florent Chuffart
~~~~~~~~~
558 935a568c Florent Chuffart
559 935a568c Florent Chuffart
Florent Chuffart
560 935a568c Florent Chuffart
561 935a568c Florent Chuffart
R: Adding list to a dataframe.
562 935a568c Florent Chuffart
563 935a568c Florent Chuffart
Adding list to a dataframe.
564 935a568c Florent Chuffart
---------------------------
565 935a568c Florent Chuffart
566 935a568c Florent Chuffart
Description
567 935a568c Florent Chuffart
~~~~~~~~~~~
568 935a568c Florent Chuffart
569 935a568c Florent Chuffart
Add a list *l* to a dataframe *df*. Create it if *df* is *NULL*. Return
570 935a568c Florent Chuffart
the dataframe *df*.
571 935a568c Florent Chuffart
572 935a568c Florent Chuffart
Usage
573 935a568c Florent Chuffart
~~~~~
574 935a568c Florent Chuffart
575 935a568c Florent Chuffart
::
576 935a568c Florent Chuffart
577 935a568c Florent Chuffart
    dfadd(df, l)
578 935a568c Florent Chuffart
579 935a568c Florent Chuffart
Arguments
580 935a568c Florent Chuffart
~~~~~~~~~
581 935a568c Florent Chuffart
582 935a568c Florent Chuffart
``df``
583 935a568c Florent Chuffart
584 935a568c Florent Chuffart
A dataframe
585 935a568c Florent Chuffart
586 935a568c Florent Chuffart
``l``
587 935a568c Florent Chuffart
588 935a568c Florent Chuffart
A list
589 935a568c Florent Chuffart
590 935a568c Florent Chuffart
Value
591 935a568c Florent Chuffart
~~~~~
592 935a568c Florent Chuffart
593 935a568c Florent Chuffart
Return the dataframe *df*.
594 935a568c Florent Chuffart
595 935a568c Florent Chuffart
Author(s)
596 935a568c Florent Chuffart
~~~~~~~~~
597 935a568c Florent Chuffart
598 935a568c Florent Chuffart
Florent Chuffart
599 935a568c Florent Chuffart
600 935a568c Florent Chuffart
Examples
601 935a568c Florent Chuffart
~~~~~~~~
602 935a568c Florent Chuffart
603 935a568c Florent Chuffart
::
604 935a568c Florent Chuffart
605 935a568c Florent Chuffart
    ## Here dataframe is NULL
606 935a568c Florent Chuffart
    print(df)
607 935a568c Florent Chuffart
    df = NULL
608 935a568c Florent Chuffart
609 935a568c Florent Chuffart
    # Initialize df
610 935a568c Florent Chuffart
    df = dfadd(df, list(key1 = "value1", key2 = "value2"))
611 935a568c Florent Chuffart
    print(df)
612 935a568c Florent Chuffart
613 935a568c Florent Chuffart
    # Adding elements to df
614 935a568c Florent Chuffart
    df = dfadd(df, list(key1 = "value1'", key2 = "value2'"))
615 935a568c Florent Chuffart
    print(df)
616 935a568c Florent Chuffart
617 935a568c Florent Chuffart
R: Prefetch data
618 935a568c Florent Chuffart
619 935a568c Florent Chuffart
Prefetch data
620 935a568c Florent Chuffart
-------------
621 935a568c Florent Chuffart
622 935a568c Florent Chuffart
Description
623 935a568c Florent Chuffart
~~~~~~~~~~~
624 935a568c Florent Chuffart
625 935a568c Florent Chuffart
Fetch and filter inputs and outpouts per region of interest. Organize it
626 935a568c Florent Chuffart
per replicates.
627 935a568c Florent Chuffart
628 935a568c Florent Chuffart
Usage
629 935a568c Florent Chuffart
~~~~~
630 935a568c Florent Chuffart
631 935a568c Florent Chuffart
::
632 935a568c Florent Chuffart
633 1d833b97 Florent Chuffart
    fetch_mnase_replicates(strain, roi, all_samples, config = NULL, 
634 1d833b97 Florent Chuffart
        only_fetch = FALSE, get_genome = FALSE, get_ouputs = TRUE)
635 935a568c Florent Chuffart
636 935a568c Florent Chuffart
Arguments
637 935a568c Florent Chuffart
~~~~~~~~~
638 935a568c Florent Chuffart
639 935a568c Florent Chuffart
``strain``
640 935a568c Florent Chuffart
641 935a568c Florent Chuffart
The strain we want mnase replicatesList of replicates. Each replicates
642 935a568c Florent Chuffart
is a vector of sample ids.
643 935a568c Florent Chuffart
644 935a568c Florent Chuffart
``roi``
645 935a568c Florent Chuffart
646 935a568c Florent Chuffart
Region of interest.
647 935a568c Florent Chuffart
648 935a568c Florent Chuffart
``all_samples``
649 935a568c Florent Chuffart
650 935a568c Florent Chuffart
Global list of samples.
651 935a568c Florent Chuffart
652 935a568c Florent Chuffart
``config``
653 935a568c Florent Chuffart
654 935a568c Florent Chuffart
GLOBAL config variable
655 935a568c Florent Chuffart
656 935a568c Florent Chuffart
``only_fetch``
657 935a568c Florent Chuffart
658 935a568c Florent Chuffart
If TRUE, only fetch and not filtering. It is used tio load sample files
659 935a568c Florent Chuffart
into memory before forking.
660 935a568c Florent Chuffart
661 935a568c Florent Chuffart
``get_genome``
662 935a568c Florent Chuffart
663 935a568c Florent Chuffart
If TRUE, load corresponding genome sequence.
664 935a568c Florent Chuffart
665 935a568c Florent Chuffart
``get_ouputs``
666 935a568c Florent Chuffart
667 935a568c Florent Chuffart
If TRUE, get also ouput corresponding TF output files.
668 935a568c Florent Chuffart
669 935a568c Florent Chuffart
Author(s)
670 935a568c Florent Chuffart
~~~~~~~~~
671 935a568c Florent Chuffart
672 935a568c Florent Chuffart
Florent Chuffart
673 935a568c Florent Chuffart
674 935a568c Florent Chuffart
R: Filter TemplateFilter inputs
675 935a568c Florent Chuffart
676 935a568c Florent Chuffart
Filter TemplateFilter inputs
677 935a568c Florent Chuffart
----------------------------
678 935a568c Florent Chuffart
679 935a568c Florent Chuffart
Description
680 935a568c Florent Chuffart
~~~~~~~~~~~
681 935a568c Florent Chuffart
682 935a568c Florent Chuffart
This function filters TemplateFilter inputs according genome area
683 935a568c Florent Chuffart
observed properties. It takes into account reads that are at the
684 935a568c Florent Chuffart
frontier of this area and the strand of these reads.
685 935a568c Florent Chuffart
686 935a568c Florent Chuffart
Usage
687 935a568c Florent Chuffart
~~~~~
688 935a568c Florent Chuffart
689 935a568c Florent Chuffart
::
690 935a568c Florent Chuffart
691 935a568c Florent Chuffart
    filter_tf_inputs(inputs, chr, x_min, x_max, nuc_width = 160, 
692 b8a95426 Florent Chuffart
        only_f = FALSE, only_r = FALSE, filter_for_coverage = FALSE)
693 935a568c Florent Chuffart
694 935a568c Florent Chuffart
Arguments
695 935a568c Florent Chuffart
~~~~~~~~~
696 935a568c Florent Chuffart
697 935a568c Florent Chuffart
``inputs``
698 935a568c Florent Chuffart
699 935a568c Florent Chuffart
TF inputs to be filtered.
700 935a568c Florent Chuffart
701 935a568c Florent Chuffart
``chr``
702 935a568c Florent Chuffart
703 935a568c Florent Chuffart
Chromosome observed, here chr is an integer.
704 935a568c Florent Chuffart
705 935a568c Florent Chuffart
``x_min``
706 935a568c Florent Chuffart
707 935a568c Florent Chuffart
Coordinate of the first bp observed.
708 935a568c Florent Chuffart
709 935a568c Florent Chuffart
``x_max``
710 935a568c Florent Chuffart
711 935a568c Florent Chuffart
Coordinate of the last bp observed.
712 935a568c Florent Chuffart
713 935a568c Florent Chuffart
``nuc_width``
714 935a568c Florent Chuffart
715 935a568c Florent Chuffart
Nucleosome width.
716 935a568c Florent Chuffart
717 935a568c Florent Chuffart
``only_f``
718 935a568c Florent Chuffart
719 935a568c Florent Chuffart
Filter only F reads.
720 935a568c Florent Chuffart
721 935a568c Florent Chuffart
``only_r``
722 935a568c Florent Chuffart
723 935a568c Florent Chuffart
Filter only R reads.
724 935a568c Florent Chuffart
725 b8a95426 Florent Chuffart
``filter_for_coverage``
726 b8a95426 Florent Chuffart
727 b8a95426 Florent Chuffart
Does it filter for plot coverage?
728 b8a95426 Florent Chuffart
729 935a568c Florent Chuffart
Value
730 935a568c Florent Chuffart
~~~~~
731 935a568c Florent Chuffart
732 935a568c Florent Chuffart
Returns filtred inputs.
733 935a568c Florent Chuffart
734 935a568c Florent Chuffart
Author(s)
735 935a568c Florent Chuffart
~~~~~~~~~
736 935a568c Florent Chuffart
737 935a568c Florent Chuffart
Florent Chuffart
738 935a568c Florent Chuffart
739 935a568c Florent Chuffart
R: Filter TemplateFilter outputs
740 935a568c Florent Chuffart
741 935a568c Florent Chuffart
Filter TemplateFilter outputs
742 935a568c Florent Chuffart
-----------------------------
743 935a568c Florent Chuffart
744 935a568c Florent Chuffart
Description
745 935a568c Florent Chuffart
~~~~~~~~~~~
746 935a568c Florent Chuffart
747 935a568c Florent Chuffart
This function filters TemplateFilter outputs according, not only genome
748 935a568c Florent Chuffart
area observerved properties, but also correlation and overlap threshold.
749 935a568c Florent Chuffart
750 935a568c Florent Chuffart
Usage
751 935a568c Florent Chuffart
~~~~~
752 935a568c Florent Chuffart
753 935a568c Florent Chuffart
::
754 935a568c Florent Chuffart
755 935a568c Florent Chuffart
    filter_tf_outputs(tf_outputs, chr, x_min, x_max, nuc_width = 160, 
756 935a568c Florent Chuffart
        ol_bp = 59, corr_thres = 0.5)
757 935a568c Florent Chuffart
758 935a568c Florent Chuffart
Arguments
759 935a568c Florent Chuffart
~~~~~~~~~
760 935a568c Florent Chuffart
761 935a568c Florent Chuffart
``tf_outputs``
762 935a568c Florent Chuffart
763 935a568c Florent Chuffart
TemplateFilter outputs.
764 935a568c Florent Chuffart
765 935a568c Florent Chuffart
``chr``
766 935a568c Florent Chuffart
767 935a568c Florent Chuffart
Chromosome observed, here chr is an integer.
768 935a568c Florent Chuffart
769 935a568c Florent Chuffart
``x_min``
770 935a568c Florent Chuffart
771 935a568c Florent Chuffart
Coordinate of the first bp observed.
772 935a568c Florent Chuffart
773 935a568c Florent Chuffart
``x_max``
774 935a568c Florent Chuffart
775 935a568c Florent Chuffart
Coordinate of the last bp observed.
776 935a568c Florent Chuffart
777 935a568c Florent Chuffart
``nuc_width``
778 935a568c Florent Chuffart
779 935a568c Florent Chuffart
Nucleosome width.
780 935a568c Florent Chuffart
781 935a568c Florent Chuffart
``ol_bp``
782 935a568c Florent Chuffart
783 935a568c Florent Chuffart
Overlap Threshold.
784 935a568c Florent Chuffart
785 935a568c Florent Chuffart
``corr_thres``
786 935a568c Florent Chuffart
787 935a568c Florent Chuffart
Correlation threshold.
788 935a568c Florent Chuffart
789 935a568c Florent Chuffart
Value
790 935a568c Florent Chuffart
~~~~~
791 935a568c Florent Chuffart
792 935a568c Florent Chuffart
Returns filtered TemplateFilter Outputs
793 935a568c Florent Chuffart
794 935a568c Florent Chuffart
Author(s)
795 935a568c Florent Chuffart
~~~~~~~~~
796 935a568c Florent Chuffart
797 935a568c Florent Chuffart
Florent Chuffart
798 935a568c Florent Chuffart
799 7646593d Florent Chuffart
R: to flat aggregate\_intra\_strain\_nucs function output
800 7646593d Florent Chuffart
801 7646593d Florent Chuffart
to flat aggregate\_intra\_strain\_nucs function output
802 7646593d Florent Chuffart
------------------------------------------------------
803 7646593d Florent Chuffart
804 7646593d Florent Chuffart
Description
805 7646593d Florent Chuffart
~~~~~~~~~~~
806 7646593d Florent Chuffart
807 7646593d Florent Chuffart
This function builds a dataframe of all clusters obtain from
808 7646593d Florent Chuffart
aggregate\_intra\_strain\_nucs function.
809 7646593d Florent Chuffart
810 7646593d Florent Chuffart
Usage
811 7646593d Florent Chuffart
~~~~~
812 7646593d Florent Chuffart
813 7646593d Florent Chuffart
::
814 7646593d Florent Chuffart
815 7646593d Florent Chuffart
    flat_aggregated_intra_strain_nucs(partial_strain_maps, roi_index)
816 7646593d Florent Chuffart
817 7646593d Florent Chuffart
Arguments
818 7646593d Florent Chuffart
~~~~~~~~~
819 7646593d Florent Chuffart
820 7646593d Florent Chuffart
``partial_strain_maps``
821 7646593d Florent Chuffart
822 7646593d Florent Chuffart
the output of aggregate\_intra\_strain\_nucs function
823 7646593d Florent Chuffart
824 7646593d Florent Chuffart
``roi_index``
825 7646593d Florent Chuffart
826 7646593d Florent Chuffart
the index of the roi involved
827 7646593d Florent Chuffart
828 7646593d Florent Chuffart
Value
829 7646593d Florent Chuffart
~~~~~
830 7646593d Florent Chuffart
831 7646593d Florent Chuffart
Returns a dataframe of all clusters obtain from
832 7646593d Florent Chuffart
aggregate\_intra\_strain\_nucs function.
833 7646593d Florent Chuffart
834 7646593d Florent Chuffart
Author(s)
835 7646593d Florent Chuffart
~~~~~~~~~
836 7646593d Florent Chuffart
837 7646593d Florent Chuffart
Florent Chuffart
838 7646593d Florent Chuffart
839 935a568c Florent Chuffart
R: flat reads
840 935a568c Florent Chuffart
841 935a568c Florent Chuffart
flat reads
842 935a568c Florent Chuffart
----------
843 935a568c Florent Chuffart
844 935a568c Florent Chuffart
Description
845 935a568c Florent Chuffart
~~~~~~~~~~~
846 935a568c Florent Chuffart
847 935a568c Florent Chuffart
Extract reads coordinates from TempleteFilter input sequence
848 935a568c Florent Chuffart
849 935a568c Florent Chuffart
Usage
850 935a568c Florent Chuffart
~~~~~
851 935a568c Florent Chuffart
852 935a568c Florent Chuffart
::
853 935a568c Florent Chuffart
854 935a568c Florent Chuffart
    flat_reads(reads, nuc_width)
855 935a568c Florent Chuffart
856 935a568c Florent Chuffart
Arguments
857 935a568c Florent Chuffart
~~~~~~~~~
858 935a568c Florent Chuffart
859 935a568c Florent Chuffart
``reads``
860 935a568c Florent Chuffart
861 935a568c Florent Chuffart
TemplateFilter input reads
862 935a568c Florent Chuffart
863 935a568c Florent Chuffart
``nuc_width``
864 935a568c Florent Chuffart
865 935a568c Florent Chuffart
Width used to shift F and R reads.
866 935a568c Florent Chuffart
867 935a568c Florent Chuffart
Value
868 935a568c Florent Chuffart
~~~~~
869 935a568c Florent Chuffart
870 935a568c Florent Chuffart
Returns a list of F reads, R reads and joint/shifted F and R reads.
871 935a568c Florent Chuffart
872 935a568c Florent Chuffart
Author(s)
873 935a568c Florent Chuffart
~~~~~~~~~
874 935a568c Florent Chuffart
875 935a568c Florent Chuffart
Florent Chuffart
876 935a568c Florent Chuffart
877 935a568c Florent Chuffart
R: Retrieve Reads
878 935a568c Florent Chuffart
879 935a568c Florent Chuffart
Retrieve Reads
880 935a568c Florent Chuffart
--------------
881 935a568c Florent Chuffart
882 935a568c Florent Chuffart
Description
883 935a568c Florent Chuffart
~~~~~~~~~~~
884 935a568c Florent Chuffart
885 935a568c Florent Chuffart
Retrieve reads for a given marker, combi, form.
886 935a568c Florent Chuffart
887 935a568c Florent Chuffart
Usage
888 935a568c Florent Chuffart
~~~~~
889 935a568c Florent Chuffart
890 935a568c Florent Chuffart
::
891 935a568c Florent Chuffart
892 cc54c799 Florent Chuffart
    get_all_reads(marker, combi, form = "wp", config = NULL)
893 935a568c Florent Chuffart
894 935a568c Florent Chuffart
Arguments
895 935a568c Florent Chuffart
~~~~~~~~~
896 935a568c Florent Chuffart
897 935a568c Florent Chuffart
``marker``
898 935a568c Florent Chuffart
899 935a568c Florent Chuffart
The marker to considere.
900 935a568c Florent Chuffart
901 935a568c Florent Chuffart
``combi``
902 935a568c Florent Chuffart
903 935a568c Florent Chuffart
The starin combination to considere.
904 935a568c Florent Chuffart
905 935a568c Florent Chuffart
``form``
906 935a568c Florent Chuffart
907 935a568c Florent Chuffart
The nuc form to considere.
908 935a568c Florent Chuffart
909 cc54c799 Florent Chuffart
``config``
910 cc54c799 Florent Chuffart
911 cc54c799 Florent Chuffart
GLOBAL config variable
912 cc54c799 Florent Chuffart
913 935a568c Florent Chuffart
Author(s)
914 935a568c Florent Chuffart
~~~~~~~~~
915 935a568c Florent Chuffart
916 935a568c Florent Chuffart
Florent Chuffart
917 935a568c Florent Chuffart
918 935a568c Florent Chuffart
R: get comp strand
919 935a568c Florent Chuffart
920 935a568c Florent Chuffart
get comp strand
921 935a568c Florent Chuffart
---------------
922 935a568c Florent Chuffart
923 935a568c Florent Chuffart
Description
924 935a568c Florent Chuffart
~~~~~~~~~~~
925 935a568c Florent Chuffart
926 935a568c Florent Chuffart
Compute the complementatry strand.
927 935a568c Florent Chuffart
928 935a568c Florent Chuffart
Usage
929 935a568c Florent Chuffart
~~~~~
930 935a568c Florent Chuffart
931 935a568c Florent Chuffart
::
932 935a568c Florent Chuffart
933 935a568c Florent Chuffart
    get_comp_strand(strand)
934 935a568c Florent Chuffart
935 935a568c Florent Chuffart
Arguments
936 935a568c Florent Chuffart
~~~~~~~~~
937 935a568c Florent Chuffart
938 935a568c Florent Chuffart
``strand``
939 935a568c Florent Chuffart
940 935a568c Florent Chuffart
The original strand.
941 935a568c Florent Chuffart
942 935a568c Florent Chuffart
Value
943 935a568c Florent Chuffart
~~~~~
944 935a568c Florent Chuffart
945 935a568c Florent Chuffart
Returns the complementatry strand.
946 935a568c Florent Chuffart
947 935a568c Florent Chuffart
Author(s)
948 935a568c Florent Chuffart
~~~~~~~~~
949 935a568c Florent Chuffart
950 935a568c Florent Chuffart
Florent Chuffart
951 935a568c Florent Chuffart
952 935a568c Florent Chuffart
R: Build the design for deseq
953 935a568c Florent Chuffart
954 935a568c Florent Chuffart
Build the design for deseq
955 935a568c Florent Chuffart
--------------------------
956 935a568c Florent Chuffart
957 935a568c Florent Chuffart
Description
958 935a568c Florent Chuffart
~~~~~~~~~~~
959 935a568c Florent Chuffart
960 935a568c Florent Chuffart
This function build the design according sample properties.
961 935a568c Florent Chuffart
962 935a568c Florent Chuffart
Usage
963 935a568c Florent Chuffart
~~~~~
964 935a568c Florent Chuffart
965 935a568c Florent Chuffart
::
966 935a568c Florent Chuffart
967 935a568c Florent Chuffart
    get_design(marker, combi, all_samples)
968 935a568c Florent Chuffart
969 935a568c Florent Chuffart
Arguments
970 935a568c Florent Chuffart
~~~~~~~~~
971 935a568c Florent Chuffart
972 935a568c Florent Chuffart
``marker``
973 935a568c Florent Chuffart
974 935a568c Florent Chuffart
The marker to considere.
975 935a568c Florent Chuffart
976 935a568c Florent Chuffart
``combi``
977 935a568c Florent Chuffart
978 935a568c Florent Chuffart
The starin combination to considere.
979 935a568c Florent Chuffart
980 935a568c Florent Chuffart
``all_samples``
981 935a568c Florent Chuffart
982 935a568c Florent Chuffart
Global list of samples.
983 935a568c Florent Chuffart
984 935a568c Florent Chuffart
Author(s)
985 935a568c Florent Chuffart
~~~~~~~~~
986 935a568c Florent Chuffart
987 935a568c Florent Chuffart
Florent Chuffart
988 935a568c Florent Chuffart
989 9fdbfada Florent Chuffart
R: Compute the fuzzy list for a given strain.
990 9fdbfada Florent Chuffart
991 9fdbfada Florent Chuffart
Compute the fuzzy list for a given strain.
992 9fdbfada Florent Chuffart
------------------------------------------
993 9fdbfada Florent Chuffart
994 9fdbfada Florent Chuffart
Description
995 9fdbfada Florent Chuffart
~~~~~~~~~~~
996 9fdbfada Florent Chuffart
997 9fdbfada Florent Chuffart
This function grabs the nucleosomes detxted by template\_filter that
998 9fdbfada Florent Chuffart
have been rejected bt aggregate\_intra\_strain\_nucs as well positions.
999 9fdbfada Florent Chuffart
1000 9fdbfada Florent Chuffart
Usage
1001 9fdbfada Florent Chuffart
~~~~~
1002 9fdbfada Florent Chuffart
1003 9fdbfada Florent Chuffart
::
1004 9fdbfada Florent Chuffart
1005 9fdbfada Florent Chuffart
    get_intra_strain_fuzzy(wp_maps, roi, strain, config = NULL)
1006 9fdbfada Florent Chuffart
1007 9fdbfada Florent Chuffart
Arguments
1008 9fdbfada Florent Chuffart
~~~~~~~~~
1009 9fdbfada Florent Chuffart
1010 9fdbfada Florent Chuffart
``wp_maps``
1011 9fdbfada Florent Chuffart
1012 9fdbfada Florent Chuffart
Well positionned nucleosomes map.
1013 9fdbfada Florent Chuffart
1014 9fdbfada Florent Chuffart
``roi``
1015 9fdbfada Florent Chuffart
1016 9fdbfada Florent Chuffart
The region of interest.
1017 9fdbfada Florent Chuffart
1018 9fdbfada Florent Chuffart
``strain``
1019 9fdbfada Florent Chuffart
1020 9fdbfada Florent Chuffart
The strain we want to extracvt the fuzzy map.
1021 9fdbfada Florent Chuffart
1022 9fdbfada Florent Chuffart
``config``
1023 9fdbfada Florent Chuffart
1024 9fdbfada Florent Chuffart
GLOBAL config variable.
1025 9fdbfada Florent Chuffart
1026 9fdbfada Florent Chuffart
Author(s)
1027 9fdbfada Florent Chuffart
~~~~~~~~~
1028 9fdbfada Florent Chuffart
1029 9fdbfada Florent Chuffart
Florent Chuffart
1030 9fdbfada Florent Chuffart
1031 935a568c Florent Chuffart
R: Compute the list of SNEPs for a given set of marker, strain...
1032 935a568c Florent Chuffart
1033 935a568c Florent Chuffart
Compute the list of SNEPs for a given set of marker, strain combination and nuc form.
1034 935a568c Florent Chuffart
-------------------------------------------------------------------------------------
1035 935a568c Florent Chuffart
1036 935a568c Florent Chuffart
Description
1037 935a568c Florent Chuffart
~~~~~~~~~~~
1038 935a568c Florent Chuffart
1039 935a568c Florent Chuffart
This function uses
1040 935a568c Florent Chuffart
1041 935a568c Florent Chuffart
Usage
1042 935a568c Florent Chuffart
~~~~~
1043 935a568c Florent Chuffart
1044 935a568c Florent Chuffart
::
1045 935a568c Florent Chuffart
1046 cc54c799 Florent Chuffart
    get_sneps(marker, combi, form, all_samples, config = NULL)
1047 935a568c Florent Chuffart
1048 935a568c Florent Chuffart
Arguments
1049 935a568c Florent Chuffart
~~~~~~~~~
1050 935a568c Florent Chuffart
1051 935a568c Florent Chuffart
``marker``
1052 935a568c Florent Chuffart
1053 935a568c Florent Chuffart
The marker involved.
1054 935a568c Florent Chuffart
1055 935a568c Florent Chuffart
``combi``
1056 935a568c Florent Chuffart
1057 935a568c Florent Chuffart
The strain combination involved.
1058 935a568c Florent Chuffart
1059 935a568c Florent Chuffart
``form``
1060 935a568c Florent Chuffart
1061 935a568c Florent Chuffart
the nuc form involved.
1062 935a568c Florent Chuffart
1063 935a568c Florent Chuffart
``all_samples``
1064 935a568c Florent Chuffart
1065 935a568c Florent Chuffart
Global list of samples.
1066 935a568c Florent Chuffart
1067 cc54c799 Florent Chuffart
``config``
1068 cc54c799 Florent Chuffart
1069 cc54c799 Florent Chuffart
GLOBAL config variable
1070 cc54c799 Florent Chuffart
1071 935a568c Florent Chuffart
Author(s)
1072 935a568c Florent Chuffart
~~~~~~~~~
1073 935a568c Florent Chuffart
1074 935a568c Florent Chuffart
Florent Chuffart
1075 935a568c Florent Chuffart
1076 935a568c Florent Chuffart
Examples
1077 935a568c Florent Chuffart
~~~~~~~~
1078 935a568c Florent Chuffart
1079 935a568c Florent Chuffart
::
1080 935a568c Florent Chuffart
1081 935a568c Florent Chuffart
    marker = "H3K4me1"
1082 55c1cdff Florent Chuffart
    combi = c("BY", "YJM")
1083 935a568c Florent Chuffart
    form = "wpfuzzy" # "wp" | "fuzzy" | "wpfuzzy"
1084 935a568c Florent Chuffart
    # foo = get_sneps(marker, combi, form)
1085 935a568c Florent Chuffart
    # foo = get_sneps("H4K12ac", c("BY", "RM"), "wp")
1086 935a568c Florent Chuffart
1087 9fdbfada Florent Chuffart
R: Compute the unaligned nucleosomal regions (UNRs).
1088 9fdbfada Florent Chuffart
1089 9fdbfada Florent Chuffart
Compute the unaligned nucleosomal regions (UNRs).
1090 9fdbfada Florent Chuffart
-------------------------------------------------
1091 9fdbfada Florent Chuffart
1092 9fdbfada Florent Chuffart
Description
1093 9fdbfada Florent Chuffart
~~~~~~~~~~~
1094 9fdbfada Florent Chuffart
1095 9fdbfada Florent Chuffart
This function aggregate non common wp nucs for each strain and substract
1096 9fdbfada Florent Chuffart
common wp nucs. It does not take care about the size of the resulting
1097 9fdbfada Florent Chuffart
UNR. It will be take into account in the count read part og the
1098 9fdbfada Florent Chuffart
pipeline.
1099 9fdbfada Florent Chuffart
1100 9fdbfada Florent Chuffart
Usage
1101 9fdbfada Florent Chuffart
~~~~~
1102 9fdbfada Florent Chuffart
1103 9fdbfada Florent Chuffart
::
1104 9fdbfada Florent Chuffart
1105 9fdbfada Florent Chuffart
    get_unrs(combi, roi, roi_index, wp_maps, fuzzy_maps, common_nuc_results, 
1106 9fdbfada Florent Chuffart
        config = NULL)
1107 9fdbfada Florent Chuffart
1108 9fdbfada Florent Chuffart
Arguments
1109 9fdbfada Florent Chuffart
~~~~~~~~~
1110 9fdbfada Florent Chuffart
1111 9fdbfada Florent Chuffart
``combi``
1112 9fdbfada Florent Chuffart
1113 9fdbfada Florent Chuffart
The strain combination to consider.
1114 9fdbfada Florent Chuffart
1115 9fdbfada Florent Chuffart
``roi``
1116 9fdbfada Florent Chuffart
1117 9fdbfada Florent Chuffart
The region of interest.
1118 9fdbfada Florent Chuffart
1119 9fdbfada Florent Chuffart
``roi_index``
1120 9fdbfada Florent Chuffart
1121 9fdbfada Florent Chuffart
The region of interest index.
1122 9fdbfada Florent Chuffart
1123 9fdbfada Florent Chuffart
``wp_maps``
1124 9fdbfada Florent Chuffart
1125 9fdbfada Florent Chuffart
Well positionned nucleosomes maps.
1126 9fdbfada Florent Chuffart
1127 9fdbfada Florent Chuffart
``fuzzy_maps``
1128 9fdbfada Florent Chuffart
1129 9fdbfada Florent Chuffart
Fuzzy nucleosomes maps.
1130 9fdbfada Florent Chuffart
1131 9fdbfada Florent Chuffart
``common_nuc_results``
1132 9fdbfada Florent Chuffart
1133 9fdbfada Florent Chuffart
Common wp nuc maps
1134 9fdbfada Florent Chuffart
1135 9fdbfada Florent Chuffart
``config``
1136 9fdbfada Florent Chuffart
1137 9fdbfada Florent Chuffart
GLOBAL config variable
1138 9fdbfada Florent Chuffart
1139 9fdbfada Florent Chuffart
Author(s)
1140 9fdbfada Florent Chuffart
~~~~~~~~~
1141 9fdbfada Florent Chuffart
1142 9fdbfada Florent Chuffart
Florent Chuffart
1143 9fdbfada Florent Chuffart
1144 5bfac5a3 Florent Chuffart
R: Returns the intersection of 2 list on regions.
1145 5bfac5a3 Florent Chuffart
1146 5bfac5a3 Florent Chuffart
Returns the intersection of 2 list on regions.
1147 5bfac5a3 Florent Chuffart
----------------------------------------------
1148 5bfac5a3 Florent Chuffart
1149 5bfac5a3 Florent Chuffart
Description
1150 5bfac5a3 Florent Chuffart
~~~~~~~~~~~
1151 5bfac5a3 Florent Chuffart
1152 5bfac5a3 Florent Chuffart
This function...
1153 5bfac5a3 Florent Chuffart
1154 5bfac5a3 Florent Chuffart
Usage
1155 5bfac5a3 Florent Chuffart
~~~~~
1156 5bfac5a3 Florent Chuffart
1157 5bfac5a3 Florent Chuffart
::
1158 5bfac5a3 Florent Chuffart
1159 5bfac5a3 Florent Chuffart
    intersect_region(region1, region2)
1160 5bfac5a3 Florent Chuffart
1161 5bfac5a3 Florent Chuffart
Arguments
1162 5bfac5a3 Florent Chuffart
~~~~~~~~~
1163 5bfac5a3 Florent Chuffart
1164 5bfac5a3 Florent Chuffart
``region1``
1165 5bfac5a3 Florent Chuffart
1166 5bfac5a3 Florent Chuffart
Original regions.
1167 5bfac5a3 Florent Chuffart
1168 5bfac5a3 Florent Chuffart
``region2``
1169 5bfac5a3 Florent Chuffart
1170 5bfac5a3 Florent Chuffart
Regions to intersect.
1171 5bfac5a3 Florent Chuffart
1172 5bfac5a3 Florent Chuffart
Author(s)
1173 5bfac5a3 Florent Chuffart
~~~~~~~~~
1174 5bfac5a3 Florent Chuffart
1175 5bfac5a3 Florent Chuffart
Florent Chuffart
1176 5bfac5a3 Florent Chuffart
1177 935a568c Florent Chuffart
R: Likelihood ratio
1178 935a568c Florent Chuffart
1179 935a568c Florent Chuffart
Likelihood ratio
1180 935a568c Florent Chuffart
----------------
1181 935a568c Florent Chuffart
1182 935a568c Florent Chuffart
Description
1183 935a568c Florent Chuffart
~~~~~~~~~~~
1184 935a568c Florent Chuffart
1185 935a568c Florent Chuffart
Compute the likelihood log of two set of value from two models Vs. a
1186 935a568c Florent Chuffart
unique model.
1187 935a568c Florent Chuffart
1188 935a568c Florent Chuffart
Usage
1189 935a568c Florent Chuffart
~~~~~
1190 935a568c Florent Chuffart
1191 935a568c Florent Chuffart
::
1192 935a568c Florent Chuffart
1193 935a568c Florent Chuffart
    lod_score_vecs(x, y)
1194 935a568c Florent Chuffart
1195 935a568c Florent Chuffart
Arguments
1196 935a568c Florent Chuffart
~~~~~~~~~
1197 935a568c Florent Chuffart
1198 935a568c Florent Chuffart
``x``
1199 935a568c Florent Chuffart
1200 935a568c Florent Chuffart
First vector.
1201 935a568c Florent Chuffart
1202 935a568c Florent Chuffart
``y``
1203 935a568c Florent Chuffart
1204 935a568c Florent Chuffart
Second vector.
1205 935a568c Florent Chuffart
1206 935a568c Florent Chuffart
Value
1207 935a568c Florent Chuffart
~~~~~
1208 935a568c Florent Chuffart
1209 935a568c Florent Chuffart
Returns the likelihood ratio.
1210 935a568c Florent Chuffart
1211 935a568c Florent Chuffart
Author(s)
1212 935a568c Florent Chuffart
~~~~~~~~~
1213 935a568c Florent Chuffart
1214 935a568c Florent Chuffart
Florent Chuffart
1215 935a568c Florent Chuffart
1216 935a568c Florent Chuffart
Examples
1217 935a568c Florent Chuffart
~~~~~~~~
1218 935a568c Florent Chuffart
1219 935a568c Florent Chuffart
::
1220 935a568c Florent Chuffart
1221 935a568c Florent Chuffart
    # LOD score for 2 set of values
1222 935a568c Florent Chuffart
    mean1=5; sd1=2; card2 = 250
1223 935a568c Florent Chuffart
    mean2=6; sd2=3; card1 = 200
1224 935a568c Florent Chuffart
    x1 = rnorm(card1, mean1, sd1)
1225 55c1cdff Florent Chuffart
    x2 = rnorm(card2, mean2, sd2)
1226 935a568c Florent Chuffart
    min = floor(min(c(x1,x2)))
1227 935a568c Florent Chuffart
    max = ceiling(max(c(x1,x2)))
1228 935a568c Florent Chuffart
    hist(c(x1,x2), xlim=c(min, max), breaks=min:max)
1229 935a568c Florent Chuffart
    lines(min:max,dnorm(min:max,mean1,sd1)*card1,col=2)
1230 935a568c Florent Chuffart
    lines(min:max,dnorm(min:max,mean2,sd2)*card2,col=3)
1231 935a568c Florent Chuffart
    lines(min:max,dnorm(min:max,mean(c(x1,x2)),sd(c(x1,x2)))*card2,col=4)
1232 935a568c Florent Chuffart
    lod_score_vecs(x1,x2)
1233 935a568c Florent Chuffart
1234 935a568c Florent Chuffart
R: nm
1235 935a568c Florent Chuffart
1236 935a568c Florent Chuffart
nm
1237 935a568c Florent Chuffart
--
1238 935a568c Florent Chuffart
1239 935a568c Florent Chuffart
Description
1240 935a568c Florent Chuffart
~~~~~~~~~~~
1241 935a568c Florent Chuffart
1242 935a568c Florent Chuffart
It provides a set of useful functions allowing to perform quantitative
1243 935a568c Florent Chuffart
analysis of nucleosomal epigenome.
1244 935a568c Florent Chuffart
1245 935a568c Florent Chuffart
Details
1246 935a568c Florent Chuffart
~~~~~~~
1247 935a568c Florent Chuffart
1248 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1249 935a568c Florent Chuffart
| Package:      | nucleominer                                       |
1250 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1251 935a568c Florent Chuffart
| Maintainer:   | Florent Chuffart <florent.chuffart@ens-lyon.fr>   |
1252 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1253 935a568c Florent Chuffart
| Author:       | Florent Chuffart                                  |
1254 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1255 9fdbfada Florent Chuffart
| Version:      | 2.3.33                                            |
1256 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1257 935a568c Florent Chuffart
| License:      | CeCILL                                            |
1258 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1259 935a568c Florent Chuffart
| Title:        | nm                                                |
1260 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1261 7164d3ac Florent Chuffart
| Depends:      | seqinr, plotrix, DESeq, cachecache                |
1262 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1263 935a568c Florent Chuffart
1264 935a568c Florent Chuffart
Author(s)
1265 935a568c Florent Chuffart
~~~~~~~~~
1266 935a568c Florent Chuffart
1267 935a568c Florent Chuffart
Florent Chuffart
1268 935a568c Florent Chuffart
1269 935a568c Florent Chuffart
R: Plot the distribution of reads.
1270 935a568c Florent Chuffart
1271 935a568c Florent Chuffart
Plot the distribution of reads.
1272 935a568c Florent Chuffart
-------------------------------
1273 935a568c Florent Chuffart
1274 935a568c Florent Chuffart
Description
1275 935a568c Florent Chuffart
~~~~~~~~~~~
1276 935a568c Florent Chuffart
1277 935a568c Florent Chuffart
This fuxntion use the deseq nomalization feature to compare
1278 935a568c Florent Chuffart
qualitatively the distribution.
1279 935a568c Florent Chuffart
1280 935a568c Florent Chuffart
Usage
1281 935a568c Florent Chuffart
~~~~~
1282 935a568c Florent Chuffart
1283 935a568c Florent Chuffart
::
1284 935a568c Florent Chuffart
1285 935a568c Florent Chuffart
    plot_dist_samples(strain, marker, res, all_samples, NEWPLOT = TRUE)
1286 935a568c Florent Chuffart
1287 935a568c Florent Chuffart
Arguments
1288 935a568c Florent Chuffart
~~~~~~~~~
1289 935a568c Florent Chuffart
1290 935a568c Florent Chuffart
``strain``
1291 935a568c Florent Chuffart
1292 935a568c Florent Chuffart
The strain to considere.
1293 935a568c Florent Chuffart
1294 935a568c Florent Chuffart
``marker``
1295 935a568c Florent Chuffart
1296 935a568c Florent Chuffart
The marker to considere.
1297 935a568c Florent Chuffart
1298 935a568c Florent Chuffart
``res``
1299 935a568c Florent Chuffart
1300 935a568c Florent Chuffart
Data
1301 935a568c Florent Chuffart
1302 935a568c Florent Chuffart
``all_samples``
1303 935a568c Florent Chuffart
1304 935a568c Florent Chuffart
Global list of samples.
1305 935a568c Florent Chuffart
1306 935a568c Florent Chuffart
``NEWPLOT``
1307 935a568c Florent Chuffart
1308 935a568c Florent Chuffart
If FALSE the curve will be add to the current plot.
1309 935a568c Florent Chuffart
1310 935a568c Florent Chuffart
Author(s)
1311 935a568c Florent Chuffart
~~~~~~~~~
1312 935a568c Florent Chuffart
1313 935a568c Florent Chuffart
Florent Chuffart
1314 935a568c Florent Chuffart
1315 935a568c Florent Chuffart
R: sign from strand
1316 935a568c Florent Chuffart
1317 935a568c Florent Chuffart
sign from strand
1318 935a568c Florent Chuffart
----------------
1319 935a568c Florent Chuffart
1320 935a568c Florent Chuffart
Description
1321 935a568c Florent Chuffart
~~~~~~~~~~~
1322 935a568c Florent Chuffart
1323 935a568c Florent Chuffart
Get the sign of strand
1324 935a568c Florent Chuffart
1325 935a568c Florent Chuffart
Usage
1326 935a568c Florent Chuffart
~~~~~
1327 935a568c Florent Chuffart
1328 935a568c Florent Chuffart
::
1329 935a568c Florent Chuffart
1330 935a568c Florent Chuffart
    sign_from_strand(strands)
1331 935a568c Florent Chuffart
1332 935a568c Florent Chuffart
Arguments
1333 935a568c Florent Chuffart
~~~~~~~~~
1334 935a568c Florent Chuffart
1335 935a568c Florent Chuffart
+---------------+----+
1336 935a568c Florent Chuffart
| ``strands``   |    |
1337 935a568c Florent Chuffart
+---------------+----+
1338 935a568c Florent Chuffart
1339 935a568c Florent Chuffart
Value
1340 935a568c Florent Chuffart
~~~~~
1341 935a568c Florent Chuffart
1342 935a568c Florent Chuffart
If strand in forward then returns 1 else returns -1
1343 935a568c Florent Chuffart
1344 935a568c Florent Chuffart
Author(s)
1345 935a568c Florent Chuffart
~~~~~~~~~
1346 935a568c Florent Chuffart
1347 935a568c Florent Chuffart
Florent Chuffart
1348 935a568c Florent Chuffart
1349 935a568c Florent Chuffart
R: Substract to a list of regions an other list of regions that...
1350 935a568c Florent Chuffart
1351 935a568c Florent Chuffart
Substract to a list of regions an other list of regions that intersect it.
1352 935a568c Florent Chuffart
--------------------------------------------------------------------------
1353 935a568c Florent Chuffart
1354 935a568c Florent Chuffart
Description
1355 935a568c Florent Chuffart
~~~~~~~~~~~
1356 935a568c Florent Chuffart
1357 935a568c Florent Chuffart
This fucntion embed a recursive part. It occurs when a substracted
1358 935a568c Florent Chuffart
region split an original region on two.
1359 935a568c Florent Chuffart
1360 935a568c Florent Chuffart
Usage
1361 935a568c Florent Chuffart
~~~~~
1362 935a568c Florent Chuffart
1363 935a568c Florent Chuffart
::
1364 935a568c Florent Chuffart
1365 935a568c Florent Chuffart
    substract_region(region1, region2)
1366 935a568c Florent Chuffart
1367 935a568c Florent Chuffart
Arguments
1368 935a568c Florent Chuffart
~~~~~~~~~
1369 935a568c Florent Chuffart
1370 935a568c Florent Chuffart
``region1``
1371 935a568c Florent Chuffart
1372 935a568c Florent Chuffart
Original regions.
1373 935a568c Florent Chuffart
1374 935a568c Florent Chuffart
``region2``
1375 935a568c Florent Chuffart
1376 935a568c Florent Chuffart
Regions to substract.
1377 935a568c Florent Chuffart
1378 935a568c Florent Chuffart
Author(s)
1379 935a568c Florent Chuffart
~~~~~~~~~
1380 935a568c Florent Chuffart
1381 935a568c Florent Chuffart
Florent Chuffart
1382 935a568c Florent Chuffart
1383 1d833b97 Florent Chuffart
R: Switch a pairlist
1384 1d833b97 Florent Chuffart
1385 1d833b97 Florent Chuffart
Switch a pairlist
1386 1d833b97 Florent Chuffart
-----------------
1387 1d833b97 Florent Chuffart
1388 1d833b97 Florent Chuffart
Description
1389 1d833b97 Florent Chuffart
~~~~~~~~~~~
1390 1d833b97 Florent Chuffart
1391 1d833b97 Florent Chuffart
Take a pairlist key:value and return the switched pairlist value:key.
1392 1d833b97 Florent Chuffart
1393 1d833b97 Florent Chuffart
Usage
1394 1d833b97 Florent Chuffart
~~~~~
1395 1d833b97 Florent Chuffart
1396 1d833b97 Florent Chuffart
::
1397 1d833b97 Florent Chuffart
1398 1d833b97 Florent Chuffart
    switch_pairlist(l)
1399 1d833b97 Florent Chuffart
1400 1d833b97 Florent Chuffart
Arguments
1401 1d833b97 Florent Chuffart
~~~~~~~~~
1402 1d833b97 Florent Chuffart
1403 1d833b97 Florent Chuffart
``l``
1404 1d833b97 Florent Chuffart
1405 1d833b97 Florent Chuffart
The pairlist to switch.
1406 1d833b97 Florent Chuffart
1407 1d833b97 Florent Chuffart
Value
1408 1d833b97 Florent Chuffart
~~~~~
1409 1d833b97 Florent Chuffart
1410 1d833b97 Florent Chuffart
The switched pairlist.
1411 1d833b97 Florent Chuffart
1412 1d833b97 Florent Chuffart
Author(s)
1413 1d833b97 Florent Chuffart
~~~~~~~~~
1414 1d833b97 Florent Chuffart
1415 1d833b97 Florent Chuffart
Florent Chuffart
1416 1d833b97 Florent Chuffart
1417 1d833b97 Florent Chuffart
Examples
1418 1d833b97 Florent Chuffart
~~~~~~~~
1419 1d833b97 Florent Chuffart
1420 1d833b97 Florent Chuffart
::
1421 1d833b97 Florent Chuffart
1422 1d833b97 Florent Chuffart
    l = list(key1 = "value1", key2 = "value2")
1423 1d833b97 Florent Chuffart
    print(switch_pairlist(l))
1424 1d833b97 Florent Chuffart
1425 935a568c Florent Chuffart
R: Translate a list of regions from a strain ref to another.
1426 935a568c Florent Chuffart
1427 935a568c Florent Chuffart
Translate a list of regions from a strain ref to another.
1428 935a568c Florent Chuffart
---------------------------------------------------------
1429 935a568c Florent Chuffart
1430 935a568c Florent Chuffart
Description
1431 935a568c Florent Chuffart
~~~~~~~~~~~
1432 935a568c Florent Chuffart
1433 935a568c Florent Chuffart
This function is an eloborated call to translate\_roi.
1434 935a568c Florent Chuffart
1435 935a568c Florent Chuffart
Usage
1436 935a568c Florent Chuffart
~~~~~
1437 935a568c Florent Chuffart
1438 935a568c Florent Chuffart
::
1439 935a568c Florent Chuffart
1440 1d833b97 Florent Chuffart
    translate_regions(regions, combi, roi_index, config = NULL, roi)
1441 935a568c Florent Chuffart
1442 935a568c Florent Chuffart
Arguments
1443 935a568c Florent Chuffart
~~~~~~~~~
1444 935a568c Florent Chuffart
1445 935a568c Florent Chuffart
``regions``
1446 935a568c Florent Chuffart
1447 935a568c Florent Chuffart
Regions to be translated.
1448 935a568c Florent Chuffart
1449 935a568c Florent Chuffart
``combi``
1450 935a568c Florent Chuffart
1451 935a568c Florent Chuffart
Combination of strains.
1452 935a568c Florent Chuffart
1453 935a568c Florent Chuffart
``roi_index``
1454 935a568c Florent Chuffart
1455 935a568c Florent Chuffart
The region of interest index.
1456 935a568c Florent Chuffart
1457 1d833b97 Florent Chuffart
``config``
1458 1d833b97 Florent Chuffart
1459 1d833b97 Florent Chuffart
GLOBAL config variable
1460 1d833b97 Florent Chuffart
1461 935a568c Florent Chuffart
``roi``
1462 935a568c Florent Chuffart
1463 935a568c Florent Chuffart
The region of interest.
1464 935a568c Florent Chuffart
1465 935a568c Florent Chuffart
Author(s)
1466 935a568c Florent Chuffart
~~~~~~~~~
1467 935a568c Florent Chuffart
1468 935a568c Florent Chuffart
Florent Chuffart
1469 935a568c Florent Chuffart
1470 935a568c Florent Chuffart
R: Translate coords of a genome region.
1471 935a568c Florent Chuffart
1472 935a568c Florent Chuffart
Translate coords of a genome region.
1473 935a568c Florent Chuffart
------------------------------------
1474 935a568c Florent Chuffart
1475 935a568c Florent Chuffart
Description
1476 935a568c Florent Chuffart
~~~~~~~~~~~
1477 935a568c Florent Chuffart
1478 935a568c Florent Chuffart
This function is used in the examples, usualy you have to define your
1479 935a568c Florent Chuffart
own translation function and overwrite this one using *unlockBinding*
1480 935a568c Florent Chuffart
features. Please, refer to the example.
1481 935a568c Florent Chuffart
1482 935a568c Florent Chuffart
Usage
1483 935a568c Florent Chuffart
~~~~~
1484 935a568c Florent Chuffart
1485 935a568c Florent Chuffart
::
1486 935a568c Florent Chuffart
1487 1d833b97 Florent Chuffart
    translate_roi(roi, strain2, config = NULL, big_roi = NULL)
1488 935a568c Florent Chuffart
1489 935a568c Florent Chuffart
Arguments
1490 935a568c Florent Chuffart
~~~~~~~~~
1491 935a568c Florent Chuffart
1492 935a568c Florent Chuffart
``roi``
1493 935a568c Florent Chuffart
1494 935a568c Florent Chuffart
Original genome region of interest.
1495 935a568c Florent Chuffart
1496 935a568c Florent Chuffart
``strain2``
1497 935a568c Florent Chuffart
1498 935a568c Florent Chuffart
The strain in wich you want the genome region of interest.
1499 935a568c Florent Chuffart
1500 1d833b97 Florent Chuffart
``config``
1501 935a568c Florent Chuffart
1502 1d833b97 Florent Chuffart
GLOBAL config variable
1503 935a568c Florent Chuffart
1504 1d833b97 Florent Chuffart
``big_roi``
1505 935a568c Florent Chuffart
1506 1d833b97 Florent Chuffart
A largest region than roi use to filter c2c if it is needed.
1507 935a568c Florent Chuffart
1508 935a568c Florent Chuffart
Author(s)
1509 935a568c Florent Chuffart
~~~~~~~~~
1510 935a568c Florent Chuffart
1511 935a568c Florent Chuffart
Florent Chuffart
1512 935a568c Florent Chuffart
1513 935a568c Florent Chuffart
Examples
1514 935a568c Florent Chuffart
~~~~~~~~
1515 935a568c Florent Chuffart
1516 935a568c Florent Chuffart
::
1517 935a568c Florent Chuffart
1518 935a568c Florent Chuffart
    # Define new translate_roi function...
1519 1d833b97 Florent Chuffart
    translate_roi = function(roi, strain2, config) {
1520 935a568c Florent Chuffart
        strain1 = roi$strain_ref
1521 935a568c Florent Chuffart
        if (strain1 == strain2) {
1522 935a568c Florent Chuffart
            return(roi)
1523 935a568c Florent Chuffart
        } else {
1524 5bfac5a3 Florent Chuffart
          stop("Here is my new translate_roi function...")
1525 5bfac5a3 Florent Chuffart
        }
1526 935a568c Florent Chuffart
    }
1527 935a568c Florent Chuffart
    # Binding it by uncomment follwing lines.
1528 935a568c Florent Chuffart
    # unlockBinding("translate_roi", as.environment("package:nm"))
1529 935a568c Florent Chuffart
    # unlockBinding("translate_roi", getNamespace("nm"))
1530 935a568c Florent Chuffart
    # assign("translate_roi", translate_roi, "package:nm")
1531 935a568c Florent Chuffart
    # assign("translate_roi", translate_roi, getNamespace("nm"))
1532 935a568c Florent Chuffart
    # lockBinding("translate_roi", getNamespace("nm"))
1533 5bfac5a3 Florent Chuffart
    # lockBinding("translate_roi", as.environment("package:nm"))
1534 935a568c Florent Chuffart
1535 935a568c Florent Chuffart
R: Aggregate regions that intersect themnselves.
1536 935a568c Florent Chuffart
1537 935a568c Florent Chuffart
Aggregate regions that intersect themnselves.
1538 935a568c Florent Chuffart
---------------------------------------------
1539 935a568c Florent Chuffart
1540 935a568c Florent Chuffart
Description
1541 935a568c Florent Chuffart
~~~~~~~~~~~
1542 935a568c Florent Chuffart
1543 935a568c Florent Chuffart
This function is based on sort of lower bounds to detect regions that
1544 935a568c Florent Chuffart
intersect. We compare lower bound and upper bound of the porevious item.
1545 935a568c Florent Chuffart
This function embed a while loop and break break regions list become
1546 935a568c Florent Chuffart
stable.
1547 935a568c Florent Chuffart
1548 935a568c Florent Chuffart
Usage
1549 935a568c Florent Chuffart
~~~~~
1550 935a568c Florent Chuffart
1551 935a568c Florent Chuffart
::
1552 935a568c Florent Chuffart
1553 935a568c Florent Chuffart
    union_regions(regions)
1554 935a568c Florent Chuffart
1555 935a568c Florent Chuffart
Arguments
1556 935a568c Florent Chuffart
~~~~~~~~~
1557 935a568c Florent Chuffart
1558 935a568c Florent Chuffart
``regions``
1559 935a568c Florent Chuffart
1560 935a568c Florent Chuffart
The Regions to be aggregated
1561 935a568c Florent Chuffart
1562 935a568c Florent Chuffart
Author(s)
1563 935a568c Florent Chuffart
~~~~~~~~~
1564 935a568c Florent Chuffart
1565 935a568c Florent Chuffart
Florent Chuffart
1566 935a568c Florent Chuffart
1567 935a568c Florent Chuffart
R: Watching analysis of samples
1568 935a568c Florent Chuffart
1569 935a568c Florent Chuffart
Watching analysis of samples
1570 935a568c Florent Chuffart
----------------------------
1571 935a568c Florent Chuffart
1572 935a568c Florent Chuffart
Description
1573 935a568c Florent Chuffart
~~~~~~~~~~~
1574 935a568c Florent Chuffart
1575 935a568c Florent Chuffart
This function allows to view analysis for a particuler region of the
1576 935a568c Florent Chuffart
genome.
1577 935a568c Florent Chuffart
1578 935a568c Florent Chuffart
Usage
1579 935a568c Florent Chuffart
~~~~~
1580 935a568c Florent Chuffart
1581 935a568c Florent Chuffart
::
1582 935a568c Florent Chuffart
1583 935a568c Florent Chuffart
    watch_samples(replicates, read_length, plot_ref_genome = TRUE, 
1584 935a568c Florent Chuffart
        plot_arrow_raw_reads = TRUE, plot_arrow_nuc_reads = TRUE, 
1585 935a568c Florent Chuffart
        plot_squared_reads = TRUE, plot_coverage = FALSE, plot_gaussian_reads = TRUE, 
1586 935a568c Florent Chuffart
        plot_gaussian_unified_reads = TRUE, plot_ellipse_nucs = TRUE, 
1587 9fdbfada Florent Chuffart
        change_col = TRUE, plot_wp_nucs = TRUE, plot_fuzzy_nucs = TRUE, 
1588 9fdbfada Florent Chuffart
        plot_wp_nuc_model = TRUE, plot_common_nucs = FALSE, plot_common_unrs = FALSE, 
1589 9fdbfada Florent Chuffart
        plot_wp_nucs_4_nonmnase = FALSE, plot_chain = FALSE, aggregated_intra_strain_nucs = NULL, 
1590 729c934e Florent Chuffart
        aligned_inter_strain_nucs = NULL, height = 10, config = NULL)
1591 935a568c Florent Chuffart
1592 935a568c Florent Chuffart
Arguments
1593 935a568c Florent Chuffart
~~~~~~~~~
1594 935a568c Florent Chuffart
1595 935a568c Florent Chuffart
``replicates``
1596 935a568c Florent Chuffart
1597 935a568c Florent Chuffart
replicates under the form...
1598 935a568c Florent Chuffart
1599 935a568c Florent Chuffart
``read_length``
1600 935a568c Florent Chuffart
1601 935a568c Florent Chuffart
length of the reads
1602 935a568c Florent Chuffart
1603 935a568c Florent Chuffart
``plot_ref_genome``
1604 935a568c Florent Chuffart
1605 935a568c Florent Chuffart
Plot (or not) reference genome.
1606 935a568c Florent Chuffart
1607 935a568c Florent Chuffart
``plot_arrow_raw_reads``
1608 935a568c Florent Chuffart
1609 935a568c Florent Chuffart
Plot (or not) arrows for raw reads.
1610 935a568c Florent Chuffart
1611 935a568c Florent Chuffart
``plot_arrow_nuc_reads``
1612 935a568c Florent Chuffart
1613 935a568c Florent Chuffart
Plot (or not) arrows for reads aasiocied to a nucleosome.
1614 935a568c Florent Chuffart
1615 935a568c Florent Chuffart
``plot_squared_reads``
1616 935a568c Florent Chuffart
1617 935a568c Florent Chuffart
Plot (or not) reads in the square fashion.
1618 935a568c Florent Chuffart
1619 935a568c Florent Chuffart
``plot_coverage``
1620 935a568c Florent Chuffart
1621 935a568c Florent Chuffart
Plot (or not) reads in the covergae fashion. fashion.
1622 935a568c Florent Chuffart
1623 935a568c Florent Chuffart
``plot_gaussian_reads``
1624 935a568c Florent Chuffart
1625 935a568c Florent Chuffart
Plot (or not) gaussian model of a F anf R reads.
1626 935a568c Florent Chuffart
1627 935a568c Florent Chuffart
``plot_gaussian_unified_reads``
1628 935a568c Florent Chuffart
1629 935a568c Florent Chuffart
Plot (or not) gaussian model of a nuc.
1630 935a568c Florent Chuffart
1631 935a568c Florent Chuffart
``plot_ellipse_nucs``
1632 935a568c Florent Chuffart
1633 935a568c Florent Chuffart
Plot (or not) ellipse for a nuc.
1634 935a568c Florent Chuffart
1635 7646593d Florent Chuffart
``change_col``
1636 7646593d Florent Chuffart
1637 7646593d Florent Chuffart
Change the color of each nucleosome.
1638 7646593d Florent Chuffart
1639 935a568c Florent Chuffart
``plot_wp_nucs``
1640 935a568c Florent Chuffart
1641 935a568c Florent Chuffart
Plot (or not) cluster of nucs
1642 935a568c Florent Chuffart
1643 9fdbfada Florent Chuffart
``plot_fuzzy_nucs``
1644 9fdbfada Florent Chuffart
1645 9fdbfada Florent Chuffart
Plot (or not) cluster of fuzzy
1646 9fdbfada Florent Chuffart
1647 935a568c Florent Chuffart
``plot_wp_nuc_model``
1648 935a568c Florent Chuffart
1649 935a568c Florent Chuffart
Plot (or not) gaussian model for a cluster of nucs
1650 935a568c Florent Chuffart
1651 935a568c Florent Chuffart
``plot_common_nucs``
1652 935a568c Florent Chuffart
1653 935a568c Florent Chuffart
Plot (or not) aligned reads.
1654 935a568c Florent Chuffart
1655 9fdbfada Florent Chuffart
``plot_common_unrs``
1656 9fdbfada Florent Chuffart
1657 9fdbfada Florent Chuffart
Plot (or not) unaligned nucleosomal refgions (UNRs).
1658 9fdbfada Florent Chuffart
1659 935a568c Florent Chuffart
``plot_wp_nucs_4_nonmnase``
1660 935a568c Florent Chuffart
1661 935a568c Florent Chuffart
Plot (or not) clusters for non inputs samples.
1662 935a568c Florent Chuffart
1663 729c934e Florent Chuffart
``plot_chain``
1664 729c934e Florent Chuffart
1665 729c934e Florent Chuffart
Plot (or not) clusterised nuceosomes between mnase samples.
1666 729c934e Florent Chuffart
1667 935a568c Florent Chuffart
``aggregated_intra_strain_nucs``
1668 935a568c Florent Chuffart
1669 935a568c Florent Chuffart
list of aggregated intra strain nucs. If NULL, it will be computed.
1670 935a568c Florent Chuffart
1671 935a568c Florent Chuffart
``aligned_inter_strain_nucs``
1672 935a568c Florent Chuffart
1673 935a568c Florent Chuffart
list of aligned inter strain nucs. If NULL, it will be computed.
1674 935a568c Florent Chuffart
1675 935a568c Florent Chuffart
``height``
1676 935a568c Florent Chuffart
1677 935a568c Florent Chuffart
Number of reads in per million read for each sample, graphical parametre
1678 935a568c Florent Chuffart
for the y axis.
1679 935a568c Florent Chuffart
1680 1d833b97 Florent Chuffart
``config``
1681 1d833b97 Florent Chuffart
1682 1d833b97 Florent Chuffart
GLOBAL config variable
1683 1d833b97 Florent Chuffart
1684 935a568c Florent Chuffart
Author(s)
1685 935a568c Florent Chuffart
~~~~~~~~~
1686 935a568c Florent Chuffart
1687 935a568c Florent Chuffart
Florent Chuffart