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 Summary

Fields
Modifier and Type
Field
Description
`static final String`
`FILE_PREFIX`
`static final String`
`GCS_PREFIX`
`static final String`
`GOOGLE_CLOUD_STORAGE_FILESYSTEM_SCHEME`
`static final String`
`HDFS_PREFIX`
`static final String`
`HDFS_SCHEME`
`static final String`
`HTTP_FILESYSTEM_PROVIDER_SCHEME`
`static final String`
`HTTP_PREFIX`
`static final String`
`HTTPS_FILESYSTEM_PROVIDER_SCHEME`
`static final String`
`HTTPS_PREFIX`

## Method Summary

Modifier and Type
Method
Description
`static String`
`getTempFilePath(String prefix, String extension)`
Get a temporary file path based on the prefix and extension provided.
`static boolean`
`isEligibleForPrefetching(Path path)`
`static boolean`
`isEligibleForPrefetching(PicardHtsPath pathSpec)`
`static boolean`
`isGcsUrl(String path)`
`static boolean`
`isGcsUrl(PicardHtsPath pathSpec)`
The GATK code modified to use PicardHTSPath rather than GATKPath Return true if this `PicardHTSPath` represents a gcs URI.
`static boolean`
`isHadoopUrl(String path)`
Returns true if the given path is a HDFS (Hadoop filesystem) URL.
`static boolean`
`isHttpUrl(String path)`
`static boolean`
`isRemoteStorageUrl(String path)`
Returns true if the given path is a GCS, HDFS (Hadoop filesystem), or Http(s) URL.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### GOOGLE_CLOUD_STORAGE_FILESYSTEM_SCHEME

public static final String GOOGLE_CLOUD_STORAGE_FILESYSTEM_SCHEME

See Also:
  - Constant Field Values

### HTTP_FILESYSTEM_PROVIDER_SCHEME

public static final String HTTP_FILESYSTEM_PROVIDER_SCHEME

See Also:
  - Constant Field Values

### HTTPS_FILESYSTEM_PROVIDER_SCHEME

public static final String HTTPS_FILESYSTEM_PROVIDER_SCHEME

See Also:
  - Constant Field Values

### GCS_PREFIX

public static final String GCS_PREFIX

See Also:
  - Constant Field Values

### HTTP_PREFIX

public static final String HTTP_PREFIX

See Also:
  - Constant Field Values

### HTTPS_PREFIX

public static final String HTTPS_PREFIX

See Also:
  - Constant Field Values

### HDFS_SCHEME

public static final String HDFS_SCHEME

See Also:
  - Constant Field Values

### HDFS_PREFIX

public static final String HDFS_PREFIX

See Also:
  - Constant Field Values

### FILE_PREFIX

public static final String FILE_PREFIX

See Also:
  - Constant Field Values

## 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.