Session View
This half-day symposium will present several interactive sessions which aim to bring delegates together to discuss and share innovative ways of teaching.
| make_results_plot <- function(path, DEBUG = FALSE, reorder=FALSE, qval_thresh=.1){ | |
| alpha_levels <- c(".0001 or less", ".001", ".01", ".05", ".05 or above") | |
| alpha_breaks <- rev(c(.09, .5, .62, .7, .85)) | |
| nonscaled <- read.csv(path, sep="\t") | |
| if(nrow(nonscaled) == 0){ | |
| warning("Error running maaslin, results file empty") | |
| return(NULL) | |
| } | |
| any_sig <- nonscaled %>% group_by(feature) %>% filter(any(qval < qval_thresh)) %>% pull(feature) %>% unique() #changed any qval <.5 from .05 | |
| if (length(any_sig) == 0){ |
| library(tidyverse) | |
| if (!"speedyseq" %in% installed.packages()) remotes::install_github("mikemc/speedyseq") | |
| library(speedyseq) | |
| download.file("https://figshare.com/ndownloader/files/33076496", "samples.tsv") | |
| #this file has duplicate rows, and has multiple rows per pool | |
| samples <- read.csv("samples.tsv") %>% distinct() %>% | |
| select(-Pool, -Run, -ShotgunBatchID) %>% distinct() | |
| #download.file("https://figshare.com/ndownloader/files/26770931", "metadata.tsv") | |
| #metadata <- read.csv("metadata.tsv") |
| # Source this for a handy discrete color palette and various helper functions for microbiome analyses. | |
| # not complex enough for an actual package. For now... #featurecreep | |
| mycolors=c( | |
| "#511087", "#4ecdc4", "#ffd447", "#13c01f", "#b78900", "#e66d17", | |
| "#8e3400", "#729b79", "#bf0000", "#907ad6", "#3f6356", "#ffbfb7", | |
| "#92bccc", "#c0e8ab", "#890466", "#382438", "#dad2bc", "#0048ff", | |
| "#f5f749", "#146d25", "#c08552", "#fc60a8", "#89fc00", "#3df8ff", | |
| "#ef2917", "#101f75", "#bfcccc" | |
| ) |
| searchres <- "~/Downloads/SearchResults.csv" | |
| outdir <- "~/Downloads/springercovid/" | |
| dir.create(outdir) | |
| resdf <- read.csv(searchres, stringsAsFactors = FALSE) | |
| resdf$dloadurl <- paste0("http://link.springer.com/content/pdf/", | |
| gsub("\\/", "%2F", fixed=TRUE, resdf$Item.DOI), ".pdf") | |
| resdf$local_file <- paste0(gsub(" +", "_", gsub("[^[:alnum:][:space:]]", "", resdf$Item.Title)), ".pdf") |
| ----------begin_max5_patcher---------- 8209.3oc68r1iiabjed8uBBgb.w41YR+lj2GBNm3CFFw9BfMt6vAGiEZj3LC8pgbhD0tdufje6W+hRjyPotjX0TxAw.ViVIpppt5pptppqt5+5m8lY2U+yEalk7uk7CIu4M+0O6Muw9QlO3M9+8al8z7edwp4arO1rphOVe2OM6stupo3mare7u4u29Q0aaVUzz7omKbfc1lxGpluZVxO5efmWWronpYdSYc06VWrnw8brb4sj2ljSxL+gkeqT+J4VxteW01mJqzf1RGL+Gto4SqrHZVK9eddyhGKqd3DAsirsvl5+zxkV.qGt2PE7YlO7u8Yel4k2NNl07kaVGje81tuy9+g3fblxL9xRsCSE0NXOHGTdJbPHftCGTL.GjmeNbvmJ1rY9CEuhERNH6KrfFM0JMPsCII43roSSPC.nCHnQnmCaZQ8SOoGpuhM0TroIon5CyNNKglyrSubKcScDNM6P7D5ovS.A6NLEx.LEI6bXJqJVdPojRMyJjfRpJ0Qx1oQQ6q6+YyWO+ohlh0uqnZ9cNNAY.P1kkc97QllNz1sxjpCPN.Lhkior02EPnRJ32xzTbpkTcZF8l2wmGIU14pr7yWTSnvjG88g3Q5kjlZdDm3LkOBdj.SdzWFfGIT42R6vjxsbrHykDN9SNYDbIFlbouHDWhmN0RRBdtyx94yi3oH5VEB9fJsikLJAeePA.5PluoHxr1L+iimcQsB.obq+fbIpdREFzgXWjyxogxOTb6lUkKKV2RdeX95J8B8u7q+A9OdXmP09qe+p54gcxPj6Vk7FqWRNMpTV.uLnmiN8.bYkjZjCuI+.3tOSlMjBrpkGrY9GJV9t4MMqKuaaSw92swys8raC+b01h56a+31Ou6PsrprozHAZ8fjrih58PadrdcytYl1kZ68HsSIjA9tsZbrSVjNvCrpt5g8fe6ll4kUCgDOw1c9w8PVQu1+fqb32UrpX9lBDD.k7Ko.XtXrB |
| # I made some slighlty bigger test data to make sure we had some we weren't interested in | |
| # here are all the dates in the two years between dec 2011 and 2013 | |
| all_dates <- seq(as.Date("2011-12-15"), as.Date("2013-12-15"), "day") | |
| # like you did, randomly fill in value, and randomly sample for the available nodes | |
| bigtest <- data.frame( | |
| time = all_dates, | |
| node = sample(c(206,211,301,108), size = length(all_dates), replace=T), | |
| value = rnorm(length(all_dates), 21, 2) | |
| ) |
| #!/usr/bin/env python | |
| """ | |
| Gist of how to make similar plots to the entropy plots in riboSeed from an MSA. | |
| This assumes you want to annotate rDNAs, but you probably don't | |
| care about those. Adjust as needed. | |
| """ | |
| import os | |
| import datetime | |
| import time |
| # The purpose of this script it to make working from the terminal a bit more reprodicible. | |
| # It is very simple | |
| # A boolean value (KPTRK_ON) is set to true when kptrk is invoked, and the current directory is recorded. | |
| # when kptrk is invoked again, logging is turned off. | |
| # it is built on top of https://github.com/rcaloras/bash-preexec | |
| # Installation | |
| # - install bash-pre-exec, see instructions here https://github.com/rcaloras/bash-preexec, or, in short: | |
| # -- Pull down our file from GitHub and write it to our home directory as a hidden file. |
| #!/usr/bin/env python3 | |
| #-*- coding: utf-8 -*- | |
| import math | |
| import random | |
| import sys | |
| from bisect import bisect | |
| def printPlot(data, line=None, y=30, x=60, tick=.2, title="test", logger=None): | |
| yax = "|" | |
| xax = "_" |