This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Poly-G Poly-C issues and Adapter Trimming

I have been having issues with Poly-X primarily (G & C)

I know this is is a known issue with Poly-G with Nova seq and Next Seq, but I never hear anyone mentioning the Poly-C as well. I have 3 sets of samples, ie. similar sets of samples done by different labs via different sequencing analyzers, etc.

Here's my analysis- With Novaseq 6000 I hear about the Poly-G issue, so I deal with that. But then I'm also dealing with numerous Poly-C issues with these same reads. It appears the Poly-G is a slightly different issue than the Poly-C, as the Poly-C appears to occur during loss of read quality. But still, if trying to map the reads to a reference, these poly (c/g) have mapping issues.

I also have Element Aviti reads by two different labs, the issues are similar but different. I'm getting the Poly-G on the 3' end of reads, but not to the extent of the Novaseq reads. The Poly-C tails are also present, and appear in lower quality ends.

I initially was using BBduk for the Poly-G trimming, but it misses a lot. So I'm now adding the use of Cutadapt. I am thinking that BBduk works better on longer stretches of Poly-X. So I'm running BBduk first, then Cutadapt using as an adapter GGGGGGGGGGGGGGGGGGGGX. This seems to work well, then for Poly-C issues, replacing G with C.

With the Novaseq 6000 I'm also finding Poly-G at the 5' end of many reads. Using XGGGGGGGGGGGGGGGGGGGG for this, so only removing from the 5' end.

tails poly-c poly-g adapters

I'm going to give that a try, I'm hoping I can use that with a slightly older version of BBduk. With the BBduk I was using the most recent recommended settings that I had seen posted by Brian. I'm thinking it was k-31 with 2 mismatches. This seemed to get rid of a lot of the Poly-G, but with some minor spot checking there were still obvious Poly-g at the ends of the reads. With BBduk I had to assume they were removed. But with Cutadapt using adapterX, it would show if there were any additional preceding C or G present so if shown it I could repeat the trimming.

I'm not sure how to quantify on the fraction, but it's significant.

Even with using BBduk on the adapters I had issues. It was more obvious on my nextera Novaseq 6000 reads with the transverse adapters. Using BBduk with the recommended nextera adapters, with the recommended k-23 settings, it would remove a considerable amount of adapters, then with spot checking there were perfect matches at the ends of some of the reads. I had found that Fastp, cutadapt, trimgalore, BBduk adapters were also removing a signifant amount of biological reads. The Adapterremoval program either using the Illumina Universal or Nextera transverse adapter seemed to work adequate.

transverse adapters

What do you mean by this?

I had found that Fastp, cutadapt, trimgalore, BBduk adapters were also removing a signifant amount of biological reads

That really should not be happening, unless the read remaining after removal of the poly-G becomes so short that it fails the minlength setting. Can you post the complete bbduk command line that you had used for reference. One trick you could use is you can simply provide literal=GGGG on command line as the sequence to find and remove.

I have a feeling that there is something wrong with your data, if you are having so much trouble. Generally the sequence provider should have checked this (especially if a significant amount of reads contain this issue) and not released the data. It sounds like you have data from more than one provider?. If so, is your organism known to have difficult to sequence regions (repeats etc)? This is normal genomic sequence correct?

Sorry, meant Transposase sequence
R1 CTGTCTCTTATACACATCTCCGAGCCCACGAGAC R2 CTGTCTCTTATACACATCTGACGCTGCCGACGA

My test for biological removal from adapter removal. Map reads that map at 100% Match ID, then run adapter removal on those. So this didn't include reads that didn't match at 100% due to minor errors. These are reads that match at 100% for Naegleria Fowleri NF001, Plasmodium Ovale, Pseudomonas A. and Mycobacterium. I didn't take the time to find out which ones were hitting.

My BBduk V.39.08 for adapters was Trim-R, min length 10, k-23, mink-11, hamming distance 1. Using the adapters above. Just a quick peek I could see exact matches to the front of the adapters on both reads from 5bp to maybe 20bp on the ends. I run Adapterremoval with default settings and same adapters removed them, with no adapters showing on fastqc or Falco.

I had just found that I can do the Poly-G Poly-C with Cutadapt using GGGGGGGGGGGGGGGGGGGGX as an adapter with the "X" allowing only removal from the 3' end, or XGGGGGGGGGGGGGGGGGGGG allowing only from the 5' end so it's not trying to find any internal poly-g regions.

This is the cutadapt Poly-g output AFTER running with BBduk poly-G, showing now all the poly-g is gone. This is from Element Aviti.

Total read pairs processed:         36,080,173
  Read 1 with adapter:                  91,804 (0.3%)
  Read 2 with adapter:                 105,401 (0.3%)

== Read fate breakdown ==
Pairs that were too short:                   0 (0.0%)
Pairs written (passing filters):    36,080,173 (100.0%)

Total basepairs processed: 9,619,392,508 bp
  Read 1: 4,819,188,509 bp
  Read 2: 4,800,203,999 bp
Total written (filtered):  9,618,727,977 bp (100.0%)
  Read 1: 4,818,884,889 bp
  Read 2: 4,799,843,088 bp

=== First read: Adapter 1 ===

Sequence: GGGGGGGGGGGGGGGGGGGG; Type: non-internal 3'; Length: 20; Trimmed: 91804 times

Minimum overlap: 3
No. of allowed errors:
1-9 bp: 0; 10-19 bp: 1; 20 bp: 2

Bases preceding removed adapters:
  A: 37.7%
  C: 9.6%
  G: 0.0%
  T: 52.6%
  none/other: 0.0%

Overview of removed sequences
length  count   expect  max.err error counts
3   70797   563752.7    0   70797
4   16499   140938.2    0   16499
5   3543    35234.5 0   3543
6   532 8808.6  0   532
7   79  2202.2  0   79
8   14  550.5   0   14
9   2   137.6   0   2
10  201 34.4    1   3 198
11  77  8.6 1   1 76
12  31  2.2 1   2 29
13  15  0.5 1   0 15
14  7   0.1 1   0 7
15  2   0.0 1   0 2
16  1   0.0 1   0 1
17  1   0.0 1   0 1
18  1   0.0 1   1
20  2   0.0 2   0 0 2

Here is the cutadapt poly-C first run, showing there are still 12.1% that retains a C base after removal, so I'm running again.

Total read pairs processed:         36,080,173
  Read 1 with adapter:                  85,028 (0.2%)
  Read 2 with adapter:                  86,998 (0.2%)

== Read fate breakdown ==
Pairs that were too short:                  51 (0.0%)
Pairs written (passing filters):    36,080,122 (100.0%)

Total basepairs processed: 9,618,727,977 bp
  Read 1: 4,818,884,889 bp
  Read 2: 4,799,843,088 bp
Total written (filtered):  9,617,583,310 bp (100.0%)
  Read 1: 4,818,310,502 bp
  Read 2: 4,799,272,808 bp

=== First read: Adapter 1 ===

Sequence: CCCCCCCCCCCCCCCCCCCC; Type: non-internal 3'; Length: 20; Trimmed: 85028 times

Minimum overlap: 3
No. of allowed errors:
1-9 bp: 0; 10-19 bp: 1; 20 bp: 2

Bases preceding removed adapters:
  A: 22.6%
  C: 12.1%
  G: 22.9%
  T: 42.3%
  none/other: 0.0%

Overview of removed sequences
length  count   expect  max.err error counts
3   47620   563752.7    0   47620
4   12351   140938.2    0   12351
5   3353    35234.5 0   3353
6   1040    8808.6  0   1040
7   385 2202.2  0   385
8   210 550.5   0   210
9   192 137.6   0   192
10  1288    34.4    1   182 1106
11  1014    8.6 1   166 848
12  903 2.2 1   179 724
13  879 0.5 1   170 709
14  717 0.1 1   141 576
15  610 0.0 1   133 477
16  585 0.0 1   126 459
17  510 0.0 1   172 338
18  416 0.0 1   169 247
19  1104    0.0 1   487 617
20  11851   0.0 2   5225 3488 3138

I do realize that I may lose some information by removing all of the poly-G and poly-C from the ends.

I don't think I can use that tool, as I'm using the Usegalaxy.org platform, and unable to use it on my personal computer. I can use BBduk, but it's version is a bit older so I can't directly use the polyfilter.sh tool.

I'm using the Usegalaxy.org platform

Then consider doing this on a local computer. You are going to have a lot more control over the options/data that way and can properly diagnose issues easily.

I tried setting bbtools up on my computer, but couldn't figure how to set it up to run. I'm currently running a windows 10 computer.

If you’re on Windows, the easiest way to run BBTools is via WSL2 (Ubuntu [a flavor of Linux]). Install WSL following Microsoft’s guide: https://learn.microsoft.com/en-us/windows/wsl/install

This’ll allow you to access a Bash shell inside Linux. Once Ubuntu is installed, you can install BBTools.

Ok, I was completely wrong on this, well partially for sure. I went through my reference sequences that I'm working with and broke them into smaller pieces. All three of my primary sequences Nagleria Fowleri, Plasmodium Ovale, and Tuberculosis BG24 happen to ALL include long stretches of Poly-C and Poly-G. So yes, I was removing a lot of Poly-C/G but was also removing my target.

I'm sure it's likely that there are artefactual Poly-C and Poly-G as well. Since I'm trying to separate sequences that map to my references from human, I think initially I'm not going to worry about these as I will be able to retain these from direct mapping.

Question on the Poly-G Poly-C issues

I'm currently trimming the Poly-G and Poly-C from my reads. I'm using Cutadapt using a 156bp CCCCC....., trimming first from the 5' end, followed by the 3' end. From what it looks like, as the percentage of reads are nearly identical on the R1/R2 reads. I'm assuming that since the percentage of reads with the Poly-C are nearly identical, that they are artifacts??? My assumption is that since Read2 is the reverse complement of Read1, that Read2 ends would be Poly-G if it was biological. I also get similar results by trimming Poly-G tails. Am I reading this correctly??

Poly-C Trimmed from the 5' to 3' end Total read pairs processed: 7,186,087 Read 1 with adapter: 2,604,798 (36.2%) Read 2 with adapter: 2,529,032 (35.2%)

Poly-C Trimmed from the 3' to 5' end Total read pairs processed: 7,185,659 Read 1 with adapter: 2,303,990 (32.1%) Read 2 with adapter: 2,300,002 (32.0%)

My assumption is that since Read2 is the reverse complement of Read1, that Read2 ends would be Poly-G if it was biological. I also get similar results by trimming Poly-G tails. Am I reading this correctly??

Sort of and/or yes. Read 2 is reading the second strand so that sequence is reverse complement with respect to read 1. Unless you have a 300 bp insert and you sequence 300 cycles (exactly the same length as the insert), the two reads (R1/R2) will not be perfect reverse complements of each other. If the reads are pure C's or G's then they would be reverse complements of each other irrespective of the insert length.

Please don't add these "observations" as new answers. This thread has already become long and convoluted. New readers are going to get lost trying to make sense of the flow.

I keep running into issues with these reads, which is causing mapping or assembly issues. So I'm trying different methods to clean adapters and Poly G/C issues. Since I'm giving Cutadapt another try, as the other trimmers were leaving adapters in my trimmed reads. So I'm separating the reads that had adapters 1. at the 3' end, 2. at the 5' end, and 3. where no adapters were found.

I had forgotten to mention, these specific reads (Element Aviti) were ones where no adapters were found nor trimmed. If I trim Poly-G or Poly-C tails from either the 3' or 5' ends, and if nearly the same percentage was trimmed from each read, my thought is they are artifact. Do you agree???

On my reads where adapters were trimmed from either the 3' or 5' ends, the end where an adapter was trimmed should be biologic, and the end where no adapter was found MAY have an artefactual Poly-G or Poly-C??

The adapter issues I found was that TrimGalore was leaving adapters. Mostly I read that I should trim adapters at the 3' end, which TrimGalore probably did fine. But after a manual search for adapters and their reverse complement, I find there are reverse complement adapters at the 5' end of reads. From what I have read to trim these reverse complement adapters is to use the reverse complement of Read1 adapter at the 5' end of read 2. But what I was finding were the reverse complement of read1 adapter at the 5' end of read 2, but I was also finding the reverse complement of Read 2 at the 5' end of Read 1. I had not seen this documented anywhere. I also found that neither FASTQC or FALCO was not identifying any of the reverse complemented adapters, so the adapters looked clean, which they were not.

Due to the way libraries are made, in Illumina sequencing there should be no adapter sequence on 5'-end of reads. Way sequencing primer works, it always reads into the first base of the insert for both ends. So any adapter sequence should only be present on 3' end of reads. (see illustration in Figure 1 here: https://knowledge.illumina.com/library-preparation/general/library-preparation-general-reference_material-list/000003874 )

I keep running into issues with these reads

Sadly since we can't access your data, our ability to help you has reached a dead end. As I said before, you really should consult with an expert, who can directly access your data and help address the questions you are encountering. It is one thing to describe (e.g. in this thread) things you are "observing" and quite another to have actual access to the entire dataset first-hand.

It was my understanding that with shotgun sequencing that sequencing doesn't necessarily start at either end so it can start from 3' to 5', which would end up as a reverse complement adapter in the reads. I'm only using full length adapter sequences on my trimming to prevent issues of using the first 13bp.

As confirmation, since I know at least several of the strains that match at 100% ID, after a trimming operation I map the reads to only allow 1bp error (not including N's). Since I get additional reads that Map, it's obviously taking away adapters or artifacts.

It was my understanding that with shotgun sequencing doesn't necessarily start at either end so it can start from 3' to 5

Either the watson or crick strand can be on top in shotgun libraries but sequence is always reported 5' --> 3' direction.

Watson: 5'–ATGCCGTA–3'
Crick:  3'–TACGGCAT–5'

If crick strand is sequenced then the sequence is reported in the 5' --> 3' direction which is reverse complement of watson strand.

5'–TACGGCAT–3'

I suspect that if you have any shotgun reads to test with, if you setup Cutadapt using the reverse complement of your adapters as a 5' adapter with standard settings, you will find the same adapters I'm talking about.

2 answers

I think I have finalized how to resolve the Poly-G issue which is ALSO a Poly-C issue. Would be nice if the sequencing centers (or Illumina) would clean this up first, but I doubt that will ever happen. I'm doing this through the UseGalaxy Platform, so standalone programs would be somewhat different.

It's really mostly talked about with the Novaseq reads (both 5' & 3' ends), but also recognized on Element Aviti as well but not as severe (only noted on 3' end).

Adapter Trimming does get rid of a good portion of the Poly-G Poly-C tails at least the ones AFTER the adapters. Low quality reads on the Novaseq have a high percentage of Poly-G sections with other mixed bases. The Element Aviti the low quality bases tend to be Poly-C with other mixed bases. I highly recommend trimming to Q20 for both sequencers, which takes care of a good portion of the Poly-G Poly-C errors.

AFTER Adapter Trimming From what I have noticed 1. Long Poly-G segments 2. Long Poly-C segments, read 2 is obviously worse. BBduk using K-25 Mink-2 using GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG Or ...CCC... as an adapter. I use setting to trim to 1bp instead of failing the read in order to keep the single end that's mostly just fine and high quality, which I can separate after Quality/Length trimming.

Some of my Novaseq reads after adapter trimming still had nearly 500,000 long poly-G sections that were removed by BBduk. One of my data sets from Element Aviti had 75,000 Poly-C

AFTER BBduk Poly-G Poly-C trimming, and quality trimming to Q20 again.

Element Aviti Using Cutadapt and using GGGGGGGGGGGGGGGGGGGGX or CCCCCCCCCCCCCCCCCCCCX as a 3' end adapter which will allow 1 error. I run them both separately, this seems to clean any of the Poly-G Poly-C off the ends that BBduk missed.

Novaseq Same as the Element Aviti, but also include Poly-G removal on the front 5' end using XGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG as a 5' front adapter. Followed again by Quality/Length trimming.

Note: I initially was also doing the 5' end trimming for Poly-G on the Element Aviti reads, which were present, but since I haven't seen any posts on these for the 5' end of the Element Aviti I decided to skip this.

Hopefully after all this manipulation the final files contains reads that are still in sync across both R1/R2 files.

Would be nice if the sequencing centers (or Illumina) would clean this up first, but I doubt that will ever happen.

Sequencing centers generally don't (or more specifically should not) release any data that has issues with it. The continuous downward trend for cutting costs (to give the consumer a better rate) may result in less diligence about the quality of the final data. It is possible that your data came from such a provider. With the billions of reads now possible from each sequencing run, losing a few million here and there should not make a big difference as long as the losses are uniform across entire set of samples.

Quality of samples, library prep method and quality of final libraries can all affect the sequencing, so it is possible that the issue may well be upstream of the actual sequencing.

Scanning and trimming programs (bbduk,cutadapt, fastp etc) have been around for a long while and are able to handle these sorts of issues with the right combination of command parameters. If you are happy with the end result, then that is great but much of this was likely because you were confined to working on Galaxy, where you have much less flexibility about choosing program options.

I finally made some progress with this, it was problematic as you had mentioned. I actually found that I was not using the correct settings for Poly-G removal with BBduk. Now using settings K-10 Mink-5 Hamming-1, and this definitely cleans the reads up tremendously. After the Poly G/C removal and then Trimmomatic with just trimming the ends (Cropping at 150, clipping Base#1, Leading Q15, Trailing 20, Min 35) I have about 4x more single reads.

You had asked the amount of Poly-C Poly-G were present. With the BBduk settings above the Novaseq 6000 had 5-6% Poly-C and 6-8% Poly-G, the Element Avita had Poly-C 4-10% and Poly-G 4-10%.

It seems to me that the best approach is to assume any set of reads May contain the Poly-G Poly-G tails. I also found a significant amount of Poly-G/C on my Miseq 16s samples.

Change of thought on the Poly-G issues From what I've seen, there are approximately three of the basic issues (I'm only working on Novaseq 600 and Element Aviti sample sets)

On the Novaseq Entire read lengh is GGGGGGGGGGGGGGGGGGGGGGGGGG the other read is generally OK (single read now) Tail with Poly-G CCATCCGCCGCCGGCTCAGGCCGGGAGGGGGGGGGGGGGGGGGGGG Front with Poly-G GGGGGGGGGGGGGGGGGGGGCCATCCGCCGCCGGCTCAGGCCGGGA

Element Aviti - Similar but to a smaller degree. Only a few full length Poly-G Potential Poly-G at 5' or 3' ends

At first I was just removing the Full Length Poly-G, and removing the 3' Poly-G. But then looking at some of what I was removing, some of the species had long Poly-G tails, notably Pseudomonas and potentially others. This seemed problematic to just automatically chop the Poly-G tails off.

Then is the issue of Poly-G at the 5' ends of the reads, is this artifact?? I did find some references that say there should not be Poly-G at the 5' ends of the reads, and it wouldn't be removing potential sequence at the 3' ends.

For 150bp reads, I used Cutadapt using a custom 5' adapter that was longer than my read length with an overlap of 1 and error 0.05, so this would remove any full length Poly-G as well as any Poly-G just at the 5' end. There were generally quite a high number of reads that were trimmed, but looking at what was removed from Read1 and Read2, is that the percentages were nearly exact. So if 20% of Read1 had Poly-G removed from the 5' end, approximately 20% of Read2 had Poly-G removed from the 5' end as well. Does this sound like artifact???

Log in to answer this question.