Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2cf9cc8
Update logic used to filter variant coding potential
bbimber May 14, 2024
6316d31
Add more filtering of SnpEff coding potential
bbimber May 16, 2024
4e9bd3b
Add filter to ETL
bbimber May 30, 2024
e551197
Add MCC field for litter
bbimber Jun 4, 2024
e4f15bf
Merge discvr-23.11 to discvr-24.3
bbimber Jun 5, 2024
b2fb1d5
Merge pull request #159 from bimberlabinternal/24.3_fb_merge
bbimber Jun 5, 2024
8daa92a
Add field to calculate litterMates
bbimber Jun 5, 2024
c823024
Drop unused bissnp code
bbimber Jun 12, 2024
0db3bb5
Bump braces from 3.0.2 to 3.0.3 in /mcc
dependabot[bot] Jun 13, 2024
51ced78
Merge discvr-23.11 to discvr-24.3
bbimber Jun 13, 2024
035777a
Merge pull request #160 from bimberlabinternal/dependabot/npm_and_yar…
bbimber Jun 13, 2024
bd366ad
Merge pull request #161 from bimberlabinternal/24.3_fb_merge
bbimber Jun 13, 2024
6c2f9e8
Update MCC shipping window to allow multiple IDs at once (#162)
bbimber Jun 14, 2024
02526dc
Merge discvr-23.11 to discvr-24.3
bbimber Jun 22, 2024
c8346c2
Merge pull request #164 from bimberlabinternal/24.3_fb_merge
bbimber Jun 23, 2024
632d11d
Bugfix to MCC alias assignment code
bbimber Jul 9, 2024
a434a5b
Wrap cache in JBrowseLuceneSearch to allow closing of readers
bbimber Jul 10, 2024
c943707
Revert "Wrap cache in JBrowseLuceneSearch to allow closing of readers"
bbimber Jul 10, 2024
c9f15a7
Clear lucene cache in Lucene ETL
bbimber Jul 10, 2024
d6cbaba
Merge pull request #165 from bimberlabinternal/23.11_fb_cachingProdFix
bbimber Jul 11, 2024
f437d3a
Merge discvr-23.11 to discvr-24.3
bbimber Jul 11, 2024
7d89782
Merge pull request #166 from bimberlabinternal/24.3_fb_merge
bbimber Jul 11, 2024
95a6c4b
Merge discvr-24.3 to develop
bbimber Jul 14, 2024
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 MccColony/resources/queries/study/demographics/.qview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<column name="Id/MostRecentWeight/MostRecentWeightGrams"/>
<column name="Id/MostRecentWeight/MostRecentWeightDate"/>
<column name="alternateIds"/>
<column name="litterId"/>
<column name="excludeFromCensus"/>
<column name="Id/mostRecentObservations/availability::observation">
<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package org.labkey.mgap.columnTransforms;

import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.jbrowse.JBrowseService;
import org.labkey.api.pipeline.PipelineJobException;
import org.labkey.api.sequenceanalysis.run.SimpleScriptWrapper;
import org.labkey.mgap.etl.EtlQueueManager;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class LuceneIndexTransform extends OutputFileTransform
{
Expand All @@ -27,6 +24,7 @@ protected File doFileCopy(File f, File subdir, @Nullable String name) throws Pip
// NOTE: lucene is a special case since the DB tracks one file, but we need this whole folder:
File sourceDir = f.getParentFile();
File targetDir = new File(subdir, "LuceneIndex");
JBrowseService.get().clearLuceneCacheEntry(targetDir);
EtlQueueManager.get().queueRsyncCopy(getContainerUser().getContainer(), sourceDir, targetDir);

return new File(targetDir, sourceDir.getName() + "/" + f.getName());
Expand Down
5 changes: 2 additions & 3 deletions mGAP/src/org/labkey/mgap/pipeline/mGapSummarizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private static class FieldData
public static void filterCodingPotential(Set<String> codingPotential)
{
//due to overlapping transcripts, this is often added. remove these less-specific terms in order
for (String type : Arrays.asList("intragenic_variant", "non_coding_transcript_variant", "intron_variant"))
for (String type : Arrays.asList("custom", "intergenic_variant", "intragenic_variant"))
{
if (codingPotential.size() > 1)
{
Expand All @@ -184,9 +184,8 @@ public static void filterCodingPotential(Set<String> codingPotential)

if (codingPotential.contains("synonymous_variant") || codingPotential.contains("missense_variant"))
{
codingPotential.remove("intergenic_variant");
codingPotential.remove("intragenic_variant");
codingPotential.remove("non_coding_transcript_variant");
codingPotential.remove("intron_variant");
}
}

Expand Down
14 changes: 7 additions & 7 deletions mcc/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions mcc/resources/etls/mcc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<column>objectid</column>
</sourceColumns>
</source>
<destination schemaName="study" queryName="Demographics" targetOption="truncate" bulkLoad="true">
<destination schemaName="study" queryName="Demographics" targetOption="truncate" bulkLoad="true" batchSize="5000">
<alternateKeys>
<column name="objectid"/>
</alternateKeys>
Expand All @@ -56,7 +56,7 @@
<column>objectid</column>
</sourceColumns>
</source>
<destination schemaName="study" queryName="kinship" targetOption="truncate" bulkLoad="true">
<destination schemaName="study" queryName="kinship" targetOption="truncate" bulkLoad="true" batchSize="5000">
<alternateKeys>
<column name="objectid"/>
</alternateKeys>
Expand All @@ -72,7 +72,7 @@
<column>objectid</column>
</sourceColumns>
</source>
<destination schemaName="study" queryName="weight" targetOption="truncate" bulkLoad="true">
<destination schemaName="study" queryName="weight" targetOption="truncate" bulkLoad="true" batchSize="5000">
<alternateKeys>
<column name="objectid"/>
</alternateKeys>
Expand All @@ -89,7 +89,7 @@
<column>objectid</column>
</sourceColumns>
</source>
<destination schemaName="study" queryName="genomicDatasets" targetOption="truncate" bulkLoad="true">
<destination schemaName="study" queryName="genomicDatasets" targetOption="truncate" bulkLoad="true" batchSize="5000">
<alternateKeys>
<column name="objectid"/>
</alternateKeys>
Expand All @@ -106,7 +106,7 @@
<column>objectid</column>
</sourceColumns>
</source>
<destination schemaName="study" queryName="clinical_observations" targetOption="truncate" bulkLoad="true">
<destination schemaName="study" queryName="clinical_observations" targetOption="truncate" bulkLoad="true" batchSize="5000">
<alternateKeys>
<column name="objectid"/>
</alternateKeys>
Expand All @@ -127,7 +127,7 @@
<column>marmosetsShipped</column>
</sourceColumns>
</source>
<destination schemaName="mcc" queryName="census" targetOption="truncate" bulkLoad="true">
<destination schemaName="mcc" queryName="census" targetOption="truncate" bulkLoad="true" batchSize="5000">

</destination>
</transform>
Expand Down
4 changes: 4 additions & 0 deletions mcc/resources/queries/mcc/aggregatedDemographics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ SELECT
WHEN d.calculated_status = 'Alive' AND (SELECT COUNT(f.flag.value) as total FROM "/data/Colonies/SNPRC/".study.flags f WHERE f.Id = d.Id AND f.isActive = true) > 0 THEN true
ELSE false
END as u24_status,
d.litterId,
d.Id.mostRecentDeparture.mostRecentDeparture,
o.availability,
o.current_housing_status,
Expand Down Expand Up @@ -67,6 +68,7 @@ SELECT
WHEN d.calculated_status = 'Alive' AND (SELECT COUNT(f.flag.value) as total FROM "/data/Colonies/WNPRC/".study.flags f WHERE f.Id = d.Id AND f.isActive = true) > 0 THEN true
ELSE false
END as u24_status,
d.litterId,
d.Id.mostRecentDeparture.mostRecentDeparture,
o.availability,
o.current_housing_status,
Expand Down Expand Up @@ -112,6 +114,7 @@ SELECT
d.objectid,
d.calculated_status,
d.u24_status,
d.litterId,
d.Id.mostRecentDeparture.mostRecentDeparture,
o.availability,
o.current_housing_status,
Expand Down Expand Up @@ -160,6 +163,7 @@ SELECT
d.objectid,
d.calculated_status,
d.u24_status,
d.litterId,
d.Id.mostRecentDeparture.mostRecentDeparture,
o.availability,
o.current_housing_status,
Expand Down
7 changes: 7 additions & 0 deletions mcc/resources/queries/study/demographics.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ function onUpsert(helper, scriptErrors, row, oldRow){
}
}

if (oldRow && oldRow.Id) {
var existingId = triggerHelper.getMccAlias(oldRow.Id);
if (existingId) {
idToMccAlias[row.Id] = existingId;
}
}

if (!row.date) {
row.date = new Date();
}
Expand Down
9 changes: 8 additions & 1 deletion mcc/resources/queries/study/demographics.query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<deleteUrl />
<columns>
<column columnName="Id">
<url></url>
<url />
</column>
<column columnName="date">
<isHidden>true</isHidden>
Expand Down Expand Up @@ -121,6 +121,13 @@
<column columnName="alternateIds">
<columnTitle>Alternate IDs</columnTitle>
</column>
<column columnName="litterId">
<columnTitle>Litter ID</columnTitle>
<url>/query/executeQuery.view?schemaName=study&amp;
query.queryName=Demographics&amp;
query.litterId~eq=${litterId}
</url>
</column>
<column columnName="remark">

</column>
Expand Down
1 change: 1 addition & 0 deletions mcc/resources/queries/study/demographics/.qview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<column name="usage_current"/>
<column name="usage_future"/>
<column name="date_of_observations"/>
<column name="litterId"/>
</columns>
<sorts>
<sort column="Id" descending="false"/>
Expand Down
23 changes: 23 additions & 0 deletions mcc/resources/queries/study/demographicsLittermates.query.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<query xmlns="http://labkey.org/data/xml/query">
<description>Littermates of Any Animal</description>
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="demographicsLittermates" tableDbType="NOT_IN_DB">
<description>Littermates of Any Animal</description>
<columns>
<column columnName="Id">
<isKeyField>true</isKeyField>
<isHidden>true</isHidden>
</column>
<column columnName="litterId">

</column>
<column columnName="litterMates">
<columnTitle>Littermate(s)</columnTitle>
</column>
</columns>
<titleColumn>Relationship</titleColumn>
</table>
</tables>
</metadata>
</query>
16 changes: 16 additions & 0 deletions mcc/resources/queries/study/demographicsLittermates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SELECT

d1.Id,
d1.litterId,

GROUP_CONCAT(d2.Id, ',') as litterMates,

FROM study.Demographics d1

JOIN study.Demographics d2 ON (d1.litterId = d2.litterId AND d1.id != d2.id)

WHERE
d1.qcstate.publicdata = true AND
d2.qcstate.publicdata = true

GROUP BY d1.Id, d1.litterId
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,9 @@
<column columnName="excludeFromCensus">
<datatype>boolean</datatype>
</column>
<column columnName="litterId">
<datatype>varchar</datatype>
</column>
</columns>
<tableTitle>Demographics</tableTitle>
</table>
Expand Down
Loading