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

Use a TrueType font for plotting sequence names with last/dotplot. #7404

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

charles-plessy
Copy link
Contributor

@charles-plessy charles-plessy commented Jan 31, 2025

The last-dotplot command normally picks scalable fonts by default but did not manage to do so on the conda install in the images. Therefore I hardcode the path (which is likely to change when the images are updated).

Not using a scalable font prevents users from changing the font size using the command-line argument -s of last-dotplot.

In addition, I found that the CI tests did not check the outputted images, and corrected that too in this commit.

PR checklist

Closes #XXX

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

The `last-dotplot` command normally picks scalable fonts by default but
did not manage to do so on the conda install in the images.  Therefore I
hardcode the path (which is likely to change when the images are
updated).

Not using a scalable font prevents users from changing the font size
using the command-line argument `-s` of `last-dotplot`.

In addition, I found that the CI tests did not check the outputted
images, and corrected that too in this commit.
@charles-plessy
Copy link
Contributor Author

Thanks @mashehu but the failing tests on conda revealed a real problem that I do not know how to solve now… I asked the following question on Slack:

I need to access a file that is in /opt/conda/pkgs/pillow-11.1.0-py313h8db990d_0/info/test/Tests/fonts/FreeMono.ttf in the Docker and Singularity images, but apparently it is elsewhere when using the conda runner. I have never used conda directly. How can I find the path to that file ?

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.

2 participants