当前位置: 首页>>代码示例>>Java>>正文


Java BucketUtils.fileExists方法代码示例

本文整理汇总了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;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:19,代码来源:PathSeqBwaSpark.java

示例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);
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:16,代码来源:PathSeqScoreSpark.java


注:本文中的org.broadinstitute.hellbender.utils.gcs.BucketUtils.fileExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。