Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
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
zmap
Commits
3d0e3daa
Commit
3d0e3daa
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
fix it up so that blixem can fetch what it wants
parent
e87ab7a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libpfetch/libpfetch.c
+55
-2
55 additions, 2 deletions
src/libpfetch/libpfetch.c
src/libpfetch/libpfetch_I.h
+11
-6
11 additions, 6 deletions
src/libpfetch/libpfetch_I.h
with
66 additions
and
8 deletions
src/libpfetch/libpfetch.c
+
55
−
2
View file @
3d0e3daa
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun
3
1
0
:1
3
2009 (rds)
* Last edited: Jun
18
1
2
:1
6
2009 (rds)
* Created: Fri Apr 4 14:21:42 2008 (rds)
* CVS info: $Id: libpfetch.c,v 1.1
2
2009-06-
04 09:15:59
rds Exp $
* CVS info: $Id: libpfetch.c,v 1.1
3
2009-06-
18 11:26:11
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -213,6 +213,24 @@ static void pfetch_handle_class_init(PFetchHandleClass pfetch_class)
"Return the fasta entry for an isofrom as the -F entries don't exist."
,
FALSE
,
PFETCH_PARAM_STATIC_RW
));
g_object_class_install_property
(
gobject_class
,
PFETCH_BLIXEM_STYLE
,
g_param_spec_boolean
(
"blixem-seqs"
,
"fetch like blixem wants"
,
"Return the sequences one per line with lower case dna and upper case AMINOACIDS"
,
FALSE
,
PFETCH_PARAM_STATIC_RW
));
g_object_class_install_property
(
gobject_class
,
PFETCH_ONE_SEQ_PER_LINE
,
g_param_spec_boolean
(
"one-per-line"
,
"-q option"
,
"Return the sequences one per line."
,
FALSE
,
PFETCH_PARAM_STATIC_RW
));
g_object_class_install_property
(
gobject_class
,
PFETCH_DNA_LOWER_AA_UPPER
,
g_param_spec_boolean
(
"case-by-type"
,
"-C option"
,
"Return the fasta entry/sequences with lower case dna and upper case AMINOACIDS"
,
FALSE
,
PFETCH_PARAM_STATIC_RW
));
g_object_class_install_property
(
gobject_class
,
PFETCH_DEBUG
,
g_param_spec_boolean
(
"debug"
,
"debug"
,
...
...
@@ -320,6 +338,23 @@ static void pfetch_handle_set_property(GObject *gobject, guint param_id, const G
case
PFETCH_UNIPROT_ISOFORM_SEQ
:
pfetch_handle
->
opts
.
isoform_seq
=
g_value_get_boolean
(
value
);
break
;
case
PFETCH_BLIXEM_STYLE
:
/* turn full off! */
pfetch_handle
->
opts
.
full
=
!
(
g_value_get_boolean
(
value
));
pfetch_handle
->
opts
.
one_per_line
=
pfetch_handle
->
opts
.
dna_PROTEIN
=
g_value_get_boolean
(
value
);
break
;
case
PFETCH_ONE_SEQ_PER_LINE
:
pfetch_handle
->
opts
.
one_per_line
=
g_value_get_boolean
(
value
);
if
(
pfetch_handle
->
opts
.
full
)
pfetch_handle
->
opts
.
full
=
FALSE
;
break
;
case
PFETCH_DNA_LOWER_AA_UPPER
:
pfetch_handle
->
opts
.
dna_PROTEIN
=
g_value_get_boolean
(
value
);
if
(
pfetch_handle
->
opts
.
full
)
pfetch_handle
->
opts
.
full
=
FALSE
;
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
gobject
,
param_id
,
pspec
);
break
;
...
...
@@ -353,6 +388,15 @@ static void pfetch_handle_get_property(GObject *gobject, guint param_id, GValue
case
PFETCH_UNIPROT_ISOFORM_SEQ
:
g_value_set_boolean
(
value
,
pfetch_handle
->
opts
.
isoform_seq
);
break
;
case
PFETCH_BLIXEM_STYLE
:
g_value_set_boolean
(
value
,
(
pfetch_handle
->
opts
.
dna_PROTEIN
&&
pfetch_handle
->
opts
.
one_per_line
));
break
;
case
PFETCH_ONE_SEQ_PER_LINE
:
g_value_set_boolean
(
value
,
pfetch_handle
->
opts
.
one_per_line
);
break
;
case
PFETCH_DNA_LOWER_AA_UPPER
:
g_value_set_boolean
(
value
,
pfetch_handle
->
opts
.
dna_PROTEIN
);
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
gobject
,
param_id
,
pspec
);
break
;
...
...
@@ -396,6 +440,15 @@ static void pfetch_get_argv(PFetchHandle handle, char *seq, char **argv)
if
(
add_F
)
argv
[
current
++
]
=
"-F"
;
if
(
handle
->
opts
.
one_per_line
)
argv
[
current
++
]
=
"-q"
;
if
(
handle
->
opts
.
dna_PROTEIN
)
argv
[
current
++
]
=
"-C"
;
if
(
handle
->
opts
.
archive
)
argv
[
current
++
]
=
"-A"
;
if
(
seq
!=
NULL
)
argv
[
current
++
]
=
seq
;
...
...
This diff is collapsed.
Click to expand it.
src/libpfetch/libpfetch_I.h
+
11
−
6
View file @
3d0e3daa
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Nov 21 17:22
200
8
(rds)
* Last edited:
Jun 18 11:45
200
9
(rds)
* Created: Fri Apr 4 14:20:41 2008 (rds)
* CVS info: $Id: libpfetch_I.h,v 1.
4
2009-0
4-03 08:04:22 zmap
Exp $
* CVS info: $Id: libpfetch_I.h,v 1.
5
2009-0
6-18 11:26:11 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -57,6 +57,9 @@ enum
PFETCH_LOCATION
,
PFETCH_PORT
,
PFETCH_UNIPROT_ISOFORM_SEQ
,
PFETCH_ONE_SEQ_PER_LINE
,
PFETCH_DNA_LOWER_AA_UPPER
,
PFETCH_BLIXEM_STYLE
,
/* http specific stuff */
PFETCH_COOKIE_JAR
,
PFETCH_URL
,
/* same as location */
...
...
@@ -157,10 +160,12 @@ typedef struct _pfetchHandleStruct
struct
{
unsigned
int
full
:
1
;
unsigned
int
archive
:
1
;
unsigned
int
debug
:
1
;
unsigned
int
isoform_seq
:
1
;
unsigned
int
full
:
1
;
/* -F */
unsigned
int
archive
:
1
;
/* -A */
unsigned
int
debug
:
1
;
/* internal debug */
unsigned
int
isoform_seq
:
1
;
/* internal option */
unsigned
int
one_per_line
:
1
;
/* -q */
unsigned
int
dna_PROTEIN
:
1
;
/* -C */
}
opts
;
}
pfetchHandleStruct
;
...
...
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