Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,21 @@ private void setLastIndexUsed(List<DataRecord> indexAssignmentConfigs, Integer o
* @param indexAssignmentConfigs
* @return int
*/
private int getStartIndexAssignmentConfigPosition(int lastUsedIndexPosition, List<DataRecord> indexAssignmentConfigs) throws ServerException, NotFound, RemoteException {
private int getStartIndexAssignmentConfigPosition(int lastUsedIndexPosition, List<DataRecord> indexAssignmentConfigs,
int plateSize) throws ServerException, NotFound, RemoteException {
if (lastUsedIndexPosition >= indexAssignmentConfigs.size() - 1) {
logInfo("Reached last Index, will start from first index position.");
return 0;
}
int nextIndexToUse = lastUsedIndexPosition + 1; //start with one index position after last index used.
for (int i = nextIndexToUse; i < indexAssignmentConfigs.size(); i++)
if (indexAssignmentConfigs.get(i).getStringVal("WellId", user).toUpperCase().contains("A")) {
return i;
}
return 0;
if ((plateSize == 96 && indexAssignmentConfigs.get(lastUsedIndexPosition).getStringVal("WellId", user).toUpperCase().contains("H"))
|| (plateSize == 384 && indexAssignmentConfigs.get(lastUsedIndexPosition).getStringVal("WellId", user).toUpperCase().contains("P"))) {
for (int i = nextIndexToUse; i < indexAssignmentConfigs.size(); i++)
if (indexAssignmentConfigs.get(i).getStringVal("WellId", user).toUpperCase().contains("A")) {
return i;
}
}
return nextIndexToUse;
}

/**
Expand Down Expand Up @@ -474,7 +478,7 @@ private void assignIndicesToSamples(List<DataRecord> indexAssignmentProtocolReco
boolean isCrisprOrAmpliconSeq = recipes.stream().anyMatch(RECIPES_TO_USE_SPECIAL_ADAPTERS::contains);
Integer positionOfLastUsedIndex = getPositionOfLastUsedIndex(indexAssignmentConfigs);
Double maxPlateVolume = autoHelper.getMaxVolumeLimit(plateSize);
Integer updatedLastIndexUsed = getStartIndexAssignmentConfigPosition(positionOfLastUsedIndex, indexAssignmentConfigs);
Integer updatedLastIndexUsed = getStartIndexAssignmentConfigPosition(positionOfLastUsedIndex, indexAssignmentConfigs, plateSize);
Set<String> indexAssignmentConfigPlatesToUse = new HashSet<>();
for (int i = updatedLastIndexUsed, j = 0; i < indexAssignmentConfigs.size() && j < indexAssignmentProtocolRecordsSortedColumnWise.size(); i++, j++) {
DataRecord indexAssignmentConfig = indexAssignmentConfigs.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public PluginResult run() throws Exception {
Map<String, Object> values = new HashMap<>();
String sampleId = sample.getStringVal("SampleId", user);
String sampleName = sample.getStringVal("OtherSampleId", user);
String otherSampleId = sample.getStringVal("OtherSampleId", user);
String tumorOrNormal = sample.getStringVal("TumorOrNormal", user);
values.put("SampleId", sampleId);
values.put("SequencingRunType","PE100");
Expand Down