WORK_DIR=/storage2/sasha_yan/2025-May-BGI/PCR-product
cd $WORK_DIR;
declare -a samples=("wgs-CMV-PCR-Nla_3" "wgs-CMV-PCR-Nla_Kl_1" "wgs-CMV-PCR-Nla_Kl_2" "wgs-CMV-PCR-Nla_Kl_3dtransf_4" "wgs-ench3-PCR-Dpn_3" "wgs-ench3-PCR-Dpn_Kl_1" "wgs-ench3-PCR-Dpn_Kl_2" "wgs-ench3-PCR-Dpn_Kl_3dtransf_4")
for sample in "${samples[@]}"
do 
[ -d stat ] || mkdir $WORK_DIR/Hi-C/cutadapt;
[ -d stat ] || mkdir $WORK_DIR/Hi-C/cutadapt/${sample};
[ -d stat ] || mkdir $WORK_DIR/Hi-C/cutadapt/${sample}/fastq;
cutadapt -a AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACT -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT -A AGATCGGAAGAGCACACGTCTGAACTCCAGTCACT -o $WORK_DIR/Hi-C/Jucer/${sample}/fastq/${sample}_R1.fastq -p $WORK_DIR/Hi-C/Jucer/${sample}/fastq/${sample}_R2.fastq $WORK_DIR/Hi-C/${sample}/fastq/${sample}_R1.fastq $WORK_DIR/Hi-C/${sample}/fastq/${sample}_R2.fastq >> $WORK_DIR/Hi-C/cutadapt/${sample}_cutadapt.log
done 