RNApolis 0.3.16__py3-none-any.whl → 0.3.17__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RNApolis
3
- Version: 0.3.16
3
+ Version: 0.3.17
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
@@ -1,17 +1,17 @@
1
1
  rnapolis/annotator.py,sha256=XnjFBeu3P_2UMdkD4Ao7m7K6JfeqYa-13xRzghrLvt8,22086
2
2
  rnapolis/clashfinder.py,sha256=jD3s_UovygWi01NUbQNeAeRRFkARTSRraLXUV43UbAA,8514
3
3
  rnapolis/common.py,sha256=tbmKV64nLClmzNN0HyKnvWA0-5aSyf4x8CGpBjpIJ4M,30290
4
- rnapolis/metareader.py,sha256=4qtMKRvww2sUStLeV8WVrLEt-ScydHUv4Gxx96tnf-M,1683
4
+ rnapolis/metareader.py,sha256=9HZIrpPsmmWkEUeSeKAeG1sstfqbBDKUw5QPsn5cshw,2072
5
5
  rnapolis/molecule_filter.py,sha256=NhjuqdCRnXgPefWZPeTq77tifmnAzamQtA0ODqPPG9k,6918
6
6
  rnapolis/motif_extractor.py,sha256=duHvpi9Ulcny9K60E6VBpz5RpJZw-KdTB4_Ph0iP478,774
7
- rnapolis/parser.py,sha256=6xEeQghil0eXIzi0bNUkebknfqIxx9EfOfT9q33eN4A,12666
7
+ rnapolis/parser.py,sha256=nHRXcoKbzfMJuDMJO-8MSPkzfmD-788ZzgcfjLQpgFs,12666
8
8
  rnapolis/rfam_folder.py,sha256=3rgXEJR16uPFy_BOo8qkdClOAOQDVOkidnLE-yoRbeI,11112
9
9
  rnapolis/tertiary.py,sha256=VuATTN2SD7lBL9iUgT-doDwuEYsLodgV2u-SwQsyQcU,19658
10
10
  rnapolis/transformer.py,sha256=V9nOQvdq4-p7yUWo0vQg0CDQMpmyxz9t4TMSRVEKHnw,1817
11
11
  rnapolis/util.py,sha256=IdquFO3PV1_KDqodjupzm0Rqvgy0CeSzxGHaGEHYXVU,543
12
- RNApolis-0.3.16.dist-info/LICENSE,sha256=ZGRu12MzCgbYA-Lt8MyBlmjvPZh7xfiD5u5wBx0enq4,1066
13
- RNApolis-0.3.16.dist-info/METADATA,sha256=k4D9WCUq94R1lGhWmYJqTjfh9ww8RPRjxg_IOHiPEcg,54301
14
- RNApolis-0.3.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
15
- RNApolis-0.3.16.dist-info/entry_points.txt,sha256=foN2Pn5e-OzEz0fFmNoX6PnFSZFQntOlY8LbognP5F0,308
16
- RNApolis-0.3.16.dist-info/top_level.txt,sha256=LcO18koxZcWoJ21KDRRRo_tyIbmXL5z61dPitZpy8yc,9
17
- RNApolis-0.3.16.dist-info/RECORD,,
12
+ RNApolis-0.3.17.dist-info/LICENSE,sha256=ZGRu12MzCgbYA-Lt8MyBlmjvPZh7xfiD5u5wBx0enq4,1066
13
+ RNApolis-0.3.17.dist-info/METADATA,sha256=2h_8NfBq0uKpgXC-CYsvB1O1hglxTGyZHfGfJmsKrmI,54301
14
+ RNApolis-0.3.17.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
15
+ RNApolis-0.3.17.dist-info/entry_points.txt,sha256=foN2Pn5e-OzEz0fFmNoX6PnFSZFQntOlY8LbognP5F0,308
16
+ RNApolis-0.3.17.dist-info/top_level.txt,sha256=LcO18koxZcWoJ21KDRRRo_tyIbmXL5z61dPitZpy8yc,9
17
+ RNApolis-0.3.17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
rnapolis/metareader.py CHANGED
@@ -3,6 +3,7 @@ import argparse
3
3
  from typing import IO, Dict, List
4
4
 
5
5
  import orjson
6
+ import pandas as pd
6
7
  from mmcif.io.IoAdapterPy import IoAdapterPy
7
8
  from mmcif.io.PdbxReader import DataContainer
8
9
 
@@ -46,6 +47,10 @@ def main():
46
47
  help="read the mmCIF file and list categories available inside",
47
48
  action="store_true",
48
49
  )
50
+ parser.add_argument(
51
+ "--csv-directory",
52
+ help="directory where to output CSV per each category",
53
+ )
49
54
  args = parser.parse_args()
50
55
 
51
56
  file = handle_input_file(args.path)
@@ -57,6 +62,12 @@ def main():
57
62
  result = read_metadata(file, args.category)
58
63
  print(orjson.dumps(result).decode("utf-8"))
59
64
 
65
+ if args.csv_directory:
66
+ for category in result:
67
+ with open(f"{args.csv_directory}/{category}.csv", "w") as f:
68
+ df = pd.DataFrame(result[category])
69
+ df.to_csv(f, index=False)
70
+
60
71
 
61
72
  if __name__ == "__main__":
62
73
  main()
rnapolis/parser.py CHANGED
@@ -212,7 +212,7 @@ def parse_pdb(
212
212
  if alternate_location != " ":
213
213
  continue
214
214
  atom_name = line[12:16].strip()
215
- residue_name = line[18:20].strip()
215
+ residue_name = line[17:20].strip()
216
216
  chain_identifier = line[21]
217
217
  residue_number = int(line[22:26].strip())
218
218
  insertion_code = line[26] if line[26] != " " else None