Added metadata to MatchingResult to enable CLI options
This commit is contained in:
@@ -1,18 +1,42 @@
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MatchingResult {
|
||||
private String sourceFile;
|
||||
private List<String> comments;
|
||||
private List<String> headers;
|
||||
private List<List<String>> allResults;
|
||||
private Map<Integer, Integer> matchMap;
|
||||
private Duration time;
|
||||
private final String sourceFile;
|
||||
private final Map<String, String> metadata;
|
||||
private final List<String> comments;
|
||||
private final List<String> headers;
|
||||
private final List<List<String>> allResults;
|
||||
private final Map<Integer, Integer> matchMap;
|
||||
private final Duration time;
|
||||
|
||||
public MatchingResult(String sourceFileName, List<String> comments, List<String> headers, List<List<String>> allResults, Map<Integer, Integer>matchMap, Duration time){
|
||||
public MatchingResult(String sourceFileName, Map<String, String> metadata, List<String> headers,
|
||||
List<List<String>> allResults, Map<Integer, Integer>matchMap, Duration time){
|
||||
this.sourceFile = sourceFileName;
|
||||
this.comments = comments;
|
||||
/*
|
||||
* POSSIBLE KEYS FOR METADATA MAP ARE:
|
||||
* sample plate filename
|
||||
* graph filename
|
||||
* well populations
|
||||
* total alphas found
|
||||
* total betas found
|
||||
* high overlap threshold
|
||||
* low overlap threshold
|
||||
* maximum occupancy difference
|
||||
* minimum overlap percent
|
||||
* pairing attempt rate
|
||||
* correct pairing count
|
||||
* incorrect pairing count
|
||||
* pairing error rate
|
||||
* simulation time
|
||||
*/
|
||||
this.metadata = metadata;
|
||||
this.comments = new ArrayList<>();
|
||||
for (String key : metadata.keySet()) {
|
||||
comments.add(key +": " + metadata.get(key));
|
||||
}
|
||||
this.headers = headers;
|
||||
this.allResults = allResults;
|
||||
this.matchMap = matchMap;
|
||||
@@ -20,6 +44,8 @@ public class MatchingResult {
|
||||
|
||||
}
|
||||
|
||||
public Map<String, String> getMetadata() {return metadata;}
|
||||
|
||||
public List<String> getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user