Download intergenic spacers between specific genes for all findings in genbank

Download intergenic spacers between specific genes for all findings in genbank

0

Good afternoon,

I want to download fasta from genbank for intergenic spacers between certain genes for a taxon (for example, atpB-rbcL from the chloroplast genome). If I were downloading fasta for a single gene (GENE), I would do this:

library(seqinr)
choosebank("genbank", timeout = 30)
queries <- query("gene_and_species", "sp=GENE AND K=species")

dna.matrix <- list()
names.matrix <- list()
for (x in 1:length(getSequence(queries$req))){
    dna.matrix[[x]] <- getSequence(queries$req[[x]])
    names.matrix[[x]] <- getName(queries$req[[x]])
}

write.fasta(dna.matrix, as.vector(names.matrix), file.out = "species_and_GENE.fasta")

closebank()

How can I download fasta for intergenic spacers between certain genes?

Best regards,
Poecile


seqinr


R


genbank


search


phylogeny

• 17 views

Read more here: Source link