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.
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).
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(): https://github.com/sneumann/mzR/blob/09d5907dac19bb336a25a5cd61b39349bd009889/R/functions-utils.R#L62 Affected code in header(): https://github.com/sneumann/mzR/blob/09d5907dac19bb336a25a5cd61b39349bd009889/R/methods-mzRnetCDF.R#L54
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ä