本文整理匯總了Java中org.broadinstitute.hellbender.utils.gcs.BucketUtils.fileExists方法的典型用法代碼示例。如果您正苦於以下問題:Java BucketUtils.fileExists方法的具體用法?Java BucketUtils.fileExists怎麽用?Java BucketUtils.fileExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.broadinstitute.hellbender.utils.gcs.BucketUtils
的用法示例。
在下文中一共展示了BucketUtils.fileExists方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadBam
import org.broadinstitute.hellbender.utils.gcs.BucketUtils; //導入方法依賴的package包/類
/**
* Reads bam from path and returns tuple of the header and reads RDD
*/
private Tuple2<SAMFileHeader, JavaRDD<GATKRead>> loadBam(final String path,
final ReadsSparkSource readsSource) {
if (path == null) return null;
if (BucketUtils.fileExists(path)) {
final SAMFileHeader header = readsSource.getHeader(path, null);
if (header.getSequenceDictionary() != null && !header.getSequenceDictionary().isEmpty()) {
throw new UserException.BadInput("Input BAM should be unaligned, but found one or more sequences in the header.");
}
PSBwaUtils.addReferenceSequencesToHeader(header, bwaArgs.referencePath, getReferenceWindowFunction());
final JavaRDD<GATKRead> reads = readsSource.getParallelReads(path, null, null, bamPartitionSplitSize);
return new Tuple2<>(header, reads);
}
logger.warn("Could not find file " + path + ". Skipping...");
return null;
}
示例2: readInputWithHeader
import org.broadinstitute.hellbender.utils.gcs.BucketUtils; //導入方法依賴的package包/類
private Tuple2<JavaRDD<GATKRead>, SAMFileHeader> readInputWithHeader(final String path,
final ReadsSparkSource readsSource) {
if (path != null) {
if (BucketUtils.fileExists(path)) {
recommendedNumReducers += PSUtils.pathseqGetRecommendedNumReducers(path, numReducers, getTargetPartitionSize());
final SAMFileHeader header = readsSource.getHeader(path, null);
JavaRDD<GATKRead> reads = readsSource.getParallelReads(path, null, null, bamPartitionSplitSize);
reads = PSUtils.primaryReads(reads);
return new Tuple2<>(reads, header);
} else {
logger.warn("Could not find file " + path + ". Skipping...");
}
}
return new Tuple2<>(null, null);
}