syedislamuddin commited on
Commit
a31ca96
·
1 Parent(s): bc1c913

Upload 36 files

Browse files
.gitattributes CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ data/PE-Designer/PE-Designer_NGG.csv filter=lfs diff=lfs merge=lfs -text
36
+ data/PE-Designer/PE-Designer_offtargets_NGG.csv filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -18,7 +18,6 @@ from PIL import Image
18
 
19
  cwd=os.getcwd()+'/'+'data/'
20
 
21
-
22
  #get snps list
23
  snps = pd.read_csv("SNPS.csv")
24
  variants=snps['GENE:SNP'].unique()
@@ -98,12 +97,12 @@ def ForeCastBE(target_seq,method,select_method):
98
  ('ABE', 'CBE'),horizontal=True)
99
 
100
  if len(variant_spl)>1:
101
- fname=variant_spl[1]+"_"+method+"_"+select_method+'.fasta'
102
  res_fname=fname+"_"+Editor+'.csv'
103
 
104
  #snpid=variant_spl[1]
105
  else:
106
- fname=variant_spl[0]+"_"+method+"_"+select_method+'.fasta'
107
  res_fname=fname+"_"+Editor+'.csv'
108
 
109
  #snpid=variant_spl[0]
@@ -130,10 +129,10 @@ def ForeCastBE(target_seq,method,select_method):
130
  b +='import forecast_be\n'
131
  b+="forecast_be.predict_batch_fasta("+"'"+fname+"'"+",editor="+"'"+Editor+"'"+",output_path="+"'"+res_fname+"'"+",mean="+mean1+",std="+std1+")\n"
132
 
133
- f = open(cwd+"pytest1.py", "w")
134
  f.write(str(b))
135
  f.close()
136
- command2 = 'python '+cwd+"pytest1.py"
137
  #result = run(command2, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True)
138
  run(command2, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True)
139
  Forecast_BE_Res=pd.read_csv(res_fname)
@@ -524,6 +523,80 @@ def Guidescan2(method,select_method):
524
 
525
  display_res(method,',','query',select_method)
526
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
527
  #Pnbdesigner
528
  def Pnbdesigner(method,select_method):
529
  st.header("PnB Designer: "+method)
@@ -1008,8 +1081,11 @@ def display_res(method,sep,rsid,select_method):
1008
  if data_snp.shape[0] > 0:
1009
  if select_method=='BE-DICT':
1010
  return data_snp['Outp_seq']
1011
- else:
1012
  return data_snp['Protospacer']
 
 
 
1013
  else:
1014
  return [0]
1015
 
@@ -1025,19 +1101,22 @@ table_edit = '<p style="font-family:sans-serif; color:Green; font-size: 16px;">A
1025
 
1026
 
1027
  st.title('Single Base Editiors')
 
1028
  expander = st.expander("NEW TOOLS CURRENTLY AVAILABLE/COMING SOON IN THE APP")
1029
  #st.header('How to use this app')
1030
  expander.markdown(
1031
  """
1032
- **NEW: PLEASE NOTE THAT [FORECasT-BE](https://partslab.sanger.ac.uk/FORECasT-BE) is now part of the App to predict guide efficiency for ABEs and CBEs**
1033
- - **Available under BE-DICT and PnB Designer options**
 
 
 
1034
  **Coming Soon.**
1035
  - **We are also testing a prime editing efficiency calculator [MinsePIE](https://github.com/julianeweller/MinsePIE) and will be available soon**
1036
- - **Another Prime and Base editing tool [PE/BE-Designer](http://www.rgenome.net/be-designer/) will also be part of the app soon**
1037
  """
1038
  )
1039
 
1040
- st.markdown('**Please select an option from the sidebar**')
1041
  st.sidebar.image("logo-card-white.png", use_column_width=True)
1042
  #ReadMe = st.sidebar.radio('ReadME',value=True)
1043
 
@@ -1314,14 +1393,22 @@ else:
1314
  "Please select an option",
1315
  ('30bp_cpf1', '30bp_NGG','40bp_cpf1', '40bp_NGG','50bp_cpf1', '50bp_NGG'))
1316
 
1317
- PnBDesigner = st.sidebar.checkbox('PnB Designer',key=5)
 
 
 
 
 
 
 
 
1318
  if PnBDesigner:
1319
  select_method_PnBDesigner='PnB Designer'
1320
  method_PnBDesigner = st.sidebar.radio(
1321
  "Please select an option",
1322
  ('Base_editing_guides', 'Nicking_guides_PE3_PE3b','pegRNA_oligos'))
1323
 
1324
- SNPCRISPR = st.sidebar.checkbox('SNP_CRISPR',key=6)
1325
  if SNPCRISPR:
1326
  select_method_SNPCRISPR='SNP_CRISPR'
1327
  method_SNPCRISPR = st.sidebar.radio(
@@ -1339,6 +1426,9 @@ else:
1339
  if GuideScan2 and select_method_GuideScan2 == "GuideScan2":
1340
  Guidescan2(method_GuideScan2,select_method_GuideScan2)
1341
 
 
 
 
1342
  if PnBDesigner and select_method_PnBDesigner=='PnB Designer':
1343
  Pnbdesigner(method_PnBDesigner,select_method_PnBDesigner)
1344
 
 
18
 
19
  cwd=os.getcwd()+'/'+'data/'
20
 
 
21
  #get snps list
22
  snps = pd.read_csv("SNPS.csv")
23
  variants=snps['GENE:SNP'].unique()
 
97
  ('ABE', 'CBE'),horizontal=True)
98
 
99
  if len(variant_spl)>1:
100
+ fname=cwd+variant_spl[1]+"_"+method+"_"+select_method+'.fasta'
101
  res_fname=fname+"_"+Editor+'.csv'
102
 
103
  #snpid=variant_spl[1]
104
  else:
105
+ fname=cwd+variant_spl[0]+"_"+method+"_"+select_method+'.fasta'
106
  res_fname=fname+"_"+Editor+'.csv'
107
 
108
  #snpid=variant_spl[0]
 
129
  b +='import forecast_be\n'
130
  b+="forecast_be.predict_batch_fasta("+"'"+fname+"'"+",editor="+"'"+Editor+"'"+",output_path="+"'"+res_fname+"'"+",mean="+mean1+",std="+std1+")\n"
131
 
132
+ f = open("pytest1.py", "w")
133
  f.write(str(b))
134
  f.close()
135
+ command2 = 'python '+ "pytest1.py"
136
  #result = run(command2, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True)
137
  run(command2, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True)
138
  Forecast_BE_Res=pd.read_csv(res_fname)
 
523
 
524
  display_res(method,',','query',select_method)
525
 
526
+ def PE_DESIGNER(method,select_method):
527
+ st.header("PE-Designer: "+method)
528
+ expander = st.expander("Summary")
529
+ expander.markdown(
530
+ """
531
+ Prime Editors **(PEs)**, employes Cas9 nickase fused to an engineered reverse transcriptase template **(RTT, a wild-type Moloney Murine Leukemia Virus (M-MLV) for PE1 and mutagenised M-MLV in PE2 systems for enhanced DNA-RNA affinity, enzyme processivity, and thermostability)** via a gRNA called prime editing guide RNA **(pegRNA), can do all 12 edits.** PEs use pegRNA consisting of a 20 nt guide sequence, a primer binding site **(PBS)** and an RTT. The guide directs the Cas enzyme to a target site, the PBS hybridizes to the opposite strand to prime the reverse transcriptase, and the RTT integrates the desired genomic alteration.
532
+
533
+ **Optimized** PE2 (by employing additional sgRNA to nick the unedited strand so that cell's natural repair system copies the information in the edited strand to the complementary strand, permanently installing the edit) called PE3 and PE3b with reduced off-targets are commonly used.
534
+
535
+
536
+ """
537
+ )
538
+ #PE-Analyzer finds cleavage sites and defines 15-nt indi- cator sequences on both sides of the given input reference sequence within a user-defined comparison range (R) pa- rameter. PE-Analyzer selects the sequences, including both indicator sequences with up to a 1 bp mismatch, from the uploaded NGS data. PE-Analyzer counts the number of identical sequences and excludes the sequences with a lower count than a minimum frequency (the default value is 1) be- cause such sequences are considered to include sequencing errors.
539
+ expander1 = st.expander("How it works")
540
+ expander1.markdown(
541
+ """
542
+ PEs use prime editing guide RNAs (pegRNAs) which is comprised of target sequence recognizing protospacer, RTT containing the desired edit, and a primer binding site for the activation of reverse transcriptase. While trafitional PE2 only requires a pegRNA, PE3 also requires a nicking guide RNA (ngRNA) for increased editing efficiency accompanying possible mutations derived from the presence of the ngRNA.
543
+ PE-Designer provides all possible:
544
+ - protospacer sequences
545
+ - 3′ extension sequences
546
+ - ngRNA sequences
547
+ - Potential off-target sites
548
+ """
549
+ )
550
+ expander2 = st.expander("References")
551
+
552
+ expander2.write("[PE Designer Web App](http://www.rgenome.net/pe-designer/)")
553
+ expander2.write("[PE Designer Paper](https://academic.oup.com/nar/article/49/W1/W499/6262559)")
554
+
555
+ expander3 = st.expander("Tool Options: All you can do with this tool")
556
+
557
+ expander3.write(
558
+ """
559
+ This tool can be run for different PAM sequences including **NGG**, NRG etc. We only provide results for NGG.
560
+ **As PEs can do all 12 edits, results on all possible 3-edits for a given single base edit are presented here**
561
+ **Input:** We use 40 nt sequence with base of interest lying at position 20 for both reference input seq and desired edited sequence.
562
+ - fasta files containing NT sequence (of the target and expected edited) are provided with the following format:
563
+ - Target Sequence
564
+ - Line1: >inp_seq 1
565
+ - Line 2: Upto 1000 NT sequence
566
+ - Desired edited Sequence
567
+ - Line1: >inp_seq 1
568
+ - Line 2: Upto 1000 NT sequence
569
+ **Output:** A csv file
570
+ - Columns of interes
571
+ - snp_ind
572
+ - inp_seq
573
+ - edited_seq
574
+ - Target Sequence predicted by PE-Designer
575
+ - Edit position
576
+ - Type (pegRNA or nCas9)
577
+ - Extension Sequence (for pegRNA)
578
+ - Traget Sequence (for nCas9)
579
+ """
580
+ )
581
+
582
+ #expander3.markdown(tips,unsafe_allow_html=True)
583
+ expander4 = st.expander("Scoring")
584
+ expander4.markdown(
585
+ """
586
+ This tool only reports potential off-targets alongwith number of mismatches.
587
+ """
588
+ )
589
+ st.markdown("**Please note that the tool was run for all three edits for a given base.**")
590
+ st.markdown(caution,unsafe_allow_html=True)
591
+ if method=='NGG':
592
+ target_seq = display_res(method,'\t','snp_id',select_method)
593
+ PE_Designer_Off=st.checkbox('Off-Targets')
594
+ if PE_Designer_Off:
595
+ display_res('offtargets_'+method,',','snp_id',select_method)
596
+ else:
597
+ st.markdown("**List coming soon**")
598
+
599
+
600
  #Pnbdesigner
601
  def Pnbdesigner(method,select_method):
602
  st.header("PnB Designer: "+method)
 
1081
  if data_snp.shape[0] > 0:
1082
  if select_method=='BE-DICT':
1083
  return data_snp['Outp_seq']
1084
+ elif select_method=='PnB Designer':
1085
  return data_snp['Protospacer']
1086
+ else:
1087
+ return [0]
1088
+
1089
  else:
1090
  return [0]
1091
 
 
1101
 
1102
 
1103
  st.title('Single Base Editiors')
1104
+ st.markdown('**Please select an option from the sidebar**')
1105
  expander = st.expander("NEW TOOLS CURRENTLY AVAILABLE/COMING SOON IN THE APP")
1106
  #st.header('How to use this app')
1107
  expander.markdown(
1108
  """
1109
+ **NEW: PLEASE NOTE THAT**
1110
+ - **[FORECasT-BE](https://partslab.sanger.ac.uk/FORECasT-BE) is now part of the App to predict guide efficiency for ABEs and CBEs**
1111
+ - ***It can only be invoked from the local version of the app, Please download the app and run your local machine to use this feature.***
1112
+ - **Available under BE-DICT and PnB Designer options**
1113
+ - **Another Prime Editing tool [PE-Designer](http://www.rgenome.net/be-designer/) is also part of the app**
1114
  **Coming Soon.**
1115
  - **We are also testing a prime editing efficiency calculator [MinsePIE](https://github.com/julianeweller/MinsePIE) and will be available soon**
 
1116
  """
1117
  )
1118
 
1119
+
1120
  st.sidebar.image("logo-card-white.png", use_column_width=True)
1121
  #ReadMe = st.sidebar.radio('ReadME',value=True)
1122
 
 
1393
  "Please select an option",
1394
  ('30bp_cpf1', '30bp_NGG','40bp_cpf1', '40bp_NGG','50bp_cpf1', '50bp_NGG'))
1395
 
1396
+ PE_DESIGNER1 = st.sidebar.checkbox('PE-Designer',key=5)
1397
+ if PE_DESIGNER1:
1398
+ select_method_PE_DESIGNER='PE-Designer'
1399
+ method_PE_DESIGNER = st.sidebar.radio(
1400
+ "Please select an option",
1401
+ ('NGG','NRG'))
1402
+
1403
+
1404
+ PnBDesigner = st.sidebar.checkbox('PnB Designer',key=6)
1405
  if PnBDesigner:
1406
  select_method_PnBDesigner='PnB Designer'
1407
  method_PnBDesigner = st.sidebar.radio(
1408
  "Please select an option",
1409
  ('Base_editing_guides', 'Nicking_guides_PE3_PE3b','pegRNA_oligos'))
1410
 
1411
+ SNPCRISPR = st.sidebar.checkbox('SNP_CRISPR',key=7)
1412
  if SNPCRISPR:
1413
  select_method_SNPCRISPR='SNP_CRISPR'
1414
  method_SNPCRISPR = st.sidebar.radio(
 
1426
  if GuideScan2 and select_method_GuideScan2 == "GuideScan2":
1427
  Guidescan2(method_GuideScan2,select_method_GuideScan2)
1428
 
1429
+ if PE_DESIGNER1 and select_method_PE_DESIGNER == "PE-Designer":
1430
+ PE_DESIGNER(method_PE_DESIGNER,select_method_PE_DESIGNER)
1431
+
1432
  if PnBDesigner and select_method_PnBDesigner=='PnB Designer':
1433
  Pnbdesigner(method_PnBDesigner,select_method_PnBDesigner)
1434
 
data/.DS_Store CHANGED
Binary files a/data/.DS_Store and b/data/.DS_Store differ
 
data/PE-Designer/.DS_Store ADDED
Binary file (6.15 kB). View file
 
data/PE-Designer/PE-Designer_NGG.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d613ed053a2ce392c8f9362e146ee8fb4581320945affbd013f112b106b07980
3
+ size 12209007
data/PE-Designer/PE-Designer_offtargets_NGG.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d6d0380b5d042c580aacaf074698d9809388385e409f589218babab56575837
3
+ size 153810851
data/pytest1.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import forecast_be
2
+ forecast_be.predict_batch_fasta('rs510205_bystander_ABE8e_mean_BE-DICT.fasta',editor='ABE',output_path='rs510205_bystander_ABE8e_mean_BE-DICT.fasta_ABE.csv',mean=None,std=None)