Statistiques
| Branche: | Révision :

root / doc / sphinx_doc / rref.rst @ d973538c

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