Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Creating flatfile multi fasta files

Robert A. Petit III edited this page Jul 12, 2016 · 2 revisions

Example of creating fasta file of contigs in database using Bioconductor. Obvs, the contigs file can be subsetted as needed.

library(Biostrings)
contigs <- get_contigs(2667)
sa_contigs <- DNAStringSet(contigs$sequence)
names(sa_contigs) <- contigs$name
writeXStringSet(sa_contigs, "~/sa_contigs", append=FALSE, format="fasta")
Clone this wiki locally