Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
seqtools
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
seqtools
Commits
6d3f1f48
Commit
6d3f1f48
authored
14 years ago
by
gb10
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in the GFF parser to allow consecutive I and D's in CIGAR string
parent
28e125cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blxGff3Parser.c
+13
-11
13 additions, 11 deletions
blxGff3Parser.c
with
13 additions
and
11 deletions
blxGff3Parser.c
+
13
−
11
View file @
6d3f1f48
...
...
@@ -683,8 +683,10 @@ static void parseGapString(char *text, const char *opts, MSP *msp, GError **erro
const
int
qDirection
=
qForward
?
1
:
-
1
;
const
int
sDirection
=
sForward
?
1
:
-
1
;
int
q
=
qForward
?
msp
->
qRange
.
min
:
msp
->
qRange
.
max
;
int
s
=
sForward
?
msp
->
sRange
.
min
:
msp
->
sRange
.
max
;
/* Start at one beyond the edge of the range, because it will be incremented (or decremented if
* direction is reverse) when we construct the first range. */
int
q
=
qForward
?
msp
->
qRange
.
min
-
1
:
msp
->
qRange
.
max
+
1
;
int
s
=
sForward
?
msp
->
sRange
.
min
-
1
:
msp
->
sRange
.
max
+
1
;
char
**
token
=
tokens
;
...
...
@@ -742,9 +744,17 @@ static void parseCigarStringSection(const char *text,
const
int
numPeptides
=
convertStringToInt
(
text
+
1
);
const
int
numNucleotides
=
numPeptides
*
numFrames
;
// /* to do: hack to make blixem work the with currently-wrong data from zmap. take this out and use the above. */
// const int numNucleotides = convertStringToInt(text+1);
// const int numPeptides= numNucleotides / numFrames;
if
(
text
[
0
]
==
'M'
||
text
[
0
]
==
'm'
)
{
/* Create a match range between the old coords and the new. */
/* We were at the end of the previous range or gap, so move to the next coord, where our range will start */
*
q
+=
qDirection
;
*
s
+=
sDirection
;
/* Find the coords at the end of the range. */
int
newQ
=
*
q
+
(
qDirection
*
(
numNucleotides
-
1
));
int
newS
=
*
s
+
(
sDirection
*
(
numPeptides
-
1
));
...
...
@@ -763,19 +773,11 @@ static void parseCigarStringSection(const char *text,
{
/* Deletion from the subject sequence: increase the q coord by the number of nucleotides. */
*
q
+=
qDirection
*
numNucleotides
;
/* Move both to the next coord, so we're at the correct start coord for the next range */
*
q
+=
qDirection
*
1
;
*
s
+=
sDirection
*
1
;
}
else
if
(
text
[
0
]
==
'I'
||
text
[
0
]
==
'i'
)
{
/* Insertion on the subject sequence: increase the s coord by the number of peptides. */
*
s
+=
sDirection
*
numPeptides
;
/* Move both to the next coord, so we're at the correct start coord for the next range */
*
q
+=
qDirection
*
1
;
*
s
+=
sDirection
*
1
;
}
else
if
(
text
[
0
]
==
'f'
||
text
[
0
]
==
'F'
||
text
[
0
]
==
'r'
||
text
[
0
]
==
'R'
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment