Recording source file names in output files, allowing output of intermediate results
This commit is contained in:
@@ -11,17 +11,19 @@ import java.util.List;
|
||||
|
||||
public class CellFileReader {
|
||||
|
||||
private String filename;
|
||||
private List<Integer[]> distinctCells = new ArrayList<>();
|
||||
|
||||
public CellFileReader(String filename) {
|
||||
|
||||
if(!filename.matches(".*\\.csv")){
|
||||
filename = filename + ".csv";
|
||||
}
|
||||
this.filename = filename;
|
||||
|
||||
CSVFormat cellFileFormat = CSVFormat.Builder.create()
|
||||
.setHeader("Alpha CDR3", "Beta CDR3", "Alpha CDR1", "Beta CDR1")
|
||||
.setSkipHeaderRecord(true)
|
||||
.setCommentMarker('#')
|
||||
.build();
|
||||
|
||||
try(//don't need to close reader bc of try-with-resources auto-closing
|
||||
@@ -42,6 +44,8 @@ public class CellFileReader {
|
||||
}
|
||||
}
|
||||
|
||||
public String getFilename() { return filename;}
|
||||
|
||||
public List<Integer[]> getCells(){
|
||||
return distinctCells;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user