Skip to content

Commit ffc1e33

Browse files
committed
Removed descriptions from and fixed the names of tissue type samples. Made the plugin report where it is in loading data.
Former-commit-id: d9fb8f5
1 parent f880059 commit ffc1e33

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

seqware-pipeline/src/main/java/net/sourceforge/seqware/pipeline/plugins/BatchMetadataInjection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private int createLibrarySample(SampleInfo sample, int tissueTypeSampleAcc) thro
226226
private int retrieveTissueTypeSampleAccession(Integer parentSampleAcc, SampleInfo barcode) throws Exception {
227227
//get the tissue type sample if it exists, otherwise create it
228228
int tissueTypeSampleAcc = 0;
229-
String name = barcode.getParentSample() + "_" + barcode.getTissueType();
229+
String name = barcode.getParentSample() + "_" +barcode.getTissueOrigin()+"_"+ barcode.getTissueType();
230230
List<Sample> children = metadata.getChildSamplesFrom(parentSampleAcc);
231231
if (children != null) {
232232
for (Sample s : children) {
@@ -256,7 +256,7 @@ private Integer retrieveParentSampleAccession(List<Sample> parentSamples, Sample
256256
}
257257
}
258258
if (parentSampleAcc == null) {
259-
parentSampleAcc = createSample(sample.getParentSample(), sample.getSampleDescription(),
259+
parentSampleAcc = createSample(sample.getParentSample(), "",
260260
experimentAccession, 0, sample.getOrganismId(), false);
261261
}
262262
names.put(parentSampleAcc, sample.getParentSample());

seqware-pipeline/src/main/java/net/sourceforge/seqware/pipeline/plugins/batchmetadatainjection/CreateFromScratch.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ public RunInfo getRunInfo() {
5050
for (int i = 0; i < numLanes; i++) {
5151
LaneInfo lane = getLane(i);
5252
int numBarcodes = this.promptInteger("How many barcodes in lane " + lane.getLaneNumber() + "?", 1, null);
53-
for (int j = 0; j < numBarcodes; j++) {
53+
for (int j = 0; j < numBarcodes; j++) {
5454
try {
5555
boolean done = false;
5656
SampleInfo sample = null;
5757
while (!done) {
58+
Log.stdout("-----For lane "+lane.getLaneNumber()+", barcode #"+(j+1)+"-----");
5859
projectCode = ConsoleAdapter.getInstance().promptString("Project code (three or four letters)", projectCode);
5960
String individualNumber = ConsoleAdapter.getInstance().promptString("Individual number (should be unique per project)", null);
6061
sample = this.generateSampleInfo(projectCode + " " + individualNumber, projectCode, individualNumber,
@@ -80,7 +81,8 @@ private LaneInfo getLane(int i) {
8081
boolean doneLane = false;
8182
LaneInfo lane = null;
8283
while (!doneLane) {
83-
int num = promptPositiveInteger("Lane number", (i+1), null, 1, Integer.MAX_VALUE);
84+
Log.stdout("-----For lane #"+(i+1)+"-----");
85+
int num = promptPositiveInteger("What is the lane number? ", (i+1), null, 1, Integer.MAX_VALUE);
8486
lane = this.generateLaneInfo(String.valueOf(num), -1);
8587
StringBuilder sb = new StringBuilder();
8688
printLaneInfo(lane, sb);

0 commit comments

Comments
 (0)