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

--action=lowercase results in 'LinkedMatch' object has no attribute 'read' #430

Closed
Citteny opened this issue Dec 22, 2019 · 2 comments
Closed

Comments

@Citteny
Copy link

@Citteny Citteny commented Dec 22, 2019

Hi!
First i would like to thank you for this amazing tool!

I'm using linked adapters, and encountered a problem using the lowercase option.
I tried to clone the current repository and find the problem on my own, but did not succeed.

i'm using cutadapt 2.7 (pip installation), Python 3.6.0
same happens on the cloned repository cutadapt 2.8.dev1+g08de8a5 with Python 3.7.4

The command:
cutadapt -a "XNNNCAATAGCATGCCTTGCCGATTTGTCATC...AGATGGGGGGAAACAAANNNNX" --action=lowercase merged_fq.fastq

Content of merged_fq.fastq:

@A00197:84:HHGW7DMXX:1:1102:28501:3505 1:N:0:TTACCGAC+CCTATCCT
ACACAATAGCATGCCTTGCCGATTTGTCATCTTTTCCAGTTCTTTAGTATCATGATTTATAGCATCCATATGTTCTTTTTCCATATTTTTCCAGCGCTCCATACTCTTCTGAAGCTCCTTAATTCCAGCTTCTGTTTTATCAATGGAATTGTCCAAATCTAAGATGGGGGGAAACAAAATTG
+
FFFFFFFFFFFFFFFFFFFFF:,:FFFFFFFJJJJJJJJJJJJJJJJJJJJJJJJJJJJHJJJJJJJJJJJJHJJJJJJJJJJJJJJJJJJJJJJJJJJJJ@JJJJHJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Traceback:

This is cutadapt 2.7 with Python 3.6.0
Command line parameters: -a XNNNCAATAGCATGCCTTGCCGATTTGTCATC...AGATGGGGGGAAACAAANNNNX --action=lowercase merged_fq.fastq
Processing reads on 1 core in single-end mode ...
Traceback (most recent call last):
  File "/usr/.venvs/lsl/bin/cutadapt", line 8, in <module>
    sys.exit(main())
  File "usr/.venvs/lsl/lib/python3.6/site-packages/cutadapt/__main__.py", line 825, in main
    stats = runner.run()
  File "/usr/.venvs/lsl/lib/python3.6/site-packages/cutadapt/pipeline.py", line 758, in run
    (n, total1_bp, total2_bp) = self._pipeline.process_reads(progress=self._progress)
  File "/usr/.venvs/lsl/lib/python3.6/site-packages/cutadapt/pipeline.py", line 264, in process_reads
    read = modifier(read, matches)
  File "/usr/.venvs/lsl/lib/python3.6/site-packages/cutadapt/modifiers.py", line 165, in __call__
    trimmed_read, matches = self.match_and_trim(read)
  File "/usr/.venvs/lsl/lib/python3.6/site-packages/cutadapt/modifiers.py", line 206, in match_and_trim
    trimmed_read = self.lowercased_read(trimmed_read, matches)
  File "/usr.venvs/lsl/lib/python3.6/site-packages/cutadapt/modifiers.py", line 153, in lowercased_read
    start, stop = AdapterCutter.remainder(matches)
  File "/usr/.venvs/lsl/lib/python3.6/site-packages/cutadapt/modifiers.py", line 128, in remainder
    read = matches[0].read
AttributeError: 'LinkedMatch' object has no attribute 'read'

Changed my path to "usr" for simplification.
Trimming is working fine without "lowercase" option.

Side note:
My goal is to get the matched adapter sequence - so I could modify the read name accordingly.
I tried to use the --info-file option which also raises an AttributeError - i will open a new issue for it.

Thank you

@marcelm

This comment has been minimized.

Copy link
Owner

@marcelm marcelm commented Dec 23, 2019

Oh, this looks like a bug – thanks for finding it. I may have some time to look into this before the end of the year.

@marcelm marcelm closed this in 720a0cb Dec 28, 2019
@marcelm

This comment has been minimized.

Copy link
Owner

@marcelm marcelm commented Dec 28, 2019

This is now fixed in the development version.

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.