[R] write.dna command
wjm1 at caa.columbia.edu
Mon Jun 19 21:15:17 CEST 2017
Does the following solve your issue?
On Sat, Jun 17, 2017 at 7:26 AM, Mogjib Salek <mogjibs at gmail.com> wrote:
> Hi all,
> I am learning R by "doing". And this is my first post.
> I want to use R: 1- to fetch a DNA sequence from a databank (see bellow)
> and 2- store it as FASTA file.
> The problem: neither an error is prompted nor the fasta file is created.
> Testing the code (see bellow), I notice that everything works until
> the *"write.dna"
> *command - which is not creating the fasta file.
> Here is my code:
> ####Get gene sequence from GenBank and store it as fasta file
> ####16 June 2017
> #1- Set the working directory and make sure the right libraries are
> (make sure 'ape' and 'seqinr' packages are installed)
> WD <- "~Documents/Scripting/R_Studio/Sequences/"
> setwd <- (WD)
> #2- Fetch a sequence ( bellow, "enter manually the desired DNA ID") from
> GenBank and store it as fasta file.
> DNAid <- "JF806202"
> # Store the sequence in lst (a list)
> lst <- read.GenBank(DNAid, as.character = T)
> # convert the sequence to fasta format
> write.dna (lst, file = "DNAseq.fasta", format = "fasta", append =
> nbcol= 6, colsep= " ", colw= 10)
> Any help will be appreciated.
> Thank you.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help