create_df {promor} | R Documentation |
Create a data frame of protein intensities
Description
This function creates a data frame of protein intensities
Usage
create_df(
prot_groups,
exp_design,
input_type = "MaxQuant",
data_type = "LFQ",
filter_na = TRUE,
filter_prot = TRUE,
uniq_pep = 2,
tech_reps = FALSE,
zero_na = TRUE,
log_tr = TRUE,
base = 2
)
Arguments
prot_groups |
File path to a proteinGroups.txt file produced by MaxQuant or a standard input file containing a quantitative matrix where the proteins or protein groups are indicated by rows and the samples by columns. |
exp_design |
File path to a text file containing the experimental design. |
input_type |
Type of input file indicated by |
data_type |
Type of sample protein intensity data columns to use from
the proteinGroups.txt file. Some available options are "LFQ", "iBAQ",
"Intensity". Default is "LFQ." User-defined prefixes in the proteinGroups.txt
file are also allowed. The |
filter_na |
Logical. If |
filter_prot |
Logical. If |
uniq_pep |
Numerical. Proteins that are identified by this number or
fewer number of unique peptides are filtered out (default is 2).Only applies
when |
tech_reps |
Logical. Indicate as |
zero_na |
Logical. If |
log_tr |
Logical. If |
base |
Numerical. Logarithm base. Default is 2. |
Details
This function first reads in the proteinGroups.txt file produced by MaxQuant or a standard input file containing a quantitative matrix where the proteins or protein groups are indicated by rows and the samples by columns.
It then reads in the expDesign.txt file provided as
exp_design
and extracts relevant information from it to add to the data frame. an example of the expDesign.txt is provided here: https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt.First, empty rows and columns are removed from the data frame.
Next, if a proteinGroups.txt file is used, it filters out reverse proteins, proteins that were only identified by site, and potential contaminants.Then it removes proteins identified with less than the number of unique peptides indicated by
uniq_pep
from the data frame.Next, it extracts the intensity columns indicated by
data type
and the selected protein rows from the data frame.Converts missing values (zeros) to NAs.
Finally, the function log transforms the intensity values.
Value
A raw_df
object which is a data frame containing protein
intensities. Proteins or protein groups are indicated by rows and samples
by columns.
Author(s)
Chathurani Ranathunge
Examples
### Using a proteinGroups.txt file produced by MaxQuant as input.
## Generate a raw_df object with default settings. No technical replicates.
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg1.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt",
input_type = "MaxQuant"
)
## Data containing technical replicates
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg2.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed2.txt",
input_type = "MaxQuant",
tech_reps = TRUE
)
## Alter the number of unique peptides needed to retain a protein
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg1.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt",
input_type = "MaxQuant",
uniq_pep = 1
)
## Use "iBAQ" values instead of "LFQ" values
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg1.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt",
input_type = "MaxQuant",
data_type = "iBAQ"
)
### Using a universal standard input file instead of MaxQuant output.
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/st.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt",
input_type = "standard"
)