-
Drawn mostly from:
http://www.rstudio.com/products/rstudio/download-server/
-
ssh into the instance.
-
Install any outstanding updates
sudo yum update
-
Install R:
sudo yum install R
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
# Follow steps 1-4 on Ubuntu or 2-4 on Biolinux | |
1. Add repositories to your machine configuration | |
a. Bio-Linux | |
$ sudo add-apt-repository “deb http://nebc.nerc.ac.uk/bio-linux/ unstable bio-linux” | |
$ sudo apt-get update | |
$ sudo apt-get install bio-linux-keyring | |
b. CRAN |
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(ggplot2) | |
setwd("<my working directory>") | |
removeExtraLine <- function(x) { | |
x[,2:length(x)] | |
} | |
createInitialDataset <- function(x, sampleName) { | |
extraLineRemoved <- t(removeExtraLine(x)) |
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
ssh -f -N -L 1233:remote.host:22 gateway.host | |
sshfs -p 1233 vsudilov@localhost:/nfs_mount /local/mountpoint -o reconnect |
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
from __future__ import unicode_literals, print_function, absolute_import | |
from gi.repository import Gio | |
import os.path | |
VALID = {'toplevel': ('expand', 'size', 'orientation'), | |
'launcher': ('object-type', 'launcher-location', 'locked', 'menu-path', 'position', 'toplevel-id'), | |
'applet': ('object-type', 'applet-iid', 'toplevel-id', 'position', 'locked'), | |
'menu-bar': ('object-type', 'applet-iid', 'toplevel-id', 'position', 'locked'), | |
'menu': ('object-type', 'toplevel-id', 'position', 'locked'), | |
'action': ('object-type', 'action-type', 'position', 'toplevel-id'), |
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
""" | |
Disable registration/signup | |
""" | |
#models.py | |
from allauth.account.adapter import DefaultAccountAdapter | |
class MyAccountAdapter(DefaultAccountAdapter): | |
def is_open_for_signup(self, request): | |
return False | |
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
# author: | |
# @Bartosz Kosarzycki | |
# | |
sudo apt-get install npm | |
sudo npm install -g react-native-cli | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
cd /home/user/your/project/path | |
react-native init AwesomeProject | |
cd AwesomeProject |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
function bam_chromosomes() { | |
# Fetch chromosomes from a bam file | |
samtools view -H $1 | \ | |
grep -Po 'SN:(.*)\t' | \ | |
cut -c 4-1000 | |
} |
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
#!/usr/bin/python | |
import sys | |
''' | |
Just a simple tool that adds the line number at | |
the end of each line | |
''' | |
with open(sys.argv[1]) as f_in, open(sys.argv[2], 'w') as f_out: |
OlderNewer