Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
takutosato committed Jul 22, 2024
1 parent c5b1f2a commit 0d96633
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/main/java/picard/nio/PicardBucketUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,11 @@ public static PicardHtsPath getLocalTempFilePath(final String prefix, final Stri
return getTempFilePath((String) null, prefix, extension);
}

// Move to BucktUtils
// "directory"
// Signaled by the trailing "/"
// Shouldn't be used for other FileSystems

/**
* Creates a path to a "directory" on a Google Cloud System filesystem with a randomly generated URI.
* Since the notion of directories does not exist in GCS, it creates a path to a URI ending in "/".
* Calling this method will not create a directory/file on GCS. It merely returns a path to a non-directory.
*
*
* See: https://stackoverflow.com/questions/51892343/google-gsutil-create-folder
*
* @param parentDir The root path where the new "directory" is to live e.g. "gs://hellbender-test-logs/staging/picard/test/RevertSam/".
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/picard/sam/RevertSam.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ public String getHelpDoc() {
"same library name.", shortName = StandardOptionDefinitions.LIBRARY_NAME_SHORT_NAME, optional = true)
public String LIBRARY_NAME;

// @Argument(doc = "The prefix to be prepended to the output files, when OUTPUT_BY_READ_GROUP is true but the OUTPUT_MAP was not provided", optional = true)
// public String PREFIX = null;

private final static Log log = Log.getInstance(RevertSam.class);

/**
Expand Down Expand Up @@ -272,7 +269,7 @@ protected int doWork() {
}

final boolean sanitizing = SANITIZE;
final SamReader in = SamReaderFactory.makeDefault().referenceSequence(referenceSequence.getReferencePath()).validationStringency(VALIDATION_STRINGENCY).open(SamInputResource.of(INPUT.toPath())); // tsato: confirm this won't break piped
final SamReader in = SamReaderFactory.makeDefault().referenceSequence(referenceSequence.getReferencePath()).validationStringency(VALIDATION_STRINGENCY).open(SamInputResource.of(INPUT.toPath())); // tsato: confirm this won't break piped input
final SAMFileHeader inHeader = in.getFileHeader();
ValidationUtil.validateHeaderOverrides(inHeader, SAMPLE_ALIAS, LIBRARY_NAME);

Expand Down Expand Up @@ -593,7 +590,6 @@ public static Map<String, Path> readOutputMap(final Path outputMapFile) {
}

// Create an output map file to be written to a specified directory
// tsto: remove prefix?
public static Map<String, Path> createOutputMapFromReadGroups(final List<SAMReadGroupRecord> readGroups, final Path outputDir, final String extension) {
final Map<String, Path> outputMap = new HashMap<>();
for (final SAMReadGroupRecord readGroup : readGroups) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/picard/sam/RevertSamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ private List<SAMReadGroupRecord> getReadGroups(final Path sam){
* @param outputPath The path to a directory, when output by read group is true and the map isn't provided.
* The path to a single output SAM file, when output by read group is turned off. May be null.
* @param outputByReadGroup Whether to output by read group
* @param outputMapDir The location for a dynamically created output map file. Maybe null.
* @param outputMapDir The location for a dynamically created output map file. May be null.
*/
@Test(dataProvider = "cloudTestData", groups = "cloud")
public void testCloud(final PicardHtsPath inputSAM, final PicardHtsPath outputPath, final boolean outputByReadGroup,
Expand Down

0 comments on commit 0d96633

Please sign in to comment.