Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
agrotoxindb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jean-Karim Heriche
agrotoxindb
Commits
55ab4363
Commit
55ab4363
authored
1 year ago
by
Jean-Karim Heriche
Browse files
Options
Downloads
Patches
Plain Diff
Fix retrieval of analysis from associated data.
parent
cd2c0df2
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
R/AnalysisHandle.R
+3
-3
3 additions, 3 deletions
R/AnalysisHandle.R
man/AnalysisHandle.Rd
+1
-1
1 addition, 1 deletion
man/AnalysisHandle.Rd
with
4 additions
and
4 deletions
R/AnalysisHandle.R
+
3
−
3
View file @
55ab4363
...
...
@@ -36,11 +36,11 @@ AnalysisHandle <- R6Class(
#' @param datafile A Datafile object
#' @param data_as_input logical (default = FALSE), whether the data is an
#' input to the analysis workflow
#' @return An Analysis object
#' @return An Analysis object
or a list of Analysis objects if data_as_input = TRUE
get_by_data
=
function
(
datafile
,
data_as_input
=
FALSE
)
{
if
(
data_as_input
)
{
# Analyses that consumed this data
query
<-
"SELECT A.* FROM Analysis AS A, Analysis_has_Data AS AhD
query
<-
"SELECT
DISTINCT
A.* FROM Analysis AS A, Analysis_has_Data AS AhD
WHERE AhD.Parent_ID = ? AND AhD.Analysis_ID = A.ID"
data
<-
self
$
dbConnection
$
get_data
(
query
,
list
(
screen
$
ID
))
if
(
length
(
data
$
ID
)
>
0
)
{
...
...
@@ -62,7 +62,7 @@ AnalysisHandle <- R6Class(
}
else
{
# Analysis that produced this data.
# There should be only one.
query
<-
"SELECT A.* FROM Analysis AS A, Analysis_has_Data AS AhD
query
<-
"SELECT
DISTINCT
A.* FROM Analysis AS A, Analysis_has_Data AS AhD
WHERE AhD.Child_ID = ? AND AhD.Analysis_ID = A.ID"
df
<-
self
$
dbConnection
$
get_data
(
query
,
list
(
datafile
$
ID
))
if
(
length
(
df
$
ID
)
==
1
)
{
...
...
This diff is collapsed.
Click to expand it.
man/AnalysisHandle.Rd
+
1
−
1
View file @
55ab4363
...
...
@@ -85,7 +85,7 @@ input to the analysis workflow}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
An Analysis object
An Analysis object
or a list of Analysis objects if data_as_input = TRUE
}
}
\if{html}{\out{<hr>}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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