Package picard.nio

Class GATKBucketUtils

java.lang.Object
picard.nio.GATKBucketUtils

public class GATKBucketUtils extends Object
Copied from BucketUtils.java in GATK To be replaced once the original GATK BucketUtils.java is ported to htsjdk
  • Field Details

  • Method Details

    • getTempFilePath

      public static String getTempFilePath(String prefix, String extension)
      Get a temporary file path based on the prefix and extension provided. This file (and possible indexes associated with it) will be scheduled for deletion on shutdown
      Parameters:
      prefix - a prefix for the file name for remote paths this should be a valid URI to root the temporary file in (e.g. gs://hellbender/staging/) there is no guarantee that this will be used as the root of the tmp file name, a local prefix may be placed in the tmp folder for example
      extension - and extension for the temporary file path, the resulting path will end in this
      Returns:
      a path to use as a temporary file, on remote file systems which don't support an atomic tmp file reservation a path is chosen with a long randomized name
    • isGcsUrl

      public static boolean isGcsUrl(String path)
      Parameters:
      path - path to inspect
      Returns:
      true if this path represents a gcs location
    • isGcsUrl

      public static boolean isGcsUrl(PicardHtsPath pathSpec)
      The GATK code modified to use PicardHTSPath rather than GATKPath Return true if this PicardHTSPath represents a gcs URI.
      Parameters:
      pathSpec - specifier to inspect
      Returns:
      true if this PicardHTSPath represents a gcs URI.
    • isEligibleForPrefetching

      public static boolean isEligibleForPrefetching(PicardHtsPath pathSpec)
      Parameters:
      pathSpec - specifier to inspect
      Returns:
      true if this GATKPath represents a remote storage system which may benefit from prefetching (gcs or http(s))
    • isEligibleForPrefetching

      public static boolean isEligibleForPrefetching(Path path)
      Parameters:
      path - path to inspect
      Returns:
      true if this Path represents a remote storage system which may benefit from prefetching (gcs or http(s))
    • isHttpUrl

      public static boolean isHttpUrl(String path)
      Returns:
      true if the given path is an http or https Url.
    • isHadoopUrl

      public static boolean isHadoopUrl(String path)
      Returns true if the given path is a HDFS (Hadoop filesystem) URL.
    • isRemoteStorageUrl

      public static boolean isRemoteStorageUrl(String path)
      Returns true if the given path is a GCS, HDFS (Hadoop filesystem), or Http(s) URL.