precimed / gsa-mixer

GNU General Public License v3.0
8 stars 2 forks source link

Clarify --ld-file and --loadlib-file usage in README.md #10

Closed ofrei closed 1 month ago

ofrei commented 1 month ago

Currently getting started example uses --ld-file, but real-world example (scripts/GSA_MIXER.job) uses --loadlib-file. Also it seems that how to generate --loadlib-file is not well described. The --loadlib-file argument is there for improved performace, and it's fine to use --ld-file, but this needs to be documented.

ofrei commented 1 month ago

Actually this was already described, see below:

After downloading reference file we advice using --savelib-file option as shown below to generate .bin files, with compressed representation of the reference. After that loading reference is possible with --loadlib-file, providing considerable speedup over passing --ld-file argument. In the following example the reference is saved to bin/ folder - you need to change your own location.

The reference needs to be saved in two formats. The following example produces .bin files for plsa analysis,yielding its own .bin file for each chromosome. The --savelib-file argument must include @ symbol which will be replaced with an actual chromosome label.

${MIXER_PY} plsa \
      --bim-file ${REFERENCE_FOLDER}/hrc_EUR_qc/hrc_chr@_EUR_qc.bim \
      --ld-file ${REFERENCE_FOLDER}/hrc_EUR_qc/hrc_chr@_EUR_qc.run1.ld \
      --use-complete-tag-indices --exclude-ranges [] \
      --savelib-file bin/1000G.EUR.QC.@.bin \
      --out bin/1000G.EUR.QC.@

The following example produces .bin file for fit1,fit2,test1,test2 steps (cross-trait MiXeR; not relevant for GSA-MiXeR), yielding a single .bin file combined across all chromosomes. The --savelib-file argument does not need to include @ symbol (if it does, the @ symbol will stay unchanged, and simply be part of the output file name):

${MIXER_PY} fit1 \
      --bim-file ${REFERENCE_FOLDER}/hrc_EUR_qc/hrc_chr@_EUR_qc.bim \
      --ld-file ${REFERENCE_FOLDER}/hrc_EUR_qc/hrc_chr@_EUR_qc.run1.ld \
      --use-complete-tag-indices --exclude-ranges [] \
      --savelib-file bin/1000G.EUR.QC.@.bin \
      --out bin/1000G.EUR.QC.@