Get fasta sequences of given input list from reference multi-fasta file.

fa_some_records(gene_list, fasta_file, outfile = "stdout.fa")

Arguments

gene_list

A charcter vector of gene names or gene ids; the gene names or gene ids should exactly match with sequence headers present in multi-fasta file

fasta_file

Either a path or a connection to reference multi-fasta file, from which subset of sequences for given input list is to be retrieved.

outfile

A character vector containing the path to the file to write output

Value

A multi-fasta file, containing sequences of given input list id's.

Examples

if (FALSE) { myGenelist <- system.file("exdata", "Sc_myGenelist.txt", package = "fastaR") myGenelist <- scan(myGenelist, what="character", sep=NULL) ref_fasta <- system.file("exdata", "Sc_nucl_R64-2-1.fasta", package = "fastaR") fastaR::fa_some_records(gene_list=myGenelist, fasta_file=ref_fasta, outfile="sc_myGenelist.fa") }