WORK_DIR=/storage3/sasha_yan/AUTS_63-1_63-2/63_2_A
cd $WORK_DIR;
declare -a samples=("63-2_A1" "63-2_A2" "63-2_A3" "63-2_A4" "63-2_A5" "63-2_A6" "63-2_A7" "63-2_A8" "63-2_A9" "63-2_A10" "63-2_A11" "63-2_A12" "63-2_A5" "63-2_A13" "63-2_A5" "63-2_A14" "63-2_A5" "63-2_A15" "63-2_A16" "63-2_A17" "63-2_A18" "63-2_A19" "63-2_A20" "63-2_A21" "63-2_A22" "63-2_A23" "63-2_A24" "63-2_A25" "63-2_A26" "63-2_A27" "63-2_A28" "63-2_A29" "63-2_A30" "63-2_A31" "63-2_A32" "63-2_A33" "63-2_A34" "63-2_A35")
for sample in "${samples[@]}"
do
gunzip $WORK_DIR/${sample}_R1.fastq.gz $WORK_DIR/${sample}_R2.fastq.gz
[ -d stat ] || mkdir $WORK_DIR/align_paired
bwa mem /storage2/artemS/hg38/hg38.fa $WORK_DIR/${sample}_R1.fastq $WORK_DIR/${sample}_R2.fastq > $WORK_DIR/align_paired/${sample}.sam
samtools view -b -h $WORK_DIR//align_paired/${sample}.sam > $WORK_DIR/align_paired/${sample}.bam
samtools sort $WORK_DIR/align_paired/${sample}.bam > $WORK_DIR/align_paired/${sample}.sorted.bam
samtools index $WORK_DIR/align_paired/${sample}.sorted.bam
done 