# Creating objects to work on:
sq_dna <- sq(c("CGATAGACA", "TGACAAAAC", "GTGACCGTA"),
alphabet = "dna_bsc")
sq_rna <- sq(c("CUGAAUGCAGUACCGUAAU", "AUGCCGUAAAUGCCAU", "CAGACCANNNAUAG"),
alphabet = "rna_ext")
# Sequences of the same lengths can be converted easily:
as.matrix(sq_dna)
# Sequences that differ in length are filled with NA to the maximum length:
as.matrix(sq_rna)
Run the code above in your browser using DataLab