Skip to content

Commit

Permalink
Remove some commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieLF committed Jun 3, 2024
1 parent 1caa6b1 commit 77e537e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 31 deletions.
8 changes: 4 additions & 4 deletions api/routes/project_insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ async def get_project_insights_summary(
"""
Get summary stats for a list of projects and sequencing types
"""
spslayer = ProjectInsightsLayer(connection)
projects_insights_stats = await spslayer.get_project_insights_summary(
pilayer = ProjectInsightsLayer(connection)
projects_insights_stats = await pilayer.get_project_insights_summary(
project_ids=project_ids, sequencing_types=sequencing_types
)

Expand All @@ -44,8 +44,8 @@ async def get_project_insights_details(
"""
Get extensive sequencing group details for a list of projects and sequencing types
"""
spslayer = ProjectInsightsLayer(connection)
projects_insights_details = await spslayer.get_project_insights_details(
pilayer = ProjectInsightsLayer(connection)
projects_insights_details = await pilayer.get_project_insights_details(
project_ids=project_ids, sequencing_types=sequencing_types
)

Expand Down
10 changes: 1 addition & 9 deletions db/python/layers/project_insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ async def get_project_insights_summary(
user=self.author, project_ids=project_ids, readonly=True
)

( # each of these is keyed by (project_id, sequencing_type)
(
total_families_by_project_id_and_seq_fields,
total_participants_by_project_id_and_seq_fields,
total_samples_by_project_id_and_seq_fields,
Expand All @@ -503,13 +503,9 @@ async def get_project_insights_summary(
)

# Get the sequencing groups for each of the analyses in the grouped analyses rows
# (latest_annotate_dataset and latest_es_indices)
# TODO: Add multiQC and other grouped analyses to this
analysis_sequencing_groups = await self.get_analysis_sequencing_groups([latest_annotate_dataset_by_project_id_and_seq_type, latest_es_indices_by_project_id_and_seq_type_and_stage])

# sequencing_platforms = await SequencingPlatformTable(self._connection).get()
sequencing_technologies = await SequencingTechnologyTable(self._connection).get()
# sequencing_types = await SequencingTypeTable(self._connection).get()

# Get all possible permutations of the projects, sequencing types, and sequencing technologies
permutations = itertools.product(projects, sequencing_types, sequencing_technologies)
Expand Down Expand Up @@ -612,13 +608,10 @@ async def get_project_insights_details(
),
)
# Get the sequencing groups for each of the analyses in the grouped analyses rows
# (latest_annotate_dataset and latest_es_indices)
# TODO: Add multiQC and other grouped analyses to this
analysis_sequencing_groups = await self.get_analysis_sequencing_groups([latest_annotate_dataset_by_project_id_and_seq_type, latest_es_indices_by_project_id_and_seq_type_and_stage])

sequencing_platforms = await SequencingPlatformTable(self._connection).get()
sequencing_technologies = await SequencingTechnologyTable(self._connection).get()
# sequencing_types = await SequencingTypeTable(self._connection).get()

# Get all possible permutations of the projects, sequencing types, sequencing platforms, and sequencing technologies
permutations = itertools.product(projects, sequencing_types, sequencing_platforms, sequencing_technologies)
Expand All @@ -631,7 +624,6 @@ async def get_project_insights_details(
continue

if sequencing_technology == 'short-read':
# The grouped analyses rows are keyed by (project_id, sequencing_type)
latest_annotate_dataset = latest_annotate_dataset_by_project_id_and_seq_type[(project.id, sequencing_type)]
latest_snv_es_index = latest_es_indices_by_project_id_and_seq_type_and_stage[(project.id, sequencing_type, 'MtToEs')]
if sequencing_type == 'genome':
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/web.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pylint: disable=too-many-locals, too-many-instance-attributes, too-many-lines
# pylint: disable=too-many-locals, too-many-instance-attributes
import asyncio
import itertools
import json
Expand Down
4 changes: 1 addition & 3 deletions web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ html[data-theme='dark-mode'] .ui.table {
font-weight: bold;
}

/* seqr projects stats dashboard */
/* Project Insights dashboard */
.html-tooltip .MuiTooltip-tooltip {
background-color: #f5f5f9;
color: rgba(0, 0, 0, 0.87);
Expand All @@ -327,11 +327,9 @@ html[data-theme='dark-mode'] .ui.table {
.ui.table .table-cell {
text-align: center;
vertical-align: middle;
/* font-size: 0.8em; */
color: var(--color-text-primary) !important;
word-wrap: break-word !important;
overflow-wrap: break-word !important;
/* white-space: normal !important; */
}

.ui.table .header-cell {
Expand Down
14 changes: 0 additions & 14 deletions web/src/pages/projectInsights/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,12 @@ const Details: React.FC = () => {
selectedSampleExtIds.includes(item.sample_ext_ids[0])) &&
(selectedSequencingGroupIds.length === 0 ||
selectedSequencingGroupIds.includes(item.sequencing_group_id)) &&
// (selectedCompletedCram.length === 0 ||
// (selectedCompletedCram.includes('Yes') && item.completed_cram) ||
// (selectedCompletedCram.includes('No') && !item.completed_cram)) &&
(selectedCompletedCram.length === 0 ||
selectedCompletedCram.includes(item.completed_cram ? 'Yes' : 'No')) &&
// (selectedInLatestAnnotateDataset.length === 0 ||
// (selectedInLatestAnnotateDataset.includes('Yes') &&
// item.in_latest_annotate_dataset) ||
// (selectedInLatestAnnotateDataset.includes('No') &&
// !item.in_latest_annotate_dataset)) &&
(selectedInLatestAnnotateDataset.length === 0 ||
selectedInLatestAnnotateDataset.includes(
item.in_latest_annotate_dataset ? 'Yes' : 'No'
)) &&
// (selectedInLatestSnvEsIndex.length === 0 ||
// (selectedInLatestSnvEsIndex.includes('Yes') && item.in_latest_snv_es_index) ||
// (selectedInLatestSnvEsIndex.includes('No') && !item.in_latest_snv_es_index)) &&
// (selectedInLatestSvEsIndex.length === 0 ||
// (selectedInLatestSvEsIndex.includes('Yes') && item.in_latest_sv_es_index) ||
// (selectedInLatestSvEsIndex.includes('No') && !item.in_latest_sv_es_index)) &&
(selectedInLatestSnvEsIndex.length === 0 ||
selectedInLatestSnvEsIndex.includes(item.in_latest_snv_es_index ? 'Yes' : 'No')) &&
(selectedInLatestSvEsIndex.length === 0 ||
Expand Down

0 comments on commit 77e537e

Please sign in to comment.