SHEPHARD 0.2.2__tar.gz → 0.2.3__tar.gz

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.
Files changed (133) hide show
  1. shephard-0.2.3/CHANGELOG.md +193 -0
  2. shephard-0.2.3/CITATION.cff +48 -0
  3. shephard-0.2.3/MANIFEST.in +8 -0
  4. shephard-0.2.3/PKG-INFO +131 -0
  5. shephard-0.2.3/README.md +94 -0
  6. shephard-0.2.3/SHEPHARD.egg-info/PKG-INFO +131 -0
  7. {shephard-0.2.2 → shephard-0.2.3}/SHEPHARD.egg-info/SOURCES.txt +15 -3
  8. {shephard-0.2.2 → shephard-0.2.3}/SHEPHARD.egg-info/requires.txt +1 -0
  9. shephard-0.2.3/pyproject.toml +106 -0
  10. {shephard-0.2.2 → shephard-0.2.3}/setup.cfg +0 -8
  11. {shephard-0.2.2 → shephard-0.2.3}/shephard/.DS_Store +0 -0
  12. shephard-0.2.3/shephard/_version.py +1 -0
  13. {shephard-0.2.2 → shephard-0.2.3}/shephard/apis/albatross_api.py +50 -22
  14. {shephard-0.2.2 → shephard-0.2.3}/shephard/apis/fasta.py +27 -13
  15. {shephard-0.2.2 → shephard-0.2.3}/shephard/apis/metapredict_api.py +50 -25
  16. shephard-0.2.3/shephard/apis/uniprot.py +1899 -0
  17. {shephard-0.2.2 → shephard-0.2.3}/shephard/domain.py +19 -13
  18. {shephard-0.2.2 → shephard-0.2.3}/shephard/exceptions.py +21 -16
  19. {shephard-0.2.2 → shephard-0.2.3}/shephard/general_utilities.py +2 -2
  20. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/interface_tools.py +21 -8
  21. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/si_domains.py +58 -42
  22. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/si_protein_attributes.py +46 -22
  23. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/si_proteins.py +24 -15
  24. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/si_sites.py +53 -34
  25. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/si_tracks.py +112 -58
  26. {shephard-0.2.2 → shephard-0.2.3}/shephard/protein.py +43 -38
  27. {shephard-0.2.2 → shephard-0.2.3}/shephard/proteome.py +96 -25
  28. {shephard-0.2.2 → shephard-0.2.3}/shephard/site.py +12 -6
  29. shephard-0.2.3/shephard/tests/conftest.py +110 -0
  30. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/example_test_function.py +2 -2
  31. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/all_symbols_test.tsv +2 -2
  32. shephard-0.2.3/shephard/tests/output_test/all_values_test.tsv +9 -0
  33. shephard-0.2.3/shephard/tests/output_test/all_values_test_from_list.tsv +9 -0
  34. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/out_tracks.tsv +9 -9
  35. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/shephard_track_phosres.tsv +1 -1
  36. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/shephard_track_pscore.tsv +9 -9
  37. shephard-0.2.3/shephard/tests/output_test/test_domains.tsv +27 -0
  38. shephard-0.2.3/shephard/tests/output_test/test_domains_types.tsv +18 -0
  39. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/track_phospho_track.tsv +1 -1
  40. shephard-0.2.3/shephard/tests/output_test/track_random_vals.tsv +1 -0
  41. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_add_remove_annotations.py +9 -9
  42. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_api_albatross.py +8 -4
  43. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_api_metapredict.py +9 -9
  44. shephard-0.2.3/shephard/tests/test_api_uniprot_annotation.py +1066 -0
  45. shephard-0.2.3/shephard/tests/test_api_uniprot_live.py +127 -0
  46. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_apis_fasta.py +10 -10
  47. shephard-0.2.3/shephard/tests/test_bugfix_regressions.py +262 -0
  48. shephard-0.2.3/shephard/tests/test_bugfix_regressions_0_2_3.py +428 -0
  49. shephard-0.2.3/shephard/tests/test_comprehensive_apis.py +155 -0
  50. shephard-0.2.3/shephard/tests/test_comprehensive_domain.py +227 -0
  51. shephard-0.2.3/shephard/tests/test_comprehensive_interfaces.py +432 -0
  52. shephard-0.2.3/shephard/tests/test_comprehensive_protein.py +408 -0
  53. shephard-0.2.3/shephard/tests/test_comprehensive_proteome.py +356 -0
  54. shephard-0.2.3/shephard/tests/test_comprehensive_site.py +210 -0
  55. shephard-0.2.3/shephard/tests/test_comprehensive_tools.py +314 -0
  56. shephard-0.2.3/shephard/tests/test_comprehensive_track.py +220 -0
  57. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_domain_tools.py +2 -2
  58. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_domains.py +4 -4
  59. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_protein.py +1 -1
  60. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_protein_site_functions.py +8 -8
  61. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_proteome.py +5 -5
  62. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_si_domains.py +10 -10
  63. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_si_sites.py +15 -15
  64. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_si_tracks.py +23 -49
  65. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/attribute_tools.py +4 -4
  66. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/domain_tools.py +18 -10
  67. shephard-0.2.3/shephard/tools/experimental.py +155 -0
  68. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/sequence_tools.py +5 -2
  69. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/site_tools.py +12 -1
  70. {shephard-0.2.2 → shephard-0.2.3}/shephard/track.py +7 -7
  71. shephard-0.2.2/MANIFEST.in +0 -5
  72. shephard-0.2.2/PKG-INFO +0 -180
  73. shephard-0.2.2/README.md +0 -166
  74. shephard-0.2.2/SHEPHARD.egg-info/PKG-INFO +0 -180
  75. shephard-0.2.2/pyproject.toml +0 -61
  76. shephard-0.2.2/shephard/_version.py +0 -1
  77. shephard-0.2.2/shephard/apis/uniprot.py +0 -157
  78. shephard-0.2.2/shephard/data/test_data/tst.py +0 -19
  79. shephard-0.2.2/shephard/test_domains_sites.py +0 -21
  80. shephard-0.2.2/shephard/tests/conftest.py +0 -110
  81. shephard-0.2.2/shephard/tests/output_test/all_values_test.tsv +0 -9
  82. shephard-0.2.2/shephard/tests/output_test/all_values_test_from_list.tsv +0 -9
  83. shephard-0.2.2/shephard/tests/output_test/test_domains.tsv +0 -27
  84. shephard-0.2.2/shephard/tests/output_test/test_domains_types.tsv +0 -18
  85. shephard-0.2.2/shephard/tests/output_test/track_random_vals.tsv +0 -1
  86. shephard-0.2.2/shephard/tools/experimental.py +0 -74
  87. {shephard-0.2.2 → shephard-0.2.3}/LICENSE +0 -0
  88. {shephard-0.2.2 → shephard-0.2.3}/SHEPHARD.egg-info/dependency_links.txt +0 -0
  89. {shephard-0.2.2 → shephard-0.2.3}/SHEPHARD.egg-info/not-zip-safe +0 -0
  90. {shephard-0.2.2 → shephard-0.2.3}/SHEPHARD.egg-info/top_level.txt +0 -0
  91. {shephard-0.2.2 → shephard-0.2.3}/shephard/__init__.py +0 -0
  92. {shephard-0.2.2 → shephard-0.2.3}/shephard/apis/__init__.py +0 -0
  93. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/README.md +0 -0
  94. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/look_and_say.dat +0 -0
  95. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_domains_idr.tsv +0 -0
  96. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_domains_idr_and_others.tsv +0 -0
  97. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_domains_pscore.tsv +0 -0
  98. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_protein_attributes.tsv +0 -0
  99. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_protein_attributes_several.tsv +0 -0
  100. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_sites.tsv +0 -0
  101. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_small_proteins.tsv +0 -0
  102. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/TS1_tracks_pscore.tsv +0 -0
  103. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/names.txt +0 -0
  104. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/seqs.fasta +0 -0
  105. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/testset_1.fasta +0 -0
  106. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/testset_1.fasta.fai +0 -0
  107. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/testset_1_ptms.tsv +0 -0
  108. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/ts1_bonus_sites.tsv +0 -0
  109. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/ts1_bonus_sites_bad.tsv +0 -0
  110. {shephard-0.2.2 → shephard-0.2.3}/shephard/data/test_data/ts1_bonus_sites_bad2.tsv +0 -0
  111. {shephard-0.2.2 → shephard-0.2.3}/shephard/interfaces/__init__.py +0 -0
  112. /shephard-0.2.2/shephard/tests/test_logic.py → /shephard-0.2.3/shephard/py.typed +0 -0
  113. {shephard-0.2.2 → shephard-0.2.3}/shephard/sequence_utilities.py +0 -0
  114. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/.ipynb_checkpoints/test_scratchpad-checkpoint.ipynb +0 -0
  115. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/__init__.py +0 -0
  116. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/readme.md +0 -0
  117. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/output_test/test_sites.tsv +0 -0
  118. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_DomainInterface.py +0 -0
  119. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_ProteinAttributesInterface.py +0 -0
  120. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_ProteinInterface.py +0 -0
  121. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_SiteInterface.py +0 -0
  122. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_TrackInterface.py +0 -0
  123. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_attribute_tools.py +0 -0
  124. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_interfaces.py +0 -0
  125. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_scratchpad.ipynb +0 -0
  126. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_sequence_tools.py +0 -0
  127. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_shephard.py +0 -0
  128. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_sites.py +0 -0
  129. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_track_tools.py +0 -0
  130. {shephard-0.2.2 → shephard-0.2.3}/shephard/tests/test_tracks.py +0 -0
  131. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/__init__.py +0 -0
  132. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/attribute_tools.py~ +0 -0
  133. {shephard-0.2.2 → shephard-0.2.3}/shephard/tools/track_tools.py +0 -0
@@ -0,0 +1,193 @@
1
+ # Changelog
2
+
3
+ All notable changes to SHEPHARD are recorded here. Changes are tagged by type -
4
+ **BUG FIXES**, **NEW FEATURES**, **PERFORMANCE UPGRADES**, **PACKAGING / INSTALL & CI**,
5
+ **DOCUMENTATION**, **TESTS**, and **REFACTOR** - so it is easy to see at a glance
6
+ whether a release is likely to affect you.
7
+
8
+ SHEPHARD uses [semantic versioning](https://semver.org/) loosely: patch releases are
9
+ bug fixes, minor releases add functionality, and any change that breaks backwards
10
+ compatibility is called out explicitly at the top of the relevant entry.
11
+
12
+ #### Version 0.2.3 (May 2026)
13
+ * **BUG FIXES**:
14
+ * Fixed a typo in `proteome.py` (`s.position. s.site_type`) that raised an `AttributeError` when copying any `Protein` containing sites into a new `Proteome` (e.g. `Proteome(list_of_Protein_objects)` or `add_proteins()` with `Protein` objects).
15
+ * Fixed a broken type check in `track.py` (`elif(symbols, str):`, an always-true tuple) so symbols tracks are validated correctly and the invalid-input error path is reachable.
16
+ * Fixed an undefined-name error in `track.py` where a non-dict `attribute_dictionary` raised `NameError` instead of a `TrackException`.
17
+ * Fixed an undefined-name error in `Domain.site()` (`domain.start`/`domain.end`) that raised `NameError` instead of a `DomainException` for out-of-range positions.
18
+ * Fixed `interface_tools.is_comment_line()` raising an `IndexError` on blank lines; blank lines are now skipped, so all `si_*` file parsers tolerate blank lines.
19
+ * `tools.sequence_tools.build_mega_string()` now honors the `return_as_list` argument (previously ignored).
20
+ * `tools.site_tools.build_site_density_vector()` now honors the `append_leading_lagging` argument (previously ignored) and raises a clear `ShephardException` when `window_size` exceeds the protein length (previously an `IndexError`).
21
+ * `Proteome.add_proteins()` no longer raises an `IndexError` when passed an empty list.
22
+ * Copying proteins between Proteomes now keys off the track type rather than list truthiness, so an all-zero/empty values track is no longer miscopied as a symbols track.
23
+ * `Domain.site()` now raises a `DomainException` (instead of a raw `KeyError`) when no site exists at an in-range position.
24
+ * Cleaned up the `safe=False` skip path in the `si_sites`, `si_domains`, `si_proteins`, and `si_protein_attributes` interfaces so the `continue` is no longer nested under `if verbose:`.
25
+ * Fixed `Protein.convert_to_valid()`, which was effectively unusable: the internal indexing sentinel was counted in the length check so it *always* raised with the default `safe=True`, and with `copy=False` the cleaned sequence was never written back (silent no-op). It now operates on the user sequence and correctly mutates in place.
26
+ * Fixed `apis.fasta.shephard_fasta_to_proteome()` attribute parsing, which set each round-tripped attribute's value to a copy of its key and produced a spurious empty-string attribute. Attribute name/value round trips now work (and values containing `=` are preserved).
27
+ * Added the missing `random` and `site_tools` imports in `tools.experimental`; both public functions previously raised `NameError` on any call.
28
+ * `Site.remove_attribute()` now raises a `SiteException` instead of a `ProteinException`, consistent with the other annotation objects.
29
+ * `Site.get_track_value()` and `Site.get_track_symbol()` now return `None` (as documented) when the track is missing and `safe=False`, instead of raising a `TypeError` (`None[0]`).
30
+ * Fixed the error path in `Protein.remove_track()` which referenced a non-existent `self.protein` attribute, raising an `AttributeError` instead of the intended `ProteinException` when removing a Track that belongs to a different protein.
31
+ * `Track.attribute()` error message now correctly refers to the `Track` rather than a "protein" (copy-paste fix).
32
+ * `Proteome.__contains__()` now returns `False` (rather than implicitly `None`) when tested against an object that is neither a `str` nor a `Protein`, so `x in proteome` always evaluates to a bool.
33
+ * `Domain.get_track_values()` / `Domain.get_track_symbols()` now use `is None` instead of `== None` for their internal identity checks.
34
+ * Fixed the coverage configuration in `setup.cfg`, which omitted `metapredict/_version.py` (a copy-paste from another project) instead of `shephard/_version.py`.
35
+ * **Exception hierarchy**: every SHEPHARD exception (`SiteException`, `TrackException`, `DomainException`, `ProteinException`, `ProteomeException`, `UtilitiesException`, `InterfaceException`, `APIException`) subclassed bare `Exception` rather than `ShephardException`, so `except ShephardException:` caught essentially nothing raised by the library. All of them now inherit from `ShephardException` as intended. Also corrected `TrackException`'s docstring (it described the Domain class) and the three exceptions that shared a copy-pasted "general utility exceptions" description.
36
+ * `Domain.get_sites_by_type()` accepted and documented a `return_list` argument but never forwarded it, so `return_list=True` silently returned a dictionary.
37
+ * Fixed the `extend_ends` block in `tools.domain_tools.build_domains_from_track_values()`, which could not work as written: it used a float as a list index (`len(B)/2`, a `TypeError`) and compared a list *slice* against an integer (always `False`, so the C-terminal extension never happened). The two ends are now handled symmetrically, and a zero-width extension is a no-op rather than an error.
38
+ * `tools.experimental.get_site_density_in_domain_normalized_by_protein()` returned the *minimum* enrichment value for a domain that was maximally enriched (sites in the domain, none in the sampled background) and the maximum for a depleted one — i.e. the two extremes were inverted. It also sampled background regions using 0-indexed positions (including position 0, which is not a valid protein position) while querying with SHEPHARD's 1-indexed inclusive convention.
39
+ * `tools.experimental.get_site_density_percentile_normalized_by_protein()` searched the density distribution using exact float equality, so it fell off the end of the function and returned `None` whenever no exact match existed. Both functions in this module now have proper docstrings.
40
+ * **Track file format**: track lines were written with a trailing delimiter. This is invisible with the default tab delimiter, but with any other delimiter it produced an empty final field that could not be read back (`float('')` in values mode, or a spurious extra symbol in symbols mode). Track files are now written without a trailing delimiter, matching the domain and site writers. *Note this changes the byte content of written track files by one byte per line; files written by older versions still read correctly.*
41
+ * `si_tracks`: an invalid `mode` raised from inside the per-line `try`, so `skip_bad=True` swallowed it — passing a bad mode produced ten confusing warnings and an empty dictionary instead of an error. The mode is now validated before parsing begins.
42
+ * `si_tracks.write_tracks_from_list()` raised an `IndexError` on an empty list (the domain and site equivalents handle this fine); it now writes an empty file. `write_tracks()` also leaked its file handle if writing raised, and would call `open(None)` if given neither a filename nor a file handle; both now use a context manager and the argument combination is validated.
43
+ * `si_protein_attributes.write_protein_attributes_from_dictionary()` could not consume the dictionary the corresponding parser produces: the reader returns `{unique_ID: [dict, ...]}` but the writer assumed `{unique_ID: dict}` and raised an `AttributeError` on the list. It now accepts both shapes.
44
+ * **`skip_bad` now covers attribute parsing**: in every `si_*` module the `key:value` parsing sat *outside* the guarded `try`, so a malformed attribute raised an `InterfaceException` even with `skip_bad=True`. The documented hard cap on skipped lines (`MAX_BAD_COUNT`, 10) is also now documented in every `skip_bad` docstring — previously `skip_bad=True` would still raise on the eleventh bad line with no indication that this was expected.
45
+ * **Attribute keys are now sanitized on write**: all the `si_*` writers cleaned attribute *values* but interpolated *keys* raw, so a key containing a delimiter or a colon produced a file that could not be read back. Relatedly, `interface_tools.full_clean_string()` hardcoded the tab character regardless of the delimiter the writer was actually using; it now takes the delimiter.
46
+ * `si_sites.add_sites_from_dictionary()` never validated that its first argument was a `Proteome` (every sibling `*_from_dictionary()` function does), and `SiteException` was imported but never caught, so it escaped even with `safe=False`. Several error messages in `si_sites` and `si_domains` also re-cast the offending value (e.g. `int(start)`) inside the exception handler, which could raise a second error while reporting the first.
47
+ * `apis.metapredict_api`: `disorder_threshold` was accepted and documented by both domain-annotating functions but never passed to metapredict, so a non-default threshold was silently ignored. The default is now `None` (metapredict's version-appropriate default, which is what these functions effectively used before) and the value is passed through.
48
+ * `apis.metapredict_api` ran an actual disorder prediction at import time as a version probe, so `import shephard.apis` loaded a model as a side effect. The version check is now lazy. A redundant `try/except` that retried an identical call was also removed.
49
+ * **Missing optional dependencies now fail clearly**: both `metapredict_api` and `albatross_api` only *printed* on a failed import, leaving the imported name undefined so the first real call died with an opaque `NameError`. Both now raise an informative `APIException` at call time.
50
+ * `apis.albatross_api.annotate_domains_with_dimensions()` keyed predictions on `unique_ID + '_' + domain_name`, which is ambiguous if a unique_ID itself contains an underscore (silently mis-assigning or dropping predictions). Keys are now unambiguous. The unused `batch_mode` argument is retained but documented as a deprecated no-op.
51
+ * `apis.fasta.fasta_to_proteome()`: a guard testing `use_header_as_unique_ID is None` on a boolean was always `False`, and auto-generated unique_IDs were `int` while every other code path produces `str` (so downstream string look-ups missed).
52
+ * `apis.fasta.proteome_to_fasta()` raised an `AttributeError` for any non-string attribute value (attributes are explicitly documented as arbitrary), and round-tripping a Proteome through a FASTA file with `include_attributes_in_header=True` appended a trailing space to every protein name each time.
53
+ * `tools.attribute_tools.cast_attributes()` caught only `ValueError`, so `skip_failed=True` did not skip the most common failure (`TypeError` from e.g. `float(None)`).
54
+ * **NEW FEATURES**:
55
+ * Added `Proteome.tracks` (property) and `Proteome.get_tracks_by_name()`, mirroring the existing `Proteome.domains` / `Proteome.sites` and `get_domains_by_type()` / `get_sites_by_type()` accessors (previously there was no way to retrieve `Track` objects at the Proteome level).
56
+ * **Live UniProt annotation**: `apis.uniprot` can now pull annotations directly from the UniProt REST API and convert them into SHEPHARD annotations, via `annotate_protein_with_uniprot()` (a single protein) and `annotate_proteome_with_uniprot()` (a whole Proteome, batching accessions so a few thousand proteins cost a few tens of API calls rather than one call each). Features that span a region become Domains, single-residue features become Sites, and disulfide bonds/cross-links become a pair of Sites recording each other's position. Regions covered by an experimental structure (from the PDB cross-references) can be added as Domains carrying the PDB ID, method, and resolution, and secondary structure and structural coverage can be added as Tracks. Every annotation carries the UniProt feature type, description, evidence codes, and source accession as attributes. Which annotations are fetched is controlled per-class by keyword, and only the data required is downloaded. Because UniProt annotations are positional, the local sequence is verified against the UniProt sequence by default and proteins whose sequences have drifted are refused rather than silently mis-annotated. Requires network access, but adds no new dependencies. See the [API documentation](https://shephard.readthedocs.io/en/latest/apis.html) for details and worked examples.
57
+ * **PERFORMANCE UPGRADES**:
58
+ * `Protein.add_domain()` now performs an O(1) uniqueness check against the internal domain dictionary instead of rebuilding and sorting the full domain list on every call (and on every iteration of the `autoname` loop). Loading *D* domains into a protein drops from ~O(D² log D) to ~O(D).
59
+ * `si_domains.add_domains_from_dictionary()`, `si_sites.add_sites_from_dictionary()` and `si_tracks.add_tracks_from_dictionary()` now iterate the (typically small) annotation dictionary and use O(1) protein look-ups, rather than scanning every protein in the Proteome. Annotating *K* proteins in a *P*-protein Proteome drops from O(P) to O(K) — a large speed-up when annotating a subset of a big Proteome (this also makes `Protein.add_domains()`/`build_domain()` no longer O(P)).
60
+ * `Proteome[i]` / slicing no longer materialises a list of every Protein on each access; indexing is now lazy (`P[0]` is ~O(1) rather than O(P)).
61
+ * **PACKAGING / INSTALL & CI**:
62
+ * Added the `shephard/py.typed` PEP 561 marker. It was already declared in `package-data` but the file did not exist; SHEPHARD now correctly advertises itself as a typed package.
63
+ * Fixed wheel packaging: the bundled data files (`shephard/data/`, including `test_data/` and `look_and_say.dat`) are now included via `package-data`. Previously they were absent from built wheels, so `shephard.get_data()` pointed at missing files for wheel installs.
64
+ * `pyproject.toml`: removed the unnecessary `numpy` build-system requirement (SHEPHARD is pure Python; `numpy` remains a runtime dependency); bumped `requires-python` to `>=3.8` (3.7 is end-of-life); added trove classifiers, keywords, `[project.urls]`, a second author, a `pytest-cov` test extra, and `[tool.pytest.ini_options] testpaths` so `pytest` discovers the suite from any directory.
65
+ * `setup.cfg`: removed the deprecated `[aliases] test = pytest` (removed in setuptools ≥ 72).
66
+ * Removed dead CI configuration for shut-down services (`.travis.yml`, `.lgtm.yml`, `devtools/travis-ci/`) and added a modern GitHub Actions workflow (`.github/workflows/ci.yml`) running the test suite on Python 3.8–3.12 (Ubuntu + macOS) with coverage upload.
67
+ * Modernized `.readthedocs.yaml` (`ubuntu-22.04`, Python 3.11) and made it install the package itself so autodoc can import `shephard`; clarified `docs/requirements.txt`.
68
+ * **Raised the minimum supported Python to 3.10.** Python 3.8 and 3.9 are both end-of-life, and on those versions pip back-solves to a numpy old enough that we never test against it. Classifiers now cover Python 3.10-3.14, and the CI matrix was updated to match (3.10-3.14 on Ubuntu, plus 3.12 on macOS).
69
+ * Adopted [PEP 639](https://peps.python.org/pep-0639/) license metadata (`license = "MIT"` plus `license-files`), replacing the deprecated license table and the `License :: OSI Approved` classifier. Built distributions now carry a `License-Expression` field and ship `LICENSE` in the wheel. This requires `setuptools>=77`, so the build requirement was bumped accordingly.
70
+ * Added `Development Status :: 5 - Production/Stable` (SHEPHARD has been released and in use for several years), `Natural Language :: English`, `Topic :: Scientific/Engineering :: Chemistry`, and `Typing :: Typed` classifiers; expanded the keyword list.
71
+ * Added `Changelog` and `Research paper` entries to `[project.urls]`, so both are linked directly from the PyPI sidebar.
72
+ * `MANIFEST.in` now ships `CHANGELOG.md` and `CITATION.cff` in the source distribution.
73
+ * Moved the coverage configuration from `setup.cfg` into `pyproject.toml` (`[tool.coverage.run]`), so pytest, coverage and packaging config all live in one place. `setup.cfg` now holds only the flake8 and yapf style settings, since flake8 has no `pyproject.toml` support.
74
+ * **DOCUMENTATION**:
75
+ * Documented the new UniProt REST API in `docs/apis.rst`, covering how UniProt features map onto SHEPHARD annotations, the metadata attached to each annotation, a full table of the annotation groups and their defaults, sequence verification, the summary dictionary and `safe` semantics, and batching behaviour.
76
+ * Added three worked examples to `docs/examples.rst`: annotating a proteome directly from UniProt, combining UniProt PTM Sites with metapredict IDR Domains, and using the structural coverage Track to find regions with no experimental structure. All three are runnable against the bundled test set.
77
+ * Added `demo/uniprot/uniprot_api_examples.ipynb`, an executed notebook walking through the UniProt API end to end - annotation groups, single-protein and batch annotation, disulfide bonds, provenance and evidence codes, experimental structures and Tracks, error handling, saving annotations, and a worked enrichment question.
78
+ * Moved the change log out of `README.md` into `CHANGELOG.md`, and added the usual status badges and a citation section to the README.
79
+ * Added `CITATION.cff`, so GitHub renders a "Cite this repository" entry pointing at the SHEPHARD paper.
80
+ * Fixed the install command in `README.md`, which still used the `git://` protocol GitHub disabled in 2022, and updated the paper citation to the published DOI (`10.1093/bioinformatics/btad488`) rather than the preprint.
81
+ * **TESTS**:
82
+ * Added a comprehensive test suite (`test_comprehensive_*` and `test_bugfix_regressions`) covering the user-facing Proteome, Protein, Domain, Site, Track, interface, tools and FASTA/UniProt APIs, plus an explicit regression test for every bug fixed in this release (~285 new tests).
83
+ * Added a session-scoped `conftest.py` fixture that pins the working directory, making the entire test suite runnable from any directory (~13 legacy `si_*` write tests previously only passed when run from inside the tests directory).
84
+ * Relocated the stray `shephard/test_domains_sites.py` into `shephard/tests/`.
85
+ * Added `test_bugfix_regressions_0_2_3.py`, an explicit regression test for each of the bugs listed above, and `test_api_uniprot_annotation.py`, a fully offline suite for the new UniProt REST API (parsing, annotation, batching, and every error path, plus the HTTP layer's retry/backoff behaviour). Live tests against the real UniProt API are in `test_api_uniprot_live.py` and are skipped unless `SHEPHARD_TEST_NETWORK=1`, so CI stays hermetic.
86
+ * Fixed three test modules that defined two test functions with the same name, where the second silently shadowed the first so it never ran (`test_api_albatross.py`, `test_si_tracks.py`, `test_proteome.py`). One shadowed test was a strict duplicate and was removed; the rest are now named distinctly and run.
87
+ * `test_api_albatross.py` now skips (rather than failing with a `NameError`) when `sparrow` is not installed, matching the metapredict test. This was a live CI failure, since CI installs neither predictor.
88
+ * The `TS1_domains2_sites` fixture in `conftest.py` was both session-scoped and `autouse`, so a single mutable `Proteome` was built for every test in the session and shared between the tests that used it. It is now function-scoped like every other fixture.
89
+ * Removed three dead files: `shephard/data/test_data/tst.py` (scratch code importing APIs that no longer exist — and, because the `data/` directory is shipped as package data, installed into every wheel), `shephard/tests/test_logic.py` (empty), and `shephard/tests/test_domains_sites.py` (imports only, no test functions).
90
+ * **REFACTOR**:
91
+ * Converted all `%`-style string formatting in the package to f-strings.
92
+
93
+ #### Version 0.2.2 (November 2024)
94
+ * Updated and fixed `metapredict_api` and `albatross_api` including adding tests
95
+ * Defaulted to use metapredict V3
96
+ * Restructured organization to use `pyproject.toml`
97
+
98
+ #### Version 0.1.21-patch (May 2024)
99
+ * We added the `albatross_api` module to apis, which lets you pass in a Proteome and annotate at either the protein level or domain level all sequence predicted Rg and Re values. Right now this does both but better granularity and tests will be added before the bump to 0.1.22
100
+
101
+
102
+ #### Version 0.1.21 (January 2024)
103
+ * BREAKING CHANGE: We renamed shephard.apis.metapredict to shephard.apis.metapredict_api to avoid namespace clashing with metapredict the package. This is of course avoidable by aliasing one/both, but this was poor design. Going forward, we will append _api to the end of api modules.
104
+ * Including import of metapredict_api from apis such that `from shephard.apis import metapredict_api` syntax works
105
+ * Removed batch_mode as a variable to consider in the metapredict_api functions; size-collect is the only mode supported in metapredict; if this changes we'll revisit things but for now no need to add additional confusion.
106
+
107
+ #### Version 0.1.20 (December 2023)
108
+ * Fixed a minor but where the `shephard.interfaces.si_proteins` interface required proteins to ALREADY be in the proteome which proteins were being added to, which makes no sense, so we removed this constraint.
109
+
110
+ #### Version 0.1.19 (November 2023)
111
+ * Added version requirement (3.7 to 3.11 inclusive)
112
+ * **PERFORMANCE UPGRADE**: Improved how large annotation files are parsed so we ONLY parse lines with unique IDs matching unique IDs in the associated Proteome we're annotating - massive improvement in performance when working with large (10,000 - 100,0000) annotation datasets. This should change nothing on the frontend or any of the behavior other than making SHEPHARD much faster for large datasets
113
+ * **PERFORMANCE UPGRADES** Changed some of the error message construction to avoid major overhead when many (1000s of sites) are added (specifically, we previously by default generated an error message that listed out all the sites in a protein when testing for a dictionary type in a Site construction line; this has been removed).
114
+ * Better error handling for interface classes (print only the first 10 errors if many lines are read incorrectly - avoids a situation where the wrong file causes GBs of out text)
115
+ * Added explicit tests for all internal Interface classes.
116
+ * Added documentation for Protein interface files (as missing previously)
117
+
118
+
119
+ #### Version 0.1.18 (February 2023)
120
+ * Added defensive programming for writing sites and domains where if a `domain_type` or `site_type` variable is passed, we check explicitly that it's a list.
121
+ * Added ability to write_protein_attributes_from_dictionary (new function in `si_protein_attributes.py`.
122
+
123
+
124
+ #### Version 0.1.17 (September 2022)
125
+ * **BUG FIX** Fixed bug in writing domains from list.
126
+ * Added import from apis module such that `from shephard import apis` now enables `apis.<module>` to work
127
+
128
+ #### Version 0.1.16 (September 2022)
129
+ * Update for [PyPI update](https://pypi.org/project/shephard/)
130
+ * Improved documentation ahead of final release (including tools docs).
131
+ * Added ability to return sites as lists for all site acquisition functions in proteins and domains.
132
+ * Added much more detailed tests for site acquisition functions
133
+
134
+
135
+ #### Version 0.1.15 (September 2022)
136
+ * Update for [PyPI update](https://pypi.org/project/shephard/)
137
+
138
+ #### Version 0.1.10 (September 2022)
139
+ * Major update
140
+ * Lots of new tests
141
+ * Enable sites to read/write if values = None without throwing an exception
142
+ * Fixed bug in writing sites from list
143
+ * **BREAKING CHANGE**: Changed `shephard.protein.get_residue()` to `shephard.protein.residue()`, inkeeping with style for other getter functions
144
+
145
+
146
+ #### Version 0.1.9 (September 2022)
147
+ * Major update
148
+ * Lots of new tests
149
+ * Added ability to write lists of sites and tracks (as we can with domains)
150
+ * Refactoring of interface writing code
151
+ * Added explicitly checks for domain, site, and track types when writing from lists of these objects
152
+ * Added `Track.symbol()` and `Track.value()` functions to extract a single symbol or value at a specific position.
153
+ * Updated documentation to include these new functions
154
+ * Updated tests to encompass new features
155
+ * Fixed bugs in exception handling
156
+ * **BREAKING CHANGE**: Changed `shephard.interfaces.si_tracks.write_track()` to `shephard.interfaces.si_tracks.write_tracks()` (i.e. plural) to match names from other functions
157
+
158
+
159
+ #### Version 0.1.8 (August 2022)
160
+ * Bug fix in `domain_tools.py` for identifying overlap between two domains
161
+ * Fixed inconsistencies in writing domains that led to trailing whitespace
162
+ * Fixed bugs in exception throwing code
163
+ * More tests
164
+
165
+ #### Version 0.1.7 (April 2022)
166
+ * Improved documentation
167
+ * Added domain_to_track() function in tools.track_tools
168
+
169
+
170
+ #### Version 0.1.5 (April 2022)
171
+ * First version released to PyPI
172
+
173
+ #### Version 0.1.4 (Feb 2022)
174
+ * Added ability to remove Tracks, Sites and Domains from a Protein objects
175
+ * Track number of unique domains, sites, and tracks rather than just their presence/absence
176
+ * Updated Track writing
177
+ * Added Tracks MUST be either symbolic or values-based but cannot be both
178
+ *
179
+
180
+ #### Version 0.1.3.1 (May 2021)
181
+ * Various bug fixes
182
+ * Improved performance
183
+ * Updated interfaces for reading/writing different types of files
184
+ * Major updates to internal docs
185
+ * This release should be considered largely stable, although docs are lacking
186
+ * Expanded the test suite
187
+
188
+
189
+ ### Version 0.1.2.1 (August 2020)
190
+ **WARNING**: This version breaks backwards compatibility with prior versions!
191
+
192
+ * `protein.get_domains_by_type()` now returns a list of domains instead of a dictionary. This helps bring consistency to how domains are retrieved and moves us away from dictionary returning.
193
+ * Various internal updates
@@ -0,0 +1,48 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use SHEPHARD in your work, please cite the paper below."
3
+ title: SHEPHARD
4
+ abstract: >-
5
+ SHEPHARD (Sequence-based Hierarchical and Extendable Platform for
6
+ High-throughput Analysis of Regions of Disorder) is a Python framework for
7
+ reading, annotating, and analyzing large protein datasets, enabling
8
+ reproducible integrative analysis of complex sequence annotations at
9
+ proteome-wide scales.
10
+ type: software
11
+ license: MIT
12
+ repository-code: "https://github.com/holehouse-lab/shephard"
13
+ url: "https://shephard.readthedocs.io/"
14
+ keywords:
15
+ - bioinformatics
16
+ - proteome
17
+ - protein
18
+ - intrinsically disordered regions
19
+ - sequence annotation
20
+ authors:
21
+ - family-names: Ginell
22
+ given-names: Garrett M.
23
+ - family-names: Holehouse
24
+ given-names: Alex S.
25
+ orcid: "https://orcid.org/0000-0002-4155-5729"
26
+ preferred-citation:
27
+ type: article
28
+ title: >-
29
+ SHEPHARD: a modular and extensible software architecture for analyzing and
30
+ annotating large protein datasets
31
+ authors:
32
+ - family-names: Ginell
33
+ given-names: Garrett M.
34
+ - family-names: Flynn
35
+ given-names: Aidan J.
36
+ - family-names: Holehouse
37
+ given-names: Alex S.
38
+ orcid: "https://orcid.org/0000-0002-4155-5729"
39
+ journal: Bioinformatics
40
+ volume: 39
41
+ issue: 8
42
+ start: btad488
43
+ year: 2023
44
+ month: 8
45
+ doi: 10.1093/bioinformatics/btad488
46
+ issn: 1367-4811
47
+ publisher:
48
+ name: Oxford University Press
@@ -0,0 +1,8 @@
1
+ include LICENSE
2
+ include MANIFEST.in
3
+ include CHANGELOG.md
4
+ include CITATION.cff
5
+
6
+ graft shephard
7
+
8
+ global-exclude *.py[cod] __pycache__ *.so
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: SHEPHARD
3
+ Version: 0.2.3
4
+ Summary: Python package for organizing large sets of protein data
5
+ Author: Garrett M. Ginell
6
+ Author-email: Alex Holehouse <alex.holehouse@wustl.edu>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/holehouse-lab/shephard
9
+ Project-URL: Documentation, https://shephard.readthedocs.io/
10
+ Project-URL: Source, https://github.com/holehouse-lab/shephard
11
+ Project-URL: Issues, https://github.com/holehouse-lab/shephard/issues
12
+ Project-URL: Changelog, https://github.com/holehouse-lab/shephard/blob/master/CHANGELOG.md
13
+ Project-URL: Research paper, https://doi.org/10.1093/bioinformatics/btad488
14
+ Keywords: bioinformatics,proteome,protein,disorder,annotation,uniprot,proteomics,idr
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Natural Language :: English
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
26
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
27
+ Classifier: Typing :: Typed
28
+ Requires-Python: >=3.10
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: numpy
32
+ Requires-Dist: protfasta
33
+ Provides-Extra: test
34
+ Requires-Dist: pytest>=6.1.2; extra == "test"
35
+ Requires-Dist: pytest-cov; extra == "test"
36
+ Dynamic: license-file
37
+
38
+ SHEPHARD
39
+ ==============================
40
+ #### Sequence-based Hierarchical and Extendable Platform for High-throughput Analysis of Region of Disorder
41
+
42
+ ### Current major version: 0.2.3 (May 2026)
43
+
44
+ [//]: # (Badges)
45
+ [![CI](https://github.com/holehouse-lab/shephard/actions/workflows/ci.yml/badge.svg)](https://github.com/holehouse-lab/shephard/actions/workflows/ci.yml)
46
+ [![Documentation Status](https://readthedocs.org/projects/shephard/badge/?version=latest)](https://shephard.readthedocs.io/en/latest/?badge=latest)
47
+ [![codecov](https://codecov.io/gh/holehouse-lab/shephard/branch/master/graph/badge.svg)](https://codecov.io/gh/holehouse-lab/shephard)
48
+ [![PyPI](https://img.shields.io/pypi/v/shephard.svg)](https://pypi.org/project/shephard/)
49
+ [![Python versions](https://img.shields.io/pypi/pyversions/shephard.svg)](https://pypi.org/project/shephard/)
50
+ [![Downloads](https://static.pepy.tech/badge/shephard)](https://pepy.tech/project/shephard)
51
+ [![License: MIT](https://img.shields.io/pypi/l/shephard.svg)](https://github.com/holehouse-lab/shephard/blob/master/LICENSE)
52
+ [![Last commit](https://img.shields.io/github/last-commit/holehouse-lab/shephard.svg)](https://github.com/holehouse-lab/shephard/commits/master)
53
+ [![DOI](https://img.shields.io/badge/DOI-10.1093%2Fbioinformatics%2Fbtad488-blue.svg)](https://doi.org/10.1093/bioinformatics/btad488)
54
+
55
+
56
+ ## About
57
+ SHEPHARD is a Python toolkit for integrative proteome-wide analysis. It was written by Garrett Ginell and Alex Holehouse.
58
+
59
+ SHEPHARD enables you to read in protein sequence data and annotate it with different types of sequence annotations (Sites, Domains, and Tracks).
60
+
61
+
62
+ ## Installation
63
+ Copy and paste into your terminal:
64
+
65
+ pip install shephard
66
+
67
+ This installs the current stable release candidate from PyPi. SHEPHARD is pure Python and requires Python 3.10 or higher; the only runtime dependencies are [numpy](https://numpy.org/) and [protfasta](https://protfasta.readthedocs.io/), both installed automatically.
68
+
69
+ #### Installation from GitHub
70
+
71
+ Copy and paste into your terminal:
72
+
73
+ pip install shephard@git+https://github.com/holehouse-lab/shephard.git
74
+
75
+ This installs the current bleeding-edge version directly from GitHub.
76
+
77
+
78
+ ## Documentation
79
+ Online documentation for SHEPHARD can be found here:
80
+
81
+ [https://shephard.readthedocs.io/en/latest/](https://shephard.readthedocs.io/en/latest/)
82
+
83
+ ## Tutorial Examples
84
+ Examples and Google Colab tutorials can be found here:
85
+
86
+ [https://github.com/holehouse-lab/shephard-colab](https://github.com/holehouse-lab/shephard-colab)
87
+
88
+ Runnable demo notebooks also ship with the package in [`demo/`](demo/), including a [walkthrough of the UniProt API](demo/uniprot/uniprot_api_examples.ipynb).
89
+
90
+ ## Status
91
+ SHEPHARD is fully released and in active use, and the SHEPHARD paper is out in *Bioinformatics*.
92
+
93
+ ## Citation
94
+ If you use SHEPHARD in your work, please cite:
95
+
96
+ > Ginell, G. M., Flynn, A. J. & Holehouse, A. S. SHEPHARD: a modular and extensible software architecture for analyzing and annotating large protein datasets. *Bioinformatics* **39**, btad488 (2023). [https://doi.org/10.1093/bioinformatics/btad488](https://doi.org/10.1093/bioinformatics/btad488)
97
+
98
+ In BibTeX:
99
+
100
+ ```bibtex
101
+ @article{ginell2023shephard,
102
+ author = {Ginell, Garrett M. and Flynn, Aidan J. and Holehouse, Alex S.},
103
+ title = {{SHEPHARD}: a modular and extensible software architecture for analyzing and annotating large protein datasets},
104
+ journal = {Bioinformatics},
105
+ volume = {39},
106
+ number = {8},
107
+ pages = {btad488},
108
+ year = {2023},
109
+ doi = {10.1093/bioinformatics/btad488}
110
+ }
111
+ ```
112
+
113
+ This repository also includes a [`CITATION.cff`](CITATION.cff) file, so GitHub's "Cite this repository" button will generate the citation for you in whichever format you need.
114
+
115
+ ## Roadmap
116
+ SHEPHARD is the base code for a large body of sequence-based bioinformatic tools developed by the Holehouse lab. These include:
117
+
118
+ * [metapredict](https://github.com/idptools/metapredict) - high-performance disorder predictor [paper v1](http://dx.doi.org/10.1016/j.bpj.2021.08.039), [paper v2](http://dx.doi.org/10.1101/2022.06.06.494887), [paper v2-ff](http://dx.doi.org/10.1038/s41592-023-02159-5).
119
+ * [parrot](https://github.com/idptools/parrot) - a general tool for deep learning of sequence features [paper](http://dx.doi.org/10.7554/eLife.70576)
120
+ * [sparrow](https://github.com/idptools/sparrow) - a high-throughput tool for sequence analysis, including the [ALBATROSS networks](http://dx.doi.org/10.1038/s41592-023-02159-5) (*in development*)
121
+ * [goose](https://github.com/idptools/goose) - a general-purpose tool for the rational design of disordered protein sequences [paper](http://dx.doi.org/10.1101/2023.10.29.564547).
122
+
123
+ Together, these tools form the backbone of our informatics infrastructure, and SHEPHARD provides direct or indirect API access to each of them (and various other tools).
124
+
125
+ ## Change log
126
+
127
+ The full change log lives in [CHANGELOG.md](CHANGELOG.md).
128
+
129
+ ### Copyright
130
+
131
+ Copyright (c) 2019-2026, Garrett M. Ginell and Alex S. Holehouse - [Holehouse lab](http://holehouse.wustl.edu/)
@@ -0,0 +1,94 @@
1
+ SHEPHARD
2
+ ==============================
3
+ #### Sequence-based Hierarchical and Extendable Platform for High-throughput Analysis of Region of Disorder
4
+
5
+ ### Current major version: 0.2.3 (May 2026)
6
+
7
+ [//]: # (Badges)
8
+ [![CI](https://github.com/holehouse-lab/shephard/actions/workflows/ci.yml/badge.svg)](https://github.com/holehouse-lab/shephard/actions/workflows/ci.yml)
9
+ [![Documentation Status](https://readthedocs.org/projects/shephard/badge/?version=latest)](https://shephard.readthedocs.io/en/latest/?badge=latest)
10
+ [![codecov](https://codecov.io/gh/holehouse-lab/shephard/branch/master/graph/badge.svg)](https://codecov.io/gh/holehouse-lab/shephard)
11
+ [![PyPI](https://img.shields.io/pypi/v/shephard.svg)](https://pypi.org/project/shephard/)
12
+ [![Python versions](https://img.shields.io/pypi/pyversions/shephard.svg)](https://pypi.org/project/shephard/)
13
+ [![Downloads](https://static.pepy.tech/badge/shephard)](https://pepy.tech/project/shephard)
14
+ [![License: MIT](https://img.shields.io/pypi/l/shephard.svg)](https://github.com/holehouse-lab/shephard/blob/master/LICENSE)
15
+ [![Last commit](https://img.shields.io/github/last-commit/holehouse-lab/shephard.svg)](https://github.com/holehouse-lab/shephard/commits/master)
16
+ [![DOI](https://img.shields.io/badge/DOI-10.1093%2Fbioinformatics%2Fbtad488-blue.svg)](https://doi.org/10.1093/bioinformatics/btad488)
17
+
18
+
19
+ ## About
20
+ SHEPHARD is a Python toolkit for integrative proteome-wide analysis. It was written by Garrett Ginell and Alex Holehouse.
21
+
22
+ SHEPHARD enables you to read in protein sequence data and annotate it with different types of sequence annotations (Sites, Domains, and Tracks).
23
+
24
+
25
+ ## Installation
26
+ Copy and paste into your terminal:
27
+
28
+ pip install shephard
29
+
30
+ This installs the current stable release candidate from PyPi. SHEPHARD is pure Python and requires Python 3.10 or higher; the only runtime dependencies are [numpy](https://numpy.org/) and [protfasta](https://protfasta.readthedocs.io/), both installed automatically.
31
+
32
+ #### Installation from GitHub
33
+
34
+ Copy and paste into your terminal:
35
+
36
+ pip install shephard@git+https://github.com/holehouse-lab/shephard.git
37
+
38
+ This installs the current bleeding-edge version directly from GitHub.
39
+
40
+
41
+ ## Documentation
42
+ Online documentation for SHEPHARD can be found here:
43
+
44
+ [https://shephard.readthedocs.io/en/latest/](https://shephard.readthedocs.io/en/latest/)
45
+
46
+ ## Tutorial Examples
47
+ Examples and Google Colab tutorials can be found here:
48
+
49
+ [https://github.com/holehouse-lab/shephard-colab](https://github.com/holehouse-lab/shephard-colab)
50
+
51
+ Runnable demo notebooks also ship with the package in [`demo/`](demo/), including a [walkthrough of the UniProt API](demo/uniprot/uniprot_api_examples.ipynb).
52
+
53
+ ## Status
54
+ SHEPHARD is fully released and in active use, and the SHEPHARD paper is out in *Bioinformatics*.
55
+
56
+ ## Citation
57
+ If you use SHEPHARD in your work, please cite:
58
+
59
+ > Ginell, G. M., Flynn, A. J. & Holehouse, A. S. SHEPHARD: a modular and extensible software architecture for analyzing and annotating large protein datasets. *Bioinformatics* **39**, btad488 (2023). [https://doi.org/10.1093/bioinformatics/btad488](https://doi.org/10.1093/bioinformatics/btad488)
60
+
61
+ In BibTeX:
62
+
63
+ ```bibtex
64
+ @article{ginell2023shephard,
65
+ author = {Ginell, Garrett M. and Flynn, Aidan J. and Holehouse, Alex S.},
66
+ title = {{SHEPHARD}: a modular and extensible software architecture for analyzing and annotating large protein datasets},
67
+ journal = {Bioinformatics},
68
+ volume = {39},
69
+ number = {8},
70
+ pages = {btad488},
71
+ year = {2023},
72
+ doi = {10.1093/bioinformatics/btad488}
73
+ }
74
+ ```
75
+
76
+ This repository also includes a [`CITATION.cff`](CITATION.cff) file, so GitHub's "Cite this repository" button will generate the citation for you in whichever format you need.
77
+
78
+ ## Roadmap
79
+ SHEPHARD is the base code for a large body of sequence-based bioinformatic tools developed by the Holehouse lab. These include:
80
+
81
+ * [metapredict](https://github.com/idptools/metapredict) - high-performance disorder predictor [paper v1](http://dx.doi.org/10.1016/j.bpj.2021.08.039), [paper v2](http://dx.doi.org/10.1101/2022.06.06.494887), [paper v2-ff](http://dx.doi.org/10.1038/s41592-023-02159-5).
82
+ * [parrot](https://github.com/idptools/parrot) - a general tool for deep learning of sequence features [paper](http://dx.doi.org/10.7554/eLife.70576)
83
+ * [sparrow](https://github.com/idptools/sparrow) - a high-throughput tool for sequence analysis, including the [ALBATROSS networks](http://dx.doi.org/10.1038/s41592-023-02159-5) (*in development*)
84
+ * [goose](https://github.com/idptools/goose) - a general-purpose tool for the rational design of disordered protein sequences [paper](http://dx.doi.org/10.1101/2023.10.29.564547).
85
+
86
+ Together, these tools form the backbone of our informatics infrastructure, and SHEPHARD provides direct or indirect API access to each of them (and various other tools).
87
+
88
+ ## Change log
89
+
90
+ The full change log lives in [CHANGELOG.md](CHANGELOG.md).
91
+
92
+ ### Copyright
93
+
94
+ Copyright (c) 2019-2026, Garrett M. Ginell and Alex S. Holehouse - [Holehouse lab](http://holehouse.wustl.edu/)
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: SHEPHARD
3
+ Version: 0.2.3
4
+ Summary: Python package for organizing large sets of protein data
5
+ Author: Garrett M. Ginell
6
+ Author-email: Alex Holehouse <alex.holehouse@wustl.edu>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/holehouse-lab/shephard
9
+ Project-URL: Documentation, https://shephard.readthedocs.io/
10
+ Project-URL: Source, https://github.com/holehouse-lab/shephard
11
+ Project-URL: Issues, https://github.com/holehouse-lab/shephard/issues
12
+ Project-URL: Changelog, https://github.com/holehouse-lab/shephard/blob/master/CHANGELOG.md
13
+ Project-URL: Research paper, https://doi.org/10.1093/bioinformatics/btad488
14
+ Keywords: bioinformatics,proteome,protein,disorder,annotation,uniprot,proteomics,idr
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Natural Language :: English
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
26
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
27
+ Classifier: Typing :: Typed
28
+ Requires-Python: >=3.10
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: numpy
32
+ Requires-Dist: protfasta
33
+ Provides-Extra: test
34
+ Requires-Dist: pytest>=6.1.2; extra == "test"
35
+ Requires-Dist: pytest-cov; extra == "test"
36
+ Dynamic: license-file
37
+
38
+ SHEPHARD
39
+ ==============================
40
+ #### Sequence-based Hierarchical and Extendable Platform for High-throughput Analysis of Region of Disorder
41
+
42
+ ### Current major version: 0.2.3 (May 2026)
43
+
44
+ [//]: # (Badges)
45
+ [![CI](https://github.com/holehouse-lab/shephard/actions/workflows/ci.yml/badge.svg)](https://github.com/holehouse-lab/shephard/actions/workflows/ci.yml)
46
+ [![Documentation Status](https://readthedocs.org/projects/shephard/badge/?version=latest)](https://shephard.readthedocs.io/en/latest/?badge=latest)
47
+ [![codecov](https://codecov.io/gh/holehouse-lab/shephard/branch/master/graph/badge.svg)](https://codecov.io/gh/holehouse-lab/shephard)
48
+ [![PyPI](https://img.shields.io/pypi/v/shephard.svg)](https://pypi.org/project/shephard/)
49
+ [![Python versions](https://img.shields.io/pypi/pyversions/shephard.svg)](https://pypi.org/project/shephard/)
50
+ [![Downloads](https://static.pepy.tech/badge/shephard)](https://pepy.tech/project/shephard)
51
+ [![License: MIT](https://img.shields.io/pypi/l/shephard.svg)](https://github.com/holehouse-lab/shephard/blob/master/LICENSE)
52
+ [![Last commit](https://img.shields.io/github/last-commit/holehouse-lab/shephard.svg)](https://github.com/holehouse-lab/shephard/commits/master)
53
+ [![DOI](https://img.shields.io/badge/DOI-10.1093%2Fbioinformatics%2Fbtad488-blue.svg)](https://doi.org/10.1093/bioinformatics/btad488)
54
+
55
+
56
+ ## About
57
+ SHEPHARD is a Python toolkit for integrative proteome-wide analysis. It was written by Garrett Ginell and Alex Holehouse.
58
+
59
+ SHEPHARD enables you to read in protein sequence data and annotate it with different types of sequence annotations (Sites, Domains, and Tracks).
60
+
61
+
62
+ ## Installation
63
+ Copy and paste into your terminal:
64
+
65
+ pip install shephard
66
+
67
+ This installs the current stable release candidate from PyPi. SHEPHARD is pure Python and requires Python 3.10 or higher; the only runtime dependencies are [numpy](https://numpy.org/) and [protfasta](https://protfasta.readthedocs.io/), both installed automatically.
68
+
69
+ #### Installation from GitHub
70
+
71
+ Copy and paste into your terminal:
72
+
73
+ pip install shephard@git+https://github.com/holehouse-lab/shephard.git
74
+
75
+ This installs the current bleeding-edge version directly from GitHub.
76
+
77
+
78
+ ## Documentation
79
+ Online documentation for SHEPHARD can be found here:
80
+
81
+ [https://shephard.readthedocs.io/en/latest/](https://shephard.readthedocs.io/en/latest/)
82
+
83
+ ## Tutorial Examples
84
+ Examples and Google Colab tutorials can be found here:
85
+
86
+ [https://github.com/holehouse-lab/shephard-colab](https://github.com/holehouse-lab/shephard-colab)
87
+
88
+ Runnable demo notebooks also ship with the package in [`demo/`](demo/), including a [walkthrough of the UniProt API](demo/uniprot/uniprot_api_examples.ipynb).
89
+
90
+ ## Status
91
+ SHEPHARD is fully released and in active use, and the SHEPHARD paper is out in *Bioinformatics*.
92
+
93
+ ## Citation
94
+ If you use SHEPHARD in your work, please cite:
95
+
96
+ > Ginell, G. M., Flynn, A. J. & Holehouse, A. S. SHEPHARD: a modular and extensible software architecture for analyzing and annotating large protein datasets. *Bioinformatics* **39**, btad488 (2023). [https://doi.org/10.1093/bioinformatics/btad488](https://doi.org/10.1093/bioinformatics/btad488)
97
+
98
+ In BibTeX:
99
+
100
+ ```bibtex
101
+ @article{ginell2023shephard,
102
+ author = {Ginell, Garrett M. and Flynn, Aidan J. and Holehouse, Alex S.},
103
+ title = {{SHEPHARD}: a modular and extensible software architecture for analyzing and annotating large protein datasets},
104
+ journal = {Bioinformatics},
105
+ volume = {39},
106
+ number = {8},
107
+ pages = {btad488},
108
+ year = {2023},
109
+ doi = {10.1093/bioinformatics/btad488}
110
+ }
111
+ ```
112
+
113
+ This repository also includes a [`CITATION.cff`](CITATION.cff) file, so GitHub's "Cite this repository" button will generate the citation for you in whichever format you need.
114
+
115
+ ## Roadmap
116
+ SHEPHARD is the base code for a large body of sequence-based bioinformatic tools developed by the Holehouse lab. These include:
117
+
118
+ * [metapredict](https://github.com/idptools/metapredict) - high-performance disorder predictor [paper v1](http://dx.doi.org/10.1016/j.bpj.2021.08.039), [paper v2](http://dx.doi.org/10.1101/2022.06.06.494887), [paper v2-ff](http://dx.doi.org/10.1038/s41592-023-02159-5).
119
+ * [parrot](https://github.com/idptools/parrot) - a general tool for deep learning of sequence features [paper](http://dx.doi.org/10.7554/eLife.70576)
120
+ * [sparrow](https://github.com/idptools/sparrow) - a high-throughput tool for sequence analysis, including the [ALBATROSS networks](http://dx.doi.org/10.1038/s41592-023-02159-5) (*in development*)
121
+ * [goose](https://github.com/idptools/goose) - a general-purpose tool for the rational design of disordered protein sequences [paper](http://dx.doi.org/10.1101/2023.10.29.564547).
122
+
123
+ Together, these tools form the backbone of our informatics infrastructure, and SHEPHARD provides direct or indirect API access to each of them (and various other tools).
124
+
125
+ ## Change log
126
+
127
+ The full change log lives in [CHANGELOG.md](CHANGELOG.md).
128
+
129
+ ### Copyright
130
+
131
+ Copyright (c) 2019-2026, Garrett M. Ginell and Alex S. Holehouse - [Holehouse lab](http://holehouse.wustl.edu/)