Learn R Programming

GenomicTools.fileHandler (version 0.1.5.9)

exportFA: Exporting a Fasta File.

Description

This function exports a standard fasta file.

Usage

exportFA(fa, file = NULL)

Arguments

fa

fasta object

file

Character, specifies filename/path

Value

A fasta file

Details

This function exports a fasta object to a standard fasta file. If no file name is given, the variable name will be used instead.

Examples

Run this code
# NOT RUN {
 # Define here the location on HDD for the example file
   fpath <- system.file("extdata","example.fasta", package="GenomicTools.fileHandler")
 # Import the example fasta file  
   fastaFile <- importFA(file=fpath)
   newFasta <- fastaFile[1:5]
   
myfile <- file.path(tempdir(), "myLocs.fa")
   
  exportFA(newFasta, file=myfile)


# }

Run the code above in your browser using DataLab