Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GeneticsCore/resources/etls/MHC_Typing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<column>marker</column>
<column>result</column>
<column>assaytype</column>
<column>librarytype</column>
<column>score</column>
<column>totalTests</column>
<column>objectid</column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SELECT
s.totalRecords as totalTests,
s.status as result,
cast('SSP' as varchar) as assaytype,
'N/A' as librarytype,
NULL as score

FROM assay.SSP_assay.SSP.SSP_Summary s
Expand All @@ -27,6 +28,7 @@ SELECT
count(*) as totalTests,
cast('POS' as varchar) as result,
cast('SBT' as varchar) as assaytype,
a.analysisId.readset.libraryType as librarytype,
sum(a.result) / (SELECT count(DISTINCT a2.analysisId) as total FROM assay.GenotypeAssay.Genotype.Data a2 WHERE a2.subjectId = a.subjectId AND a2.run.assayType = 'SBT' ) AS score,

FROM assay.GenotypeAssay.Genotype.Data a
Expand All @@ -42,6 +44,7 @@ DISTINCT s.subjectId,
1 as totalTests,
cast('NEG' as varchar) as result,
cast('SBT' as varchar) as assaytype,
null as librarytype,
NULL as score,

--we want any IDs with SBT data, but lacking data for these special-cased markers
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE geneticscore.mhc_data ADD librarytype varchar(1000);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE geneticscore.mhc_data ADD libraryType varchar(1000);
3 changes: 3 additions & 0 deletions GeneticsCore/resources/schemas/geneticscore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<ns:column columnName="assaytype">
<ns:columnTitle>Assay Type</ns:columnTitle>
</ns:column>
<ns:column columnName="librarytype">
<ns:columnTitle>Library Type</ns:columnTitle>
</ns:column>
<ns:column columnName="objectid">
<ns:columnTitle>Key</ns:columnTitle>
<ns:isHidden>true</ns:isHidden>
Expand Down
6 changes: 6 additions & 0 deletions GeneticsCore/resources/views/mhcDataDashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
schemaName: 'geneticscore',
queryName: 'mhc_data'
})
},{
name: 'Manage Library Types',
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
schemaName: 'sequenceanalysis',
queryName: 'library_types'
})
}]
},{
header: 'Data Archival',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
return 17.14;
return 17.15;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private void processSubject(PipelineJob job, String subject) throws PipelineJobE
}

List<Map<String, Object>> toInsert = new ArrayList<>();
Set<String> fields = PageFlowUtil.set("subjectid", "marker", "result", "assaytype", "totalTests", "score");
Set<String> fields = PageFlowUtil.set("subjectid", "marker", "result", "assaytype", "totalTests", "score", "librarytype");
new TableSelector(us.getTable("mhc_data_source"), fields, new SimpleFilter(FieldKey.fromString("subjectId"), subject), null).forEachResults(rs -> {
CaseInsensitiveHashMap<Object> map = new CaseInsensitiveHashMap<>();
for (String f : fields)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ SELECT
null as shortName,
sum(t.totalTests) as totalTests,
t.result,
GROUP_CONCAT(distinct t.assaytype) as type
GROUP_CONCAT(distinct t.assaytype) as type,
GROUP_CONCAT(distinct t.libraryType) as libraryTypes

FROM geneticscore.mhc_data t
GROUP BY t.subjectid, t.marker, t.result