Skip to content

Commit

Permalink
Merge pull request #31 from yutanagano/improve_docs
Browse files Browse the repository at this point in the history
Improve docs
  • Loading branch information
yutanagano authored Aug 21, 2024
2 parents 3fb49d3 + 9ed6793 commit 037027d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
17 changes: 12 additions & 5 deletions src/sceptr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ def calc_cdist_matrix(anchors: DataFrame, comparisons: DataFrame) -> ndarray:
Parameters
----------
anchors : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the first (anchor) collection of input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
comparisons : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the second (comparison) collection of input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
Expand All @@ -40,7 +43,8 @@ def calc_pdist_vector(instances: DataFrame) -> ndarray:
Parameters
----------
instances : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
Expand All @@ -58,7 +62,8 @@ def calc_vector_representations(instances: DataFrame) -> ndarray:
Parameters
----------
instances : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
Expand All @@ -77,11 +82,13 @@ def calc_residue_representations(instances: DataFrame) -> ResidueRepresentations
Parameters
----------
instances : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
:py:class:`~sceptr.model.ResidueRepresentations`
An array of representation vectors for each amino acid residue in the tokenised forms of the input TCRs.
For details on how to interpret/use this output, please refer to the documentation for :py:class:`~sceptr.model.ResidueRepresentations`.
"""
return get_default_model().calc_residue_representations(instances)
Expand Down
17 changes: 12 additions & 5 deletions src/sceptr/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def calc_vector_representations(self, instances: DataFrame) -> ndarray:
Parameters
----------
instances : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
Expand All @@ -160,11 +161,13 @@ def calc_residue_representations(self, instances: DataFrame) -> ResidueRepresent
Parameters
----------
instances : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
:py:class:`~sceptr.model.ResidueRepresentations`
An array of representation vectors for each amino acid residue in the tokenised forms of the input TCRs.
For details on how to interpret/use this output, please refer to the documentation for :py:class:`~sceptr.model.ResidueRepresentations`.
"""
if not isinstance(self._tokeniser, CdrTokeniser):
Expand Down Expand Up @@ -239,9 +242,12 @@ def calc_cdist_matrix(self, anchors: DataFrame, comparisons: DataFrame) -> ndarr
Parameters
----------
anchors : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the first (anchor) collection of input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
comparisons : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the second (comparison) collection of input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
Expand All @@ -263,7 +269,8 @@ def calc_pdist_vector(self, instances: DataFrame) -> ndarray:
Parameters
----------
instances : DataFrame
DataFrame in the :ref:`prescribed format <data_format>`.
DataFrame specifying the input TCRs.
It must be in the :ref:`prescribed format <data_format>`.
Returns
-------
Expand Down

0 comments on commit 037027d

Please sign in to comment.