This file contains hidden or 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
| groups <- c("Group", "Names") # here are the group names for enrichment experiments, also folder names locates homer motif files | |
| p_threash <- 1e-4 # p-value threashold | |
| ## make separate meme file for each homer file | |
| for (g in groups) { | |
| homer <- readLines(paste0("../data/homer_motifs/", g, "/homerMotifs.all.motifs")) | |
| homer_starts <- grep("^>", homer) | |
| homer_number <- length(homer_starts) | |
| homer_lines <- length(homer) | |
| homer_starts[homer_number + 1] <- homer_lines + 1 |
This file contains hidden or 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
| library(shiny) | |
| library(datasets) | |
| Logged = FALSE; | |
| PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
| # Define server logic required to summarize and view the selected dataset | |
| shinyServer(function(input, output) { | |
| source("www/Login.R", local = TRUE) | |
| observe({ | |
| if (USER$Logged == TRUE) { |
This file contains hidden or 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
| #!/broad/software/free/Linux/redhat_5_x86_64/pkgs/r_3.0.2/bin/Rscript | |
| # Eric Vallabh Minikel | |
| # CureFFI.org | |
| # 2014-01-14 | |
| # example of how to use optparse in R scripts | |
| # usage: ./exampleRScript1.r -a thisisa -b hiagain | |
| # ./exampleRScript1.r --avar thisisa --bvar hiagain |
This file contains hidden or 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
| #! /usr/bin/Rscript | |
| # Lytze Nov 4 2014 | |
| # An example of visit stdin (the real stdin, not the console) using RScript | |
| # NO details about seting opts and args | |
| # Usage: | |
| ## $ chmod u+x find_k_mer.R | |
| ## $ ./find_k_mer.R | |
| # OR | |
| ## $ ./find_k_mer.R < inputfile |
This file contains hidden or 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
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("ReadImages", "reshape", "ggplot2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| imageLoader <- function(url){ # This function takes a URL, and generates a data.frame with pixel locations and colors | |
| # Download to disk, load | |
| download.file(url, "tempPicture.jpg", mode = "wb") # Stash image locally | |
| readImage <- read.jpeg("tempPicture.jpg") | |