#!/usr/bin/env bash
# Bulk download script for GSE117293
# Generated from Yeo Lab Publications Database
# Total files: 104

OUTDIR="GSE117293"
mkdir -p "$OUTDIR"
cd "$OUTDIR"

# --- GEO supplementary files ---
wget -nc "ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE117nnn/GSE117293/suppl/GSE117293_RNAseq_set1_RPKM.csv.gz" -O "GSE117293_RNAseq_set1_RPKM.csv.gz"
wget -nc "ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE117nnn/GSE117293/suppl/GSE117293_RNAseq_set2_RPKM.csv.gz" -O "GSE117293_RNAseq_set2_RPKM.csv.gz"
wget -nc "ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE117nnn/GSE117293/suppl/GSE117293_RNAseq_set3_RPKM.csv.gz" -O "GSE117293_RNAseq_set3_RPKM.csv.gz"
wget -nc "ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE117nnn/GSE117293/suppl/GSE117293_RNAseq_set4_RPKM.csv.gz" -O "GSE117293_RNAseq_set4_RPKM.csv.gz"

# --- SRA run files ---
# Tip: use 'fasterq-dump' from SRA Toolkit for FASTQ conversion
#      with optional renaming to original submitted FASTQ names.
# Set to 1 to rename SRR outputs (e.g. SRR_1.fastq.gz -> sample_R1.fastq.gz)
RENAME_SRA_TO_ORIGINAL=1

_compress_if_exists() {
  local stem="$1"
  if [ -f "${stem}.fastq" ]; then
    gzip -f "${stem}.fastq"
    echo "${stem}.fastq.gz"
    return 0
  fi
  if [ -f "${stem}.fq" ]; then
    gzip -f "${stem}.fq"
    echo "${stem}.fq.gz"
    return 0
  fi
  return 1
}

# Option A: Download via SRA Toolkit (recommended)
fasterq-dump --split-files "SRR7547754"
gz1="$(_compress_if_exists 'SRR7547754_1' || true)"
gz2="$(_compress_if_exists 'SRR7547754_2' || true)"
gzs="$(_compress_if_exists 'SRR7547754' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-CLK3-1-1_S7_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547755"
gz1="$(_compress_if_exists 'SRR7547755_1' || true)"
gz2="$(_compress_if_exists 'SRR7547755_2' || true)"
gzs="$(_compress_if_exists 'SRR7547755' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-CLK3-1-2_S8_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547756"
gz1="$(_compress_if_exists 'SRR7547756_1' || true)"
gz2="$(_compress_if_exists 'SRR7547756_2' || true)"
gzs="$(_compress_if_exists 'SRR7547756' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-CNOT7-1-1_S3_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547757"
gz1="$(_compress_if_exists 'SRR7547757_1' || true)"
gz2="$(_compress_if_exists 'SRR7547757_2' || true)"
gzs="$(_compress_if_exists 'SRR7547757' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-CNOT7-1-2_S4_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547758"
gz1="$(_compress_if_exists 'SRR7547758_1' || true)"
gz2="$(_compress_if_exists 'SRR7547758_2' || true)"
gzs="$(_compress_if_exists 'SRR7547758' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-CNOT7-2-1_S5_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547759"
gz1="$(_compress_if_exists 'SRR7547759_1' || true)"
gz2="$(_compress_if_exists 'SRR7547759_2' || true)"
gzs="$(_compress_if_exists 'SRR7547759' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-CNOT7-2-2_S6_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547760"
gz1="$(_compress_if_exists 'SRR7547760_1' || true)"
gz2="$(_compress_if_exists 'SRR7547760_2' || true)"
gzs="$(_compress_if_exists 'SRR7547760' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-ctrl-2_S1_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547761"
gz1="$(_compress_if_exists 'SRR7547761_1' || true)"
gz2="$(_compress_if_exists 'SRR7547761_2' || true)"
gzs="$(_compress_if_exists 'SRR7547761' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-ctrl-3_S2_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547762"
gz1="$(_compress_if_exists 'SRR7547762_1' || true)"
gz2="$(_compress_if_exists 'SRR7547762_2' || true)"
gzs="$(_compress_if_exists 'SRR7547762' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-UBAP2L-1-1_S9_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547763"
gz1="$(_compress_if_exists 'SRR7547763_1' || true)"
gz2="$(_compress_if_exists 'SRR7547763_2' || true)"
gzs="$(_compress_if_exists 'SRR7547763' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-UBAP2L-1-2_S10_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547764"
gz1="$(_compress_if_exists 'SRR7547764_1' || true)"
gz2="$(_compress_if_exists 'SRR7547764_2' || true)"
gzs="$(_compress_if_exists 'SRR7547764' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-UBAP2L-2-1_S11_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547765"
gz1="$(_compress_if_exists 'SRR7547765_1' || true)"
gz2="$(_compress_if_exists 'SRR7547765_2' || true)"
gzs="$(_compress_if_exists 'SRR7547765' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s1-UBAP2L-2-2_S12_L001_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547766"
gz1="$(_compress_if_exists 'SRR7547766_1' || true)"
gz2="$(_compress_if_exists 'SRR7547766_2' || true)"
gzs="$(_compress_if_exists 'SRR7547766' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-AIMP1-1-1_S13_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547767"
gz1="$(_compress_if_exists 'SRR7547767_1' || true)"
gz2="$(_compress_if_exists 'SRR7547767_2' || true)"
gzs="$(_compress_if_exists 'SRR7547767' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-AIMP1-1-2_S14_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547768"
gz1="$(_compress_if_exists 'SRR7547768_1' || true)"
gz2="$(_compress_if_exists 'SRR7547768_2' || true)"
gzs="$(_compress_if_exists 'SRR7547768' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-AIMP1-2-1_S15_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547769"
gz1="$(_compress_if_exists 'SRR7547769_1' || true)"
gz2="$(_compress_if_exists 'SRR7547769_2' || true)"
gzs="$(_compress_if_exists 'SRR7547769' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-AIMP1-2-2_S16_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547770"
gz1="$(_compress_if_exists 'SRR7547770_1' || true)"
gz2="$(_compress_if_exists 'SRR7547770_2' || true)"
gzs="$(_compress_if_exists 'SRR7547770' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-ctrl-1-1_S25_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547771"
gz1="$(_compress_if_exists 'SRR7547771_1' || true)"
gz2="$(_compress_if_exists 'SRR7547771_2' || true)"
gzs="$(_compress_if_exists 'SRR7547771' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-ctrl-1-2_S26_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547772"
gz1="$(_compress_if_exists 'SRR7547772_1' || true)"
gz2="$(_compress_if_exists 'SRR7547772_2' || true)"
gzs="$(_compress_if_exists 'SRR7547772' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-DDX6-1-1_S17_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547773"
gz1="$(_compress_if_exists 'SRR7547773_1' || true)"
gz2="$(_compress_if_exists 'SRR7547773_2' || true)"
gzs="$(_compress_if_exists 'SRR7547773' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-DDX6-1-2_S18_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547774"
gz1="$(_compress_if_exists 'SRR7547774_1' || true)"
gz2="$(_compress_if_exists 'SRR7547774_2' || true)"
gzs="$(_compress_if_exists 'SRR7547774' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-DDX6-2-1_S19_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547775"
gz1="$(_compress_if_exists 'SRR7547775_1' || true)"
gz2="$(_compress_if_exists 'SRR7547775_2' || true)"
gzs="$(_compress_if_exists 'SRR7547775' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-DDX6-2-2_S20_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547776"
gz1="$(_compress_if_exists 'SRR7547776_1' || true)"
gz2="$(_compress_if_exists 'SRR7547776_2' || true)"
gzs="$(_compress_if_exists 'SRR7547776' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-MEX3C-1-1_S21_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547777"
gz1="$(_compress_if_exists 'SRR7547777_1' || true)"
gz2="$(_compress_if_exists 'SRR7547777_2' || true)"
gzs="$(_compress_if_exists 'SRR7547777' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-MEX3C-1-2_S22_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547778"
gz1="$(_compress_if_exists 'SRR7547778_1' || true)"
gz2="$(_compress_if_exists 'SRR7547778_2' || true)"
gzs="$(_compress_if_exists 'SRR7547778' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-MEX3C-2-1_S23_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547779"
gz1="$(_compress_if_exists 'SRR7547779_1' || true)"
gz2="$(_compress_if_exists 'SRR7547779_2' || true)"
gzs="$(_compress_if_exists 'SRR7547779' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s2-MEX3C-2-2_S24_L002_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547780"
gz1="$(_compress_if_exists 'SRR7547780_1' || true)"
gz2="$(_compress_if_exists 'SRR7547780_2' || true)"
gzs="$(_compress_if_exists 'SRR7547780' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-ctrl-1-1_S39_L004_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547781"
gz1="$(_compress_if_exists 'SRR7547781_1' || true)"
gz2="$(_compress_if_exists 'SRR7547781_2' || true)"
gzs="$(_compress_if_exists 'SRR7547781' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-ctrl-1-2_S40_L004_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547782"
gz1="$(_compress_if_exists 'SRR7547782_1' || true)"
gz2="$(_compress_if_exists 'SRR7547782_2' || true)"
gzs="$(_compress_if_exists 'SRR7547782' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-MTDH-1-1_S27_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547783"
gz1="$(_compress_if_exists 'SRR7547783_1' || true)"
gz2="$(_compress_if_exists 'SRR7547783_2' || true)"
gzs="$(_compress_if_exists 'SRR7547783' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-MTDH-1-2_S28_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547784"
gz1="$(_compress_if_exists 'SRR7547784_1' || true)"
gz2="$(_compress_if_exists 'SRR7547784_2' || true)"
gzs="$(_compress_if_exists 'SRR7547784' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-MTDH-2-1_S29_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547785"
gz1="$(_compress_if_exists 'SRR7547785_1' || true)"
gz2="$(_compress_if_exists 'SRR7547785_2' || true)"
gzs="$(_compress_if_exists 'SRR7547785' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-MTDH-2-2_S30_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547786"
gz1="$(_compress_if_exists 'SRR7547786_1' || true)"
gz2="$(_compress_if_exists 'SRR7547786_2' || true)"
gzs="$(_compress_if_exists 'SRR7547786' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-PARN-1-1_S31_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547787"
gz1="$(_compress_if_exists 'SRR7547787_1' || true)"
gz2="$(_compress_if_exists 'SRR7547787_2' || true)"
gzs="$(_compress_if_exists 'SRR7547787' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-PARN-1-2_S32_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547788"
gz1="$(_compress_if_exists 'SRR7547788_1' || true)"
gz2="$(_compress_if_exists 'SRR7547788_2' || true)"
gzs="$(_compress_if_exists 'SRR7547788' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-PARN-2-1_S33_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547789"
gz1="$(_compress_if_exists 'SRR7547789_1' || true)"
gz2="$(_compress_if_exists 'SRR7547789_2' || true)"
gzs="$(_compress_if_exists 'SRR7547789' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-KD-s3-PARN-2-2_S34_L003_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547790"
gz1="$(_compress_if_exists 'SRR7547790_1' || true)"
gz2="$(_compress_if_exists 'SRR7547790_2' || true)"
gzs="$(_compress_if_exists 'SRR7547790' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-BOLL-1_S49_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547791"
gz1="$(_compress_if_exists 'SRR7547791_1' || true)"
gz2="$(_compress_if_exists 'SRR7547791_2' || true)"
gzs="$(_compress_if_exists 'SRR7547791' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-BOLL-2_S50_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547792"
gz1="$(_compress_if_exists 'SRR7547792_1' || true)"
gz2="$(_compress_if_exists 'SRR7547792_2' || true)"
gzs="$(_compress_if_exists 'SRR7547792' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-FLAG-1_S57_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547793"
gz1="$(_compress_if_exists 'SRR7547793_1' || true)"
gz2="$(_compress_if_exists 'SRR7547793_2' || true)"
gzs="$(_compress_if_exists 'SRR7547793' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-FLAG-2_S58_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547794"
gz1="$(_compress_if_exists 'SRR7547794_1' || true)"
gz2="$(_compress_if_exists 'SRR7547794_2' || true)"
gzs="$(_compress_if_exists 'SRR7547794' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-IFIT2-1_S43_L004_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547795"
gz1="$(_compress_if_exists 'SRR7547795_1' || true)"
gz2="$(_compress_if_exists 'SRR7547795_2' || true)"
gzs="$(_compress_if_exists 'SRR7547795' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-IFIT2-2_S44_L004_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547796"
gz1="$(_compress_if_exists 'SRR7547796_1' || true)"
gz2="$(_compress_if_exists 'SRR7547796_2' || true)"
gzs="$(_compress_if_exists 'SRR7547796' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-NANOS3-1_S41_L004_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547797"
gz1="$(_compress_if_exists 'SRR7547797_1' || true)"
gz2="$(_compress_if_exists 'SRR7547797_2' || true)"
gzs="$(_compress_if_exists 'SRR7547797' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-NANOS3-2_S42_L004_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547798"
gz1="$(_compress_if_exists 'SRR7547798_1' || true)"
gz2="$(_compress_if_exists 'SRR7547798_2' || true)"
gzs="$(_compress_if_exists 'SRR7547798' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-SNRPA-1_S55_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547799"
gz1="$(_compress_if_exists 'SRR7547799_1' || true)"
gz2="$(_compress_if_exists 'SRR7547799_2' || true)"
gzs="$(_compress_if_exists 'SRR7547799' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-SNRPA-2_S56_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547800"
gz1="$(_compress_if_exists 'SRR7547800_1' || true)"
gz2="$(_compress_if_exists 'SRR7547800_2' || true)"
gzs="$(_compress_if_exists 'SRR7547800' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-TOB1-1_S51_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547801"
gz1="$(_compress_if_exists 'SRR7547801_1' || true)"
gz2="$(_compress_if_exists 'SRR7547801_2' || true)"
gzs="$(_compress_if_exists 'SRR7547801' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-TOB1-2_S52_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547802"
gz1="$(_compress_if_exists 'SRR7547802_1' || true)"
gz2="$(_compress_if_exists 'SRR7547802_2' || true)"
gzs="$(_compress_if_exists 'SRR7547802' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-TOB2-1_S53_L005_R1_001.fastq.gz"
fi

fasterq-dump --split-files "SRR7547803"
gz1="$(_compress_if_exists 'SRR7547803_1' || true)"
gz2="$(_compress_if_exists 'SRR7547803_2' || true)"
gzs="$(_compress_if_exists 'SRR7547803' || true)"
if [ "$RENAME_SRA_TO_ORIGINAL" = "1" ] && [ -n "$gz1" ]; then
  mv -f "$gz1" "EC-OE-TOB2-2_S54_L005_R1_001.fastq.gz"
fi


# Option B: Direct download (larger .sra files)
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547754/SRR7547754"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547755/SRR7547755"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547756/SRR7547756"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547757/SRR7547757"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547758/SRR7547758"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547759/SRR7547759"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547760/SRR7547760"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547761/SRR7547761"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547762/SRR7547762"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547763/SRR7547763"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547764/SRR7547764"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547765/SRR7547765"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547766/SRR7547766"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547767/SRR7547767"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547768/SRR7547768"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547769/SRR7547769"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547770/SRR7547770"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547771/SRR7547771"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547772/SRR7547772"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547773/SRR7547773"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547774/SRR7547774"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547775/SRR7547775"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547776/SRR7547776"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547777/SRR7547777"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547778/SRR7547778"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547779/SRR7547779"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547780/SRR7547780"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547781/SRR7547781"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547782/SRR7547782"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547783/SRR7547783"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547784/SRR7547784"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547785/SRR7547785"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547786/SRR7547786"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547787/SRR7547787"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547788/SRR7547788"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547789/SRR7547789"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547790/SRR7547790"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547791/SRR7547791"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547792/SRR7547792"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547793/SRR7547793"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547794/SRR7547794"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547795/SRR7547795"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547796/SRR7547796"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547797/SRR7547797"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547798/SRR7547798"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547799/SRR7547799"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547800/SRR7547800"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547801/SRR7547801"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547802/SRR7547802"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547803/SRR7547803"

# --- Additional data files ---
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547754/SRR7547754"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547755/SRR7547755"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547756/SRR7547756"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547757/SRR7547757"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547758/SRR7547758"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547759/SRR7547759"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547760/SRR7547760"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547761/SRR7547761"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547762/SRR7547762"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547763/SRR7547763"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547764/SRR7547764"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547765/SRR7547765"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547766/SRR7547766"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547767/SRR7547767"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547768/SRR7547768"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547769/SRR7547769"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547770/SRR7547770"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547771/SRR7547771"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547772/SRR7547772"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547773/SRR7547773"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547774/SRR7547774"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547775/SRR7547775"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547776/SRR7547776"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547777/SRR7547777"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547778/SRR7547778"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547779/SRR7547779"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547780/SRR7547780"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547781/SRR7547781"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547782/SRR7547782"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547783/SRR7547783"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547784/SRR7547784"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547785/SRR7547785"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547786/SRR7547786"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547787/SRR7547787"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547788/SRR7547788"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547789/SRR7547789"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547790/SRR7547790"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547791/SRR7547791"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547792/SRR7547792"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547793/SRR7547793"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547794/SRR7547794"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547795/SRR7547795"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547796/SRR7547796"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547797/SRR7547797"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547798/SRR7547798"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547799/SRR7547799"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547800/SRR7547800"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547801/SRR7547801"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547802/SRR7547802"
curl -L -O -C - "https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR7547803/SRR7547803"

echo "Download complete. Files saved to $OUTDIR"