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
33c79f2d
Commit
33c79f2d
authored
5 years ago
by
Todor Kondic
Browse files
Options
Downloads
Patches
Plain Diff
Update presc.plot
* R/mix.R(presc.plot): New argument. [pal] Colorbrewer palette.
parent
28121410
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DESCRIPTION
+2
-1
2 additions, 1 deletion
DESCRIPTION
R/mix.R
+7
-4
7 additions, 4 deletions
R/mix.R
man/presc.plot.Rd
+3
-1
3 additions, 1 deletion
man/presc.plot.Rd
with
12 additions
and
6 deletions
DESCRIPTION
+
2
−
1
View file @
33c79f2d
...
@@ -23,4 +23,5 @@ Imports:
...
@@ -23,4 +23,5 @@ Imports:
RMassBank,
RMassBank,
parallel,
parallel,
yaml,
yaml,
mzR
mzR,
RColorBrewer
This diff is collapsed.
Click to expand it.
R/mix.R
+
7
−
4
View file @
33c79f2d
...
@@ -542,10 +542,11 @@ presc.p<-function(fn_data,fn_cmpd_l,mode,cl=NULL,ppm_lim_fine=10,EIC_limit=0.001
...
@@ -542,10 +542,11 @@ presc.p<-function(fn_data,fn_cmpd_l,mode,cl=NULL,ppm_lim_fine=10,EIC_limit=0.001
##' @title Plot the Output of Prescreen
##' @title Plot the Output of Prescreen
##' @param wd Sequence of data dirs containing the prescreen subdir.
##' @param wd Sequence of data dirs containing the prescreen subdir.
##' @param out The name of the output file.
##' @param out The name of the output file.
##' @param pal ColorBrewer palette name.
##' @return Nothing useful.
##' @return Nothing useful.
##' @author Todor Kondić
##' @author Todor Kondić
##' @export
##' @export
presc.plot
<-
function
(
wd
,
out
=
"prescreen.pdf"
)
{
presc.plot
<-
function
(
wd
,
out
=
"prescreen.pdf"
,
pal
=
"Accent"
)
{
dfdir
<-
file.path
(
wd
,
"prescreen"
)
dfdir
<-
file.path
(
wd
,
"prescreen"
)
pdf
(
out
)
pdf
(
out
)
## Get the basenames of eic files.
## Get the basenames of eic files.
...
@@ -569,10 +570,12 @@ presc.plot <- function(wd,out="prescreen.pdf") {
...
@@ -569,10 +570,12 @@ presc.plot <- function(wd,out="prescreen.pdf") {
int_rng
<-
range
(
sapply
(
dfs
,
function
(
x
)
x
$
intensity
))
int_rng
<-
range
(
sapply
(
dfs
,
function
(
x
)
x
$
intensity
))
plot.window
(
rt_rng
,
int_rng
)
plot.window
(
rt_rng
,
int_rng
)
box
()
box
()
cols
<-
RColorBrewer
::
brewer.pal
(
n
=
length
(
dfs
),
name
=
pal
)
## Plot eic across the directory set.
## Plot eic across the directory set.
for
(
df
in
dfs
)
{
for
(
n
in
seq
(
length
(
dfs
)))
{
lines
(
df
$
intensity
~
df
$
rt
)
df
<-
dfs
[[
n
]]
col
<-
cols
[[
n
]]
lines
(
df
$
intensity
~
df
$
rt
,
col
=
col
)
}
}
## Find existing children and plot them across the directory
## Find existing children and plot them across the directory
...
...
This diff is collapsed.
Click to expand it.
man/presc.plot.Rd
+
3
−
1
View file @
33c79f2d
...
@@ -4,12 +4,14 @@
...
@@ -4,12 +4,14 @@
\alias{presc.plot}
\alias{presc.plot}
\title{Plot the Output of Prescreen}
\title{Plot the Output of Prescreen}
\usage{
\usage{
presc.plot(wd, out = "prescreen.pdf")
presc.plot(wd, out = "prescreen.pdf"
, pal = "Accent"
)
}
}
\arguments{
\arguments{
\item{wd}{Sequence of data dirs containing the prescreen subdir.}
\item{wd}{Sequence of data dirs containing the prescreen subdir.}
\item{out}{The name of the output file.}
\item{out}{The name of the output file.}
\item{pal}{ColorBrewer palette name.}
}
}
\value{
\value{
Nothing useful.
Nothing useful.
...
...
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