View source: R/peptide_cluster_quantification.R
peptide_quantification | R Documentation |
Peptide Quantification
peptide_quantification(
whole_seq,
matching_result,
matching_columns,
distinct_columns,
quantify_method,
area_column = NULL,
with_PTM = FALSE,
reps = FALSE
)
whole_seq |
A dataframe holding whole sequence information. 'Region_Sequence' column is required for the sequence information. Change the column name if it is different than 'Region_Sequence'. |
matching_result |
The dataframe that contains the matched results and PTM information. |
matching_columns |
Vector of column names that should match between each row of 'whole_seq' and the 'matching_result' dataframe. |
distinct_columns |
Vector of column names that should be used to calculate PSM or Area separately for each unique combination of these columns. |
quantify_method |
A string indicating the quantification method. It can be either "PSM" or "Area". |
area_column |
The name of the column in 'matching_result' that contains the area/intensity information. Required if quantify_method is "Area". |
with_PTM |
A boolean parameter indicating whether PTM should be considered during calculation. Default is |
reps |
A boolean parameter indicating whether the area/intensity should be divided by the number of replicates. Default is |
Returns a dataframe containing the calculated PSM or Area for each record in 'whole_seq'.
whole_seq <- data.frame(
Region_Sequence = c(
"XYZAAA",
"XYZCCC",
"XYZBBB",
"XYZDDD",
"XYZAAB",
"XYZCCD",
"XYZBBB",
"XYZDDD",
"XYZAAA",
"XYZCCC",
"XYZBBB",
"XYZDDD",
"XYZAAB",
"XYZCCD",
"XYZBBB",
"XYZDDD"
),
Condition_1 = c(
"Drug1",
"Drug1",
"Drug2",
"Drug2",
"Drug1",
"Drug1",
"Drug2",
"Drug2",
"Drug1",
"Drug1",
"Drug2",
"Drug2",
"Drug1",
"Drug1",
"Drug2",
"Drug2"
),
Condition_2 = c(
"Donor1",
"Donor1",
"Donor1",
"Donor1",
"Donor1",
"Donor1",
"Donor1",
"Donor1",
"Donor2",
"Donor2",
"Donor2",
"Donor2",
"Donor2",
"Donor2",
"Donor2",
"Donor2"
),
Region_1 = c(
"VH",
"VL",
"VH",
"VL",
"VH",
"VL",
"VH",
"VL",
"VH",
"VL",
"VH",
"VL",
"VH",
"VL",
"VH",
"VL"
),
Region_2 = c(
"Arm_1",
"Arm_1",
"Arm_1",
"Arm_1",
"Arm_2",
"Arm_2",
"Arm_2",
"Arm_2",
"Arm_1",
"Arm_1",
"Arm_1",
"Arm_1",
"Arm_2",
"Arm_2",
"Arm_2",
"Arm_2"
)
)
matching_result <- data.frame(
Sequence = c("AAA", "DDD", "DDD"),
Condition_1 = c("Drug1", "Drug2", "Drug2"),
Condition_2 = c("Donor1", "Donor2", "Donor2"),
Region_1 = c("VH", "VL", "VL"),
Region_2 = c("Arm_1", "Arm_2", "Arm_2"),
Start_Position = c(4, 4, 4),
End_Position = c(6, 6, 6),
PTM_position = c(NA, 2, 0),
PTM_type = c(NA, "O", "C"),
Area = c(100, 200, 200),
reps = c(1, 2, 2)
)
matching_columns <- c("Condition_1", "Region_2")
area_column <- "Area"
data_with_quantification <- peptide_quantification(
whole_seq,
matching_result,
matching_columns,
distinct_columns = c("Condition_2", "Region_1"),
quantify_method = "Area",
area_column = area_column,
with_PTM = TRUE,
reps = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.