Skip to content

Commit

Permalink
Neither BitBucket or GitHub currently allow include in *.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Jan 22, 2014
1 parent df3ebf0 commit d0b80ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reading_sequence_files/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ Instead, using your favourite editor (e.g. ``nano`` or ``gedit``) create a plain
text file (in the same directory as the *E. coli* files) named ``count_fasta.py``
which contains the following::

.. include:: count_fasta.py
from Bio import SeqIO
filename = "NC_000913.faa"
count = 0
for record in SeqIO.parse(filename, "fasta"):
count = count + 1
print("There were " + str(count) + " records in file " + filename)

This time it should be easy to copy & paste in one go. We can now run this::

Expand Down

0 comments on commit d0b80ea

Please sign in to comment.