Repository navigation
Closed
Description
Description of the bug
interproscan ignores the database passed as interproscan_database and always uses the small sample database built into the container. With a real database, the run fails:
Running hmmpress (/usr/local/bin//hmmpress) on data/pirsf/3.10/sf_hmm_all
failed to open SSI index data/pirsf/3.10/sf_hmm_all.h3i
Could not run hmmpress!
Cause
This is checked against quay.io/biocontainers/interproscan:5.59_91.0--hec16e2b_1.
interproscan.shrunscd "$(dirname "$INSTALL_DIR")", which moves into/usr/local/share/InterProScan, before it checksINTERPROSCAN_CONF.- The module sets
export INTERPROSCAN_CONF=interproscan.propertiesas a relative path. After thecd, that resolves to the container's own/usr/local/share/InterProScan/interproscan.properties, not the edited copy in the task work dir. - The container's properties file has
data.directory=dataandbin.directory=bin, both relative to the install dir. InterProScan therefore reads the bundled sample data. That data is not pressed and sits on a read-only image, sohmmpressfails. The stageddata/folder is never used. - Separately, the
sedsetsbin.directory=$INTERPROSCAN_DIR/bin, which is/usr/local/bin. The member-database binaries live in/usr/local/share/InterProScan/bin, for examplebin/pirsf/3.10/pirsf.pl.data.directoryis never rewritten either.
The tests pass because the test profile only runs applications that work with the bundled sample data.
Suggested fix
if [ -d 'data' ]; then
INTERPROSCAN_DIR="$( dirname "$( dirname "$( which interproscan.sh )" )" )"
INTERPROSCAN_PROPERTIES="$( find "$INTERPROSCAN_DIR/share" -name "interproscan.properties" )"
cp "$INTERPROSCAN_PROPERTIES" .
sed -i \
-e "s|^bin\\.directory=.*|bin.directory=$( dirname "$INTERPROSCAN_PROPERTIES" )/bin|" \
-e "s|^data\\.directory=.*|data.directory=$PWD/data|" \
interproscan.properties
export INTERPROSCAN_CONF=$PWD/interproscan.properties
fiAlso worth documenting: interproscan_database must be the data/ folder of a matching InterProScan release, meaning 5.59-91.0 for the current container, and its HMMs must already be pressed with python3 setup.py -f interproscan.properties. Otherwise hmmpress runs inside every task and parallel tasks race.
Workaround
Bind the database over the container's data folder:
process {
withName: '.*:INTERPROSCAN' {
containerOptions = '-B /abs/path/interproscan-5.59-91.0/data:/usr/local/share/InterProScan/data'
}
}System information
- Module:
modules/nf-core/interproscan(current master) - Container:
interproscan:5.59_91.0--hec16e2b_1 - Executor: Slurm, Singularity
- Found via INTERPROSCAN fails with real database: version mismatch and nested data directory proteinannotator#114
Metadata
Metadata
Assignees
Labels
No labels
Activity
Record proteinannotator run 07 and the InterProScan workaround
Fix interproscan ignoring staged database (nf-core#13032)
Fix InterProScan ignoring staged database (nf-core#114)
Fix interproscan ignoring staged database (#13032)
Fix interproscan ignoring staged database (#13032)
Bump mgnifam/generatefamilies to 4.0.0, add stats output (nf-core#13013)
Bump mgnifam/updatefamilies to 4.0.0, add stats output (nf-core#13014)