Skip to content

Commit

Permalink
Merge pull request #263 from bento-platform/develop
Browse files Browse the repository at this point in the history
Version 2.2.7
  • Loading branch information
zxenia authored Aug 3, 2021
2 parents e151bee + dcee675 commit 674d6a2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chord_metadata_service/package.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[package]
name = katsu
version = 2.2.6
version = 2.2.7
authors = Ksenia Zaytseva, David Lougheed, Simon Chénard, Romain Grégoire
34 changes: 34 additions & 0 deletions chord_metadata_service/patients/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,40 @@ def filter_search(self, qs, name, value):
"phenopackets__hts_files__genome_assembly",
Cast("phenopackets__hts_files__individual_to_sample_identifiers", TextField()),
Cast("phenopackets__hts_files__extra_properties", TextField()),

# Experiment fields
"phenopackets__biosamples__experiment__study_type",
"phenopackets__biosamples__experiment__experiment_type",
Cast("phenopackets__biosamples__experiment__experiment_ontology", TextField()),
"phenopackets__biosamples__experiment__molecule",
Cast("phenopackets__biosamples__experiment__molecule_ontology", TextField()),
"phenopackets__biosamples__experiment__library_strategy",
"phenopackets__biosamples__experiment__library_source",
"phenopackets__biosamples__experiment__library_selection",
"phenopackets__biosamples__experiment__library_layout",
"phenopackets__biosamples__experiment__extraction_protocol",
"phenopackets__biosamples__experiment__reference_registry_id",
Cast("phenopackets__biosamples__experiment__extra_properties", TextField()),
# Experiments: Experiment Results fields
"phenopackets__biosamples__experiment__experiment_results__description",
"phenopackets__biosamples__experiment__experiment_results__filename",
"phenopackets__biosamples__experiment__experiment_results__file_format",
"phenopackets__biosamples__experiment__experiment_results__data_output_type",
"phenopackets__biosamples__experiment__experiment_results__usage",
"phenopackets__biosamples__experiment__experiment_results__creation_date",
"phenopackets__biosamples__experiment__experiment_results__created_by",
Cast(
"phenopackets__biosamples__experiment__experiment_results__extra_properties",
TextField()
),
# Experiments: Instrument fields
"phenopackets__biosamples__experiment__instrument__platform",
"phenopackets__biosamples__experiment__instrument__description",
"phenopackets__biosamples__experiment__instrument__model",
Cast(
"phenopackets__biosamples__experiment__instrument__extra_properties",
TextField()
),
)
).filter(search=value).distinct("id")
return qs
2 changes: 2 additions & 0 deletions chord_metadata_service/phenopackets/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Interpretation,
)
from chord_metadata_service.resources.serializers import ResourceSerializer
from chord_metadata_service.experiments.serializers import ExperimentSerializer
from chord_metadata_service.restapi import fhir_utils
from chord_metadata_service.restapi.serializers import GenericSerializer

Expand Down Expand Up @@ -156,6 +157,7 @@ class BiosampleSerializer(GenericSerializer):
read_only=True, many=True, exclude_when_nested=['id', 'biosample'])
procedure = ProcedureSerializer(exclude_when_nested=['id'])
variants = VariantSerializer(read_only=True, many=True)
experiments = ExperimentSerializer(read_only=True, many=True, source='experiment_set')

class Meta:
model = Biosample
Expand Down

0 comments on commit 674d6a2

Please sign in to comment.