https://github.com/arjunrajlaboratory/RajLabSeqTools
Revision 0f4bf5dc4fc1def659c18395457be84e5b82b849 authored by Sydney Shaffer on 11 November 2014, 15:09:26 UTC, committed by Sydney Shaffer on 11 November 2014, 15:09:26 UTC
1 parent d9be629
Tip revision: 0f4bf5dc4fc1def659c18395457be84e5b82b849 authored by Sydney Shaffer on 11 November 2014, 15:09:26 UTC
corrected a path name
corrected a path name
Tip revision: 0f4bf5d
unzipAndConcatenateZippedFastq.sh
#!/bin/bash
ZIPFILEDIRECTORY=$1
OUTFASTADIRECTORY=$2
for dirname in $ZIPFIELDIRECTORY/* ; do
cd $dirname
INPUT=`ls *001_R1*`
SAMPLE=${INPUT%%_*}
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 ...