-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a little tutorial #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, excellent tutorial. I posted a few minor gripes.
|
||
The main interface for reading and writing sequence files is the `dnaio.open` function. | ||
For example, this program reads in a FASTQ file and computes the total number of nucleotides | ||
it contains:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this detect the language automatically? If not the code-block
directive does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven’t seen this file rendered, but the example from the README (which does not use code-block
) is syntax highlighted: https://dnaio.readthedocs.io/en/latest/#example-usage
|
||
As can be seen from the ``.gz`` file extension, | ||
the input file is gzip-compressed. | ||
`dnaio.open` detects and handles this automatically by opening the file with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using single backticks creates referencable text, but not code. Double backticks are needed in the latter case.
Do these references reference back to the API documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the single backticks were intentional. It worked for dnaio.open
in the README, but now I see that it doesn’t work for SequenceRecord
and all the other classes where I don’t have a dnaio.
prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I need to write ~dnaio.SequenceRecord
to get what I want.
doc/tutorial.rst
Outdated
`xopen <https://github.com/pycompression/xopen/>`_. | ||
|
||
Here, the call to `dnaio.open` returns a `FastqReader` object. | ||
Iterating over it in the ``for`` loop results in `SequenceRecord` objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the next line double backticks are used for SequenceRecord. Was this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to create a link only for the first occurrence to avoid too much blue in the text, so this is intentional. (Apart from the fact that it doesn’t work as I discovered now.)
I fixed the nonworking links. |
Excellent! |
No description provided.