Skip to content
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

Merged
merged 2 commits into from Apr 8, 2022
Merged

Add a little tutorial #72

merged 2 commits into from Apr 8, 2022

Conversation

marcelm
Copy link
Owner

@marcelm marcelm commented Apr 8, 2022

No description provided.

Copy link
Collaborator

@rhpvorderman rhpvorderman left a 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::
Copy link
Collaborator

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.

Copy link
Owner Author

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
Copy link
Collaborator

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?

Copy link
Owner Author

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.

Copy link
Owner Author

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.
Copy link
Collaborator

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?

Copy link
Owner Author

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.)

@marcelm
Copy link
Owner Author

marcelm commented Apr 8, 2022

I fixed the nonworking links.

@rhpvorderman
Copy link
Collaborator

Excellent!

@rhpvorderman rhpvorderman merged commit 7162658 into main Apr 8, 2022
@rhpvorderman rhpvorderman deleted the tutorial branch April 8, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants