RNApolis 0.4.13__py3-none-any.whl → 0.4.14__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RNApolis
3
- Version: 0.4.13
3
+ Version: 0.4.14
4
4
  Summary: A Python library containing RNA-related bioinformatics functions and classes
5
5
  Home-page: https://github.com/tzok/rnapolis-py
6
6
  Author: Tomasz Zok
@@ -2,16 +2,16 @@ rnapolis/annotator.py,sha256=_hsSX2VHFvIQ47l_EA7lwGFXLiVLbhFPEsOQzBKbjRk,22100
2
2
  rnapolis/clashfinder.py,sha256=i95kp0o6OWNqmJDBr-PbsZd7RY2iJtBDr7QqolJSuAQ,8513
3
3
  rnapolis/common.py,sha256=LY6Uz96Br8ki_gA8LpfatgtvVbt9jOTkwgagayqTgf8,31251
4
4
  rnapolis/metareader.py,sha256=I1-cXc2YNBPwa3zihAnMTjEsAo79tEKzSmWu5yvN1Pk,2071
5
- rnapolis/molecule_filter.py,sha256=1TDEIy2rgWXXqXxI21vjaElWExCFZlmCHWxwCfNehaM,9152
5
+ rnapolis/molecule_filter.py,sha256=_7zrF-AH56vXI4vhFtfaU9wr-X7aeOL6DsXbX6_9vPQ,9497
6
6
  rnapolis/motif_extractor.py,sha256=Lfn1iEkhkP9eZD3GPEWNAfy00QO7QPCc8wM_XS1ory8,1147
7
7
  rnapolis/parser.py,sha256=lHI6LyFbEEPdHOzbged1-Ov0tl6MpSungIPacip0Py0,15838
8
8
  rnapolis/rfam_folder.py,sha256=SjiiyML_T1__saruFwSMJEoQ7Y55GIU8ktS8ZUn5-fw,11111
9
9
  rnapolis/tertiary.py,sha256=6t9ZB4w33-5n_M3sns1RoFXCOTgVAgGH4WDNG5OG9Kg,23426
10
10
  rnapolis/transformer.py,sha256=aC0nBmHHJf5TyLvBIV57Jj3tlwpvHbPo347opfAOlQA,3844
11
11
  rnapolis/util.py,sha256=IdquFO3PV1_KDqodjupzm0Rqvgy0CeSzxGHaGEHYXVU,543
12
- RNApolis-0.4.13.dist-info/LICENSE,sha256=ZGRu12MzCgbYA-Lt8MyBlmjvPZh7xfiD5u5wBx0enq4,1066
13
- RNApolis-0.4.13.dist-info/METADATA,sha256=wzV8Xvo09Qv02NfCKaLTID2Sm9k07aKsSZzqVWaNwf8,54323
14
- RNApolis-0.4.13.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
15
- RNApolis-0.4.13.dist-info/entry_points.txt,sha256=foN2Pn5e-OzEz0fFmNoX6PnFSZFQntOlY8LbognP5F0,308
16
- RNApolis-0.4.13.dist-info/top_level.txt,sha256=LcO18koxZcWoJ21KDRRRo_tyIbmXL5z61dPitZpy8yc,9
17
- RNApolis-0.4.13.dist-info/RECORD,,
12
+ RNApolis-0.4.14.dist-info/LICENSE,sha256=ZGRu12MzCgbYA-Lt8MyBlmjvPZh7xfiD5u5wBx0enq4,1066
13
+ RNApolis-0.4.14.dist-info/METADATA,sha256=MY6ulJgbaM4qJggOEswGUArvP0IsIMBX-zeoebjqjzk,54323
14
+ RNApolis-0.4.14.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
15
+ RNApolis-0.4.14.dist-info/entry_points.txt,sha256=foN2Pn5e-OzEz0fFmNoX6PnFSZFQntOlY8LbognP5F0,308
16
+ RNApolis-0.4.14.dist-info/top_level.txt,sha256=LcO18koxZcWoJ21KDRRRo_tyIbmXL5z61dPitZpy8yc,9
17
+ RNApolis-0.4.14.dist-info/RECORD,,
@@ -156,7 +156,9 @@ def select_category_by_id(
156
156
 
157
157
 
158
158
  def filter_by_poly_types(
159
- file_content: str, entity_poly_types: Iterable[str] = ["polyribonucleotide"]
159
+ file_content: str,
160
+ entity_poly_types: Iterable[str] = ["polyribonucleotide"],
161
+ retain_categories: Iterable[str] = [],
160
162
  ) -> str:
161
163
  adapter = IoAdapterPy()
162
164
 
@@ -187,13 +189,20 @@ def filter_by_poly_types(
187
189
  obj = DataCategory(category, attributes, rows)
188
190
  output.append(obj)
189
191
 
192
+ for category in retain_categories:
193
+ obj = data[0].getObj(category)
194
+ if obj:
195
+ output.append(obj)
196
+
190
197
  with tempfile.NamedTemporaryFile("rt+") as tmp:
191
198
  adapter.writeFile(tmp.name, [output])
192
199
  tmp.seek(0)
193
200
  return tmp.read()
194
201
 
195
202
 
196
- def filter_by_chains(file_content: str, chains: Iterable[str]) -> str:
203
+ def filter_by_chains(
204
+ file_content: str, chains: Iterable[str], retain_categories: Iterable[str] = []
205
+ ) -> str:
197
206
  """
198
207
  Filter a PDBx/mmCIF file by chain IDs. The function returns a new PDBx/mmCIF file.
199
208
 
@@ -228,6 +237,11 @@ def filter_by_chains(file_content: str, chains: Iterable[str]) -> str:
228
237
  obj = DataCategory(category, attributes, rows)
229
238
  output.append(obj)
230
239
 
240
+ for category in retain_categories:
241
+ obj = data[0].getObj(category)
242
+ if obj:
243
+ output.append(obj)
244
+
231
245
  with tempfile.NamedTemporaryFile("rt+") as tmp:
232
246
  adapter.writeFile(tmp.name, [output])
233
247
  tmp.seek(0)