This is a test version of Biostars. For the public version, visit https://www.biostars.org.
problem in running cutadapt on multiple cores

Dear all,

I am trying to use cutadadpt for trimming adapters. It works perfectly when I run it on single core but when I try to use it on multiple cores I get the following error.

ERROR: Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/cutadapt/pipeline.py", line 445, in run
    output.buffer.name = self._orig_outfiles.out.name
AttributeError: 'BZ2File' object has no attribute 'name'

Traceback (most recent call last):
  File "/usr/local/bin/cutadapt", line 11, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.6/site-packages/cutadapt/__main__.py", line 747, in main
    stats = runner.run()
  File "/home/use/.local/lib/python3.6/site-packages/cutadapt/pipeline.py", line 637, in run
    raise e
AttributeError: 'BZ2File' object has no attribute 'name'

I would really appreciate any suggestions.

Thanks

rna-seq

Can you share the 2 commands you’re using?

Hello,

Here it is:

This one works:

cutadapt -u 15 -U 5 -m 20 -g GATGGTTGAGGATGTGTGGAG -G GATGGTTGAGGATGTGTGGAG -g TCCACACATCCTCAACCATC -G CTCCACACATCCTCAACCATC -q 25 -o out_R1.fq.bz2 -p out_R2.fq.bz2 /path/to/file/input_R1.fq.bz2 /path/to/file/input_R2.fq.bz2

and this one doesn't:

cutadapt -j 40 -u 15 -U 5 -m 20 -g GATGGTTGAGGATGTGTGGAG -G GATGGTTGAGGATGTGTGGAG -g TCCACACATCCTCAACCATC -G CTCCACACATCCTCAACCATC -q 25 -o out_R1.fq.bz2 -p out_R2.fq.bz2 /path/to/file/input_R1.fq.bz2 /path/to/file/input_R2.fq.bz2

python --version
Python 3.6.4 :: Anaconda, Inc.

cutadapt --version
1.16

Yes. I have 40 cores.

What happens if you try it with, more than 1 but less than 40? Same error?

It looks like multithreaded trimming only works for gzipped files at the moment. I would suggest that you post a bug report on github, since perhaps the authors can simply program around this.

0 answers

No answers yet.

Log in to answer this question.