Entering edit mode
3.7 years ago
trejomarco6
•
0
I proceed to import this alignment file to save it into a variable in R
x <- read.alignment("humanSeqAligned.fasta", "fasta")
and I get this error:
Error in read.alignment("humanSeqAligned.fasta", :
File humanSeqAligned.fasta is not readable
Execution halted
Can anyone tell me what I am doing wrong?
It looks like you might have two different quotation mark types in your command (
“
versus"
). Try manually typing the command into your terminal instead of copy-pasting it from somewhere if you did so.Python code above is not writing an aligned file. Why are you trying to read it as an alignment?
Sorry i did an alignment on my terminal already.
Then please remove the python code in original question. It is not related to issue you are experiencing.
Okay fixed the question and fix what rpolicastro suggested to do. Now I have updated the question with what R is telling me.
Is the file in the same working directory as R? You can check the R working directory with
getwd()
, and list the files withlist.files()
.Are you able to view the file with
less/cat
? Is it in the current working directory?Yes I able to run less -S humanSeqAlign.Fasta in the working directory and im able to see all of the ids and base pairs in this file. Which makes me confused on why is not being read through R.
Is your file in one of the following alignment formats?
Can you show us
head -5 yourfile
?Is in a fasta format. Is a long file but when I run head -5.
aligned fasta
format is not the same asplain fasta
format. Just making sure. example of an aligned fasta file belowIs a long file so I can't post the full output.
As long as all sequences are same length and leading and trailing positions are indicated by tildes (~) and gap positions are indicated by periods (.) you should have the correct format.
Yeah I checked to see if they were all the same length and if there's any suspicious characters, but I couldn't find any.
I accidentally spammed this post which caused it to be removed and for you to be suspended. I approved the post and reinstated you. Sorry!
As mentioned by rpolicastro , make sure the file is present in the R work directory.