varsim 1.0.4__py3-none-any.whl → 1.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
varsim/__init__.py CHANGED
@@ -2,7 +2,12 @@ import os
2
2
 
3
3
  from Bio import Entrez, SeqIO
4
4
  from Bio.Data.CodonTable import standard_dna_table
5
- from Bio.Data.IUPACData import (unambiguous_dna_letters, protein_letters, protein_letters_1to3, protein_letters_3to1, )
5
+ from Bio.Data.IUPACData import (
6
+ unambiguous_dna_letters,
7
+ protein_letters,
8
+ protein_letters_1to3,
9
+ protein_letters_3to1,
10
+ )
6
11
  from Bio.Seq import Seq
7
12
  from Bio.SeqFeature import SimpleLocation
8
13
  from Bio.SeqUtils import seq3
@@ -14,9 +19,14 @@ codons = standard_dna_table.forward_table.keys()
14
19
 
15
20
  def cds(gene: str) -> list:
16
21
  variants = []
17
- stream = Entrez.esearch(db="nucleotide", term=f'{gene}[Gene Name] "mane select"[Keyword]', )
22
+ stream = Entrez.esearch(
23
+ db="nucleotide",
24
+ term=f'{gene}[Gene Name] "mane select"[Keyword]',
25
+ )
18
26
  record = Entrez.read(stream)
19
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
27
+ stream = Entrez.efetch(
28
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
29
+ )
20
30
  seqrecord = SeqIO.read(stream, "genbank")
21
31
  for feature in seqrecord.features:
22
32
  if feature.type == "CDS":
@@ -26,43 +36,72 @@ def cds(gene: str) -> list:
26
36
  for index, codon in enumerate(range(0, len(cds) - 3, 3)):
27
37
  for base in unambiguous_dna_letters:
28
38
  if base != cds[codon]:
29
- seq = Seq(base) + cds[codon + 1: codon + 3]
39
+ seq = Seq(base) + cds[codon + 1 : codon + 3]
30
40
  if protein[index] != seq.translate():
31
- variants.append((f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base}",
32
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
33
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
41
+ variants.append(
42
+ (
43
+ f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base}",
44
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
45
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
46
+ )
47
+ )
34
48
  else:
35
- variants.append((f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base}",
36
- f"{protein_id}:p.{protein[index]}{index + 1}=",
37
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
49
+ variants.append(
50
+ (
51
+ f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base}",
52
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
53
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
54
+ )
55
+ )
38
56
  if base != cds[codon + 1]:
39
57
  seq = cds[codon] + Seq(base) + cds[codon + 2]
40
58
  if protein[index] != seq.translate():
41
- variants.append((f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base}",
42
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
43
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
59
+ variants.append(
60
+ (
61
+ f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base}",
62
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
63
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
64
+ )
65
+ )
44
66
  else:
45
- variants.append((f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base}",
46
- f"{protein_id}:p.{protein[index]}{index + 1}=",
47
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
67
+ variants.append(
68
+ (
69
+ f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base}",
70
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
71
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
72
+ )
73
+ )
48
74
  if base != cds[codon + 2]:
49
- seq = cds[codon: codon + 2] + Seq(base)
75
+ seq = cds[codon : codon + 2] + Seq(base)
50
76
  if protein[index] != seq.translate():
51
- variants.append((f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base}",
52
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
53
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
77
+ variants.append(
78
+ (
79
+ f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base}",
80
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
81
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
82
+ )
83
+ )
54
84
  else:
55
- variants.append((f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base}",
56
- f"{protein_id}:p.{protein[index]}{index + 1}=",
57
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
85
+ variants.append(
86
+ (
87
+ f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base}",
88
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
89
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
90
+ )
91
+ )
58
92
  return variants
59
93
 
60
94
 
61
95
  def utr5(gene: str) -> list:
62
96
  variants = []
63
- stream = Entrez.esearch(db="nucleotide", term=f'{gene}[Gene Name] "mane select"[Keyword]', )
97
+ stream = Entrez.esearch(
98
+ db="nucleotide",
99
+ term=f'{gene}[Gene Name] "mane select"[Keyword]',
100
+ )
64
101
  record = Entrez.read(stream)
65
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
102
+ stream = Entrez.efetch(
103
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
104
+ )
66
105
  seqrecord = SeqIO.read(stream, "genbank")
67
106
  for feature in seqrecord.features:
68
107
  if feature.type == "CDS":
@@ -70,33 +109,58 @@ def utr5(gene: str) -> list:
70
109
  for index in range(len(utr5)):
71
110
  for base in unambiguous_dna_letters:
72
111
  if base != utr5[index]:
73
- variants.append((f"{seqrecord.id}:c.{index - len(utr5)}{utr5[index]}>{base}", "", "",))
112
+ variants.append(
113
+ (
114
+ f"{seqrecord.id}:c.{index - len(utr5)}{utr5[index]}>{base}",
115
+ "",
116
+ "",
117
+ )
118
+ )
74
119
  return variants
75
120
 
76
121
 
77
122
  def utr3(gene: str) -> list:
78
123
  variants = []
79
- stream = Entrez.esearch(db="nucleotide", term=f'{gene}[Gene Name] "mane select"[Keyword]', )
124
+ stream = Entrez.esearch(
125
+ db="nucleotide",
126
+ term=f'{gene}[Gene Name] "mane select"[Keyword]',
127
+ )
80
128
  record = Entrez.read(stream)
81
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
129
+ stream = Entrez.efetch(
130
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
131
+ )
82
132
  seqrecord = SeqIO.read(stream, "genbank")
83
133
  for feature in seqrecord.features:
84
134
  if feature.type == "CDS":
85
- utr3 = (SimpleLocation(feature.location.end, len(seqrecord)).extract(seqrecord).seq)
135
+ utr3 = (
136
+ SimpleLocation(feature.location.end, len(seqrecord))
137
+ .extract(seqrecord)
138
+ .seq
139
+ )
86
140
  for index in range(len(utr3)):
87
141
  for base in unambiguous_dna_letters:
88
142
  if base != utr3[index]:
89
- variants.append((f"{seqrecord.id}:c.*{index + 1}{utr3[index]}>{base}", "", "",))
143
+ variants.append(
144
+ (
145
+ f"{seqrecord.id}:c.*{index + 1}{utr3[index]}>{base}",
146
+ "",
147
+ "",
148
+ )
149
+ )
90
150
  return variants
91
151
 
92
152
 
93
153
  def splicing(gene: str) -> list:
94
154
  variants = []
95
155
  exon = []
96
- stream = Entrez.esearch(db="nucleotide", term=f'{gene}[Gene Name] "mane select"[Keyword]')
156
+ stream = Entrez.esearch(
157
+ db="nucleotide", term=f'{gene}[Gene Name] "mane select"[Keyword]'
158
+ )
97
159
  record = Entrez.read(stream)
98
160
 
99
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
161
+ stream = Entrez.efetch(
162
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
163
+ )
100
164
  seqrecord = SeqIO.read(stream, "genbank")
101
165
  splicing = []
102
166
  variants = []
@@ -109,11 +173,20 @@ def splicing(gene: str) -> list:
109
173
  for feature in seqrecord.features:
110
174
  if feature.type == "exon":
111
175
  if feature.location.start < start and feature.location.end < start:
112
- splicing.extend((feature.location.start - start - 1, feature.location.end - start - 1,))
176
+ splicing.extend(
177
+ (
178
+ feature.location.start - start - 1,
179
+ feature.location.end - start - 1,
180
+ )
181
+ )
113
182
  elif feature.location.start < start and feature.location.end > start:
114
- splicing.extend((feature.location.start - start - 1, feature.location.end - start))
183
+ splicing.extend(
184
+ (feature.location.start - start - 1, feature.location.end - start)
185
+ )
115
186
  else:
116
- splicing.extend((feature.location.start - start, feature.location.end - start))
187
+ splicing.extend(
188
+ (feature.location.start - start, feature.location.end - start)
189
+ )
117
190
 
118
191
  for coordinate in range(1, len(splicing) - 1, 2):
119
192
  site = splicing[coordinate], splicing[coordinate] + 1
@@ -135,13 +208,19 @@ def aa_sub(gene: str) -> list:
135
208
  stream = Entrez.esearch(db="protein", term=term)
136
209
  record = Entrez.read(stream)
137
210
 
138
- stream = Entrez.efetch(db="protein", rettype="gp", retmode="text", id=record["IdList"])
211
+ stream = Entrez.efetch(
212
+ db="protein", rettype="gp", retmode="text", id=record["IdList"]
213
+ )
139
214
  seqrecord = SeqIO.read(stream, "genbank")
140
215
  for index, residue in enumerate(seqrecord.seq, 1):
141
216
  for aa in protein_letters:
142
217
  if aa != residue:
143
- variants.append((f"{seqrecord.id}:p.{residue}{index}{aa}",
144
- f"{seqrecord.id}:p.{protein_letters_1to3[residue]}{index}{protein_letters_1to3[aa]}",))
218
+ variants.append(
219
+ (
220
+ f"{seqrecord.id}:p.{residue}{index}{aa}",
221
+ f"{seqrecord.id}:p.{protein_letters_1to3[residue]}{index}{protein_letters_1to3[aa]}",
222
+ )
223
+ )
145
224
  return variants
146
225
 
147
226
 
@@ -150,7 +229,9 @@ def missense(gene: str) -> list:
150
229
  term = f'{gene}[Gene Name] "mane select"[keyword]'
151
230
  stream = Entrez.esearch(db="nucleotide", term=term)
152
231
  record = Entrez.read(stream)
153
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
232
+ stream = Entrez.efetch(
233
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
234
+ )
154
235
  seqrecord = SeqIO.read(stream, "genbank")
155
236
  for feature in seqrecord.features:
156
237
  if feature.type == "CDS":
@@ -159,42 +240,98 @@ def missense(gene: str) -> list:
159
240
  cds = feature.location.extract(seqrecord).seq
160
241
  for index, codon in enumerate(range(0, len(cds) - 3, 3)):
161
242
  for base in codons:
162
- if base != cds[codon: codon + 3]:
243
+ if base != cds[codon : codon + 3]:
163
244
  seq = Seq(base)
164
245
  if protein[index] != seq.translate():
165
- if (base[0] == cds[codon] and base[1] == cds[codon + 1] and base[2] != cds[codon + 2]):
166
- variants.append((f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base[2]}",
167
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
168
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
169
- elif (base[0] == cds[codon] and base[1] != cds[codon + 1] and base[2] == cds[codon + 2]):
170
- variants.append((f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base[1]}",
171
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
172
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
173
- elif (base[0] != cds[codon] and base[1] == cds[codon + 1] and base[2] == cds[codon + 2]):
174
- variants.append((f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base[0]}",
175
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
176
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
246
+ if (
247
+ base[0] == cds[codon]
248
+ and base[1] == cds[codon + 1]
249
+ and base[2] != cds[codon + 2]
250
+ ):
251
+ variants.append(
252
+ (
253
+ f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base[2]}",
254
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
255
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
256
+ )
257
+ )
258
+ elif (
259
+ base[0] == cds[codon]
260
+ and base[1] != cds[codon + 1]
261
+ and base[2] == cds[codon + 2]
262
+ ):
263
+ variants.append(
264
+ (
265
+ f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base[1]}",
266
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
267
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
268
+ )
269
+ )
270
+ elif (
271
+ base[0] != cds[codon]
272
+ and base[1] == cds[codon + 1]
273
+ and base[2] == cds[codon + 2]
274
+ ):
275
+ variants.append(
276
+ (
277
+ f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base[0]}",
278
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
279
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
280
+ )
281
+ )
177
282
  else:
178
- variants.append((f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}>{base}",
179
- f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
180
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",))
283
+ variants.append(
284
+ (
285
+ f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}>{base}",
286
+ f"{protein_id}:p.{protein[index]}{index + 1}{seq.translate()}",
287
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}{seq3(seq.translate())}",
288
+ )
289
+ )
181
290
  else:
182
- if (base[0] == cds[codon] and base[1] == cds[codon + 1] and base[2] != cds[codon + 2]):
183
- variants.append((f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base[2]}",
184
- f"{protein_id}:p.{protein[index]}{index + 1}=",
185
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
186
- elif (base[0] == cds[codon] and base[1] != cds[codon + 1] and base[2] == cds[codon + 2]):
187
- variants.append((f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base[1]}",
188
- f"{protein_id}:p.{protein[index]}{index + 1}=",
189
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
190
- elif (base[0] != cds[codon] and base[1] == cds[codon + 1] and base[2] == cds[codon + 2]):
191
- variants.append((f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base[0]}",
192
- f"{protein_id}:p.{protein[index]}{index + 1}=",
193
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
291
+ if (
292
+ base[0] == cds[codon]
293
+ and base[1] == cds[codon + 1]
294
+ and base[2] != cds[codon + 2]
295
+ ):
296
+ variants.append(
297
+ (
298
+ f"{seqrecord.id}:c.{codon + 3}{cds[codon + 2]}>{base[2]}",
299
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
300
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
301
+ )
302
+ )
303
+ elif (
304
+ base[0] == cds[codon]
305
+ and base[1] != cds[codon + 1]
306
+ and base[2] == cds[codon + 2]
307
+ ):
308
+ variants.append(
309
+ (
310
+ f"{seqrecord.id}:c.{codon + 2}{cds[codon + 1]}>{base[1]}",
311
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
312
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
313
+ )
314
+ )
315
+ elif (
316
+ base[0] != cds[codon]
317
+ and base[1] == cds[codon + 1]
318
+ and base[2] == cds[codon + 2]
319
+ ):
320
+ variants.append(
321
+ (
322
+ f"{seqrecord.id}:c.{codon + 1}{cds[codon]}>{base[0]}",
323
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
324
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
325
+ )
326
+ )
194
327
  else:
195
- variants.append((f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}>{base}",
196
- f"{protein_id}:p.{protein[index]}{index + 1}=",
197
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",))
328
+ variants.append(
329
+ (
330
+ f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}>{base}",
331
+ f"{protein_id}:p.{protein[index]}{index + 1}=",
332
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}=",
333
+ )
334
+ )
198
335
  return variants
199
336
 
200
337
 
@@ -203,7 +340,9 @@ def inframe_del(gene: str) -> list:
203
340
  term = f'{gene}[Gene Name] "mane select"[keyword]'
204
341
  stream = Entrez.esearch(db="nucleotide", term=term)
205
342
  record = Entrez.read(stream)
206
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
343
+ stream = Entrez.efetch(
344
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
345
+ )
207
346
  seqrecord = SeqIO.read(stream, "genbank")
208
347
  for feature in seqrecord.features:
209
348
  if feature.type == "CDS":
@@ -211,9 +350,13 @@ def inframe_del(gene: str) -> list:
211
350
  protein_id = "".join(feature.qualifiers.get("protein_id"))
212
351
  cds = feature.location.extract(seqrecord).seq
213
352
  for index, codon in enumerate(range(0, len(cds) - 3, 3)):
214
- variants.append((f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}del",
215
- f"{protein_id}:p.{protein[index]}{index + 1}del",
216
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}del",))
353
+ variants.append(
354
+ (
355
+ f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}del",
356
+ f"{protein_id}:p.{protein[index]}{index + 1}del",
357
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}del",
358
+ )
359
+ )
217
360
  return variants
218
361
 
219
362
 
@@ -222,7 +365,9 @@ def inframe_dup(gene: str) -> list:
222
365
  term = f'{gene}[Gene Name] "mane select"[keyword]'
223
366
  stream = Entrez.esearch(db="nucleotide", term=term)
224
367
  record = Entrez.read(stream)
225
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
368
+ stream = Entrez.efetch(
369
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
370
+ )
226
371
  seqrecord = SeqIO.read(stream, "genbank")
227
372
  for feature in seqrecord.features:
228
373
  if feature.type == "CDS":
@@ -230,9 +375,13 @@ def inframe_dup(gene: str) -> list:
230
375
  protein_id = "".join(feature.qualifiers.get("protein_id"))
231
376
  cds = feature.location.extract(seqrecord).seq
232
377
  for index, codon in enumerate(range(0, len(cds) - 3, 3)):
233
- variants.append((f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}dup",
234
- f"{protein_id}:p.{protein[index]}{index + 1}dup",
235
- f"{protein_id}:p.{seq3(protein[index])}{index + 1}dup",))
378
+ variants.append(
379
+ (
380
+ f"{seqrecord.id}:c.{codon + 1}_{codon + 3}{cds[codon:codon + 3]}dup",
381
+ f"{protein_id}:p.{protein[index]}{index + 1}dup",
382
+ f"{protein_id}:p.{seq3(protein[index])}{index + 1}dup",
383
+ )
384
+ )
236
385
  return variants
237
386
 
238
387
 
@@ -241,7 +390,9 @@ def frameshift_dup(gene: str) -> list:
241
390
  term = f'{gene}[Gene Name] "mane select"[keyword]'
242
391
  stream = Entrez.esearch(db="nucleotide", term=term)
243
392
  record = Entrez.read(stream)
244
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
393
+ stream = Entrez.efetch(
394
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
395
+ )
245
396
  seqrecord = SeqIO.read(stream, "genbank")
246
397
  for feature in seqrecord.features:
247
398
  if feature.type == "CDS":
@@ -256,7 +407,9 @@ def frameshift_del(gene: str) -> list:
256
407
  term = f'{gene}[Gene Name] "mane select"[keyword]'
257
408
  stream = Entrez.esearch(db="nucleotide", term=term)
258
409
  record = Entrez.read(stream)
259
- stream = Entrez.efetch(db="nucleotide", id=record["IdList"], rettype="gb", retmode="text")
410
+ stream = Entrez.efetch(
411
+ db="nucleotide", id=record["IdList"], rettype="gb", retmode="text"
412
+ )
260
413
  seqrecord = SeqIO.read(stream, "genbank")
261
414
  for feature in seqrecord.features:
262
415
  if feature.type == "CDS":
@@ -266,5 +419,15 @@ def frameshift_del(gene: str) -> list:
266
419
  return variants
267
420
 
268
421
 
269
- if __name__ == "__main__":
270
- print(frameshift_del("INS"))
422
+ __all__ = [
423
+ "frameshift_dup",
424
+ "frameshift_del",
425
+ "cds",
426
+ "inframe_dup",
427
+ "inframe_del",
428
+ "splicing",
429
+ "utr5",
430
+ "utr3",
431
+ "aa_sub",
432
+ "missense",
433
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: varsim
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: Variant Simulator
5
5
  Author-email: Liu Sun <sunliu@yxnu.edu.cn>, Jian Yang <yangjian@yxnu.edu.cn>
6
6
  Project-URL: Homepage, https://github.com/liu-sun/VarSim
@@ -0,0 +1,6 @@
1
+ varsim/__init__.py,sha256=r2jXdCqlbLaJsNGXum0B9hBoX0gpGMNQ_aIqt2GyXr8,17714
2
+ varsim-1.0.5.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
3
+ varsim-1.0.5.dist-info/METADATA,sha256=8Uo9_Gn2Pg3Mkct-ZC7oJ9la2ZfddqvduepCUwnorPA,2464
4
+ varsim-1.0.5.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
5
+ varsim-1.0.5.dist-info/top_level.txt,sha256=2fLprhnBvkF-7VEOzGcpKoodqW08HjyNbVzM6emJrTI,7
6
+ varsim-1.0.5.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- varsim/__init__.py,sha256=pZL4Wz3LJBoYvBdbNXByTx6qtCSkHqzBbR2dBWl7E60,14702
2
- varsim-1.0.4.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
3
- varsim-1.0.4.dist-info/METADATA,sha256=4W43kr56JnS5Jpw-U6E_wDEpepZYSYnojsdV_YgI-1M,2464
4
- varsim-1.0.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
5
- varsim-1.0.4.dist-info/top_level.txt,sha256=2fLprhnBvkF-7VEOzGcpKoodqW08HjyNbVzM6emJrTI,7
6
- varsim-1.0.4.dist-info/RECORD,,
File without changes