Skip to content

Commit

Permalink
Added more docstrings to LegacyService
Browse files Browse the repository at this point in the history
  • Loading branch information
npalacioescat committed Feb 27, 2025
1 parent 7b4d4ef commit 985b8d0
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions omnipath_server/service/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2024,12 +2024,32 @@ def _format(

@classmethod
def _table_formatter(cls, rec: tuple) -> str:
"""
Fortmats result record as a tab-separated entry.
Args:
rec:
A record entry as a tuple.
Returns:
The entry formatted as tab-separated text.
"""

return '\t'.join(cls._table_field_formatter(f) for f in rec) + '\n'


@staticmethod
def _table_field_formatter(field: Any) -> str:
"""
Formats an individual field from a record.
Args:
field:
The field to be formatted.
Returns:
The formatted field.
"""

return (
';'.join(field)
Expand Down Expand Up @@ -2064,6 +2084,45 @@ def interactions(
"""
Creates the generator of entries based on the query arguments for the
interactions service.
Args:
resources:
Defines which resource(s) to use records from.
partners:
sources:
targets:
fields:
limit:
format:
source_target:
organisms:
datasets:
dorothea_levels:
dorothea_methods:
types:
directed:
signed:
loops:
**kwargs:
Returns:
asdadkawld
"""

args = locals()
Expand Down

0 comments on commit 985b8d0

Please sign in to comment.