README.md in parse_fasta-1.2.0 vs README.md in parse_fasta-1.3.0
- old
+ new
@@ -1,7 +1,9 @@
# parse_fasta #
+[![Gem Version](https://badge.fury.io/rb/parse_fasta.svg)](http://badge.fury.io/rb/parse_fasta)
+
So you want to parse a fasta file...
## Installation ##
Add this line to your application's Gemfile:
@@ -25,11 +27,11 @@
and over.
## Documentation ##
Checkout
-[parse_fasta docs](http://rubydoc.info/gems/parse_fasta/1.1.0/frames)
+[parse_fasta docs](http://rubydoc.info/gems/parse_fasta/1.3.0/frames)
to see the full documentation.
## Usage ##
Some examples...
@@ -53,9 +55,48 @@
FastqFile.open(ARGV.first, 'r').each_record do |head, seq, desc, qual|
puts [header, seq, desc, qual.qual_scores.join(',')].join("\t")
end
## Versions ##
+
+### 1.3.0 ###
+
+Add additional functionality to `each_record` method.
+
+#### Info ####
+
+I often like to use the fasta format for other things like so
+
+ >fruits
+ pineapple
+ pear
+ peach
+ >veggies
+ peppers
+ parsnip
+ peas
+
+rather than having this in a two column file like this
+
+ fruit,pineapple
+ fruit,pear
+ fruit,peach
+ veggie,peppers
+ veggie,parsnip
+ veggie,peas
+
+So I added functionality to `each_record` to keep each line a record
+separate in an array. Here's an example using the above file.
+
+ info = []
+ FastaFile.open(f, 'r').each_record(1) do |header, lines|
+ info << [header, lines]
+ end
+
+Then info will contain the following arrays
+
+ ['fruits', ['pineapple', 'pear', 'peach']],
+ ['veggies', ['peppers', 'parsnip', 'peas']]
### 1.2.0 ###
Added `mean_qual` method to the `Quality` class.