Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repeatmodeler recipe #19137

Merged
merged 8 commits into from
Dec 13, 2019
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
29 changes: 25 additions & 4 deletions recipes/repeatmodeler/RepModelConfig.pm
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,42 @@ BEGIN
## ============
## Tandem Repeat Finder program.
##
$TRF_PRGM = $ENV{'TRF_DIR'};

$TRF_DIR = $ENV{'TRF_DIR'};
$TRF_PRGM = "$TRF_DIR/trf";
##
## NSEG Location
## =============
## Location of the NCBI nseg program
$NSEG_PRGM = $ENV{'NSEG_DIR'};

$NSEG_DIR = $ENV{'NSEG_DIR'};
$NSEG_PRGM = "$NSEG_DIR/nseg";
Juke34 marked this conversation as resolved.
Show resolved Hide resolved
##
## RepeatScout Location
## ====================
## Alkes Price RepeatScout DeNovo Repeat Finder
##
$RSCOUT_DIR = $ENV{'RSCOUT_DIR'};

##
## Refiner Location
## ====================
##
$REFINER_DIR = $ENV{'REFINER_DIR'};
$REFINER_PRGM = "$REFINER_DIR/Refiner";

##
## Refiner Location
## ====================
##
$TRFMASK_DIR = $ENV{'TRFMASK_DIR'};
$TRFMASK_PRGM = "$TRFMASK_DIR/TRFMask";

##
## Refiner Location
## ====================
##
$REPEATCLASSIFIER_DIR = $ENV{'REPEATCLASSIFIER_DIR'};
$REPEATCLASSIFIER_PRGM = "$REPEATCLASSIFIER_DIR/RepeatClassifier";

##
## Turns on debugging in all RepeatModeler modules/scripts
##
Expand Down
19 changes: 18 additions & 1 deletion recipes/repeatmodeler/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ mkdir -p ${PREFIX}/bin
mkdir -p ${RM_DIR}
cp -r * ${RM_DIR}

# Hack J. Dainat - fix path to access the tools through the wrapper in the bin
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/REPEATMODELER_DIR\/Refiner/REFINER_PRGM/' ${RM_DIR}/RepeatModeler
sed -i '' 's/REPEATMODELER_DIR\/TRFMask/TRFMASK_PRGM/' ${RM_DIR}/RepeatModeler
sed -i '' 's/REPEATMODELER_DIR\/RepeatClassifier/REPEATCLASSIFIER_PRGM/' ${RM_DIR}/RepeatModeler
sed -i '' 's/REPEATMODELER_DIR\/TRFMask/TRFMASK_PRGM/' ${RM_DIR}/RepeatClassifier
else
sed -i 's/REPEATMODELER_DIR\/Refiner/REFINER_PRGM/' ${RM_DIR}/RepeatModeler
sed -i 's/REPEATMODELER_DIR\/TRFMask/TRFMASK_PRGM/' ${RM_DIR}/RepeatModeler
sed -i 's/REPEATMODELER_DIR\/RepeatClassifier/REPEATCLASSIFIER_PRGM/' ${RM_DIR}/RepeatModeler
sed -i 's/REPEATMODELER_DIR\/TRFMask/TRFMASK_PRGM/' ${RM_DIR}/RepeatClassifier
fi
# END HACK

# Copy edited config file for auto configuration
cp ${RECIPE_DIR}/RepModelConfig.pm ${RM_DIR}/RepModelConfig.pm

Expand All @@ -17,12 +31,15 @@ cat <<END >>${PREFIX}/bin/RepeatModeler
#!/bin/bash
REPEATMODELER_DIR=${PREFIX}/share/RepeatModeler
REPEATMASKER_DIR=${PREFIX}/share/RepeatMasker
REFINER_DIR=${PREFIX}/bin
TRFMASK_DIR=${PREFIX}/bin
REPEATCLASSIFIER_DIR=${PREFIX}/bin
TRF_DIR=${PREFIX}/bin
RMBLAST_DIR=${PREFIX}/bin
RECON_DIR=${PREFIX}/bin
RSCOUT_DIR=${PREFIX}/bin
NSEG_DIR=${PREFIX}/bin
export REPEATMODELER_DIR REPEATMASKER_DIR TRF_DIR RMBLAST_DIR RECON_DIR RSCOUT_DIR NSEG_DIR
export REPEATMODELER_DIR REPEATMASKER_DIR REFINER_DIR TRFMASK_DIR REPEATCLASSIFIER_DIR TRF_DIR RMBLAST_DIR RECON_DIR RSCOUT_DIR NSEG_DIR
NAME=\$(basename \$0)
perl ${RM_DIR}/\${NAME} \$@
END
Expand Down
5 changes: 4 additions & 1 deletion recipes/repeatmodeler/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source:
md5: c148b4b56bb3fbd4e9ba88ac8736baa3

build:
number: 1
number: 2
skip: True #[osx]

requirements:
Juke34 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -24,7 +24,10 @@ requirements:
- perl-text-soundex

test:
files:
- test.fa
commands:
# (see run_test.sh )
- RepeatModeler > /dev/null

about:
Expand Down
11 changes: 11 additions & 0 deletions recipes/repeatmodeler/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
set -x -e

# build the db with BuildDatabase
BuildDatabase -engine ncbi -name db test.fa 2> /dev/null

# run repeat modeler
RepeatModeler -engine ncbi -database db 2> /dev/null

# check the result
test -s RM_*/consensi.fa
Loading