readme.gibbsf90new
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
readme.gibbsf90new [2019/09/24 17:55] – andres | readme.gibbsf90new [2022/06/29 19:29] (current) – removed dani | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== GIBBSF90TEST ====== | ||
- | |||
- | UNDER CONSTRUCTION | ||
- | |||
- | =====Summary===== | ||
- | This is a combined program of gibbs2f90, gibbs3f90, thrgibbs1f90, | ||
- | \\ | ||
- | GIBBS1F90 implements Gibbs sampler for mixed threshold-linear models involving multiple categorical and linear variables. Thresholds and variances can be estimated or assumed. Another version of thrgibbs1f90b for binary responses is available. | ||
- | \\ | ||
- | See PREGSF90 with genotypes (SNP) for options. | ||
- | |||
- | =====Run-time options===== | ||
- | |||
- | ====Keyboard input==== | ||
- | When you run the program, the program will ask you several questions. | ||
- | You have to type-in (input) the answer to each question. | ||
- | The first one is the name of parameter file. | ||
- | |||
- | < | ||
- | name of parameter file? | ||
- | </ | ||
- | |||
- | Then, the program asks you the number of total samples (rounds) and the number of // | ||
- | The program runs through up to the rounds specified here and the first //burn-in// samples will not be saved. | ||
- | < | ||
- | number of samples and length of burn-in | ||
- | </ | ||
- | Here, you put two integer numbers separated by spaces (or Enter key). | ||
- | For example, if you need 1000 samples with no burn-in, the correct input is '' | ||
- | |||
- | Finally, the program asks you the interval to save samples. | ||
- | It is also known as // | ||
- | < | ||
- | Give n to store every n-th sample? (1 means store all samples) | ||
- | </ | ||
- | For example, if you put '' | ||
- | The other samples will be discarded. | ||
- | To save all samples, please input '' | ||
- | |||
- | ====Command line options==== | ||
- | |||
- | Instead of typing the above parameters, you can put them in the command line in shell. | ||
- | Here is the general form of command line. | ||
- | < | ||
- | gibbsf90test parfile --samples i --burnin j --interval k | ||
- | </ | ||
- | Each item should be replaced with your favorite value. | ||
- | |||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | For example, when you use `renf90.par` as parameter file, sample 10000 times with no burn-in, and save all samples, the following command works. | ||
- | |||
- | < | ||
- | gibbsf90test renf90.par --samples 10000 --burnin 0 --interval 1 | ||
- | </ | ||
- | |||
- | Tips: you can use '' | ||
- | |||
- | =====Parameters===== | ||
- | The parameter file is the same as for BLUPF90 except for options. | ||
- | |||
- | =====Options in parameter file===== | ||
- | < | ||
- | OPTION cat 0 0 2 5 | ||
- | </ | ||
- | " | ||
- | " | ||
- | < | ||
- | OPTION fixed_var all | ||
- | </ | ||
- | Store all samples for solutions in " | ||
- | < | ||
- | OPTION fixed_var all 1 2 3 | ||
- | </ | ||
- | Store all samples for solutions in " | ||
- | < | ||
- | OPTION fixed_var mean | ||
- | </ | ||
- | Only posterior means and SD for solutions are calculated for all effects in " | ||
- | < | ||
- | OPTION fixed_var mean 1 2 3 | ||
- | </ | ||
- | Only posterior means and SD for solutions are calculated for effects 1, 2, and 3 in " | ||
- | < | ||
- | OPTION solution all | ||
- | </ | ||
- | Caution: this option will create a huge output solution file when you run many rounds and/or use a large model. | ||
- | Store all samples for solutions in " | ||
- | < | ||
- | OPTION solution all 1 2 3 | ||
- | </ | ||
- | Caution: this option will create a huge output solution file when you run many rounds and/or use a large model. | ||
- | Store all samples for solutions in " | ||
- | < | ||
- | OPTION solution mean | ||
- | </ | ||
- | Only posterior means and SD for solutions are calculated for all effects in " | ||
- | < | ||
- | OPTION solution mean 1 2 3 | ||
- | </ | ||
- | Only posterior means and SD for solutions are calculated for effects 1, 2, and 3 in " | ||
- | < | ||
- | OPTION save_halfway_samples 5000 | ||
- | </ | ||
- | The program saves every " | ||
- | < | ||
- | OPTION cont 10000 | ||
- | </ | ||
- | " | ||
- | When using " | ||
- | < | ||
- | OPTION prior 5 2 -1 5 | ||
- | </ | ||
- | The (co)variance | ||
- | Degree of belief for all random effects should be specified using the following structure: | ||
- | OPTION prior eff1 db1 eff2 db2 ... effn dbn -1 dbres\\ | ||
- | effx correspond to the effect number and dbx to the degree of belief for this random effect, -1 corresponds to the degree of belief of the residual variance.\\ | ||
- | In this example 2 is the degree of belief for the 5th effect, and 5 is the degree of belief for the residual.\\ | ||
- | < | ||
- | OPTION seed 123 -432 | ||
- | </ | ||
- | Two seeds for a random number generator can be specified. | ||
- | < | ||
- | OPTION thresholds 0.0 1.0 2.0 | ||
- | </ | ||
- | Set the fixed thresholds. No need to set 0 for binary traits. | ||
- | < | ||
- | OPTION residual 1 | ||
- | </ | ||
- | Set the residual variance = 1 for categorical traits. For binary traits, the residual variance is automatically set to 1, so no need to use this option. | ||
- | < | ||
- | OPTION pos_def x.x | ||
- | </ | ||
- | Specify checking pos-def for fixed effects where x.x is a tolerance (default=1d-08). | ||
- | < | ||
- | OPTION censored 1 0 | ||
- | </ | ||
- | Negative values for the categorical trait in the data set indicate censored records. "1 0" determines that the first categorical trait is censored and the second uncensored. | ||
- | < | ||
- | OPTION SNP_file snp | ||
- | </ | ||
- | Specify the SNP file name to use genotype data. | ||
- | < | ||
- | OPTION external_halfway_script name n | ||
- | </ | ||
- | program gibbstest will stop every //n// iterations, write samples of variances, unknowns and thresholds, wait for external | ||
- | process ''' | ||
- | This is useful to compute diagnostics from samples without storing them or modifying the program. | ||
- | |||
- | |||
- | |||
- | |||
- | ====Save intermediate results for "cold start" | ||
- | |||
- | OPTION save_halfway_samples n | ||
- | |||
- | This option can help the 'cold start' (to continue the sampling when the program accidentally stops before completing the run). An integer value //n// is needed. In every //n// rounds, the program saves intermediate samples to 2 files ('' | ||
- | |||
- | To restart, add '' | ||
- | |||
- | === Tips === | ||
- | * Small //n// will make the program slow because of frequent file writing. The //n// should be a multiple of the interval (the 3rd number you will input in the beginning of the program). | ||
- | * If the program stops during burn-in, the restart will fail because '' | ||
- | * The cold start may add tiny numerical errors to the samples. Samples from the cold start wouldn' | ||
- | * If, unfortunately, | ||
- | |||
- | === Example === | ||
- | Put the following option in your parameter file for the first time when you run the program. | ||
- | |||
- | OPTION save_halfway_samples 100 | ||
- | |||
- | Run '' | ||
- | |||
- | '**** saving halfway samples in every | ||
- | |||
- | In this example, we assume the number of total samples is 3000, the burn-in is 0, and the interval is 10. | ||
- | |||
- | | ||
- | 3000 0 | ||
- | Give n to store every n-th sample? (1 means store all samples) | ||
- | 10 | ||
- | |||
- | Make sure the intermediate results are saved to files. | ||
- | |||
- | 100 rounds | ||
- | G | ||
- | 2758. | ||
- | 1900. | ||
- | 2019. | ||
- | G | ||
- | 225.5 -91.35 | ||
- | | ||
- | | ||
- | R | ||
- | 1755. | ||
- | 868.7 | ||
- | 817.0 | ||
- | * Last seeds = 1877469549 | ||
- | * Number of samples kept = 100 | ||
- | solutions stored in binary file: " | ||
- | solutions stored in file: " | ||
- | |||
- | Stop the program. In this case, program stops in the round 880. | ||
- | |||
- | | ||
- | forrtl: error (69): process interrupted (SIGINT) | ||
- | Image PC Routine | ||
- | thrgibbs1f90 | ||
- | thrgibbs1f90 | ||
- | |||
- | Make sure there are the following 5 files. | ||
- | |||
- | binary_final_solutions | ||
- | |||
- | Browse the file '' | ||
- | |||
- | Saved on 2017-03-10 10:53:22 | ||
- | | ||
- | State in the current run: | ||
- | last round = 800 | ||
- | sampled in this run | ||
- | total number of samples = 3000 | ||
- | number of burn-in | ||
- | interval | ||
- | | ||
- | Suggestion for input in the next run: | ||
- | total number of samples = 2200 | ||
- | number of burn-in | ||
- | interval | ||
- | | ||
- | When you restart the program, do not forget to put the following option | ||
- | in your parameter file. | ||
- | | ||
- | |||
- | Put the option '' | ||
- | |||
- | OPTION cont 1 | ||
- | |||
- | Run '' | ||
- | |||
- | '*** continuous sampling selected *** previous # samples = 1 | ||
- | |||
- | **NOTE: Although the message may say the previous number of sample is 1, you can safely ignore it. The program runs with the cold start mode and it works correctly.** | ||
- | |||
- | Input the three numbers that are shown in '' | ||
- | |||
- | | ||
- | 2200 0 | ||
- | Give n to store every n-th sample? (1 means store all samples) | ||
- | 10 | ||
- | |||
- | The program will start from the round 801 as expected. | ||
- | |||
- | | ||
- | G | ||
- | | ||
- | | ||
- | | ||
- | G | ||
- | | ||
- | | ||
- | | ||
- | R | ||
- | | ||
- | | ||
- | | ||
- | |||
- | You can interrupt the program again. The results will be basically the same to ones from the non-stop analysis. | ||
readme.gibbsf90new.1569347735.txt.gz · Last modified: 2024/03/25 18:22 (external edit)