Code Monkey home page Code Monkey logo

Comments (7)

sneumann avatar sneumann commented on June 8, 2024

Thanks for the notification, perfect timing!. If you could hack this
into a unitTest checking your expected behaviour
(and failling if it doesn't) would be awesome,
then we could check this does not bite is in the future.
Yours, Steffen

from xcms.

asmirn1 avatar asmirn1 commented on June 8, 2024

Steffen,

Unfortunately, I could't create a small XcmsSet object to test the method
getXcmsRaw (maybe you could help me, any aligned XcmsSet object with two
samples would do).

I could provide you with the data I'm running it on, but I'm not sure if it
will be appropriate for RUnit test since it's a bit time consuming.

Aleksandr

On Mon, Aug 1, 2016 at 1:09 PM sneumann [email protected] wrote:

Thanks for the notification, perfect timing!. If you could hack this
into a unitTest checking your expected behaviour
(and failling if it doesn't) would be awesome,
then we could check this does not bite is in the future.
Yours, Steffen


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#44 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AM_-kKPb0ETkMXZ_RkizSElbgemj7N82ks5qbihigaJpZM4JZsRK
.

from xcms.

jorainer avatar jorainer commented on June 8, 2024

I'll have a closer look at this. At first glance it looks that @asmirn1 is right. I'll add some more RUnit tests for getXcmsRaw and then we'll see.

from xcms.

jorainer avatar jorainer commented on June 8, 2024

OK, there is indeed a bug:

> library(xcms)
> library(faahKO)
> library(RUnit)
> data(faahko)
> attr(faahko, "filepaths") <- sapply(as.list(basename(attr(faahko, "filepaths"))),
+                                     function(x) system.file("cdf", if (length(grep("ko",x)) > 0) "KO" else  "WT" ,x, package = "faahKO"))
> xsetRaw <- updateObject(faahko)
## Subset to two files.
> xsetRaw <- xsetRaw[, 1:2]

> ## First sample is reference, i.e. no rt adjustment performed
> xs <- retcor(group(xsetRaw), method = "obiwarp", center = 1)
262 325 387 450 512 575 
center sample:  ko15 
Processing: ko16

> ## Second is corrected, first is center:
> checkIdentical(xs@rt$raw[[1]], xs@rt$corrected[[1]])
[1] TRUE
> checkTrue(!all(xs@rt$raw[[2]] == xs@rt$corrected[[2]]))
[1] TRUE 
> ## We get the raw data for the second file; this one was corrected and
> ## thus it's retention time is expected to be different from raw.
> xr2 <- getXcmsRaw(xs, sampleidx = 2, rt = "corrected")
No need to perform retention time correction, raw and corrected rt are identical for /Users/jo/R/R-3.3.1-Bioc3.4-devel/lib/R/library/faahKO/cdf/KO/ko16.CDF
> checkIdentical(xr2@scantime, xs@rt$corrected[[2]])
Error in checkIdentical(xr2@scantime, xs@rt$corrected[[2]]) : FALSE

> all(xr2@scantime == xs@rt$raw[[2]])  ## That should be FALSE!
[1] TRUE

I've wrapped that into a unit test and will fix the bug in the devel branch.

from xcms.

jorainer avatar jorainer commented on June 8, 2024

Dear @asmirn1 , @sneumann I fixed this bug in commit e429a1b.

Aleksandr was completely right. I've now included a RUnit test specifically for this problem and have also updated the NEWS; I didn't bump the version though, as I prefer that Steffen does that if he's OK with the changes.

from xcms.

sneumann avatar sneumann commented on June 8, 2024

This should appear now in xcms-1.49.5 (Due to the way the merging worked, 1.49.4 only lived
a couple of minutes).

from xcms.

jorainer avatar jorainer commented on June 8, 2024

I think it's OK if we close this issue now.

from xcms.

Related Issues (20)

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.