[BioRuby] Ruby speed

Juan Falgueras juanfc at uma.es
Tue Nov 3 22:44:10 UTC 2009


	Hi, have you tried it with Ruby 1.9?



El 03/11/2009, a las 15:11, Yannick Wurm escribió:

> Hi,
>
> this is a more general ruby question, but since my application is  
> bioinformatics, I'm posting it here.
>
> Just wanted to prepend a few characters in front of FASTA identifiers.
>
>
> $time cat clustering/dirsForAssembly/singlets.fasta | ruby -pe "gsub 
> (/^>/, '>MyPrefix')" > abc
> 	real	0m20.379s
> 	user	0m0.741s
> 	sys	0m0.168s
>
>
> While the perl equivalent is one heck of a lot faster!!!
>
>
> $time cat clustering/dirsForAssembly/singlets.fasta | perl -p -i -e  
> 's/^>/>MyPrefix/g' > ab
> 	real	0m2.165s
> 	user	0m0.266s
> 	sys	0m0.146s
>
>
> Is there any hope for ruby?
>
> Thanks,
> yannick
>
>
> --------------------------------------------
>          yannick . wurm @ unil . ch
> Ant Genomics, Ecology & Evolution @ Lausanne
>   http://www.unil.ch/dee/page28685_fr.html
>
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby





More information about the BioRuby mailing list