Advertisement
Error_Dot_Exe

Untitled

Mar 29th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #Vraag 11
  2. cat "genes_CDS.fa" | tr '\n' ' ' | sed 's/ >/\n>/g' | awk '
  3. BEGIN {
  4. print "Het aantal codons per gen dat codeert voor cysteine:"
  5. }
  6. {
  7. tel=0
  8. for (i=1;i<=length($2);i+=3) {
  9. if (substr($2,i,3) == "TGT" || substr($2,i,3) "TGC") {
  10. tel++
  11. }
  12. }
  13. print substr($1,2)":",tel
  14. }
  15. '
  16.  
  17. #Vraag 12
  18. cat "Zebrafish_proteins_single_line.txt" | awk '
  19.  
  20. {
  21. tel=0
  22. for (i=1;i<=length($2);i++) {
  23. if (substr($2,i,1) == "M") {
  24. tel++;
  25. }
  26. }
  27. percentage=tel/length($2)*100;
  28. print substr($1,2)":",tel, "("percentage") %"
  29. }
  30. ' | sort -nrk2 | head -5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement