https://github.com/arjunrajlaboratory/RajLabSeqTools
Revision 5e9b8269eba021061130b53e8da7cc39108fe0b4 authored by Sydney Shaffer on 13 October 2015, 15:12:07 UTC, committed by Sydney Shaffer on 13 October 2015, 15:12:07 UTC
1 parent 1f85fbd
Tip revision: 5e9b8269eba021061130b53e8da7cc39108fe0b4 authored by Sydney Shaffer on 13 October 2015, 15:12:07 UTC
wrote scripts to do SAM/BAM/bedGraph manipulations
wrote scripts to do SAM/BAM/bedGraph manipulations
Tip revision: 5e9b826
unzipAndConcatenateZippedFastq.sh
#!/bin/bash
ZIPFILEDIRECTORY=$1
OUTFASTQDIRECTORY=$2
for dirname in $ZIPFILEDIRECTORY/* ; do
cd $dirname
INPUT=`ls *`
SAMPLE=${INPUT%%_*} # Cuts filename string after first '_'
if [ ! -d $OUTFASTQDIRECTORY/raw ]; then
mkdir $OUTFASTQDIRECTORY/raw
fi
if [ ! -d $OUTFASTQDIRECTORY/raw/$SAMPLE ]; then
mkdir $OUTFASTQDIRECTORY/raw/$SAMPLE
fi
FASTQR1=${SAMPLE}.fastq
# FASTQR2=${SAMPLE}_R2.fastq
if [ ! -e $OUTFASTQDIRECTORY/raw/$SAMPLE/$FASTQR1 ]; then
echo Working on $SAMPLE
for i in *.gz; do
gunzip -c $i > ${i%.*}
done
cat *fastq > $OUTFASTQDIRECTORY/raw/$SAMPLE/$FASTQR1
# cat *R2*fastq > $OUTFASTQDIRECTORY/raw/$SAMPLE/$FASTQR2
fi
done
Computing file changes ...