jie1 commited on
Commit
8c122e9
1 Parent(s): c61bca2

Update Preinput_Merge.py

Browse files
Files changed (1) hide show
  1. Preinput_Merge.py +4 -10
Preinput_Merge.py CHANGED
@@ -1,10 +1,8 @@
1
- import streamlit as st
2
  from tname import *
3
-
4
 
5
  def Strip(seq_file):
6
- with open(seq_file.name, "r") as f:
7
- contents = f.readlines()
8
  ina = Name()
9
  ina = ina + r"input.tsv" # 结果文件名称
10
 
@@ -24,13 +22,11 @@ def Strip(seq_file):
24
 
25
 
26
  def Merge(smi_file, seq_file):
27
- with open(smi_file.name, "r") as f1:
28
- smile = f1.readline()
29
  smile = smile.strip("\n")
30
 
31
  # 读取去掉空格后的文件
32
- with open(seq_file.name, "r") as f:
33
- contents = f.readlines()
34
 
35
  name = Name()
36
  name = name + r"kcat_input.tsv" # 结果文件名称
@@ -43,8 +39,6 @@ def Merge(smi_file, seq_file):
43
  if i % 2 == 1:
44
  with open(name, "a") as f3:
45
  # 写入索引
46
- # content = contents[i - 1].split()
47
- # f3.write(content[0])
48
  f3.write(">seq" + str(int((i - 1) / 2)))
49
  f3.write("\t")
50
  # 写入smile名称
 
 
1
  from tname import *
2
+ from Rfile import *
3
 
4
  def Strip(seq_file):
5
+ contents = j_reads(seq_file.name)
 
6
  ina = Name()
7
  ina = ina + r"input.tsv" # 结果文件名称
8
 
 
22
 
23
 
24
  def Merge(smi_file, seq_file):
25
+ smile = j_read(smi_file.name)
 
26
  smile = smile.strip("\n")
27
 
28
  # 读取去掉空格后的文件
29
+ contents = j_reads(seq_file.name)
 
30
 
31
  name = Name()
32
  name = name + r"kcat_input.tsv" # 结果文件名称
 
39
  if i % 2 == 1:
40
  with open(name, "a") as f3:
41
  # 写入索引
 
 
42
  f3.write(">seq" + str(int((i - 1) / 2)))
43
  f3.write("\t")
44
  # 写入smile名称