cgat-developers / cgat-flow

cgat-flow repository
MIT License
13 stars 9 forks source link

CGATReport parameterization for cgat-flow pipelines #42

Closed IanSudbery closed 5 years ago

IanSudbery commented 6 years ago

The readqc pipeline reads gets the PARAMS dictionary from CGATReport.Utils. This dictionary should have been filled in conf.py, but seems to be empty in pipeline_docs/pipeline_readqc/tracks/ReadqcReport.py.

For example, create a readqc pipeline with the following:

cgatflow readqc config

Edit the resulting pipeline.yml so that it contains the following line:

readqc:
    backend: sqlite:////path/to/somewhere/else

Now add the following code to cgat-flow/CGATPipelines/pipeline_docs/pipeline_readqc/trackers/ReadqcReport.py, below the parametrization block:

with open("test", "w") as f:
    f.write("Database is {}".format(DATABASE)+"\n")
    f.write("PARAMS dict contains:\n")
    for x in P.keys():
        f.write("{}: {}\n".format((x, P[x])))

now run the report with:

cgatflow readqc build_report

You'll find the resulting test file contains:

Database is sqlite:///./csvdb
PARAMs dict contains:

What is the status of the CGATReport reports at the moment? Are they still supported? If so they need updating to cope with changes in CGATReport and the move from ini files to yml files. If not, then they should probably be removed before publication.

sebastian-luna-valero commented 6 years ago

ping @AndreasHeger

AndreasHeger commented 6 years ago

Hi both, CGATReport status at the moment is uncertain. The reports need updating and maintaining which I can't do as I currently don't have the bandwidth. My main objective is thus at the moment to ignore visualization but instead to clear up the pipelines to provide a set of few and simple tables to facilitate plotting in notebooks, Rmarkdown, etc.

AndreasHeger commented 6 years ago

(CGATReport itself is still well and alive as I use it for other projects)

IanSudbery commented 6 years ago

Whats the way forward here then? Should we not try to fix bugs in the cgat-flow reports. Should they be removed?

AndreasHeger commented 6 years ago

I guess the action depends on what we want to do long-term. We need to make a decision if the reports are useful and we want to keep them. If we keep them, we need to come up with a way to maintain them.

Acribbs commented 5 years ago

I think we should start to remove all references to cgat-report in the production pipelines, considering that they are broken and I dont think any of us has time to fix them. Whats the consensus?

AndreasHeger commented 5 years ago

I am happy with this.