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
| # Claas Heuer, September 2015 | |
| ##################################################### | |
| ### Likelihood ratio test for multiple regression ### | |
| ##################################################### | |
| slide_GWAS <- function(y, M, X = NULL, verbose = TRUE, sliding_window=TRUE, window_size = 10) { | |
| library(lmtest) |
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
| # Claas Heuer, September 2015 | |
| # set default installation directory: | |
| INSTDIR=$HOME/opt | |
| # place to store the source packages | |
| SOURCES=$HOME/sourcebuilds | |
| ################### | |
| ### Compiling R ### |
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
| # Claas Heuer, September 2015 | |
| # | |
| # First check your package on your machine ('cpgen' is the package folder) | |
| R CMD check --as-cran cpgen | |
| # Nothing is allowed, not even 'NOTES' (but probably depends, one or two notes might be ok) | |
| # then check again using 'devtools' |
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
| # Claas Heuer, September 2015 | |
| # | |
| # Extremely good vignette for mixtools: https://cran.r-project.org/web/packages/mixtools/vignettes/mixtools.pdf | |
| library(mixtools) | |
| library(ks) | |
| ######################## | |
| ### Gaussian Mixture ### | |
| ######################## |
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(ggplot2) | |
| library(reshape2) | |
| library(gridExtra) | |
| dat <- read.csv("dat.csv",header=TRUE,stringsAsFactors=FALSE) | |
| # make flat file | |
| D <- melt(dat, id.vars=c("Reg.No.Id"),measure.vars=c("Tpi","Pl","Dpr")) | |
| # make the graphs |
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
| # using libreoffice's 'unoconv' | |
| unoconv -f csv filename.xlsx | |
| # using ssconvert | |
| ssconvert file.xlsx > file.csv | |
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
| # Claas Heuer, Spetember 2015 | |
| # | |
| # helpful: | |
| # http://www.grymoire.com/Unix/Awk.html#uh-1 | |
| # http://www.shellhacks.com/en/Using-BASH-Grep-OR-Grep-AND-Grep-NOT-Operators | |
| # count number of lines | |
| awk -F',' 'END{print NR;}' test.csv |
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
| # first remove all carriage returns (https://kb.iu.edu/d/acux) | |
| #dos2unix Report.txt Report_unix.txt | |
| awk '{ sub("\r$", ""); print }' Report.txt > Report_unix.txt |
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
| # Claas Heuer, August 2015 | |
| # | |
| # urls: | |
| # http://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host | |
| # http://www.gnu.org/software/libc/download.html | |
| cd $HOME | |
| mkdir glibc_update | |
| cd glibc_update |
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
| # Claas Heuer, August 2015 | |
| # | |
| # links: | |
| # http://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-debian | |
| # http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/ | |
| # https://mkmanu.wordpress.com/2014/07/24/r-and-mysql-a-tutorial-for-beginners/ | |
| # http://stackoverflow.com/questions/15420999/rodbc-odbcdriverconnect-connection-error | |
| # http://www.w3schools.com/sql/sql_join.asp | |