Statistiques
| Branche: | Révision :

root / doc / sphinx_doc / rref.rst @ dadb6a4d

Historique | Voir | Annoter | Télécharger (28,44 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 7e2d37e1 Florent Chuffart
function returns a list of clusters and all computed *llr\_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 7e2d37e1 Florent Chuffart
    aggregate_intra_strain_nucs(samples, llr_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 7e2d37e1 Florent Chuffart
``llr_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 7e2d37e1 Florent Chuffart
Returns a list of clusterized nucleosomes, and all computed llr 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 7e2d37e1 Florent Chuffart
        wp_nucs_strain_ref2 = NULL, corr_thres = 0.5, llr_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 7e2d37e1 Florent Chuffart
``llr_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 7e2d37e1 Florent Chuffart
Returns a list of clusterized nucleosomes, and all computed llr 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 4016229d Florent Chuffart
        # Define new translate_cur function...
241 4016229d Florent Chuffart
        translate_cur = function(roi, strain2, big_cur=NULL, config=NULL) {
242 1d833b97 Florent Chuffart
          return(roi)
243 1d833b97 Florent Chuffart
        }
244 1d833b97 Florent Chuffart
        # Binding it by uncomment follwing lines.
245 4016229d Florent Chuffart
        unlockBinding("translate_cur", as.environment("package:nucleominer"))
246 4016229d Florent Chuffart
        unlockBinding("translate_cur", getNamespace("nucleominer"))
247 4016229d Florent Chuffart
        assign("translate_cur", translate_cur, "package:nucleominer")
248 4016229d Florent Chuffart
        assign("translate_cur", translate_cur, getNamespace("nucleominer"))
249 4016229d Florent Chuffart
        lockBinding("translate_cur", getNamespace("nucleominer"))
250 4016229d Florent Chuffart
        lockBinding("translate_cur", 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 4016229d Florent Chuffart
    roi2 = translate_cur(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 4016229d Florent Chuffart
The fucntion is no more necessary since we remove "big\_cur" bug in
528 4016229d Florent Chuffart
translate\_cur 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 ec2936ea Florent Chuffart
area observerved properties, but also correlation and overlapping
749 ec2936ea Florent Chuffart
threshold.
750 935a568c Florent Chuffart
751 935a568c Florent Chuffart
Usage
752 935a568c Florent Chuffart
~~~~~
753 935a568c Florent Chuffart
754 935a568c Florent Chuffart
::
755 935a568c Florent Chuffart
756 935a568c Florent Chuffart
    filter_tf_outputs(tf_outputs, chr, x_min, x_max, nuc_width = 160, 
757 935a568c Florent Chuffart
        ol_bp = 59, corr_thres = 0.5)
758 935a568c Florent Chuffart
759 935a568c Florent Chuffart
Arguments
760 935a568c Florent Chuffart
~~~~~~~~~
761 935a568c Florent Chuffart
762 935a568c Florent Chuffart
``tf_outputs``
763 935a568c Florent Chuffart
764 935a568c Florent Chuffart
TemplateFilter outputs.
765 935a568c Florent Chuffart
766 935a568c Florent Chuffart
``chr``
767 935a568c Florent Chuffart
768 935a568c Florent Chuffart
Chromosome observed, here chr is an integer.
769 935a568c Florent Chuffart
770 935a568c Florent Chuffart
``x_min``
771 935a568c Florent Chuffart
772 935a568c Florent Chuffart
Coordinate of the first bp observed.
773 935a568c Florent Chuffart
774 935a568c Florent Chuffart
``x_max``
775 935a568c Florent Chuffart
776 935a568c Florent Chuffart
Coordinate of the last bp observed.
777 935a568c Florent Chuffart
778 935a568c Florent Chuffart
``nuc_width``
779 935a568c Florent Chuffart
780 935a568c Florent Chuffart
Nucleosome width.
781 935a568c Florent Chuffart
782 935a568c Florent Chuffart
``ol_bp``
783 935a568c Florent Chuffart
784 935a568c Florent Chuffart
Overlap Threshold.
785 935a568c Florent Chuffart
786 935a568c Florent Chuffart
``corr_thres``
787 935a568c Florent Chuffart
788 935a568c Florent Chuffart
Correlation threshold.
789 935a568c Florent Chuffart
790 935a568c Florent Chuffart
Value
791 935a568c Florent Chuffart
~~~~~
792 935a568c Florent Chuffart
793 935a568c Florent Chuffart
Returns filtered TemplateFilter Outputs
794 935a568c Florent Chuffart
795 935a568c Florent Chuffart
Author(s)
796 935a568c Florent Chuffart
~~~~~~~~~
797 935a568c Florent Chuffart
798 935a568c Florent Chuffart
Florent Chuffart
799 935a568c Florent Chuffart
800 7646593d Florent Chuffart
R: to flat aggregate\_intra\_strain\_nucs function output
801 7646593d Florent Chuffart
802 7646593d Florent Chuffart
to flat aggregate\_intra\_strain\_nucs function output
803 7646593d Florent Chuffart
------------------------------------------------------
804 7646593d Florent Chuffart
805 7646593d Florent Chuffart
Description
806 7646593d Florent Chuffart
~~~~~~~~~~~
807 7646593d Florent Chuffart
808 7646593d Florent Chuffart
This function builds a dataframe of all clusters obtain from
809 7646593d Florent Chuffart
aggregate\_intra\_strain\_nucs function.
810 7646593d Florent Chuffart
811 7646593d Florent Chuffart
Usage
812 7646593d Florent Chuffart
~~~~~
813 7646593d Florent Chuffart
814 7646593d Florent Chuffart
::
815 7646593d Florent Chuffart
816 4016229d Florent Chuffart
    flat_aggregated_intra_strain_nucs(partial_strain_maps, cur_index)
817 7646593d Florent Chuffart
818 7646593d Florent Chuffart
Arguments
819 7646593d Florent Chuffart
~~~~~~~~~
820 7646593d Florent Chuffart
821 7646593d Florent Chuffart
``partial_strain_maps``
822 7646593d Florent Chuffart
823 7646593d Florent Chuffart
the output of aggregate\_intra\_strain\_nucs function
824 7646593d Florent Chuffart
825 4016229d Florent Chuffart
``cur_index``
826 7646593d Florent Chuffart
827 7646593d Florent Chuffart
the index of the roi involved
828 7646593d Florent Chuffart
829 7646593d Florent Chuffart
Value
830 7646593d Florent Chuffart
~~~~~
831 7646593d Florent Chuffart
832 7646593d Florent Chuffart
Returns a dataframe of all clusters obtain from
833 7646593d Florent Chuffart
aggregate\_intra\_strain\_nucs function.
834 7646593d Florent Chuffart
835 7646593d Florent Chuffart
Author(s)
836 7646593d Florent Chuffart
~~~~~~~~~
837 7646593d Florent Chuffart
838 7646593d Florent Chuffart
Florent Chuffart
839 7646593d Florent Chuffart
840 935a568c Florent Chuffart
R: flat reads
841 935a568c Florent Chuffart
842 935a568c Florent Chuffart
flat reads
843 935a568c Florent Chuffart
----------
844 935a568c Florent Chuffart
845 935a568c Florent Chuffart
Description
846 935a568c Florent Chuffart
~~~~~~~~~~~
847 935a568c Florent Chuffart
848 935a568c Florent Chuffart
Extract reads coordinates from TempleteFilter input sequence
849 935a568c Florent Chuffart
850 935a568c Florent Chuffart
Usage
851 935a568c Florent Chuffart
~~~~~
852 935a568c Florent Chuffart
853 935a568c Florent Chuffart
::
854 935a568c Florent Chuffart
855 935a568c Florent Chuffart
    flat_reads(reads, nuc_width)
856 935a568c Florent Chuffart
857 935a568c Florent Chuffart
Arguments
858 935a568c Florent Chuffart
~~~~~~~~~
859 935a568c Florent Chuffart
860 935a568c Florent Chuffart
``reads``
861 935a568c Florent Chuffart
862 935a568c Florent Chuffart
TemplateFilter input reads
863 935a568c Florent Chuffart
864 935a568c Florent Chuffart
``nuc_width``
865 935a568c Florent Chuffart
866 935a568c Florent Chuffart
Width used to shift F and R reads.
867 935a568c Florent Chuffart
868 935a568c Florent Chuffart
Value
869 935a568c Florent Chuffart
~~~~~
870 935a568c Florent Chuffart
871 935a568c Florent Chuffart
Returns a list of F reads, R reads and joint/shifted F and R reads.
872 935a568c Florent Chuffart
873 935a568c Florent Chuffart
Author(s)
874 935a568c Florent Chuffart
~~~~~~~~~
875 935a568c Florent Chuffart
876 935a568c Florent Chuffart
Florent Chuffart
877 935a568c Florent Chuffart
878 935a568c Florent Chuffart
R: Retrieve Reads
879 935a568c Florent Chuffart
880 935a568c Florent Chuffart
Retrieve Reads
881 935a568c Florent Chuffart
--------------
882 935a568c Florent Chuffart
883 935a568c Florent Chuffart
Description
884 935a568c Florent Chuffart
~~~~~~~~~~~
885 935a568c Florent Chuffart
886 935a568c Florent Chuffart
Retrieve reads for a given marker, combi, form.
887 935a568c Florent Chuffart
888 935a568c Florent Chuffart
Usage
889 935a568c Florent Chuffart
~~~~~
890 935a568c Florent Chuffart
891 935a568c Florent Chuffart
::
892 935a568c Florent Chuffart
893 cc54c799 Florent Chuffart
    get_all_reads(marker, combi, form = "wp", config = NULL)
894 935a568c Florent Chuffart
895 935a568c Florent Chuffart
Arguments
896 935a568c Florent Chuffart
~~~~~~~~~
897 935a568c Florent Chuffart
898 935a568c Florent Chuffart
``marker``
899 935a568c Florent Chuffart
900 935a568c Florent Chuffart
The marker to considere.
901 935a568c Florent Chuffart
902 935a568c Florent Chuffart
``combi``
903 935a568c Florent Chuffart
904 935a568c Florent Chuffart
The starin combination to considere.
905 935a568c Florent Chuffart
906 935a568c Florent Chuffart
``form``
907 935a568c Florent Chuffart
908 935a568c Florent Chuffart
The nuc form to considere.
909 935a568c Florent Chuffart
910 cc54c799 Florent Chuffart
``config``
911 cc54c799 Florent Chuffart
912 cc54c799 Florent Chuffart
GLOBAL config variable
913 cc54c799 Florent Chuffart
914 935a568c Florent Chuffart
Author(s)
915 935a568c Florent Chuffart
~~~~~~~~~
916 935a568c Florent Chuffart
917 935a568c Florent Chuffart
Florent Chuffart
918 935a568c Florent Chuffart
919 935a568c Florent Chuffart
R: get comp strand
920 935a568c Florent Chuffart
921 935a568c Florent Chuffart
get comp strand
922 935a568c Florent Chuffart
---------------
923 935a568c Florent Chuffart
924 935a568c Florent Chuffart
Description
925 935a568c Florent Chuffart
~~~~~~~~~~~
926 935a568c Florent Chuffart
927 935a568c Florent Chuffart
Compute the complementatry strand.
928 935a568c Florent Chuffart
929 935a568c Florent Chuffart
Usage
930 935a568c Florent Chuffart
~~~~~
931 935a568c Florent Chuffart
932 935a568c Florent Chuffart
::
933 935a568c Florent Chuffart
934 935a568c Florent Chuffart
    get_comp_strand(strand)
935 935a568c Florent Chuffart
936 935a568c Florent Chuffart
Arguments
937 935a568c Florent Chuffart
~~~~~~~~~
938 935a568c Florent Chuffart
939 935a568c Florent Chuffart
``strand``
940 935a568c Florent Chuffart
941 935a568c Florent Chuffart
The original strand.
942 935a568c Florent Chuffart
943 935a568c Florent Chuffart
Value
944 935a568c Florent Chuffart
~~~~~
945 935a568c Florent Chuffart
946 935a568c Florent Chuffart
Returns the complementatry strand.
947 935a568c Florent Chuffart
948 935a568c Florent Chuffart
Author(s)
949 935a568c Florent Chuffart
~~~~~~~~~
950 935a568c Florent Chuffart
951 935a568c Florent Chuffart
Florent Chuffart
952 935a568c Florent Chuffart
953 935a568c Florent Chuffart
R: Build the design for deseq
954 935a568c Florent Chuffart
955 935a568c Florent Chuffart
Build the design for deseq
956 935a568c Florent Chuffart
--------------------------
957 935a568c Florent Chuffart
958 935a568c Florent Chuffart
Description
959 935a568c Florent Chuffart
~~~~~~~~~~~
960 935a568c Florent Chuffart
961 935a568c Florent Chuffart
This function build the design according sample properties.
962 935a568c Florent Chuffart
963 935a568c Florent Chuffart
Usage
964 935a568c Florent Chuffart
~~~~~
965 935a568c Florent Chuffart
966 935a568c Florent Chuffart
::
967 935a568c Florent Chuffart
968 935a568c Florent Chuffart
    get_design(marker, combi, all_samples)
969 935a568c Florent Chuffart
970 935a568c Florent Chuffart
Arguments
971 935a568c Florent Chuffart
~~~~~~~~~
972 935a568c Florent Chuffart
973 935a568c Florent Chuffart
``marker``
974 935a568c Florent Chuffart
975 935a568c Florent Chuffart
The marker to considere.
976 935a568c Florent Chuffart
977 935a568c Florent Chuffart
``combi``
978 935a568c Florent Chuffart
979 935a568c Florent Chuffart
The starin combination to considere.
980 935a568c Florent Chuffart
981 935a568c Florent Chuffart
``all_samples``
982 935a568c Florent Chuffart
983 935a568c Florent Chuffart
Global list of samples.
984 935a568c Florent Chuffart
985 935a568c Florent Chuffart
Author(s)
986 935a568c Florent Chuffart
~~~~~~~~~
987 935a568c Florent Chuffart
988 935a568c Florent Chuffart
Florent Chuffart
989 935a568c Florent Chuffart
990 9fdbfada Florent Chuffart
R: Compute the fuzzy list for a given strain.
991 9fdbfada Florent Chuffart
992 9fdbfada Florent Chuffart
Compute the fuzzy list for a given strain.
993 9fdbfada Florent Chuffart
------------------------------------------
994 9fdbfada Florent Chuffart
995 9fdbfada Florent Chuffart
Description
996 9fdbfada Florent Chuffart
~~~~~~~~~~~
997 9fdbfada Florent Chuffart
998 9fdbfada Florent Chuffart
This function grabs the nucleosomes detxted by template\_filter that
999 9fdbfada Florent Chuffart
have been rejected bt aggregate\_intra\_strain\_nucs as well positions.
1000 9fdbfada Florent Chuffart
1001 9fdbfada Florent Chuffart
Usage
1002 9fdbfada Florent Chuffart
~~~~~
1003 9fdbfada Florent Chuffart
1004 9fdbfada Florent Chuffart
::
1005 9fdbfada Florent Chuffart
1006 0a13b5e3 Florent Chuffart
    get_intra_strain_fuzzy(wp_map, roi, strain, config = NULL)
1007 9fdbfada Florent Chuffart
1008 9fdbfada Florent Chuffart
Arguments
1009 9fdbfada Florent Chuffart
~~~~~~~~~
1010 9fdbfada Florent Chuffart
1011 0a13b5e3 Florent Chuffart
``wp_map``
1012 9fdbfada Florent Chuffart
1013 9fdbfada Florent Chuffart
Well positionned nucleosomes map.
1014 9fdbfada Florent Chuffart
1015 9fdbfada Florent Chuffart
``roi``
1016 9fdbfada Florent Chuffart
1017 9fdbfada Florent Chuffart
The region of interest.
1018 9fdbfada Florent Chuffart
1019 9fdbfada Florent Chuffart
``strain``
1020 9fdbfada Florent Chuffart
1021 9fdbfada Florent Chuffart
The strain we want to extracvt the fuzzy map.
1022 9fdbfada Florent Chuffart
1023 9fdbfada Florent Chuffart
``config``
1024 9fdbfada Florent Chuffart
1025 9fdbfada Florent Chuffart
GLOBAL config variable.
1026 9fdbfada Florent Chuffart
1027 9fdbfada Florent Chuffart
Author(s)
1028 9fdbfada Florent Chuffart
~~~~~~~~~
1029 9fdbfada Florent Chuffart
1030 9fdbfada Florent Chuffart
Florent Chuffart
1031 9fdbfada Florent Chuffart
1032 935a568c Florent Chuffart
R: Compute the list of SNEPs for a given set of marker, strain...
1033 935a568c Florent Chuffart
1034 935a568c Florent Chuffart
Compute the list of SNEPs for a given set of marker, strain combination and nuc form.
1035 935a568c Florent Chuffart
-------------------------------------------------------------------------------------
1036 935a568c Florent Chuffart
1037 935a568c Florent Chuffart
Description
1038 935a568c Florent Chuffart
~~~~~~~~~~~
1039 935a568c Florent Chuffart
1040 935a568c Florent Chuffart
This function uses
1041 935a568c Florent Chuffart
1042 935a568c Florent Chuffart
Usage
1043 935a568c Florent Chuffart
~~~~~
1044 935a568c Florent Chuffart
1045 935a568c Florent Chuffart
::
1046 935a568c Florent Chuffart
1047 cc54c799 Florent Chuffart
    get_sneps(marker, combi, form, all_samples, config = NULL)
1048 935a568c Florent Chuffart
1049 935a568c Florent Chuffart
Arguments
1050 935a568c Florent Chuffart
~~~~~~~~~
1051 935a568c Florent Chuffart
1052 935a568c Florent Chuffart
``marker``
1053 935a568c Florent Chuffart
1054 935a568c Florent Chuffart
The marker involved.
1055 935a568c Florent Chuffart
1056 935a568c Florent Chuffart
``combi``
1057 935a568c Florent Chuffart
1058 935a568c Florent Chuffart
The strain combination involved.
1059 935a568c Florent Chuffart
1060 935a568c Florent Chuffart
``form``
1061 935a568c Florent Chuffart
1062 935a568c Florent Chuffart
the nuc form involved.
1063 935a568c Florent Chuffart
1064 935a568c Florent Chuffart
``all_samples``
1065 935a568c Florent Chuffart
1066 935a568c Florent Chuffart
Global list of samples.
1067 935a568c Florent Chuffart
1068 cc54c799 Florent Chuffart
``config``
1069 cc54c799 Florent Chuffart
1070 cc54c799 Florent Chuffart
GLOBAL config variable
1071 cc54c799 Florent Chuffart
1072 935a568c Florent Chuffart
Author(s)
1073 935a568c Florent Chuffart
~~~~~~~~~
1074 935a568c Florent Chuffart
1075 935a568c Florent Chuffart
Florent Chuffart
1076 935a568c Florent Chuffart
1077 935a568c Florent Chuffart
Examples
1078 935a568c Florent Chuffart
~~~~~~~~
1079 935a568c Florent Chuffart
1080 935a568c Florent Chuffart
::
1081 935a568c Florent Chuffart
1082 935a568c Florent Chuffart
    marker = "H3K4me1"
1083 55c1cdff Florent Chuffart
    combi = c("BY", "YJM")
1084 4016229d Florent Chuffart
    form = "wpunr" # "wp" | "unr" | "wpunr"
1085 935a568c Florent Chuffart
    # foo = get_sneps(marker, combi, form)
1086 935a568c Florent Chuffart
    # foo = get_sneps("H4K12ac", c("BY", "RM"), "wp")
1087 935a568c Florent Chuffart
1088 9fdbfada Florent Chuffart
R: Compute the unaligned nucleosomal regions (UNRs).
1089 9fdbfada Florent Chuffart
1090 9fdbfada Florent Chuffart
Compute the unaligned nucleosomal regions (UNRs).
1091 9fdbfada Florent Chuffart
-------------------------------------------------
1092 9fdbfada Florent Chuffart
1093 9fdbfada Florent Chuffart
Description
1094 9fdbfada Florent Chuffart
~~~~~~~~~~~
1095 9fdbfada Florent Chuffart
1096 9fdbfada Florent Chuffart
This function aggregate non common wp nucs for each strain and substract
1097 9fdbfada Florent Chuffart
common wp nucs. It does not take care about the size of the resulting
1098 9fdbfada Florent Chuffart
UNR. It will be take into account in the count read part og the
1099 9fdbfada Florent Chuffart
pipeline.
1100 9fdbfada Florent Chuffart
1101 9fdbfada Florent Chuffart
Usage
1102 9fdbfada Florent Chuffart
~~~~~
1103 9fdbfada Florent Chuffart
1104 9fdbfada Florent Chuffart
::
1105 9fdbfada Florent Chuffart
1106 4016229d Florent Chuffart
    get_unrs(combi, roi, cur_index, wp_maps, fuzzy_maps, common_nuc_results, 
1107 9fdbfada Florent Chuffart
        config = NULL)
1108 9fdbfada Florent Chuffart
1109 9fdbfada Florent Chuffart
Arguments
1110 9fdbfada Florent Chuffart
~~~~~~~~~
1111 9fdbfada Florent Chuffart
1112 9fdbfada Florent Chuffart
``combi``
1113 9fdbfada Florent Chuffart
1114 9fdbfada Florent Chuffart
The strain combination to consider.
1115 9fdbfada Florent Chuffart
1116 9fdbfada Florent Chuffart
``roi``
1117 9fdbfada Florent Chuffart
1118 9fdbfada Florent Chuffart
The region of interest.
1119 9fdbfada Florent Chuffart
1120 4016229d Florent Chuffart
``cur_index``
1121 9fdbfada Florent Chuffart
1122 9fdbfada Florent Chuffart
The region of interest index.
1123 9fdbfada Florent Chuffart
1124 9fdbfada Florent Chuffart
``wp_maps``
1125 9fdbfada Florent Chuffart
1126 9fdbfada Florent Chuffart
Well positionned nucleosomes maps.
1127 9fdbfada Florent Chuffart
1128 9fdbfada Florent Chuffart
``fuzzy_maps``
1129 9fdbfada Florent Chuffart
1130 9fdbfada Florent Chuffart
Fuzzy nucleosomes maps.
1131 9fdbfada Florent Chuffart
1132 9fdbfada Florent Chuffart
``common_nuc_results``
1133 9fdbfada Florent Chuffart
1134 9fdbfada Florent Chuffart
Common wp nuc maps
1135 9fdbfada Florent Chuffart
1136 9fdbfada Florent Chuffart
``config``
1137 9fdbfada Florent Chuffart
1138 9fdbfada Florent Chuffart
GLOBAL config variable
1139 9fdbfada Florent Chuffart
1140 9fdbfada Florent Chuffart
Author(s)
1141 9fdbfada Florent Chuffart
~~~~~~~~~
1142 9fdbfada Florent Chuffart
1143 9fdbfada Florent Chuffart
Florent Chuffart
1144 9fdbfada Florent Chuffart
1145 5bfac5a3 Florent Chuffart
R: Returns the intersection of 2 list on regions.
1146 5bfac5a3 Florent Chuffart
1147 5bfac5a3 Florent Chuffart
Returns the intersection of 2 list on regions.
1148 5bfac5a3 Florent Chuffart
----------------------------------------------
1149 5bfac5a3 Florent Chuffart
1150 5bfac5a3 Florent Chuffart
Description
1151 5bfac5a3 Florent Chuffart
~~~~~~~~~~~
1152 5bfac5a3 Florent Chuffart
1153 5bfac5a3 Florent Chuffart
This function...
1154 5bfac5a3 Florent Chuffart
1155 5bfac5a3 Florent Chuffart
Usage
1156 5bfac5a3 Florent Chuffart
~~~~~
1157 5bfac5a3 Florent Chuffart
1158 5bfac5a3 Florent Chuffart
::
1159 5bfac5a3 Florent Chuffart
1160 5bfac5a3 Florent Chuffart
    intersect_region(region1, region2)
1161 5bfac5a3 Florent Chuffart
1162 5bfac5a3 Florent Chuffart
Arguments
1163 5bfac5a3 Florent Chuffart
~~~~~~~~~
1164 5bfac5a3 Florent Chuffart
1165 5bfac5a3 Florent Chuffart
``region1``
1166 5bfac5a3 Florent Chuffart
1167 5bfac5a3 Florent Chuffart
Original regions.
1168 5bfac5a3 Florent Chuffart
1169 5bfac5a3 Florent Chuffart
``region2``
1170 5bfac5a3 Florent Chuffart
1171 5bfac5a3 Florent Chuffart
Regions to intersect.
1172 5bfac5a3 Florent Chuffart
1173 5bfac5a3 Florent Chuffart
Author(s)
1174 5bfac5a3 Florent Chuffart
~~~~~~~~~
1175 5bfac5a3 Florent Chuffart
1176 5bfac5a3 Florent Chuffart
Florent Chuffart
1177 5bfac5a3 Florent Chuffart
1178 935a568c Florent Chuffart
R: Likelihood ratio
1179 935a568c Florent Chuffart
1180 935a568c Florent Chuffart
Likelihood ratio
1181 935a568c Florent Chuffart
----------------
1182 935a568c Florent Chuffart
1183 935a568c Florent Chuffart
Description
1184 935a568c Florent Chuffart
~~~~~~~~~~~
1185 935a568c Florent Chuffart
1186 7e2d37e1 Florent Chuffart
Compute the log likelihood ratio of two or more set of value.
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 7e2d37e1 Florent Chuffart
    llr_score_nvecs(xs)
1194 935a568c Florent Chuffart
1195 935a568c Florent Chuffart
Arguments
1196 935a568c Florent Chuffart
~~~~~~~~~
1197 935a568c Florent Chuffart
1198 7e2d37e1 Florent Chuffart
``xs``
1199 935a568c Florent Chuffart
1200 7e2d37e1 Florent Chuffart
list of vectors.
1201 935a568c Florent Chuffart
1202 935a568c Florent Chuffart
Value
1203 935a568c Florent Chuffart
~~~~~
1204 935a568c Florent Chuffart
1205 7e2d37e1 Florent Chuffart
Returns the log likelihood ratio.
1206 935a568c Florent Chuffart
1207 935a568c Florent Chuffart
Author(s)
1208 935a568c Florent Chuffart
~~~~~~~~~
1209 935a568c Florent Chuffart
1210 935a568c Florent Chuffart
Florent Chuffart
1211 935a568c Florent Chuffart
1212 935a568c Florent Chuffart
Examples
1213 935a568c Florent Chuffart
~~~~~~~~
1214 935a568c Florent Chuffart
1215 935a568c Florent Chuffart
::
1216 935a568c Florent Chuffart
1217 935a568c Florent Chuffart
    # LOD score for 2 set of values
1218 935a568c Florent Chuffart
    mean1=5; sd1=2; card2 = 250
1219 935a568c Florent Chuffart
    mean2=6; sd2=3; card1 = 200
1220 935a568c Florent Chuffart
    x1 = rnorm(card1, mean1, sd1)
1221 55c1cdff Florent Chuffart
    x2 = rnorm(card2, mean2, sd2)
1222 935a568c Florent Chuffart
    min = floor(min(c(x1,x2)))
1223 935a568c Florent Chuffart
    max = ceiling(max(c(x1,x2)))
1224 935a568c Florent Chuffart
    hist(c(x1,x2), xlim=c(min, max), breaks=min:max)
1225 935a568c Florent Chuffart
    lines(min:max,dnorm(min:max,mean1,sd1)*card1,col=2)
1226 935a568c Florent Chuffart
    lines(min:max,dnorm(min:max,mean2,sd2)*card2,col=3)
1227 935a568c Florent Chuffart
    lines(min:max,dnorm(min:max,mean(c(x1,x2)),sd(c(x1,x2)))*card2,col=4)
1228 7e2d37e1 Florent Chuffart
    llr_score_nvecs(list(x1,x2))
1229 935a568c Florent Chuffart
1230 935a568c Florent Chuffart
R: nm
1231 935a568c Florent Chuffart
1232 935a568c Florent Chuffart
nm
1233 935a568c Florent Chuffart
--
1234 935a568c Florent Chuffart
1235 935a568c Florent Chuffart
Description
1236 935a568c Florent Chuffart
~~~~~~~~~~~
1237 935a568c Florent Chuffart
1238 935a568c Florent Chuffart
It provides a set of useful functions allowing to perform quantitative
1239 935a568c Florent Chuffart
analysis of nucleosomal epigenome.
1240 935a568c Florent Chuffart
1241 935a568c Florent Chuffart
Details
1242 935a568c Florent Chuffart
~~~~~~~
1243 935a568c Florent Chuffart
1244 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1245 935a568c Florent Chuffart
| Package:      | nucleominer                                       |
1246 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1247 935a568c Florent Chuffart
| Maintainer:   | Florent Chuffart <florent.chuffart@ens-lyon.fr>   |
1248 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1249 935a568c Florent Chuffart
| Author:       | Florent Chuffart                                  |
1250 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1251 dadb6a4d Florent Chuffart
| Version:      | 2.3.45                                            |
1252 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1253 935a568c Florent Chuffart
| License:      | CeCILL                                            |
1254 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1255 935a568c Florent Chuffart
| Title:        | nm                                                |
1256 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1257 7164d3ac Florent Chuffart
| Depends:      | seqinr, plotrix, DESeq, cachecache                |
1258 935a568c Florent Chuffart
+---------------+---------------------------------------------------+
1259 935a568c Florent Chuffart
1260 935a568c Florent Chuffart
Author(s)
1261 935a568c Florent Chuffart
~~~~~~~~~
1262 935a568c Florent Chuffart
1263 935a568c Florent Chuffart
Florent Chuffart
1264 935a568c Florent Chuffart
1265 935a568c Florent Chuffart
R: Plot the distribution of reads.
1266 935a568c Florent Chuffart
1267 935a568c Florent Chuffart
Plot the distribution of reads.
1268 935a568c Florent Chuffart
-------------------------------
1269 935a568c Florent Chuffart
1270 935a568c Florent Chuffart
Description
1271 935a568c Florent Chuffart
~~~~~~~~~~~
1272 935a568c Florent Chuffart
1273 935a568c Florent Chuffart
This fuxntion use the deseq nomalization feature to compare
1274 935a568c Florent Chuffart
qualitatively the distribution.
1275 935a568c Florent Chuffart
1276 935a568c Florent Chuffart
Usage
1277 935a568c Florent Chuffart
~~~~~
1278 935a568c Florent Chuffart
1279 935a568c Florent Chuffart
::
1280 935a568c Florent Chuffart
1281 935a568c Florent Chuffart
    plot_dist_samples(strain, marker, res, all_samples, NEWPLOT = TRUE)
1282 935a568c Florent Chuffart
1283 935a568c Florent Chuffart
Arguments
1284 935a568c Florent Chuffart
~~~~~~~~~
1285 935a568c Florent Chuffart
1286 935a568c Florent Chuffart
``strain``
1287 935a568c Florent Chuffart
1288 935a568c Florent Chuffart
The strain to considere.
1289 935a568c Florent Chuffart
1290 935a568c Florent Chuffart
``marker``
1291 935a568c Florent Chuffart
1292 935a568c Florent Chuffart
The marker to considere.
1293 935a568c Florent Chuffart
1294 935a568c Florent Chuffart
``res``
1295 935a568c Florent Chuffart
1296 935a568c Florent Chuffart
Data
1297 935a568c Florent Chuffart
1298 935a568c Florent Chuffart
``all_samples``
1299 935a568c Florent Chuffart
1300 935a568c Florent Chuffart
Global list of samples.
1301 935a568c Florent Chuffart
1302 935a568c Florent Chuffart
``NEWPLOT``
1303 935a568c Florent Chuffart
1304 935a568c Florent Chuffart
If FALSE the curve will be add to the current plot.
1305 935a568c Florent Chuffart
1306 935a568c Florent Chuffart
Author(s)
1307 935a568c Florent Chuffart
~~~~~~~~~
1308 935a568c Florent Chuffart
1309 935a568c Florent Chuffart
Florent Chuffart
1310 935a568c Florent Chuffart
1311 935a568c Florent Chuffart
R: sign from strand
1312 935a568c Florent Chuffart
1313 935a568c Florent Chuffart
sign from strand
1314 935a568c Florent Chuffart
----------------
1315 935a568c Florent Chuffart
1316 935a568c Florent Chuffart
Description
1317 935a568c Florent Chuffart
~~~~~~~~~~~
1318 935a568c Florent Chuffart
1319 935a568c Florent Chuffart
Get the sign of strand
1320 935a568c Florent Chuffart
1321 935a568c Florent Chuffart
Usage
1322 935a568c Florent Chuffart
~~~~~
1323 935a568c Florent Chuffart
1324 935a568c Florent Chuffart
::
1325 935a568c Florent Chuffart
1326 935a568c Florent Chuffart
    sign_from_strand(strands)
1327 935a568c Florent Chuffart
1328 935a568c Florent Chuffart
Arguments
1329 935a568c Florent Chuffart
~~~~~~~~~
1330 935a568c Florent Chuffart
1331 935a568c Florent Chuffart
+---------------+----+
1332 935a568c Florent Chuffart
| ``strands``   |    |
1333 935a568c Florent Chuffart
+---------------+----+
1334 935a568c Florent Chuffart
1335 935a568c Florent Chuffart
Value
1336 935a568c Florent Chuffart
~~~~~
1337 935a568c Florent Chuffart
1338 935a568c Florent Chuffart
If strand in forward then returns 1 else returns -1
1339 935a568c Florent Chuffart
1340 935a568c Florent Chuffart
Author(s)
1341 935a568c Florent Chuffart
~~~~~~~~~
1342 935a568c Florent Chuffart
1343 935a568c Florent Chuffart
Florent Chuffart
1344 935a568c Florent Chuffart
1345 935a568c Florent Chuffart
R: Substract to a list of regions an other list of regions that...
1346 935a568c Florent Chuffart
1347 935a568c Florent Chuffart
Substract to a list of regions an other list of regions that intersect it.
1348 935a568c Florent Chuffart
--------------------------------------------------------------------------
1349 935a568c Florent Chuffart
1350 935a568c Florent Chuffart
Description
1351 935a568c Florent Chuffart
~~~~~~~~~~~
1352 935a568c Florent Chuffart
1353 935a568c Florent Chuffart
This fucntion embed a recursive part. It occurs when a substracted
1354 935a568c Florent Chuffart
region split an original region on two.
1355 935a568c Florent Chuffart
1356 935a568c Florent Chuffart
Usage
1357 935a568c Florent Chuffart
~~~~~
1358 935a568c Florent Chuffart
1359 935a568c Florent Chuffart
::
1360 935a568c Florent Chuffart
1361 935a568c Florent Chuffart
    substract_region(region1, region2)
1362 935a568c Florent Chuffart
1363 935a568c Florent Chuffart
Arguments
1364 935a568c Florent Chuffart
~~~~~~~~~
1365 935a568c Florent Chuffart
1366 935a568c Florent Chuffart
``region1``
1367 935a568c Florent Chuffart
1368 935a568c Florent Chuffart
Original regions.
1369 935a568c Florent Chuffart
1370 935a568c Florent Chuffart
``region2``
1371 935a568c Florent Chuffart
1372 935a568c Florent Chuffart
Regions to substract.
1373 935a568c Florent Chuffart
1374 935a568c Florent Chuffart
Author(s)
1375 935a568c Florent Chuffart
~~~~~~~~~
1376 935a568c Florent Chuffart
1377 935a568c Florent Chuffart
Florent Chuffart
1378 935a568c Florent Chuffart
1379 1d833b97 Florent Chuffart
R: Switch a pairlist
1380 1d833b97 Florent Chuffart
1381 1d833b97 Florent Chuffart
Switch a pairlist
1382 1d833b97 Florent Chuffart
-----------------
1383 1d833b97 Florent Chuffart
1384 1d833b97 Florent Chuffart
Description
1385 1d833b97 Florent Chuffart
~~~~~~~~~~~
1386 1d833b97 Florent Chuffart
1387 1d833b97 Florent Chuffart
Take a pairlist key:value and return the switched pairlist value:key.
1388 1d833b97 Florent Chuffart
1389 1d833b97 Florent Chuffart
Usage
1390 1d833b97 Florent Chuffart
~~~~~
1391 1d833b97 Florent Chuffart
1392 1d833b97 Florent Chuffart
::
1393 1d833b97 Florent Chuffart
1394 1d833b97 Florent Chuffart
    switch_pairlist(l)
1395 1d833b97 Florent Chuffart
1396 1d833b97 Florent Chuffart
Arguments
1397 1d833b97 Florent Chuffart
~~~~~~~~~
1398 1d833b97 Florent Chuffart
1399 1d833b97 Florent Chuffart
``l``
1400 1d833b97 Florent Chuffart
1401 1d833b97 Florent Chuffart
The pairlist to switch.
1402 1d833b97 Florent Chuffart
1403 1d833b97 Florent Chuffart
Value
1404 1d833b97 Florent Chuffart
~~~~~
1405 1d833b97 Florent Chuffart
1406 1d833b97 Florent Chuffart
The switched pairlist.
1407 1d833b97 Florent Chuffart
1408 1d833b97 Florent Chuffart
Author(s)
1409 1d833b97 Florent Chuffart
~~~~~~~~~
1410 1d833b97 Florent Chuffart
1411 1d833b97 Florent Chuffart
Florent Chuffart
1412 1d833b97 Florent Chuffart
1413 1d833b97 Florent Chuffart
Examples
1414 1d833b97 Florent Chuffart
~~~~~~~~
1415 1d833b97 Florent Chuffart
1416 1d833b97 Florent Chuffart
::
1417 1d833b97 Florent Chuffart
1418 1d833b97 Florent Chuffart
    l = list(key1 = "value1", key2 = "value2")
1419 1d833b97 Florent Chuffart
    print(switch_pairlist(l))
1420 1d833b97 Florent Chuffart
1421 4016229d Florent Chuffart
R: Translate coords of a genome region.
1422 935a568c Florent Chuffart
1423 4016229d Florent Chuffart
Translate coords of a genome region.
1424 4016229d Florent Chuffart
------------------------------------
1425 935a568c Florent Chuffart
1426 935a568c Florent Chuffart
Description
1427 935a568c Florent Chuffart
~~~~~~~~~~~
1428 935a568c Florent Chuffart
1429 4016229d Florent Chuffart
This function is used in the examples, usualy you have to define your
1430 4016229d Florent Chuffart
own translation function and overwrite this one using *unlockBinding*
1431 4016229d Florent Chuffart
features. Please, refer to the example.
1432 935a568c Florent Chuffart
1433 935a568c Florent Chuffart
Usage
1434 935a568c Florent Chuffart
~~~~~
1435 935a568c Florent Chuffart
1436 935a568c Florent Chuffart
::
1437 935a568c Florent Chuffart
1438 4016229d Florent Chuffart
    translate_cur(roi, strain2, config = NULL, big_cur = NULL)
1439 935a568c Florent Chuffart
1440 935a568c Florent Chuffart
Arguments
1441 935a568c Florent Chuffart
~~~~~~~~~
1442 935a568c Florent Chuffart
1443 4016229d Florent Chuffart
``roi``
1444 935a568c Florent Chuffart
1445 4016229d Florent Chuffart
Original genome region of interest.
1446 935a568c Florent Chuffart
1447 4016229d Florent Chuffart
``strain2``
1448 935a568c Florent Chuffart
1449 4016229d Florent Chuffart
The strain in wich you want the genome region of interest.
1450 935a568c Florent Chuffart
1451 1d833b97 Florent Chuffart
``config``
1452 1d833b97 Florent Chuffart
1453 1d833b97 Florent Chuffart
GLOBAL config variable
1454 1d833b97 Florent Chuffart
1455 4016229d Florent Chuffart
``big_cur``
1456 935a568c Florent Chuffart
1457 4016229d Florent Chuffart
A largest region than roi use to filter c2c if it is needed.
1458 935a568c Florent Chuffart
1459 935a568c Florent Chuffart
Author(s)
1460 935a568c Florent Chuffart
~~~~~~~~~
1461 935a568c Florent Chuffart
1462 935a568c Florent Chuffart
Florent Chuffart
1463 935a568c Florent Chuffart
1464 4016229d Florent Chuffart
Examples
1465 4016229d Florent Chuffart
~~~~~~~~
1466 935a568c Florent Chuffart
1467 4016229d Florent Chuffart
::
1468 4016229d Florent Chuffart
1469 4016229d Florent Chuffart
    # Define new translate_cur function...
1470 4016229d Florent Chuffart
    translate_cur = function(roi, strain2, config) {
1471 4016229d Florent Chuffart
        strain1 = roi$strain_ref
1472 4016229d Florent Chuffart
        if (strain1 == strain2) {
1473 4016229d Florent Chuffart
            return(roi)
1474 4016229d Florent Chuffart
        } else {
1475 4016229d Florent Chuffart
          stop("Here is my new translate_cur function...")
1476 4016229d Florent Chuffart
        }
1477 4016229d Florent Chuffart
    }
1478 4016229d Florent Chuffart
    # Binding it by uncomment follwing lines.
1479 4016229d Florent Chuffart
    # unlockBinding("translate_cur", as.environment("package:nm"))
1480 4016229d Florent Chuffart
    # unlockBinding("translate_cur", getNamespace("nm"))
1481 4016229d Florent Chuffart
    # assign("translate_cur", translate_cur, "package:nm")
1482 4016229d Florent Chuffart
    # assign("translate_cur", translate_cur, getNamespace("nm"))
1483 4016229d Florent Chuffart
    # lockBinding("translate_cur", getNamespace("nm"))
1484 4016229d Florent Chuffart
    # lockBinding("translate_cur", as.environment("package:nm"))
1485 4016229d Florent Chuffart
1486 4016229d Florent Chuffart
R: Translate a list of regions from a strain ref to another.
1487 4016229d Florent Chuffart
1488 4016229d Florent Chuffart
Translate a list of regions from a strain ref to another.
1489 4016229d Florent Chuffart
---------------------------------------------------------
1490 935a568c Florent Chuffart
1491 935a568c Florent Chuffart
Description
1492 935a568c Florent Chuffart
~~~~~~~~~~~
1493 935a568c Florent Chuffart
1494 4016229d Florent Chuffart
This function is an eloborated call to translate\_cur.
1495 935a568c Florent Chuffart
1496 935a568c Florent Chuffart
Usage
1497 935a568c Florent Chuffart
~~~~~
1498 935a568c Florent Chuffart
1499 935a568c Florent Chuffart
::
1500 935a568c Florent Chuffart
1501 4016229d Florent Chuffart
    translate_regions(regions, combi, cur_index, config = NULL, roi)
1502 935a568c Florent Chuffart
1503 935a568c Florent Chuffart
Arguments
1504 935a568c Florent Chuffart
~~~~~~~~~
1505 935a568c Florent Chuffart
1506 4016229d Florent Chuffart
``regions``
1507 935a568c Florent Chuffart
1508 4016229d Florent Chuffart
Regions to be translated.
1509 935a568c Florent Chuffart
1510 4016229d Florent Chuffart
``combi``
1511 935a568c Florent Chuffart
1512 4016229d Florent Chuffart
Combination of strains.
1513 4016229d Florent Chuffart
1514 4016229d Florent Chuffart
``cur_index``
1515 4016229d Florent Chuffart
1516 4016229d Florent Chuffart
The region of interest index.
1517 935a568c Florent Chuffart
1518 1d833b97 Florent Chuffart
``config``
1519 935a568c Florent Chuffart
1520 1d833b97 Florent Chuffart
GLOBAL config variable
1521 935a568c Florent Chuffart
1522 4016229d Florent Chuffart
``roi``
1523 935a568c Florent Chuffart
1524 4016229d Florent Chuffart
The region of interest.
1525 935a568c Florent Chuffart
1526 935a568c Florent Chuffart
Author(s)
1527 935a568c Florent Chuffart
~~~~~~~~~
1528 935a568c Florent Chuffart
1529 935a568c Florent Chuffart
Florent Chuffart
1530 935a568c Florent Chuffart
1531 935a568c Florent Chuffart
R: Aggregate regions that intersect themnselves.
1532 935a568c Florent Chuffart
1533 935a568c Florent Chuffart
Aggregate regions that intersect themnselves.
1534 935a568c Florent Chuffart
---------------------------------------------
1535 935a568c Florent Chuffart
1536 935a568c Florent Chuffart
Description
1537 935a568c Florent Chuffart
~~~~~~~~~~~
1538 935a568c Florent Chuffart
1539 935a568c Florent Chuffart
This function is based on sort of lower bounds to detect regions that
1540 935a568c Florent Chuffart
intersect. We compare lower bound and upper bound of the porevious item.
1541 935a568c Florent Chuffart
This function embed a while loop and break break regions list become
1542 935a568c Florent Chuffart
stable.
1543 935a568c Florent Chuffart
1544 935a568c Florent Chuffart
Usage
1545 935a568c Florent Chuffart
~~~~~
1546 935a568c Florent Chuffart
1547 935a568c Florent Chuffart
::
1548 935a568c Florent Chuffart
1549 935a568c Florent Chuffart
    union_regions(regions)
1550 935a568c Florent Chuffart
1551 935a568c Florent Chuffart
Arguments
1552 935a568c Florent Chuffart
~~~~~~~~~
1553 935a568c Florent Chuffart
1554 935a568c Florent Chuffart
``regions``
1555 935a568c Florent Chuffart
1556 935a568c Florent Chuffart
The Regions to be aggregated
1557 935a568c Florent Chuffart
1558 935a568c Florent Chuffart
Author(s)
1559 935a568c Florent Chuffart
~~~~~~~~~
1560 935a568c Florent Chuffart
1561 935a568c Florent Chuffart
Florent Chuffart
1562 935a568c Florent Chuffart
1563 935a568c Florent Chuffart
R: Watching analysis of samples
1564 935a568c Florent Chuffart
1565 935a568c Florent Chuffart
Watching analysis of samples
1566 935a568c Florent Chuffart
----------------------------
1567 935a568c Florent Chuffart
1568 935a568c Florent Chuffart
Description
1569 935a568c Florent Chuffart
~~~~~~~~~~~
1570 935a568c Florent Chuffart
1571 935a568c Florent Chuffart
This function allows to view analysis for a particuler region of the
1572 935a568c Florent Chuffart
genome.
1573 935a568c Florent Chuffart
1574 935a568c Florent Chuffart
Usage
1575 935a568c Florent Chuffart
~~~~~
1576 935a568c Florent Chuffart
1577 935a568c Florent Chuffart
::
1578 935a568c Florent Chuffart
1579 935a568c Florent Chuffart
    watch_samples(replicates, read_length, plot_ref_genome = TRUE, 
1580 935a568c Florent Chuffart
        plot_arrow_raw_reads = TRUE, plot_arrow_nuc_reads = TRUE, 
1581 935a568c Florent Chuffart
        plot_squared_reads = TRUE, plot_coverage = FALSE, plot_gaussian_reads = TRUE, 
1582 935a568c Florent Chuffart
        plot_gaussian_unified_reads = TRUE, plot_ellipse_nucs = TRUE, 
1583 9fdbfada Florent Chuffart
        change_col = TRUE, plot_wp_nucs = TRUE, plot_fuzzy_nucs = TRUE, 
1584 9fdbfada Florent Chuffart
        plot_wp_nuc_model = TRUE, plot_common_nucs = FALSE, plot_common_unrs = FALSE, 
1585 6e0010bc Florent Chuffart
        plot_wp_nucs_4_nonmnase = FALSE, plot_chain = FALSE, plot_sample_id = FALSE, 
1586 6e0010bc Florent Chuffart
        aggregated_intra_strain_nucs = NULL, aligned_inter_strain_nucs = NULL, 
1587 6e0010bc Florent Chuffart
        height = 10, main = NULL, xlab = NULL, ylab = "#reads (per million reads)", 
1588 6e0010bc Florent Chuffart
        config = NULL)
1589 935a568c Florent Chuffart
1590 935a568c Florent Chuffart
Arguments
1591 935a568c Florent Chuffart
~~~~~~~~~
1592 935a568c Florent Chuffart
1593 935a568c Florent Chuffart
``replicates``
1594 935a568c Florent Chuffart
1595 935a568c Florent Chuffart
replicates under the form...
1596 935a568c Florent Chuffart
1597 935a568c Florent Chuffart
``read_length``
1598 935a568c Florent Chuffart
1599 935a568c Florent Chuffart
length of the reads
1600 935a568c Florent Chuffart
1601 935a568c Florent Chuffart
``plot_ref_genome``
1602 935a568c Florent Chuffart
1603 935a568c Florent Chuffart
Plot (or not) reference genome.
1604 935a568c Florent Chuffart
1605 935a568c Florent Chuffart
``plot_arrow_raw_reads``
1606 935a568c Florent Chuffart
1607 935a568c Florent Chuffart
Plot (or not) arrows for raw reads.
1608 935a568c Florent Chuffart
1609 935a568c Florent Chuffart
``plot_arrow_nuc_reads``
1610 935a568c Florent Chuffart
1611 935a568c Florent Chuffart
Plot (or not) arrows for reads aasiocied to a nucleosome.
1612 935a568c Florent Chuffart
1613 935a568c Florent Chuffart
``plot_squared_reads``
1614 935a568c Florent Chuffart
1615 935a568c Florent Chuffart
Plot (or not) reads in the square fashion.
1616 935a568c Florent Chuffart
1617 935a568c Florent Chuffart
``plot_coverage``
1618 935a568c Florent Chuffart
1619 935a568c Florent Chuffart
Plot (or not) reads in the covergae fashion. fashion.
1620 935a568c Florent Chuffart
1621 935a568c Florent Chuffart
``plot_gaussian_reads``
1622 935a568c Florent Chuffart
1623 935a568c Florent Chuffart
Plot (or not) gaussian model of a F anf R reads.
1624 935a568c Florent Chuffart
1625 935a568c Florent Chuffart
``plot_gaussian_unified_reads``
1626 935a568c Florent Chuffart
1627 935a568c Florent Chuffart
Plot (or not) gaussian model of a nuc.
1628 935a568c Florent Chuffart
1629 935a568c Florent Chuffart
``plot_ellipse_nucs``
1630 935a568c Florent Chuffart
1631 935a568c Florent Chuffart
Plot (or not) ellipse for a nuc.
1632 935a568c Florent Chuffart
1633 7646593d Florent Chuffart
``change_col``
1634 7646593d Florent Chuffart
1635 7646593d Florent Chuffart
Change the color of each nucleosome.
1636 7646593d Florent Chuffart
1637 935a568c Florent Chuffart
``plot_wp_nucs``
1638 935a568c Florent Chuffart
1639 935a568c Florent Chuffart
Plot (or not) cluster of nucs
1640 935a568c Florent Chuffart
1641 9fdbfada Florent Chuffart
``plot_fuzzy_nucs``
1642 9fdbfada Florent Chuffart
1643 9fdbfada Florent Chuffart
Plot (or not) cluster of fuzzy
1644 9fdbfada Florent Chuffart
1645 935a568c Florent Chuffart
``plot_wp_nuc_model``
1646 935a568c Florent Chuffart
1647 935a568c Florent Chuffart
Plot (or not) gaussian model for a cluster of nucs
1648 935a568c Florent Chuffart
1649 935a568c Florent Chuffart
``plot_common_nucs``
1650 935a568c Florent Chuffart
1651 935a568c Florent Chuffart
Plot (or not) aligned reads.
1652 935a568c Florent Chuffart
1653 9fdbfada Florent Chuffart
``plot_common_unrs``
1654 9fdbfada Florent Chuffart
1655 9fdbfada Florent Chuffart
Plot (or not) unaligned nucleosomal refgions (UNRs).
1656 9fdbfada Florent Chuffart
1657 935a568c Florent Chuffart
``plot_wp_nucs_4_nonmnase``
1658 935a568c Florent Chuffart
1659 935a568c Florent Chuffart
Plot (or not) clusters for non inputs samples.
1660 935a568c Florent Chuffart
1661 729c934e Florent Chuffart
``plot_chain``
1662 729c934e Florent Chuffart
1663 729c934e Florent Chuffart
Plot (or not) clusterised nuceosomes between mnase samples.
1664 729c934e Florent Chuffart
1665 6e0010bc Florent Chuffart
``plot_sample_id``
1666 6e0010bc Florent Chuffart
1667 6e0010bc Florent Chuffart
Plot (or not) the sample id for each sample.
1668 6e0010bc Florent Chuffart
1669 935a568c Florent Chuffart
``aggregated_intra_strain_nucs``
1670 935a568c Florent Chuffart
1671 935a568c Florent Chuffart
list of aggregated intra strain nucs. If NULL, it will be computed.
1672 935a568c Florent Chuffart
1673 935a568c Florent Chuffart
``aligned_inter_strain_nucs``
1674 935a568c Florent Chuffart
1675 935a568c Florent Chuffart
list of aligned inter strain nucs. If NULL, it will be computed.
1676 935a568c Florent Chuffart
1677 935a568c Florent Chuffart
``height``
1678 935a568c Florent Chuffart
1679 935a568c Florent Chuffart
Number of reads in per million read for each sample, graphical parametre
1680 935a568c Florent Chuffart
for the y axis.
1681 935a568c Florent Chuffart
1682 6e0010bc Florent Chuffart
``main``
1683 6e0010bc Florent Chuffart
1684 6e0010bc Florent Chuffart
main title of the produced plot
1685 6e0010bc Florent Chuffart
1686 6e0010bc Florent Chuffart
``xlab``
1687 6e0010bc Florent Chuffart
1688 6e0010bc Florent Chuffart
xlab of the produced plot
1689 6e0010bc Florent Chuffart
1690 6e0010bc Florent Chuffart
``ylab``
1691 6e0010bc Florent Chuffart
1692 6e0010bc Florent Chuffart
ylab of the produced plot
1693 6e0010bc Florent Chuffart
1694 1d833b97 Florent Chuffart
``config``
1695 1d833b97 Florent Chuffart
1696 1d833b97 Florent Chuffart
GLOBAL config variable
1697 1d833b97 Florent Chuffart
1698 935a568c Florent Chuffart
Author(s)
1699 935a568c Florent Chuffart
~~~~~~~~~
1700 935a568c Florent Chuffart
1701 935a568c Florent Chuffart
Florent Chuffart