https://github.com/arjunrajlaboratory/RajLabSeqTools
Revision 8f67a7b2d32b1aca9d3725ff49f51f32b14e7bad authored by Arjun Raj on 19 June 2014, 12:01:10 UTC, committed by Arjun Raj on 19 June 2014, 12:01:10 UTC
1 parent 6311fa1
Tip revision: 8f67a7b2d32b1aca9d3725ff49f51f32b14e7bad authored by Arjun Raj on 19 June 2014, 12:01:10 UTC
Changed name to fastq instead of fasta
Changed name to fastq instead of fasta
Tip revision: 8f67a7b
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 ...