Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with only one sequence in a file #376

Closed
ogandril opened this issue Apr 17, 2019 · 10 comments

Comments

@ogandril
Copy link

commented Apr 17, 2019

I am using -g file:tags.fa to specifiy the sequences of interest.
When there are two sequences, it works fine:

>Plate1
^GACT
>Plate2
^CATG

When I am using only the first two lines:

>Plate1
^GACT

I get the following error:

Command error:
  Traceback (most recent call last):
    File "/usr/bin/cutadapt", line 10, in <module>
      sys.exit(main())
    File "/usr/lib/python3.6/site-packages/cutadapt/__main__.py", line 803, in main
      stats = runner.run()
    File "/usr/lib/python3.6/site-packages/cutadapt/pipeline.py", line 727, in run
      (n, total1_bp, total2_bp) = self._pipeline.process_reads(progress=self._progress)
    File "/usr/lib/python3.6/site-packages/cutadapt/pipeline.py", line 324, in process_reads
      read1, read2 = modifier(read1, read2, matches1, matches2)
    File "/usr/lib/python3.6/site-packages/cutadapt/modifiers.py", line 32, in __call__
      return self._modifier1(read1, matches1), read2
    File "/usr/lib/python3.6/site-packages/cutadapt/modifiers.py", line 179, in __call__
      match = AdapterCutter.best_match(self.adapters, trimmed_read)
    File "/usr/lib/python3.6/site-packages/cutadapt/modifiers.py", line 107, in best_match
      match = adapter.match_to(read)
    File "/usr/lib/python3.6/site-packages/cutadapt/adapters.py", line 797, in match_to
      assert match.length >= self.min_overlap
  AssertionError

I tried to simply duplicate the first tag

>Plate1
^GACT
>Plate1
^GACT

And this worked fine...

Any specific reason why cutadapt is expecting at least two sequences in the file?

Best

Olivier

Edit (this was hidden within the comment in the issue template):

Please provide the following information:

  • Cutadapt and Python version

    • cutadapt: 2.1
    • Python 2.7.10
  • How you installed the tool (conda or pip, for example)

    docker profile

  • Which command-line parameters you used

    cutadapt --no-trim -e 0 --no-indels -g file:tags2.fa --pair-filter=any --minimum-length 14 --discard-untrimmed -o {name}_R1.fastq -p {name}_R2.fastq 10k_R1_cut.fastq 10k_R2_cut.fastq > plate_output.txt

@marcelm

This comment has been minimized.

Copy link
Owner

commented Apr 17, 2019

Cutadapt does not require two sequences per se, so this is a bug.

I would like to reproduce the problem. Do you think you could make the input FASTQ files available to me?

@ogandril

This comment has been minimized.

Copy link
Author

commented Apr 17, 2019

@marcelm

This comment has been minimized.

Copy link
Owner

commented Apr 17, 2019

I think if your attachment did not make it here. Can you send the files directly to marcel.martin (at) scilifelab.se, please?

@ogandril

This comment has been minimized.

Copy link
Author

commented Apr 17, 2019

@marcelm

This comment has been minimized.

Copy link
Owner

commented Apr 17, 2019

Thanks, that was helpful. The problem appears to be the 40th read in the file, which is empty. Cutadapt apparently cannot handle that when --no-indels is used together with an anchored 5' adapter. I’ll fix this.

@ogandril

This comment has been minimized.

Copy link
Author

commented Apr 17, 2019

@marcelm marcelm closed this in 1451a0d Apr 17, 2019

@marcelm

This comment has been minimized.

Copy link
Owner

commented Apr 17, 2019

This is now fixed in the development version. There haven’t been that many changes since the last release, so I was planning to work on one or two more issues before the next release. You can install the development version until then (or convince me to make a release anyway).

@ogandril

This comment has been minimized.

Copy link
Author

commented Apr 17, 2019

@marcelm

This comment has been minimized.

Copy link
Owner

commented Apr 20, 2019

Ok, Cutadapt 2.2 is now released!

@ogandril

This comment has been minimized.

Copy link
Author

commented May 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.