lorem_ipsum_bio 0.0.0 → 0.0.1
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.
- checksums.yaml +4 -4
- data/bin/lorem_ipsum_bio +19 -0
- data/lib/lorem_ipsum_bio.rb +8 -8
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e4b6f5bad8822d2e4650414fc31d1da2945f020
|
4
|
+
data.tar.gz: 87a826da65789556449fe8a24857fe87ed043e18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f87224d623dcb80926d28e8c6aedb6a28a6c5a85fb2eeeb76813ca2cb1c26d7ef86851e04bd683417a8ba0f2b00ca99c09165a8f94b5b1a84c8db53c5cfce97
|
7
|
+
data.tar.gz: d2515d7bfb23a446c35267526db68a3a67c8219c636e51f1b54ee27a8beba95157c0c91f7e7c05d3fccacf276ead5884d4e998a595ed1f97d2f40bc181d95ffa
|
data/bin/lorem_ipsum_bio
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'lorem_ipsum_bio'
|
4
|
+
|
5
|
+
n = ARGV[0].to_i
|
6
|
+
print case ARGV[1..-1]
|
7
|
+
when [] # TODO
|
8
|
+
''
|
9
|
+
when ['DNA'], ['dna']
|
10
|
+
LoremIpsumBio.random_DNA(n)
|
11
|
+
when ['RNA'], ['rna']
|
12
|
+
LoremIpsumBio.random_RNA(n)
|
13
|
+
when ['PROTEIN'], ['protein'], ['Protein'],
|
14
|
+
['PROTEINS'], ['proteins'], ['Proteins'],
|
15
|
+
['AA'], ['aa']
|
16
|
+
LoremIpsumBio.random_protein(n)
|
17
|
+
else
|
18
|
+
LoremIpsumBio.random_string(n, ARGV[1..-1])
|
19
|
+
end
|
data/lib/lorem_ipsum_bio.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class LoremIpsumBio
|
2
|
-
def self.
|
2
|
+
def self.random_string(n, a)
|
3
3
|
out_str = ''
|
4
4
|
n.times { out_str << a.sample }
|
5
5
|
|
@@ -7,18 +7,18 @@ class LoremIpsumBio
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.random_DNA(n)
|
10
|
-
random_chars(['A', 'C', 'G', 'T']
|
10
|
+
random_chars(n, ['A', 'C', 'G', 'T'])
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.random_RNA(n)
|
14
|
-
random_chars(['A', 'C', 'G', 'U']
|
14
|
+
random_chars(n, ['A', 'C', 'G', 'U'])
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.random_protein(n)
|
18
|
-
random_chars(['A', 'C', 'D', 'E',
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
random_chars(n, ['A', 'C', 'D', 'E',
|
19
|
+
'F', 'G', 'H', 'I',
|
20
|
+
'K', 'L', 'M', 'N',
|
21
|
+
'P', 'Q', 'R', 'S',
|
22
|
+
'T', 'W', 'V', 'Y'])
|
23
23
|
end
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lorem_ipsum_bio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paweł Jankowski
|
@@ -13,10 +13,12 @@ dependencies: []
|
|
13
13
|
description: Lorem Ipsum Bio is a toolkit for generating varied random biological
|
14
14
|
sequences (especially usable as a control group in analysis)
|
15
15
|
email: p94jankowski@gmail.com
|
16
|
-
executables:
|
16
|
+
executables:
|
17
|
+
- lorem_ipsum_bio
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
21
|
+
- bin/lorem_ipsum_bio
|
20
22
|
- lib/lorem_ipsum_bio.rb
|
21
23
|
homepage: http://rubygems.org/gems/lorem_ipsum_bio
|
22
24
|
licenses:
|