importFasta: Import nucleotide sequence from fasta file

Description Usage Arguments Details Value Examples

Description

A fasta file containing single or multiple sequences is imported as a lowercase character string, or a vector of multiple character strings.

Usage

1
importFasta(fastaLocation, sepSequences = FALSE)

Arguments

fastaLocation

Location of fasta file.

sepSequences

If FALSE fasta files containing multiple sequences are concatenated into one string, otherwise a vector of strings is returned.

Details

Comments marked by ‘;’ are ignored. If importing sequences for use in CPBtable, make sure to set sepSequences to TRUE otherwise sequences not divisible by three might shift the read frame.

Value

seqs

Sequence(s).

seqNames

Names of all sequences.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Tick borne encephalitis virus NS5 coding region
fastaLocation <- system.file('tbevns5.fasta', package = 'CPBias')
tbev <- importFasta(fastaLocation)
tbev[[2]]

# Randomly selected protein coding sequences from the human
# CCDS data set.
fastaLocation <- system.file('ccds.fasta', package = 'CPBias')
ccds <- importFasta(fastaLocation, sepSequences = TRUE)
ccds[[2]]

alex-sbu/CPBias documentation built on May 11, 2019, 11:24 p.m.