Skip to content

Commit 269650f

Browse files
author
jasenfinch
committed
updated pkgdown site
1 parent bf3a19f commit 269650f

File tree

8 files changed

+63
-273
lines changed

8 files changed

+63
-273
lines changed

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# binneR
1+
# binneR <img align = "right" src="man/figures/binneRsticker.png" height = "200" />
22

33
<!-- badges: start -->
44
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
@@ -9,9 +9,7 @@
99
[![DOI](https://zenodo.org/badge/33118371.svg)](https://zenodo.org/badge/latestdoi/33118371)
1010
<!-- badges: end -->
1111

12-
<img align = "right" src="inst/sticker/binneRsticker.png" height = "200">
13-
14-
### Spectral Processing for High Resolution Flow Infusion Mass Spectrometry
12+
> **Spectral Processing for High Resolution Flow Infusion Mass Spectrometry**
1513
1614
A spectral binning approach for flow infusion electrospray high resolution mass spectrometry (FIE-HRMS) data.
1715
Includes tools for generating intensity matrices converted raw data file formats such as `.mzML` and `.mzXML`, plotting chromatograms and total ion counts.

docs/articles/binneR.html

+19-233
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

+20-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pkgdown.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ pkgdown: 1.6.1
33
pkgdown_sha: ~
44
articles:
55
binneR: binneR.html
6-
last_built: 2020-11-20T00:37Z
6+
last_built: 2020-11-20T01:14Z
77

41.1 KB
Loading

docs/reference/singleSample.html

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/figures/binneRsticker.png

41.1 KB
Loading

vignettes/binneR.Rmd

+19-22
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
---
22
title: "binneR"
3-
subtitle: "`r paste0('v',packageVersion('binneR'))`"
4-
author: "Jasen Finch"
5-
date: "`r format(Sys.time(), '%d %B, %Y')`"
63
output:
74
prettydoc::html_pretty:
85
toc: true
96
highlight: github
107
theme: tactile
118
vignette: >
12-
%\VignetteIndexEntry{binneR}
13-
%\VignetteEngine{knitr::rmarkdown}
14-
%\VignetteEncoding{UTF-8}
9+
%\VignetteIndexEntry{binneR usage}
10+
%\VignetteEngine{knitr::rmarkdown}
11+
%\VignetteEncoding{UTF-8}
1512
---
16-
13+
1714
```{r echo = FALSE, message = TRUE}
1815
hasData <- requireNamespace("metaboData", quietly = TRUE)
1916
if (!hasData) {
@@ -38,16 +35,16 @@ library(magrittr)
3835

3936
```{r sticker, echo=FALSE}
4037
htmltools::img(src = knitr::image_uri(system.file('sticker/binneRsticker.png',package = 'binneR')),
41-
style = 'display:block;margin-left:auto;margin-right:auto; height:200px;')
38+
style = 'display:block;margin-left:auto;margin-right:auto; height:200px;')
4239
```
43-
40+
4441
## Introduction
45-
42+
4643
The *binneR* package provides a spectral binning approach for routine processing of flow infusion electrospray - high resolution mass spectrometry (FIE-HRMS) metabolomics fingerprinting experiments, the results of which can then be used for subsequent statistical analyses.
47-
44+
4845
Spectral binning rounds high resolution fingerprinting data by a specified amu bin width.
4946
FIE-HRMS data consists of a 'plug flow', across which MS signal intensities can be averaged to provide a metabolome fingerprint. Below shows an animation of the spectrum change across ‘plug flow’ region of an example FIE-HRMS injection acquired in negative ionisation mode.
50-
47+
5148
```{r FIEfingerprint, echo=FALSE, fig.width=7,fig.height=5,fig.align='center',fig.show='animate',animation.hook = 'gifski',interval=0.1,dev='png',aniopts=('controls,loop')}
5249
5350
file <- filePaths('FIE-HRMS','BdistachyonEcotypes')[1]
@@ -59,9 +56,11 @@ buffer <- 10
5956
is <- c(1,is[2] + buffer)
6057
6158
spectrum <- peaks(ms) %>%
62-
purrr::map(as_tibble) %>%
59+
purrr::map(~{
60+
as_tibble(.x,.name_repair = 'minimal') %>%
61+
set_colnames(c('m/z','Abundance'))
62+
}) %>%
6363
bind_rows(.id = 'seqNum') %>%
64-
rename(`m/z` = V1,Abundance = V2) %>%
6564
mutate(seqNum = as.numeric(seqNum)) %>%
6665
left_join(chrom %>%
6766
select(seqNum,polarity),by = 'seqNum') %>%
@@ -70,15 +69,15 @@ spectrum <- peaks(ms) %>%
7069
filter(Scan >= is[1] & Scan <= is[2]) %>%
7170
mutate(Bin = `m/z` %>% round(2)) %>%
7271
group_by(Scan,Bin) %>%
73-
summarise(Abundance = sum(Abundance))
72+
summarise(Abundance = sum(Abundance),.groups = 'drop')
7473
7574
lim <- max(spectrum$Abundance) + 1000
7675
7776
chrom <- chrom %>%
7877
filter(polarity == 0)
7978
chrom$acquisitionNum <- 1:nrow(chrom)
8079
81-
for (i in is[1]:is[2]) {
80+
for (i in is[1]:is[2]) {
8281
p <- list()
8382
8483
p$chromatogram <- ggplot(chrom,aes(x = acquisitionNum,y = totIonCurrent)) +
@@ -132,7 +131,7 @@ For a set of specified file paths, the range of infusion scans can be detected u
132131

133132
```{r infusionScanDetection}
134133
infusionScans <- detectInfusionScans(
135-
metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes')[1],
134+
metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes')[1],
136135
thresh = 0.5
137136
)
138137
infusionScans
@@ -170,10 +169,6 @@ res <- readFiles(file,
170169

171170
This will return a list containing the intensity matrices for each ionisation mode, with the rows being the individual samples and columns the spectral bins.
172171

173-
```{r readFiles}
174-
str(res)
175-
```
176-
177172
## binneRlyse - metabolomics fingerprinting experiments
178173

179174
Routine FIE-HRMS metabolomic fingerprinting experiments can require rapid the processing of hundereds of MS files that will also require sample information such as biological classes for subsequent statistical analyses.
@@ -319,7 +314,9 @@ dat <- readFiles(files[1],scans = detectInfusionScans(files[1]),dp = 5) %>%
319314
bin = round(mz,2))
320315
measures <- dat %>%
321316
group_by(bin,mode) %>%
322-
summarise(purity = binneR:::binPurity(mz,Intensity),centrality = binneR:::binCentrality(mz,Intensity),Intensity = mean(Intensity))
317+
summarise(purity = binneR:::binPurity(mz,Intensity),
318+
centrality = binneR:::binCentrality(mz,Intensity),
319+
Intensity = mean(Intensity),.groups = 'drop')
323320
```
324321

325322
#### Purity

0 commit comments

Comments
 (0)