-
Notifications
You must be signed in to change notification settings - Fork 2
Added 4 Sphinx gallery python tutorials #43
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
base: main
Are you sure you want to change the base?
Conversation
Thank you. Are you sure the PNG static files should be versioned? |
@iosonofabio Hi Fabio, yes these PNG files in _static folder are manually added for gallery thumbnails and should be versioned :3 |
I disagree
…On Mon, Jun 23, 2025, at 16:02, Amber-Xu914 wrote:
*Amber-Xu914* left a comment (fabilab/cell_atlas_approximations_API#43)
<#43 (comment)>
@iosonofabio <https://github.com/iosonofabio> Hi Fabio, yes these PNG
files in _static folder are manually added for gallery thumbnails and
should be versioned :3
—
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJFEACORS3DCEJWM5UNCCD3FACF7AVCNFSM6AAAAAB75OUUFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOJWGYZDIOBSGM>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
Thanks for the pr. I left a few dozen comments about specific points.
I'm not sure the logos for each tutorial make much sense. Maybe using a dynamic plot from the tutorial itself is more informative?
@@ -149,4 +149,11 @@ dmypy.json | |||
# Files generated during package build and CMD check, unnecessary for the package | |||
atlasapprox.Rcheck/ | |||
.Rhistory | |||
.RData |
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.
What's going on here?
@@ -2,7 +2,8 @@ | |||
Quickstart | |||
========== | |||
|
|||
This example shows a quick and easy example of how to use atlasapprox to get and plot the expression of some gees in a specific organ of a specific organism. | |||
This example shows a quick and easy example of how to use atlasapprox to get and plot the expression of some gees in a |
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.
Typo gees
@@ -19,3 +20,5 @@ | |||
fig, ax = plt.subplots(figsize=(7, 4)) | |||
sns.heatmap(expression, ax=ax) | |||
fig.tight_layout() | |||
|
|||
# sphinx_gallery_thumbnail_path = '_static/quickstart.png' |
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.
Why do you need this?
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
# It's recommended to use a virtual environment to manage dependencies. Run the following command: | ||
# | ||
# ``python -m venv venv`` |
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.
Actually people typically put it into .venv
- with a dot
|
||
# List available organisms | ||
available_organisms = api.organisms() | ||
print(available_organisms) |
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.
Why not just printing the API call directly?
# %% | ||
# Visualizing the data | ||
# -------------------- | ||
# Visualization reveals patterns hidden by raw numbers. Organs vary in sampled cell totals, so raw counts can be misleading—those with more samples may appear to have higher cell type numbers, even if the type is rare. |
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.
Please cut the first clause, it sounds condescending
# %% | ||
# The bar chart indicates macrophages are highly abundant in the lung, comprising | ||
# nearly 35% of sampled cells. This suggests the lung is a primary site for | ||
# macrophage activity, while other organs like liver and bladder show moderate |
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.
Moderate?
# nearly 35% of sampled cells. This suggests the lung is a primary site for | ||
# macrophage activity, while other organs like liver and bladder show moderate | ||
# proportions, and many, such as pancreas and colon, exhibit minimal presence. | ||
# The variation highlights the diverse roles macrophages play across the body's tissues. |
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.
Not sure what this means
# | ||
# For more detailed information, please refer to the `official documentation <https://atlasapprox.readthedocs.io/en/latest/python/index.html>`_. | ||
|
||
# sphinx_gallery_thumbnail_path = '_static/cell_type.png' |
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.
Please let's make these dynamic
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.
Don't you already have a section on marker genes above? It feels like this tutorial might be redundant?
Hi Fabio,
As discussed in the previous lab meeting, I’ve added 4 new tabs to the Sphinx gallery following the existing infrastructure. The source .py files are located in docs/gallery/python.
The gallery includes four Python tutorials now:
• Quickstart
• Beginner guide
• Explore average expression
• Explore cell type
• Explore marker genes
I followed Sphinx documentation conventions for file naming with numbered prefixes to ensure proper display order.
To generate the Sphinx gallery, simply run the make html command.
Please let me know if you have any feedback or require further adjustments.