Skip to content

Commit d9c5841

Browse files
committed
Finalizing parser fixes
1 parent fd654ed commit d9c5841

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/groovy/es/unav/oncofuse/legacy/Oncofuse.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ if (inputTypeArgs.length == 3) {
246246
}
247247

248248
def appendChr = { String str ->
249+
str = str.trim()
249250
str.startsWith("chr") ? str : ("chr" + str)
250251
}
251252

@@ -291,12 +292,12 @@ switch (inputType) {
291292
case 'TOPHAT':
292293
def inputFile = new File(inputFileName)
293294

294-
if (inputTypeArgs.length == 2 && inputTypeArgs[1] == 'post') {
295+
if (inputTypeArgs.length == 2 && inputTypeArgs[1] == 'POST') {
295296
inputFile.splitEachLine("[ \t]") { line ->
296297
try {
297298
if (line.size() > 3 && line[1].startsWith("chr")) {
298299
def chrs = line[1].split("-")
299-
inputData.add([appendChr(chrs[0]), line[2], appendChr(chrs[1]), line[3],
300+
inputData.add([chrs[0], line[2], chrs[1], line[3],
300301
tissueType, line[0],
301302
convertStrand(line[4][0]), convertStrand(line[4][1]),
302303
0, 0].join("\t"))

0 commit comments

Comments
 (0)