Skip to content

Commit e5fcb16

Browse files
committed
minor changes and bug fixing
1 parent 15f52a7 commit e5fcb16

2 files changed

Lines changed: 42 additions & 28 deletions

File tree

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM mono:latest
55
LABEL base_image="mono:latest"
66
LABEL version="1"
77
LABEL software="ThermoRawFileParser"
8-
LABEL software.version="1.0.0"
8+
LABEL software.version="1.1.0"
99
LABEL about.summary="A software to convert Thermo RAW files to mgf and mzML"
1010
LABEL about.home="https://github.com/compomics/ThermoRawFileParser"
1111
LABEL about.documentation="https://github.com/compomics/ThermoRawFileParser"
@@ -15,7 +15,7 @@ LABEL about.tags="Proteomics"
1515

1616
################## MAINTAINER ######################
1717
MAINTAINER Niels Hulstaert <niels.hulstaert@ugent.be>
18-
MAINTAINER Yasset PErez-Riverol <ypriverol@gmail.com>
18+
MAINTAINER Yasset Perez-Riverol <ypriverol@gmail.com>
1919

2020
################## INSTALLATION ######################
2121

@@ -44,14 +44,16 @@ RUN git clone -b master --single-branch https://github.com/compomics/ThermoRawF
4444
RUN msbuild
4545
RUN ls -l -R
4646

47-
4847
COPY ThermoRawFileParser /home/biodocker/bin/bin/x64/Debug/
4948

50-
USER root
51-
RUN chmod +x /home/biodocker/bin/bin/x64/Debug/ThermoRawFileParser
52-
RUN chmod +x /home/biodocker/bin/bin/x64/Debug/ThermoRawFileParser.exe
49+
USER root
5350
RUN chown biodocker:biodocker /home/biodocker/bin/bin/x64/Debug/ThermoRawFileParser
51+
RUN rm -rfv /usr/share/man/
5452

5553
USER biodocker
54+
55+
RUN chmod +x /home/biodocker/bin/bin/x64/Debug/ThermoRawFileParser
56+
RUN chmod +x /home/biodocker/bin/bin/x64/Debug/ThermoRawFileParser.exe
5657
ENV PATH=/home/biodocker/bin/bin/x64/Debug/:$PATH
58+
RUN ls -la -R /home/biodocker/bin/bin/x64/Debug/
5759

Writer/MzMlSpectrumWriter.cs

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc
221221
_writer.WriteEndElement(); // software
222222
_writer.WriteEndElement(); // softwareList
223223

224-
PopulateInstrumentConfigurationList(firstScanNumber, instrumentModel);
224+
PopulateInstrumentConfigurationList(firstScanNumber, lastScanNumber, instrumentModel);
225225

226226
// dataProcessingList
227227
_writer.WriteStartElement("dataProcessingList");
@@ -451,7 +451,7 @@ private int GetOsOffset()
451451
/// </summary>
452452
/// <param name="firstScanNumber"></param>
453453
/// <param name="instrumentModel"></param>
454-
private void PopulateInstrumentConfigurationList(int firstScanNumber, CVParamType instrumentModel)
454+
private void PopulateInstrumentConfigurationList(int firstScanNumber, int lastScanNumber, CVParamType instrumentModel)
455455
{
456456
// go over the first scans until an MS2 scan is encountered
457457
// to collect all mass analyzer and ionization types
@@ -460,40 +460,52 @@ private void PopulateInstrumentConfigurationList(int firstScanNumber, CVParamTyp
460460
do
461461
{
462462
// Get the scan filter for this scan number
463-
var scanFilter = _rawFile.GetFilterForScanNumber(scanNumber);
464463

465-
// Add the ionization type if necessary
466464
try
467465
{
468-
if (!_ionizationTypes.ContainsKey(scanFilter.IonizationMode))
466+
var scanFilter = _rawFile.GetFilterForScanNumber(scanNumber);
467+
468+
// Add the ionization type if necessary
469+
try
470+
{
471+
if (!_ionizationTypes.ContainsKey(scanFilter.IonizationMode))
472+
{
473+
_ionizationTypes.Add(scanFilter.IonizationMode,
474+
OntologyMapping.IonizationTypes[scanFilter.IonizationMode]);
475+
}
476+
}
477+
catch (Exception e)
478+
{
479+
Log.Warn("The IonizationMode does not contains the following property --" + e.Message);
480+
if (!ParseInput.IgnoreInstrumentErrors)
481+
{
482+
throw e;
483+
}
484+
}
485+
486+
// Add the mass analyzer if necessary
487+
if (!_massAnalyzers.ContainsKey(scanFilter.MassAnalyzer) &&
488+
OntologyMapping.MassAnalyzerTypes.ContainsKey(scanFilter.MassAnalyzer))
469489
{
470-
_ionizationTypes.Add(scanFilter.IonizationMode,
471-
OntologyMapping.IonizationTypes[scanFilter.IonizationMode]);
490+
_massAnalyzers.Add(scanFilter.MassAnalyzer, "IC" + (_massAnalyzers.Count + 1));
472491
}
492+
493+
if (scanFilter.MSOrder == MSOrderType.Ms2)
494+
{
495+
encounteredMs2 = true;
496+
}
497+
473498
}
474499
catch (Exception e)
475500
{
476-
Log.Warn("The IonizationMode does not contains the following property --" + e.Message);
501+
Log.Warn("No Scan Filter found for the following scan --" + scanNumber);
477502
if (!ParseInput.IgnoreInstrumentErrors)
478503
{
479504
throw e;
480505
}
481506
}
482-
483-
// Add the mass analyzer if necessary
484-
if (!_massAnalyzers.ContainsKey(scanFilter.MassAnalyzer) &&
485-
OntologyMapping.MassAnalyzerTypes.ContainsKey(scanFilter.MassAnalyzer))
486-
{
487-
_massAnalyzers.Add(scanFilter.MassAnalyzer, "IC" + (_massAnalyzers.Count + 1));
488-
}
489-
490-
if (scanFilter.MSOrder == MSOrderType.Ms2)
491-
{
492-
encounteredMs2 = true;
493-
}
494-
495507
scanNumber++;
496-
} while (!encounteredMs2);
508+
} while (!encounteredMs2 && scanNumber <= lastScanNumber);
497509

498510
// Add a default analyzer if none were found
499511
if (_massAnalyzers.Count == 0)

0 commit comments

Comments
 (0)