Skip to content

Chapel reverse-complement Brad Chamberlain

Chapel reverse-complement Brad Chamberlain

In looking at Chapel code size outliers, I wrote up the following variation of the Chapel #3 version of revcomp whose main change is to use the bytes type to represent the complement table more compactly and efficiently (inspired by Jeremy's C gcc #6 version). I also cleaned up a convoluted while-loop that I can't believe ever passed code review the first time around and made some other style improvements.

Attach your source code file

  • revcomp-blc.chpl (This is the preferred version going forward, which works with Chapel 1.29.0 or 1.28.0)
  • revcomp-blc-submitted.chpl (This is the original version I submitted when opening this issue, which will work for Chapel 1.26.0 through 1.28.0, though it generates a deprecation warning for 1.28.0; it ceases to work with 1.29.0)

Provide an example build command-line

$ chpl --fast revcomp-blc.chpl
$ ./revcomp-blc < fasta.small
Edited by Brad Chamberlain