Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Guangchuang Yu GuangchuangYu

🎯
Focusing
Block or report user

Report or block GuangchuangYu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Temperature.txt
Sample Date DateNr dDay1 dDay2 dDay3 Station Area 31UE_ED50 31UN_ED50 Year Month Season Salinity Temperature CHLFa
DANT.19900110 19900110 1990/10/1 7 9 9 DANT WZ 681379.62 5920571.24 1990 1 winter 29.19 4 1.3
DANT.19900206 19900206 1990/6/2 34 36 36 DANT WZ 681379.62 5920571.24 1990 2 winter 27.37 6 NA
DANT.19900308 19900308 1990/8/3 64 66 66 DANT WZ 681379.62 5920571.24 1990 3 spring 24.99 7.3 21.1
DANT.19900404 19900404 1990/4/4 91 93 93 DANT WZ 681379.62 5920571.24 1990 4 spring 28.79 8.2 25
DANT.19900509 19900509 1990/9/5 126 128 128 DANT WZ 681379.62 5920571.24 1990 5 spring 33.28 17.4 10.2
DANT.19900620 19900620 6/20/1990 168 170 170 DANT WZ 681379.62 5920571.24 1990 6 summer 32.69 18.1 6.2
DANT.19900718 19900718 7/18/1990 196 198 198 DANT WZ 681379.62 5920571.24 1990 7 summer 31.9 17 7.9
DANT.19900815 19900815 8/15/1990 224 226 226 DANT WZ 681379.62 5920571.24 1990 8 summer 33.76 21 7.85
DANT.19900919 19900919 9/19/1990 259 261 26
View Temperature.txt
Sample Date DateNr dDay1 dDay2 dDay3 Station Area 31UE_ED50 31UN_ED50 Year Month Season Salinity Temperature CHLFa
DANT.19900110 19900110 1990/10/1 7 9 9 DANT WZ 681379.62 5920571.24 1990 1 winter 29.19 4 1.3
DANT.19900206 19900206 1990/6/2 34 36 36 DANT WZ 681379.62 5920571.24 1990 2 winter 27.37 6 NA
DANT.19900308 19900308 1990/8/3 64 66 66 DANT WZ 681379.62 5920571.24 1990 3 spring 24.99 7.3 21.1
DANT.19900404 19900404 1990/4/4 91 93 93 DANT WZ 681379.62 5920571.24 1990 4 spring 28.79 8.2 25
DANT.19900509 19900509 1990/9/5 126 128 128 DANT WZ 681379.62 5920571.24 1990 5 spring 33.28 17.4 10.2
DANT.19900620 19900620 6/20/1990 168 170 170 DANT WZ 681379.62 5920571.24 1990 6 summer 32.69 18.1 6.2
DANT.19900718 19900718 7/18/1990 196 198 198 DANT WZ 681379.62 5920571.24 1990 7 summer 31.9 17 7.9
DANT.19900815 19900815 8/15/1990 224 226 226 DANT WZ 681379.62 5920571.24 1990 8 summer 33.76 21 7.85
DANT.19900919 19900919 9/19/1990 259 261 26
@GuangchuangYu
GuangchuangYu / ss-pkg.R
Created Apr 19, 2019
R packages for semantic similarity measurement
View ss-pkg.R
d <- data.frame(pkg = c("GOSim", "GOSemSim", "DOSE", "meshes",
"DOSim", "HPOSim", "ppiPre", "MeSHSim", "meshr"),
year = c(2007, 2010, 2015, 2018, 2011, 2015, 2013, 2015, 2015),
journal = c("BMC Bioinformatics", rep("Bioinformatics", 3),
"BMC Bioinformatics", "PLoS One", "BMC Systems Biology",
"Journal of Bioinformatics and computational biology",
"BMC Bioinformatics"),
y = c(1, 1, 2, 3, 2, 4, 5, 2.8, 3.2))
require(ggplot2)
View worldcup2018.R
d = structure(list(x = c(516.362976074219, 514.883316040039, 510.306549072266,
502.721382141113, 492.303680419922, 479.293769836426, 463.977825164795,
446.675720214844, 427.74100112915, 407.568737030029, 386.590072631836,
365.25927734375, 344.028457641602, 323.352523803711, 303.678215026855,
285.42236328125, 268.959743499756, 254.630310058594, 242.738302230835,
233.550735473633, 227.284624099731, 224.07541847229, 223.949848175049,
226.633100509644, 232.021848678589, 240.107601165771, 248.467231750488,
256.632625579834, 264.798046112061, 272.827682495117, 279.170124053955,
284.358814239502, 288.348812103271, 291.169918060303, 292.902908325195,
293.650428771973, 293.608024597168, 292.990119934082, 291.361457824707,
View qbar.R
qbar <- function(x, verbose=TRUE) {
enc = encoding(quality(x))
qual <- sapply(seq_along(x), function(i) enc[to_char_vector(x[i])])
mq <- rowMeans(qual)
if (verbose) {
names(mq) <- NULL
print(mq)
}
View breast_curve.R
f <- function(a, b) function(y) a * y * log(y, base=10) -1/b * exp(-(b*y - b/exp(1))^4)
y <- seq(0, 1, length.out=100)
cols = colorspace::rainbow_hcl(5)
d1 <- data.frame(x = f(3, 30)(y), y=y, color=cols[1])
d2 <- data.frame(x = f(2.8, 33)(y), y=y, color=cols[2])
d3 <- data.frame(x = f(2.5, 36)(y), y=y, color=cols[3])
d4 <- data.frame(x = f(2.2, 40)(y), y=y, color=cols[4])
d5 <- data.frame(x = f(2, 50)(y), y=y, color=cols[5])
View issues of CorMut.md

No update since 2014.

## Access date: 2017-01-04
$ svn log -q |grep 'z.li'
r87229 | z.li | 2014-03-08 12:13:28 +0800 (Sat, 08 Mar 2014)
r85532 | z.li | 2014-01-15 13:00:43 +0800 (Wed, 15 Jan 2014)
r85454 | z.li | 2014-01-12 13:57:16 +0800 (Sun, 12 Jan 2014)
r72578 | z.li | 2013-01-16 15:11:20 +0800 (Wed, 16 Jan 2013)
r72577 | z.li | 2013-01-16 13:43:05 +0800 (Wed, 16 Jan 2013)
View msigdf_clusterprofiler.R
## devtools::install_github("stephenturner/msigdf")
library(msigdf)
library(dplyr)
library(clusterProfiler)
c2 <- msigdf.human %>%
filter(collection == "c2") %>% select(geneset, entrez) %>% as.data.frame
data(geneList)
de <- names(geneList)[1:100]
View hack chipseeker annotation with CpGI
require(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
library(ChIPseeker)
library(GenomicRanges)
# Hack chipseeker function to add annotaiton
getGenomicAnnoStat <- function(peakAnno) {
if ( class(peakAnno) == "GRanges" )
peakAnno <- as.data.frame(peakAnno)
anno <- peakAnno$annotation
## anno <- sub(" \\(.+", "", anno)
You can’t perform that action at this time.