marcelm / marcelm/cutadapt

Some polyGs at the end of the sequences are not removed

Open
#883 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
587
Forks
144
Avg merge
2h 37m
Merged PRs (30d)
1

Description

Hi Marcel,

I'm using cutadapt v5.1 and python v3.12.11 and I used pip for the installation.

This is the code I have in my pipeline:
cutadapt -m {config[minlength]} --nextseq-trim={params.nextseqTrim} --max-n {config[maxn]} -a {config[fwd_adapter]} -A {config[rev_adapter]} -j {config[metqc_cpus]} -o {output.r1} -p {output.r2}
{input.r1} {input.r2}

`Raw input forward read example:
@VL00845:28:222HWCNNX:1:1415:77502:26573 1:N:0:AACCGTTGCT+GACTCTTACT
GTTTTATAAGAGTCTTGGATTTGAAGTAATTATGCAGTCTTATAATGAAAAAGCAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGC
+
IIIIIIIIIIIIII9IIIIIIIIIIIIIIII9IIIIIIIII9IIIIIIIIIIIIIIIIIII99IIIII9II99I99IIIIIIIIIIII9IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII9II99I9IIIIII9IIIIIII99IIIII9
@VL00845:28:222HWCNNX:1:1415:77982:26573 1:N:0:AACCGTTGCT+GACTCTTACT

`

`Cutadapt produced forward read example:

@VL00845:28:222HWCNNX:1:1415:77502:26573 1:N:0:AACCGTTGCT+GACTCTTACT
GTTTTATAAGAGTCTTGGATTTGAAGTAATTATGCAGTCTTATAATGAAAAAGCAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGC
+
IIIIIIIIIIIIII9IIIIIIIIIIIIIIII9IIIIIIIII9IIIIIIIIIIIIIIIIIII99IIIII9II99I99IIIIIIIIIIII9IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII9II99I9IIIIII9IIIIIII99IIIII9
@VL00845:28:222HWCNNX:1:1415:77982:26573 1:N:0:AACCGTTGCT+GACTCTTACT

`

`Expected Cutadapt produced forward read example:

@VL00845:28:222HWCNNX:1:1415:77502:26573 1:N:0:AACCGTTGCT+GACTCTTACT
GTTTTATAAGAGTCTTGGATTTGAAGTAATTATGCAGTCTTATAATGAAAAAGCA
`

By checking more reads, it seems like cutadapt doesn't remove polyGs when they appear in the beginning and in the middle (stated in the documentation as well) or when there are some ATCG nucleotides present after polyGs at the end of the sequences. I was wondering if this is expected and what would be the best way of dealing with these polyG sequences that mess up the GC content figures of the quality control tools.

I was also wondering if it's ok to do adapter and quality trimming in one command since adapter trimming is done after quality trimming and before length trimming. Does this affect adapter trimming alone or quality trimming alone? Should I separate them and do them in two steps?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported behavior with cutadapt v5.1 using the provided paired-read command, especially --nextseq-trim and the -a/-A adapter options. Read the trimming-order documentation and inspect the handling of terminal, internal, and interrupted poly-G runs; done means determining whether the output is expected and identifying the required documentation or behavior change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.