<jupyter_start><jupyter_text>Сравнение предикшенов по невыравненным последовательностям<jupyter_code>import pandas as pd
import re
import numpy as np
from Predictions import * # Функции для сравнения в файле Predictions.py<jupyter_output><empty_output><jupyter_text>Обработка данных<jupyter_code># Загружаю предикшены TargetScan
sars2t = pd.read_csv('TargetScan_predictions/SARS-CoV-2.txt', sep='\t')
sarst = pd.read_csv('TargetScan_predictions/SARS-CoV.txt', sep='\t')
merst = pd.read_csv('TargetScan_predictions/MERS-CoV.txt', sep='\t')
oc43t = pd.read_csv('TargetScan_predictions/HCoV-OC43.txt', sep='\t')
hku1t = pd.read_csv('TargetScan_predictions/HCoV-HKU1.txt', sep='\t')
e229t = pd.read_csv('TargetScan_predictions/HCoV-229E.txt', sep='\t')
nl63t = pd.read_csv('TargetScan_predictions/HCoV-NL63.txt', sep='\t')
sars2t.head()
list_name = [sars2t, merst, sarst, oc43t, hku1t, e229t, nl63t]
# Немного форматирую датафреймы под нашу задачу
for target in list_name:
    target.rename(columns={'miRNA_family_ID': 'miRNA', 'a_Gene_ID': 'Virus'}, inplace=True)
    target.drop(['species_ID', 'Group_num', 'Group_type',
                 'Species_in_this_group', 'Species_in_this_group_with_this_site_type'],
                axis=1, inplace=True)
sars2t.head()
# Загружаю данные miRDB
sars2m = pd.DataFrame(pd.read_csv('miRDB_predictions/SARS-CoV-2_miRDB.txt', sep='\t'))
sarsm = pd.DataFrame(pd.read_csv('miRDB_predictions/SARS-CoV_miRDB.txt', sep='\t'))
oc43m = pd.DataFrame(pd.read_csv('miRDB_predictions/HCoV-OC43_miRDB.txt', sep='\t'))
mersm = pd.DataFrame(pd.read_csv('miRDB_predictions/MERS-CoV_miRDB.txt', sep='\t'))
hku1m = pd.DataFrame(pd.read_csv('miRDB_predictions/HCoV-HKU1_miRDB.txt', sep='\t'))
e229m = pd.DataFrame(pd.read_csv('miRDB_predictions/HCoV-229E_miRDB.txt', sep='\t'))
nl63m = pd.DataFrame(pd.read_csv('miRDB_predictions/HCoV-NL63_miRDB.txt', sep='\t'))
sars2m.head(1)<jupyter_output><empty_output><jupyter_text>Рабочий поцесс: Сравнение TargetScan и miRDB Все функции описаны в файле Predictions.py<jupyter_code>without_exp(sars2m, sars2t, 'Results/_noexp/Result_SARS2_noexp')
without_exp(sarsm, sarst, 'Results/_noexp/Result_SARS_noexp')
without_exp(mersm, merst, 'Results/_noexp/Result_MERS_noexp')
without_exp(oc43m, oc43t, 'Results/_noexp/Result_OC43_noexp')
without_exp(hku1m, hku1t, 'Results/_noexp/Result_HKU1_noexp')
without_exp(e229m, e229t, 'Results/_noexp/Result_229E_noexp')
without_exp(nl63m, nl63t, 'Results/_noexp/Result_NL63_noexp')<jupyter_output><empty_output><jupyter_text>Сравнение сайтов связывания<jupyter_code>locus(sars2t, '_noexp/Result_SARS2_noexp', 'SARS2')
locus(sarst, '_noexp/Result_SARS_noexp', 'SARS')
locus(merst, '_noexp/Result_MERS_noexp', 'MERS')
locus(oc43t, '_noexp/Result_OC43_noexp', 'OC43')
locus(hku1t, '_noexp/Result_HKU1_noexp', 'HKU1')
locus(e229t, '_noexp/Result_229E_noexp', '229E')
locus(nl63t, '_noexp/Result_NL63_noexp', 'NL63')<jupyter_output>[False]
{'fraction_non_alphanumeric': 0.1507177033492823, 'fraction_numerical': 0.0355434039644566, 'mean_word_length': 8.006153846153847, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '470633', 'license': 'CC0-1.0', 'n_tokens_mistral': 1361, 'n_tokens_neox': 1294, 'n_words': 158, 'path': 'TargetScan/without_expression.ipynb', 'repo_name': 'alex123012/computer-literacy-2020', 'size': '2926'}