Skip to content

Commit 2bab450

Browse files
committed
Remove artefact duplicate of _karyotype_tags_n_alt() from util.py
1 parent cd684b5 commit 2bab450

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

malariagen_data/util.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,27 +1591,6 @@ def distributed_client():
15911591
return client
15921592

15931593

1594-
def _karyotype_tags_n_alt(gt, alts, inversion_alts):
1595-
# could be Numba'd for speed but was already quick (not many inversion tag snps)
1596-
n_sites = gt.shape[0]
1597-
n_samples = gt.shape[1]
1598-
1599-
# create empty array
1600-
inv_n_alt = np.empty((n_sites, n_samples), dtype=np.int8)
1601-
1602-
# for every site
1603-
for i in range(n_sites):
1604-
# find the index of the correct tag snp allele
1605-
tagsnp_index = np.where(alts[i] == inversion_alts[i])[0]
1606-
1607-
for j in range(n_samples):
1608-
# count alleles which == tag snp allele and store
1609-
n_tag_alleles = np.sum(gt[i, j] == tagsnp_index[0])
1610-
inv_n_alt[i, j] = n_tag_alleles
1611-
1612-
return inv_n_alt
1613-
1614-
16151594
def prep_samples_for_cohort_grouping(
16161595
*, df_samples, area_by, period_by, taxon_by="taxon"
16171596
):

0 commit comments

Comments
 (0)