Skip to content

Commit 59dad9f

Browse files
Merge pull request #927 from AlexsLemonade/avrohom/921-remove-sample-cell-count-estimate-from-metadata-output
921 - Remove sample_cell_count_estimate from metadata output
2 parents 5fca1d4 + 33c7b6b commit 59dad9f

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

api/scpca_portal/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"demux_samples",
5858
"total_reads",
5959
"mapped_reads",
60-
"sample_cell_count_estimate",
6160
"sample_cell_estimate", # ONLY FOR MULTIPLEXED
6261
"unfiltered_cells",
6362
"filtered_cell_count",

api/scpca_portal/models/library.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,8 @@ def get_combined_library_metadata(self) -> List[Dict]:
197197
combined_metadatas = []
198198
for sample in self.samples.all():
199199
metadata = self.project.get_metadata() | sample.get_metadata() | self.get_metadata()
200-
# Estimate attributes per modality:
201-
# Single Cell: "sample_cell_count_estimate"
202-
# Single Cell Multiplexed: "sample_cell_estimates"
203-
# Spatial: None
204-
if self.modality == Library.Modalities.SPATIAL or self.is_multiplexed:
205-
del metadata["sample_cell_count_estimate"]
200+
201+
# Only single cell multiplexed sample libraries should pass through sample_cell_estimate
206202
if not self.is_multiplexed:
207203
del metadata["sample_cell_estimate"]
208204

api/scpca_portal/models/sample.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def get_metadata(self) -> Dict:
125125

126126
derived_attributes = {
127127
"demux_cell_count_estimate",
128-
"sample_cell_count_estimate",
129128
"includes_anndata",
130129
}
131130
sample_metadata.update({key: getattr(self, key) for key in derived_attributes})

api/scpca_portal/test/expected_values/computed_file_project.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SINGLE_CELL_SCE:
3636
"metadata_only": False,
3737
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
3838
"s3_key": "SCPCP999990_SINGLE-CELL_SINGLE-CELL-EXPERIMENT.zip",
39-
"size_in_bytes": 9077,
39+
"size_in_bytes": 9040,
4040
"workflow_version": "development",
4141
"includes_celltype_report": True,
4242
}
@@ -70,7 +70,7 @@ class SINGLE_CELL_SCE_MULTIPLEXED:
7070
"metadata_only": False,
7171
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
7272
"s3_key": "SCPCP999991_SINGLE-CELL_SINGLE-CELL-EXPERIMENT_MULTIPLEXED.zip",
73-
"size_in_bytes": 9511,
73+
"size_in_bytes": 9473,
7474
"workflow_version": "development",
7575
"includes_celltype_report": True,
7676
}
@@ -102,7 +102,7 @@ class SINGLE_CELL_SCE_MERGED:
102102
"metadata_only": False,
103103
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
104104
"s3_key": "SCPCP999990_SINGLE-CELL_SINGLE-CELL-EXPERIMENT_MERGED.zip",
105-
"size_in_bytes": 8474,
105+
"size_in_bytes": 8437,
106106
"workflow_version": "development",
107107
"includes_celltype_report": True,
108108
}
@@ -138,7 +138,7 @@ class SINGLE_CELL_ANN_DATA:
138138
"metadata_only": False,
139139
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
140140
"s3_key": "SCPCP999990_SINGLE-CELL_ANN-DATA.zip",
141-
"size_in_bytes": 9492,
141+
"size_in_bytes": 9455,
142142
"workflow_version": "development",
143143
"includes_celltype_report": True,
144144
}
@@ -170,7 +170,7 @@ class SINGLE_CELL_ANN_DATA_MERGED:
170170
"metadata_only": False,
171171
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
172172
"s3_key": "SCPCP999990_SINGLE-CELL_ANN-DATA_MERGED.zip",
173-
"size_in_bytes": 8600,
173+
"size_in_bytes": 8563,
174174
"workflow_version": "development",
175175
"includes_celltype_report": True,
176176
}
@@ -229,7 +229,7 @@ class ALL_METADATA:
229229
"metadata_only": True,
230230
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
231231
"s3_key": "SCPCP999990_ALL_METADATA.zip",
232-
"size_in_bytes": 5185,
232+
"size_in_bytes": 5145,
233233
"workflow_version": "development",
234234
"includes_celltype_report": True,
235235
}

api/scpca_portal/test/expected_values/computed_file_sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SINGLE_CELL_SCE:
3030
"metadata_only": False,
3131
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
3232
"s3_key": "SCPCS999990_SINGLE-CELL_SINGLE-CELL-EXPERIMENT.zip",
33-
"size_in_bytes": 7089,
33+
"size_in_bytes": 7057,
3434
"workflow_version": "development",
3535
"includes_celltype_report": True,
3636
}
@@ -60,7 +60,7 @@ class SINGLE_CELL_ANN_DATA:
6060
"metadata_only": False,
6161
"s3_bucket": settings.AWS_S3_OUTPUT_BUCKET_NAME,
6262
"s3_key": "SCPCS999990_SINGLE-CELL_ANN-DATA.zip",
63-
"size_in_bytes": 7401,
63+
"size_in_bytes": 7369,
6464
"workflow_version": "development",
6565
"includes_celltype_report": True,
6666
}

0 commit comments

Comments
 (0)