hemstrow / snpR

GNU General Public License v3.0
26 stars 7 forks source link

calculate_pairwise_LD doesn't produce $prox #25

Closed samasafish closed 2 years ago

samasafish commented 2 years ago

Hi,

The function "calculate_pairwise_LD()" completes with no warnings or errors but the $prox table is missing all summary data. Calculating LD worked a while back so maybe something has changed in recent versions. The $prox table also has the wrong column names which makes me think its not finalizing (See code example below). Any help would be appreciated!

Thanks,

Sam

elkRAD_HWE_snpR <- calc_pairwise_ld(elkRAD_HWE_snpR, par = 10, facets="chromosome")

LD <- get.snpR.stats(elkRAD_HWE_snpR, "chromosome", "LD") #contains LD$prox but is empty (dim=0)

colnames(elkRAD_HWE_snpR@pairwise.LD$prox)

[1] "s1_chromosome" "s1_position" "s1_ID" "s1_REF"
[5] "s1_ALT" "s1_QUAL" "s1FILTER" "s1.snp.id"
[9] "s2_chromosome" "s2_position" "s2_ID" "s2_REF"
[13] "s2_ALT" "s2_QUAL" "s2FILTER" "s2.snp.id"
[17] "proximity" "sample.facet" "sample.subfacet" "CLD"
[21] "S"


sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /mnt/DataDrive1/home/sam.pannoni/miniconda3/envs/pygdal/lib/libopenblasp-r0.3.17.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] snpR_1.1.2.0 foreach_1.5.1 data.table_1.14.2

loaded via a namespace (and not attached): [1] compiler_3.6.3 rprojroot_2.0.2 tools_3.6.3 yaml_2.2.1
[5] codetools_0.2-18 iterators_1.0.13 knitr_1.36 xfun_0.28

hemstrow commented 2 years ago

Sorry for the slow reply! I've done quite a few bug fixes and changes in the new version I pushed to master today (see the updated vignette). If you are still having the bug, could you provide a reproducible example?