Giter Site home page Giter Site logo

pmartrdata's Introduction

pmartR

DOI R-CMD-check CRAN status

This R package provides functionality for quality control processing, statistical analysis and visualization of mass spectrometry (MS) omics data, in particular proteomic (either at the peptide or the protein level; isobaric labeled or unlabled), lipidomic, and metabolomic data. This includes data transformation, specification of groups that are to be compared against each other, filtering of feature and/or samples, data normalization, data summarization (correlation, PCA), and statistical comparisons of groups of interest (ANOVA and/or independence of missing data tests). Example data to be used with this packages can be found in pmartRdata.

Installation:

This package makes use of several packages hosted on BioConductor. If you are encountering warnings about unavailable BioConductor packages such as pcaMethods, you may need to add them to options("repos"):

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

options("repos" = BiocManager::repositories())

(Recommended) Install from CRAN:

install.packages("pmartR")

# or 

BiocManager::install("pmartR")

If you are on Mac/Windows and have a recent R version, you can skip compilation by installing from binaries, see the pmartR CRAN page for available binaries.

install.packages("pmartR", type = "binary")

# or 

BiocManager::install("pmartR", type = "binary")

To install the latest release:

devtools::install_github("pmartR/pmartR@*release")

To install a specific release, say v2.4.0:

devtools::install_github("pmartR/[email protected]")

(Not recommended, since these changes are likely still being tested) You can also install the latest changes to master:

devtools::install_github("pmartR/pmartR")

Problems with rcppArmadillo and gfortran on mac

There is a problem that causes pmartR to fail compiling cpp code, which has something to do with rcppArmadillo and certain installations of gfortran. See these posts that try to explain the issue: 1 2 3. The simplest solution if you are on Mac/Windows and have a recent R version is to install from pre-built binaries (see installation section). If you cannot install from binaries, two solutions we have found are:

  1. Install gfortran from a recommended source (not homebrew):
  2. When using the homebrew gfortran installation, add the line FLIBS = -L`gfortran -print-file-name=libgfortran.dylib | xargs dirname` to ~/.R/Makevars (a plain text file with no extention)

gfortran and Apple silicon (M1/M2 chips)

There are similarly issues with compilation in newer Mac chips. We recommend to install gcc-13 from homebrew brew install gcc or the universal version from https://mac.r-project.org/tools/.

Additionally, some users experience errors with ld: Assertion failed ... as seen here. One solution is to use the old linker by making sure gcc uses the flag -ld64 (Xcode docs). To do this, you can edit ~/.R/Makevars to include this flag, for example by appending it to LDFLAGS with +=:

# in ~/.R/Makevars
LDFLAGS+=-ld64

or specifying it in your compiler command:

# in ~/.R/Makevars
CC=/usr/local/bin/gcc -ld64

Tutorial:

To get started, see the package documentation and function reference located here.

Data:

Example peptide (both unlabeled and isobaric labeled), protein, metabolite and lipid data are available in the pmartRdata package available on Github, here

Contributing

See the contributing docs.

Citation:

To cite this package, please the following:

Degnan, D. J.; Stratton, K. G.; Richardson, R.; Claborne, D.; Martin, E. A.; Johnson, N. A.; Leach, D.; Webb-Robertson, B.-J. M.; Bramer, L. M. PmartR 2.0: A Quality Control, Visualization, and Statistics Pipeline for Multiple Omics Datatypes. J. Proteome Res. 2023, 22 (2), 570โ€“576. https://doi.org/10.1021/acs.jproteome.2c00610.

BibTex:

@article{degnan2023pmartr,
  title={pmartR 2.0: A Quality Control, Visualization, and Statistics Pipeline for Multiple Omics Datatypes},
  author={Degnan, David J and Stratton, Kelly G and Richardson, Rachel and Claborne, Daniel and Martin, Evan A and Johnson, Nathan A and Leach, Damon and Webb-Robertson, Bobbie-Jo M and Bramer, Lisa M},
  doi = {10.1021/acs.jproteome.2c00610},
  journal={Journal of Proteome Research},
  year={2023},
  publisher={ACS Publications}
}

Disclaimer:

This material was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor Battelle, nor any of their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights.

Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.

  PACIFIC NORTHWEST NATIONAL LABORATORY
  operated by BATTELLE for the
  UNITED STATES DEPARTMENT OF ENERGY
  under Contract DE-AC05-76RL01830

pmartrdata's People

Contributors

clabornd avatar evanamartin avatar godi678 avatar lmbramer avatar stratkg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pmartrdata's Issues

Update objects: Objects don't match attributes generated in pmartR as.omicsData calls

I've tried recreating the data objects in this package with pmartR functions, but there are a few differences in attributes that don't match up. Most of these are the inclusion of a techrep_cname in cnames, but there are a few other discrepancies with the pro_object and isobaric_object.

It might also be a good idea to have the check.names = FALSE attribute set for these objects for use in downstream functions.
Discrepancies are detailed in code below:



library(pmartR)
library(pmartRdata)

lipid_object2 <- as.lipidData(e_data = lipid_edata, f_data = lipid_fdata, edata_cname = "LipidCommonName", fdata_cname = "Sample_Name", check.names = FALSE)

metab_object2 <- as.metabData(e_data = metab_edata, f_data = metab_fdata, edata_cname = "Metabolite", fdata_cname = "SampleID", check.names = FALSE)

pro_object2 <- as.proData(e_data = pro_edata, f_data = pro_fdata, edata_cname = "Reference", fdata_cname = "SampleID", check.names = FALSE, data_scale = "log2") #  norm_data = TRUE, norm_method = 'median_center' for object

pep_object2 <- as.pepData(e_data = pep_edata, e_meta = pep_emeta, f_data = pep_fdata, edata_cname = "Mass_Tag_ID", fdata_cname = "SampleID", emeta_cname = "Protein", check.names = FALSE)

techrep_pep_object2 <- as.pepData(e_data = techrep_edata, f_data = techrep_fdata, edata_cname = "Mass_Tag_ID", fdata_cname = "RunID", techrep_cname = "TECH_REP", data_scale = "log2")

isobaric_object2 <- as.isobaricpepData(e_data = isobaric_edata, e_meta = isobaric_emeta, f_data = isobaric_fdata, edata_cname = "Peptide", fdata_cname = "Sample", emeta_cname = "Protein", exp_cname = "Set", refpool_cname = "Reference", refpool_notation = "Yes")

#### $techrep_cname == NULL is missing from object, present in object2
all.equal(attributes(lipid_object), attributes(lipid_object2))
attributes(lipid_object)$cnames
attributes(lipid_object2)$cnames

#### $techrep_cname == NULL is missing from object, present in object2
all.equal(attributes(metab_object), attributes(metab_object2))
attributes(metab_object)$cnames
attributes(metab_object2)$cnames

#### $techrep_cname == NULL is missing from object, present in object2
#### $norm_data = TRUE, $norm_method = 'median_center' for object, cannot be set via as.proData
#### Possibly just adjust ?pro_object to notate these differences?
all.equal(attributes(pro_object), attributes(pro_object2))
attributes(pro_object)$cnames
attributes(pro_object2)$cnames

##### Dataframe used to visualize differences
data.frame(unlist(attributes(pro_object)$data_info))
data.frame(unlist(attributes(pro_object2)$data_info))

#### $techrep_cname == NULL is missing from object, present in object2
all.equal(attributes(pep_object), attributes(pep_object2))
attributes(pep_object)$cnames
attributes(pep_object2)$cnames

#### No issues
all.equal(attributes(techrep_pep_object), attributes(techrep_pep_object2))

#### $techrep_cname == NULL is missing from object, present in object2
#### Multiple discrepencies in data_info: $data_norm == FALSE and $isobaric_norm == FALSE for object, norm_info.is_normalized == FALSE for object2. $num_emeta missing from object, despite emeta present. $num_emeta == 500 in object2.
#### $meta_info == FALSE in object despite emeta present, TRUE in object 2
#### $norm_info$is_normalized == FALSE missing from object, present in object2

all.equal(attributes(isobaric_object), attributes(isobaric_object2))
attributes(isobaric_object)$cnames
attributes(isobaric_object2)$cnames

data.frame(unlist(attributes(isobaric_object)$data_info))
data.frame(unlist(attributes(isobaric_object2)$data_info))

attributes(isobaric_object)$meta_info
attributes(isobaric_object2)$meta_info

data.frame(unlist(attributes(isobaric_object)$isobaric_info))
data.frame(unlist(attributes(isobaric_object2)$isobaric_info))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.