https://github.com/arjunrajlaboratory/RajLabSeqTools
Revision 6311fa199776303ea82b0f9ae0c748c04816ab05 authored by Arjun Raj on 19 June 2014, 11:58:54 UTC, committed by Arjun Raj on 19 June 2014, 11:58:54 UTC
1 parent d6501d6
Raw File
Tip revision: 6311fa199776303ea82b0f9ae0c748c04816ab05 authored by Arjun Raj on 19 June 2014, 11:58:54 UTC
Updated unzipAndConcatenateZippedFasta to the point where it might actually work.
Tip revision: 6311fa1
unzipAndCat.sh
#!/bin/bash

EXPERIMENT=$1

for dirname in /home/opadovan/C1_Single_Cell_RNA_Seq-11219209/* ; do
cd $dirname

INPUT=`ls *001_R1*`
SAMPLE=`echo $INPUT | cut -d'_' -f 1`

if [ ! -d $EXPERIMENT/raw ]; then
mkdir $EXPERIMENT/raw
fi

if [ ! -d $EXPERIMENT/raw/$SAMPLE ]; then
mkdir $EXPERIMENT/raw/$SAMPLE
fi

for i in *.gz; do
gunzip -c $i > ${i%.*}
done

FASTQR1=`echo $SAMPLE'_R1.fastq'`
FASTQR2=`echo $SAMPLE'_R2.fastq'`

cat *R1*fastq > $EXPERIMENT/raw/$SAMPLE/$FASTQR1
cat *R2*fastq > $EXPERIMENT/raw/$SAMPLE/$FASTQR2

done

back to top