Advertisement
Guest User

Untitled

a guest
Apr 12th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.17 KB | None | 0 0
  1. def gc(st:String):Double={
  2.     val a = (st.count(_=='C') + st.count(_=='G'))*100/st.length.toDouble
  3.     BigDecimal(a).setScale(6, BigDecimal.RoundingMode.HALF_UP).toDouble
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement