pg-main from prod server added

This commit is contained in:
2025-08-18 12:03:55 +02:00
parent add456f0e7
commit f66cd01b21
956 changed files with 934400 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#!/bin/bash
bam_s3_bucket="quantgene-wes-archive"
upload_s3=true
file=${1--}
# --------------------- Download files from S3 -----------------------
while IFS= read vcf_s3; do
temp=($(echo $vcf_s3 | tr "/" "\n"))
vcf_s3_bucket="${temp[1]}"
flowcell="${temp[2]}"
run="${temp[3]}"
sample="${temp[4]::-4}"
vcf_s3_prefix="s3://${vcf_s3_bucket}/${flowcell}/${run}"
bam_s3_prefix="s3://${bam_s3_bucket}/${run}"
bam_s3="${bam_s3_prefix}/${sample}.deduped.bam"
aws s3 cp $vcf_s3 data/
aws s3 cp $bam_s3 data/
done < <(cat -- "$file")
# ------------------------ Index BAM files ---------------------------
for f in data/*.bam; do
echo "Indexing: "$f
samtools index $f $f".bai"
done