csv2Fasta | R Documentation |
Convert a CSV or dataframe with sequences in a column into a fasta file
csv2Fasta(input_csv, output_fasta="mysequences.fasta", external=TRUE,seqID="Genus",seq="sequence")
input_csv |
The path to a csv file or the name of a dataframe in memory from which to extract the sequences and header |
output_fasta |
The name for your new fasta file |
external |
Whether or not input_csv is a path to an external file. Default is TRUE. Use FALSE if you wish to run this function on a dataframe |
seqID |
The name of the column that contains the names to use as headers for your fasta |
seq |
The name of the column that contains the sequences |
Returns a fasta in the working directory
Alex Dornburg, dornburgalex@gmail.com
all_summaries <- compile_busco_summaries(folder_path)
csv2Fasta(input_csv="Path/to/your/file.fasta", output_fasta="mysequences.fasta", external=TRUE,seqID="Genus",seq="sequence")
#or if internal and you need to filter by an identifier and combine a bunch of things to make a header (Genus, species, accession in this example)
dataframe
filter(Class== "targetTaxonomicRank")
mutate(fasta_id = paste0(">", genus, "_", species, "_", accession))
csv2Fasta(input_csv=dataframe, output_fasta="mysequences.fasta", external=FALSE,seqID="fasta_id",seq="sequence")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.