Last Update: May 13, 2019
Offline Version
This file contains 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
# Stephen Turner | |
# http://StephenTurner.us/ | |
# http://GettingGeneticsDone.blogspot.com/ | |
# See license at http://gettinggeneticsdone.blogspot.com/p/copyright.html | |
# Last updated: Tuesday, April 19, 2011 | |
# R code for making manhattan plots and QQ plots from plink output files. | |
# manhattan() with GWAS data this can take a lot of memory, recommended for use on 64bit machines only, for now. | |
# Altnernatively, use bmanhattan() , i.e., base manhattan. uses base graphics. way faster. |
This file contains 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
#ifdef _WIN32 | |
#include <malloc.h> | |
#endif | |
#include <cstdint> | |
#include <vector> | |
#include <iostream> | |
/** | |
* Allocator for aligned data. |
This file contains 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
//: clang -DHAVE_INLINE -O3 randgsl.c -o randgsl -lgsl -lgslcblas | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <gsl/gsl_rng.h> | |
#include <gsl/gsl_randist.h> | |
int main(int argc, const char *argv[]) |
This file contains 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
########################################################################## | |
# -----------------------------------------------------------------------# | |
# -------------------- Similarity Metrics (CF) --------------------------# | |
# ---------------------Author: Shaohua Zhang ---------------------------# | |
########################################################################## | |
# sample data 1 | |
Mov1 <- c(4,4,3,4,2) | |
Mov2 <- c(NA,2,NA,4,1) |
This file contains 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
#include <Rcpp.h> | |
using namespace Rcpp ; | |
template <typename T> | |
inline void set_item_impl( List& target, int i, const T& obj, CharacterVector& names, traits::true_type ){ | |
target[i] = obj.object ; | |
names[i] = obj.name ; | |
} | |
template <typename T> |
This file contains 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
#include <Rcpp.h> | |
using namespace Rcpp ; | |
template <typename T> | |
inline void set_item_impl( List& target, int i, const T& obj, CharacterVector& names, traits::true_type ){ | |
target[i] = obj.object ; | |
names[i] = obj.name ; | |
} | |
template <typename T> |
This file contains 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
#=============================================================================== | |
# Filename: boost.sh | |
# Author: Pete Goodliffe | |
# Copyright: (c) Copyright 2009 Pete Goodliffe | |
# Licence: Please feel free to use this, with attribution | |
# Modified version | |
#=============================================================================== | |
# | |
# Builds a Boost framework for the iPhone. | |
# Creates a set of universal libraries that can be used on an iPhone and in the |
This file contains 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) | |
shinyServer(function(input, output, session) { | |
# The number of iterations to perform | |
maxIter <- 50 | |
# Track the start and elapsed time | |
startTime <- Sys.time() | |
output$elapsed <- renderText({ |
This file contains 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
These code snippets have been tested on R 3.1.0 and Mac OS 10.9.3. They presumably do *not* work on R 2.X! | |
## Enter these commands in the Mac OS Terminal | |
# use faster vecLib library | |
cd /Library/Frameworks/R.framework/Resources/lib | |
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib | |
# return to default settings | |
cd /Library/Frameworks/R.framework/Resources/lib |
OlderNewer