cutadapt trim-paired bug

Hi everyone,

I am trying to use the cutadapt plugin in the command line. I am using paired-end sequences, and the first time I run the process one error showed that one sample was not well paired, so following the suggestions in other post here I deleted the sample and tried to run again, but a new error showed and I have no clue whats wrong.

qiime cutadapt trim-paired \
> --i-demultiplexed-sequences /home/julia/datos/demuxPrueba.qza \
> --p-cores 4 \
> --p-front-f GGCTGACTGACT \
> --p-front-r  CCAATTACCATA \
> --p-error-rate 0 \
>   --o-trimmed-sequences Trimmered.qza 

The message i get is:

Plugin error from cutadapt:

  expected str, bytes or os.PathLike object, not float

Debug info has been saved to /tmp/qiime2-q2cli-err-t7yk8yks.log

I have recieved last days several message that there are some issues with cutadapt in the new version of qiime, but as I am using the 2022.2 version, I think this doesnt affects me, right?

Any ideas?

Hey @VerheulJulia ,
Can you re-run this command with the --verbose flag?
This shouldn't be an issue with the new version since you are using 2022.2.


1 Like

Hi @cherman2

I tryed with the verbose flag and this is what I have got:

Traceback (most recent call last):
  File "/home/julia/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-181>", line 2, in trim_paired
  File "/home/julia/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/julia/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/", line 391, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/julia/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_cutadapt/", line 180, in trim_paired
    cmd = _build_trim_command(fwd, rev, trimmed_sequences, cores,
  File "/home/julia/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_cutadapt/", line 82, in _build_trim_command
    cmd += ['-p', str(trimmed_seqs.path / os.path.basename(r_read))]
  File "/home/julia/anaconda3/envs/qiime2-2022.2/lib/python3.8/", line 142, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not float

Plugin error from cutadapt:

  expected str, bytes or os.PathLike object, not float

See above for debug info.
(qiime2-2022.2) julia@julia:~/datos$ 

Thanks for your response

Hi, i try to up this post again that remain unsolved.

Thanks a lot

Hi @VerheulJulia
Sorry for the slow response i am just not sure what the problem is. I appreciate you patience while we try to figure out this issue.

It could be with your install of qiime2 so you could try to reinstall qiime2-2022.2 and try running the command again. If you try that let me know!

Hi @VerheulJulia,
could you DM me your demuxPrueba.qza file so that I can try to run the command on my end?

Hi @cherman2,

I received a warning message when trying to send you because its too big so I upload to mega, so here it is.

Thanks a lot!

Hello @VerheulJulia,

  1. I was able to get your command to run on the same version of qiime2 so it seems like an issue with your qiime2 environment.
  1. However I don't think that these are the correct sequences for Cutadapt, Cutadapt does not seem to be finding the sequences. Make sure that you are using the PCR primer sequences that amplify the region and not the actual adapters.

Hope this helps!

Hi, @cherman2

  1. Any idea how could I check this or fix it?

  2. The sequences was given to me directly from the Sequencing Companies, could it be that there were already trimmered?

Thanks a lot!

Hi @VerheulJulia,
I would uninstall your conda environment and reinstall it.

It is possible that they are already trimmed. Typically with the EMP protocol the primers are already trimmed out. This is something you should ask your sequencer about how they are providing the sequences.

Hi @cherman2

I reinstalled everything and the error remained

This is what i got this time
bug.txt (73.7 KB)

Yes, it might be already trimmered, but I thought that if that was the case i would just recieve a warning telling me that 0 sequences were trimmered or something like that.

Thanks a lot!

Hey @VerheulJulia,
I believe it will only give you an error if it doesn't find those adapters at all in your sequences. And more than likely by random chance cutadapt will find those adapter somewhere in your sequences. If you look at the bug.txt file it looks like cutadapt ran successfully it just wasn't really finding your sequences as much as it expects.