Skip to content

Commit 5cedaed

Browse files
committed
Fix image paths in vignette to use relative paths for GitHub Pages
- Updated vignette knitting function to set fig.path correctly - Fixed gene symbol addition code to work with tidySummarizedExperiment - Images now use relative paths (README_files/figure-gfm/) instead of absolute paths - This should resolve broken image links on GitHub Pages
1 parent e1a6c1e commit 5cedaed

File tree

2 files changed

+37
-32
lines changed

2 files changed

+37
-32
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ ggplot(as_tibble(airway), aes(counts + 1, group = .sample, color = `dex`)) +
263263
labs(title = "Raw counts by treatment (before any filtering)")
264264
```
265265

266-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/plot-raw-counts-1.png)<!-- -->
266+
![](README_files/figure-gfm/plot-raw-counts-1.png)<!-- -->
267267

268268
## Step 1: Data Preprocessing
269269

@@ -415,7 +415,7 @@ airway_abundant_all |>
415415
labs(title = "Counts after abundance filtering (tidybulk default)")
416416
```
417417

418-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/filtering-density-plot-comparison-1.png)<!-- -->
418+
![](README_files/figure-gfm/filtering-density-plot-comparison-1.png)<!-- -->
419419

420420
Update the `airway` object with the filtered data:
421421

@@ -487,7 +487,7 @@ ggplot(as_tibble(airway_all), aes(counts + 1, group = .sample, color = method))
487487
labs(title = "Counts after removing redundant transcripts")
488488
```
489489

490-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/preprocessing-remove-redundancy-1.png)<!-- -->
490+
![](README_files/figure-gfm/preprocessing-remove-redundancy-1.png)<!-- -->
491491

492492
### Filter Variable Transcripts
493493

@@ -552,7 +552,7 @@ ggplot(as_tibble(airway_all), aes(counts + 1, group = .sample, color = method))
552552
labs(title = "Counts after variable filtering")
553553
```
554554

555-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/filtering-variable-summary-and-plot-1.png)<!-- -->
555+
![](README_files/figure-gfm/filtering-variable-summary-and-plot-1.png)<!-- -->
556556

557557
### Scale Abundance
558558

@@ -623,7 +623,7 @@ ggplot(as_tibble(airway_scaled_all), aes(counts + 1, group = .sample, color = me
623623
labs(title = "Scaled counts by method (after scaling)")
624624
```
625625

626-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/normalization-visualize-scaling-1.png)<!-- -->
626+
![](README_files/figure-gfm/normalization-visualize-scaling-1.png)<!-- -->
627627

628628
## Step 2: Exploratory Data Analysis
629629

@@ -684,7 +684,7 @@ airway |>
684684
labs(title = "MDS Analysis")
685685
```
686686

687-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/eda-plot-dimensionality-reduction-1.png)<!-- -->
687+
![](README_files/figure-gfm/eda-plot-dimensionality-reduction-1.png)<!-- -->
688688

689689
``` r
690690
# PCA plot
@@ -696,7 +696,7 @@ airway |>
696696
labs(title = "PCA Analysis")
697697
```
698698

699-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/eda-plot-dimensionality-reduction-2.png)<!-- -->
699+
![](README_files/figure-gfm/eda-plot-dimensionality-reduction-2.png)<!-- -->
700700

701701
### Clustering Analysis
702702

@@ -715,7 +715,7 @@ airway = airway |>
715715
labs(title = "K-means Clustering")
716716
```
717717

718-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/eda-clustering-analysis-1.png)<!-- -->
718+
![](README_files/figure-gfm/eda-clustering-analysis-1.png)<!-- -->
719719

720720
## Step 3: Differential Expression Analysis
721721

@@ -863,7 +863,7 @@ metadata(airway)$tidybulk$edgeR_quasi_likelihood_object |>
863863
plotBCV()
864864
```
865865

866-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-edgeR-object-1.png)<!-- -->
866+
![](README_files/figure-gfm/differential-expression-edgeR-object-1.png)<!-- -->
867867

868868
Plot the log-fold change vs mean plot.
869869

@@ -874,7 +874,7 @@ metadata(airway)$tidybulk$edgeR_quasi_likelihood_fit |>
874874
plotMD()
875875
```
876876

877-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-edgeR-fit-1.png)<!-- -->
877+
![](README_files/figure-gfm/differential-expression-edgeR-fit-1.png)<!-- -->
878878

879879
#### For DESeq2
880880

@@ -887,7 +887,7 @@ metadata(airway)$tidybulk$DESeq2_object |>
887887
plotDispEsts()
888888
```
889889

890-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-DESeq2-object-1.png)<!-- -->
890+
![](README_files/figure-gfm/differential-expression-DESeq2-object-1.png)<!-- -->
891891

892892
Plot the log-fold change vs mean plot.
893893

@@ -898,7 +898,7 @@ metadata(airway)$tidybulk$DESeq2_object |>
898898
plotMA()
899899
```
900900

901-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-DESeq2-fit-1.png)<!-- -->
901+
![](README_files/figure-gfm/differential-expression-DESeq2-fit-1.png)<!-- -->
902902

903903
### Histograms of p-values across methods
904904

@@ -936,7 +936,7 @@ different methods, we can easily compare the p-values across methods.
936936
## Warning: Removed 30 rows containing non-finite outside the scale range
937937
## (`stat_bin()`).
938938

939-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-pvalue-histograms-1.png)<!-- -->
939+
![](README_files/figure-gfm/differential-expression-pvalue-histograms-1.png)<!-- -->
940940

941941
### Compare Results Across Methods
942942

@@ -1008,7 +1008,7 @@ airway |>
10081008
## Warning in scale_y_continuous(trans = tidybulk::log10_reverse_trans()):
10091009
## log10_reverse transformation introduced infinite values.
10101010

1011-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-pvalue-pairplot-1.png)<!-- -->
1011+
![](README_files/figure-gfm/differential-expression-pvalue-pairplot-1.png)<!-- -->
10121012

10131013
### Pairplot of effect sizes across methods (GGpairs)
10141014

@@ -1023,7 +1023,7 @@ airway |>
10231023
labs(title = "Pairplot of effect sizes across methods")
10241024
```
10251025

1026-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-effectsize-pairplot-1.png)<!-- -->
1026+
![](README_files/figure-gfm/differential-expression-effectsize-pairplot-1.png)<!-- -->
10271027

10281028
### Volcano Plots for Each Method
10291029

@@ -1077,7 +1077,7 @@ airway |>
10771077
## Warning: Removed 30 rows containing missing values or values outside the scale range
10781078
## (`geom_point()`).
10791079

1080-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-volcano-plots-1-1.png)<!-- -->
1080+
![](README_files/figure-gfm/differential-expression-volcano-plots-1-1.png)<!-- -->
10811081

10821082
Plotting independent y-axis scales for the p-values and effect sizes
10831083
allows us to compare the top genes across methods.
@@ -1151,7 +1151,7 @@ airway |>
11511151
## Warning: ggrepel: 15925 unlabeled data points (too many overlaps). Consider increasing max.overlaps
11521152
## ggrepel: 15925 unlabeled data points (too many overlaps). Consider increasing max.overlaps
11531153

1154-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/differential-expression-volcano-plots-2-1.png)<!-- -->
1154+
![](README_files/figure-gfm/differential-expression-volcano-plots-2-1.png)<!-- -->
11551155

11561156
### Differential Expression with Contrasts
11571157

@@ -1407,7 +1407,7 @@ airway |>
14071407
## Warning: ggrepel: 784 unlabeled data points (too many overlaps). Consider
14081408
## increasing max.overlaps
14091409

1410-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/batch-correction-adjust-abundance-1.png)<!-- -->
1410+
![](README_files/figure-gfm/batch-correction-adjust-abundance-1.png)<!-- -->
14111411

14121412
## Step 5: Gene Enrichment Analysis
14131413

@@ -1539,32 +1539,32 @@ gene_rank_res |>
15391539

15401540
## [[1]]
15411541

1542-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/enrichment-visualize-gsea-plots-1.png)<!-- -->
1542+
![](README_files/figure-gfm/enrichment-visualize-gsea-plots-1.png)<!-- -->
15431543

15441544
##
15451545
## [[2]]
15461546

1547-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/enrichment-visualize-gsea-plots-2.png)<!-- -->
1547+
![](README_files/figure-gfm/enrichment-visualize-gsea-plots-2.png)<!-- -->
15481548

15491549
##
15501550
## [[3]]
15511551

1552-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/enrichment-visualize-gsea-plots-3.png)<!-- -->
1552+
![](README_files/figure-gfm/enrichment-visualize-gsea-plots-3.png)<!-- -->
15531553

15541554
##
15551555
## [[4]]
15561556

1557-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/enrichment-visualize-gsea-plots-4.png)<!-- -->
1557+
![](README_files/figure-gfm/enrichment-visualize-gsea-plots-4.png)<!-- -->
15581558

15591559
##
15601560
## [[5]]
15611561

1562-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/enrichment-visualize-gsea-plots-5.png)<!-- -->
1562+
![](README_files/figure-gfm/enrichment-visualize-gsea-plots-5.png)<!-- -->
15631563

15641564
##
15651565
## [[6]]
15661566

1567-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/enrichment-visualize-gsea-plots-6.png)<!-- -->
1567+
![](README_files/figure-gfm/enrichment-visualize-gsea-plots-6.png)<!-- -->
15681568

15691569
``` r
15701570
detach("package:enrichplot", unload = TRUE)
@@ -1835,7 +1835,7 @@ airway |>
18351835
labs(title = "CIBERSORT Cell Type Proportions")
18361836
```
18371837

1838-
![](/Users/a1234450/Documents/GitHub/tidybulk/README_files/figure-gfm/deconvolution-plotting-1.png)<!-- -->
1838+
![](README_files/figure-gfm/deconvolution-plotting-1.png)<!-- -->
18391839

18401840
``` r
18411841
# Repeat similar plotting for LLSR, EPIC, MCP-counter, quanTIseq, and xCell

vignettes/introduction.Rmd

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ knit: >
2626
2727
# Set knitr options for both renders
2828
knitr::opts_knit$set(root.dir = proj_root)
29+
knitr::opts_chunk$set(fig.path = "README_files/figure-gfm/")
2930
3031
rmarkdown::render(
3132
x,
@@ -181,16 +182,20 @@ Here we will add a gene symbol column to the `airway` object. This will be used
181182
library(org.Hs.eg.db)
182183
library(AnnotationDbi)
183184
184-
# Add gene symbol and entrez
185-
airway <-
186-
airway |>
187-
188-
mutate(entrezid = mapIds(org.Hs.eg.db,
189-
keys = .feature,
185+
# Add gene symbol and entrez for better annotation
186+
rowData(airway)$symbol = AnnotationDbi::mapIds(org.Hs.eg.db::org.Hs.eg.db,
187+
keys = rownames(airway),
188+
keytype = "ENSEMBL",
189+
column = "SYMBOL",
190+
multiVals = "first"
191+
)
192+
193+
rowData(airway)$entrezid = AnnotationDbi::mapIds(org.Hs.eg.db::org.Hs.eg.db,
194+
keys = rownames(airway),
190195
keytype = "ENSEMBL",
191196
column = "ENTREZID",
192197
multiVals = "first"
193-
))
198+
)
194199
195200
detach("package:org.Hs.eg.db", unload = TRUE)
196201
detach("package:AnnotationDbi", unload = TRUE)

0 commit comments

Comments
 (0)