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

Question - Are "zero" differences in relative distances reflected? #22

Closed sadamowi closed 7 years ago

sadamowi commented 7 years ago

Hi Matt,

I am wondering if the current pipeline is biasing the results a little bit towards "failures". I notice there is code for designating "successes" (defined as a directional result). Then, "failures" seem to be not successes.

Line 1261:

Also making a vector for pairings that were not successes

failureOverall <- dfPairingResultsL1$inGroupPairing[-successOverall]

What about cases if there is absolutely no difference in the relative outgroup distance? I suggest those cases should be omitted priot to statistical testing rather than counted as failures. Are those accounted for somewhere? Perhaps that is addressed elsewhere, and I just overlooked that.

Thanks very much for checking.

Cheers, Sally

m-orton commented 7 years ago

Hi Sally, I do have a small component of code that eliminates pairings with relative outgroup distance of 1 (no difference in outgroup distance) at line 1033 which I posted below. Is this what you meant?

Find pairings that where each lineage is equal in distance to the outgroup and remove these

equalOutGroupDistCheck <- foreach(i=1:nrow(dfPairingResultsL1)) %do% (dfPairingResultsL1$outGroupDistance[i] - dfPairingResultsL2$outGroupDistance[i]) equalOutGroupDistCheck <- which(equalOutGroupDistCheck == 0)

If there is at least one pairing with equal outgroup distance from both lineages

if(length(equalOutGroupDistCheck)>0){

subsetting Lineage 1 by this outgroup check

dfPairingResultsL1 <- dfPairingResultsL1[-equalOutGroupDistCheck,]

Now subsetting Lineage 2 by this outgroup check

dfPairingResultsL2 <- dfPairingResultsL2[-equalOutGroupDistCheck,] }

sadamowi commented 7 years ago

Thank you for explaining this part. I missed that. Issue closed.