Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix read of source file columns #267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -404,8 +404,8 @@ class DuplicationDetection {
collector,
oldStatus,
oldDuplicateOf,
currentLine(24),
currentLine(25))
currentLine(15),
currentLine(16))
} else {
logger.warn("lsid " + currentLine(0) + " line " + counter + " has incorrect number of columns: "
+ currentLine.size + ", vs " + fieldsToExport.length)
Expand Down Expand Up @@ -690,7 +690,7 @@ class DuplicationDetection {

//open the tmp file that contains the information about the lsid
val reader = new CSVReader(new FileReader(sourceFileName), '\t', '`', '~')
var currentLine = reader.readNext //first line is header
var currentLine = reader.readNext //first line is data, not header
val buff = new ArrayBuffer[DuplicateRecordDetails]
var counter = 0

Expand All @@ -717,7 +717,7 @@ class DuplicationDetection {
val oldDuplicateOf = StringUtils.trimToNull(currentLine(14).replaceAll("\\[", "").replaceAll("\\]", ""))
buff += new DuplicateRecordDetails(rowKey, rowKey, taxon_lsid, year, month, day, currentLine(5), currentLine(6),
currentLine(7), currentLine(8), currentLine(9), currentLine(10), rawName, collector, oldStatus, oldDuplicateOf,
currentLine(24), currentLine(25))
currentLine(15), currentLine(16))
} else {
logger.warn("lsid " + lsid + " line " + counter + " has incorrect column number: " + currentLine.size)
}
Expand Down Expand Up @@ -1151,4 +1151,4 @@ class DuplicationDetection {
true
}
}
}
}