Clinical-Genomics / trailblazer

Keep track of and manage analyses
MIT License
5 stars 2 forks source link

feature request: cli option to set comment #302

Open mathiasbio opened 10 months ago

mathiasbio commented 10 months ago

Description

Typically the comment section in TB is written manually, but in some cases the information to be written in the comment field can be automatised. Such as in the case below where all fails are associated with failing QC-checks:

image

For these cases I found it convenient to make a small script to extract all failing QC-values, but I still need to input them manually into the comment field. If there was a CLI option I could save some time and make a loop to do it automatically.

I'm sure that there are other scenarios where this feature could be useful as well.

Clarification

When multiple cases fail due to some reason a lot of manual labour is required to fill the comment field with the reason. This should ideally be automatic or there should exists a way to do this programatically.

henrikstranneheim commented 10 months ago

There is an end point for comments that is used in cg. Would it make sense to add such a feature in cg I.e turn your script into a cg cli command?

mathiasbio commented 10 months ago

I don't have a lot of insight into saying where the feature would fit in best, if there's a way to communicate with TB in this manner via CG then that's just as fine a solution from my perspective as a user : )

henrikstranneheim commented 10 months ago

Could you post or link the script here so we can take a look?

mathiasbio commented 10 months ago

I probably made it sound fancier than it is! It was just a shell-script to loop through a list of cases and looking for QC-threshold error messages from balsamic. Normally we have to navigate in hasta to each case dir and open up a text-file and copy-paste. But in the end I have a list of QC errors that we normally write in the TB comment field, and if I were to do the same here it would mean a lot of manually clicking the comment section in TB and copy-paste. /home/mathias.johansson/production/cancer/834629/check_case.sh