Hi Emmanuel, thanks for your answer. 

I know the solution that you are suggesting, but I must do this conversion to 
many species and sequences (about 200 species and 10 sequences) and I don't 
have the accession numbers, so I was asking for a function to do that in more 
automatically way, but thanks anyway.


I also sent an email to the author of function “ncbi_byname”, and he answered 
me with a solution very useful. I put the link for the solution below for 
anyone interested.


https://discuss.ropensci.org/t/traits-ncbi-byname-to-dnabin-objects/878


Cheers,

Thiago

​___________________________________________________________________
Thiago A. Leão Pires
Ph.D. student | Campinas State University - UNICAMP
Collaborator Researcher – Biogeography, Ecology and Evolution Lab - UNIFESP
Visitor Ph.D. student – Research School of Biology - ANU
      




-----Mensagem original-----
De: Emmanuel Paradis [mailto:emmanuel.para...@ird.fr] 
Enviada em: sexta-feira, 22 de setembro de 2017 20:04
Para: Thiago A. Leão-Pires <pires.thiagoaugu...@gmail.com>; 
R-sig-phylo@r-project.org
Assunto: Re: [R-sig-phylo] Converting from data frame or a list of data frames 
to a DNAbin

Hi Thiago,

You need to write the sequence in a FASTA file, then use read.dna(, format = 
"f"). Another solution, if you have the GenBank accession numbers, is to use 
read.GenBank in ape.

Best,

Emmanuel

Le 21/09/2017 à 06:35, Thiago A. Leão-Pires a écrit :
> Dear Listserve,
> 
> I'm having trouble converting a file resulting from the function 
> “ncbi_byname” (example below), which is a list of data frames 
> including taxon names, gene description, DNA sequences etc, to a DNAbin file.
> 
> 
> Does anyone know of any function or solution to this problem?
> 
> 
> Ex:
> head(dna_tad_12s)
> [[1]]
>                taxon gene_desc gi_no acc_no length sequence spused
> 1 Hylomantis_aspera        NA    NA     NA     NA       NA     NA
> 
> 
> 
> [[2]]
>                  taxon
> 1 Allobates_femoralis
> 
> gene_desc
> 1 Epipedobates femoralis 16S ribosomal RNA gene, partial sequence; 
> mitochondrial gene for mitochondrial product
>      gi_no acc_no length
> 1 7682283   <NA>    547
> 
> sequence
> 1
> GTCAAGCCTGCCCAGTGACATTGTTCAACGGCCGCGGTATCCTAACCGTGCGAAGGTAGCGTAATCACTT
> GTCCTT 
> TAAATAAGGACTAGTATGAACGGCTTCACGAAGGCTATACTGTCTCCTTAATCTAATCAGTTAAACTAAT
> CTCCCC 
> GTGAAGAAGCGGGGATTCATTTATAAGACGAGAAGACCCTATGGAGCTTTAAACATCTAAGACACTTGAT
> TACACC 
> CACTAAACTTCACGCAACCTATCATTTTGTCTTAAGTTTTAGGTTGGGGTGACCACGGAGAAAAATTTAA
> CCTCCA 
> CGTAGAAAGAAAATTCTTTTCTAAGCAAAAAGCCACATCTTAACGCATCAATATATTGACTTAAATTGAC
> CCAATT 
> TCTTGCTCAACGAACCAAGTTACCCTAGGGATAACAGCGCAATCCNCTTTAAGAGCTCCTATCGACAAGC
> GGGCTT 
> ACGACCTCGATGTTGGATCAGGGTATCCTAATGGTGCAACAGCTATTAACGGTTCGTTTGTTCAACGATT
> AAAACC
> CTACGTGATCTGAGT
>                    spused
> 1 Epipedobates femoralis
> 
> 
> 
> 
> 
> Thanks,
> 
> Cheers,
> 
> Thiago
> ​___________________________________________________________________
> Thiago A. Leão Pires
> Ph.D. student | Campinas State University - UNICAMP Collaborator 
> Researcher – Biogeography, Ecology and Evolution Lab - UNIFESP Visitor 
> Ph.D. student – Research School of Biology - ANU
>   <http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4298681Z0>
> <http://www.thiagoaugustopires.wix.com/naturevisions>     <Skype ID:
> thiago.augusto.pires>
> <https://www.researchgate.net/profile/Thiago_Leao-Pires>
> 
> 
> 
> 
> 
> 
> 
> Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : 
> http://f.security-mail.net/408mnsBeGbX
> 
> 
> 
> 
> 
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org 
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at 
> http://www.mail-archive.com/r-sig-phylo@r-project.org/
> 

---
Este e-mail foi verificado quanto a vírus pelo AVG.
http://www.avg.com

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to