Giter Site home page Giter Site logo

ftmsranalysis's People

Contributors

allison-thompson avatar amwhite avatar clabornd avatar lmbramer avatar sarsees avatar stratkg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ftmsranalysis's Issues

uniqueness_gtest results don't make sense

I'm trying to run the uniqueness_gtest function in order to plot a van Krevelen diagram showing compounds unique to each group. I have 3 replicates in each group. Even expanding the significance threshold to 0.15, I'm not getting anything as significant, across nearly 20 comparisons. I've gone through and looked and there are some instances where I have 3 replicates seen in one group and only 1 in the other - seems like this should pop out? Looking at NOSC comparisons, there are obvious differences, so it's weird that nothing is showing up in the van Krevelen.

edata_cname is non unique

peak_data = as.peakData(e_data = edata, f_data = fdata, e_meta = emeta, edata_cname = "Mass", fdata_cname = "SampleID",

  •                      mass_cname = "Mass", c_cname = "C", h_cname = "H", o_cname = "O", n_cname = "N", s_cname = "S", p_cname = "P", isotopic_cname = "C13", isotopic_notation = "1")
    

Error in .as.peakData(e_data, f_data, e_meta, edata_cname, fdata_cname, :
The 'edata_cname' identifier is non-unique.

install failed

package ‘glue’ successfully unpacked and MD5 sums checked

Error: Failed to install 'ftmsRanalysis' from GitHub:
(converted from warning) cannot remove prior installation of package ‘glue’

Any suggestions? Thanks!

as.peakData() allows tibble inputs which breaks downstream functions (like compound_calcs() )

Hello! I have used your excellent package for exploring my FT-ICR-MS data sets without incident until I inadvertently tried assembling a new peakData object with tibbles instead of strictly using data frames. These were products of some preliminary filtering with dplyr functions and readr::read_table. Then as.peakData seemed happy to accept them as inputs and construct a peakData object. I ran compound_calcs and got an error reading "Error in [<-.data.frame(*tmp*, ai_ids, value = 0) : new columns would leave holes after existing columns". Modifying all the as.peakData inputs with as.data.frame() and rebuilding the peakData object worked fine, but it took a little while to figure out why it suddenly seemed like compound_calcs wasn't working. Thought you might be interested in case anyone else runs into this! Here's a quick console screenshot in case that helps illustrate.
ftmsRanalysis_issue_console_screenshot

error running the vignette ftmsRanalysis.Rmd

In running the vignette ftmsRanalysis.Rmd
I got the following error at line 301

byGroup <- divideByGroupComparisons(peakObj, 
                                comparisons = "all")[[1]]$value

Loading required package: datadr
there is no package called ‘datadr’Error in kvPair(key, val) : could not find function "kvPair"

However, when I search for datadr
https://cran.r-project.org/web/packages/datadr/index.html
Package ‘datadr’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2020-01-02 as nothing now depends on it.
The most recent check results can be obtained from the check results archive.
However even in the archive the package is not available.
If I try to just knit the whole file I get hung at the same point with the attached error
![ftmsRanalysis](https://user-images.githubusercontent.com/4509174/97483485-da341080-192d-11eb-8de6-58e729238025.png)

functions that act on mass filter fail when mass_cname and edata_cname are not both "Mass"

applyFilt tries to subset the mass filter based on edata_cname, which will not always be the same as mass_cname:

edata_ids = filter_object[inds, edata_cname]

Making applyFilt use mass_cname doesn't work either because summary.massFilt and plot.massFilt both have hard-coded references to the "Mass" column:

edata_ids = filter_object[inds, edata_cname]

if(!is.null(min_mass) & is.null(max_mass)){max_mass = max(object$Mass)}

See #17

Add all possible elements to columns

In the constructor for peakData objects, we currently have one argument to specify the column name for each of C, H, N, O, S, P.

https://github.com/EMSL-Computing/ftmsRanalysis/blob/master/R/as.ftmsData.R

We want to be able to do this for many atoms, such as listed in atoms_order in coreMS. Probably what this will look like is passing it a named vector or list like: list( = , = , = ), which defaults to something like: list("C" = "C", "H" = "H", "N" = "N", "O" = "O", "S" = "S", "P" = "P") , but the user could specify, for instance list("C" = "C", "H" = "H", "Bi" = "Bi_column")

This is going to necessitate a lot of changes:

  • Change the attributes in the object. i.e. instead of attr(obj, "cnames")$c_cname, attr(obj, "cnames")$h_cname, etc. we might have attr(obj, "cnames")$element_cnames, which would be our named list. All references to these would have to be hunted down and changed.
  • Change calc_element_ratios to calculate any element ratios. Perhaps we can default to the original ratios using C,H,N,O,S,P and give an extra option to calculate more. Plots that use ratios might have to be changed.

Trouble installing

Hi, install via devtools::install_github("EMSL-Computing/ftmsRanalysis") reported cannot open URL 'https://api.github.com/repos/EMSL-Computing/ftmsRanalysis/tarball/HEAD'.
Installing the file "EMSL-Computing-ftmsRanalysis-6df6a14.tar.gz" from a local folder also failed with a "package installation had non zero exit status"

The package Description file indicates R version > 3.4.0 will work. I'm using 4.2. Any suggestions? Thank you,

sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages:
[1] stats graphics grDevices datasets utils methods
[7] base

other attached packages:
[1] devtools_2.4.3 usethis_2.1.6

loaded via a namespace (and not attached):
[1] magrittr_2.0.3 pkgload_1.2.4 R6_2.5.1
[4] rlang_1.0.2 fastmap_1.1.0 tools_4.2.0
[7] pkgbuild_1.3.1 sessioninfo_1.2.2 cli_3.3.0
[10] withr_2.5.0 ellipsis_0.3.2 remotes_2.4.2
[13] rprojroot_2.0.3 lifecycle_1.0.1 crayon_1.5.1
[16] brio_1.1.3 processx_3.6.1 purrr_0.3.4
[19] callr_3.7.0 fs_1.5.2 ps_1.7.1
[22] curl_4.3.2 testthat_3.1.4 memoise_2.0.1
[25] glue_1.6.2 cachem_1.0.6 compiler_4.2.0
[28] desc_1.4.1 prettyunits_1.1.1 renv_0.15.5

Error in as.peakData with NA's and check_rows = T

The below fails

library(ftmsRanalysis)
data("ftms12T_edata")
data("ftms12T_fdata")
data("ftms12T_emeta")

edata <- ftms12T_edata
edata[edata == 0] <- NA
peakObj <- as.peakData(edata, ftms12T_fdata, ftms12T_emeta, 
                       edata_cname="Mass", fdata_cname="SampleID", 
                       mass_cname="Mass", c_cname="C", h_cname="H", 
                       o_cname="O", n_cname="N", s_cname="S", 
                       p_cname="P", isotopic_cname = "C13", 
                       isotopic_notation = "1", check_rows = T)

Error in if (any(molfilt$Num_Observations == 0)) res <- applyFilt(molfilt,  : 
  missing value where TRUE/FALSE needed

The error appears to begin with the molecule_filter() call:

molfilt <- molecule_filter(res)

which then calls n_present(), which calls rowSums() on an object with NA's producing NA's in the output:

res <- as.integer(rowSums(x>0))

Then the any() call in the error message returns an NA since molfilt$Num_Observations contains NA's.

mapPeaksToCompounds function bug

The molecular formula format in the e_data and mc_compounds data from MetaCyc is not consistent, one is CHNOSP, and the other is CHONSP.
Inner_joining these two data by formula for mapping peak FT-MS data to compounds may be problematic.

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.