Below are the solutions to these exercises on bioinformatics.
#################### # # # Exercise 1 # # # #################### "ATGTTGCATTCATTAATTAAGAACGACCCAATACA" #################### # # # Exercise 2 # # # #################### A #################### # # # Exercise 3 # # # #################### [1] 19 #################### # # # Exercise 4 # # # #################### B Did you notice how package specific command resulted into a different data type for the same string sequences? #################### # # # Exercise 5 # # # #################### pastedDNA <- paste(myDNA, myDNASeq) pastedDNA [1] "ATGTTGCATTCATTAATTAAGAACGACCCAATACA CTGATTT-GATGGTC-NAT" > class(pastedDNA ) [1] "character" #################### # # # Exercise 6 # # # #################### complement(myDNASeq) 19-letter "DNAString" instance seq: GACTAAA-CTACCAG-NTA #################### # # # Exercise 7 # # # #################### reverse(myDNASeq) 19-letter "DNAString" instance seq: TAN-CTGGTAG-TTTAGTC #################### # # # Exercise 8 # # # #################### reverseComplement(myDNASeq) 19-letter "DNAString" instance seq: ATN-GACCATC-AAATCAG #################### # # # Exercise 9 # # # #################### alphabetFrequency(myDNASeq) A C G T M R W S Y K V H D B N - + . 3 2 4 7 0 0 0 0 0 0 0 0 0 0 1 2 0 0 #################### # # # Exercise 10 # # # #################### Result: A
For exercise 10, I got this error
Error in .Call2(“DNAStringSet_translate”, x, skip_code, dna_codes[codon_alphabet], :
not a base at pos 8
which makes sense since it has a dash due to the missing nucleotide?