fasta_wc: Cound words in fasta file

Description Usage Arguments Examples

Description

Cound words in fasta file

Usage

1
fasta_wc(k = 1, file = "", text = NULL)

Arguments

k

Word size

file

FASTA filename

text

FASTA data as character vector

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Get system FASTA file holding the Agathis dammara chloroplast
# protein seqences
aa_file <- system.file("Agathis_dammara.chloroplast.faa", package=("zwc"))
# Count 1-mers (character frequency)
fasta_wc(aa_file, k=1)
# Count 2-mers
fasta_wc(aa_file, k=2)

# A raw string of text can be given
fasta_wc(k=2, text="AAATTTTTAAATATATATATATATATATATA")

# Or a FASTA file as a string
data(mito_dna)
fasta_wc(k=2, text=mito_dna) 

arendsee/zwc documentation built on May 10, 2019, 1:26 p.m.