parse_fasta 0.0.2 → 0.0.3
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/parse_fasta.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05dfe793f1f4a6e2b08f20cbefb458ea2829fc01
|
4
|
+
data.tar.gz: 333c599269470308548c28268ec88c4095b09635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 598aa2ff5b244a68562dfb7cec991f14a7c4feefdbfeb2ddafd6b16f5cf1ea68fc1a08dd288e0a7abdf41385fa12f5475583fb644189e3786f4eef172f96dc57
|
7
|
+
data.tar.gz: e14fcae9115caa43511e140dbe0a0921ec1f29a55de292afa0781621d9b01467e3382e5018bfc6909fc79442cd9ad5a3e69c1315b86e5d290f0458e00e26effa
|
data/lib/parse_fasta.rb
CHANGED
@@ -13,10 +13,6 @@
|
|
13
13
|
# You should have received a copy of the GNU General Public License
|
14
14
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
15
|
|
16
|
-
def parse_line(line)
|
17
|
-
line.chomp.split("\n", 2).map { |s| s.gsub(/\n|>/, '') }
|
18
|
-
end
|
19
|
-
|
20
16
|
class File
|
21
17
|
def each_record
|
22
18
|
self.each("\n>") do |line|
|
@@ -24,4 +20,9 @@ class File
|
|
24
20
|
yield header.strip, sequence
|
25
21
|
end
|
26
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
def parse_line(line)
|
26
|
+
line.chomp.split("\n", 2).map { |s| s.gsub(/\n|>/, '') }
|
27
|
+
end
|
27
28
|
end
|