Skip to contents

make_unique generates unique identifiers for a proteomics dataset based on "name" and "id" columns.

Usage

make_unique(proteins, names, ids, delim = ";")

Arguments

proteins

Data.frame, Protein table for which unique names will be created.

names

Character(1), Name of the column containing feature names.

ids

Character(1), Name of the column containing feature IDs.

delim

Character(1), Sets the delimiter separating the feature names within one protein group.

Value

A data.frame with the additional variables "name" and "ID" containing unique names and identifiers, respectively.

Examples

# Load example
data(Silicosis_pg)
data <- Silicosis_pg

# Check colnames and pick the appropriate columns
colnames(data)
#>  [1] "Protein.IDs"                   "Majority.protein.IDs"         
#>  [3] "Peptide.counts..all."          "Peptide.counts..razor.unique."
#>  [5] "Peptide.counts..unique."       "Protein.names"                
#>  [7] "Gene.names"                    "Fasta.headers"                
#>  [9] "Number.of.proteins"            "Peptides"                     
#> [11] "Razor...unique.peptides"       "Unique.peptides"              
#> [13] "iBAQ.PBS_1"                    "iBAQ.PBS_2"                   
#> [15] "iBAQ.PBS_3"                    "iBAQ.PBS_4"                   
#> [17] "iBAQ.W10_2"                    "iBAQ.W10_4"                   
#> [19] "iBAQ.W2_1"                     "iBAQ.W2_3"                    
#> [21] "iBAQ.W2_4"                     "iBAQ.W2_5"                    
#> [23] "iBAQ.W4_2"                     "iBAQ.W4_3"                    
#> [25] "iBAQ.W4_4"                     "iBAQ.W4_5"                    
#> [27] "iBAQ.W6_2"                     "iBAQ.W6_3"                    
#> [29] "iBAQ.W6_4"                     "iBAQ.W6_6"                    
#> [31] "iBAQ.W9_2"                     "iBAQ.W9_4"                    
#> [33] "LFQ.intensity.PBS_1"           "LFQ.intensity.PBS_2"          
#> [35] "LFQ.intensity.PBS_3"           "LFQ.intensity.PBS_4"          
#> [37] "LFQ.intensity.W10_2"           "LFQ.intensity.W10_4"          
#> [39] "LFQ.intensity.W2_1"            "LFQ.intensity.W2_3"           
#> [41] "LFQ.intensity.W2_4"            "LFQ.intensity.W2_5"           
#> [43] "LFQ.intensity.W4_2"            "LFQ.intensity.W4_3"           
#> [45] "LFQ.intensity.W4_4"            "LFQ.intensity.W4_5"           
#> [47] "LFQ.intensity.W6_2"            "LFQ.intensity.W6_3"           
#> [49] "LFQ.intensity.W6_4"            "LFQ.intensity.W6_6"           
#> [51] "LFQ.intensity.W9_2"            "LFQ.intensity.W9_4"           
#> [53] "Only.identified.by.site"       "Reverse"                      
#> [55] "Potential.contaminant"        
data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")