Skip to content

Commit

Permalink
Merge 24.7 to 24.11
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-sweta committed Nov 25, 2024
2 parents b214e94 + e4c1920 commit 651e69a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
13 changes: 10 additions & 3 deletions src/org/labkey/targetedms/parser/ChromatogramGroupId.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.labkey.targetedms.parser;

import org.apache.commons.lang3.StringUtils;
import org.labkey.targetedms.parser.proto.ChromatogramGroupDataOuterClass;

import java.util.ArrayList;
Expand All @@ -30,12 +31,18 @@ public class ChromatogramGroupId
private ChromatogramGroupId()
{
}
public ChromatogramGroupId(Target target, SpectrumFilter spectrumFilter)
public ChromatogramGroupId(Target target, String qcTraceName, SpectrumFilter spectrumFilter)
{
_target = target;
_qcTraceName = StringUtils.isEmpty(qcTraceName) ? null : qcTraceName;
_spectrumFilter = spectrumFilter;
}

public ChromatogramGroupId(Target target, SpectrumFilter spectrumFilter)
{
this(target, null, spectrumFilter);
}

public Target getTarget()
{
return _target;
Expand Down Expand Up @@ -70,7 +77,7 @@ public static List<ChromatogramGroupId> fromProtos(ChromatogramGroupDataOuterCla
{
targets.add(new Target(target));
}
for (ChromatogramGroupDataOuterClass.ChromatogramGroupIdsProto.SpectrumFilter spectrumFilter : proto.getFiltersList())
for (ChromatogramGroupDataOuterClass.ChromatogramGroupIdsProto.SpectrumFilter spectrumFilter : proto.getFiltersList())
{
filterClauses.add(SpectrumFilter.FilterClause.fromProtocolMessage(spectrumFilter));
}
Expand All @@ -80,7 +87,7 @@ public static List<ChromatogramGroupId> fromProtos(ChromatogramGroupDataOuterCla
SpectrumFilter spectrumFilter = SpectrumFilter.fromFilterClauses(
chromatogramGroupId.getFilterIndexesList().stream()
.map(filterClauses::get).collect(Collectors.toList())).orElse(null);
list.add(new ChromatogramGroupId(targets.get(chromatogramGroupId.getTargetIndex()), spectrumFilter));
list.add(new ChromatogramGroupId(targets.get(chromatogramGroupId.getTargetIndex()), chromatogramGroupId.getQcTraceName(), spectrumFilter));
}
return list;
}
Expand Down
10 changes: 1 addition & 9 deletions src/org/labkey/targetedms/parser/SkylineDocumentParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -3126,7 +3126,6 @@ public List<SampleFileChromInfo> getSampleFileChromInfos(Map<String, SampleFile>
{
return Collections.emptyList();
}
int traceMetricIndex = 1;
for (ChromGroupHeaderInfo chromatogram : _binaryParser.getChromatograms())
{
// Sample-scoped chromatograms have a magic precursor MZ value
Expand Down Expand Up @@ -3158,14 +3157,7 @@ public List<SampleFileChromInfo> getSampleFileChromInfos(Map<String, SampleFile>
ChromatogramGroupId chromatogramGroupId = _binaryParser.getTextId(chromatogram);
if (chromatogramGroupId != null)
{
if (chromatogramGroupId.getQcTraceName() == null && chromatogram.getFlagValues().contains(ChromGroupHeaderInfo.FlagValues.extracted_qc_trace))
{
info.setTextId("QC Trace " + traceMetricIndex++);
}
else
{
info.setTextId(chromatogramGroupId.getQcTraceName());
}
info.setTextId(chromatogramGroupId.getQcTraceName());
}
info.setChromatogramFormat(chromatogram.getChromatogramBinaryFormat().ordinal());
info.setChromatogramOffset(chromatogram.getLocationPoints());
Expand Down

0 comments on commit 651e69a

Please sign in to comment.