Skip to content

Commit 547be99

Browse files
committed
Parser fix
1 parent ae05fba commit 547be99

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/main/groovy/com/antigenomics/migmap/blast/BlastParser.groovy

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,17 @@ class BlastParser {
6060
def summary, alignments, cdrBounds
6161

6262
// Rearrangement summary
63-
boolean hasD = segmentDatabase.hasD
64-
if (hasD) {
65-
summary = groomMatch(chunk =~
66-
// V D J chain stop frame (prod) strand
67-
/# V-.+\n(.+)\t(.+)\t(.+)\tV.\t(.+)\t(.+)\t.+\t(.+)\n/)
68-
if (summary == null) {
69-
hasD = false
70-
summary = groomMatch(chunk =~
71-
// V J chain stop frame (prod) strand
72-
/# V-.+\n(.+)\t(.+)\tV.\t(.+)\t(.+)\t.+\t(.+)\n/)
73-
}
74-
} else {
63+
boolean hasD = true
64+
65+
summary = groomMatch(chunk =~
66+
// V D J chain stop frame (prod) strand
67+
/# V-.+\n(\S+)\t(\S+)\t(\S+)\tV\S\t(.+)\t(\S+)\t\S+\t(\S+)\n/)
68+
69+
if (summary == null) {
70+
hasD = false
7571
summary = groomMatch(chunk =~
7672
// V J chain stop frame (prod) strand
77-
/# V-.+\n(.+)\t(.+)\tV.\t(.+)\t(.+)\t.+\t(.+)\n/)
73+
/# V-.+\n(\S+)\t(\S+)\tV\S\t(\S+)\t(\S+)\t\S+\t(\S+)\n/)
7874
}
7975

8076
if (summary == null) {
@@ -104,6 +100,7 @@ class BlastParser {
104100
jSegment = jFound ? segmentDatabase.segments[jSegmentNames.split(",").sort()[0]] : Segment.DUMMY_J
105101

106102
// - Alignments for V, D and J segments, remember here and further BLAST coordinates are 1-based
103+
107104
alignments = [
108105
groomMatch(chunk =~
109106
// qstart qseq sstart sseq

0 commit comments

Comments
 (0)