Created
July 18, 2014 00:20
-
-
Save moonwatcher/89a496c572f1cdbaf93a to your computer and use it in GitHub Desktop.
140703_M02455_0021_000000000-A8P38 demux
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
#!/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" | |
SAMPLE_SHEET_HEAD="FCID,Lane,SampleID,SampleRef,Index,Description,Control,Recipe,Operator,SampleProject" | |
BCL_TO_FASTQ_CMD="/share/apps/bcl2fastq/1.8.4/gnu/bin/configureBclToFastq.pl" | |
PBS_HEAD=" | |
#!/bin/sh | |
#PBS -V | |
#PBS -l nodes=1:ppn=$CORES,walltime=48:00:00 | |
#PBS -M $EMAIL | |
#PBS -m abe | |
#PBS -q s48 | |
#PBS -l mem=16GB | |
module load bcl2fastq/gnu/1.8.4 | |
" | |
PBS_FOOT=" | |
make -j$CORES | |
exit $?; | |
" | |
make_bcl2fastq_pbs() { | |
BCL_To_FASTQ_RUN=$1 | |
echo -e "$PBS_HEAD | |
cd $FASTQ_BASE/$BCL_To_FASTQ_RUN/Unaligned | |
$PBS_FOOT$" > $FASTQ_BASE/$BCL_To_FASTQ_RUN/bcl2fastq.pbs | |
} | |
make_sample_sheet(){ | |
BCL_To_FASTQ_RUN=$1 | |
echo -e "$SAMPLE_SHEET_HEAD | |
$2" > $FASTQ_BASE/$BCL_To_FASTQ_RUN/SampleSheet.csv | |
} | |
# RUN | |
BCL_To_FASTQ_RUN="000000000-A8P38" | |
mkdir -p "$FASTQ_BASE/$BCL_To_FASTQ_RUN" | |
make_bcl2fastq_pbs "$BCL_To_FASTQ_RUN" | |
make_sample_sheet $BCL_To_FASTQ_RUN "\ | |
000000000-A8P38,1,Undetermined,,Undetermined,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MPa,,CGATGT,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MPb,,TGACCA,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MPc,,ACAGTG,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MP2,,GCCAAT,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MP3,,CAGATC,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MP5,,CTTGTA,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MP6,,AGTCAA,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MP7,,AGTTCC,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MP8,,ATGTCA,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MPuncut2,,CCGTCC,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MPuncut3,,GTCCGC,,N,,Pui Ling,A8P38 | |
000000000-A8P38,1,MPuncut6,,GTGAAA,,N,,Pui Ling,A8P38 | |
" | |
echo -e "$BCL_TO_FASTQ_CMD --input-dir $BASECALLS \ | |
--output-dir $FASTQ_BASE/$BCL_To_FASTQ_RUN/Unaligned \ | |
--sample-sheet $FASTQ_BASE/$BCL_To_FASTQ_RUN/SampleSheet.csv \ | |
--fastq-cluster-count 0 \ | |
--use-bases-mask \"Y*,I*\" \ | |
--no-eamss \ | |
--mismatches 1"|bash | |
qsub -N $BCL_To_FASTQ_RUN $FASTQ_BASE/$BCL_To_FASTQ_RUN/bcl2fastq.pbs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment