I'm R newbie and i would really appreciate some help. I want to apply dotPlot(seqinr) function to every combination of two protein sequences from a vector containing 3 protein sequences. This means i want to get 3 dotPlot charts in the end. I tried to use for loop:
#this is the vector containing 3 protein sequences. I turned each sequence to string to get 3 character vector:
seqs<-c(c2s(lepraeseq),c2s(ulceransseq),c2s(protseq))
#the loop:
for(i in 1:(length(seqs)-1)){
for(j in (i+1):length(seqs)){
print(dotPlot(as.character(i),as.character(j)))}}
#the outcome:
NULL
NULL
NULL
the plot is empty and without the protein names
Clearly its wrong and i'm struggling to find the right way. i and j are integers and i want them to be vectors containing the sequences as characters and i just can't figure out how.
If someone have other way i would be glad to receive it. Thank's, Bella