Skip to content

Instantly share code, notes, and snippets.

View moonwatcher's full-sized avatar

Lior Galanti moonwatcher

View GitHub Profile
@moonwatcher
moonwatcher / naming.py
Last active August 29, 2015 14:01
Decision Tree Name / Country classifier
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Lior Galanti
# email: lior.galanti@gmail.com
# Name / Country classifier
# Uses Decision Tree classifier to predict country from person name
# Decision Tree implementation: http://scikit-learn.org/stable/
import os
# numpy arrays
x = np.append(x[0], np.int64(2))
# filtering ascii and accented
[^a-z:"\}\{\[\]\s,'áýéèøúạñóüæÁíÉëṭńỗœọĭãōāßķễìŠęćĐùÜỳıőếÖốğÍṇÑÚşṃţØâÿÅớệİīờịụầåłöțêÓảưǎсņēïậůžěòăşșÞðäążūÇçþǒàõąňồėļữĝûřśžŽơÂťôĽîČĎź]
@moonwatcher
moonwatcher / 140430_SN7001341_0074_AC49ANACXX.sh
Last active August 29, 2015 14:01
Demultiplex 140430_SN7001341_0074_AC49ANACXX
#!/bin/bash
CORES=8
BASECALLS="/share/140430_SN7001341_0074_AC49ANACXX/Data/Intensities/BaseCalls/"
FASTQ_BASE="/share/manual"
SAMPLE_SHEET_HEAD="FCID,Lane,SampleID,SampleRef,Index,Description,Control,Recipe,Operator,SampleProject"
BCL_TO_FASTQ_CMD="/usr/local/bin/configureBclToFastq.pl"
make_sample_sheet(){
@moonwatcher
moonwatcher / demultiplex_C4G9YACXX.sh
Last active August 29, 2015 14:02
demultiplexing C4G9YACXX
#!/bin/bash
# load modules
module load bcl2fastq/gnu/1.8.4
CORES=12
EMAIL='lg1883@nyu.edu'
BASECALLS="/scratch/gencore/manual/140617_SN911_0218_AC4G9YACXX/Data/Intensities/BaseCalls/"
FASTQ_BASE="/scratch/gencore/manual"
@moonwatcher
moonwatcher / gist:63c1b251da0e0415d46c
Created June 23, 2014 18:27
Transfer fastq files to butinah with rsync
#!/bin/sh
# NOTICE: This assumes RSA key authentiction has been set up to rsync over ssh can proceed without prompting for a password.
#PBS -V
#PBS -l nodes=1:ppn=1,walltime=48:00:00
#PBS -M lg1883@nyu.edu
#PBS -m abe
#PBS -q s48
#PBS -l mem=1GB
@moonwatcher
moonwatcher / pull_data_from_scope.sh
Last active January 14, 2016 22:18
Scrip for pulling data from the scopes into the storage server
#!/bin/bash
SOURCE="$1"
TARGET="$2"
NAME="$3"
EMAIL="eegi"
LOG_DIR="/var/log/scope/$NAME";
FILTER_FILE="/var/lib/scope/filter/$NAME"
TIMESTAMP="$(date +%Y-%m-%d-%H-%M-%S)";
CHMOD="a+rwx,g+rwx,o-w"
@moonwatcher
moonwatcher / 000000000-A9GDG.sh
Created July 10, 2014 22:27
MiSeq 000000000-A9GDG demux
#!/bin/bash
# load modules
module load bcl2fastq/gnu/1.8.4
CORES=12
EMAIL='lg1883@nyu.edu'
BASECALLS="/scratch/gencore/manual/140617_M02455_0020_000000000-A9GDG/Data/Intensities/BaseCalls/"
FASTQ_BASE="/scratch/gencore/manual"
@moonwatcher
moonwatcher / 140703_M02455_0021_000000000-A8P38.sh
Created July 18, 2014 00:20
140703_M02455_0021_000000000-A8P38 demux
#!/bin/bash
# load modules
# module load bcl2fastq/gnu/1.8.4
CORES=12
EMAIL='lg1883@nyu.edu'
BASECALLS="/scratch/gencore/manual/140703_M02455_0021_000000000-A8P38/Data/Intensities/BaseCalls/"
FASTQ_BASE="/scratch/gencore/manual"
@moonwatcher
moonwatcher / 140617_SN911_0218_AC4G9YACXX.sh
Created July 21, 2014 19:57
140617_SN911_0218_AC4G9YACXX Single index only
#!/bin/bash
# load modules
# module unload bcl2fastq/gnu/1.8.4
# module load bcl2fastq/gnu/1.8.4
CORES=12
EMAIL='lg1883@nyu.edu'
BASECALLS="/scratch/gencore/hiseq-700911/140617_SN911_0218_AC4G9YACXX/Data/Intensities/BaseCalls/"
FASTQ_BASE="/scratch/gencore/manual"
@moonwatcher
moonwatcher / C4W17ACXX_demux.sh
Last active August 29, 2015 14:04
Demux script for C4W17ACXX
#!/bin/bash
NAME="C4W17ACXX"
EMAIL='lg1883@nyu.edu'
FLOWCELL_PATH="/scratch/gencore/hiseq-700911/140710_SN911_0221_AC4W17ACXX"
OUTPUT_PATH="/scratch/gencore/manual/140710_SN911_0221_AC4W17ACXX"
CONFIGURE_BCL2FASTQ="\
--fastq-cluster-count 0 \