Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(project): experimental strategy data
Browse files Browse the repository at this point in the history
  • Loading branch information
Christine Yu authored and Shane Wilson committed Mar 10, 2015
1 parent 42dded9 commit 918e1de
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 39 deletions.
71 changes: 61 additions & 10 deletions app/scripts/projects/projects.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ module ngApp.projects.controllers {
project: IProject;
availableData: any;
dataTypeNames: string[];
expStrategyNames: string[];
expData: any;
}

class ProjectController implements IProjectController {
availableData: any;
dataTypeNames: string[];
expStrategyNames: string[];
expData: any;

/* @ngInject */
constructor(public project: IProject, private CoreService: ICoreService) {
Expand All @@ -111,16 +115,63 @@ module ngApp.projects.controllers {
}, {});

this.dataTypeNames = ['Clinical',
'Raw microarray data',
'Raw sequencing data',
'Simple nucleotide variation',
'Copy number variation',
'Structural rearrangement',
'Gene expression',
'Protein expression',
'DNA methylation',
'Other'
];
'Raw microarray data',
'Raw sequencing data',
'Simple nucleotide variation',
'Copy number variation',
'Structural rearrangement',
'Gene expression',
'Protein expression',
'DNA methylation',
'Other'
];

this.expData = _.reduce(this.project.summary.experimental_strategies, function(result, dataType) {
result[dataType['experimental_strategy']] = {"file_count": dataType['file_count'],
"participant_count": dataType['participant_count']
};
return result;
}, {});

this.expStrategyNames = [ 'Genotyping Array',
'Gene Expression Array',
'Exon Array',
'miRNA Expression Array',
'Methylation Array',
'CGH Array',
'MSI-Mono-Dinucleotide Assay',
'WGS',
'WGA',
'WXS',
'RNA-Seq',
'miRNA-Seq',
'ncRNA-Seq',
'WCS',
'CLONE',
'POOLCLONE',
'AMPLICON',
'CLONEEND',
'FINISHING',
'ChIP-Seq',
'MNase-Seq',
'DNase-Hypersensitivity',
'Bisulfite-Seq',
'EST',
'FL-cDNA',
'CTS',
'MRE-Seq',
'MeDIP-Seq',
'MBD-Seq',
'Tn-Seq',
'FAIRE-seq',
'SELEX',
'RIP-Seq',
'ChIA-PET',
'DNA-Seq',
'Total RNA-Seq',
'VALIDATION',
'OTHER'
];
}
}

Expand Down
59 changes: 30 additions & 29 deletions app/scripts/projects/templates/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ <h3 class="panel-title" data-translate>Summary</h3>
<div class="panel-heading">
<h3 class="panel-title" data-translate>Experimental Strategy</h3>
</div>
<div class="panel-body" data-ng-if="!prc.project.summary.experimental_strategies">
<h4 class="list-group-item-heading" data-translate>No experimental strategies were found.</h4>
</div>
<table id="experimental-strategy-table" class="table table-striped table-hover table-condensed table-bordered" data-ng-if="prc.project.summary.experimental_strategies">
<table id="experimental-strategy-table" class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<th scope="col" data-translate>Analysis</th>
Expand All @@ -76,31 +73,35 @@ <h4 class="list-group-item-heading" data-translate>No experimental strategies we
</tr>
</thead>
<tbody>
<tr data-ng-repeat="es in prc.project.summary.experimental_strategies">
<td>{{ ::es.experimental_strategy }}</td>
<td class="text-right">
<a data-ui-sref="search.participants({ 'filters':
{{ [
{ name: 'participants.project.project_id',value: prc.project.project_id },
{ name: 'files.experimental_strategy', value: es.experimental_strategy }
] | makeFilter
}}
})">
{{ ::es.participant_count | number:0 }}
</a>
</td>
<td class="text-right">
<a data-ui-sref="search.files({ 'filters':
{{ [
{ name: 'participants.project.project_id',value: prc.project.project_id },
{ name: 'files.experimental_strategy', value: es.experimental_strategy }
] | makeFilter
}}
})">
{{ ::es.file_count | number:0 }}
</a>
</td>
</tr>
<tr data-ng-repeat="name in prc.expStrategyNames">
<td>{{ name }}</td>
<td data-ng-switch="prc.expData[name].participant_count">
<a data-ng-switch-default data-ui-sref="search.participants({ 'filters':
{{ [
{ name: 'participants.project.project_id',value: prc.project.project_id },
{ name: 'files.experimental_strategy', value: name }
] | makeFilter
}}
})">
{{ prc.expData[name].participant_count }}
</a>
<span data-ng-switch-when="undefined">0</span>
<span data-ng-switch-when="0">0</span>
</td>
<td data-ng-switch="prc.expData[name].file_count">
<a data-ng-switch-default data-ui-sref="search.files({ 'filters':
{{ [
{ name: 'participants.project.project_id',value: prc.project.project_id },
{ name: 'files.experimental_strategy', value: name }
] | makeFilter
}}
})">
{{ prc.expData[name].file_count }}
</a>
<span data-ng-switch-when="undefined">0</span>
<span data-ng-switch-when="0">0</span>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit 918e1de

Please sign in to comment.