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
db363909
Commit
db363909
authored
14 years ago
by
gb10
Browse files
Options
Downloads
Patches
Plain Diff
Added code to unescape the URL tag that is passed in the GFF file for variations
parent
3ec50baa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
blxGff3Parser.c
+4
-26
4 additions, 26 deletions
blxGff3Parser.c
blxview.c
+7
-1
7 additions, 1 deletion
blxview.c
with
11 additions
and
27 deletions
blxGff3Parser.c
+
4
−
26
View file @
db363909
...
...
@@ -534,31 +534,6 @@ static void parseAttributes(char *attributes,
}
/* Utility to remove any GFF3 escape characters from the given string and replace them with
* the real characters they represent. Takes into account special chars for generic attributes,
* and also the Target-name and ID attributes if requested */
static
void
replaceGff3EscapeChars
(
char
**
text
,
const
gboolean
targetNameAtt
,
const
gboolean
idAtt
)
{
GString
*
gstr
=
g_string_new
(
*
text
);
seqtools_g_string_replace
(
gstr
,
"%3b"
,
";"
);
seqtools_g_string_replace
(
gstr
,
"%3d"
,
"="
);
seqtools_g_string_replace
(
gstr
,
"%09"
,
"
\t
"
);
/* Target-name and ID attributes additionally have whitespace escaped */
if
(
targetNameAtt
||
idAtt
)
seqtools_g_string_replace
(
gstr
,
"%20"
,
" "
);
/* ID attribute additional has ">" escaped */
if
(
idAtt
)
seqtools_g_string_replace
(
gstr
,
"%e3"
,
">"
);
g_free
(
*
text
);
*
text
=
gstr
->
str
;
g_string_free
(
gstr
,
FALSE
);
}
/* Parse a tag/data pair of the format "tag=data" */
static
void
parseTagDataPair
(
char
*
text
,
const
int
lineNum
,
...
...
@@ -607,8 +582,11 @@ static void parseTagDataPair(char *text,
}
else
if
(
!
strcmp
(
tokens
[
0
],
"url"
))
{
#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 16
gffData
->
url
=
g_uri_unescape_string
(
tokens
[
1
],
NULL
);
#else
gffData
->
url
=
g_strdup
(
tokens
[
1
]);
replaceGff3EscapeChars
(
&
gffData
->
url
,
FALSE
,
FALSE
);
#endif
}
else
{
...
...
This diff is collapsed.
Click to expand it.
blxview.c
+
7
−
1
View file @
db363909
...
...
@@ -88,7 +88,7 @@
01-10-05 Added getsseqsPfetch to fetch all missing sseqs in one go via socket connection to pfetch [RD]
* Created: Thu Feb 20 10:27:39 1993 (esr)
* CVS info: $Id: blxview.c,v 1.7
5
2010-10-
05 17:40:20
gb10 Exp $
* CVS info: $Id: blxview.c,v 1.7
6
2010-10-
18 14:06:53
gb10 Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -1596,6 +1596,12 @@ void destroyMspData(MSP *msp)
g_array_free
(
msp
->
xy
,
TRUE
);
msp
->
xy
=
NULL
;
}
if
(
msp
->
url
)
{
g_free
(
msp
->
url
);
msp
->
url
=
NULL
;
}
}
...
...
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