Hello guys, I am final year bioinformatics student, doing internship at the moment. So I am sorry for my noobiness in advance.
Here is what I was told to do, I have 100+ fasta files, and need to run pairwise sequence alignment with each other and save the outcome. Here is what I did and the errors I am getting.
library(seqinr)
setwd("C:\\Users\\Celik\\Downloads\\fasta\\R_deneme")
files = list.files(pattern="*.fasta")
seq = lapply(files, read.fasta)
library(Biostrings)
pws.alignments <- sapply(1:(length(seq)-1), function(ind) {
sapply((ind+1):length(seq), function(sec.ind) {
return(pairwiseAlignment(seq[[ind]], seq[[sec.ind]]))
})
})
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function 'seqtype' for signature '"SeqFastadna"'
I appreciate your help, thanks.
maybe try
readDNAStringSet
insteadread.fasta
?