RNApolis 0.3.16__tar.gz → 0.3.17__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. {rnapolis-0.3.16/src/RNApolis.egg-info → rnapolis-0.3.17}/PKG-INFO +1 -1
  2. {rnapolis-0.3.16 → rnapolis-0.3.17}/setup.py +1 -1
  3. {rnapolis-0.3.16 → rnapolis-0.3.17/src/RNApolis.egg-info}/PKG-INFO +1 -1
  4. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/metareader.py +11 -0
  5. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/parser.py +1 -1
  6. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_parser.py +7 -0
  7. {rnapolis-0.3.16 → rnapolis-0.3.17}/LICENSE +0 -0
  8. {rnapolis-0.3.16 → rnapolis-0.3.17}/README.md +0 -0
  9. {rnapolis-0.3.16 → rnapolis-0.3.17}/pyproject.toml +0 -0
  10. {rnapolis-0.3.16 → rnapolis-0.3.17}/setup.cfg +0 -0
  11. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/RNApolis.egg-info/SOURCES.txt +0 -0
  12. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/RNApolis.egg-info/dependency_links.txt +0 -0
  13. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/RNApolis.egg-info/entry_points.txt +0 -0
  14. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/RNApolis.egg-info/requires.txt +0 -0
  15. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/RNApolis.egg-info/top_level.txt +0 -0
  16. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/annotator.py +0 -0
  17. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/clashfinder.py +0 -0
  18. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/common.py +0 -0
  19. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/molecule_filter.py +0 -0
  20. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/motif_extractor.py +0 -0
  21. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/rfam_folder.py +0 -0
  22. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/tertiary.py +0 -0
  23. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/transformer.py +0 -0
  24. {rnapolis-0.3.16 → rnapolis-0.3.17}/src/rnapolis/util.py +0 -0
  25. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_annotator.py +0 -0
  26. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_bugfixes.py +0 -0
  27. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_common.py +0 -0
  28. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_metareader.py +0 -0
  29. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_quadruplexes.py +0 -0
  30. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_rfam_folder.py +0 -0
  31. {rnapolis-0.3.16 → rnapolis-0.3.17}/tests/test_tertiary.py +0 -0
@@ -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
@@ -5,7 +5,7 @@ with open("README.md") as f:
5
5
 
6
6
  setup(
7
7
  name="RNApolis",
8
- version="0.3.16",
8
+ version="0.3.17",
9
9
  packages=["rnapolis"],
10
10
  package_dir={"": "src"},
11
11
  author="Tomasz Zok",
@@ -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
@@ -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()
@@ -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
@@ -9,3 +9,10 @@ def test_nucleic_acid_only():
9
9
  with open("tests/184D.cif") as f:
10
10
  structure3d = read_3d_structure(f, 1, nucleic_acid_only=True)
11
11
  assert len(structure3d.residues) == 14
12
+
13
+
14
+ def test_1ato():
15
+ with open("tests/1ATO.pdb") as f:
16
+ structure3d = read_3d_structure(f)
17
+ sequence = "".join([residue.one_letter_name for residue in structure3d.residues])
18
+ assert sequence == "GGCACCUCCUCGCGGUGCC"
File without changes
File without changes
File without changes
File without changes