Skip to content

Instantly share code, notes, and snippets.

/*
*
* Adventure Creator
* by Chris Burton, 2013-2020
*
* "ActionCheckTansform.cs"
*
* This is a blank action template, which has two outputs.
*
*/
@gaiusjaugustus
gaiusjaugustus / SocialMediaCounts
Created December 7, 2016 18:59
R/ggplot2 sort stacked barplot question on Stack Overflow
slug provider n
id1 facebook 1
id1 twitter 1
id2 homepage 1
id3 facebook 1
id3 tumblr 1
id3 twitter 1
id4 facebook 1
id5 facebook 1
id5 twitter 1
# Split data set in (tumor, normal) pair
dsT <- sapply(strsplit(Tumorsamples, split = ".", fixed=TRUE),"[[", 1)
dsN <- sapply(strsplit(Normalsamples, split = ".", fixed=TRUE),"[[", 1)
# Load all samples (in case more samples were downloaded)
cdf <- AffymetrixCdfFile$byChipType(chipType, tags="Full")
print("print(cdf)")
print(cdf)
@gaiusjaugustus
gaiusjaugustus / Clustering_example_data.R
Created May 25, 2016 20:23
Data for clustering label question on Stack Overflow
structure(list(chromosome = c(19L, 12L, 5L, 3L, 12L, 16L, 13L,
19L, 3L, 13L, 3L, 20L, 7L, 22L, 7L, 13L, 22L, 8L, 18L, 17L, 5L,
7L, 12L, 22L, 3L, 3L, 3L, 8L, 2L, 14L), tcnId = c(1L, 5L, 4L,
10L, 1L, 1L, 7L, 1L, 19L, 4L, 11L, 1L, 8L, 1L, 4L, 9L, 1L, 2L,
1L, 15L, 7L, 10L, 3L, 1L, 7L, 16L, 17L, 4L, 1L, 2L), dhId = c(1L,
1L, 1L, 1L, 1L, 3L, 1L, 3L, 1L, 1L, 3L, 1L, 1L, 4L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 3L, 1L, 1L, 1L, 1L, 1L, 1L), tcnStart = c(90911,
23976225, 142298217.5, 46849231, 150443, 7050355.5, 94835569,
22613582.5, 197838508.5, 32124142.5, 66147533, 61306, 7770125.5,
35989643.5, 3453496, 110811550.5, 16052529, 135722, 11543, 21125890.5,
ID Length TN
95471 310073 Normal
17890 262629 Tumor
94641 127623 Normal
51751 421808 Normal
15359 1344925 Tumor
11498 249292 Normal
8218 232724 Normal
141810 209089 Normal
28431 379404 Normal