dna 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +2 -0
- data/bin/dna +16 -0
- data/dna.gemspec +19 -0
- data/readme.md +26 -0
- metadata +25 -14
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use --create 1.8.7@dna
|
data/Gemfile
ADDED
data/bin/dna
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'dna'))
|
4
|
+
|
5
|
+
input, regexp = [File.open(ARGV[0]), ARGV[1]]
|
6
|
+
|
7
|
+
fail 'usage: dna input regexp > output' if regexp.nil?
|
8
|
+
|
9
|
+
records = Dna.new input
|
10
|
+
regexp = Regexp.new(regexp)
|
11
|
+
|
12
|
+
records.each do |record|
|
13
|
+
puts record if record.name =~ regexp
|
14
|
+
end
|
15
|
+
|
16
|
+
input.close
|
data/dna.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'dna'
|
3
|
+
s.version = '0.0.10'
|
4
|
+
s.date = '2012-05-21'
|
5
|
+
|
6
|
+
s.summary = 'DNA sequence parser'
|
7
|
+
s.description = 'for parsing various types of DNA sequence files'
|
8
|
+
|
9
|
+
s.authors = ["Austin G. Davis-Richardson"]
|
10
|
+
s.email = "harekrishna@gmail.com"
|
11
|
+
|
12
|
+
s.rubyforge_project = 'dna'
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
|
18
|
+
s.homepage = "http://github.com/audy/dna"
|
19
|
+
end
|
data/readme.md
CHANGED
@@ -18,6 +18,32 @@ With Ruby 1.8.7 or better:
|
|
18
18
|
|
19
19
|
`gem install dna`
|
20
20
|
|
21
|
+
## CLI
|
22
|
+
|
23
|
+
DNA gem has grep-like capabilities. Print records with (Ruby) regexp match in header.
|
24
|
+
|
25
|
+
```
|
26
|
+
$ dna input.fastq "[1-2]"
|
27
|
+
|
28
|
+
@1
|
29
|
+
TGAAACTTATTGATCACCCCGCTTGGCGTTGGGGAGAAATTCAGAAAAGAGTGCTTGATGGGGCGCCACATGCCGTGCAACCCACTCTCTTTCACGCAGCGCGCCCCA
|
30
|
+
+1
|
31
|
+
5888.6778888650/-//&,(,./*-11'//0&,-0.(.,,,,/2/&-,,,,,.(.,(,..&---&-,,,((*-----*+.&,,,,,(//&,,,-(,,+(,,,--&(
|
32
|
+
@2
|
33
|
+
GTCGCGGCTTACCACCCAACGATTTTTTTTAGAGGTGCTGGTTTCA
|
34
|
+
+2
|
35
|
+
2550//*-1./4.--/'+.2.,,,,,,,,&(/00.11426554+13
|
36
|
+
|
37
|
+
$ cat input.fasta | dna "\d"
|
38
|
+
|
39
|
+
>1
|
40
|
+
GAGAGATCTCATGACACAGCCGAAG
|
41
|
+
>2
|
42
|
+
GAGACAUAUCCNNNAA
|
43
|
+
|
44
|
+
```
|
45
|
+
|
46
|
+
|
21
47
|
## Usage
|
22
48
|
|
23
49
|
```ruby
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 10
|
10
|
+
version: 0.0.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Austin G. Davis-Richardson
|
@@ -15,30 +15,35 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-05-21 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: for parsing various types of DNA sequence files
|
22
22
|
email: harekrishna@gmail.com
|
23
|
-
executables:
|
24
|
-
|
23
|
+
executables:
|
24
|
+
- dna
|
25
25
|
extensions: []
|
26
26
|
|
27
27
|
extra_rdoc_files: []
|
28
28
|
|
29
29
|
files:
|
30
|
+
- .rspec
|
31
|
+
- .rvmrc
|
32
|
+
- Gemfile
|
33
|
+
- bin/dna
|
34
|
+
- dna.gemspec
|
30
35
|
- lib/dna.rb
|
31
36
|
- lib/parsers/fasta.rb
|
32
37
|
- lib/parsers/fastq.rb
|
33
38
|
- lib/parsers/qseq.rb
|
34
|
-
-
|
35
|
-
- spec/record_spec.rb
|
36
|
-
- spec/spec_helper.rb
|
39
|
+
- readme.md
|
37
40
|
- spec/data/empty.txt
|
38
41
|
- spec/data/test.fasta
|
39
42
|
- spec/data/test.fastq
|
40
43
|
- spec/data/test.qseq
|
41
|
-
-
|
44
|
+
- spec/dna_spec.rb
|
45
|
+
- spec/record_spec.rb
|
46
|
+
- spec/spec_helper.rb
|
42
47
|
homepage: http://github.com/audy/dna
|
43
48
|
licenses: []
|
44
49
|
|
@@ -67,10 +72,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
72
|
version: "0"
|
68
73
|
requirements: []
|
69
74
|
|
70
|
-
rubyforge_project:
|
71
|
-
rubygems_version: 1.8.
|
75
|
+
rubyforge_project: dna
|
76
|
+
rubygems_version: 1.8.24
|
72
77
|
signing_key:
|
73
78
|
specification_version: 3
|
74
79
|
summary: DNA sequence parser
|
75
|
-
test_files:
|
76
|
-
|
80
|
+
test_files:
|
81
|
+
- spec/data/empty.txt
|
82
|
+
- spec/data/test.fasta
|
83
|
+
- spec/data/test.fastq
|
84
|
+
- spec/data/test.qseq
|
85
|
+
- spec/dna_spec.rb
|
86
|
+
- spec/record_spec.rb
|
87
|
+
- spec/spec_helper.rb
|