-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add in detailed case summary input format to cardea plugin
- Loading branch information
Showing
5 changed files
with
188 additions
and
1 deletion.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...ardea/src/main/java/ca/on/oicr/gsi/shesmu/cardea/CaseSummaryDetailedFormatDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ca.on.oicr.gsi.shesmu.cardea; | ||
|
||
import ca.on.oicr.gsi.shesmu.plugin.input.InputFormat; | ||
|
||
public class CaseSummaryDetailedFormatDefinition extends InputFormat { | ||
|
||
public CaseSummaryDetailedFormatDefinition() { | ||
super("case_detailed_summary", CaseSummaryDetailedValue.class); | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
plugin-cardea/src/main/java/ca/on/oicr/gsi/shesmu/cardea/CaseSummaryDetailedValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package ca.on.oicr.gsi.shesmu.cardea; | ||
|
||
import ca.on.oicr.gsi.shesmu.plugin.Tuple; | ||
import ca.on.oicr.gsi.shesmu.plugin.input.ShesmuVariable; | ||
import java.time.Instant; | ||
import java.util.Optional; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
public class CaseSummaryDetailedValue { | ||
private final String assayName; | ||
private final String assayVersion; | ||
private final String caseIdentifier; | ||
private final String caseStatus; | ||
private final Optional<Instant> completedDate; | ||
private final Set<Tuple> sequencing; | ||
private final long requisitionId; | ||
private final String requisitionName; | ||
private final boolean stopped; | ||
private final boolean paused; | ||
|
||
public CaseSummaryDetailedValue( | ||
String assayName, | ||
String assayVersion, | ||
String caseIdentifier, | ||
String caseStatus, | ||
Optional<Instant> completedDate, | ||
Stream<SequencingTestValue> sequencingTestValueStream, | ||
long requisitionId, | ||
String requisitionName, | ||
boolean stopped, | ||
boolean paused) { | ||
super(); | ||
this.assayName = assayName; | ||
this.assayVersion = assayVersion; | ||
this.caseIdentifier = caseIdentifier; | ||
this.caseStatus = caseStatus; | ||
this.completedDate = completedDate; | ||
this.sequencing = | ||
sequencingTestValueStream | ||
.map( | ||
sequencingTest -> | ||
new Tuple( | ||
sequencingTest.test(), | ||
sequencingTest.type(), | ||
sequencingTest.isComplete(), | ||
sequencingTest.limsIds())) | ||
.collect(Collectors.toSet()); | ||
this.requisitionId = requisitionId; | ||
this.requisitionName = requisitionName; | ||
this.stopped = stopped; | ||
this.paused = paused; | ||
} | ||
|
||
@ShesmuVariable | ||
public String assay_name() { | ||
return assayName; | ||
} | ||
|
||
@ShesmuVariable | ||
public String assay_version() { | ||
return assayVersion; | ||
} | ||
|
||
@ShesmuVariable | ||
public String case_identifier() { | ||
return caseIdentifier; | ||
} | ||
|
||
@ShesmuVariable | ||
public String case_status() { | ||
return caseStatus; | ||
} | ||
|
||
@ShesmuVariable | ||
public Optional<Instant> completed_date() { | ||
return completedDate; | ||
} | ||
|
||
@ShesmuVariable(type = "ao4test$stype$sis_complete$blims_ids$ao2lims_id$ssupplemental$b") | ||
public Set<Tuple> sequencing() { | ||
return sequencing; | ||
} | ||
|
||
@ShesmuVariable | ||
public long requisition_id() { | ||
return requisitionId; | ||
} | ||
|
||
@ShesmuVariable | ||
public String requisition_name() { | ||
return requisitionName; | ||
} | ||
|
||
@ShesmuVariable | ||
public boolean stopped() { | ||
return stopped; | ||
} | ||
|
||
@ShesmuVariable | ||
public boolean paused() { | ||
return paused; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
plugin-cardea/src/main/java/ca/on/oicr/gsi/shesmu/cardea/LimsSequencingInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ca.on.oicr.gsi.shesmu.cardea; | ||
|
||
import ca.on.oicr.gsi.shesmu.plugin.input.ShesmuVariable; | ||
|
||
public class LimsSequencingInfo { | ||
private final String limsId; | ||
private final boolean supplemental; | ||
|
||
public LimsSequencingInfo(String limsId, boolean supplemental) { | ||
super(); | ||
this.limsId = limsId; | ||
this.supplemental = supplemental; | ||
} | ||
|
||
@ShesmuVariable | ||
public String limsId() { | ||
return limsId; | ||
} | ||
|
||
@ShesmuVariable | ||
public boolean supplemental() { | ||
return supplemental; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
plugin-cardea/src/main/java/ca/on/oicr/gsi/shesmu/cardea/SequencingTestValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package ca.on.oicr.gsi.shesmu.cardea; | ||
|
||
import ca.on.oicr.gsi.shesmu.plugin.Tuple; | ||
import ca.on.oicr.gsi.shesmu.plugin.input.ShesmuVariable; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
public class SequencingTestValue { | ||
private final String test; | ||
private final String type; | ||
private final Set<Tuple> limsIds; | ||
private final boolean isComplete; | ||
|
||
public SequencingTestValue( | ||
String test, String type, Stream<LimsSequencingInfo> limsIds, boolean isComplete) { | ||
super(); | ||
this.test = test; | ||
this.type = type; | ||
this.limsIds = | ||
limsIds | ||
.map(info -> new Tuple(info.limsId(), info.supplemental())) | ||
.collect(Collectors.toSet()); | ||
this.isComplete = isComplete; | ||
} | ||
|
||
@ShesmuVariable | ||
public String test() { | ||
return test; | ||
} | ||
|
||
@ShesmuVariable | ||
public String type() { | ||
return type; | ||
} | ||
|
||
@ShesmuVariable | ||
public Set<Tuple> limsIds() { | ||
return limsIds; | ||
} | ||
|
||
@ShesmuVariable | ||
public boolean isComplete() { | ||
return isComplete; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters