Skip to main content

Peptide coverage of each residue

Description

Counts, for every residue of the proteins in annotation, how many distinct peptide sequences cover it. Repeated rows of the same peptide, such as several charge states from annotate_peptides(), count once. A peptide that occurs twice in a protein covers both places, and where its occurrences overlap it counts once.

Usage

residue_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 residue of each protein in annotation, ordered by protein_id and position: protein_id, position, residue and n_peptides, the number of peptides covering it; 0 rows if annotation has none.

See Also

Other sequence coverage: plot_coverage(), sequence_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))
residues <- residue_coverage(annot)
head(residues)
                 protein_id position residue n_peptides
1 sp|A0A075B6I9|LV746_HUMAN        1       M          0
2 sp|A0A075B6I9|LV746_HUMAN        2       A          0
3 sp|A0A075B6I9|LV746_HUMAN        3       W          0
4 sp|A0A075B6I9|LV746_HUMAN        4       T          0
5 sp|A0A075B6I9|LV746_HUMAN        5       P          0
6 sp|A0A075B6I9|LV746_HUMAN        6       L          0