Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. ```r
  2. library(ape)
  3. data(woodmouse)
  4. #Just the third codon (assuming alignment is in-frame)
  5. woodmouse[, seq(1, ncol(woodmouse), by=3) ]
  6. ```
  7.  
  8. ```
  9. ## 15 DNA sequences in binary format stored in a matrix.
  10. ##
  11. ## All sequences of same length: 322
  12. ##
  13. ## Labels: No305 No304 No306 No0906S No0908S No0909S ...
  14. ##
  15. ## Base composition:
  16. ## a c g t
  17. ## 0.285 0.238 0.219 0.258
  18. ```
  19.  
  20. ```r
  21. #skipping the thrid codon
  22. woodmouse[, -seq(1, ncol(woodmouse), by=3) ]
  23. ```
  24.  
  25. ```
  26. ## 15 DNA sequences in binary format stored in a matrix.
  27. ##
  28. ## All sequences of same length: 643
  29. ##
  30. ## Labels: No305 No304 No306 No0906S No0908S No0909S ...
  31. ##
  32. ## Base composition:
  33. ## a c g t
  34. ## 0.318 0.273 0.079 0.330
  35. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement