duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
setMethod("normFactors", signature(object="MRexperiment"), | |
function(object) { | |
nf <- pData(obj@expSummary$expSummary)[["normFactors"]] | |
nf <- unlist(nf) | |
names( nf ) <- sampleNames(object) | |
nf | |
}) | |
setReplaceMethod("normFactors", signature(object="MRexperiment", value="numeric"), | |
function( object, value ) { |
import_biom2 <- function(x, | |
treefilename=NULL, refseqfilename=NULL, refseqFunction=readDNAStringSet, refseqArgs=NULL, | |
parseFunction=parse_taxonomy_default, parallel=FALSE, version=1.0, ...){ | |
# initialize the argument-list for phyloseq. Start empty. | |
argumentlist <- list() | |
x = biom(x) | |
b_data = biom_data(x) | |
b_data_mat = as(b_data, "matrix") |
load("HMPv35_100nt.biom_MRexperiment.rdata") | |
library(msd16s) | |
k = which(pData(obj)$bodysite == "UBERON_stool") | |
obj = obj[,k] | |
mergeData = function(o1,o2,norm=FALSE){ | |
o1names = rownames(o1) | |
o2names = rownames(o2) |
Algeria | Africa | |
---|---|---|
Angola | Africa | |
Benin | Africa | |
Botswana | Africa | |
Burkina Faso | Africa | |
Burundi | Africa | |
Cameroon | Africa | |
Cape Verde | Africa | |
Central African Republic | Africa | |
Chad | Africa |
library(shiny) | |
# Define server logic for random distribution application | |
shinyServer(function(input, output) { | |
# Reactive expression to generate the requested distribution. This is | |
# called whenever the inputs change. The renderers defined | |
# below then all use the value computed from this expression | |
data <- reactive({ | |
dist <- switch(input$dist, |
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' | |
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 | |
gpg -a --export E084DAB9 | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -y install r-base libapparmor1 libcurl4-gnutls-dev libxml2-dev libssl-dev gdebi-core | |
sudo su - -c "R -e \"install.packages('shiny', repos = 'http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"devtools::install_github('daattali/shinyjs')\"" | |
sudo su - -c "R -e \"devtools::install_github('bioc/shinyjs')\"" |
extractMR<-function(obj){ | |
mat = MRcounts(obj) | |
ls = as.vector(libSize(obj)) | |
norm= as.vector(normFactors(obj)) | |
pd = pData(obj) | |
fd = fData(obj) | |
dat = list(counts=mat,librarySize=ls,normFactors=norm,pheno=pd,feat=fd) | |
return(dat) | |
} |
--- | |
title: "Shiny App" | |
author: "jpaulson" | |
output: html_document | |
runtime: shiny | |
--- | |
This R Markdown document is made interactive using Shiny and allows you to explore an eSet object. | |
# Examples |
library(yarn) | |
library(dplyr) | |
library(rafalib) | |
obj = downloadGTEx() | |
lowSampleSizes = c("Bladder","Cells - Leukemia cell line (CML)","Cervix - Ectocervix","Cervix - Endocervix","Fallopian Tube") | |
obj = filterSamples(obj,lowSampleSizes,"SMTSD") %>% | |
filterMissingGenes |