Skip to content

Commit

Permalink
Added method get_managed_variants to mip rna workflow (#2757)(patch)
Browse files Browse the repository at this point in the history
The `MipRNAAnalysisAPI` didn't have a `get_managed_variants` method which raised an error when running `cg workflow mip-rna start -sa star_fusion hugewasp`

### Added

- Method `get_managed_variants` to `MipRNAAnalysisAPI`

### Changed

- Moved method `write_managed_variants` from `MipDNAAnalysisAPI` to `MipAnalysisAPI` so that it is available also for MipRNA
  • Loading branch information
diitaz93 authored Dec 11, 2023
1 parent f2aca7f commit dc8cd7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions cg/meta/workflow/mip.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,6 @@ def get_pipeline_version(self, case_id: str) -> str:
)
sample_info: MipBaseSampleInfo = MipBaseSampleInfo(**sample_info_raw)
return sample_info.mip_version

def write_managed_variants(self, case_id: str, content: list[str]) -> None:
self._write_managed_variants(out_dir=Path(self.root, case_id), content=content)
3 changes: 0 additions & 3 deletions cg/meta/workflow/mip_dna.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,3 @@ def get_gene_panel(self, case_id: str) -> list[str]:
def get_managed_variants(self) -> list[str]:
"""Create and return the managed variants."""
return self._get_managed_variants(genome_build=GENOME_BUILD_37)

def write_managed_variants(self, case_id: str, content: list[str]) -> None:
self._write_managed_variants(out_dir=Path(self.root, case_id), content=content)
4 changes: 4 additions & 0 deletions cg/meta/workflow/mip_rna.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ def config_sample(self, link_obj, panel_bed: str | None = None) -> dict[str, str
def get_gene_panel(self, case_id: str) -> list[str]:
"""Create and return the aggregated gene panel file."""
return self._get_gene_panel(case_id=case_id, genome_build=GENOME_BUILD_38)

def get_managed_variants(self) -> list[str]:
"""Create and return the managed variants."""
return self._get_managed_variants(genome_build=GENOME_BUILD_38)

0 comments on commit dc8cd7d

Please sign in to comment.