NationalGenomicsInfrastructure / ngi_reports

Code to generate reports for use by the NGI in SciLifeLab

Home Page:http://nationalgenomicsinfrastructure.github.io/ngi_reports/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to override library method

sylvinite opened this issue · comments

Currently if an unsupported library method is written in statusDB the only way to still generate a project_summary report is to edit the entry directly in statusDB. It would be very nice to be able to override this behavior by adding the correct library method on the command line rather than digging in the database.

You could say the same about nearly every field though, and that's a lot of command line options (and ngi_reports was designed to be as report-type agnostic as possible).

Instead, maybe better to generate a report with a blank space? Then the generated Markdown file can be edited manually (this is the idea behind using markdown in the first place) and HTML / PDF reports generated from that.

If it needs to be done enough times that this process is annoying, I guess it should probably be in statusDB?

One could add a --force command or similar that either substitutes bad values with blank spaces or just add them to the report as is.

Yeah, adding 'as is' is probably better still. If it logs a warning message when it happens it should be ok? Or yes, --force would be good if we're worried.

Now it logs ERROR or WARN, and print 'NA' or ' '. But problem to this particular issue is, the "library construction method" string in DB is supposed to be in one particular format. So seems like it was updated and we do not know about that. So I will discuss it with Mattias and update in the code directly.

--force is good option, but it might not be very useful in this particular scenario cause "Library Construction Method" is a ',' separated string. We will split it and assign each element to each category, so one should know which index is which category. Of course one could assume, but I prefer it to be empty while logging the problem.