Skip to content

Commit

Permalink
ensure all sequencings with no limids are not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
grapigeau committed Oct 3, 2024
1 parent bde6663 commit 2e852b9
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,14 @@ private Set<ShesmuSequencing> getSequencingForShesmuCase(Case kase){

for (Test test : kase.getTests()) {

List<Sample> fullDepthSeqs = test.getFullDepthSequencings();
if (fullDepthSeqs != null && !fullDepthSeqs.isEmpty()) {
sequencings.add(makeShesmuSequencing(fullDepthSeqs, MetricCategory.FULL_DEPTH_SEQUENCING, reqId, test.getName()));
ShesmuSequencing fullDepthSeq = makeShesmuSequencing(test.getFullDepthSequencings(), MetricCategory.FULL_DEPTH_SEQUENCING, reqId, test.getName());
if (fullDepthSeq != null) {
sequencings.add(fullDepthSeq);
}
List<Sample> libraryQuals = test.getLibraryQualifications();
if (libraryQuals != null && !libraryQuals.isEmpty()) {
sequencings.add(makeShesmuSequencing(libraryQuals, MetricCategory.LIBRARY_QUALIFICATION, reqId, test.getName()));

ShesmuSequencing libraryQual = makeShesmuSequencing(test.getLibraryQualifications(), MetricCategory.LIBRARY_QUALIFICATION, reqId, test.getName());
if (libraryQual != null) {
sequencings.add(libraryQual);
}
};

Expand Down Expand Up @@ -173,6 +174,9 @@ private ShesmuSequencing makeShesmuSequencing(List<Sample> samples, MetricCatego
}
}

if (shesmuSamples.isEmpty()) {
return null;
}
return new ShesmuSequencing.Builder()
.test(name)
.limsIds(shesmuSamples)
Expand Down

0 comments on commit 2e852b9

Please sign in to comment.