simonhmartin / genomics_general

General tools for genomic analyses.
343 stars 93 forks source link

Error in jackknife procedure #76

Closed DuttaAnik closed 2 years ago

DuttaAnik commented 2 years ago

Hi Simon,

I am running the jackknife.r as instructed in one of your tutorials from [http://evomics.org/learning/population-and-speciation-genomics/2018-population-and-speciation-genomics/abba-baba-statistics/].

I ran it like the following:

block_indices <- get.block.indices(block_size=5e6,
                                   positions=freq_table$position,
                                   chromosomes=freq_table$scaffold)

But when I ran the following code, I get an error message:

D_sd <- get.jackknife.sd(block_indices=blocks,
                         FUN=D.stat,
                         freq_table[,P1], freq_table[,P2], freq_table[,P3])
Error in get.jackknife.sd(block_indices = blocks, FUN = D.stat, freq_table[,  : 
  could not find function "get.jackknife.sd"

I changed it to get_jackknife_sd but still, the error message persists.

Can you please tell me what is the problem here is?

Also, I obtain a negative value of D-statistics initially (-0.27). Is this normal? I am using 9 populations of the same species from 3 geographic locations. At the moment, I am using one of the populations as an outgroup here as it is monophyletic from the phylogenetic analysis. Do you think it makes sense to run the analysis like this?

Regards Anik

simonhmartin commented 2 years ago

Hi Anik, That tutorial is out of date and no longer works with my scripts. Please follow the one here: https://github.com/simonhmartin/tutorials Simon

DuttaAnik commented 2 years ago

Oh ok. Thanks, Simon.