fa_some_records: Get fasta sequences for a gene list.

Description Usage Arguments Value Examples

View source: R/fa_utils.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

 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")


## End(Not run)

sethiyap/fastaR documentation built on June 16, 2020, 1:41 a.m.