Skip to content

Commit

Permalink
Adding a test and small features to var store branch (#6761)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganshand authored and kcibul committed Jan 29, 2021
1 parent 08e5cba commit 4ab5056
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.broadinstitute.hellbender.utils.Utils;
import org.broadinstitute.hellbender.utils.tsv.SimpleXSVWriter;

import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
Expand All @@ -31,15 +32,15 @@ public static List<String> getHeaders() {
return Arrays.stream(ArrayMetadataTsvCreator.HeaderFieldEnum.values()).map(String::valueOf).collect(Collectors.toList());
}

public void createRow(String sampleName, String sampleId, String tableNumberPrefix) {
public void createRow(String sampleName, String sampleId, String tableNumberPrefix, File outputDirectory) {
// if the metadata tsvs don't exist yet -- create them
try {
// Create a metadata file to go into the metadata dir for _this_ sample
// TODO--this should just be one file per sample set?
final String sampleMetadataName = IngestConstants.metadataFilePrefix + tableNumberPrefix + sampleName + IngestConstants.FILETYPE;
final File sampleMetadataName = new File (outputDirectory, IngestConstants.metadataFilePrefix + tableNumberPrefix + sampleName + IngestConstants.FILETYPE);
// write header to it
List<String> sampleListHeader = ArrayMetadataTsvCreator.getHeaders();
sampleMetadataWriter = new SimpleXSVWriter(Paths.get(sampleMetadataName), IngestConstants.SEPARATOR);
sampleMetadataWriter = new SimpleXSVWriter(sampleMetadataName.toPath(), IngestConstants.SEPARATOR);
sampleMetadataWriter.setHeaderLine(sampleListHeader);

final List<String> TSVLineToCreateSampleMetadata = createSampleListRow(
Expand Down

0 comments on commit 4ab5056

Please sign in to comment.