Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - meow

1
MassBank / Re: RMassBank
Hi LN.AW,

sorry for the delay. This functionality is not yet in RMassBank itself, however you can use RMassBank to extract spectra and the OrgMassSpecR functions for comparison (SpectrumSimilarity). We have in-house adapted functions for this but it's not yet all there.
2
XCMS Online / Re: Problem with peakpicking when multiple scan ranges are used during acquisition
What happens if you split the file into two mass ranges using MSconvert? Using the subset filter.
Also I seem to remember that the Qex sometimes does something strange with the data file: it will label one scan as "full scan" and the other as "SIM". You can check that when going through the scans in Xcalibur. If that's the problem, there is a way to get your data into mz(X)ML correctly, I would have to look it up though.
4
RMassBank / Re: parser for massbank record --> R (list)
The newest, cutting edge RMassBank version does this.

install_github("MassBank/RMassBank@s4power")
RMassBank:::parseMbRecord(filename)
parses a massbank record to  a RmbSpectrum2 object
RMassBank:::parseMbRecords(filenames)
parses multiple files into a list of RmbSpectraSet objects (i.e. it groups the spectra by compound)

(yes it's not even exported yet - I just wrote it a week ago. Also, in the older RMassBank versions, there is parseMassBank which also parses MassBank records, but not into the "native" RMassBank/MSnbase format. parseMassBank will be replaced by parseMbRecord(s) soon, i.e. parseMbRecord(s) will be renamed to parseMassBank and will be an S4 method.)





5
Site related / Location breadcrumb in the forum?
Hi,

would it be possible to add some kind of location breadcrumb link to the forums? I mean something that indicates what forum I am in and allowing me to jump back.
Say I am on
http://www.metabolomics-forum.com/index.php?topic=1029.0
There should be a link on the top of the site that goes
"Committees -> Publication committee" allowing me to directly go to those subforums. The links in "Jump to" at the bottom of the page are very hidden and inaccessible.

6
METLIN / Re: In Silico predicted MS spectra - A good idea?
I fully agree. I ran into the same problem recently.

If you click on the compound number the info is displayed on the spectrum, but not if you click on the View button. It took me an entire day before I realized that these spectra are CFM-ID spectra. Please put the "Insilico spectra" info at least on the "View" graphic if not on the result table.
8
XCMS / Re: error with "scanrange" variable of xcmsSet
Is your data centroided or in profile mode? I really don't know much about low-resolution MS data, but I could imagine that centWave runs into problems even for low-res if the data isn't centroided.
9
XCMS / Re: Correction of retention times 'by hand'
If you know the shift, couldn't you also just modify the peaks slot of your xcmsSet object?

Code: [Select]
xs <- xcmsSet(whatever)
# see first peak
print(xs@peaks[1,])
# subtract a constant shift (30 sec) from all rt values:
shift <- 30
xs@peaks[,c("rt", "rtmin", "rtmax")] <- xs@peaks[,c("rt", "rtmin", "rtmax")] - shift
# print the modified peak
print(xs@peaks[1,])

# then there's also the xs@rt which one could shift,
# but I don't know whether that's needed for the remaining workflow -
# I believe all further calculations start from xs@peaks.
xs@rt <- xs@rt - shift


What I don't know is, what will happen downstream if you want to extract chromatograms or whatnot.
11
XCMS / Re: extracting metadata from mzXML
I have worked quite extensively with XML itself in R, actually on mzML files and not on mzXML files, but the principle is the same.
It is a very versatile method to get a lot of additional data out.

A code snippet I used, this one reads out the instrument configuration sections from a mzML file (the mzXML files are simpler, in general. Just open it as a text file and you can easily orient yourself in the structure)

Code: [Select]
package(XML)

openXML.mzML <- function(filename)
{
mzml <- xmlTreeParse(filename, asText=F, useInternalNodes=T,
fullNamespaceInfo=T,useDotNames=T)
return(mzml)
}

getConfigs.mzML <- function(mzml)
{
instrumentConfigs <- getNodeSet(mzml,
"/m:indexedmzML/m:mzML/m:instrumentConfigurationList/m:instrumentConfiguration",
c(m="http://psi.hupo.org/ms/mzml"))

configs <- t(sapply(instrumentConfigs, function(ic){
id <- xmlAttrs(ic)[["id"]]
analyzer <- getNodeSet(ic, "m:componentList/m:analyzer/m:cvParam",
c(m="http://psi.hupo.org/ms/mzml"))
analyzerName <- xmlAttrs(analyzer[[1]])[["name"]]
analyzerMSO <- xmlAttrs(analyzer[[1]])[["accession"]]
return(c(id, analyzerName, analyzerMSO))
}))

rownames(configs) <- configs[,1]
colnames(configs) <- c("ID", "name", "ontology")
return(configs)
}
12
XCMS / Re: mz sorting violation
ProteoWizard 3.0.3700 on Q-Exactive raw data, in Peak Picking (Prefer Vendor) mode, conversion to 64 bit mzML. The problem appears to be a mass stick which occurs twice. I tried with and without "remove zero samples" (since the offending data point was a zero-intensity point).
13
XCMS / Re: Feed raw input data to XCMS? is now: deprofile.R
Sure, if you're interested in adding the function to XCMS, I think it would be a useful addition. If possible we should keep it extensible so that someone can add other algorithms (e.g. the cubic splines used by the OpenMS HiRes feature detector; but that will probably need Rcpp, I can't imagine an easy and fast way to do that one in R...)

But keep in mind that the function could use some more testing :)
14
XCMS / Re: xcms & mzR installation problem
Hi Steffen,

you have mail.

My Rcpp version is 0.9.11.
The mzR version which didn't work is:
http://www.bioconductor.org/packages/2. ... _1.3.7.zip


Code: [Select]
sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252 
[3] LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C                     
[5] LC_TIME=German_Switzerland.1252   

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

other attached packages:
[1] mzR_1.3.7    Rcpp_0.9.11  devtools_0.7

loaded via a namespace (and not attached):
 [1] Biobase_2.17.6    BiocGenerics_0.3.0 codetools_0.2-8    digest_0.5.2     
 [5] httr_0.1.1        memoise_0.1        plyr_1.7.1        RCurl_1.91-1.1   
 [9] stringr_0.6        tools_2.15.1     
d>
15
XCMS / Re: Feed raw input data to XCMS?
Quote from: "Ralf"
1.) (easy work-around) : pre-process your files, write them as mzXML, run centWave on the result.
2.) (good for the community) : implement your algorithm into XCMS, and we'll find a way to integrate it with centWave.
Ideally this would happen directly on the C-Level
Hi Ralf,

since I do not currently have the "otium" (is there an English word for that? German is "Musse" more or less) to accustom myself to Rcpp style, I did something in-between...
I coded the routine in R vector-operation style instead of using loops. It's not as fast as the original Java implementation or as Rcpp would be, but it's not terribly bad, and since the subsequent centWave takes much longer anyway, it's not a bottleneck for me.

I wrote the routine primarily for my own use, and it's not really tested or anything, but if anyone wants to use it, feel free to do with it whatever you want. Don't blame me if your computer explodes and buries all your valuable data never to be found again :)

deprofile.R: http://pastebin.com/rvPCEDg2

Usage:
Code: [Select]
# from xcmsRaw:
xraw <- xcmsRaw("myfile.mzML")
# by FWHM method:
xraw.sticked <- deprofile.xcmsRaw(xraw, copy=T, method="deprofile.fwhm")
# local maximum: faster, but less accurate especially for "low" resolution
xraw.sticked <- deprofile.xcmsRaw(xraw, copy=T, method="deprofile.localMax")
scan.xraw.profile <- getScan(xraw, 50)
scan.xraw <- getScan(xraw.sticked, 50)
# alternatively directly from scan:
scan.xraw.direct <- deprofile.scan(scan.xraw.profile)

# this can be peakpicked:
xpeaks <- findPeaks(xraw.sticked, method="centWave", ppm=5, snthresh=10, noise=3000, prefilter=c(3,5000))

# the same scan from mzR:
mzrFile <- openMSfile("myfile.mzML")
acqNo <- xraw@acquisitionNum[[50]]
scan.mzML.profile <- mzR::peaks(mzrFile, acqNo)
scan.mzML <- deprofile.scan(scan.mzML.profile)
close(mzrFile)


(Why is the extension ".R" (or ".txt", for that matter) not allowed for attachments in an R-centered forum?  :D )