Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
veghp committed Apr 10, 2023
1 parent 334e53d commit 889a28c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ This will return *protein* records, which will be saved with a GenPept extension
(.gp) by ``records_to_genbank(biopython_records, is_protein=True)``,
unless specified otherwise with ``extension=``.

You can also save annotated sequences as colourful word docs.
You can also save annotated sequences as colourful Word docs.
``write_crazydoc()`` takes a SeqRecord, the qualifier key to use as a feature name,
and a path to save the document to.

.. code:: python
# Load an annotated sequence with biopython
# Load an annotated sequence with Biopython
from Bio import SeqIO
from crazydoc import write_crazydoc
seq = SeqIO.read("examples/examples_outputs/Sequence 1.gbk", "genbank")
Expand Down
8 changes: 4 additions & 4 deletions crazydoc/crazydoc_writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,12 @@ def _write_legend(feature_formats, doc):

def write_crazyseq(seqrec, qualifier, doc, formats=formats):
"""Write a single sequence with annotated features to an existing
document element. If you want to crazydocs to handle document
document element. If you want crazydocs to handle document
creation use `write_crazydoc()` even for single sequences.
Args:
seqrec (SeqRecord): The sequence to write, with features
qualifier (str): The key of the .qualifier to use as feature names
seqrec (SeqRecord): The sequence to write, with features.
qualifier (str): The key of the .qualifier to use as feature names.
doc (docx document): The docx document element to write to.
formats (list, optional): List of format groups to use on features.
"""
Expand Down Expand Up @@ -302,7 +302,7 @@ def write_crazydoc(seqs, qualifier, path, formats=formats):
Examples:
A custom list of docx formats can be supplied to the `formats` argument.
If `formats` is not declared a default pallete is used.
If `formats` is not declared a default palette is used.
>>>from docx.shared import RGBColor
>>>from docx.enum.text import WD_COLOR
Expand Down
7 changes: 3 additions & 4 deletions tests/test_writer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Tests for CrazydocWriters
Tests for Crazydoc writer
"""
import os
import pytest
Expand Down Expand Up @@ -38,10 +38,9 @@ def test_writer_doesnt_change_feature_locations(tmpdir):
assert locations == written_locations


###############
########################################################################################
# Custom seq example
# too many groups

r = SeqRecord(Seq("abcdefghijklmnop"), id="eg")
for i in range(6):
f = SeqFeature(SimpleLocation(0, 2), qualifiers={"note": i})
Expand All @@ -54,7 +53,7 @@ def test_too_many_groups(tmpdir):
write_crazydoc(r, "note", output_path)


################
########################################################################################
# custom seq example
# too many features in a group
r = SeqRecord(Seq("abcdefghijklmnop"), id="eg")
Expand Down

0 comments on commit 889a28c

Please sign in to comment.