Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lalo-caballero committed Feb 21, 2024
1 parent 1ff18e7 commit cccb778
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions vignettes/introduction-to-gcims.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ to_plot <- dplyr::bind_rows(
Smoothed = as.data.frame(one_ims_smoothed),
.id = "Status"
)
plotly::ggplotly(ggplot(to_plot) +
plot_interactive((ggplot(to_plot) +
geom_line(aes(x = drift_time_ms, y = intensity, colour = Status)) +
labs(x = "Drift time (ms)", y = "Intensity (a.u.)"))
labs(x = "Drift time (ms)", y = "Intensity (a.u.)")))
```

```{r}
Expand All @@ -208,7 +208,7 @@ to_plot <- dplyr::bind_rows(
Smoothed = as.data.frame(one_chrom_smoothed),
.id = "Status"
)
plotly::ggplotly(ggplot(to_plot) +
plot_interactive(ggplot(to_plot) +
geom_line(aes(x = retention_time_s, y = intensity, colour = Status)) +
labs(x = "Retention time (s)", y = "Intensity (a.u.)"))
```
Expand Down Expand Up @@ -390,7 +390,7 @@ ket1 <- findPeaks(

```{r}
peak_list_ket1 <- peaks(ket1)
plotly::ggplotly(plot(ket1) +
plot_interactive(plot(ket1) +
overlay_peaklist(peak_list_ket1, color_by = "PeakID"))
```

Expand Down Expand Up @@ -420,7 +420,7 @@ ket2 <- dataset$getSample("Ketones2")
```

```{r}
plotly::ggplotly(plot(ket2) +
plot_interactive(plot(ket2) +
overlay_peaklist(peaks(ket2)) )
```

Expand All @@ -429,7 +429,7 @@ Or plot all the peaks from all the dataset together, overlayed on a single sampl
```{r}
plt <- plot(ket2) +
overlay_peaklist(peaks(dataset), color_by = "SampleID")
plotly::ggplotly(plt)
plot_interactive(plt)
```

# Clustering
Expand All @@ -454,13 +454,13 @@ peak_list_clustered <- peak_clustering$peak_list_clustered
```{r }
plt <- plot(ket2) +
overlay_peaklist(peak_list_clustered, color_by = "SampleID")
plotly::ggplotly(plt)
plot_interactive(plt)
```

```{r}
plt <- plot(ket2) +
overlay_peaklist(dplyr::filter(peak_list_clustered, !is.na(cluster)), color_by = "cluster")
plotly::ggplotly(plt)
plot_interactive(plt)
```

The resulting cluster sizes (median position of individual clusters) is not a good reference
Expand All @@ -469,7 +469,7 @@ for integration. We are working on this.
```{r}
plt <- plot(ket2) +
overlay_peaklist(peak_clustering$cluster_stats, color_by = "cluster")
plotly::ggplotly(plt)
plot_interactive(plt)
```

# Baseline correction
Expand All @@ -494,7 +494,7 @@ to_plot <- data.frame(
Intensity = intensity(one_ims_spec),
Baseline = baseline(one_ims_spec)
)
plotly::ggplotly(ggplot(to_plot) +
plot_interactive(ggplot(to_plot) +
geom_line(aes(x = drift_time_ms, y = Intensity), color = "red") +
geom_line(aes(x = drift_time_ms, y = Baseline), color = "blue") +
labs(x = "Drift time (ms)", y = "Intensity (a.u.)"))
Expand Down

0 comments on commit cccb778

Please sign in to comment.