<jupyter_start><jupyter_text>N:D3L - G28279CN:S235F - C28976TORF1ab:T1001I - C3266TORF1ab:I2230T - T6953CORF1ab:A1708D - C5387AORF8:R52I - G28047TORF8:Q27_ - C27971TORF8:Y73C - G28110AS:N501Y - A23062TS:T716I - C23708AS:P681H - C23603AS:D1118H - G24913CS:A570D - C23270AS:S982A - T24505GORF1ab:deletion - 11288:11296S:deletion - 21765:21770S: deletion - 21991:21993<jupyter_code># gisaid.loc[(gisaid['mutation'].isin(muts)) & (gisaid['country']=='USA'), 'strain'].unique().shape
ans = gisaid.groupby(['idx', 'date', 'country']).agg(muts=('mutation', 'unique')).reset_index()
def check_mutations(x, muts: list):
    return set(muts).issubset(x)
muts = ['S:N501Y', 'S:T716I', 'S:P681H', 
        'S:D1118H', 'S:A570D', 'S:S982A']
ans['is_b117'] = ans['muts'].apply(check_mutations, args=(muts,))
ans.loc[ans['is_b117']==True, 'idx'].unique().shape
ans.loc[(ans['is_b117']==True) & (ans['country']=='USA'),'idx'].unique().tolist()
gisaid[gisaid['mutation']=='S:S982A']
ans.loc[(ans['is_b117']==True) & (ans['country']=='USA'),'idx'].unique().tolist()
us_b117_ids = ans.loc[(ans['is_b117']==True) & (ans['country']=='USA'),'idx'].unique().tolist()
cns = AlignIO.read(gisaid_msa_fp, 'fasta')
for rec in cns:
    print(rec.id)
    break
input_params['patient_zero']
my_cns = Align.MultipleSeqAlignment([rec for rec in cns if rec.id in us_b117_strains or rec.id==input_params['patient_zero']])
AlignIO.write(my_cns, 'us_b117.fa', 'fasta')
# pd.to_datetime(gisaid['date']).dt.day
# gisaid['date'] = pd.to_datetime(gisaid['date'])
# gisaid[~gisaid["date"].isna()]['date'].astype(int)/1e12
# np.arange(1, len(df) + 1)
results = br.generate_voc_data(feature, values, input_params)
html = br.generate_voc_html(feature, values, results)
br.save_html(html, f'test_data/voc_test_b117{vnum}.html')
# codon_num = 70
# gene = 'S'
# (gisaid[
# #     (gisaid['pangolin_lineage']=='B.1.1.7')
#       (gisaid['pos']==21993)
#       &(gisaid['gene']==gene)]
#  .drop_duplicates(subset=['gene', 'ref_aa', 'alt_aa']))
N:D3L - G28279C
N:S235F - C28976T
ORF1ab:T1001I - C3266T
ORF1ab:I2230T - T6953C
ORF1ab:A1708D - C5387A
ORF8:R52I - G28047T
ORF8:Q27_ - C27971T
ORF8:Y73C - G28110A
S:N501Y - A23062T
S:T716I - C23708A
S:P681H - C23603A
S:D1118H - G24913C
S:A570D - C23270A
S:S982A - T24505G
ORF1ab:deletion - 11288:11296
S:deletion - 21765:21770
S: deletion - 21991:21993<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2054736842105263, 'fraction_numerical': 0.14905263157894738, 'mean_word_length': 6.425, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '190323', 'license': 'MIT', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1108, 'n_words': 141, 'path': 'notebooks/VoC_dev2.ipynb', 'repo_name': 'AlaaALatif/bjorn', 'size': '2375'}