msmsTests, inconsistent sign between lFC.Av and LogFC
0
0
Entering edit mode
Ben • 0
@7349fa54
Last seen 6 hours ago
The Netherlands

When using msmsTests on some mass spec proteomics data, and looking at the edgeR results tables, the lFC.Av and LogFC columns always have opposite signs. According to the documentation, lFC.Av is calculated from the plain (normalised) values, and LogFC is as calculated by the GLM; so while I expect them to differ they should not by this much. Further, a quick inspection of of the values indicates that the LogFC value is also inconsistent with the normalised values.

Does anyone know what might be causing this?

Invoking the functions:

model.edgeR <- msms.edgeR(tmp.dat, "y ~ Treatment + Replicate", "y ~ Replicate")
results.edgeR <- test.results(model.edgeR, tmp.dat, phenoData(tmp.dat)$Treatment, gp1="Inhibitor", gp2="Vehicle", div=colSums(exprs(tmp.dat)), alpha=0.05)

The relevant phenoData from the underlying object:

tmp.dat$Treatment
[1] ...etc...
Levels: Vehicle Inhibitor
msmsTests Proteomics • 47 views
ADD COMMENT
0
Entering edit mode

Continued here due to posting difficulties:

Extract from the results table:

   Inhibitor Vehicle lFC.Av  LogFC ...
F1       0.0    27.1   -Inf  7.768 ...
F2      24.0     0.0    Inf -7.591 ...
...

Swapping Inhibitor and Vehicle in the test.results() call seems to make everything properly consistent, but that contradicts what is says in the documentation for the function:

gp1 The treatment level name.

gp2 The control level name. Should be the factor's reference level. See R function relevel.

sessionInfo( ):

R version 4.4.3 (2025-02-28)
Platform: x86_64-conda-linux-gnu
Running under: Rocky Linux 8.10 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /gpfs3/well/bsg/bjw/conda-envs/mass_spec/lib/libopenblasp-r0.3.30.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/London
tzcode source: system (glibc)

attached base packages:
[1] grid      stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] vsn_3.74.0            ComplexHeatmap_2.22.0 ggplot2_4.0.1        
 [4] msmsTests_1.44.0      msmsEDA_1.44.0        MSnbase_2.32.0       
 [7] ProtGenerics_1.38.0   S4Vectors_0.44.0      mzR_2.40.0           
[10] Rcpp_1.1.0            Biobase_2.66.0        BiocGenerics_0.52.0  

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3          jsonlite_2.0.0             
  [3] shape_1.4.6.1               MultiAssayExperiment_1.32.0
  [5] magrittr_2.0.4              magick_2.9.0               
  [7] farver_2.1.2                MALDIquant_1.22.3          
  [9] GlobalOptions_0.1.3         zlibbioc_1.52.0            
 [11] vctrs_0.6.5                 htmltools_0.5.9            
 [13] S4Arrays_1.6.0              SparseArray_1.6.0          
 [15] mzID_1.44.0                 KernSmooth_2.23-26         
 [17] htmlwidgets_1.6.4           plyr_1.8.9                 
 [19] sandwich_3.1-1              impute_1.80.0              
 [21] zoo_1.8-15                  igraph_2.1.4               
 [23] mime_0.13                   lifecycle_1.0.5            
 [25] iterators_1.0.14            pkgconfig_2.0.3            
 [27] Matrix_1.7-4                R6_2.6.1                   
 [29] fastmap_1.2.0               GenomeInfoDbData_1.2.13    
 [31] MatrixGenerics_1.18.0       shiny_1.12.1               
 [33] clue_0.3-66                 digest_0.6.39              
 [35] pcaMethods_1.98.0           colorspace_2.1-2           
 [37] GenomicRanges_1.58.0        labeling_0.4.3             
 [39] httr_1.4.7                  abind_1.4-8                
 [41] compiler_4.4.3              withr_3.0.2                
 [43] doParallel_1.0.17           S7_0.2.1                   
 [45] BiocParallel_1.40.0         hexbin_1.28.5              
 [47] gplots_3.3.0                MASS_7.3-65                
 [49] DelayedArray_0.32.0         rjson_0.2.23               
 [51] gtools_3.9.5                caTools_1.18.3             
 [53] tools_4.4.3                 PSMatch_1.10.0             
 [55] otel_0.2.0                  httpuv_1.6.16              
 [57] glue_1.8.0                  QFeatures_1.16.0           
 [59] promises_1.5.0              cluster_2.1.8.1            
 [61] reshape2_1.4.5              generics_0.1.4             
 [63] gtable_0.3.6                tzdb_0.5.0                 
 [65] preprocessCore_1.68.0       tidyr_1.3.2                
 [67] hms_1.1.4                   XVector_0.46.0             
 [69] foreach_1.5.2               pillar_1.11.1              
 [71] stringr_1.6.0               limma_3.62.1               
 [73] later_1.4.5                 splines_4.4.3              
 [75] circlize_0.4.17             gmm_1.9-1                  
 [77] dplyr_1.1.4                 lattice_0.22-7             
 [79] tidyselect_1.2.1            locfit_1.5-9.12            
 [81] IRanges_2.40.0              edgeR_4.4.0                
 [83] imputeLCMD_2.1              SummarizedExperiment_1.36.0
 [85] shinydashboard_0.7.3        statmod_1.5.1              
 [87] matrixStats_1.5.0           DT_0.34.0                  
 [89] DEP_1.28.0                  stringi_1.8.7              
 [91] UCSC.utils_1.2.0            lazyeval_0.2.2             
 [93] codetools_0.2-20            qvalue_2.38.0              
 [95] MsCoreUtils_1.18.0          tibble_3.3.0               
 [97] BiocManager_1.30.27         cli_3.6.5                  
 [99] affyio_1.76.0               xtable_1.8-4               
[101] GenomeInfoDb_1.42.0         norm_1.0-11.1              
[103] png_0.1-8                   XML_3.99-0.17              
[105] parallel_4.4.3              readr_2.1.6                
[107] assertthat_0.2.1            AnnotationFilter_1.30.0    
[109] bitops_1.0-9                mvtnorm_1.3-3              
[111] scales_1.4.0                tmvtnorm_1.7               
[113] affy_1.84.0                 ncdf4_1.24                 
[115] purrr_1.2.0                 crayon_1.5.3               
[117] GetoptLong_1.1.0            rlang_1.1.6
ADD REPLY

Login before adding your answer.

Traffic: 1529 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6