Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions ichorCNA/ccbr_ichorcna_0.3.2/Dockerfile.v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM nciccbr/ccbr_ubuntu_base_20.04:v7

ARG BUILD_DATE="000000"
ENV BUILD_DATE=${BUILD_DATE}
ARG BUILD_TAG="000000"
ENV BUILD_TAG=${BUILD_TAG}
ARG REPONAME="000000"
ENV REPONAME=${REPONAME}
ARG DOCKERFILE="Dockerfile"
ENV DOCKERFILE=${DOCKERFILE}

COPY environment.yml /data2/
ENV CONDA_ENV=ichorcna
RUN mamba env create -n ${CONDA_ENV} -f /data2/environment.yml && \
/opt2/conda/bin/conda init bash && \
echo "conda activate ${CONDA_ENV}" >> ~/.bashrc && \
chmod -R a+rx /opt2

ENV PATH="/opt2/conda/envs/${CONDA_ENV}/bin:/opt2/conda/bin:$PATH"

# Install HMMcopy utilities
RUN cd /data2 && \
git clone https://github.com/shahcompbio/hmmcopy_utils.git && \
cd hmmcopy_utils && \
cmake . && \
make && \
cp bin/* /opt2/conda/envs/${CONDA_ENV}/bin/

# Clone ichorCNA v0.3.2 for scripts
RUN cd /data2 && \
git clone https://github.com/broadinstitute/ichorCNA.git && \
ln -s /data2/ichorCNA/scripts /opt2/conda/envs/${CONDA_ENV}/lib/R/library/ichorCNA/scripts

# Copy and run test
COPY test_ichorcna.sh /data2/
RUN chmod +x /data2/test_ichorcna.sh && \
/bin/bash -c "source activate ${CONDA_ENV} && /data2/test_ichorcna.sh"

COPY ${DOCKERFILE} /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}

WORKDIR /data2
25 changes: 25 additions & 0 deletions ichorCNA/ccbr_ichorcna_0.3.2/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ichorcna
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- python=3.9
- seqtk=1.5
- fastp=0.24.0
- r-base=4.2
- r-devtools=2.4.5
- r-plyr=1.8.9
- r-stringi
- icu=70
- bioconductor-hmmcopy
- bioconductor-genomeinfodb
- bioconductor-genomicranges
- r-ichorcna=0.3.2
- cmake=3.26
- make
- cxx-compiler
- pip=25.1.1
- pip:
- atari==0.1.4
- igv-reports==1.16.1
83 changes: 83 additions & 0 deletions ichorCNA/ccbr_ichorcna_0.3.2/test_ichorcna.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/bash
set -e

echo "Testing ichorCNA v0.3.2 installation..."

# Create test directories
mkdir -p /data2/ichorcna_test/output

# Set ichorCNA path (should be set by Dockerfile, but fallback if needed)
if [ -z "${ICHORCNA_PATH}" ]; then
ICHORCNA_PATH="/data2/ichorCNA"
fi

echo "Using ichorCNA at: ${ICHORCNA_PATH}"

# Test 1: Verify readCounter exists (from HMMcopy)
echo "Testing readCounter..."
readCounter --help > /dev/null 2>&1 || echo "Warning: readCounter not found (optional)"

# Test 2: Verify ichorCNA R package loads and check version
echo "Testing ichorCNA R package..."
Rscript -e "library(ichorCNA); v <- packageVersion('ichorCNA'); cat('ichorCNA version:', as.character(v), '\n'); stopifnot(as.character(v) == '0.3.2')"

# Test 3: Check required script exists
echo "Checking runIchorCNA.R script..."
if [ ! -f "${ICHORCNA_PATH}/scripts/runIchorCNA.R" ]; then
echo "ERROR: runIchorCNA.R script not found"
exit 1
fi

# Test 4: Check required extdata files exist (hg19 for test data)
echo "Checking extdata files..."
ls -lh ${ICHORCNA_PATH}/inst/extdata/gc_hg19_1000kb.wig
ls -lh ${ICHORCNA_PATH}/inst/extdata/map_hg19_1000kb.wig
ls -lh ${ICHORCNA_PATH}/inst/extdata/MBC_315.ctDNA.reads.wig

# Test 5: Run ichorCNA on test data (using hg19 references to match test data)
echo "Running ichorCNA on test sample..."
Rscript ${ICHORCNA_PATH}/scripts/runIchorCNA.R \
--libdir "${ICHORCNA_PATH}" \
--id test_sample \
--WIG ${ICHORCNA_PATH}/inst/extdata/MBC_315.ctDNA.reads.wig \
--gcWig ${ICHORCNA_PATH}/inst/extdata/gc_hg19_1000kb.wig \
--mapWig ${ICHORCNA_PATH}/inst/extdata/map_hg19_1000kb.wig \
--ploidy "c(2,3)" \
--normal "c(0.5,0.6,0.7,0.8,0.9)" \
--maxCN 5 \
--includeHOMD False \
--chrs "c(1:22, \"X\")" \
--chrTrain "c(1:22)" \
--estimateNormal True \
--estimatePloidy True \
--estimateScPrevalence False \
--txnE 0.9999 \
--txnStrength 10000 \
--outDir /data2/ichorcna_test/output

# Test 6: Verify output files were created
echo "Verifying output files..."
if [ ! -f "/data2/ichorcna_test/output/test_sample.cna.seg" ]; then
echo "ERROR: Expected output file test_sample.cna.seg not created"
exit 1
fi

if [ ! -f "/data2/ichorcna_test/output/test_sample.seg.txt" ]; then
echo "ERROR: Expected output file test_sample.seg.txt not created"
exit 1
fi

# Test 7: Check output contains data
SEG_LINES=$(wc -l < /data2/ichorcna_test/output/test_sample.seg.txt)
if [ ${SEG_LINES} -lt 2 ]; then
echo "ERROR: Output segmentation file is empty or too small"
exit 1
fi

echo "✓ All ichorCNA v0.3.2 tests passed!"
echo ""
echo "Output files:"
ls -lh /data2/ichorcna_test/output/

# Clean up test directory
rm -rf /data2/ichorcna_test
45 changes: 45 additions & 0 deletions ichorCNA/ccbr_ichorcna_0.3.2/v1-dev.README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## CCBR/Dockers2 nciccbr/ccbr_ichorcna_0.3.2:v1-dev

Dockerfile source: https://github.com/CCBR/Dockers2/blob/a0ac517d963fbeddfb01c810fbd06d9365c02f22/ichorCNA/ccbr_ichorcna_0.3.2/Dockerfile.v1


Built on: 2025-11-11_19:09:31

Build tag: v1-dev

Base image: nciccbr/ccbr_ubuntu_base_20.04:v7

Dockerfile path in repo: ichorCNA/ccbr_ichorcna_0.3.2/Dockerfile.v1


| Tool | Version |
|---------|---------|
| bbtools | NOTINDOCKER |
| bcftools | 1.10.2 using htslib 1.10.2-3ubuntu0.1 |
| bedops | 2.4.37 typical |
| bedtools | v2.27.1 |
| bowtie | 1.2.3 |
| bowtie2 | 2.3.5.1 |
| bwa | 0.7.17-r1188 |
| cutadapt | NOTINDOCKER |
| fastqc | NOTINDOCKER |
| fastQValidator | NOTINDOCKER |
| fastqscreen | NOTINDOCKER |
| git | 2.25.1 |
| java | 1.8.0_422 |
| kraken2 | NOTINDOCKER |
| kronatools | NOTINDOCKER |
| multiqc | NOTINDOCKER |
| parallel | 20161222 |
| picard | NOTINDOCKER |
| pigz | 2.4 |
| preseq | NOTINDOCKER |
| python2 | 2.7.18 |
| python3 | 3.9.23 |
| qualimap | NOTINDOCKER |
| rsem | NOTINDOCKER |
| rseqc | NOTINDOCKER |
| samtools | 1.10 |
| ucsc_tools | NOTINDOCKER |
| vcftools | 0.1.16 |