You can add functional annotations (like signal peptides, domains, or chains) to a ggprotein object using geom_feature(). This helps explain gaps or specific patterns in the peptide coverage.
To annotate, provide a dataframe (feature.df) containing:
ProteinID: The ID matching your protein.start: The start position of the feature.end: The end position of the feature.Type: A label for the feature type.
You can also specify feature.color to assign specific colors to the features.
Example usage:
# Define protein features (e.g., from UniProt)
protein_feature_df <- data.frame(
ProteinID = "sp|P02769|ALBU_BOVIN",
start = c(1, 19, 25),
end = c(18, 24, 607),
Type = c("Signal", "Propeptide", "Chain")
)
# Add annotation to the existing coverage plot
protein_coverage +
geom_feature(
feature.df = protein_feature_df,
feature.color = c("#4d81be", "#173b5e", "#6a521d")
)
# protein feature obtained from UniProt
protein_feature_df <- data.frame(
ProteinID = "sp|P02769|ALBU_BOVIN",
start = c(1, 19, 25),
end = c(18, 24, 607),
Type = c("Signal", "Propeptide", "Chain")
)
# add annotation
protein_coverage +
geom_feature(
feature.df = protein_feature_df,
feature.color = c("#4d81be", "#173b5e", "#6a521d")
)