lederhosen 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lederhosen.gemspec +2 -2
- data/lib/lederhosen/tasks/cluster.rb +3 -3
- data/lib/lederhosen/tasks/otu_table.rb +8 -5
- data/lib/lederhosen/version.rb +1 -1
- data/readme.md +22 -22
- metadata +3 -3
data/lederhosen.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lederhosen"
|
8
|
-
s.version = "1.3.
|
8
|
+
s.version = "1.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Austin G. Davis-Richardson"]
|
12
|
-
s.date = "2012-11-
|
12
|
+
s.date = "2012-11-26"
|
13
13
|
s.description = "Various tools for OTU clustering"
|
14
14
|
s.email = "harekrishna@gmail.com"
|
15
15
|
s.executables = ["lederhosen"]
|
@@ -6,7 +6,7 @@ module Lederhosen
|
|
6
6
|
|
7
7
|
method_option :input, :type => :string, :required => true
|
8
8
|
method_option :database, :type => :string, :required => true
|
9
|
-
method_option :threads, :type => :numeric, :default =>
|
9
|
+
method_option :threads, :type => :numeric, :default => false
|
10
10
|
method_option :identity, :type => :numeric, :required => true
|
11
11
|
method_option :output, :type => :string, :required => true
|
12
12
|
method_option :strand, :type => :string, :default => 'plus'
|
@@ -33,8 +33,8 @@ module Lederhosen
|
|
33
33
|
"--strand #{strand}"
|
34
34
|
]
|
35
35
|
|
36
|
-
# threads =
|
37
|
-
if threads !=
|
36
|
+
# threads = False : use all threads (default)
|
37
|
+
if threads != false
|
38
38
|
cmd << "--threads #{threads}"
|
39
39
|
end
|
40
40
|
|
@@ -47,12 +47,15 @@ module Lederhosen
|
|
47
47
|
pbar.inc line.unpack('*C').size
|
48
48
|
|
49
49
|
dat = parse_usearch_line(line.strip)
|
50
|
-
next if dat.nil?
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
if dat.nil? # unclassified
|
52
|
+
levels.each { |level| level_sample_cluster_count[level][input_file]['unclassified_reads'] += 1 }
|
53
|
+
else # classified
|
54
|
+
levels.each do |level|
|
55
|
+
name = dat[level] rescue nil
|
56
|
+
all_names[level] << name
|
57
|
+
level_sample_cluster_count[level][input_file][name] += 1
|
58
|
+
end
|
56
59
|
end
|
57
60
|
|
58
61
|
end
|
data/lib/lederhosen/version.rb
CHANGED
data/readme.md
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
|
3
3
|
# Lederhosen
|
4
4
|
|
5
|
-
|
5
|
+
OTU clustering for rRNA amplicons. Lederhosen is intended to be simple, robust and easy to use.
|
6
|
+
|
7
|
+
### Why not QIIME?
|
8
|
+
|
9
|
+
QIIME is great but imagine for a moment, if you will, a world where there was only one web browser.
|
6
10
|
|
7
11
|
### About
|
8
12
|
|
@@ -13,24 +17,20 @@ using paired and non-paired end short reads such as those produced by Illumina (
|
|
13
17
|
- Lederhosen is free and open source under the [MIT open source license](http://opensource.org/licenses/mit-license.php/).
|
14
18
|
- Except for USEARCH which requires a license, Lederhosen is available for commercial use.
|
15
19
|
|
16
|
-
|
17
|
-
|
18
|
-
0. Obtain & Install [USEARCH](http://www.drive5.com/) (32bit is fine for non-commercial use)
|
19
|
-
2. Get a copy of [TaxCollector](http://github.com/audy/taxcollector)
|
20
|
-
3. Install Lederhosen by typing:
|
21
|
-
|
22
|
-
`sudo gem install lederhosen`
|
23
|
-
4. Check installation by typing `lederhosen`. You should see some help text.
|
24
|
-
|
25
|
-
## Features
|
20
|
+
### Features
|
26
21
|
|
27
22
|
- Sequence trimming (paired-end Illumina).
|
28
23
|
- Parallel, referenced-based clustering to TaxCollector using USEARCH
|
29
24
|
- Generation and filtering of OTU abundancy matrices.
|
30
25
|
|
31
|
-
|
26
|
+
### Installation
|
32
27
|
|
33
|
-
|
28
|
+
0. Obtain & Install [USEARCH](http://www.drive5.com/) (32bit is fine for non-commercial use)
|
29
|
+
2. Get a copy of [TaxCollector](http://github.com/audy/taxcollector) or [GreenGenes](http://greengenes.lbl.gov) 16S database
|
30
|
+
3. Install Lederhosen by typing:
|
31
|
+
|
32
|
+
`sudo gem install lederhosen`
|
33
|
+
4. Check installation by typing `lederhosen`. You should see some help text.
|
34
34
|
|
35
35
|
## Tasks
|
36
36
|
|
@@ -50,8 +50,8 @@ Create UDB database required by usearch from TaxCollector
|
|
50
50
|
|
51
51
|
```bash
|
52
52
|
lederhosen make_udb \
|
53
|
-
|
54
|
-
|
53
|
+
--input=taxcollector.fa \
|
54
|
+
--output=taxcollector.udb
|
55
55
|
```
|
56
56
|
|
57
57
|
### Cluster Reads using USEARCH
|
@@ -60,10 +60,10 @@ Cluster reads using USEARCH. Output is a uc file.
|
|
60
60
|
|
61
61
|
```bash
|
62
62
|
lederhosen cluster \
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
--input=trimmed/*.fasta \
|
64
|
+
--identity=0.95 \
|
65
|
+
--output=clusters_95.uc \
|
66
|
+
--database=taxcollector.udb
|
67
67
|
```
|
68
68
|
### Generate OTU table(s)
|
69
69
|
|
@@ -71,9 +71,9 @@ Create an OTU abundance table where rows are samples and columns are clusters. T
|
|
71
71
|
|
72
72
|
```bash
|
73
73
|
lederhosen otu_table \
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
--clusters=clusters_95.uc \
|
75
|
+
--prefix=otu_table \
|
76
|
+
--level=domain phylum class order family genus species
|
77
77
|
```
|
78
78
|
|
79
79
|
This will create the files:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lederhosen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dna
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
segments:
|
162
162
|
- 0
|
163
|
-
hash: -
|
163
|
+
hash: -2600038455412980670
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
none: false
|
166
166
|
requirements:
|