Package picard.nio
Class GATKBucketUtils
java.lang.Object
picard.nio.GATKBucketUtils
Copied from BucketUtils.java in GATK
To be replaced once the original GATK BucketUtils.java is ported to htsjdk
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
static boolean
isGcsUrl
(PicardHtsPath pathSpec) The GATK code modified to use PicardHTSPath rather than GATKPath Return true if thisPicardHTSPath
represents a gcs URI.static boolean
isHadoopUrl
(String path) Returns true if the given path is a HDFS (Hadoop filesystem) URL.static boolean
static boolean
isRemoteStorageUrl
(String path) Returns true if the given path is a GCS, HDFS (Hadoop filesystem), or Http(s) URL.
-
Field Details
-
GOOGLE_CLOUD_STORAGE_FILESYSTEM_SCHEME
- See Also:
-
HTTP_FILESYSTEM_PROVIDER_SCHEME
- See Also:
-
HTTPS_FILESYSTEM_PROVIDER_SCHEME
- See Also:
-
GCS_PREFIX
- See Also:
-
HTTP_PREFIX
- See Also:
-
HTTPS_PREFIX
- See Also:
-
HDFS_SCHEME
- See Also:
-
HDFS_PREFIX
- See Also:
-
FILE_PREFIX
- See Also:
-
-
Method Details
-
getTempFilePath
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 exampleextension
- 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
- Parameters:
path
- path to inspect- Returns:
- true if this path represents a gcs location
-
isGcsUrl
The GATK code modified to use PicardHTSPath rather than GATKPath Return true if thisPicardHTSPath
represents a gcs URI.- Parameters:
pathSpec
- specifier to inspect- Returns:
- true if this
PicardHTSPath
represents a gcs URI.
-
isEligibleForPrefetching
- 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
- 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
- Returns:
- true if the given path is an http or https Url.
-
isHadoopUrl
Returns true if the given path is a HDFS (Hadoop filesystem) URL. -
isRemoteStorageUrl
Returns true if the given path is a GCS, HDFS (Hadoop filesystem), or Http(s) URL.
-