[BioRuby] Bio::Sequence::Common#randomize with a block

Iain Barnett iainspeed at gmail.com
Sat Feb 16 15:55:39 UTC 2013


Hi,

I was looking at the Bio::Sequence::Common mixin, and specifically at the block form of `randomize`

https://github.com/bioruby/bioruby/blob/master/lib/bio/sequence/common.rb#L264

It returns an empty sequence, afaics to keep the return type the same, but wouldn't it be better to either return the randomised sequence e.g. `return seq` or yield the entire randomised sequence to the block, e.g. `yield seq` (and remove the `each`) as then you have more flexibility in what you can do with the sequence? Currently you can call `randomize` with a block and the only access you'll get to that is character by character. Personally, I'd prefer to get the randomised sequence returned, it seems strange not to.

I was just wondering. Any insight will be much appreciated.

Regards,
Iain



More information about the BioRuby mailing list