Skip to content

Commit

Permalink
Merge pull request #42 from jasenfinch/devel
Browse files Browse the repository at this point in the history
v0.6.2
  • Loading branch information
jasenfinch committed Mar 29, 2023
2 parents f33536b + 2ca5b09 commit b07aacf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,6 +1,6 @@
Package: metaboMisc
Title: Miscellaneous Functions for Metabolomics Analyses
Version: 0.6.1
Version: 0.6.2
Authors@R: person("Jasen", "Finch", email = "jsf9@aber.ac.uk", role = c("aut", "cre"))
Description: Miscellaneous helper functions for metabolomics analyses that do not yet have a permanent home.
URL: https://jasenfinch.github.io/metaboMisc/
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
@@ -1,3 +1,9 @@
# metaboMisc 0.6.2

* Fixed miss injection and batch correction detection for GC-MS data sets processed using xcms.

* Fixed the feature summary for GC-MS data sets processed using xcms.

# metaboMisc 0.6.1

* Fix the missing `name` column in tables returned from `convertSampleInfo()`.
Expand Down
12 changes: 6 additions & 6 deletions R/detect.R
Expand Up @@ -59,7 +59,7 @@ setMethod('detectMissInjections',signature = 'MetaboProfile',
mi <- x %>%
processedData()

if (!is.list(mi)){
if (is.data.frame(mi)){
mi <- list(mi)
}

Expand All @@ -68,10 +68,10 @@ setMethod('detectMissInjections',signature = 'MetaboProfile',

if (mi %>%
names() %>%
is.na() %>%
{is.null(.) | is.na(.)} %>%
any()) {
names(mi) <- replace(names(mi),
is.na(names(mi)),
is.null(names(mi)) | is.na(names(mi)),
'NA')
}

Expand Down Expand Up @@ -166,7 +166,7 @@ setMethod('detectBatchDiff',signature = "MetaboProfile",
TICdat <- x %>%
processedData()

if (!is.list(TICdat)){
if (is.data.frame(TICdat)){
TICdat <- list(TICdat)
}

Expand All @@ -175,10 +175,10 @@ setMethod('detectBatchDiff',signature = "MetaboProfile",

if (TICdat %>%
names() %>%
is.na() %>%
{is.null(.) | is.na(.)} %>%
any()) {
names(TICdat) <- replace(names(TICdat),
is.na(names(TICdat)),
is.null(names(TICdat)) | is.na(names(TICdat)),
'NA')
}

Expand Down
2 changes: 1 addition & 1 deletion R/summary.R
Expand Up @@ -42,7 +42,7 @@ setMethod('featureSummary',signature = 'MetaboProfile',

featSummary <- function(x){

if (!is.list(x)){
if (is.data.frame(x)){
x <- list(x)
}

Expand Down

0 comments on commit b07aacf

Please sign in to comment.