https://github.com/arjunrajlaboratory/RajLabSeqTools
Revision 284b48d32da67e457a9e883646325231fe3e31a8 authored by Sydney Shaffer on 12 October 2015, 16:10:07 UTC, committed by Sydney Shaffer on 12 October 2015, 16:10:07 UTC
1 parent c8f87f9
Tip revision: 284b48d32da67e457a9e883646325231fe3e31a8 authored by Sydney Shaffer on 12 October 2015, 16:10:07 UTC
made setup scripts for ATAC data - these unzip fastq files and then concatenate the 4 together (from each lane) for each of the samples.
made setup scripts for ATAC data - these unzip fastq files and then concatenate the 4 together (from each lane) for each of the samples.
Tip revision: 284b48d
unzipAndConcatenateZippedFastq.sh
#!/bin/bash
ZIPFILEDIRECTORY=$1
OUTFASTADIRECTORY=$2
for dirname in $ZIPFIELDIRECTORY/* ; do
cd $dirname
INPUT=`ls *001_R1*`
SAMPLE=${INPUT%%_*} # Cuts filename string after first '_'
if [ ! -d $OUTFASTADIRECTORY/raw ]; then
mkdir $OUTFASTADIRECTORY/raw
fi
if [ ! -d $OUTFASTADIRECTORY/raw/$SAMPLE ]; then
mkdir $OUTFASTADIRECTORY/raw/$SAMPLE
fi
for i in *.gz; do
gunzip -c $i > ${i%.*}
done
FASTQR1=${SAMPLE}_R1.fastq
FASTQR2=${SAMPLE}_R2.fastq
cat *R1*fastq > $OUTFASTADIRECTORY/raw/$SAMPLE/$FASTQR1
cat *R2*fastq > $OUTFASTADIRECTORY/raw/$SAMPLE/$FASTQR2
done
Computing file changes ...