<commit_before>package org.broadinstitute.sting.playground.utils;

import org.broadinstitute.sting.gatk.refdata.rodGFF;
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
import org.broadinstitute.sting.playground.gatk.walkers.AlleleFrequencyWalker;

import java.util.List;
import java.io.PrintStream;

/**
 * Created by IntelliJ IDEA.
 * User: andrewk
 * Date: Apr 1, 2009
 * Time: 5:53:21 PM
 * To change this template use File | Settings | File Templates.
 */
public class AlleleMetrics {

    long dbsnp_hits=0;
    long num_variants=0;
    long num_loci_total=0;
    long num_loci_confident=0;
    double LOD_cutoff = 5;
    long hapmap_genotype_correct = 0;
    long hapmap_genotype_incorrect = 0;
    long hapmap_refvar_correct = 0;
    long hapmap_refvar_incorrect = 0;

    private final double dbl_cmp_precision = 0.0001;

    protected PrintStream out;

    public AlleleMetrics(String MetricsOutputFile) {
        try
        {
            /*if ( MetricsOutputFile.equals("-") )
                this.out = out;
            else*/<commit_msg>Added a constructor in which the lod threshold can be set.<commit_after>package org.broadinstitute.sting.playground.utils;

import org.broadinstitute.sting.gatk.refdata.rodGFF;
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
import org.broadinstitute.sting.playground.gatk.walkers.AlleleFrequencyWalker;

import java.util.List;
import java.io.PrintStream;

/**
 * Created by IntelliJ IDEA.
 * User: andrewk
 * Date: Apr 1, 2009
 * Time: 5:53:21 PM
 * To change this template use File | Settings | File Templates.
 */
public class AlleleMetrics {

    long dbsnp_hits=0;
    long num_variants=0;
    long num_loci_total=0;
    long num_loci_confident=0;
    double LOD_cutoff = 5;
    long hapmap_genotype_correct = 0;
    long hapmap_genotype_incorrect = 0;
    long hapmap_refvar_correct = 0;
    long hapmap_refvar_incorrect = 0;

    private final double dbl_cmp_precision = 0.0001;

    protected PrintStream out;

    public AlleleMetrics(String MetricsOutputFile) {
        try
        {
            /*if ( MetricsOutputFile.equals("-") )
                this.out = out;
            else*/
            this.out = new PrintStream(MetricsOutputFile);
        }
        catch (Exception e)
        {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    public AlleleMetrics(String MetricsOutputFile, double lodThreshold) {
        LOD_cutoff = lodThreshold;

        try
        {
            /*if ( MetricsOutputFile.equals("-") )
                this.out = out;
            else*/
{'fraction_non_alphanumeric': 0.09033391915641477, 'fraction_numerical': 0.017223198594024606, 'mean_word_length': 2.9582753824756605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4941029', 'n_tokens_mistral': 997, 'n_tokens_neox': 944, 'n_words': 192}