diff --git a/src/azul/plugins/metadata/anvil/indexer/transform.py b/src/azul/plugins/metadata/anvil/indexer/transform.py index 3b56bcba3..f14331560 100644 --- a/src/azul/plugins/metadata/anvil/indexer/transform.py +++ b/src/azul/plugins/metadata/anvil/indexer/transform.py @@ -360,7 +360,8 @@ def _only_dataset(self) -> MutableJSON: 'activity', 'alignmentactivity', 'assayactivity', - 'sequencingactivity' + 'sequencingactivity', + 'variantcallingactivity' } diff --git a/src/azul/plugins/repository/tdr_anvil/__init__.py b/src/azul/plugins/repository/tdr_anvil/__init__.py index 6df72ccd8..76aa5fcc6 100644 --- a/src/azul/plugins/repository/tdr_anvil/__init__.py +++ b/src/azul/plugins/repository/tdr_anvil/__init__.py @@ -329,6 +329,15 @@ def _upstream_from_files(self, FROM file AS f JOIN {backtick(self._full_table_name(source, 'sequencingactivity'))} AS sqa ON f.file_id IN UNNEST(sqa.generated_file_id) + UNION ALL SELECT + f.file_id, + 'variantcallingactivity', + vca.variantcallingactivity_id, + vca.used_file_id, + [] + FROM file AS f + JOIN {backtick(self._full_table_name(source, 'variantcallingactivity'))} AS vca + ON f.file_id IN UNNEST(vca.generated_file_id) UNION ALL SELECT f.file_id, 'activity', @@ -419,6 +428,12 @@ def _downstream_from_files(self, ala.used_file_id, ala.generated_file_id FROM {backtick(self._full_table_name(source, 'alignmentactivity'))} AS ala + UNION ALL SELECT + vca.variantcallingactivity_id, + 'variantcallingactivity', + vca.used_file_id, + vca.generated_file_id + FROM {backtick(self._full_table_name(source, 'variantcallingactivity'))} AS vca UNION ALL SELECT a.activity_id, 'activity', @@ -555,6 +570,12 @@ def convert_column(value): 'activity_type', 'assay_type', 'data_modality', + }, + 'variantcallingactivity': { + 'variatncallingactivity_id', + 'activity_type', + 'reference_assembly', + 'data_modality' } }