Saturday, September 20, 2008

Grab a set of tile images from an Illumina/Solexa run folder

This script copies a set of images for a single tile in an illumina runfolder and creates another runfolder containing just that image set. It's useful if you want to grab an image set to process it later, or save a representative sample.

#!/bin/bash

SOURCE=$1
LANE=$2
TILE=$3
DESTINATION=$4

echo Source : $SOURCE
echo Lane : $LANE
echo Tile : $TILE
echo Destination: $DESTINATION


mkdir $DESTINATION
mkdir $DESTINATION/Images
mkdir $DESTINATION/Images/L00$LANE

cd $SOURCE/Images/L00$LANE


find . -type d -exec mkdir $DESTINATION/Images/L00$LANE/{} \;

for ((CYCLE=1; CYCLE<=100; CYCLE++))
do
find ./C$CYCLE.1/ -name s_$LANE\_$TILE\_* -exec cp {} $DESTINATION/Images/L00$LANE/{} \;
done



Example:

./grabtile /staging/IL18/outgoing/080910_IL18_1380 4 100 $HOME/1380_4_100

No comments: