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 self.anchor to prepend plot IDs to make sure custom anchor is applied #2206

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vladsavelyev
Copy link
Member

@vladsavelyev vladsavelyev commented Dec 1, 2023

Use self.anchor to prepend plot IDs to make sure custom anchor is applied
Helpful when module is run twice with a module_order config:

module_order:
  - fastqc:
      name: "FastQC (trimmed)"
      anchor: "fastqc_trimmed"
      info: "This section of the report shows FastQC results after adapter trimming."
      target: ""
      path_filters:
        - "*_1_trimmed_fastqc.zip"
  - cutadapt
  - fastqc:
      name: "FastQC (raw)"
      anchor: "fastqc_raw"
      path_filters:
        - "*_1_fastqc.zip"

In the result, instead of numerical suffixes in the JSON outputs:

"fastqc_sequence_length_distribution_plot": {
...
"fastqc_per_base_sequence_quality_plot": {
...
"fastqc_per_base_sequence_quality_plot-1": {
...

It becomes more clear which data belongs to which section:

"fastqc_trimmed_sequence_length_distribution_plot": {
...
"fastqc_trimmed_per_base_sequence_quality_plot": {
...
"fastqc_raw_per_base_sequence_quality_plot": {

Which is especially relevant for the sequence_length_distribution plot that would only be built for trimmed reads, and would always be skipped for raw reads due to identical sequence length.

Only fastqc module for now - WIP.

Fixes #2076
Fixes #2203

UPD: Should probably make it automatic, which requires #2036 to be completed first

@vladsavelyev vladsavelyev added core: back end WIP Work in progress labels Dec 1, 2023
@ewels
Copy link
Member

ewels commented Dec 11, 2023

Maybe we can do this prepending of the anchor to the ID in the table / plot code instead, so that people don't have to manually remember to do it.

Means we have to clean up the duplicated prefixes across all modules 😱 and where possible avoid changes in the resulting IDs, but hopefully not too bad..

@ewels
Copy link
Member

ewels commented Dec 12, 2023

Maybe fits nicely into the refactoring that we're doing for #1051

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core: back end WIP Work in progress
Projects
None yet
3 participants