Writing a fasta file in R
I am trying to write a fasta file in R using this code:
write.fasta(sequences=df$seq, names=df$location, file.out="fasta", open = "w", nbchar = 33, as.string = FALSE)
df$seq contains my sequences and df$locations contains locations
However, my file produced looks like this
> +111
> +4675
> -837
> -2793
> +283
> +398
AGGGGGGCCCCA....
Can anyone understand why my sequences are not linking to their specific location?
My dataframe looks like this:
location seq
+111 AGGGGC...
+4675 ATTTGGGC...
-837 AGGGTTGC...
-2793 AGGGGC...
+283 AGTGGGC...
+398 AGGGTTGC...
• 1,457 views
•
link
1 answer
I have managed to solve my problems with the details in this link: https://bootstrappers.umassmed.edu/guides/main/r_writeFasta.html
• 0 views
•
link
Log in to answer this question.