m-orton / Evolutionary-Rates-Analysis-Pipeline

The purpose of this repository is to develop software pipelines in R that can perform large scale phylogenetics comparisons of various taxa found on the Barcode of Life Database (BOLD) API.
GNU General Public License v3.0
7 stars 1 forks source link

Decision needed: selecting the final trimming length #28

Closed sadamowi closed 7 years ago

sadamowi commented 7 years ago

Hi Matt,

I am running a couple of phyla at 650 bp, 620 bp, and 590 bp. I opened this issue so that I don't drop the ball on reporting back on this issue.

Cheers, Sally

sadamowi commented 7 years ago

Hi Matt and Jacqueline,

I have tried Annelida and Cnidaria at 590 bp, 620 bp, and 650 bp. I found that the impacts of trimming length were modest. While p-values were different, the overall conclusions that would be drawn were the same. (Also, p-values have to be interpreted with caution for small sample sizes anyhow.) The impacts upon the average and median relative distances were also modest.

Given the modest impacts, I think our original decision of a 620 bp length was reasonable. This trims ~20 bp off each end (in relation to the total region amplified between the primers). In my experience editing chromatograms, frequently approximately that length is only represented by one of two trace files, even with bidirectional sequencing. Also, Taryn Athey's MSc thesis shows concentrations of low frequency variants at the ends (which are more likely errors), further justifying the use of some trimming.

I do think that some trimming (rather than using the 658 bp) is reasonable. I have found that, in contrast to trimming length, alignment errors can make a difference. Sometimes, when the signal becomes weak near the end of a trace file, an EXTRA nucleotide is erroneously called. When this happens in the forward chromatogram, there may not be enough length left in the contig sequence for a stop codon to crop up (which would block a sequence from getting a BIN assignment). So, in order to use a stiff gap opening penalty (resulting in a better alignment Cnidaria, at least - i.e. maintaining correct reading frame and amino acid translation), we would want to trim off such cases.

So, I suggest 620 bp. Any comments are welcome!

If the cloud-based runs go well and are very fast, we could consider re-running the analyses at an alternative length for verification that the results were minimal upon the results, using a much larger dataset (e.g. large phylum).

Best wishes, Sally

sadamowi commented 7 years ago

I will close this issue, as we have moved the topic to the thread discussing the final filtering and trimming settings.

Best wishes, Sally