Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
shinyscreen
Manage
Activity
Members
Labels
Plan
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Environmental Cheminformatics
shinyscreen
Commits
d13fa32e
Commit
d13fa32e
authored
1 year ago
by
Todor Kondić
Browse files
Options
Downloads
Patches
Plain Diff
get_data_4_eic_ms1: Add 'db' argument.
parent
75f09bd5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/data-model.R
+2
-1
2 additions, 1 deletion
R/data-model.R
R/plotting.R
+4
-4
4 additions, 4 deletions
R/plotting.R
with
6 additions
and
5 deletions
R/data-model.R
+
2
−
1
View file @
d13fa32e
...
@@ -60,7 +60,8 @@ make_db_precursors <- function(m) {
...
@@ -60,7 +60,8 @@ make_db_precursors <- function(m) {
}
else
{
}
else
{
stop
(
'make_db_precursors: Unknown mass unit (coarse).'
)
stop
(
'make_db_precursors: Unknown mass unit (coarse).'
)
}
}
## TODO: FIXME: Should precids be unique, or not?
browser
()
masses
$
precid
=
-1L
masses
$
precid
=
-1L
start
=
1L
start
=
1L
while
(
start
<=
NROW
(
masses
))
{
while
(
start
<=
NROW
(
masses
))
{
...
...
This diff is collapsed.
Click to expand it.
R/plotting.R
+
4
−
4
View file @
d13fa32e
...
@@ -266,14 +266,14 @@ narrow_colrdata <- function(colrdata,kvals) {
...
@@ -266,14 +266,14 @@ narrow_colrdata <- function(colrdata,kvals) {
## subset of the `summ' table based on `kvals'. We need it for rt-s in
## subset of the `summ' table based on `kvals'. We need it for rt-s in
## the labels. Argument `labs' is a vector of names that will be used
## the labels. Argument `labs' is a vector of names that will be used
## to construct the legend labels.
## to construct the legend labels.
get_data_4_eic_ms1
<-
function
(
extr_ms1
,
summ_rows
,
kvals
,
labs
)
{
get_data_4_eic_ms1
<-
function
(
db
,
extr_ms1
,
summ_rows
,
kvals
,
labs
)
{
## Which of the selected keys are in the extr_ms1? This can be
## Which of the selected keys are in the extr_ms1? This can be
## made more obvious to the user, but note necessary atm.
## made more obvious to the user, but note necessary atm.
keys
<-
names
(
kvals
)
keys
<-
names
(
kvals
)
actual_key
<-
intersect
(
keys
,
names
(
extr_ms1
))
actual_key
<-
intersect
(
keys
,
names
(
extr_ms1
))
actual_kvals
<-
kvals
[
actual_key
]
actual_kvals
<-
kvals
[
actual_key
]
browser
()
## Subset extr_ms1 by the actual key.
## Subset extr_ms1 by the actual key.
tab
<-
get_data_from_key
(
tab
=
extr_ms1
,
key
=
actual_kvals
)
tab
<-
get_data_from_key
(
tab
=
extr_ms1
,
key
=
actual_kvals
)
...
@@ -344,9 +344,9 @@ make_eic_ms1_plot <- function(db,extr_ms1,summ,kvals,labs,axis="linear",rt_range
...
@@ -344,9 +344,9 @@ make_eic_ms1_plot <- function(db,extr_ms1,summ,kvals,labs,axis="linear",rt_range
summ_rows
[,
sel_ms1_rt
:=
NULL
]
summ_rows
[,
sel_ms1_rt
:=
NULL
]
summ_rows
[,
c
(
"scan"
,
"qa_ms1_exists"
,
"ms2_sel"
)
:=
NULL
]
summ_rows
[,
c
(
"scan"
,
"qa_ms1_exists"
,
"ms2_sel"
)
:=
NULL
]
summ_rows
<-
summ_rows
[,
unique
(
.SD
)]
summ_rows
<-
summ_rows
[,
unique
(
.SD
)]
## Get the table with ms1 data.
## Get the table with ms1 data.
pdata
<-
get_data_4_eic_ms1
(
extr_ms1
,
summ_rows
,
kvals
,
labs
)
pdata
<-
get_data_4_eic_ms1
(
db
=
db
,
extr_ms1
,
summ_rows
,
kvals
,
labs
)
## Deal with retention time range.
## Deal with retention time range.
...
...
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