lsa 0.1.0 → 0.1.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/lib/lsa.rb +4 -6
- data/lib/lsa/version.rb +1 -1
- data/test_files/mapping_with_bad_group_name.txt +4 -0
- metadata +3 -4
- data/test_files/#cluster_file.txt# +0 -3
- data/test_files/.#cluster_file.txt +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bce829681f089991e590e51004e9f005aeeaf5fd
|
4
|
+
data.tar.gz: f593d26fb0b6acfcc6fab9b78a9ffaefc42e2e1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed48ee109b8b9716f1d0005b6115a40afb4497da06222d12f935662aead64534b3e5d0ba2c8e24be2f9f1e260281b2124cf5e1c835080b1ff0120a14543de109
|
7
|
+
data.tar.gz: 81a6f135ec5217025dbcc4ba16620ccb8292454d6b91453e5fd4cb2ee446dcb891f065c0c1eab345e510bf7bc838fe934c4a68d2374255f71cb729c2a3d34377
|
data/lib/lsa.rb
CHANGED
@@ -4,26 +4,24 @@ require "abort_if"
|
|
4
4
|
|
5
5
|
include AbortIf
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
7
|
module Lsa
|
11
|
-
|
12
8
|
def clean_str str
|
13
9
|
str.strip.gsub(/[^\p{Alnum}_]+/, "_").gsub(/_+/, "_")
|
14
10
|
end
|
15
11
|
|
16
|
-
|
17
12
|
def parse_mapping_file mapping_fname, mmseqs_final_outf
|
18
13
|
data_labels = []
|
19
14
|
label2outf = {}
|
20
15
|
doc2new_doc = {}
|
21
16
|
File.open(mapping_fname, "rt").each_line.with_index do |line, idx|
|
22
17
|
if idx.zero?
|
23
|
-
|
18
|
+
current_label, *data_labels = line.chomp.split("\t").map do |str|
|
24
19
|
clean_str str
|
25
20
|
end
|
26
21
|
|
22
|
+
abort_if data_labels.any? { |label| label == "original" },
|
23
|
+
"Illegal data label: 'original'. Please change it."
|
24
|
+
|
27
25
|
abort_unless data_labels.uniq.count == data_labels.count,
|
28
26
|
"The data labels are not unique in #{mapping_fname}"
|
29
27
|
|
data/lib/lsa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lsa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abort_if
|
@@ -109,14 +109,13 @@ files:
|
|
109
109
|
- lib/lsa.rb
|
110
110
|
- lib/lsa/version.rb
|
111
111
|
- lsa.gemspec
|
112
|
-
- test_files/#cluster_file.txt#
|
113
|
-
- test_files/.#cluster_file.txt
|
114
112
|
- test_files/cluster_file_another_group.txt
|
115
113
|
- test_files/cluster_file_group.txt
|
116
114
|
- test_files/cluster_file_original.txt
|
117
115
|
- test_files/e_coli.faa.gz
|
118
116
|
- test_files/m_mazei.faa.gz
|
119
117
|
- test_files/mapping.txt
|
118
|
+
- test_files/mapping_with_bad_group_name.txt
|
120
119
|
- test_files/s_flexneri.faa.gz
|
121
120
|
- test_files/small/e_coli.faa.gz
|
122
121
|
- test_files/small/m_mazei.faa.gz
|
@@ -1 +0,0 @@
|
|
1
|
-
test_files/moorer@roaming-254-155.host.udel.edu.943
|