QIIME/en: Difference between revisions

Jump to navigation Jump to search
Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 7: Line 7:


==Installation ==
==Installation ==
QIIME2 can be installed using [[Singularity]] or using EasyBuild. Singularity is strongly preferred since it does not generate many thousands of files in your home directory, potentially causing you to exceed the disk quota limit on the number of files.
QIIME2 can be installed using [[Apptainer]] or using EasyBuild. Apptainer is strongly preferred since it does not generate many thousands of files in your home directory, potentially causing you to exceed the disk quota limit on the number of files.


=== Using Singularity ===
=== Using Apptainer ===


The QIIME2 developers publish images on [https://quay.io/organization/qiime2 Quay.io].  In order to use one of these images on our systems you must first [[Singularity/en#Creating_an_image_using_Docker_Hub|build a Singularity image]]:
The QIIME2 developers publish images on [https://quay.io/organization/qiime2 Quay.io].  In order to use one of these images on our systems you must first [[Apptainer/en#Creating_an_image_using_Docker_Hub|build an Apptainer image]]:


{{Commands
{{Commands
|module load singularity
|module load apptainer
|singularity build qiime2-2021.11.sif docker://quay.io/qiime2/core:2021.11
|apptainer build qiime2-2021.11.sif docker://quay.io/qiime2/core:2021.11
}}
}}


This build step may take over an hour, but you only need to do this once. Save the image file (<code>qiime2-2021.11.sif</code> in this example) for later re-use.  
This build step may take over an hour, but you only need to do this once. Save the image file (<code>qiime2-2021.11.sif</code> in this example) for later re-use.  


Then run your code as described at [[Singularity]].  Typically you will run each QIIME command in a <code>singularity exec</code> statement:
Then run your code as described at [[Apptainer]].  Typically you will run each QIIME command in a <code>apptainer exec</code> statement:


{{Commands
{{Commands
|singularity exec qiime2-2021.11.sif <your QIIME command>
|apptainer exec qiime2-2021.11.sif <your QIIME command>
}}
}}


Line 33: Line 33:
#SBATCH --account=def-someuser
#SBATCH --account=def-someuser


singularity exec -B $PWD:/home -B /scratch/someuser:/outputs \
apptainer exec -B $PWD:/home -B /scratch/someuser:/outputs \
   -B /projects/def-somePI/someuser/path/to/inputs:/inputs qiime2-2021.11.sif \
   -B /projects/def-somePI/someuser/path/to/inputs:/inputs qiime2-2021.11.sif \
   qiime tools import --type 'FeatureData[Sequence]' \
   qiime tools import --type 'FeatureData[Sequence]' \
Line 39: Line 39:
   --output-path /outputs/some_output_feature.qza
   --output-path /outputs/some_output_feature.qza


singularity exec -B $PWD:/home -B /scratch/someuser:/outputs \
apptainer exec -B $PWD:/home -B /scratch/someuser:/outputs \
   -B /projects/def-somePI/someuser/path/to/inputs:/inputs qiime2-2021.11.sif \
   -B /projects/def-somePI/someuser/path/to/inputs:/inputs qiime2-2021.11.sif \
   qiime tools import \
   qiime tools import \
Line 47: Line 47:
   --output-path /outputs/some_output_ref-taxonomy.qza
   --output-path /outputs/some_output_ref-taxonomy.qza


singularity exec -B $PWD:/home -B /scratch/someuser:/outputs \
apptainer exec -B $PWD:/home -B /scratch/someuser:/outputs \
   -B /projects/def-somePI/someuser/path/to/inputs:/inputs qiime2-2021.11.sif \
   -B /projects/def-somePI/someuser/path/to/inputs:/inputs qiime2-2021.11.sif \
   qiime feature-classifier fit-classifier-naive-bayes \
   qiime feature-classifier fit-classifier-naive-bayes \
Line 55: Line 55:
</pre>
</pre>


Note that it is important to use the [[Singularity#Bind_mounts|bind]] option (<tt>-B</tt>) with each folder you want to work with when you run programs in your container. For more information about Singularity, you can watch the recorded [https://www.youtube.com/watch?v=kYb0aXS5DEE Singularity webinar].
Note that it is important to use the [[Apptainer#Bind_mounts|bind]] option (<tt>-B</tt>) with each folder you want to work with when you run programs in your container. For more information about Apptainer, you can watch the recorded [https://www.youtube.com/watch?v=bpmrfVqBowY Apptainer webinar].


On first importing data into QIIME format you may receive an error ending with a message like this:
On first importing data into QIIME format you may receive an error ending with a message like this:
Line 61: Line 61:
Timezone offset does not match system offset: 0 != -18000. Please, check your config files.
Timezone offset does not match system offset: 0 != -18000. Please, check your config files.
</pre>
</pre>
This can be worked around by setting a time zone before invoking Singularity:
This can be worked around by setting a time zone before invoking Apptainer:


{{Commands
{{Commands
|export TZ{{=}}'UTC'
|export TZ{{=}}'UTC'
|singularity exec qiime2-2021.11.sif qiime tools import ...
|apptainer exec qiime2-2021.11.sif qiime tools import ...
}}
}}


38,760

edits

Navigation menu