Skip to content

Commit

Permalink
Merge pull request #304 from databio/dev
Browse files Browse the repository at this point in the history
0.12.0 Release
  • Loading branch information
donaldcampbelljr authored Jan 16, 2025
2 parents 9ea1043 + 7a2e472 commit 0d1aad0
Show file tree
Hide file tree
Showing 41 changed files with 1,158 additions and 1,512 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ examples/test_project/test_hmmratac.yaml
examples/test_project/test_homer.yaml
examples/test_project/test_macs.yaml
.Rproj.user
/examples/data/tutorial1_r1.fastq.gz
/examples/data/tutorial1_r2.fastq.gz
/examples/data/tutorial2_r1.fastq.gz
/examples/data/tutorial2_r2.fastq.gz
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@ test:
python pipelines/pepatac.py -P 3 -M 100 -O test_out -R -S liver -G hg19 -Q paired -C pepatac.yaml --genome-size hs --prealignments rCRSd human_repeats -I examples/test_data/liver-CD31_test_R1.fastq.gz -I2 examples/test_data/liver-CD31_test_R2.fastq.gz
changtest:
python pipelines/pepatac.py -P 3 -M 100 -O test_out -R -S liver -G hg19 -Q paired -C $HOME/code/pepatac/examples/chang_project/pepatac.yaml -gs mm -I examples/test_data/liver-CD31_test_R1.fastq.gz -I2 examples/test_data/liver-CD31_test_R2.fastq.gz


docker:
docker build -t databio/pepatac -f containers/pepatac.Dockerfile .

singularity:
singularity build $${SIMAGES}pepatac docker://databio/pepatac
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Pull requests welcome. Active development should occur in a development or featu
* Jin Xu, jinxu9@stanford.edu
* Ryan Corces, rcorces@stanford.edu
* Vince Reuter, vreuter@protonmail.com
* Donald Campbell, https://github.com/donaldcampbelljr
* Others... (add your name)

## Citing
Expand Down
111 changes: 35 additions & 76 deletions checkinstall
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ while IFS= read -r line; do
done < $REQS

# Check tool installation
declare -a requiredCommands=("perl" "awk" "grep" "sed" "bedtools" "bowtie2" "macs3" "preseq" "samblaster" "samtools" "skewer" "bedToBigBed" "bigWigCat" "wigToBigWig" "Rscript")
declare -a requiredCommands=("perl" "awk" "grep" "sed" "bedtools" "bowtie2" "macs3" "preseq" "samblaster" "samtools" "skewer" "bedToBigBed" "Rscript" "gtars")

for cmd in ${requiredCommands[@]}; do
if ! is_executable $cmd; then
Expand Down Expand Up @@ -740,7 +740,7 @@ else
done < $REQS

# Check tool installation
declare -a requiredCommands=("perl" "awk" "grep" "sed" "bedtools" "bowtie2" "macs3" "preseq" "samblaster" "samtools" "skewer" "bedToBigBed" "bigWigCat" "wigToBigWig" "Rscript")
declare -a requiredCommands=("perl" "awk" "grep" "sed" "bedtools" "bowtie2" "macs3" "preseq" "samblaster" "samtools" "skewer" "bedToBigBed" "Rscript" "gtars")

for cmd in ${requiredCommands[@]}; do
if ! is_executable $cmd; then
Expand Down Expand Up @@ -792,81 +792,52 @@ echo -e "-----------------------------------------------------------"
echo -e "Checking bulker installation... "
BULKER_INSTALL=0

if ! is_executable "docker"; then
DOCKER=1

if ! is_executable "bulker"; then
echo $(warn "WARNING: To use bulker, pip install bulker and checkinstall again.")
printf "\n"
BULKER_INSTALL=1
else
DOCKER=0
BULKER_INSTALL=0
echo -e $(success "SUCCESS: bulker")
fi

if ! is_executable "singularity"; then
SINGULARITY=1
CWD=$(pwd)

if [ -f "sample_pipeline_interface.yaml" ]; then
IFACE="sample_pipeline_interface.yaml"
CRATE=$(cat $IFACE | grep 'bulker_crate' | tr " " "\n" | tail -n 1)
else
SINGULARITY=0
IFACE=$(curl https://raw.githubusercontent.com/databio/pepatac/master/sample_pipeline_interface.yaml)
CRATE=$(echo $IFACE | tr " " "\n" | grep -A1 'bulker_crate' | tail -n 1)
fi

if [ "$DOCKER" -eq 0 ]; then
CMD_CHECK=$(docker --help)
if [ $? -eq 0 ]; then
echo -e $(success "SUCCESS: docker.")
else
echo -e $(warn "WARNING: Docker is a recognized command, but does not appear to be active. Please ensure docker is running and checkinstall again.")
DOCKER=1
fi
yes n | bulker load $CRATE
if [ $? -eq 0 ]; then
echo $(warn "WARNING: Could not bulker load ${CRATE}. Check out https://bulker.databio.org/en/latest/install/.")
printf "\n"
BULKER_INSTALL=1
fi

if [ "$SINGULARITY" -eq 0 ]; then
echo -e $(success "SUCCESS: singularity.")
if [ -f "$CWD/pipelines/pepatac.py" ]; then
PIPELINE=$(cat "$CWD/pipelines/pepatac.py")
else
PIPELINE=$(curl https://raw.githubusercontent.com/databio/pepatac/master/pipelines/pepatac.py)
fi

if [ "$DOCKER" -eq 1 ] && [ "$SINGULARITY" -eq 1 ]; then
echo -e $(fail "ERROR: bulker")
BULKER_INSTALL=1
CMD_CHECK=$(bulker run ${CRATE} $PIPELINE --help)
EXIT_CODE=$(echo $?)
isActivatable=$(echo "${EXIT_CODE}" | awk '{ print $1+0; exit }')
if [ "$isActivatable" -eq 0 ]; then
BULKER_INSTALL=0
echo -e $(success "SUCCESS: bulker run ${CRATE}")
else
if ! is_executable "bulker"; then
echo $(warn "WARNING: To use bulker, pip install bulker and checkinstall again.")
printf "\n"
BULKER_INSTALL=1
else
BULKER_INSTALL=0
echo -e $(success "SUCCESS: bulker")
fi

CWD=$(pwd)

if [ -f "sample_pipeline_interface.yaml" ]; then
IFACE="sample_pipeline_interface.yaml"
CRATE=$(cat $IFACE | grep 'bulker_crate' | tr " " "\n" | tail -n 1)
else
IFACE=$(curl https://raw.githubusercontent.com/databio/pepatac/master/sample_pipeline_interface.yaml)
CRATE=$(echo $IFACE | tr " " "\n" | grep -A1 'bulker_crate' | tail -n 1)
fi

yes n | bulker load $CRATE
if [ $? -eq 0 ]; then
echo $(warn "WARNING: Could not bulker load ${CRATE}. Check out https://bulker.databio.org/en/latest/install/.")
printf "\n"
BULKER_INSTALL=1
fi

if [ -f "$CWD/pipelines/pepatac.py" ]; then
PIPELINE=$(cat "$CWD/pipelines/pepatac.py")
else
PIPELINE=$(curl https://raw.githubusercontent.com/databio/pepatac/master/pipelines/pepatac.py)
fi

CMD_CHECK=$(bulker run ${CRATE} $PIPELINE --help)
EXIT_CODE=$(echo $?)
isActivatable=$(echo "${EXIT_CODE}" | awk '{ print $1+0; exit }')
if [ "$isActivatable" -eq 0 ]; then
BULKER_INSTALL=0
echo -e $(success "SUCCESS: bulker run ${CRATE}")
else
echo $(warn "WARNING: Could not activate the bulker crate, ${CRATE}. Check out https://bulker.databio.org/en/latest/install/.")
printf "\n"
BULKER_INSTALL=1
fi
echo $(warn "WARNING: Could not activate the bulker crate, ${CRATE}. Check out https://bulker.databio.org/en/latest/install/.")
printf "\n"
BULKER_INSTALL=1
fi


################################################################################
echo -e "-----------------------------------------------------------"
echo -e " PEPATAC checkinstall results "
Expand All @@ -883,18 +854,6 @@ else
echo -e $(fail "ERROR: PEPATAC cannot be run via conda.")
fi

if [ "$DOCKER" -eq 0 ]; then
echo -e $(success "SUCCESS: PEPATAC can be run using docker!")
else
echo -e $(fail "ERROR: PEPATAC cannot be run using docker.")
fi

if [ "$SINGULARITY" -eq 0 ]; then
echo -e $(success "SUCCESS: PEPATAC can be run using singularity!")
else
echo -e $(fail "ERROR: PEPATAC cannot be run using singularity.")
fi

if [ "$BULKER_INSTALL" -eq 0 ]; then
echo -e $(success "SUCCESS: PEPATAC can be run using bulker!")
else
Expand Down
Loading

0 comments on commit 0d1aad0

Please sign in to comment.