WORK_DIR=/storage2/sasha_yan/2025-May-BGI/PCR-product
cd $WORK_DIR;
declare -a samples=("CMV-PCR-Nla_3" "CMV-PCR-Nla_Kl_1_L1" "CMV-PCR-Nla_Kl_2_L1" "CMV-PCR-Nla_Kl_3dtransf_4" "ench3-PCR-Dpn_3" "ench3-PCR-Dpn_Kl_1" "ench3-PCR-Dpn_Kl_2" "ench3-PCR-Dpn_Kl_3dtransf_4_L1")
for sample in "${samples[@]}"
do 
[ -d stat ] || mkdir $WORK_DIR/Hi-C_stats_probes/${sample};
[ -d stat ] || mkdir $WORK_DIR/Hi-C_stats_probes/${sample}/fastq;
cutadapt \
-a AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT \
-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACT \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT \
-A AGATCGGAAGAGCACACGTCTGAACTCCAGTCACT \
--pair-filter=any \
--minimum-length 30 \
-o $WORK_DIR/Hi-C_stats_probes/${sample}/fastq/${sample}_R1.fastq \
-p $WORK_DIR/Hi-C_stats_probes/${sample}/fastq/${sample}_R2.fastq \
$WORK_DIR/raw/${sample}_1.fq \
$WORK_DIR/raw/${sample}_2.fq \
>> $WORK_DIR/cutadapt/${sample}_cutadapt.log
done