| 20 | |
| 21 | === Example : [https://github.com/moshi4/FastDTLmapper FastDTLmapper] === |
| 22 | This tool requires many python packages and needs those to set up both python2 and python3. Fortunately, the developer provides Docker Images so we can use a Docker image and generate a Sigularity image. |
| 23 | |
| 24 | On Centos7 computing node, (need 'idev'), |
| 25 | {{{ |
| 26 | module load singularity/3.9.0 |
| 27 | singularity pull docker://ghcr.io/moshi4/fastdtlmapper:latest |
| 28 | }}} |
| 29 | This command creates ‘fastdtlmapper_latest.sif’, which is the Singularity Image. You can rename/transfer it as you like. |
| 30 | |
| 31 | To run it to show ‘help’, |
| 32 | {{{ |
| 33 | singularity exec fastdtlmapper_latest.sif FastDTLmapper -h |
| 34 | }}} |
| 35 | |
| 36 | To run it with the minimum test dataset, |
| 37 | Assuming the example dataset is extracted under /lustre/project/group/user/fastdtlmapper, where 'group' is the group name and 'user' is the user name, |
| 38 | {{{ |
| 39 | export SINGULARITYENV_TMPDIR=/tmp |
| 40 | export SINGULARITY_BINDPATH=/lustre/project/group/user:/home/user,$TMPDIR:/tmp |
| 41 | singularity exec fastdtlmapper_latest.sif FastDTLmapper -i fastdtlmapper/example/minimum_dataset/fasta/ -t fastdtlmapper/example/minimum_dataset/species_tree.nwk -o fastdtlmapper/output_minimum |
| 42 | }}} |
| 43 | |
| 44 | For Slurm batch jobs, |
| 45 | {{{ |
| 46 | #!/bin/bash |
| 47 | #SBATCH --job-name=fastDLmapper # Job Name |
| 48 | #SBATCH --partition=centos7 # Partition |
| 49 | #SBATCH --qos=normal # Quality of Service |
| 50 | #SBATCH --time=0-24:00:00 # Wall clock time limit in Days-HH:MM:SS |
| 51 | #SBATCH --nodes=1 # Node count required for the job |
| 52 | #SBATCH --ntasks-per-node=1 # Number of tasks to be launched per Node |
| 53 | #SBATCH --cpus-per-task=20 # Number of threads per task (OMP threads) |
| 54 | #SBATCH --output=try_fastDLmapper.out ### File in which to store job output |
| 55 | #SBATCH --error=try_fastDLmapper.err ### File in which to store job error messages |
| 56 | |
| 57 | # Load Singularity module |
| 58 | module load singularity/3.9.0 |
| 59 | |
| 60 | # Set $TMPDIR in containar to /tmp, keeping $TMPDIR in host (/local/tmp/...) |
| 61 | export SINGULARITYENV_TMPDIR=/tmp |
| 62 | |
| 63 | # Mount the lustre directory to home, $TMPDIR to /tmp |
| 64 | export SINGULARITY_BINDPATH=/lustre/project/group/user:/home/user,$TMPDIR:/tmp |
| 65 | |
| 66 | # Run container |
| 67 | singularity exec fastdtlmapper_latest.sif FastDTLmapper -i fastdtlmapper/example/minimum_dataset/fasta/ -t fastdtlmapper/example/minimum_dataset/species_tree.nwk -o fastdtlmapper/output_minimum |
| 68 | }}} |
| 69 | |