Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OBITools3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools3
Commits
7c57bd33
Commit
7c57bd33
authored
Sep 15, 2017
by
Celine Mercier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added check to prevent views from having the name 'taxonomy' (used for
URIs)
parent
0e140df0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
src/obiview.c
src/obiview.c
+9
-1
src/obiview.h
src/obiview.h
+6
-6
No files found.
src/obiview.c
View file @
7c57bd33
...
...
@@ -1558,6 +1558,14 @@ Obiview_p obi_new_view(OBIDMS_p dms, const char* view_name, Obiview_p view_to_cl
return
NULL
;
}
// Check that the view name is not 'taxonomy' (used for URIs)
if
(
strcmp
(
view_name
,
"taxonomy"
)
==
0
)
{
obi_set_errno
(
OBIVIEW_ERROR
);
obidebug
(
1
,
"
\n
View name can not be 'taxonomy'"
);
return
NULL
;
}
// Allocate memory for view structure
view
=
(
Obiview_p
)
malloc
(
sizeof
(
Obiview_t
));
if
(
view
==
NULL
)
...
...
@@ -1838,7 +1846,7 @@ Obiview_p obi_new_view_nuc_seqs(OBIDMS_p dms, const char* view_name, Obiview_p v
if
(
view_to_clone
==
NULL
)
{
// Adding sequence column
if
(
obi_view_add_column
(
view
,
NUC_SEQUENCE_COLUMN
,
-
1
,
NULL
,
OBI_SEQ
,
0
,
1
,
NULL
,
NULL
,
NULL
,
-
1
,
"Nucleotide sequences"
,
true
)
<
0
)
if
(
obi_view_add_column
(
view
,
NUC_SEQUENCE_COLUMN
,
-
1
,
NULL
,
OBI_SEQ
,
0
,
1
,
NULL
,
NULL
,
NULL
,
-
1
,
"Nucleotide sequences"
,
true
)
<
0
)
// discuss using same indexer "NUC_SEQ_INDEXER"
{
obidebug
(
1
,
"Error adding an obligatory column in a nucleotide sequences view"
);
return
NULL
;
...
...
src/obiview.h
View file @
7c57bd33
...
...
@@ -140,7 +140,7 @@ typedef struct Obiview {
* Fails if a view with the same name already exists.
*
* @param dms A pointer on the OBIDMS.
* @param view_name The unique name of the view.
* @param view_name The unique name of the view.
Can not be 'taxonomy' (used for URIs).
* @param view_to_clone Eventually a pointer on the opened view to clone to create the new one, if there is one. NULL if not.
* @param line_selection Eventually a pointer on a list of indexes corresponding to a line selection to use with the view to clone
* if there is one. NULL if there is no line selection or no view to clone.
...
...
@@ -165,7 +165,7 @@ Obiview_p obi_new_view(OBIDMS_p dms, const char* view_name, Obiview_p view_to_cl
* Fails if a view with the same name already exists.
*
* @param dms A pointer on the OBIDMS.
* @param view_name The unique name of the new view.
* @param view_name The unique name of the new view.
Can not be 'taxonomy' (used for URIs).
* @param view_to_clone_name The name of the view to clone stored in the view file of the OBIDMS.
* @param line_selection Eventually a pointer on a list of indexes corresponding to a line selection to use with the view to clone
* if there is one. NULL if there is no line selection or no view to clone.
...
...
@@ -193,7 +193,7 @@ Obiview_p obi_new_view_cloned_from_name(OBIDMS_p dms, const char* view_name, con
* - QUALITY_COLUMN where sequence qualities are stored
*
* @param dms A pointer on the OBIDMS.
* @param view_name The unique name of the view.
* @param view_name The unique name of the view.
Can not be 'taxonomy' (used for URIs).
* @param view_to_clone Eventually a pointer on the opened view to clone to create the new one, if there is one. NULL if not.
* @param line_selection Eventually a pointer on a list of indexes corresponding to a line selection to use with the view to clone
* if there is one. NULL if there is no line selection or no view to clone.
...
...
@@ -227,7 +227,7 @@ Obiview_p obi_new_view_nuc_seqs(OBIDMS_p dms, const char* view_name, Obiview_p v
* - QUALITY_COLUMN where sequence qualities are stored
*
* @param dms A pointer on the OBIDMS.
* @param view_name The unique name of the new view.
* @param view_name The unique name of the new view.
Can not be 'taxonomy' (used for URIs).
* @param view_to_clone_name The name of the view to clone stored in the view file of the OBIDMS.
* @param line_selection Eventually a pointer on a list of indexes corresponding to a line selection to use with the view to clone
* if there is one. NULL if there is no line selection or no view to clone.
...
...
@@ -250,7 +250,7 @@ Obiview_p obi_new_view_nuc_seqs_cloned_from_name(OBIDMS_p dms, const char* view_
*
* @param dms A pointer on the OBIDMS.
* @param view_to_clone A pointer on the opened view to clone to create the new one.
* @param view_name The unique name of the new view.
* @param view_name The unique name of the new view.
Can not be 'taxonomy' (used for URIs).
* @param line_selection Eventually a pointer on a list of indexes corresponding to a line selection to use with the view to clone
* if there is one. NULL if there is no line selection or no view to clone.
* @param comments Eventually, comments to associate with the view. NULL if not.
...
...
@@ -272,7 +272,7 @@ Obiview_p obi_clone_view(OBIDMS_p dms, Obiview_p view_to_clone, const char* view
*
* @param dms A pointer on the OBIDMS.
* @param view_to_clone_name The name of the view to clone.
* @param view_name The unique name of the new view.
* @param view_name The unique name of the new view.
Can not be 'taxonomy' (used for URIs).
* @param line_selection Eventually a pointer on a list of indexes corresponding to a line selection to use with the view to clone
* if there is one. NULL if there is no line selection or no view to clone.
* @param comments Eventually, comments to associate with the view. NULL if not.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment