Skip to contents

get_df_long generate a wide data.frame from a SummarizedExperiment.

Usage

get_df_long(se)

Arguments

se

SummarizedExperiment, Proteomics data (output from make_se() or make_se_parse()).

Value

A data.frame object containing all data in a wide format, where each row represents a single measurement.

Examples

# Load example
data(Silicosis_pg)
data_unique <- make_unique(Silicosis_pg, "Gene.names", "Protein.IDs", delim = ";")

# Make SummarizedExperiment
ecols <- grep("LFQ.", colnames(data_unique))
se <- make_se_parse(data_unique, ecols, mode = "delim", sep = "_")
# Filter and normalize
filt <- filter_se(se, thr = 0, fraction = 0.4, filter_formula = ~ Reverse != "+" & Potential.contaminant!="+")
#> filter base on missing number is <= 0 in at least one condition.
#> filter base on missing number fraction < 0.4 in each row
#> filter base on giving formula 
norm <- normalize_vsn(filt)
#> vsn2: 8762 x 20 matrix (1 stratum). 
#> Please use 'meanSdPlot' to verify the fit.
imputed <- impute(norm, fun = "MinDet")
#> Imputing along margin 2 (samples/columns).
diff <- test_diff(imputed,type = "control", control = "PBS")
#> Tested contrasts: W10_vs_PBS, W2_vs_PBS, W4_vs_PBS, W6_vs_PBS, W9_vs_PBS
#> Strimmer's qvalue(t)
dep <- add_rejections(diff)

long <- get_df_long(dep)
colnames(long)
#>  [1] "label"                         "condition"                    
#>  [3] "replicate"                     "name"                         
#>  [5] "intensity"                     "Protein.IDs"                  
#>  [7] "Majority.protein.IDs"          "Peptide.counts..all."         
#>  [9] "Peptide.counts..razor.unique." "Peptide.counts..unique."      
#> [11] "Protein.names"                 "Gene.names"                   
#> [13] "Fasta.headers"                 "Number.of.proteins"           
#> [15] "Peptides"                      "Razor...unique.peptides"      
#> [17] "Unique.peptides"               "iBAQ.PBS_1"                   
#> [19] "iBAQ.PBS_2"                    "iBAQ.PBS_3"                   
#> [21] "iBAQ.PBS_4"                    "iBAQ.W10_2"                   
#> [23] "iBAQ.W10_4"                    "iBAQ.W2_1"                    
#> [25] "iBAQ.W2_3"                     "iBAQ.W2_4"                    
#> [27] "iBAQ.W2_5"                     "iBAQ.W4_2"                    
#> [29] "iBAQ.W4_3"                     "iBAQ.W4_4"                    
#> [31] "iBAQ.W4_5"                     "iBAQ.W6_2"                    
#> [33] "iBAQ.W6_3"                     "iBAQ.W6_4"                    
#> [35] "iBAQ.W6_6"                     "iBAQ.W9_2"                    
#> [37] "iBAQ.W9_4"                     "Only.identified.by.site"      
#> [39] "Reverse"                       "Potential.contaminant"        
#> [41] "ID"                            "imputed"                      
#> [43] "num_NAs"                       "W10_vs_PBS_CI.L"              
#> [45] "W10_vs_PBS_CI.R"               "W10_vs_PBS_diff"              
#> [47] "W10_vs_PBS_p.adj"              "W10_vs_PBS_p.val"             
#> [49] "W10_vs_PBS_t.stastic"          "W2_vs_PBS_CI.L"               
#> [51] "W2_vs_PBS_CI.R"                "W2_vs_PBS_diff"               
#> [53] "W2_vs_PBS_p.adj"               "W2_vs_PBS_p.val"              
#> [55] "W2_vs_PBS_t.stastic"           "W4_vs_PBS_CI.L"               
#> [57] "W4_vs_PBS_CI.R"                "W4_vs_PBS_diff"               
#> [59] "W4_vs_PBS_p.adj"               "W4_vs_PBS_p.val"              
#> [61] "W4_vs_PBS_t.stastic"           "W6_vs_PBS_CI.L"               
#> [63] "W6_vs_PBS_CI.R"                "W6_vs_PBS_diff"               
#> [65] "W6_vs_PBS_p.adj"               "W6_vs_PBS_p.val"              
#> [67] "W6_vs_PBS_t.stastic"           "W9_vs_PBS_CI.L"               
#> [69] "W9_vs_PBS_CI.R"                "W9_vs_PBS_diff"               
#> [71] "W9_vs_PBS_p.adj"               "W9_vs_PBS_p.val"              
#> [73] "W9_vs_PBS_t.stastic"           "W10_vs_PBS_significant"       
#> [75] "W2_vs_PBS_significant"         "W4_vs_PBS_significant"        
#> [77] "W6_vs_PBS_significant"         "W9_vs_PBS_significant"        
#> [79] "significant"