comorment / containers

CoMorMent-Containers
https://www.comorment.uio.no
GNU General Public License v3.0
21 stars 9 forks source link

Subscript out of bound #258

Open KirakiraZLY opened 2 months ago

KirakiraZLY commented 2 months ago

Hi,

Thanks very much for making this script of LDpred2. However, I got the following error, which I didn't see before. Do you have any idea about what was going on?

Error: Tested 1047164 < 1047164. Subscript out of bounds.

I believe this happened when it ran through this code:
ind.row <- rows_along(G)

Do I need to change the bound limit or reduce the size of my genotype file? And 1047164 < 1047164 this sentence makes no idea to me.

😊

github-actions[bot] commented 2 months ago

Hello @KirakiraZLY , thank you for submitting an issue!

KirakiraZLY commented 2 months ago

I first used the full script from your page, but I had some problems with the Loading LD reference and with running calculateLD.R. So I copied the part about calculating the LD matrix from Florian's page (The part on Correlation) and got the error above.

About calculateLD.R, I got the error saying --file-ld-blocks is not a defined optional argument or flag.

This is my configuration:

export fileOutLD=ld-chr-@.rds
export fileOutLDMap=ld-map.rds

Rscript ${software_dir}/calculateLD.R --geno-file-rds $fileGenoRDS \
 --dir-genetic-maps interpolated_from_hapmap \
 --sumstats $fileSumstats Predictor \
 --file-ld-blocks $fileOutLD \
 --file-ld-map $fileOutLDMap
espenhgn commented 2 months ago

Hi @KirakiraZLY, The calculateLD.R script found here is based on material from Florian, but not provided by him. Please refer to the documentation found here.