Clinical-Genomics/cg

Bug: CLI command rna-to-scout not checking if case is an RNA case

Closed this issue · 0 comments

Describe the bug
If a user runs the command cg upload rna-to-scout <case_id>and the case ID is not an RNA case, the alignment files will still be uploaded to the case sharing the same subject ID.
It happened to me that I mistakenly ran cg upload rna-to-scout with a balsamic case and CRAM files were uploaded to it's corresponding mip-dna case.

I can provide the log of the upload when I ran the command.

To Reproduce
Steps to reproduce the behavior:

  1. Run cg upload rna-to-scout <case_id> with a balsamic case that has a corresponding mip-dna case

Expected behavior
A check should be made to make sure that the case is an RNA case before the command is executed.
An error should be raise if one tries to run cg upload rna-to-scout command on a non-rna case.

Additional context
This happened when I was re-uploading rna cases to their corresponding mip-dna cases (customer request) and the balsamic case was in my case list (which was a mistake).