# Hail 0.1 is live!

**URL:** <https://discuss.hail.is/t/hail-0-1-is-live/213>\
**Category:** Updates\
**Created:** [May 15, 2017, 5:25pm UTC](https://discuss.hail.is/t/hail-0-1-is-live/213 "2017-05-15T17:25:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [May 15, 2017, 5:25pm UTC](https://discuss.hail.is/t/hail-0-1-is-live/213/1 "2017-05-15T17:25:26Z")

</div>

# Hail is 0.1! What does that mean?

### 0.1 is Hail’s first stable release. “Stable release” can connote a lot of things, so here’s what we mean:

- We **will not be** changing any interfaces in this version. Thanks to all of you for your patience as we broke your Hail scripts every week!
- We will support this version by fixing bugs and answering questions about its interfaces until it is deprecated. Deprecation will probably happen 3 months after the next stable version (0.2) is released.
- We will continue to add features (without changing existing interfaces!) to this version **for now**. This will probably stop in a month or so, as we shift to building features against changing development code for stable release in 0.2.
- We will continue automatically deploying new builds to the `gs://hail-common` bucket. We may change how this is done in the next few days, though, so keep an eye on this forum!

# Changes in 0.1

We’ve been saving up a pile of changes in the last month or so, in order not to break your scripts every few days. These changes all appear at once in the new 0.1 build. Here they are:

## KeyTables: your new best friend for annotation and filtering

- Reworked [`annotate_samples_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.annotate_samples_table) and [`annotate_variants_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.annotate_variants_table). These are essentially the functionality of the old `annotate_variants_keytable` and `annotate_samples_keytable`, with more. For example, [`annotate_variants_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.annotate_variants_table) can be used to annotate variants by intervals, variants, or loci.
- Many annotation methods have disappeared! These can be implemented in terms of [`annotate_samples_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.annotate_samples_table) and [`annotate_variants_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.annotate_variants_table). Some examples of removed methods:
  - `annotate_samples_fam`
  - `annotate_variants_intervals`
  - `annotate_variants_bed`

- Added [Keytable.import\_fam](https://hail.is/hail/hail.KeyTable.html#hail.KeyTable.import_fam), [KeyTable.import\_interval\_list](https://hail.is/hail/hail.KeyTable.html#hail.KeyTable.import_interval_list), and [KeyTable.import\_bed](https://hail.is/hail/hail.KeyTable.html#hail.KeyTable.import_bed). These should be used with the new annotate methods.
- Reworked `HailContext`'s [import\_table([https://hail.is/hail/hail.HailContext.html#hail.HailContext.import\_table](https://hail.is/hail/hail.HailContext.html#hail.HailContext.import_table)) (renamed from `import_keytable`). The TextTableConfig object is gone, and all the parameters are now simply arguments to this method. Additionally, field names in tables imported with `no_header=True` will be given names `"f0"`…"`fN"` instead of `"_0"`…`"_N"`
- Added [`filter_variants_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.filter_variants_table) and [`filter_samples_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.filter_samples_table). These take [`KeyTable`](https://hail.is/hail/hail.KeyTable.html)s with key `Variant`, `Locus`, or `Interval` (for variants) or `String` (for samples). Filtering from interval lists should go through this method. Don’t worry – we’ve kept the efficiency demonstrated [in this blog post!](http://discuss.hail.is/t/using-filter-variants-intervals-to-query-the-16gb-gnomad-sites-dataset-in-300ms-on-your-laptop/148)

## Pedigree as a first-class object

- We’ve added first-class Python objects for [`Pedigree`](https://hail.is/hail/representation/hail.representation.Pedigree.html) and [`Trio`](https://hail.is/hail/representation/hail.representation.Trio.html). Read fam files with the static [`read`](https://hail.is/hail/representation/hail.representation.Pedigree.html#hail.representation.Pedigree.read) method.
- The [`mendel_errors`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.mendel_errors) and [`tdt`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.tdt) methods now take a pedigree as an argument, instead of a fam file.

## Regression

- Removed counts from LMM regression variant annotations. See the new schema in the docs [here.](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.lmmreg)
- Added dosage option to [`logreg`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.logreg).

## GRM

- The [`grm`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.grm) method now returns a [`KinshipMatrix`](https://hail.is/hail/hail.KinshipMatrix.html) object, which has new methods to export to all of the old GRM PLINK formats. `grm` no longer takes a format argument.

## Dosage

- We used the term “dosage” in a very confusing (and incorrect) way. `g.dosage()` in the expression language is now the expected number of alternate alleles given the genotype probabilities. `g.gp()` is the linear-scaled genotype probabilities from which dosage is computed. This does not involve changes to the regression interfaces, though using `g.dosage()` for a variant as a covariate will now be correct.

## Count

- We changed the [`count`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.count) method. It no longer takes a `genotypes` boolean parameter or returns a dict: instead, it returns a tuple of (number of samples, number of variants).
- We added the [`summarize`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.summarize) method, which is an excellent way to get a broad sense of a dataset’s contents.

## Filter variants with Python objects

- Added [filter\_variants\_list](https://hail.is/hail/hail.VariantDataset.html?highlight=filter_variants_list#hail.VariantDataset.filter_variants_list), which takes a list of Python [`Variant`](https://hail.is/hail/representation/hail.representation.Variant.html) objects.This method is very fast (does pushdown, [see here](http://discuss.hail.is/t/using-filter-variants-intervals-to-query-the-16gb-gnomad-sites-dataset-in-300ms-on-your-laptop/148)).

## `concordance` and `mendel_errors` return key tables

- [`concordance`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.concordance) and [`mendel_errors`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.mendel_errors) now both return [`KeyTable`](https://hail.is/hail/hail.KeyTable.html) objects. `concordance` used to return the global statistics as a 2d list, and two variant datasets. `mendel_errors` used to write four files. The docs explain these things clearly.

## TakeBy

- The [`takeBy`](https://hail.is/hail/types.html?highlight=takeby#aggregable-t) aggregator now takes elements from smallest to largest (used to be largest to smallest, but this was not clearly documented).

## Method renames

- HailContext.import\_keytable =\> import\_table
- HailContext.read\_keytable =\> read\_table
- VariantDataset.annotate\_global\_py =\> annotate\_global
- VariantDataset.from\_keytable =\> from\_table
- VariantDataset.variants\_keytable =\> variants\_table
- VariantDataset.samples\_keytable =\> samples\_table
- VariantDataset.genotypes\_keytable =\> genotypes\_table
- VariantDataset.filter\_variants\_intervals =\> filter\_intervals (some functionality moved to [`filter_variants_table`](https://hail.is/hail/hail.VariantDataset.html#hail.VariantDataset.filter_variants_table))
- KeyTable.column\_names =\> columns
- KeyTable.num\_rows =\> count
- **Plus:** Arguments are renamed in many functions (“code” is replaced with “expr” most places).

## Removed functionality

- `aggregate_intervals`: this method is easy to implement in a few lines of KeyTable methods now.
- `annotate_global_table`: rarely used functionality mostly replaced by KeyTable support. It is still possible to put tables into global annotations with `KeyTable.collect()` and `VariantDataset.annotate_global`.
- `annotate_global_list`: same as above.
- `IntervalTree`. This object is totally obviated by the deep support for `Interval`-keyed `KeyTable`s.
