Ejemplo n.º 1
0
def import_vcf_write():
    mt = hl.import_vcf(resource('profile.vcf.bgz'))
    out = hl.utils.new_temp_file(suffix='mt')
    mt.write(out)
Ejemplo n.º 2
0
def export_vcf():
    mt = hl.read_matrix_table(resource('profile.mt'))
    out = hl.utils.new_temp_file(suffix='vcf.bgz')
    hl.export_vcf(mt, out)
Ejemplo n.º 3
0
def split_multi_hts():
    mt = hl.read_matrix_table(resource('profile.mt'))
    hl.split_multi_hts(mt)._force_count_rows()
Ejemplo n.º 4
0
def import_vcf_count_rows():
    mt = hl.import_vcf(resource('profile.vcf.bgz'))
    mt.count_rows()
Ejemplo n.º 5
0
def import_vcf_count_rows():
    mt = hl.import_vcf(resource('profile.vcf.bgz'))
    mt.count_rows()
Ejemplo n.º 6
0
def matrix_table_rows_force_count():
    ht = hl.read_matrix_table(resource('profile.mt')).rows().key_by()
    ht._force_count()
Ejemplo n.º 7
0
def matrix_table_decode_and_count():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt._force_count_rows()
Ejemplo n.º 8
0
def matrix_table_entries_table():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt.entries()._force_count()
Ejemplo n.º 9
0
def matrix_table_rows_force_count():
    ht = hl.read_matrix_table(resource('profile.mt')).rows().key_by()
    ht._force_count()
Ejemplo n.º 10
0
def matrix_table_aggregate_entries():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt.aggregate_entries(hl.agg.stats(mt.GQ))
Ejemplo n.º 11
0
def matrix_table_array_arithmetic():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt = mt.filter_rows(mt.alleles.length() == 2)
    mt.select_entries(
        dosage=hl.pl_dosage(mt.PL)).select_rows()._force_count_rows()
Ejemplo n.º 12
0
def import_vcf_write():
    mt = hl.import_vcf(resource('profile.vcf.bgz'))
    out = hl.utils.new_temp_file(suffix='mt')
    mt.write(out)
Ejemplo n.º 13
0
def split_multi_hts():
    mt = hl.read_matrix_table(resource('profile.mt'))
    hl.split_multi_hts(mt)._force_count_rows()
Ejemplo n.º 14
0
def export_vcf():
    mt = hl.read_matrix_table(resource('profile.mt'))
    out = hl.utils.new_temp_file(suffix='vcf.bgz')
    hl.export_vcf(mt, out)
Ejemplo n.º 15
0
def matrix_table_array_arithmetic():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt = mt.filter_rows(mt.alleles.length() == 2)
    mt.select_entries(dosage = hl.pl_dosage(mt.PL)).select_rows()._force_count_rows()
Ejemplo n.º 16
0
def matrix_table_rows_is_transition():
    ht = hl.read_matrix_table(resource('profile.mt')).rows().key_by()
    ht.select(is_snp=hl.is_snp(ht.alleles[0], ht.alleles[1]))._force_count()
Ejemplo n.º 17
0
def matrix_table_entries_table():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt.entries()._force_count()
Ejemplo n.º 18
0
def matrix_table_decode_and_count():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt._force_count_rows()
Ejemplo n.º 19
0
def matrix_table_rows_is_transition():
    ht = hl.read_matrix_table(resource('profile.mt')).rows().key_by()
    ht.select(is_snp = hl.is_snp(ht.alleles[0], ht.alleles[1]))._force_count()
Ejemplo n.º 20
0
def matrix_table_many_aggs_col_wise():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt = mt.annotate_cols(**many_aggs(mt))
    mt.cols()._force_count()
Ejemplo n.º 21
0
def matrix_table_many_aggs_col_wise():
    mt = hl.read_matrix_table(resource('profile.mt'))
    mt = mt.annotate_cols(**many_aggs(mt))
    mt.cols()._force_count()
Ejemplo n.º 22
0
def matrix_table_entries_table_no_key():
    mt = hl.read_matrix_table(
        resource('profile.mt')).key_rows_by().key_cols_by()
    mt.entries()._force_count()