本文整理汇总了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);
}