Skip to content

Commit

Permalink
PCA note block
Browse files Browse the repository at this point in the history
  • Loading branch information
Carol-seven committed Jul 9, 2024
1 parent 206c495 commit d6df42f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
13 changes: 7 additions & 6 deletions docs/articles/usage_template.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
scaffold: scaffold.html
usage_template: usage_template.html
last_built: 2024-07-09T02:13Z
last_built: 2024-07-09T02:54Z
urls:
reference: https://uconn-scs.github.io/msDiaLogue/reference
article: https://uconn-scs.github.io/msDiaLogue/articles
Expand Down
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions vignettes/usage_template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -675,15 +675,17 @@ and relationships within complex datasets.

In the visualization for `graphType = "PCA_*"`, the arguments `center` and `scale` are
used to center the data to zero mean and scale to unit variance, with default setting at
`TRUE`. The most common error message is "Cannot rescale a constant/zero column to unit
variance." This clearly occurs when columns representing proteins contain only zeros or
have constant values. Typically, there are two ways to address this error: one is to
remove these proteins, and the other is to set `scale = FALSE`.
`TRUE`.

<div class="note">
**Note:** Data scaling is done to ensure that the scale differences between different
features do not affect the results of PCA. If not scaled, features with larger scales will
dominate the computation of principal components (PCs). </div>
dominate the computation of principal components (PCs). \
**Note:** The most common error message for the PCA is
"**Cannot rescale a constant/zero column to unit variance**."
This clearly occurs when columns representing proteins contain only zeros or
have constant values. Typically, there are two ways to address this error: one is to
remove these proteins, and the other is to set `scale = FALSE`. </div>

In the case of `dataImput`, two proteins, namely "TEBP_HUMAN" and "T126B_HUMAN,"
have constant values, leading to the error message. We choose to remove these two proteins
Expand All @@ -693,6 +695,7 @@ in PCA.
dataPCA <- dataImput[, !(colnames(dataImput) %in% c("TEBP_HUMAN", "T126B_HUMAN"))]
```


#### PCA_scree

One way to help identify how many PCs to retain, is to explore a scree plot. The scree
Expand Down

0 comments on commit d6df42f

Please sign in to comment.