Thursday, December 1, 2016

Mount SSD as swap

# use SSD as swap
sudo parted /dev/xvdf
mklabel gpt
mkpart primary 0 100%
sudo mkfs.ext4 /dev/xvdf1
sudo mount /dev/xvdf1 ssd
sudo fallocate -l 160G ssd/swapfile
sudo chmod 600 ssd/swapfile
sudo mkswap ssd/swapfile
sudo swapon ssd/swapfile

sudo pvcreate /dev/xvdb1 /dev/xvdc1 
sudo vgcreate sysvg /dev/xvdb1 /dev/xvdc1 
sudo lvcreate -l 100%FREE -n syslv sysvg
sudo lvdisplay

#make file system
sudo mkfs.ext4 /dev/sysvg/syslv
sudo mount /dev/sysvg/syslv /ssd

Wednesday, August 10, 2016

install credentials for AWS CLI

mkdir -p $HOME/.aws
printf "[default]\nregion = us-west-2\n" > $HOME/.aws/config
printf "[default]\naws_access_key_id=${aws_key_id}\naws_secret_access_key=${aws_secret_access_key}\n" > $HOME/.aws/credentials
chmod 600 $HOME/.aws/config $HOME/.aws/credentials

Create a dockerized bcl2fastq

1. Create a working dir with name "bcl2fast_docker"

>mkdir bcl2fast_docker
>cd bcl2fast_docker

2. Download the bcl2fastq package "bcl2fastq2-v2.17.1.14-Linux-x86_64.rpm" from illunima.



3. Create a wrapper to run the bcl2fastq with name ""

4. Create the Docker file

FROM centos:centos7

COPY src/* /opt/bcl2fastq/
COPY bcl2fastq2-v2.17.1.14-Linux-x86_64.rpm .

RUN yum install -y epel-release \
    && yum install -y python34 bcl2fastq2-v2.17.1.14-Linux-x86_64.rpm \
    && rm bcl2fastq2-v2.17.1.14-Linux-x86_64.rpm \
    && yum install -y pigz \
    && chmod +x /opt/bcl2fastq/

# User will need to also mount input data at #/data/input/
VOLUME /data/output

ENTRYPOINT ["python", "/opt/bcl2fastq/"]

5. Build the image with name "bcl2fastq"

>docker build -t bcl2fastq .

6. Run the image

>docker run --rm \
-v /path/to/raw_bcl_input:/data/input:ro \
-v /path/to/fastq_output:/data/output \