-
Notifications
You must be signed in to change notification settings - Fork 4
/
howto.html
1191 lines (1107 loc) · 70.9 KB
/
howto.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Manual << DuctApe, genomics and phenomics made easy</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="DuctApe, Analyze and link genomics and phenomics experiments, using KEGG metabolic pathways and Biolog Phenotype Microarrays.">
<meta name="author" content="Marco Galardini" >
<!-- Le meta tag to refresh the cache -->
<meta http-equiv="last-modified" content="Tue, 25 Feb 2014 11:00:00 CET" />
<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.html">DuctApe</a>
<div class="nav-collapse collapse brandmini">
<div class="nav"><a href="http://goo.gl/mmSu4v"><i class="icon-download"></i> Download »</a></div>
<div class="nav"><a href="info.html"><i class="icon-info-sign"></i> More info</a></div>
<div class="nav"><i class="icon-info-sign"></i> Manual</div>
<div class="nav"><a href="io.html"><i class="icon-info-sign"></i> Inputs/Outputs</a></div>
<div class="nav"><a href="tutorial.html"><i class="icon-info-sign"></i> Tutorial</a></div>
</div>
</div>
</div>
</div>
<div class="container">
<div id="home">
<div class="row">
<noscript>
<div class="alert alert-error">
<strong>Whoops! You have javascript disabled</strong>
<br/>
You may be unable to enjoy this site, sorry :(
</div>
</noscript>
</div>
<div class="row">
<div class="span3 hidden-phone">
<ul class="nav nav-list da-docs-sidenav">
<li><a href="#start"><i class="icon-chevron-right"></i> Manual</a></li>
<li><a href="#requirements"><i class="icon-chevron-right"></i> Requirements</a></li>
<li><a href="#installation"><i class="icon-chevron-right"></i> Installation</a></li>
<li><a href="#general"><i class="icon-chevron-right"></i> DuctApe</a></li>
<li><a href="#dape"><i class="icon-chevron-right"></i> dape</a></li>
<li><a href="#dgenome"><i class="icon-chevron-right"></i> dgenome</a></li>
<li><a href="#dphenome"><i class="icon-chevron-right"></i> dphenome</a></li>
<li><a href="#examples"><i class="icon-chevron-right"></i> Examples</a></li>
<li><a href="#test"><i class="icon-chevron-right"></i> Test</a></li>
<li><a href="#talks"><i class="icon-chevron-right"></i> Talks</a></li>
</ul>
</div>
<div class="span9" id="howto">
<div class="dwell">
<div id="start">
<div class="page-header">
<h1><div class="title">Manual</div></h1>
<h1><div class="title"><small>Synopsis and options</small></div></h1>
</div>
<p>For further questions and updates, please contact <a href="mailto:ductape-users@googlegroups.com">ductape-users@googlegroups.com</a> or subscribe to the <a href="https://groups.google.com/forum/?fromgroups#!forum/ductape-users">user group</a></p>
</div>
<div id="requirements">
<div class="page-header">
<h1><div class="minititle">Requirements
</div></h1>
</div>
<p>
DuctApe should work in all Unix systems with a python install; the dependencies are the following:
</p>
<ul>
<li><a href="http://www.python.org/">python</a> 2.6 or higher</li>
<li><a href="http://www.biopython.org/">Biopython</a></li>
<li><a href="http://numpy.scipy.org/">NumPy</a></li>
<li><a href="http://scipy.org/">SciPy</a></li>
<li><a href="http://matplotlib.org/">matplotlib</a></li>
<li><a href="http://scikit-learn.org/">scikits.learn</a></li>
<li><a href="http://docs.python.org/2/library/multiprocessing.html">multiprocessing</a> (included in python 2.6)</li>
<li><a href="http://networkx.lanl.gov/">networkx</a></li>
<li><a href="http://pyyaml.org/">PyYaml</a></li>
<li><a href="http://www.ncbi.nlm.nih.gov/BLAST/">Blast+</a></li>
</ul>
<p>
Each one of this dependencies can be installed directly, through the <a href="http://pypi.python.org/pypi/pip">pip package manager</a> or through your operating system package manager (i.e. apt-get for Debian/Ubuntu, yum for Fedora, ecc..). The only exception is Blast+, which is a stand-alone application.</p>
<p>
Example of a python library install through pip (using the command line)
</p>
<p>
<code>sudo pip install matplotlib</code>
</p>
<p>If you are working in a Debian-based Linux distribution (like Ubuntu), you can install all the dependencies with the following command</p>
<p><pre>sudo apt-get install python-numpy python-scipy python-sklearn python-matplotlib python-biopython python-networkx ncbi-blast+</pre></p>
</div>
<div id="installation">
<div class="page-header">
<h1><div class="minititle">Installation</div></h1>
</div>
<p>There are four ways to install DuctApe:</p>
<p><strong>Method 1 (missing dependencies will be downloaded)</strong></p>
<p><code>sudo pip install DuctApe</code></p>
<br>
<p><strong>Method 2 (dependencies won't be checked)</strong></p>
<ol>
<li>Extract the archive</li>
<code>tar -xvf DuctApe-latest.tar.gz</code>
<li>Enter the directory</li>
<code>cd DuctApe-latest</code>
<li>Install</li>
<code>sudo python setup.py install</code>
</ol>
<br>
<p><strong>Method 3 (missing dependencies will be downloaded)</strong></p>
<p><code>sudo pip install DuctApe-latest.tar.gz</code></p>
<br>
<p><strong>Method 4 (if you don't have sudo access)</strong></p>
<ol>
<li>Extract the archive anywhere (i.e. in your $HOME)</li>
<code>tar -xvf DuctApe-latest.tar.gz</code>
<li>Add the unzipped directory to your $PATH (i.e. by using the .bashrc file)</li>
<code>export PATH="$HOME/DuctApe-latest/:$PATH";</code>
</ol>
<br>
<p>To check that the install process succeeded, try to open a new terminal and type the following line:</p>
<p>
<code>dape --version</code>
</p>
</div>
<div id="general">
<div class="page-header">
<h1><div class="minititle">DuctApe</div></h1>
</div>
<p>
DuctApe consists of three command line utilities with many subcommands: <b>all of them act on a project file</b> (technically speaking an SQLite database) which contains all the informations about the analysis. This file can be exchanged between users and computers without the need to transfer many files, as all the outputs can be generated from this single database. The database file can be even opened with any SQLite browser by expert users for custom queries (the schema definitions can be found <a href="https://raw.github.com/combogenomics/DuctApe/master/ductape/storage/SQLite/dbstrings.py">here</a>).
</p>
<p><img src="img/scheme.png"/></p>
<p>
The three modules have a somewhat similar subcommands structure: an <i>add</i> command to push input data, a <i>start</i> command to perform the core analysis, an <i>export</i> command to save the outputs for further analysis and a <i>stats</i> command to print out some statistics about the data. Given this common features, each command has a set of unique subcommands and different behaviours and purposes.
</p>
<p>All the modules and subcommands have some common options:</p>
<dl class="dl-horizontal">
<dt>-p</dt>
<dd>Project file to be used [default: ductape.db]</dd>
<dt>-w</dt>
<dd>Working directory [default: .]</dd>
<dt>-v</dt>
<dd>Increase log verbosity (can be used many times)</dd>
<dt>--version</dt>
<dd>Print DuctApe version</dd>
</dl>
</div>
<div id="dape">
<div class="page-header">
<h1><div class="minititle">dape
<small>The main module</small></div></h1>
</div>
<p>
dape is the main module of the DuctApe suite, and the first one that should be used when doing an analysis from scratch; it is used to <b>setup the project</b> and to <b>conduct the final metabolic reconstruction</b>.
</p>
<h4>Project setup</h4>
<p>The first step is the project initialization, through the <i>init</i> command.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse1"><i class="icon-chevron-right"></i> <b class="text-success">init</b> project initialization</a>
</div>
<div id="collapse1" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-n</dt>
<dd>Project name</dd>
<dt>-d</dt>
<dd>Project description</dd>
</dl>
<p><code>dape init</code></p>
</div>
</div>
</div>
</div>
<p>There are three projects kind that can be setup with DuctApe: <a href="info.html#projects">single, mutants and pangenome</a>: for single and pangenome projects, only the <i>add</i> command has to be used, while for the mutants kind, also the <i>add-mut</i> can be used.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse2"><i class="icon-chevron-right"></i> <b class="text-success">add</b> add a single organism</a>
</div>
<div id="collapse2" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
<dt>-n</dt>
<dd>Organism name</dd>
<dt>-d</dt>
<dd>Organism description</dd>
<dt>-c</dt>
<dd>Organism color</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> Keep the organism ID length to a maximum of 10 charachters to help graphs readibility.</small></p>
<p><code>dape add -n "Sinorhizobium meliloti" -c red Rm1021</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse3"><i class="icon-chevron-right"></i> <b class="text-success">add-multi</b> add many single organisms</a>
</div>
<div id="collapse3" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> Keep the organism ID length to a maximum of 10 charachters to help graphs readibility.</small></p>
<p class="muted"><small><i class="icon-flag"></i> If you want to set more informations to each organism, use "dape add".</small></p>
<p><code>dape add-multi Rm1021 AK83</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse4"><i class="icon-chevron-right"></i> <b class="text-success">add-mut</b> add a mutant of an existing organism</a>
</div>
<div id="collapse4" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>MutID</dt>
<dd>Mutant ID [compulsory parameter]</dd>
<dt>-m</dt>
<dd>This mutant wild-type OrgID [compulsory parameter]</dd>
<dt>-k</dt>
<dd>Mutant kind [insertion|deletion, default: deletion]</dd>
<dt>-n</dt>
<dd>Organism name</dd>
<dt>-d</dt>
<dd>Organism description</dd>
<dt>-c</dt>
<dd>Organism color</dd>
</dl>
<p><code>dape add-mut -n "Sinorhizobium meliloti mutant" -c blue -m Rm1021 Rm1021-mut</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse5"><i class="icon-chevron-right"></i> <b class="text-success">rm</b> remove a single organism</a>
</div>
<div id="collapse5" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> Some analysis may be redone after the removal of an organism.</small></p>
<p><code>dape rm Rm1021</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse6"><i class="icon-chevron-right"></i> <b class="text-success">clear</b> clear all the data</a>
</div>
<div id="collapse6" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-o</dt>
<dd>Keep organisms data</dd>
<dt>-k</dt>
<dd>Keep KEGG data</dd>
</dl>
<p><code>dape clear</code></p>
</div>
</div>
</div>
</div>
<h4>Metabolic network reconstruction</h4>
<p>This step should be carried on when the other two modules (or just one of them) have already been used; the needed KEGG data is downloaded and the genomic/phenomic maps and graphs can be produced.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse7"><i class="icon-chevron-right"></i> <b class="text-success">start</b> metabolic network reconstruction</a>
</div>
<div id="collapse7" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-g</dt>
<dd>Skip Kegg mapping</dd>
<dt>-y</dt>
<dd>Try to fetch Kegg data even while encountering failures</dd>
<dt>-p</dt>
<dd>Save each pathway graph [default: no]</dd>
<dt>-a</dt>
<dd>Create single organisms metabolic graphs instead of the whole pangenome</dd>
<dt>-t</dt>
<dd>Activity threshold for the combined matrix (suggested: half of the maximum value)</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> The -t option will be used only in mutants and pangenomic projects.</small></p>
<p><code>dape start</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse8"><i class="icon-chevron-right"></i> <b class="text-success">map</b> output KEGG metabolic maps with genomic/phenomic data</a>
</div>
<div id="collapse8" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>OrgID</dt>
<dd>Organism ID [optional]</dd>
<dt>-a</dt>
<dd>Plot the single organisms maps</dd>
<dt>-o</dt>
<dd>Diff mode: reference organism OrgID</dd>
<dt>-d</dt>
<dd>Phenomic activity difference threshold</dd>
<dt>-s</dt>
<dd>Skip the phenomic data</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> The -a option is used only in pangenomic projects.</small></p>
<p><code>dape map</code></p>
</div>
</div>
</div>
</div>
<h4>KEGG data import/export</h4>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse9"><i class="icon-chevron-right"></i> <b class="text-success">import</b> import a KEGG data dump</a>
</div>
<div id="collapse9" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>file</dt>
<dd>KEGG data dump file [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> The KEGG data dump file example can be seen by launching <i>dape export</i> on a complete project.</small></p>
<p><code>dape import kegg.tsv</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse10"><i class="icon-chevron-right"></i> <b class="text-success">export</b> export a KEGG data dump</a>
</div>
<div id="collapse10" class="accordion-body collapse">
<div class="accordion-inner">
<p class="muted"><small><i class="icon-flag"></i> A KEGG data dump file named "kegg.tsv" will be created.</small></p>
<p><code>dape export</code></p>
</div>
</div>
</div>
</div>
</div>
<div id="dgenome">
<div class="page-header">
<h1><div class="minititle">dgenome
<small>Genome and pangenome analysis</small></div></h1>
</div>
<p>
dgenome is the module used to analyze the genomic data, in particular it is used to <b>map the proteins to the KEGG database</b> (through a Blast analysis or parsing a <a href="http://www.genome.jp/tools/kaas/">KAAS output</a>) and to <b>calculate the pangenome</b>.
</p>
<h4>Genome input</h4>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse11"><i class="icon-chevron-right"></i> <b class="text-success">add</b> add a single proteome</a>
</div>
<div id="collapse11" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>file</dt>
<dd>Protein FASTA file [compulsory parameter]</dd>
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
</dl>
<p><code>dgenome add Rm1021.faa Rm1021</code></p>
</div>
</div>
</div>
</div>
<p>If many genomes have to be added to the project, all the FASTA files inside a directory can be imported at once.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse12"><i class="icon-chevron-right"></i> <b class="text-success">add-dir</b> add all the FASTA files inside a directory</a>
</div>
<div id="collapse12" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>folder</dt>
<dd>Fasta files directory [compulsory parameter]</dd>
<dt>-e</dt>
<dd>FASTA files extension [default: faa]</dd>
</dl>
<p><code>dgenome add-dir genomes</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse13"><i class="icon-chevron-right"></i> <b class="text-success">rm</b> remove a single genome</a>
</div>
<div id="collapse13" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> Some analysis may be redone after the removal of a genome.</small></p>
<p><code>dgenome rm Rm1021</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse14"><i class="icon-chevron-right"></i> <b class="text-success">clear</b> clear all the genomic data</a>
</div>
<div id="collapse14" class="accordion-body collapse">
<div class="accordion-inner">
<p><code>dgenome clear</code></p>
</div>
</div>
</div>
</div>
<h4>Genome mapping to KEGG and pangenome construction</h4>
<p>The genomes can be mapped to the KEGG database in two ways: locally, through a Blast-BBH analysis against a KEGG database, or by parsing the output of the <a href="http://www.genome.jp/tools/kaas/">KAAS annotator</a>. The second option is probably the best, since to obtain a KEGG database dump you need <a href="http://www.kegg.jp/kegg/docs/plea.html">a subscription</a>.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse15"><i class="icon-chevron-right"></i> <b class="text-success">add-ko</b> import a KAAS output</a>
</div>
<div id="collapse15" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>kofile</dt>
<dd>KAAS output file [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> In the KAAS webpage, select the BBH option and use the appropriate organisms list. When the analysis is finished save the KO list file.</small></p>
<p><code>dgenome add-ko Rm1021.tab AK83.tab</code></p>
</div>
</div>
</div>
</div>
<p>The pangenome is calculated through a Blast-BBH, but a custom pangenome can be imported: an example of the pangenome input file can be found <a href="https://raw.github.com/gist/4249736/813bf95de3cdf5694099da34c9083936806c278c/pangenome.tsv">here</a>.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse16"><i class="icon-chevron-right"></i> <b class="text-success">add-orth</b> add an user defined pangenome</a>
</div>
<div id="collapse16" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>orthfile</dt>
<dd>Pangenome file [compulsory parameter]</dd>
</dl>
<p><code>dgenome add-orth pangenome.tsv</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse17"><i class="icon-chevron-right"></i> <b class="text-success">start</b> start the KEGG mapping and the pangenome construction</a>
</div>
<div id="collapse17" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-n</dt>
<dd>Number of CPUs to be used</dd>
<dt>-l</dt>
<dd>Perform the KEGG mapping locally [default: use KAAS]</dd>
<dt>-k</dt>
<dd>KEGG Blast database location [only with -l]</dd>
<dt>-p</dt>
<dd>Orthologous groups prefix</dd>
<dt>-m</dt>
<dd>BLAST matrix for pangenome [Default: BLOSUM80]</dd>
<dt>-e</dt>
<dd>BLAST E-value threshold for pangenome [Default: 1e-10]</dd>
<dt>-s</dt>
<dd>Skip pangenome creation</dd>
<dt>-g</dt>
<dd>Skip Kegg mapping</dd>
<dt>-y</dt>
<dd>Try to fetch Kegg data even while encountering failures</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> With many genomes, the pangenome analysis may need several hours.</small></p>
<p><code>dgenome start -n 5</code></p>
</div>
</div>
</div>
</div>
<p>It is possible to transfer the KEGG annotations between orthologs: these annotations will be flagged and saved when using <i>dgenome export</i>.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse18"><i class="icon-chevron-right"></i> <b class="text-success">annotate</b> transfer KEGG annotations inside orthologous groups</a>
</div>
<div id="collapse18" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-s</dt>
<dd>Skip annotation merging (just check)</dd>
</dl>
<p><code>dgenome annotate</code></p>
</div>
</div>
</div>
</div>
<p>It is possible to revert the annotation transfer at any time.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse19"><i class="icon-chevron-right"></i> <b class="text-success">deannotate</b> revert the KEGG annotations merge</a>
</div>
<div id="collapse19" class="accordion-body collapse">
<div class="accordion-inner">
<p><code>dgenome deannotate</code></p>
</div>
</div>
</div>
</div>
<h4>Data export and statistics</h4>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse20"><i class="icon-chevron-right"></i> <b class="text-success">export</b> export the genomic data</a>
</div>
<div id="collapse20" class="accordion-body collapse">
<div class="accordion-inner">
<p><code>dgenome export</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse21"><i class="icon-chevron-right"></i> <b class="text-success">stats</b> print out some genome statistics</a>
</div>
<div id="collapse21" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-s</dt>
<dd>Save pictures in svg format, instead of png</dd>
</dl>
<p><code>dgenome stats</code></p>
</div>
</div>
</div>
</div>
</div>
<div id="dphenome">
<div class="page-header">
<h1><div class="minititle">dphenome
<small>Phenome analysis</small></div></h1>
</div>
<p>
dphenome is the module used to analyze the phenomic data, in particular it is used to <b>analyze the growth curves</b> and to <b>map the phenomic compounds to KEGG</b>.
</p>
<h4>Phenome input</h4>
<p>The Phenotype microarray output files that are read by DuctApe are csv files (like <a href="https://gist.github.com/mgalardini/4249736/raw/822016bd6383f8b2d980d2305b5770ef27d3d88e/Rm1021.csv">this one</a>).</p>
<p>From version 0.8.0, DuctApe is able to import the PM data in YAML/JSON format. These files may be generated by other softwares like <a href="http://opm.dsmz.de">opm</a>. The curve parameters calculated by other softwares will be mantained: they may be overridden using dphenome start -r</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse22"><i class="icon-chevron-right"></i> <b class="text-success">add</b> add a phenome file from a single organism</a>
</div>
<div id="collapse22" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>file</dt>
<dd>Phenotype microarray file [compulsory parameter]</dd>
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> The organism ID should be present in one of the following fields of the csv file: "Strain Name", "Strain Number", "Sample Number".</small></p>
<p><code>dphenome add Rm1021.csv Rm1021</code></p>
</div>
</div>
</div>
</div>
<p>Some phenotype microarray files may contain more than one strain: the <i>add-multi</i> subcommand should then be used.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse23"><i class="icon-chevron-right"></i> <b class="text-success">add-multi</b> add a phenomic file with more than one organism</a>
</div>
<div id="collapse23" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>file</dt>
<dd>Phenotype microarray csv file [compulsory parameter]</dd>
<p class="muted"><small><i class="icon-flag"></i> The organism IDs should be present in the "Strain Name" field of the csv file.</small></p>
<p><code>dphenome add-multi Rm1021</code></p>
</div>
</div>
</div>
</div>
<p>If many Phenotype microarray files have to be added to the project, all the csv files inside a directory can be imported at once.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse24"><i class="icon-chevron-right"></i> <b class="text-success">add-dir</b> add all the Phenotype microarray files inside a directory</a>
</div>
<div id="collapse24" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>folder</dt>
<dd>Phenotype microarray files directory [compulsory parameter]</dd>
</dl>
<p><code>dphenome add-dir phenomes</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse25"><i class="icon-chevron-right"></i> <b class="text-success">rm</b> remove a single phenome</a>
</div>
<div id="collapse25" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>OrgID</dt>
<dd>Organism ID [compulsory parameter]</dd>
</dl>
<p class="muted"><small><i class="icon-flag"></i> Some analysis may be redone after the removal of a phenome.</small></p>
<p><code>dphenome rm Rm1021</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse26"><i class="icon-chevron-right"></i> <b class="text-success">clear</b> clear all the phenomic data</a>
</div>
<div id="collapse26" class="accordion-body collapse">
<div class="accordion-inner">
<p><code>dphenome clear</code></p>
</div>
</div>
</div>
</div>
<p>Not all the PM plates are present inside DuctApe, including putative custom plates; they can be analyzed by importing <a href="https://raw.github.com/combogenomics/DuctApe/master/test/input/newplate.tsv">a tab-delimited file like this one</a>.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse27"><i class="icon-chevron-right"></i> <b class="text-success">import-plates</b> add new plates to DuctApe</a>
</div>
<div id="collapse27" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>file</dt>
<dd>Tab delimited file with custom plate data [compulsory parameter]</dd>
</dl>
<p><code>dphenome import-plates newtables.tsv</code></p>
</div>
</div>
</div>
</div>
<h4>Growth curves analysis and KEGG mapping</h4>
<p>Some Phenotype Microarray plates (PM1 to PM8) have a control well, which can be used to subtract the background signal. If a "blank" plate file is available, each well can be subtracted to its blank well.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse28"><i class="icon-chevron-right"></i> <b class="text-success">zero</b> subtract the control signals from some plates</a>
</div>
<div id="collapse28" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-b</dt>
<dd>Phenotype microarray blank file</dd>
</dl>
<p><code>dphenome zero</code></p>
</div>
</div>
</div>
</div>
<p>In some cases the Phenotype Microarray plates may have a different time end point; if this difference is significant it may alter the subsequent calculations. It is wise to trim the PM data to the minimum common time point.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse28a"><i class="icon-chevron-right"></i> <b class="text-success">trim</b> trim the signals to the minimum common time point</a>
</div>
<div id="collapse28a" class="accordion-body collapse">
<div class="accordion-inner">
<p><code>dphenome trim</code></p>
</div>
</div>
</div>
</div>
<p>The growth curves parameters (min, max, height, plateau, slope, lag, area, v, y0) are extracted through a fit to one of the following sigmoid functions: logistic, gompertz and richards; some of the extracted parameters (max, area, height, lag, slope) are used to perform a k-means clustering on all the growth curves, thus obtaining the so-called <b>Activity Index (AV)</b>, which with the dafault settings goes from 0 (no activity) to 9 (max activity). Using the -n option the user can decide the number of clusters and therefore the highest value for the AV. The optimal number of clusters may be decided by using the -e option.</p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse29"><i class="icon-chevron-right"></i> <b class="text-success">start</b> analyze the growth curves and map the phenomic compounds to KEGG</a>
</div>
<div id="collapse29" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-f</dt>
<dd>Save some intermediate pictures of the clustering process</dd>
<dt>-p</dt>
<dd>Skip parameters calculation</dd>
<dt>-g</dt>
<dd>Skip Kegg mapping</dd>
<dt>-y</dt>
<dd>Try to fetch Kegg data even while encountering failures</dd>
<dt>-r</dt>
<dd>Force parameters recalculation</dd>
<dt>-n</dt>
<dd>Number of clusters to be used for AV calculation [Default: 10]</dd>
<dt>-e</dt>
<dd>Perform an elbow test to choose the best "n" parameter</dd>
</dl>
<p><code>dphenome start</code></p>
</div>
</div>
</div>
</div>
<h4>Replica management</h4>
<p>DuctApe is able to remove the inconsistent replica from the phenomic experiment, following five distinct policies:</p>
<dl class="dl-horizontal">
<dt>replica</dt>
<dd>Remove a specific replica (the replica ID must be provided)</dd>
<dt>keep-max</dt>
<dd>Keep the highest AV values</dd>
<dt>keep-min</dt>
<dd>Keep the lowest AV values</dd>
<dt>keep-max-one</dt>
<dd>Keep only the highest AV value</dd>
<dt>keep-min-one</dt>
<dd>Keep only the lowest AV value</dd>
</dl>
An Activity Index delta is used to decide when to apply the policy.
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse30"><i class="icon-chevron-right"></i> <b class="text-success">purge</b> remove the inconsistent replicas</a>
</div>
<div id="collapse30" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>policy</dt>
<dd>Policy to be applied [compulsory parameter]</dd>
<dt>plateID</dt>
<dd>Plate(s) to be purged [default: all plates]</dd>
<dt>-d</dt>
<dd>Maximum AV delta before applying the purging policy [default: 3]</dd>
</dl>
<pre>dphenome purge -d 4 keep-max
dphenome purge replica 2</pre>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse31"><i class="icon-chevron-right"></i> <b class="text-success">restore</b> restore the purged growth curves</a>
</div>
<div id="collapse31" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>plateID</dt>
<dd>Plate(s) to be restored [default: all plates]</dd>
<p><code>dphenome restore</code></p>
</div>
</div>
</div>
</div>
<h4>Plotting, data export and statistics</h4>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse32"><i class="icon-chevron-right"></i> <b class="text-success">plot</b> plot the growth curves and the AV heatmaps</a>
</div>
<div id="collapse32" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-n</dt>
<dd>Experiment name</dd>
<dt>-s</dt>
<dd>Save pictures in svg format, instead of png</dd>
<dt>PLATE</dt>
<dd>Single plate to be plotted (optional)</dd>
<dt>WELL</dt>
<dd>Single well to be plotted</dd>
</dl>
<p><pre>dphenome plot
dphenome plot PM01
dphenome plot PM01 A01</pre></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse33"><i class="icon-chevron-right"></i> <b class="text-success">rings</b> plot the overall phenome in ring format</a>
</div>
<div id="collapse33" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-d</dt>
<dd>Activity Index delta threshold [default: 3]</dd>
<dt>-o</dt>
<dd>Diff mode: reference OrgID to which compare the other organisms</dd>
<dt>-s</dt>
<dd>Save pictures in svg format, instead of png</dd>
</dl>
<p><code>dphenome rings -d 4</code></p>
</div>
</div>
</div>
</div>
<p>From version 0.8.0, DuctApe is able to export the PM data in YAML/JSON format. These files can be loaded by other softwares like <a href="http://opm.dsmz.de">opm</a></p>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse34"><i class="icon-chevron-right"></i> <b class="text-success">export</b> export the phenomic data</a>
</div>
<div id="collapse34" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-j</dt>
<dd>Export PM data in JSON format instead of YAML</dd>
</dl>
<p><code>dphenome export</code></p>
</div>
</div>
</div>
</div>
<div class="accordion">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse35"><i class="icon-chevron-right"></i> <b class="text-success">stats</b> print out some phenome statistics</a>
</div>
<div id="collapse35" class="accordion-body collapse">
<div class="accordion-inner">
<dl class="dl-horizontal">
<dt>-a</dt>
<dd>Activity Index threshold [default: 5]</dd>
<dt>-d</dt>
<dd>Activity Index delta [default: 3]</dd>
<dt>-s</dt>
<dd>Save pictures in svg format, instead of png</dd>
</dl>
<p><code>dphenome stats</code></p>
</div>
</div>
</div>
</div>
</div>
<div id="examples">
<div class="page-header">
<h1><div class="minititle">Examples
<small>Annotated sample scripts</small></div></h1>
</div>
<div class="tabbable tabs-left">
<ul class="nav nav-tabs">
<li class="active"><a href="#lA" data-toggle="tab">Single</a></li>
<li><a href="#lB" data-toggle="tab">Mutants</a></li>
<li><a href="#lC" data-toggle="tab">Pangenome</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="lA">
<h4>Single organism</h4>
<p>
<a href="https://raw.github.com/gist/4249736/70e62e6e78e61c28fbca083b5064ec61c1e9e1a8/single.sh"
class="btn" target="_blank">
<i class="icon-download"></i> Download »</a>
</p>
<pre># Initialize the project
dape init
# add my organism using the ID MyOrg
dape add MyOrg
# add the proteome of MyOrg
dgenome add MyOrg.faa MyOrg
# adds the output of KAAS, a KEGG mapper
dgenome add-ko MyOrg.tab
# map the proteome to KEGG
dgenome start
# statistics and graphics
dgenome stats
# export the genomic data
dgenome export
# add the phenomic experiment, Phenotype microarray data
dphenome add MyOrg.csv MyOrg
# perform control subtraction
dphenome zero
# calculate the growth parameters and perform the clusterization, using 4 CPUs
dphenome start
# plot the growth curves
dphenome plot
# remove inconsistent replicas: keep the highest replicas when there is an activity index delta >= 3
dphenome purge -d 3 keep-max
# plot only those curves that are not purged
dphenome plot
# plot the phenomic ring
dphenome rings
# restore the purged replicas
dphenome restore
dphenome stats
dphenome export