org.broadinstitute.gatk.utils.Utils.formattedPercent()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中org.broadinstitute.gatk.utils.Utils.formattedPercent()方法的一些代码示例,展示了Utils.formattedPercent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.formattedPercent()方法的具体详情如下:
包路径:org.broadinstitute.gatk.utils.Utils
类名称:Utils
方法名:formattedPercent

Utils.formattedPercent介绍

[英]Convenience function that formats the novelty rate as a %.2f string
[中]将新奇率格式化为%.2f字符串的便利函数

代码示例

代码示例来源:origin: broadgsa/gatk

/**
 * Convenience function that formats the novelty rate as a %.2f string
 *
 * @param known number of variants from all that are known
 * @param all number of all variants
 * @return a String novelty rate, or NA if all == 0
 */
public static String formattedNoveltyRate(final int known, final int all) {
  return formattedPercent(all - known, all);
}

代码示例来源:origin: broadgsa/gatk

public void finalizeEvaluation() {
    percent_of_sites_with_more_than_2_alleles = Utils.formattedPercent(n_multiallelic_indel_sites, nIndelSites);
    SNP_to_indel_ratio = Utils.formattedRatio(n_SNPs, n_indels);
    SNP_to_indel_ratio_for_singletons = Utils.formattedRatio(n_singleton_SNPs, n_singleton_indels);

    gold_standard_matching_rate = Utils.formattedPercent(n_indels_matching_gold_standard, n_indels);
    indel_novelty_rate = Utils.formattedNoveltyRate(n_indels - n_novel_indels, n_indels);
    frameshift_rate_for_coding_indels = Utils.formattedPercent(n_coding_indels_frameshifting, n_coding_indels_in_frame + n_coding_indels_frameshifting);

    ratio_of_1_and_2_to_3_bp_deletions = Utils.formattedRatio(deletionCountByLength[1] + deletionCountByLength[2], deletionCountByLength[3]);
    ratio_of_1_and_2_to_3_bp_insertions = Utils.formattedRatio(insertionCountByLength[1] + insertionCountByLength[2], insertionCountByLength[3]);

    SNP_het_to_hom_ratio = Utils.formattedRatio(nSNPHets, nSNPHoms);
    indel_het_to_hom_ratio = Utils.formattedRatio(nIndelHets, nIndelHoms);

    insertion_to_deletion_ratio = Utils.formattedRatio(n_insertions, n_deletions);
    insertion_to_deletion_ratio_for_large_indels = Utils.formattedRatio(n_large_insertions, n_large_deletions);

  }
}

相关文章