Skip to main content

Summarize a FASTA database

Description

Counts the sequences and amino acids and summarizes the sequence lengths.

Usage

make_fasta_summary(fasta)

Arguments

fasta A list of sequences, as returned by read_fasta().

Value

A list with the elements n_sequences, length_summary and aa_freq (counts per amino acid).

See Also

Other FASTA databases: create_decoy_db(), create_fgcz_fasta_db(), load_contaminants(), make_chain_id(), make_chain_id_uniprot(), read_fasta(), remove_signal_peptide(), reverse_seq(), write_fasta()

Examples

library("prozor")

file <- system.file("extdata/fgcz_contaminants2022_20220405.fasta.gz", package = "prozor")
fasta <- read_fasta(file)
make_fasta_summary(fasta)
$n_sequences
[1] 505

$length_summary
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    6.0   167.0   404.0   394.9   508.0  4061.0 

$aa_freq
    A     B     C     D     E     F     G     H     I     K     L     M     N 
13294     5  5640  9463 14735  6332 19192  4128  8134 10679 17753  3362  8431 
    P     Q     R     S     T     V     W     X     Y     Z 
 7989 10450 10845 19726 10337 11299  1693    11  5935     3