Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.writeImzMlDocument doesn't pass the 'processed' argument to .addIbdOffsets #21

Closed
SvenSondhauss opened this issue Sep 13, 2017 · 2 comments
Assignees
Labels

Comments

@SvenSondhauss
Copy link

In the .writeImzMlDocument function, .addIbdOffsets gets called without the processed argument, leading to .addIbdOffsets using always the default (=TRUE). Subsequently, a wrong imzml file is created,
which makes the exported data unusable.
Original function:

.writeImzMlDocument <- function(x, file,
                                id=.withoutFileExtension(basename(file)),
                                processed=TRUE, uuid=.uuid(),
                                coordinates=MALDIquant::coordinates(x),
                                pixelSize=c(metaData(x[[1L]])$imaging$pixelSize,
                                            100, 100)[1L:2L], ...) {

...

  .writeMzMlDocument(x=.addIbdOffsets(x), file=file, id=id,
                     imsArgs=list(uuid=uuid, sha1=sha1, processed=processed),
                     ...)
}

Suggested fix:

.writeImzMlDocument <- function(x, file,
                                id=.withoutFileExtension(basename(file)),
                                processed=TRUE, uuid=.uuid(),
                                coordinates=MALDIquant::coordinates(x),
                                pixelSize=c(metaData(x[[1L]])$imaging$pixelSize,
                                            100, 100)[1L:2L], ...) {

...

  .writeMzMlDocument(x=.addIbdOffsets(x, processed=processed), file=file, id=id,
                     imsArgs=list(uuid=uuid, sha1=sha1, processed=processed),
                     ...)
}
@sgibb sgibb added the bug label Sep 13, 2017
@sgibb sgibb self-assigned this Sep 13, 2017
@sgibb sgibb closed this as completed in 459e0ab Sep 13, 2017
@sgibb
Copy link
Owner

sgibb commented Sep 13, 2017

@SvenSondhauss thanks for reporting and fixing this. I applied your suggested fix. Unfortunately CRAN doesn't accept to frequent updates. So could you please install the most recent version of MALDIquantForeign from github via devtools::install_github("sgibb/MALDIquantForeign")?

@sgibb
Copy link
Owner

sgibb commented Dec 4, 2017

@SvenSondhauss just want to inform you that MALDIquantForeign 0.11.1 is on CRAN now. So no need to use install_github anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants