annotate readme.rst @ 3:7068d1548234 draft

Uploaded
author bgruening
date Sun, 06 Oct 2013 08:22:36 -0400
parents fc862d5bccaf
children 56e80527c482
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
1 Galaxy wrappers for common unix text-processing tools
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
2 =====================================================
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
3
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
4 The initial work was done by Assaf Gordon and Greg Hannon's lab ( http://hannonlab.cshl.edu )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
5 in Cold Spring Harbor Laboratory ( http://www.cshl.edu ).
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
6
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
7
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
8 Tools:
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
9
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
10 * awk - The AWK programmning language ( http://www.gnu.org/software/gawk/ )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
11 * sed - Stream Editor ( http://sed.sf.net )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
12 * grep - Search files ( http://www.gnu.org/software/grep/ )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
13 * sort_columns - Sorting every line according to there columns
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
14 * GNU Coreutils programs ( http://www.gnu.org/software/coreutils/ ):
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
15
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
16 * sort - sort files
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
17 * join - join two files, based on common key field.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
18 * cut - keep/discard fields from a file
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
19 * unsorted_uniq - keep unique/duplicated lines in a file
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
20 * sorted_uniq - keep unique/duplicated lines in a file
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
21 * head - keep the first X lines in a file.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
22 * tail - keep the last X lines in a file.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
23
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
24 Few improvements over the standard tools:
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
25
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
26 * EasyJoin - A Join tool that does not require pre-sorted the files ( https://github.com/agordon/filo/blob/scripts/src/scripts/easyjoin )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
27 * Multi-Join - Join multiple (>2) files ( https://github.com/agordon/filo/blob/scripts/src/scripts/multijoin )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
28 * Find_and_Replace - Find/Replace text in a line or specific column.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
29 * Grep with Perl syntax - uses grep with Perl-Compatible regular expressions.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
30 * HTML'd Grep - grep text in a file, and produced high-lighted HTML output, for easier viewing ( uses https://github.com/agordon/filo/blob/scripts/src/scripts/sort-header )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
31
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
32
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
33 Requirements
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
34 ------------
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
35
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
36 1. Coreutils vesion 8.19 or later.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
37 2. AWK version 4.0.1 or later.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
38 3. SED version 4.2 *with* a special patch
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
39 4. Grep with PCRE support
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
40
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
41 These will be installed automatically with the Galaxy `Tool Shed`_.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
42
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
43
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
44 -------------------
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
45 NOTE About Security
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
46 -------------------
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
47
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
48 The included tools are secure (barring unintentional bugs):
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
49 The main concern might be executing system commands with awk's "system" and sed's "e" commands,
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
50 or reading/writing arbitrary files with awk's redirection and sed's "r/w" commands.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
51 These commands are DISABLED using the "--sandbox" parameter to awk and sed.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
52
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
53 User trying to run an awk program similar to:
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
54
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
55 BEGIN { system("ls") }
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
56
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
57 Will get an error (in Galaxy) saying:
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
58
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
59 fatal: 'system' function not allowed in sandbox mode.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
60
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
61 User trying to run a SED program similar to:
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
62
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
63 1els
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
64
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
65 will get an error (in Galaxy) saying:
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
66
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
67 sed: -e expression #1, char 2: e/r/w commands disabled in sandbox mode
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
68
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
69
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
70 That being said, if you do find some vulnerability in these tools, please let me know and I'll try fix them.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
71
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
72 ------------
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
73 Installation
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
74 ------------
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
75
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
76 Should be done via the Galaxy `Tool Shed`_.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
77
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
78 .. _`Tool Shed`: http://wiki.galaxyproject.org/Tool%20Shed
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
79
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
80
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
81 ----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
82 TODO
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
83 ----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
84
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
85 - unit-tests
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
86 - uniqu will get a new --group funciton with the 8.22 release, its currently commended out
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
87 - also shuf will get a major improved performance with large files http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=20d7bce0f7e57d9a98f0ee811e31c757e9fedfff
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
88 we can remove the random feature from sort and use shuf instead
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
89 - move some advanced settings under a conditional, for example the cut tools offers to cut bytes
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
90 - cut wrapper has some output conditional magic for interval files, that needs to be checked
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
91 - comm wrapper, see the Galaxy default one
2
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
92 - evaluate the join wrappers against the Galaxy ones, maybe we should drop them
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
93
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
94
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
95 -------
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
96 License
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
97 -------
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
98
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
99 * Copyright (c) 2009-2013 A. Gordon (gordon <at> cshl dot edu)
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
100 * Copyright (c) 2013 B. Gruening (bjoern dot gruening <at> gmail dot com)
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
101
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
102
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
103 Permission is hereby granted, free of charge, to any person obtaining
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
104 a copy of this software and associated documentation files (the
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
105 "Software"), to deal in the Software without restriction, including
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
106 without limitation the rights to use, copy, modify, merge, publish,
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
107 distribute, sublicense, and/or sell copies of the Software, and to
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
108 permit persons to whom the Software is furnished to do so, subject to
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
109 the following conditions:
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
110
3
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
111 The above copyright notice and this permission notice shall be
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
112 included in all copies or substantial portions of the Software.
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
113
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
114 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
115 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
116 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
117 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
118 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
119 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
120 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7068d1548234 Uploaded
bgruening
parents: 2
diff changeset
121