errors in multiple sequencing alignment in r by use msa package!!
1
0
Entering edit mode
3.2 years ago

hi i am try to do multiple sequencing alignment in r by use msa package, so i download fasta file form NCBI and read it by read.fast, and put all my files in vector, but when i try to put my file in readDNAStringSet it give me this error Error in .normarg_input_filepath(filepath) : 'filepath' must be a character vector with no NAs

This is my code

library(seqinr)


fileOne <- read.fasta(file = 'p53 human .fasta', seqtype = "DNA",  as.string = T, forceDNAtolower= F )
fileTwo <- read.fasta(file = 'P53 mouse.fasta', seqtype =  "DNA", as.string = T,forceDNAtolower= F)

file3 <- c(fileOne, fileTwo)

library(msa)
library(Biostrings)
library(XVector)


 seq = readDNAStringSet( file3)
R alignment software error • 786 views
ADD COMMENT
0
Entering edit mode

you can do this way:

library(Biostrings)
fileOne <- readDNAStringSet("p53 human.fasta", format="fasta")
fileTwo <- readDNAStringSet("p53 mouse.fasta", format="fasta")
seq=c(fileOne,fileTwo)

This would concatenate two DNAstringset tobjects and create 'seq' DNAstringset object. But what do you want to do? In OP, two different fasta files are read and concatenated. Then you are trying to convert/read the concatenated file into a DNAstringset object.

ADD REPLY
0
Entering edit mode
3.2 years ago

Your file3 variable now contains the concatenated contents of fileOne and fileTwo. The argument to readDNAStringSet() should be paths to files. Read the docs.

ADD COMMENT

Login before adding your answer.

Traffic: 2470 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6