P0: project setup (packaging, CI, licences, data/oracle scripts)
- pyproject (uv/hatch, ruff, mypy strict, pytest markers), MIT LICENSE, THIRD_PARTY_NOTICES with verbatim BSD-2 (BeadArrayFiles) and MIT (gtc2vcf) - CI workflow for Gitea/GitHub Actions: lint, type check, unit tests - fetch_data.sh p0 now fetches the GSA v4 PGx demo IDATs (the GDA "Demo 36" bundle is a GenomeStudio project), unpacks archives, fixes pipefail bug - make_oracle_gtcs.sh builds bcftools + gtc2vcf and writes oracle GTCs - plan §17: corrected P0 dataset table Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01814GKVzZVL3FuF3DeiZXhv
This commit is contained in:
1 parent
0861b27c2b
commit
f10c651f0f
8 files changed
+269
-27
No files matched your search
+30
-16
@@ -18,28 +18,42 @@ get() { # get <url> <dest-dir>
|
||||
grep -q " $f\$" "$sums" || sha256sum "$f" >> "$sums"
|
||||
}
|
||||
|
||||
unpack() { # unzip/untar every archive under <dir> next to itself (idempotent)
|
||||
find "$1" -name '*.zip' -o -name '*.tar.gz' | sort | while read -r a; do
|
||||
out="${a%.zip}"; out="${out%.tar.gz}"
|
||||
[[ -d "$out" ]] && continue
|
||||
mkdir -p "$out"
|
||||
case "$a" in *.zip) unzip -q -o "$a" -d "$out";; *.tar.gz) tar -xzf "$a" -C "$out";; esac
|
||||
done
|
||||
}
|
||||
|
||||
GDA=https://webdata.illumina.com/downloads/productfiles/global-diversity-array
|
||||
G1K=https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/supporting/hd_genotype_chip
|
||||
|
||||
case "$tier" in
|
||||
p0)
|
||||
d=data/p0/gda_demo36; mkdir -p "$d"
|
||||
get "$GDA/infinium-global-diversity-array-8-v1-0-D1-demo-data-36.zip" "$d"
|
||||
get "https://support.illumina.com/content/dam/illumina-support/documents/downloads/productfiles/global-diversity-array/infinium-global-diversity-array-8-v1-0_D1_SampleSheet_Demo_36.csv" "$d"
|
||||
# GSA v4 PGx demo: 36 samples, real IDATs + BPM/CSV/EGT (primary small fixture)
|
||||
SUP=https://support.illumina.com/content/dam/illumina-support/documents/documentation/chemistry_documentation/infinium_assays/infinium-gsa-pgx
|
||||
d=data/p0/gsa_v4_pgx; mkdir -p "$d"
|
||||
for f in idats_Demo_36.zip GSA-PGx-48v4-0_20079540_E2_bpm.zip GSA-PGx-48v4-0_20079540_E2_csv.zip \
|
||||
GSA-PGx-48v4-0_20079540_E2_ClusterFile.zip SampleSheetTemplate_GSAv4PGx_2beadchips.csv; do
|
||||
get "$SUP/$f" "$d"
|
||||
done
|
||||
# GDA v1 manifest/cluster files (note: the "Demo 36" bundle is a GenomeStudio project, not IDATs)
|
||||
d=data/p0/gda_v1; mkdir -p "$d"
|
||||
get "$GDA/infinium-global-diversity-array-8-v1-0-D1-manifest-file-bpm.zip" "$d"
|
||||
# CSV manifest and EGT: file names can change; if these fail, download manually from
|
||||
# https://support.illumina.com/array/array_kits/infinium-global-diversity-array/product-files.html
|
||||
get "$GDA/infinium-global-diversity-array-8-v1-0-D1-manifest-file-csv.zip" "$d" || echo "!! fetch CSV manifest manually"
|
||||
get "$GDA/infinium-global-diversity-array-8-v1-0-D1-cluster-file.zip" "$d" || echo "!! fetch EGT manually"
|
||||
if command -v Rscript >/dev/null; then
|
||||
Rscript -e 'if(!requireNamespace("BiocManager",quietly=TRUE)) install.packages("BiocManager",repos="https://cloud.r-project.org"); BiocManager::install(c("IlluminaDataTestFiles","hapmap370k"),ask=FALSE,update=FALSE)'
|
||||
Rscript -e 'cat(system.file("extdata",package="IlluminaDataTestFiles"),"\n")' > data/p0/bioc_fixture_path.txt
|
||||
else
|
||||
echo "!! R not found: install IlluminaDataTestFiles + hapmap370k from Bioconductor for parser fixtures"
|
||||
fi
|
||||
echo "NOTE: GSA v4 PGx demo (36 samples) + product files: download manually from"
|
||||
echo " https://support.illumina.com/downloads/infinium-gsa-v4-pgx-demo-data-set-iscan.html"
|
||||
echo " https://support.illumina.com/array/array_kits/infinium-global-screening-array-v4-pgx/product-files.html"
|
||||
get "$GDA/infinium-global-diversity-array-8-v1-0-D1-manifest-file-csv.zip" "$d"
|
||||
get "$GDA/infinium-global-diversity-array-8-v1-0-D1-cluster-file.zip" "$d"
|
||||
get "https://support.illumina.com/content/dam/illumina-support/documents/downloads/productfiles/global-diversity-array/infinium-global-diversity-array-8-v1-0_D1_SampleSheet_Demo_36.csv" "$d"
|
||||
# Bioconductor IDAT fixtures (Artistic-2.0, redistributable) — fetched as source tarballs, no R needed
|
||||
d=data/p0/bioc; mkdir -p "$d"
|
||||
for pkg in IlluminaDataTestFiles hapmap370k; do
|
||||
url=$(curl -sL "https://bioconductor.org/packages/release/data/experiment/html/$pkg.html" \
|
||||
| grep -oE "\.\./src/contrib/${pkg}_[0-9.]+\.tar\.gz" | head -1 || true)
|
||||
[[ -n "$url" ]] && get "https://bioconductor.org/packages/release/data/experiment/${url#../}" "$d" \
|
||||
|| echo "!! could not resolve $pkg tarball"
|
||||
done
|
||||
unpack data/p0
|
||||
;;
|
||||
p1)
|
||||
d=data/p1/1kg_omni_broad; mkdir -p "$d"
|
||||
|
||||
Reference in new issue
Block a user