Hi all, thanks for this awesome tool, and community!
I have multiple samples that are associated with custom plots - I would like to create a module for each sample and use the self.add_section functionality to add the custom plots. Here is a simple abstraction of the factory function+class
def test_factory(sample, images)
class TestModule(BaseMultiqcModule):
def __init__(self):
super(TestModule, self).__init__(name=sample, anchor=sample)
for i, image enumerate(images):
self.add_section(
name=sample + "_" + str(i),
anchor=sample,
content=image
)
return TestModule
I have a hook that calls this function at ‘execution_start’ after globing a bunch of images.
This hook is registered in setup.py.
def trigger_fcn():
sample_to_images = default_dict {str: List[Path]}
for sample, images in sample_to_images.items():
test_factory(sample, images)()
The only problem is my does not return entries for these samples - am I missing something here? Does MultiQC not support this kind of pattern?