-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4caba7
commit 9a39738
Showing
80 changed files
with
3,729 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
library(biomaRt) | ||
|
||
mart <- useMart('ensembl') | ||
mart <- useDataset('mmusculus_gene_ensembl', mart=mart) | ||
attr <- c('ensembl_gene_id', 'mgi_id', 'mgi_symbol') | ||
q <- getBM(attr=attr, mart=mart) | ||
|
||
getBM(attr=, mart=) | ||
attr=c('ensembl_gene_id') // retrieved fields | ||
filter=c('ensembl_gene_id') // filter fields | ||
value=c('ENSMUSG00000064336') // filter ensembl_gene_id == ENSMUSG00000064336 | ||
|
||
listMarts() | ||
listDatasets() | ||
listAttributes() | ||
listFilters() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cor(M, method=, use=, ...) | ||
* between columns of M | ||
method=pearson, spearman, kendall | ||
use= | ||
* everything: NA produce column with NA | ||
* all: NA throws error | ||
* complete.obs: remove rows that contain >0 NA (all samples) | ||
* pairwise.complete.obs: remove only rows for pairwise comparison (different rows for different pairs) | ||
|
||
# cor to dist | ||
dist = 0.5 * (1 - abs(r)) | ||
|
||
# cor.test | ||
cor.test(x, y, ...) | ||
alternative=two.sided (default), less, greater | ||
|
||
# weighted | ||
library(weights) | ||
weighted.mean(x) // default stats package | ||
wtd.var(x, w=NULL) | ||
wtd.cor(x, y, w=NULL) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
# corrplot | ||
corrplot(matrix, method=, ...) | ||
# methods | ||
color | ||
|
||
# parameters | ||
is.corr=FALSE | ||
order=c('origional|hclust') // hclust correct? | ||
method=color, num | ||
is.corr=FALSE // if matrix is not correlation matrix (e.g. distance) | ||
order='original' | ||
hclust: hclust(as.dist(matrix)) // which is WRONG if matrix is correlation matrix | ||
addrect=5 // rectangles, only if order='hclust' | ||
tl.col='black' // color labels | ||
col=color_palette // c(col, col) do obtain full range | ||
cl.lim=c(0, 1) | ||
|
||
# correplot.mixed | ||
corrplot.mixed(matrix, lower='number', upper='circle') | ||
square, circle, ellipse, shade, color, number | ||
|
||
# colors | ||
col1 = colorRampPalette(c('white', 'blue')) | ||
col=col1(200) | ||
|
||
# If m is correlation matrix | ||
corrplot(m) | ||
plot(hclust(as.dist(1 - m))) | ||
|
||
# if m is distance matrix | ||
corrplot(m, is.corr=F) | ||
plot(hclust(as.dist(m))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.