Sematic type error when running Rescript

Hello again,

I am getting the error below every time I try to run rescript. I saw this post (here) and it said that Rescript is not being activated. I installed rescript and activated it as stated so I am not sure what is happening. I also attempted to activate qiime first and then Rescript but I get the error that qiime is not activated.

Can you please help? I am running the script on the cluster and submitting the script as a job.

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=25
#SBATCH --mem=100gb
#SBATCH --time=14-00:00:00
#SBATCH --job-name=ReScrip-tBacteriaClassifier    
#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --partition=intel


#Load modules or packages needed
source activate rescript
source activate qiime2-2023.2


#Import SILVA files into QIIME 2
#Import the Taxonomy Rank file:
qiime tools import \
--type 'FeatureData[SILVATaxonomy]' \
--input-path tax_slv_ssu_138.1.txt \
--output-path taxranks-silva-138.1-ssu-nr99.qza

#Import the Taxonomy Mapping file
qiime tools import \
--type 'FeatureData[SILVATaxidMap]' \
--input-path taxmap_slv_ssu_ref_nr_138.1.txt \
--output-path taxmap-silva-138.1-ssu-nr99.qza

Error

Traceback (most recent call last):
  File "/rhome/mpuli011/.conda/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/builtin/tools.py", line 157, in import_data
    artifact = qiime2.sdk.Artifact.import_data(type, input_path,
  File "/rhome/mpuli011/.conda/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/result.py", line 294, in import_data
    output_dir_fmt = pm.get_directory_format(type_)
  File "/rhome/mpuli011/.conda/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 383, in get_directory_format
    raise TypeError(
TypeError: Semantic type FeatureData[SILVATaxonomy] does not have a compatible directory format.

An unexpected error has occurred:

  Semantic type FeatureData[SILVATaxonomy] does not have a compatible directory format.

I did what the previous post said, about checking if Rescript is installed in conda environment by running "conda activateqiime2-2023.2" and
"conda list rescript" and I get the following

packages in environment at /rhome/mpuli011/.conda/envs/qiime2-2023.2:
#
# Name                    Version                   Build  Channel

Hello @fabipc,

It looks like you do not have rescript installed. To install it, activate your conda environment, then follow the instructions here.

3 Likes

Hi @fabipc,

To add to @colinvwood's comment... After you install RESCRIPt, you can also save yourself a lot of time by simply running this command, and the command immediately after it.

1 Like

@colinvwood weird, I could have sworn I installed it. I will reinstall, ensure all is working, and proceed with the code that @SoilRotifer provided.

Thank you so much; I will let you know if anything goes wrong.

1 Like

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