Skip to content

Commit 5be7be2

Browse files
committed
Fix merge conflicts
2 parents 1208269 + b1f1365 commit 5be7be2

File tree

12 files changed

+88
-1020
lines changed

12 files changed

+88
-1020
lines changed

mcc/resources/etls/mcc.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<column>usage_future</column>
3434
<column>date_of_observations</column>
3535
<column>colony</column>
36+
<column>source</column>
3637
<column>dam</column>
3738
<column>sire</column>
3839
<column>objectid</column>

mcc/resources/queries/study/demographicsLittermates.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ SELECT
33
d1.Id,
44
d1.litterId,
55

6-
(SELECT GROUP_CONCAT(distinct d2.Id, ',') as litterMates FROM study.Demographics d2 WHERE d2.qcstate.publicdata = true AND d1.litterId = d2.litterId AND d1.id != d2.id) as litterMates
6+
(SELECT GROUP_CONCAT(distinct d2.Id, ',') as litterMates FROM study.Demographics d2 WHERE d2.qcstate.publicdata = true AND d2.litterId IS NOT NULL AND d1.litterId = d2.litterId AND d1.id != d2.id) as litterMates
77

88
FROM study.Demographics d1
99

10-
WHERE d1.qcstate.publicdata = true
10+
WHERE d1.qcstate.publicdata = true AND d1.litterId IS NOT NULL
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<query xmlns="http://labkey.org/data/xml/query">
2+
<metadata>
3+
<tables xmlns="http://labkey.org/data/xml">
4+
<table tableName="demographicsMccTransfer" tableDbType="NOT_IN_DB">
5+
<tableTitle>MCC Transfers</tableTitle>
6+
<description>Summary of MCC Transfers</description>
7+
<columns>
8+
<column columnName="Id">
9+
<isKeyField>true</isKeyField>
10+
<isHidden>true</isHidden>
11+
</column>
12+
<column columnName="mccRequestId">
13+
<columnTitle>MCC Request ID</columnTitle>
14+
</column>
15+
<column columnName="piLastName">
16+
<columnTitle>PI Last Name</columnTitle>
17+
</column>
18+
<column columnName="piFirstName">
19+
<columnTitle>PI First Name</columnTitle>
20+
</column>
21+
<column columnName="piInstitution">
22+
<columnTitle>PI Institution</columnTitle>
23+
</column>
24+
</columns>
25+
<titleColumn>mccRequestId</titleColumn>
26+
</table>
27+
</tables>
28+
</metadata>
29+
</query>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SELECT
2+
d.Id,
3+
GROUP_CONCAT(DISTINCT d.mccRequestId.rowId, ', ') as mccRequestId,
4+
GROUP_CONCAT(DISTINCT d.mccRequestId.lastName, char(10)) as piLastName,
5+
GROUP_CONCAT(DISTINCT d.mccRequestId.firstName, char(10)) as piFirstName,
6+
GROUP_CONCAT(DISTINCT d.mccRequestId.institutionname, char(10)) as piInstitution
7+
FROM study.departure d
8+
WHERE d.qcstate.publicdata = true AND d.mccRequestId IS NOT NULL
9+
GROUP BY d.Id

mcc/src/org/labkey/mcc/etl/ProjectAssignmentTransform.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class ProjectAssignmentTransform extends ColumnTransform
2828
private static final String U24_BREEDER = "U24 breeder";
2929
private static final String U24_OFFSPRING = "U24 offspring";
3030
private static final String U24_OTHER = "Other";
31+
private static final String U24_INACTIVE = "U24 marmoset breeding- INACTIVE -";
3132

3233
@Override
3334
protected Object doTransform(Object inputValue)
@@ -42,6 +43,10 @@ protected Object doTransform(Object inputValue)
4243
{
4344
return getOrCreateFlag(U24_TITLE);
4445
}
46+
else if (U24_INACTIVE.equalsIgnoreCase(String.valueOf(inputValue)))
47+
{
48+
return getOrCreateFlag(U24_INACTIVE);
49+
}
4550
// SNPRC:
4651
else if (U24_BREEDER.equalsIgnoreCase(String.valueOf(inputValue)))
4752
{
@@ -51,8 +56,11 @@ else if (U24_OFFSPRING.equalsIgnoreCase(String.valueOf(inputValue)))
5156
{
5257
return getOrCreateFlag(U24_OFFSPRING);
5358
}
54-
55-
return inputValue;
59+
else
60+
{
61+
_log.error("Unknown flag value: " + inputValue + ", in folder: " + getContainerUser().getContainer().getPath());
62+
return null;
63+
}
5664
}
5765

5866
private String getOrCreateFlag(String type)

mcc/src/org/labkey/mcc/query/MccEhrCustomizer.java

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
import org.labkey.api.query.FieldKey;
1717
import org.labkey.api.query.LookupForeignKey;
1818
import org.labkey.api.query.QueryForeignKey;
19-
import org.labkey.api.query.QueryService;
2019
import org.labkey.api.query.UserSchema;
20+
import org.labkey.api.security.User;
2121
import org.labkey.mcc.MccManager;
2222
import org.labkey.mcc.MccSchema;
23+
import org.labkey.mcc.security.MccRequestAdminPermission;
2324

2425
public class MccEhrCustomizer extends AbstractTableCustomizer
2526
{
@@ -141,6 +142,39 @@ private void customizeAnimalTable(AbstractTableInfo ti)
141142
col.setDescription("Summary of genomic data");
142143
ti.addColumn(col);
143144
}
145+
146+
// Only allow this for authorized users:
147+
possiblyAddRequestSummary(ti);
148+
}
149+
150+
private void possiblyAddRequestSummary(AbstractTableInfo ti)
151+
{
152+
if (ti.getColumn("mccTransfers") != null)
153+
{
154+
return;
155+
}
156+
157+
Container animalDataContainer = MccManager.get().getMCCContainer(ti.getUserSchema().getContainer());
158+
if (animalDataContainer == null)
159+
{
160+
return;
161+
}
162+
163+
if (!animalDataContainer.equals(ti.getUserSchema().getContainer()))
164+
{
165+
return;
166+
}
167+
168+
User u = ti.getUserSchema().getUser();
169+
if (!animalDataContainer.hasPermission(u, MccRequestAdminPermission.class))
170+
{
171+
return;
172+
}
173+
174+
var col = getWrappedIdCol(ti.getUserSchema(), ti, "mccTransfers", "demographicsMccTransfer");
175+
col.setLabel("MCC Transfers");
176+
col.setDescription("Summarizes MCC Transfer Information");
177+
ti.addColumn(col);
144178
}
145179

146180
private BaseColumnInfo getWrappedIdCol(UserSchema us, AbstractTableInfo ds, String name, String queryName)

tcrdb/build.gradle

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,12 @@ repositories {
55
mavenCentral()
66
}
77

8-
configurations.all {
9-
resolutionStrategy {
10-
// Related to: https://nvd.nist.gov/vuln/detail/CVE-2025-12183
11-
dependencySubstitution {
12-
substitute module('org.lz4:lz4-java') using module("at.yawk.lz4:lz4-java:${lz4Version}")
13-
}
14-
}
15-
}
16-
178
dependencies {
189
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:DiscvrLabKeyModules:singlecell", depProjectConfig: "apiJarFile")
1910
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:DiscvrLabKeyModules:SequenceAnalysis", depProjectConfig: "apiJarFile")
2011
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "apiJarFile")
2112
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "apiJarFile")
2213
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: BuildUtils.getPlatformModuleProjectPath(project.gradle, "assay"), depProjectConfig: "apiJarFile")
23-
BuildUtils.addExternalDependency(
24-
project,
25-
new ExternalDependency(
26-
"io.repseq:repseqio:${repseqVersion}",
27-
"repseqio",
28-
"repseqio",
29-
"https://github.com/repseqio/repseqio",
30-
ExternalDependency.APACHE_2_LICENSE_NAME,
31-
ExternalDependency.APACHE_2_LICENSE_URL,
32-
"TCR Analysis"
33-
),
34-
{
35-
// exclude logback to prevent excessive logging
36-
exclude group: "ch.qos.logback", module :"logback-classic"
37-
exclude group: "ch.qos.logback", module :"logback-core"
38-
}
39-
)
4014
implementation "com.github.samtools:htsjdk:${htsjdkVersion}"
4115
implementation "net.sf.opencsv:opencsv:${opencsvVersion}"
4216

tcrdb/gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
lz4Version=1.10.1
2-
repseqVersion=1.7.0

tcrdb/resources/assay/TCRdb/queries/Data.query.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@
142142
<item text="View Alignments">
143143
<onClick>TCRdb.window.ExportDataWindow.viewAlignmentHandler(dataRegionName, arguments[0] ? arguments[0].ownerCt : null);</onClick>
144144
</item>
145-
<item text="Download Clone Materials">
146-
<onClick>TCRdb.window.DownloadCloneWindow.buttonHandler(dataRegionName);</onClick>
147-
</item>
148145
<item text="Download Clone Sequence">
149146
<onClick>TCRdb.window.DownloadCloneWindow.downloadSequenceHandler(dataRegionName);</onClick>
150147
</item>

tcrdb/resources/web/tcrdb/window/DownloadCloneWindow.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ Ext4.define('TCRdb.window.DownloadCloneWindow', {
22
extend: 'Ext.window.Window',
33

44
statics: {
5-
buttonHandler: function(dataRegionName) {
6-
TCRdb.window.DownloadCloneWindow.showWindow(dataRegionName, 'downloadCloneMaterials', 'The goal of this is to download a ZIP with any extracted clone/read data for the selected sample(s), along with the reference sequence for the segments used. These files can be imported into Geneious or a similar program to de novo assemble to construct the FL clone. Note: per sample, it will export all reads overlapping any TCR segments. This at minimum will tend to include both chains (i.e. 2 different CDR3s), and might include reads that either match a defunct TCR or other noise.');
7-
},
8-
95
downloadSequenceHandler: function(dataRegionName){
106
TCRdb.window.DownloadCloneWindow.showWindow(dataRegionName, 'downloadSequence', 'This will download the full sequence (if available) for the selected rows, along with the reference segments.');
117
},

0 commit comments

Comments
 (0)