syedislamuddin commited on
Commit
9ba61b2
1 Parent(s): 2626fd8

first commit

Browse files
.DS_Store ADDED
Binary file (6.15 kB). View file
 
app.py ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #from turtle import shape
2
+ import streamlit as st
3
+ #from st_keyup import st_keyup
4
+ import pandas as pd
5
+ import numpy as np
6
+ from st_aggrid import AgGrid, GridOptionsBuilder,GridUpdateMode,DataReturnMode
7
+
8
+ import os
9
+
10
+ cwd=os.getcwd()+'/'+'data/'
11
+
12
+ #get genes list
13
+ listA = pd.read_csv(cwd+"20200513_library_1_2_unbalanced_dJR051.csv",index_col=False)
14
+ listB = pd.read_csv(cwd+"20200513_library_3_4_unbalanced_dJR052.csv",index_col=False)
15
+ listC = pd.read_csv(cwd+"20200513_library_5_6_unbalanced_dJR053.csv",index_col=False)
16
+ #variants=listA['sgID_A'].unique()
17
+ variants=listA['gene'].unique()
18
+ variants_s=sorted(variants)
19
+
20
+ #Also read LR guides
21
+ listA_found_ref = pd.read_csv(cwd+"seta_found_ref1.csv",index_col=False)
22
+ listA_notfound_ref = pd.read_csv(cwd+"seta_notfound_ref1.csv",index_col=False)
23
+
24
+ listA_found_lr = pd.read_csv(cwd+"seta_found_LR1.csv",index_col=False)
25
+ listA_notfound_lr = pd.read_csv(cwd+"seta_notfound_LR1.csv",index_col=False)
26
+
27
+
28
+
29
+
30
+ st.title('Long Read Guides Search')
31
+ #st.markdown('**Please select an option from the sidebar**')
32
+
33
+ #st.write(variants)
34
+
35
+ Calc = st.sidebar.radio(
36
+ "",
37
+ ('ReadME', 'Tools Selection Menu'))
38
+
39
+
40
+ if Calc == 'ReadME':
41
+ #st.markdown("[Introduction](#Introduction)")
42
+ #st.markdown("[How do base editors work](#How-do-base-editors-work)")
43
+
44
+ expander = st.expander("How to use this app")
45
+ else:
46
+ #if Calc == 'Selection Menu':
47
+ #ReadMe = st.sidebar.checkbox('ReadME',value=False)
48
+ select_variant = st.sidebar.selectbox(
49
+ "Please select variant",
50
+ variants_s
51
+ )
52
+ #ref_sgrna=listA[listA['sgID_A']==select_variant][['protospacer_A','protospacer_B']]
53
+ ref_listA=listA[listA['gene']==select_variant][['guide_type','protospacer_A','protospacer_B','sgID_AB']]
54
+ #ref_listA=listA[listA['gene']==select_variant]
55
+ #st.write(ref_listA)
56
+
57
+ ref_listB=listB[listB['gene']==select_variant][['guide_type','protospacer_A','protospacer_B','sgID_AB']]
58
+ #st.write(ref_listB)
59
+
60
+
61
+ ref_listC=listC[listC['gene']==select_variant][['guide_type','protospacer_A','protospacer_B','sgID_AB']]
62
+ #st.write(ref_listC)
63
+ #m=pd.merge(ref_listA,ref_listC,ref_listC)
64
+ listA_concatenated_orig = pd.concat([ref_listA,ref_listB,ref_listC])
65
+
66
+
67
+ st.write('Original Guides (all 6 from 3 sets)')
68
+ st.write(listA_concatenated_orig)
69
+
70
+ st.write('GRCh38 SetA Guides Found with at most 2 Missmatches')
71
+ a_ref=ref_listA.sgID_AB.values[0].split('|')
72
+ #check GRCh38
73
+ seta_found0_ref=listA_found_ref[listA_found_ref['gene']==a_ref[0]]
74
+ seta_found1_ref=listA_found_ref[listA_found_ref['gene']==a_ref[1]]
75
+ listA_concatenated_found_ref = pd.concat([seta_found0_ref,seta_found1_ref])
76
+ st.write(listA_concatenated_found_ref)
77
+
78
+ st.write('LR SetA Guides Found with at most 2 Missmatches')
79
+ seta_found0_lr=listA_found_lr[listA_found_lr['gene']==a_ref[0]]
80
+ seta_found1_lr=listA_found_lr[listA_found_lr['gene']==a_ref[1]]
81
+ listA_concatenated_found_LR = pd.concat([seta_found0_lr,seta_found1_lr])
82
+ st.write(listA_concatenated_found_LR)
83
+
84
+ st.write('GRCh38 SetA Guides Not Found')
85
+ seta_notfound0_ref=listA_notfound_ref[listA_notfound_ref['gene']==a_ref[0]]
86
+ seta_notfound1_ref=listA_notfound_ref[listA_notfound_ref['gene']==a_ref[1]]
87
+ listA_concatenated_notfound_ref = pd.concat([seta_notfound0_ref,seta_notfound1_ref])
88
+ st.write(listA_concatenated_notfound_ref)
89
+
90
+ st.write('LR SetA Guides Not Found')
91
+ seta_notfound0_lr=listA_notfound_lr[listA_notfound_lr['gene']==a_ref[0]]
92
+ seta_notfound1_lr=listA_notfound_lr[listA_notfound_lr['gene']==a_ref[1]]
93
+ listA_concatenated_notfound_lr = pd.concat([seta_notfound0_lr,seta_notfound1_lr])
94
+ st.write(listA_concatenated_notfound_lr)
95
+
96
+
97
+ #protospacer_A
data/20200513_library_1_2_unbalanced_dJR051.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/20200513_library_3_4_unbalanced_dJR052.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/20200513_library_5_6_unbalanced_dJR053.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/header.csv ADDED
@@ -0,0 +1 @@
 
 
1
+ gene,ref_guide,chr,position,mutated_guide,strnad,num_mismatch
data/header1.csv ADDED
@@ -0,0 +1 @@
 
 
1
+ gene,ref_guide
data/seta_found_LR.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_LR.txt ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_LR1.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_mismatch_LR.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_mismatch_ref.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_ref.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_ref.txt ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_found_ref1.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match_5col_LR.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match_5col_ref_chr.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match_7col_LR.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match_LR.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match_ref.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_match_ref_chr.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_notfound_LR.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_notfound_LR.txt ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_notfound_LR1.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_notfound_ref.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_notfound_ref.txt ADDED
The diff for this file is too large to render. See raw diff
 
data/seta_notfound_ref1.csv ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ streamlit
2
+ pandas
3
+ numpy
4
+ streamlit-nested-layout
5
+ streamlit-on-Hover-tabs
6
+ streamlit-aggrid
7
+ streamlit-drawable-canvas