Package main

Class Par


public final class Par extends Object

Class Parameters represents the parameters for a Beagle analysis.

Instances of class Parameters are immutable.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Par(String[] args)
    Constructs a new Parameters instance from the specified command line arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    ap()
    Returns the ap parameter.
    Returns the command line arguments.
    float
    Return the buffer parameter.
    int
    Returns the burnin parameter.
    Returns the chromosome interval or null if no chrom parameter was specified.
    float
    Returns the cluster parameter.
    boolean
    em()
    Returns the em parameter.
    float
    err(int nHaps)
    Returns the default allele mismatch parameter for the specified number of haplotypes.
    Returns the excludemarkers parameter or null if no excludemarkers parameter was specified.
    Returns the excludesamples parameter or null if no excludesamples parameter was specified.
    boolean
    gp()
    Returns the gp parameter.
    gt()
    Returns the gt parameter or null if no gt parameter was specified.
    int
    Returns the imp-nsteps parameter.
    float
    Returns the imp-segment parameter.
    int
    Returns the imp-states parameter.
    float
    Returns the imp-step parameter.
    boolean
    Returns the impute parameter.
    float
    Returns the initial-lr parameter.
    int
    Returns the iterations parameter.
    static float
    Return an approximation to the allele mismatch probability suggested by Li and Stephens.
    map()
    Returns the map parameter.
    float
    ne()
    Returns the ne parameter
    boolean
    Returns true if the command line does not include an nthreads parameter and returns false otherwise.
    int
    Returns the nthreads parameter.
    out()
    Returns the out parameter.
    float
    Return the overlap parameter.
    ped()
    Returns the ped parameter or null if no ped parameter was specified.
    int
    Returns the phase-states parameter.
    float
    Returns the rare parameter
    ref()
    Returns the ref parameter or null if no ref parameter was specified.
    long
    Returns the seed parameter.
    float
    Returns the step-scale parameter.
    Returns the truth parameter
    static String
    Returns a description of the Beagle command line arguments.
    float
    Returns the window parameter.
    int
    Returns the window-markers parameter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Par

      public Par(String[] args)
      Constructs a new Parameters instance from the specified command line arguments.
      Parameters:
      args - the command line arguments
      Throws:
      IllegalArgumentException - if a command line argument is incorrectly specified
      NumberFormatException - if a numeric value for a parameter is incorrectly specified
      NullPointerException - if args == null
  • Method Details

    • args

      public String[] args()
      Returns the command line arguments.
      Returns:
      the command line arguments
    • noNThreads

      public boolean noNThreads()
      Returns true if the command line does not include an nthreads parameter and returns false otherwise.
      Returns:
      true if the command line does not include an nthreads parameter
    • usage

      public static String usage()
      Returns a description of the Beagle command line arguments.
      Returns:
      a description of the Beagle command line arguments
    • gt

      public File gt()
      Returns the gt parameter or null if no gt parameter was specified.
      Returns:
      the gt parameter or null if no gt parameter was specified
    • ref

      public File ref()
      Returns the ref parameter or null if no ref parameter was specified.
      Returns:
      the ref parameter or null if no ref parameter was specified
    • out

      public String out()
      Returns the out parameter.
      Returns:
      the out parameter
    • ped

      public File ped()
      Returns the ped parameter or null if no ped parameter was specified.
      Returns:
      the ped parameter or null if no ped parameter was specified
    • map

      public File map()
      Returns the map parameter.
      Returns:
      the map parameter
    • chromInt

      public ChromInterval chromInt()
      Returns the chromosome interval or null if no chrom parameter was specified.
      Returns:
      the chromosome interval or null if no chrom parameter was specified.
    • excludesamples

      public File excludesamples()
      Returns the excludesamples parameter or null if no excludesamples parameter was specified.
      Returns:
      the excludesamples parameter or null if no excludesamples parameter was specified
    • excludemarkers

      public File excludemarkers()
      Returns the excludemarkers parameter or null if no excludemarkers parameter was specified.
      Returns:
      the excludemarkers parameter or null if no excludemarkers parameter was specified
    • burnin

      public int burnin()
      Returns the burnin parameter.
      Returns:
      the burnin parameter
    • iterations

      public int iterations()
      Returns the iterations parameter.
      Returns:
      the iterations parameter
    • initial_lr

      public float initial_lr()
      Returns the initial-lr parameter.
      Returns:
      the initial-lr parameter
    • phase_states

      public int phase_states()
      Returns the phase-states parameter.
      Returns:
      the phase-states parameter
    • step_scale

      public float step_scale()
      Returns the step-scale parameter.
      Returns:
      the step-scale parameter
    • rare

      public float rare()
      Returns the rare parameter
      Returns:
      the rare parameter
    • impute

      public boolean impute()
      Returns the impute parameter.
      Returns:
      the impute parameter
    • imp_states

      public int imp_states()
      Returns the imp-states parameter.
      Returns:
      the imp-states parameter
    • imp_segment

      public float imp_segment()
      Returns the imp-segment parameter.
      Returns:
      the imp-segment parameter
    • imp_step

      public float imp_step()
      Returns the imp-step parameter.
      Returns:
      the imp-step parameter
    • imp_nsteps

      public int imp_nsteps()
      Returns the imp-nsteps parameter.
      Returns:
      the imp-nsteps parameter
    • cluster

      public float cluster()
      Returns the cluster parameter.
      Returns:
      the cluster parameter
    • ap

      public boolean ap()
      Returns the ap parameter.
      Returns:
      the ap parameter
    • gp

      public boolean gp()
      Returns the gp parameter.
      Returns:
      the gp parameter
    • em

      public boolean em()
      Returns the em parameter.
      Returns:
      the em parameter
    • ne

      public float ne()
      Returns the ne parameter
      Returns:
      the ne parameter
    • err

      public float err(int nHaps)
      Returns the default allele mismatch parameter for the specified number of haplotypes.
      Parameters:
      nHaps - the number of reference and target haplotypes
      Returns:
      the default allele mismatch parameter for the specified number of haplotypes
    • liStephensPMismatch

      public static float liStephensPMismatch(int nHaps)

      Return an approximation to the allele mismatch probability suggested by Li and Stephens. The approximation uses a Riemann sum approximation of the natural log function.

      Refs: Li N, Stephens M. Genetics 2003 Dec;165(4):2213-33 and Marchini J, Howie B. Myers S, McVean G, Donnelly P. 2007;39(7):906-13.

      Parameters:
      nHaps - the number of haplotypes
      Returns:
      the allele mismatch probability suggested by Li and Stepehens
    • window

      public float window()
      Returns the window parameter.
      Returns:
      the window parameter
    • window_markers

      public int window_markers()
      Returns the window-markers parameter.
      Returns:
      the window-markers parameter
    • overlap

      public float overlap()
      Return the overlap parameter.
      Returns:
      the overlap parameter.
    • buffer

      public float buffer()
      Return the buffer parameter.
      Returns:
      the buffer parameter.
    • seed

      public long seed()
      Returns the seed parameter.
      Returns:
      the seed parameter
    • nthreads

      public int nthreads()
      Returns the nthreads parameter.
      Returns:
      the nthreads parameter
    • truth

      public File truth()
      Returns the truth parameter
      Returns:
      the truth