bioruby/bioruby — pull request #67 by wwood (2012-08-05 23:53:52+00:00)
Title: flesh out FastaFormat documentation

Hi,

I've occasionally thought that the Bio::FastaFormat documentation could be improved somewhat, and I've finally managed to do something about it, hoping to make it into the 1.4.3 release.

In the process of doing this, I noticed that
* Neither ```FastaFormat#type``` (```f.type```) nor ```Sequence::AA#type``` (```f.aaseq.type```) appear to be a method, even though it is referenced in the previous documentation (they throw an undefined when called)
* The ```FastaFormat#comment``` method seems to return nil, when I don't expect that. I notice that there is no tests for that, either, leaving me wondering whether it is a bug?

One method I wish existed, but doesn't appear to, is simply to return the first word of the fasta defline, minus any other parsing. Basically, it'd be a simple method like this:

```ruby
def first_word
@definition.split(/\s/)[0]
end
```

I realise this is rather trivial, but seems to be very often used, e.g. by tab separated BLAST output, but there doesn't appear to be any method for it. Am I overlooking it, or is it too trivial?