prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [DOC] API Documentation for Biology functions is not standardized
  # Brief Description of Fix
  
  <!-- Please describe the fix in terms of a "before" and "after". In other words, what's not so good about the current docs
  page, and what you would like to see it become. 
  
  Example starter wording is provided. -->
  
  Currently, the docs do not have a standard docstring format for functions.
  ### Example of inconsistent docstring
  > (no `Returns`, no `Functional usage example`, no `Method chaining example`)
  <img width="690" alt="incorrect_func_doc" src="https://user-images.githubusercontent.com/24984410/61177779-6936e100-a5a2-11e9-8332-0c02bad7b5bf.png">
  
  ### Example of a correct/desired docstring
  <img width="716" alt="correct_func_doc" src="https://user-images.githubusercontent.com/24984410/61177795-c5016a00-a5a2-11e9-8cd9-415f440d95c2.png">
  
  I would like to propose a change, such that now the docs contain a **standardized** docstring suite. All functions should contain (at a minimum) the following:
    - `Parameters`
    - ` Returns`
    - `Functional usage example`
    - `Method chaining example`
  
  **NOTE**: This can be done for all functions within the `janitor` directory. For ease of review, this will focus on the `biology.py` file and move to other files/functions as time permits.
  
  # Relevant Context
  
  <!-- Please put here, in bullet points, links to the relevant docs page. A few starting template points are available
  to get you started. -->
  
  - [Link to documentation page](https://pyjanitor.readthedocs.io/reference/biology.html)
  - [Link to exact file to be edited](https://github.com/loganthomas/pyjanitor/blob/dev/janitor/biology.py)
  
  [DOC] API Documentation for Biology functions is not standardized
  # Brief Description of Fix
  
  <!-- Please describe the fix in terms of a "before" and "after". In other words, what's not so good about the current docs
  page, and what you would like to see it become. 
  
  Example starter wording is provided. -->
  
  Currently, the docs do not have a standard docstring format for functions.
  ### Example of inconsistent docstring
  > (no `Returns`, no `Functional usage example`, no `Method chaining example`)
  <img width="690" alt="incorrect_func_doc" src="https://user-images.githubusercontent.com/24984410/61177779-6936e100-a5a2-11e9-8332-0c02bad7b5bf.png">
  
  ### Example of a correct/desired docstring
  <img width="716" alt="correct_func_doc" src="https://user-images.githubusercontent.com/24984410/61177795-c5016a00-a5a2-11e9-8cd9-415f440d95c2.png">
  
  I would like to propose a change, such that now the docs contain a **standardized** docstring suite. All functions should contain (at a minimum) the following:
    - `Parameters`
    - ` Returns`
    - `Functional usage example`
    - `Method chaining example`
  
  **NOTE**: This can be done for all functions within the `janitor` directory. For ease of review, this will focus on the `biology.py` file and move to other files/functions as time permits.
  
  # Relevant Context
  
  <!-- Please put here, in bullet points, links to the relevant docs page. A few starting template points are available
  to get you started. -->
  
  - [Link to documentation page](https://pyjanitor.readthedocs.io/reference/biology.html)
  - [Link to exact file to be edited](https://github.com/loganthomas/pyjanitor/blob/dev/janitor/biology.py)
  
  
  </issue>
  <code>
  [start of janitor/biology.py]
  1 """
  2 Biology and bioinformatics-oriented data cleaning functions.
  3 """
  4 
  5 import pandas as pd
  6 import pandas_flavor as pf
  7 
  8 from .utils import deprecated_alias, import_message
  9 
  10 try:
  11     from Bio import SeqIO
  12 except ImportError:
  13     import_message(
  14         "biology", "biopython", "conda install -c conda-forge biopython"
  15     )
  16 
  17 
  18 @pf.register_dataframe_method
  19 @deprecated_alias(col_name="column_name")
  20 def join_fasta(
  21     df: pd.DataFrame, filename: str, id_col: str, column_name
  22 ) -> pd.DataFrame:
  23     """
  24     Convenience method to join in a FASTA file as a column.
  25 
  26     This allows us to add the string sequence of a FASTA file as a new column
  27     of data in the dataframe.
  28 
  29     This method only attaches the string representation of the SeqRecord.Seq
  30     object from Biopython. Does not attach the full SeqRecord. Alphabet is
  31     also not stored, under the assumption that the data scientist has domain
  32     knowledge of what kind of sequence is being read in (nucleotide vs. amino
  33     acid.)
  34 
  35     This method mutates the original DataFrame.
  36 
  37     For more advanced functions, please use phylopandas.
  38 
  39     :param df: A pandas DataFrame.
  40     :param filename: Path to the FASTA file.
  41     :param id_col: The column in the DataFrame that houses sequence IDs.
  42     :param column_name: The name of the new column.
  43     """
  44     seqrecords = {
  45         x.id: x.seq.__str__() for x in SeqIO.parse(filename, "fasta")
  46     }
  47     seq_col = [seqrecords[i] for i in df[id_col]]
  48     df[column_name] = seq_col
  49     return df
  50
  [end of janitor/biology.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/janitor/biology.py b/janitor/biology.py
  --- a/janitor/biology.py
  +++ b/janitor/biology.py
  @@ -18,7 +18,7 @@
   @pf.register_dataframe_method
   @deprecated_alias(col_name="column_name")
   def join_fasta(
  -    df: pd.DataFrame, filename: str, id_col: str, column_name
  +    df: pd.DataFrame, filename: str, id_col: str, column_name: str
   ) -> pd.DataFrame:
       """
       Convenience method to join in a FASTA file as a column.
  @@ -36,10 +36,37 @@
   
       For more advanced functions, please use phylopandas.
   
  +    Functional usage example:
  +
  +    .. code-block:: python
  +
  +        import janitor.biology
  +
  +        df = janitor.biology.join_fasta(
  +            df=df,
  +            filename='fasta_file.fasta',
  +            id_col='sequence_accession',
  +            column_name='sequence',
  +        )
  +
  +    Method chaining example:
  +
  +    .. code-block:: python
  +
  +        import pandas as pd
  +        import janitor.biology
  +
  +        df = pd.DataFrame(...).join_fasta(
  +            filename='fasta_file.fasta',
  +            id_col='sequence_accession',
  +            column_name='sequence',
  +        )
  +
       :param df: A pandas DataFrame.
       :param filename: Path to the FASTA file.
       :param id_col: The column in the DataFrame that houses sequence IDs.
       :param column_name: The name of the new column.
  +    :returns: A pandas DataFrame with new FASTA string sequence column.
       """
       seqrecords = {
           x.id: x.seq.__str__() for x in SeqIO.parse(filename, "fasta")
  
verification_info: {"golden_diff": "diff --git a/janitor/biology.py b/janitor/biology.py\n--- a/janitor/biology.py\n+++ b/janitor/biology.py\n@@ -18,7 +18,7 @@\n @pf.register_dataframe_method\n @deprecated_alias(col_name=\"column_name\")\n def join_fasta(\n-    df: pd.DataFrame, filename: str, id_col: str, column_name\n+    df: pd.DataFrame, filename: str, id_col: str, column_name: str\n ) -> pd.DataFrame:\n     \"\"\"\n     Convenience method to join in a FASTA file as a column.\n@@ -36,10 +36,37 @@\n \n     For more advanced functions, please use phylopandas.\n \n+    Functional usage example:\n+\n+    .. code-block:: python\n+\n+        import janitor.biology\n+\n+        df = janitor.biology.join_fasta(\n+            df=df,\n+            filename='fasta_file.fasta',\n+            id_col='sequence_accession',\n+            column_name='sequence',\n+        )\n+\n+    Method chaining example:\n+\n+    .. code-block:: python\n+\n+        import pandas as pd\n+        import janitor.biology\n+\n+        df = pd.DataFrame(...).join_fasta(\n+            filename='fasta_file.fasta',\n+            id_col='sequence_accession',\n+            column_name='sequence',\n+        )\n+\n     :param df: A pandas DataFrame.\n     :param filename: Path to the FASTA file.\n     :param id_col: The column in the DataFrame that houses sequence IDs.\n     :param column_name: The name of the new column.\n+    :returns: A pandas DataFrame with new FASTA string sequence column.\n     \"\"\"\n     seqrecords = {\n         x.id: x.seq.__str__() for x in SeqIO.parse(filename, \"fasta\")\n", "issue": "[DOC] API Documentation for Biology functions is not standardized\n# Brief Description of Fix\r\n\r\n<!-- Please describe the fix in terms of a \"before\" and \"after\". In other words, what's not so good about the current docs\r\npage, and what you would like to see it become. \r\n\r\nExample starter wording is provided. -->\r\n\r\nCurrently, the docs do not have a standard docstring format for functions.\r\n### Example of inconsistent docstring\r\n> (no `Returns`, no `Functional usage example`, no `Method chaining example`)\r\n<img width=\"690\" alt=\"incorrect_func_doc\" src=\"https://user-images.githubusercontent.com/24984410/61177779-6936e100-a5a2-11e9-8332-0c02bad7b5bf.png\">\r\n\r\n### Example of a correct/desired docstring\r\n<img width=\"716\" alt=\"correct_func_doc\" src=\"https://user-images.githubusercontent.com/24984410/61177795-c5016a00-a5a2-11e9-8cd9-415f440d95c2.png\">\r\n\r\nI would like to propose a change, such that now the docs contain a **standardized** docstring suite. All functions should contain (at a minimum) the following:\r\n  - `Parameters`\r\n  - ` Returns`\r\n  - `Functional usage example`\r\n  - `Method chaining example`\r\n\r\n**NOTE**: This can be done for all functions within the `janitor` directory. For ease of review, this will focus on the `biology.py` file and move to other files/functions as time permits.\r\n\r\n# Relevant Context\r\n\r\n<!-- Please put here, in bullet points, links to the relevant docs page. A few starting template points are available\r\nto get you started. -->\r\n\r\n- [Link to documentation page](https://pyjanitor.readthedocs.io/reference/biology.html)\r\n- [Link to exact file to be edited](https://github.com/loganthomas/pyjanitor/blob/dev/janitor/biology.py)\r\n\n[DOC] API Documentation for Biology functions is not standardized\n# Brief Description of Fix\r\n\r\n<!-- Please describe the fix in terms of a \"before\" and \"after\". In other words, what's not so good about the current docs\r\npage, and what you would like to see it become. \r\n\r\nExample starter wording is provided. -->\r\n\r\nCurrently, the docs do not have a standard docstring format for functions.\r\n### Example of inconsistent docstring\r\n> (no `Returns`, no `Functional usage example`, no `Method chaining example`)\r\n<img width=\"690\" alt=\"incorrect_func_doc\" src=\"https://user-images.githubusercontent.com/24984410/61177779-6936e100-a5a2-11e9-8332-0c02bad7b5bf.png\">\r\n\r\n### Example of a correct/desired docstring\r\n<img width=\"716\" alt=\"correct_func_doc\" src=\"https://user-images.githubusercontent.com/24984410/61177795-c5016a00-a5a2-11e9-8cd9-415f440d95c2.png\">\r\n\r\nI would like to propose a change, such that now the docs contain a **standardized** docstring suite. All functions should contain (at a minimum) the following:\r\n  - `Parameters`\r\n  - ` Returns`\r\n  - `Functional usage example`\r\n  - `Method chaining example`\r\n\r\n**NOTE**: This can be done for all functions within the `janitor` directory. For ease of review, this will focus on the `biology.py` file and move to other files/functions as time permits.\r\n\r\n# Relevant Context\r\n\r\n<!-- Please put here, in bullet points, links to the relevant docs page. A few starting template points are available\r\nto get you started. -->\r\n\r\n- [Link to documentation page](https://pyjanitor.readthedocs.io/reference/biology.html)\r\n- [Link to exact file to be edited](https://github.com/loganthomas/pyjanitor/blob/dev/janitor/biology.py)\r\n\n", "before_files": [{"content": "\"\"\"\nBiology and bioinformatics-oriented data cleaning functions.\n\"\"\"\n\nimport pandas as pd\nimport pandas_flavor as pf\n\nfrom .utils import deprecated_alias, import_message\n\ntry:\n    from Bio import SeqIO\nexcept ImportError:\n    import_message(\n        \"biology\", \"biopython\", \"conda install -c conda-forge biopython\"\n    )\n\n\n@pf.register_dataframe_method\n@deprecated_alias(col_name=\"column_name\")\ndef join_fasta(\n    df: pd.DataFrame, filename: str, id_col: str, column_name\n) -> pd.DataFrame:\n    \"\"\"\n    Convenience method to join in a FASTA file as a column.\n\n    This allows us to add the string sequence of a FASTA file as a new column\n    of data in the dataframe.\n\n    This method only attaches the string representation of the SeqRecord.Seq\n    object from Biopython. Does not attach the full SeqRecord. Alphabet is\n    also not stored, under the assumption that the data scientist has domain\n    knowledge of what kind of sequence is being read in (nucleotide vs. amino\n    acid.)\n\n    This method mutates the original DataFrame.\n\n    For more advanced functions, please use phylopandas.\n\n    :param df: A pandas DataFrame.\n    :param filename: Path to the FASTA file.\n    :param id_col: The column in the DataFrame that houses sequence IDs.\n    :param column_name: The name of the new column.\n    \"\"\"\n    seqrecords = {\n        x.id: x.seq.__str__() for x in SeqIO.parse(filename, \"fasta\")\n    }\n    seq_col = [seqrecords[i] for i in df[id_col]]\n    df[column_name] = seq_col\n    return df\n", "path": "janitor/biology.py"}]}