#!/usr/bin/perl
use warnings;

$PATH="/lustre/scratch102/projects/NA1850x-trio/";

#for ($i=1;$i<23;$i++){
#system("bsub -o logs/NA18506".$i."_split.o -q normal \"samtools view -b ".$PATH."NA18506/SLX/release.bam $i > NA18506/$i.release.bam; samtools flagstat NA18506/$i.release.bam > NA18506/$i.release.bam.flagstat; samtools index NA18506/$i.release.bam;\"");
#}

#system("bsub -o logs/NA18506_X_split.o -q normal \"samtools view -b ".$PATH."NA18506/SLX/release.bam X > NA18506/X.release.bam; samtools flagstat NA18506/X.release.bam > NA18506/X.release.bam.flagstat; samtools index NA18506/X.release.bam\"");


for ($i=2;$i<3;$i++){
system("bsub -o logs/NA18507".$i."_split.o -q long \"samtools view -b ".$PATH."NA18507/SLX/release.bam $i > NA18507/$i.release.bam; samtools flagstat NA18507/$i.release.bam > NA18507/$i.release.bam.flagstat; samtools index NA18507/$i.release.bam;\"");
}

#system("bsub -o logs/NA18507_X_split.o -q normal \"samtools view -b ".$PATH."NA18507/SLX/release.bam X > NA18507/X.release.bam; samtools flagstat NA18507/X.release.bam > NA18507/X.release.bam.flagstat; samtools index NA18507/X.release.bam\"");

#for ($i=1;$i<23;$i++){
#system("bsub -o logs/NA18508".$i."_split.o -q normal \"samtools view -b ".$PATH."NA18508/SLX/release.bam $i > NA18508/$i.release.bam; samtools flagstat NA18508/$i.release.bam > NA18508/$i.release.bam.flagstat; samtools index NA18508/$i.release.bam;\"");
#}

#system("bsub -o logs/NA18508_X_split.o -q normal \"samtools view -b ".$PATH."NA18508/SLX/release.bam X > NA18508/X.release.bam; samtools flagstat NA18508/X.release.bam > NA18508/X.release.bam.flagstat; samtools index NA18508/X.release.bam\"");
