case class HardCalls(probabilities: Expression, numAlts: Expression, phased: Expression, threshold: Expression) extends Expression with CodegenFallback with ImplicitCastInputTypes with Product with Serializable

Converts an array of probabilities (most likely the genotype probabilities from a BGEN file) into hard calls. The input probabilities are assumed to be diploid.

If the input probabilities are phased, each haplotype is called separately by finding the maximum probability greater than the threshold (0.9 by default, a la plink). If no probability is greater than the threshold, the call is -1 (missing).

If the input probabilities are unphased, the probabilities refer to the complete genotype. In this case, we find the maximum probability greater than the threshold and then convert that value to a genotype call.

If any of the required parameters (probabilities, numAlts, phased) are null, the expression returns null.

probabilities

The probabilities to convert to hard calls. The algorithm does not check that they sum to 1. If the probabilities are unphased, they are assumed to correspond to the genotypes in colex order, which is standard for both BGEN and VCF files.

numAlts

The number of alternate alleles at this site.

phased

Whether the probabilities are phased (per haplotype) or unphased (whole genotype).

threshold

Calls are only generated if at least one probability is above this threshold.

Linear Supertypes
Serializable, Serializable, ImplicitCastInputTypes, ExpectsInputTypes, CodegenFallback, Expression, TreeNode[Expression], Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HardCalls
  2. Serializable
  3. Serializable
  4. ImplicitCastInputTypes
  5. ExpectsInputTypes
  6. CodegenFallback
  7. Expression
  8. TreeNode
  9. Product
  10. Equals
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HardCalls(probabilities: Expression, numAlts: Expression, phased: Expression)
  2. new HardCalls(probabilities: Expression, numAlts: Expression, phased: Expression, threshold: Expression)

    probabilities

    The probabilities to convert to hard calls. The algorithm does not check that they sum to 1. If the probabilities are unphased, they are assumed to correspond to the genotypes in colex order, which is standard for both BGEN and VCF files.

    numAlts

    The number of alternate alleles at this site.

    phased

    Whether the probabilities are phased (per haplotype) or unphased (whole genotype).

    threshold

    Calls are only generated if at least one probability is above this threshold.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(number: Int): TreeNode[_]
    Definition Classes
    TreeNode
  5. def argString: String
    Definition Classes
    TreeNode
  6. def asCode: String
    Definition Classes
    TreeNode
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. lazy val canonicalized: Expression
    Definition Classes
    Expression
  9. def checkInputDataTypes(): TypeCheckResult
    Definition Classes
    HardCalls → ExpectsInputTypes → Expression
  10. def children: Seq[Expression]
    Definition Classes
    HardCalls → TreeNode
  11. def childrenResolved: Boolean
    Definition Classes
    Expression
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  13. def collect[B](pf: PartialFunction[Expression, B]): Seq[B]
    Definition Classes
    TreeNode
  14. def collectFirst[B](pf: PartialFunction[Expression, B]): Option[B]
    Definition Classes
    TreeNode
  15. def collectLeaves(): Seq[Expression]
    Definition Classes
    TreeNode
  16. lazy val containsChild: Set[TreeNode[_]]
    Definition Classes
    TreeNode
  17. def dataType: DataType
    Definition Classes
    HardCalls → Expression
  18. lazy val deterministic: Boolean
    Definition Classes
    Expression
  19. def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode
    Attributes
    protected
    Definition Classes
    CodegenFallback → Expression
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def eval(input: InternalRow): Any
    Definition Classes
    HardCalls → Expression
  22. def fastEquals(other: TreeNode[_]): Boolean
    Definition Classes
    TreeNode
  23. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def find(f: (Expression) ⇒ Boolean): Option[Expression]
    Definition Classes
    TreeNode
  25. def flatArguments: Iterator[Any]
    Attributes
    protected
    Definition Classes
    Expression
  26. def flatMap[A](f: (Expression) ⇒ TraversableOnce[A]): Seq[A]
    Definition Classes
    TreeNode
  27. def foldable: Boolean
    Definition Classes
    Expression
  28. def foreach(f: (Expression) ⇒ Unit): Unit
    Definition Classes
    TreeNode
  29. def foreachUp(f: (Expression) ⇒ Unit): Unit
    Definition Classes
    TreeNode
  30. def genCode(ctx: CodegenContext): ExprCode
    Definition Classes
    Expression
  31. def generateTreeString(depth: Int, lastChildren: Seq[Boolean], builder: StringBuilder, verbose: Boolean, prefix: String, addSuffix: Boolean): StringBuilder
    Definition Classes
    TreeNode
  32. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. def hashCode(): Int
    Definition Classes
    TreeNode → AnyRef → Any
  34. def innerChildren: Seq[TreeNode[_]]
    Attributes
    protected
    Definition Classes
    TreeNode
  35. def inputTypes: Seq[Serializable with AbstractDataType]
    Definition Classes
    HardCalls → ExpectsInputTypes
  36. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  37. def jsonFields: List[JField]
    Attributes
    protected
    Definition Classes
    TreeNode
  38. def makeCopy(newArgs: Array[AnyRef]): Expression
    Definition Classes
    TreeNode
  39. def map[A](f: (Expression) ⇒ A): Seq[A]
    Definition Classes
    TreeNode
  40. def mapChildren(f: (Expression) ⇒ Expression): Expression
    Definition Classes
    TreeNode
  41. def mapProductIterator[B](f: (Any) ⇒ B)(implicit arg0: ClassTag[B]): Array[B]
    Attributes
    protected
    Definition Classes
    TreeNode
  42. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. def nodeName: String
    Definition Classes
    TreeNode
  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. def nullable: Boolean
    Definition Classes
    HardCalls → Expression
  47. val numAlts: Expression
  48. def numberedTreeString: String
    Definition Classes
    TreeNode
  49. val origin: Origin
    Definition Classes
    TreeNode
  50. def otherCopyArgs: Seq[AnyRef]
    Attributes
    protected
    Definition Classes
    TreeNode
  51. def p(number: Int): Expression
    Definition Classes
    TreeNode
  52. val phased: Expression
  53. def prettyJson: String
    Definition Classes
    TreeNode
  54. def prettyName: String
    Definition Classes
    Expression
  55. val probabilities: Expression
  56. def references: AttributeSet
    Definition Classes
    Expression
  57. lazy val resolved: Boolean
    Definition Classes
    Expression
  58. def semanticEquals(other: Expression): Boolean
    Definition Classes
    Expression
  59. def semanticHash(): Int
    Definition Classes
    Expression
  60. def simpleString: String
    Definition Classes
    Expression → TreeNode
  61. def sql: String
    Definition Classes
    Expression
  62. def stringArgs: Iterator[Any]
    Attributes
    protected
    Definition Classes
    TreeNode
  63. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  64. val threshold: Expression
  65. def toJSON: String
    Definition Classes
    TreeNode
  66. def toString(): String
    Definition Classes
    Expression → TreeNode → AnyRef → Any
  67. def transform(rule: PartialFunction[Expression, Expression]): Expression
    Definition Classes
    TreeNode
  68. def transformDown(rule: PartialFunction[Expression, Expression]): Expression
    Definition Classes
    TreeNode
  69. def transformUp(rule: PartialFunction[Expression, Expression]): Expression
    Definition Classes
    TreeNode
  70. def treeString(verbose: Boolean, addSuffix: Boolean): String
    Definition Classes
    TreeNode
  71. def treeString: String
    Definition Classes
    TreeNode
  72. final def verboseString: String
    Definition Classes
    Expression → TreeNode
  73. def verboseStringWithSuffix: String
    Definition Classes
    TreeNode
  74. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  77. def withNewChildren(newChildren: Seq[Expression]): Expression
    Definition Classes
    TreeNode

Inherited from Serializable

Inherited from Serializable

Inherited from ImplicitCastInputTypes

Inherited from ExpectsInputTypes

Inherited from CodegenFallback

Inherited from Expression

Inherited from TreeNode[Expression]

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped