Skip to main content

Sequence coverage of each protein

Description

Summarizes residue_coverage() per protein: how many distinct peptides match it and which fraction of its residues they cover.

Usage

sequence_coverage(annotation, peptide = "peptide_seq")

Arguments

annotation A data frame with the columns protein_id, protein_sequence, offset and the column named by peptide, as returned by annotate_peptides() or annotate_aho().
peptide Name of the column with the peptide sequences.

Value

A data frame with one row per protein, ordered by protein_id: protein_id, protein_length, n_peptides (distinct peptides), n_covered (residues covered by at least one peptide) and coverage (n_covered / protein_length); 0 rows if annotation has none.

See Also

Other sequence coverage: plot_coverage(), residue_coverage()

Examples

library("prozor")

file <- system.file("extdata/IDResults.txt.gz", package = "prozor")
peptides <- unique(utils::read.delim(file)$peptideSeq)
fasta_file <- system.file("p1000_db1_example/Annotation_canSeq.fasta.gz", package = "prozor")
annot <- annotate_peptides(peptides, read_fasta(fasta_file))
coverage <- sequence_coverage(annot)
head(coverage[order(coverage$coverage, decreasing = TRUE), ])
               protein_id protein_length n_peptides n_covered  coverage
103  sp|P01834|IGKC_HUMAN            107          9        98 0.9158879
132  sp|P02768|ALBU_HUMAN            609         69       508 0.8341544
136  sp|P02787|TRFE_HUMAN            698         51       483 0.6919771
183 sp|P0DOY2|IGLC2_HUMAN            106          6        71 0.6698113
184 sp|P0DOY3|IGLC3_HUMAN            106          6        71 0.6698113
67    sp|P00738|HPT_HUMAN            406         28       249 0.6133005