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

[bot] Fast-forward for 24.11.1 #985

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading