Skip to content

Commit 9091ce5

Browse files
authored
Merge pull request #262 from LabKey/fb_merge_25.7_to_develop
Merge 25.7 to develop
2 parents 9b66284 + 28a373a commit 9091ce5

File tree

7 files changed

+25
-11
lines changed

7 files changed

+25
-11
lines changed

GenotypeAssays/src/org/labkey/genotypeassays/GenotypeAssaysController.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.labkey.genotypeassays;
1818

19+
import org.apache.commons.text.StringEscapeUtils;
1920
import org.json.JSONArray;
2021
import org.labkey.api.action.ApiResponse;
2122
import org.labkey.api.action.ApiSimpleResponse;
@@ -37,6 +38,7 @@
3738
import org.springframework.validation.Errors;
3839
import org.springframework.web.servlet.ModelAndView;
3940

41+
import java.util.Arrays;
4042
import java.util.HashMap;
4143
import java.util.List;
4244
import java.util.Map;
@@ -130,7 +132,8 @@ public ApiResponse execute(CacheAnalysesForm form, BindException errors)
130132
return null;
131133
}
132134

133-
Pair<List<Long>, List<Long>> ret = GenotypeAssaysManager.get().cacheAnalyses(getViewContext(), protocol, form.getAlleleNames());
135+
String[] alleleNames = Arrays.stream(form.getAlleleNames()).map(StringEscapeUtils::unescapeHtml4).toArray(String[]::new);
136+
Pair<List<Long>, List<Long>> ret = GenotypeAssaysManager.get().cacheAnalyses(getViewContext(), protocol, alleleNames);
134137
resultProperties.put("runsCreated", ret.first);
135138
resultProperties.put("runsDeleted", ret.second);
136139
}

GenotypeAssays/src/org/labkey/genotypeassays/GenotypeAssaysManager.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
import java.util.List;
6363
import java.util.Map;
6464
import java.util.Set;
65+
import java.util.concurrent.atomic.AtomicInteger;
6566

6667
public class GenotypeAssaysManager
6768
{
@@ -123,13 +124,15 @@ public Pair<List<Long>, List<Long>> cacheAnalyses(final ViewContext ctx, final E
123124
final Map<Integer, List<Map<String, Object>>> rowHash = new IntHashMap<>();
124125
final Map<Integer, Set<Integer>> toDeleteByAnalysis = new IntHashMap<>();
125126

127+
AtomicInteger records = new AtomicInteger();
126128
TableSelector tsAlignments = new TableSelector(tableAlignments, cols.values(), new SimpleFilter(FieldKey.fromString("key"), Arrays.asList(pks), CompareType.IN), null);
127129
tsAlignments.forEach(new Selector.ForEachBlock<ResultSet>()
128130
{
129131
@Override
130132
public void exec(ResultSet object) throws SQLException
131133
{
132134
Results rs = new ResultsImpl(object, cols);
135+
records.getAndIncrement();
133136

134137
int analysisId = rs.getInt(FieldKey.fromString("analysis_id"));
135138
String lineages = rs.getString(FieldKey.fromString("lineages"));
@@ -169,6 +172,11 @@ public void exec(ResultSet object) throws SQLException
169172
}
170173
});
171174

175+
if (records.get() != pks.length)
176+
{
177+
throw new IllegalStateException("The number of records found did not match the number supplied. This indicates a problem with the import.");
178+
}
179+
172180
if (!rowHash.isEmpty())
173181
{
174182
processSet(SBT_LINEAGE_ASSAY_TYPE, rowHash, assayDataTable, u, ctx, toDeleteByAnalysis, ap, protocol, runsCreated);

mGAP/resources/views/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
</div>
6767
</form>
6868
<div class="otherLoginMechanismsSection" hidden>
69-
<div class="auth-header">Users from these institutions can use their existing logins (after registration):</div>
69+
<div class="auth-header">Registered users from the following institutions can log in using their home institution's credentials below:</div>
7070
<div class="otherLoginMechanismsContent"></div>
7171
</div>

mcc/src/client/RequestReview/components/RabReviewForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ export default function RabReviewForm(props: {requestId: string}) {
124124
<TableRow>
125125
<TableCell>
126126
<FormControl>
127-
<InputLabel id={"review-input-label"}>Enter review...</InputLabel>
128-
<Select id={"review"} variant={"outlined"} name={"review"} aria-label="Review" label={"Review"} error={hasSubmitted && !recordData[0].review} onChange={handleChange} required={true} value={recordData[0].review ?? ''} fullWidth={true} displayEmpty={true}>
127+
<InputLabel id={"review-input-label"}>Review</InputLabel>
128+
<Select id={"review"} variant={"outlined"} name={"review"} aria-label="Review" label={"Review"} labelId={"review-input-label"} error={hasSubmitted && !recordData[0].review} onChange={handleChange} required={true} value={recordData[0].review ?? ''} fullWidth={true} displayEmpty={true}>
129129
<MenuItem value={""}>Not Decided</MenuItem>
130130
<MenuItem value={"I recommend this proposal"}>I recommend this proposal</MenuItem>
131131
<MenuItem value={"I recommend this proposal with conditions"}>I recommend this proposal with conditions</MenuItem>

mcc/src/org/labkey/mcc/MccManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ public enum RequestStatus
5656
Fulfilled(8, "Fulfilled", MccRequestAdminPermission.class),
5757
Withdrawn(9, "Withdrawn", MccRequestorPermission.class);
5858

59-
int sortOrder;
60-
String label;
61-
Class<? extends Permission> updatePermission;
62-
Class<? extends Permission> insertPermission;
59+
final int sortOrder;
60+
final String label;
61+
final Class<? extends Permission> updatePermission;
62+
final Class<? extends Permission> insertPermission;
6363

6464
RequestStatus(int sortOrder, String label, Class<? extends Permission> editPermission)
6565
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ public boolean isSortable()
5858

5959
ti.addColumn(newCol);
6060

61-
SQLFragment sql2 = new SQLFragment("(SELECT COALESCE(sum(CASE WHEN r.review IS NULL THEN 1 ELSE 0 END), -1) as expr FROM mcc.requestReviews r WHERE r.requestId = " + ExprColumn.STR_TABLE_ALIAS + ".requestId)");
61+
SQLFragment sql2 = new SQLFragment("(SELECT COALESCE(sum(CASE WHEN r.review IS NULL THEN 1 ELSE 0 END), -1) as expr FROM mcc.requestReviews r WHERE CAST(r.requestId AS VARCHAR(36)) = CAST(" + ExprColumn.STR_TABLE_ALIAS + ".requestId AS VARCHAR(36)))");
6262
ExprColumn newCol2 = new ExprColumn(ti, "pendingRabReviews", sql2, JdbcType.INTEGER, ti.getColumn("requestId"));
6363
newCol2.setLabel("Pending RAB Reviews");
6464
ti.addColumn(newCol2);
6565
}
6666

6767
if (ti.getColumn("numAnimalsRequested") == null)
6868
{
69-
SQLFragment sql = new SQLFragment("(SELECT SUM(rc.numberofanimals) as expr FROM mcc." + MccSchema.TABLE_REQUEST_COHORTS + " rc WHERE rc.requestId = " + ExprColumn.STR_TABLE_ALIAS + ".requestId)");
69+
SQLFragment sql = new SQLFragment("(SELECT SUM(rc.numberofanimals) as expr FROM mcc." + MccSchema.TABLE_REQUEST_COHORTS + " rc WHERE CAST(rc.requestId AS VARCHAR(36)) = CAST(" + ExprColumn.STR_TABLE_ALIAS + ".requestId AS VARCHAR(36)))");
7070
ExprColumn newCol = new ExprColumn(ti, "numAnimalsRequested", sql, JdbcType.INTEGER, ti.getColumn("requestId"));
7171
newCol.setLabel("# Animals Requested");
7272
newCol.setURL(DetailsURL.fromString("/query/executeQuery.view?schemaName=mcc&query.queryName=" + MccSchema.TABLE_REQUEST_COHORTS + "&query.requestId~eq=${requestId}"));
@@ -98,7 +98,7 @@ public boolean isSortable()
9898
append(" as expr FROM ").
9999
append(" mcc." + MccSchema.TABLE_ANIMAL_REQUESTS + " ar JOIN studydataset.").append(dti.getName()).
100100
append(" d ON (d.mccRequestId = ar.rowId)").
101-
append(" WHERE ar.objectid = " + ExprColumn.STR_TABLE_ALIAS + ".requestId)");
101+
append(" WHERE CAST(ar.objectid AS VARCHAR(36)) = CAST(" + ExprColumn.STR_TABLE_ALIAS + ".requestId AS VARCHAR(36)))");
102102

103103
ExprColumn newCol = new ExprColumn(ti, "transferIds", sql, JdbcType.VARCHAR, ti.getColumn("requestId"));
104104
newCol.setLabel("Animal ID(s)");

primeseq/src/org/labkey/primeseq/pipeline/BismarkWrapper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ public Provider()
297297
put("minValue", 0);
298298
put("maxValue", 1);
299299
}}, 1),
300+
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.create("--score_min"), "score_min", "Score Min", "Sets a function governing the minimum alignment score needed for an alignment to be considered \"valid\" (i.e. good enough to report). This is a function of read length. For instance, specifying L,0,-0.2 sets the minimum-score function f to f(x) = 0 + -0.2 * x, where x is the read length", "textfield", new JSONObject(){{
301+
302+
}}, null),
300303
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.createSwitch("--local"), "local", "Local Alignment", "In this mode, it is not required that the entire read aligns from one end to the other. Rather, some characters may be omitted (“soft-clipped”) from the ends in order to achieve the greatest possible alignment score. For Bowtie 2, the match bonus --ma (default: 2) is used in this mode, and the best possible alignment score is equal to the match bonus (--ma) times the length of the read. This is mutually exclusive with end-to-end alignments.", "checkbox", new JSONObject(){{
301304

302305
}}, false),

0 commit comments

Comments
 (0)