# cannot access sequence artifacts

**URL:** <https://forum.qiime2.org/t/cannot-access-sequence-artifacts/33123>\
**Category:** Technical Support\
**Tags:** python-api\
**Created:** [May 12, 2025, 2:59pm UTC](https://forum.qiime2.org/t/cannot-access-sequence-artifacts/33123 "2025-05-12T14:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fenny](https://forum.qiime2.org/user_avatar/forum.qiime2.org/fenny/32/21859_2.png) [@fenny](https://forum.qiime2.org/u/fenny)\
**Post date:** [May 12, 2025, 2:59pm UTC](https://forum.qiime2.org/t/cannot-access-sequence-artifacts/33123/1 "2025-05-12T14:59:50Z")

</div>

- Have you searched for the problem on the forum? It is rare that we see a _new_ question asked, so make sure you do your homework before asking for us to commit our time to helping you.  
yes

- Have you reviewed the [QIIME 2 Forum Glossary](https://forum.qiime2.org/t/how-the-forum-works/7085#heading--glossary)?  
yes

- Version of QIIME 2 you are running, and how it is installed (e.g. Virtualbox, conda, etc.)  
2025.4, installed via mamba

- What is the exact command or commands you ran? Copy and paste please.  
in a jupyter notebook with the env as kernel

```auto
silva_seq_artifact = "silva-138.2-rankprop-ssu-nr99-seqs-cleaned.qza"
seq = q2.Artifact.load(silva_seq_artifact)

```

- What is the exact error message? If you didn't run the command with the `--verbose` flag, please re-run and copy-and-paste the results.

tl;dr : PackageNotInstalledError: The R package "phyloseq" is not installed.

I checked if phyloseq was available in the R env that is installed in the Qiime2 env  
It was not, so I installed it and checked if it worked --\> OK  
I guess 'R' from the environment might not be the R instance actually used.  
How to check this?  
As a workaround I'm currently just unzipping the artifact and use BioPython to load the seqs.  
(main goal, get a histogram of the length of silva seqs for a particular clade)

```auto
---------------------------------------------------------------------------
PackageNotInstalledError Traceback (most recent call last)
Cell In[13], line 1
----> 1 seq = q2.Artifact.load(silva_seq_artifact)

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/sdk/result.py:83, in Result.load(cls, filepath)
     81 if not archiver:
     82 try:
---> 83 archiver = archive.Archiver.load(filepath)
     84 except OSError as e:
     85 if e.errno == 28:

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/core/archive/archiver.py:387, in Archiver.load(cls, filepath)
    382 process_alias, data_path = \
    383 cache._rename_to_data(archive.uuid, path)
    384 rec = ArchiveRecord(
    385 data_path, data_path / archive.VERSION_FILE, archive.uuid,
    386 archive.version, archive.framework_version)
--> 387 ref = cls(data_path, process_alias, Format(rec), cache)
    388 return ref
    389 # We really just want to kill these paths if anything at all goes wrong
    390 # Exceptions including keyboard interrupts are re-raised

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/core/archive/format/v7_0.py:179, in ArchiveFormat. __init__ (self, archive_record)
    178 def __init__ (self, archive_record):
--> 179 super(). __init__ (archive_record)
    181 self.annotations_dir = \
    182 archive_record.root / self.ANNOTATIONS_DIR

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/core/archive/format/v1.py:32, in ArchiveFormat. __init__ (self, archive_record)
     31 def __init__ (self, archive_record):
---> 32 super(). __init__ (archive_record)
     34 self.provenance_dir = archive_record.root / self.PROVENANCE_DIR

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/core/archive/format/v0.py:75, in ArchiveFormat. __init__ (self, archive_record)
     73 self.uuid = _uuid.UUID(uuid)
     74 self.type = sdk.parse_type(type)
---> 75 self.format = sdk.parse_format(format)
     77 self.path = path
     78 self.data_dir = path / self.DATA_DIR

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/sdk/util.py:109, in parse_format(format_str)
    106 if format_str is None:
    107 return None
--> 109 pm = qiime2.sdk.PluginManager()
    110 try:
    111 format_record = pm.formats[format_str]

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/sdk/plugin_manager.py:67, in PluginManager. __new__ (cls, add_plugins)
     65 cls.__instance = self
     66 try:
---> 67 self._init(add_plugins=add_plugins)
     68 except Exception:
     69 cls.__instance = None

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/qiime2/sdk/plugin_manager.py:105, in PluginManager._init(self, add_plugins)
    103 project_name = entry_point.name
    104 package = entry_point.value.split('.')[0]
--> 105 plugin = entry_point.load()
    107 self.add_plugin(plugin, package, project_name,
    108 consistency_check=False)
    110 self._consistency_check()

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/importlib/metadata/ __init__.py:171, in EntryPoint.load(self)
    166 """Load the entry point from its definition. If only a module
    167 is indicated by the value, return that module. Otherwise,
    168 return the named object.
    169 """
    170 match = self.pattern.match(self.value)
--> 171 module = import_module(match.group('module'))
    172 attrs = filter(None, (match.group('attr') or '').split('.'))
    173 return functools.reduce(getattr, attrs, module)

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/importlib/ __init__.py:126, in import_module(name, package)
    124 break
    125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)

File <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)

File <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)

File <frozen importlib._bootstrap>:992, in _find_and_load_unlocked(name, import_)

File <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)

File <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)

File <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)

File <frozen importlib._bootstrap>:1006, in _find_and_load_unlocked(name, import_)

File <frozen importlib._bootstrap>:688, in _load_unlocked(spec)

File <frozen importlib._bootstrap_external>:883, in exec_module(self, module)

File <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/q2_composition/ __init__.py:18
     16 from ._ancom import ancom
     17 from ._ancombc import ancombc
---> 18 from ._ancombc2 import ancombc2, ancombc2_visualizer
     19 from ._dataloaf_tabulate import tabulate
     20 from ._diff_abundance_plots import da_barplot

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/q2_composition/_ancombc2.py:34
     32 r_base = importr('base')
     33 r_stats = importr('stats')
---> 34 r_phyloseq = importr('phyloseq')
     35 r_ancombc2 = importr('ANCOMBC')
     37 rpy2_logger.setLevel(logging.ERROR)

File /webapp/tools/miniconda/miniconda3-py312_24.7.1-0/envs/qiime2-amplicon-2025.4/lib/python3.10/site-packages/rpy2/robjects/packages.py:472, in importr(name, lib_loc, robject_translations, signature_translation, suppress_messages, on_conflict, symbol_r2python, symbol_resolve, data)
    440 """ Import an R package.
    441 
    442 Arguments:
   (...)
    468 
    469 """
    471 if not isinstalled(name, lib_loc=lib_loc):
--> 472 raise PackageNotInstalledError(
    473 'The R package "%s" is not installed.' % name
    474 )
    476 if suppress_messages:
    477 ok = quiet_require(name, lib_loc=lib_loc)

PackageNotInstalledError: The R package "phyloseq" is not installed.

```

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [May 12, 2025, 3:06pm UTC](https://forum.qiime2.org/t/cannot-access-sequence-artifacts/33123/2 "2025-05-12T15:06:18Z")

</div>

Hello @fenny,

> [@fenny](#):
>
> I guess 'R' from the environment might not be the R instance actually used.  
> How to check this?

Activate a conda env and use the command `which` to show the location of a program.

Like this

```css
(base) cbrisl@laptop % conda activate qiime2-amplicon-2025.4

(qiime2-amplicon-2025.4) cbrisl@laptop % which R
/Users/cbrisl/miniforge3/envs/qiime2-amplicon-2025.4/bin/R

```

EDIT: I suspect the problem with Phyloseq will remain as [they stopped taking requests 5 years ago](https://github.com/joey711/phyloseq/pulls?q=is%3Apr+is%3Aclosed). I suppose all software is legacy software, eventually.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [June 12, 2025, 9:06pm UTC](https://forum.qiime2.org/t/cannot-access-sequence-artifacts/33123/3 "2025-06-12T21:06:41Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
