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

Header output from header() does not match required columns in copyWriteMSData() when using .CDF files #238

Open
krispir opened this issue Jan 31, 2021 · 2 comments

Comments

@krispir
Copy link

krispir commented Jan 31, 2021

Hi,

The output from header() does not contain all the columns required by copyWriteMSData() in the .validateHeader() function. Looking at the code for header() it doesn't make sense why these columns are not included in the output since most of the other columns are initialized as "empty_val" anyway.

Affected code in .validateHeader():

if (!(all(names(req_cols) %in% colnames(x))))

Affected code in header():
setMethod("header",

I don't know how to create a reproducible example from this without uploading my .CDF-file but the output from header() has columns seqNum, acquisitionNum, msLevel, peaksCount, totIonCurrent, retentionTime, basePeakMZ, basePeakIntensity, collisionEnergy, ionisationEnergy, highMZ, precursorScanNum, precursorMZ, precursorCharge, precursorIntensity, mergedScan, mergedResultScanNum, mergedResultStartScanNum, mergedResultEndScanNum, injectionTime, spectrumId, centroided, ionMobilityDriftTime, isolationWindowTargetMZ, isolationWindowLowerOffset, isolationWindowUpperOffset, scanWindowLowerLimit, and scanWindowUpperLimit. After some digging I found that the missing columns are polarity, lowMZ, and filterString, and these are, in fact, omitted in header() for CDF-files (see links above).

Best regards,
Kristian Pirttilä

@jorainer
Copy link
Collaborator

jorainer commented Feb 2, 2021

Thanks for reporting @krispir ! I will have a look into it!

jorainer added a commit to jorainer/mzR that referenced this issue Feb 2, 2021
- Fix for issue sneumann#238: ensure `header` returns the same columns for all backends.
@jorainer
Copy link
Collaborator

jorainer commented Feb 3, 2021

This should be fixed in PR #239

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

No branches or pull requests

2 participants