Sib-pair is largely written in standard Fortran 95 (as usual, there are a few system specific routines for file handling, time and date etc).
The Sib-pair source code is distributed as a single file, with C-preprocesser macros to deal with platform specific code. The "source lines" in the tables below are the lines within that single file.
The listings below are automatically generated (by an awk script), so check the source for additional informative comments that may have been skipped.
Listing is first by position in the source code file, then alphabetically. The organization of the source is modules, main, I/O, statistical library routines, association and linkage.
Name of routine: | compiler_version |
---|---|
Source lines: | 50 - 53 |
Type | function |
Call | compiler_version() |
Module | extras |
Notes | Sib-pair is a computer program for genetic analysis Author: David L Duffy Compiler, version, linked in external libraries etc recorded here: 1) GUI additions 1a) Hooks to call JAPI (library calling AWT) Java Application Programming Interface 1.0.6 (http://www.japi.de/) Main author: Merten Joost japi is an open source free software GUI toolkit, which makes it easy to develop platform independent applications. Written in JAVA and C, provides the JAVA AWT Toolkit to non object-oriented languages incl Fortran 77 and Fortran 90 onwards. Development stopped in 2003 1b) Hooks to call PILIB (library calling GTK+) Platform Independent Library for use with Fortran 9x PILIB 0.5 (http://www.sourceforge.net/projects/pilib) 1c) Interface to EGGX/ProCALL graphics library X Library for use with C or Fortran 9x Main author: Chisato Yamauchi 2) Interface to ZLib 3) Unix pipes |
Name of routine: | compiler_options |
---|---|
Source lines: | 54 - 57 |
Type | function |
Call | compiler_options() |
Module | extras |
Notes | Sib-pair is a computer program for genetic analysis Author: David L Duffy Compiler, version, linked in external libraries etc recorded here: 1) GUI additions 1a) Hooks to call JAPI (library calling AWT) Java Application Programming Interface 1.0.6 (http://www.japi.de/) Main author: Merten Joost japi is an open source free software GUI toolkit, which makes it easy to develop platform independent applications. Written in JAVA and C, provides the JAVA AWT Toolkit to non object-oriented languages incl Fortran 77 and Fortran 90 onwards. Development stopped in 2003 1b) Hooks to call PILIB (library calling GTK+) Platform Independent Library for use with Fortran 9x PILIB 0.5 (http://www.sourceforge.net/projects/pilib) 1c) Interface to EGGX/ProCALL graphics library X Library for use with C or Fortran 9x Main author: Chisato Yamauchi 2) Interface to ZLib 3) Unix pipes |
Name of routine: | fonttype |
---|---|
Source lines: | 356 - 377 |
Type | function |
Call | fonttype(s) |
Module | japi |
Notes |
Name of routine: | aligntype |
---|---|
Source lines: | 379 - 402 |
Type | function |
Call | aligntype(s) |
Module | japi |
Notes |
Name of routine: | list_files |
---|---|
Source lines: | 499 - 599 |
Type | subroutine |
Call | list_files(dir, files, filetypes, inodes, ios) |
Module | directory_utilities |
Notes | higher level file directory routines |
Name of routine: | newlin |
---|---|
Source lines: | 613 - 624 |
Type | subroutine |
Call | newlin(sol, eol, pos, newpos) |
Module | outstream |
Notes | format free output, adding newline if line exceeding specified length |
Name of routine: | colprint |
---|---|
Source lines: | 629 - 643 |
Type | subroutine |
Call | colprint(sol, eol, string) |
Module | outstream |
Notes | print one string, inserting newline is past r margin cursor at l margin at beginning |
Name of routine: | hexdump |
---|---|
Source lines: | 647 - 687 |
Type | subroutine |
Call | hexdump(start, finish, string, offset) |
Module | outstream |
Notes | hexdump -C |
Name of routine: | iscomp |
---|---|
Source lines: | 862 - 870 |
Type | function |
Call | iscomp(op) |
Module | comp_ops |
Notes | determine if trait being compared to a constant, for isaff |
Name of routine: | compsign |
---|---|
Source lines: | 874 - 880 |
Type | function |
Call | compsign(idx) |
Module | comp_ops |
Notes | Show comparison |
Name of routine: | docomp |
---|---|
Source lines: | 886 - 930 |
Type | subroutine |
Call | docomp(pos, words, gt, thresh) |
Module | comp_ops |
Notes | parse comparison in isaff 15='<', 16='>', 17='ge', 18='le', 19='ne', 20='eq' 21='odd', 22='even' |
Name of routine: | defpro |
---|---|
Source lines: | 934 - 963 |
Type | subroutine |
Call | defpro(gt, thresh, asnote) |
Module | comp_ops |
Notes | Message defining proband based on comparison |
Name of routine: | mapformat |
---|---|
Source lines: | 999 - 1010 |
Type | function |
Call | mapformat(mapunits, width) |
Module | genetic_maps |
Notes | Optimal format for writing different map units |
Name of routine: | mapstring |
---|---|
Source lines: | 1014 - 1037 |
Type | function |
Call | mapstring(x) |
Module | genetic_maps |
Notes | formatted map position fixed to length 12 |
Name of routine: | invmap |
---|---|
Source lines: | 1041 - 1053 |
Type | function |
Call | invmap(x, mapf) |
Module | genetic_maps |
Notes | inverse Haldane (mapf=1) or Kosambi (mapf=2) mapping x cM to r |
Name of routine: | setup_chroms |
---|---|
Source lines: | 1058 - 1076 |
Type | subroutine |
Call | setup_chroms(nchrom, ntypes, table) |
Module | genetic_maps |
Notes | set up and finalize summary chromosomal map data for different classes of locus |
Name of routine: | clean_chroms |
---|---|
Source lines: | 1078 - 1085 |
Type | subroutine |
Call | clean_chroms(table) |
Module | genetic_maps |
Notes | Linkage and physical maps genetic map functions are 1=Haldane, 2=Kosambi default map units is Mbp or cM (assuming 1 Mbp/cM) mapunits=type of map unit mapconstant=multiplier for internal map units (Mbp/cM) |
Name of routine: | whichchrom |
---|---|
Source lines: | 1090 - 1101 |
Type | subroutine |
Call | whichchrom(chrom, table, pos) |
Module | genetic_maps |
Notes | Linear search for chromosome in chromosome_data (recall sort is numeric not alphabetic) |
Name of routine: | tojulian |
---|---|
Source lines: | 1128 - 1142 |
Type | function |
Call | tojulian(gdate) |
Module | timelib |
Notes | Julian and Gregorian from Peter Meyer's on-line notes: In 1968 in a letter to the editor of Communications of the ACM (CACM, volume 11, number 10, October 1968, p.657) Henry F. Fliegel and Thomas C. Van Flandern presented such conversion algorithms: gdate takes the form YYYYMMDD |
Name of routine: | togreg |
---|---|
Source lines: | 1146 - 1165 |
Type | function |
Call | togreg(jdate) |
Module | timelib |
Notes | from Julian to Gregorian |
Name of routine: | getyear |
---|---|
Source lines: | 1169 - 1181 |
Type | function |
Call | getyear(gdate) |
Module | timelib |
Notes | Gregorian date as decimal year |
Name of routine: | dayofweek |
---|---|
Source lines: | 1183 - 1187 |
Type | function |
Call | dayofweek(jd) |
Module | timelib |
Notes |
Name of routine: | current_time |
---|---|
Source lines: | 1191 - 1200 |
Type | function |
Call | current_time() |
Module | timelib |
Notes | Date and time like fdate |
Name of routine: | isodate |
---|---|
Source lines: | 1204 - 1209 |
Type | function |
Call | isodate() |
Module | timelib |
Notes | Today as ISO YYYYMMDD |
Name of routine: | time_since_epoch |
---|---|
Source lines: | 1213 - 1222 |
Type | function |
Call | time_since_epoch() |
Module | timelib |
Notes | Current seconds since POSIX epoch excluding leap seconds |
Name of routine: | init_rng |
---|---|
Source lines: | 1240 - 1253 |
Type | subroutine |
Call | init_rng(iseed) |
Module | rngs |
Notes | Moved initialization here 20180802, as ifort did not like rndseed and rng being simultaneously accessible by main |
Name of routine: | set_rng_seeds |
---|---|
Source lines: | 1255 - 1264 |
Type | subroutine |
Call | set_rng_seeds(i, j, k) |
Module | rngs |
Notes | random number generators |
Name of routine: | get_rng_seeds |
---|---|
Source lines: | 1266 - 1272 |
Type | subroutine |
Call | get_rng_seeds(i, j, k) |
Module | rngs |
Notes | random number generators |
Name of routine: | random |
---|---|
Source lines: | 1280 - 1287 |
Type | function |
Call | random() |
Module | rngs |
Notes | Algorithm AS 183 Appl Stat 1982; 31:188 Returns a pseudo-random number from U(0,1) ix,iy,iz should be "randomly" initialised to 1-30000 eg via time |
Name of routine: | uniqnam |
---|---|
Source lines: | 1302 - 1310 |
Type | subroutine |
Call | uniqnam(nchar, str) |
Module | rngs |
Notes | Random character string |
Name of routine: | rantri |
---|---|
Source lines: | 1314 - 1317 |
Type | function |
Call | rantri() |
Module | rngs |
Notes | Triangular random number generator |
Name of routine: | randn |
---|---|
Source lines: | 1326 - 1348 |
Type | function |
Call | randn() |
Module | rngs |
Notes | The function RANDN() returns a normally distributed pseudo-random number with zero mean and unit variance. Calls are made to a function subprogram RANDOM() which returns independent random numbers uniform in the interval (0,1). The algorithm uses the ratio of uniforms method of A.J. Kinderman and J.F. Monahan augmented with quadratic bounding curves. |
Name of routine: | permut |
---|---|
Source lines: | 1352 - 1365 |
Type | subroutine |
Call | permut(n, ia) |
Module | rngs |
Notes | Permute the contents of an integer array |
Name of routine: | sampleindices |
---|---|
Source lines: | 1369 - 1391 |
Type | subroutine |
Call | sampleindices(n, r, ia) |
Module | rngs |
Notes | Sample of size r without replacement from 1..n by rejection sampling |
Name of routine: | handler |
---|---|
Source lines: | 1403 - 1411 |
Type | function |
Call | handler() |
Module | interrupt |
Notes | interrupt |
Name of routine: | handler |
---|---|
Source lines: | 1413 - 1419 |
Type | subroutine |
Call | handler() |
Module | interrupt |
Notes | interrupt |
Name of routine: | newinclude |
---|---|
Source lines: | 1447 - 1478 |
Type | subroutine |
Call | newinclude(inctyp, keep, filnam, ioerr) |
Module | iobuff |
Notes | Input buffer, stack of input streams, prompt string etc ilevel=0 historical or macro command; =1 keyboard; =2,3,4 files toplevel=highest occupied level ilevold=last level, if ilevel currently 0 incstr stream for ith inclusion infil name of file incaction 1=read entire stream 2=read locus information only 3=1+delete |
Name of routine: | zlib_version |
---|---|
Source lines: | 1716 - 1729 |
Type | subroutine |
Call | zlib_version(vstring) |
Module | f95zlib |
Notes | Wrapper for zlibversion |
Name of routine: | zlib_compileflags |
---|---|
Source lines: | 1733 - 1746 |
Type | subroutine |
Call | zlib_compileflags() |
Module | f95zlib |
Notes | Wrapper for zlibCompileFlags |
Name of routine: | zlib_compress |
---|---|
Source lines: | 1750 - 1772 |
Type | subroutine |
Call | zlib_compress(uncompressed_data, len_result, compressed_data, ios) |
Module | f95zlib |
Notes | Wrapper for compress |
Name of routine: | zlib_uncompress |
---|---|
Source lines: | 1776 - 1799 |
Type | subroutine |
Call | zlib_uncompress(compressed_data, result_len, uncompressed_data, ios) |
Module | f95zlib |
Notes | Wrapper for uncompress - default compression settings |
Name of routine: | zlib_inflate |
---|---|
Source lines: | 1805 - 1912 |
Type | subroutine |
Call | zlib_inflate(compressed_data, windowbits, result_len, uncompressed_data, ios) |
Module | f95zlib |
Notes | Wrapper for inflateInit2, inflate, inflateEnd, allowing adjustment of compress level This is essential for reading bgzf files Follows uncompress() |
Name of routine: | fgz_open |
---|---|
Source lines: | 1917 - 1946 |
Type | subroutine |
Call | fgz_open(path, mode, fd, ios) |
Module | f95zlib |
Notes | Wrapper for gzopen also reinitializes gzread's buffer |
Name of routine: | fgz_rewind |
---|---|
Source lines: | 1950 - 1964 |
Type | subroutine |
Call | fgz_rewind(fd, ios) |
Module | f95zlib |
Notes | Wrapper for gzrewind |
Name of routine: | fgz_seek |
---|---|
Source lines: | 1968 - 2004 |
Type | subroutine |
Call | fgz_seek(fd, offset, ios, offset_typ) |
Module | f95zlib |
Notes | Wrapper for gzseek |
Name of routine: | fgz_read_integer |
---|---|
Source lines: | 2009 - 2031 |
Type | subroutine |
Call | fgz_read_integer(fd, res, ios) |
Module | f95zlib |
Notes | Wrapper for gzread read one 32 bit integer |
Name of routine: | fgz_read_longint |
---|---|
Source lines: | 2036 - 2058 |
Type | subroutine |
Call | fgz_read_longint(fd, res, ios) |
Module | f95zlib |
Notes | Wrapper for gzread read one 64 bit integer |
Name of routine: | fgz_read |
---|---|
Source lines: | 2063 - 2154 |
Type | subroutine |
Call | fgz_read(fd, lin, advance, ignore_eol, ios) |
Module | f95zlib |
Notes | Wrapper for gzread read one line of text from buffer |
Name of routine: | fgz_readtoken |
---|---|
Source lines: | 2158 - 2265 |
Type | subroutine |
Call | fgz_readtoken(fd, separator, word, ios) |
Module | f95zlib |
Notes | Read one token from gzipped file |
Name of routine: | fgz_write |
---|---|
Source lines: | 2269 - 2310 |
Type | subroutine |
Call | fgz_write(fd, lin, advance, ios) |
Module | f95zlib |
Notes | write one line of text to a gzipped textfile |
Name of routine: | fgz_error |
---|---|
Source lines: | 2314 - 2327 |
Type | subroutine |
Call | fgz_error(fd) |
Module | f95zlib |
Notes | Wrapper for gzerror |
Name of routine: | fgz_close |
---|---|
Source lines: | 2331 - 2339 |
Type | subroutine |
Call | fgz_close(fd, ios) |
Module | f95zlib |
Notes | Wrapper for gzclose |
Name of routine: | bgzf_read |
---|---|
Source lines: | 2370 - 2466 |
Type | subroutine |
Call | bgzf_read(port, lin, ignore_eol, advance,ios) |
Module | bgzf |
Notes | To read bgzf format, need something like bioruby-bgzf read_bgzf_block Read one line from BGZF file |
Name of routine: | copybuff |
---|---|
Source lines: | 2468 - 2473 |
Type | subroutine |
Call | copybuff(zbufpos, pos, nchar, zbuffer, lin) |
Module | bgzf |
Notes | Reading bgzipped files * BGZF/GZIP header (specialized from RFC 1952; little endian): ID1 ID2 CM FLG MTIME XFL OS XLEN SI1 SI2 SLEN +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 31|139| 8| 4| 0| 0|255| 6| 66| 67| 2|BLK_LEN| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ BGZF extension: ^ ^ ^ ^ | | | | FLG.EXTRA XLEN B C BGZF format is compatible with GZIP. It limits the size of each compressed block to 2^16 bytes and adds and an extra "BC" field in the gzip header which records the size. |
Name of routine: | chase_eol |
---|---|
Source lines: | 2475 - 2492 |
Type | subroutine |
Call | chase_eol(zbufpos, zbufend, zbuffer, eol, morez, newzpos, nchar) |
Module | bgzf |
Notes | Reading bgzipped files * BGZF/GZIP header (specialized from RFC 1952; little endian): ID1 ID2 CM FLG MTIME XFL OS XLEN SI1 SI2 SLEN +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 31|139| 8| 4| 0| 0|255| 6| 66| 67| 2|BLK_LEN| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ BGZF extension: ^ ^ ^ ^ | | | | FLG.EXTRA XLEN B C BGZF format is compatible with GZIP. It limits the size of each compressed block to 2^16 bytes and adds and an extra "BC" field in the gzip header which records the size. |
Name of routine: | bgzf_readtoken |
---|---|
Source lines: | 2497 - 2615 |
Type | subroutine |
Call | bgzf_readtoken(port, separator, word, ios) |
Module | bgzf |
Notes | Read one token from BGZF file |
Name of routine: | read_bgzf_block |
---|---|
Source lines: | 2619 - 2706 |
Type | subroutine |
Call | read_bgzf_block(strm, compressed_data, block_size, input_size, crc32, ios) |
Module | bgzf |
Notes | Read one BGZF block |
Name of routine: | bgzf_seek |
---|---|
Source lines: | 2708 - 2743 |
Type | subroutine |
Call | bgzf_seek(port, block_pos, virtual_offset, ios) |
Module | bgzf |
Notes | Reading bgzipped files * BGZF/GZIP header (specialized from RFC 1952; little endian): ID1 ID2 CM FLG MTIME XFL OS XLEN SI1 SI2 SLEN +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 31|139| 8| 4| 0| 0|255| 6| 66| 67| 2|BLK_LEN| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ BGZF extension: ^ ^ ^ ^ | | | | FLG.EXTRA XLEN B C BGZF format is compatible with GZIP. It limits the size of each compressed block to 2^16 bytes and adds and an extra "BC" field in the gzip header which records the size. |
Name of routine: | pipe_open |
---|---|
Source lines: | 2809 - 2820 |
Type | subroutine |
Call | pipe_open(command, fd, ios) |
Module | f95pipes |
Notes | wrapper for popen fd%stat gives mode |
Name of routine: | pipe_rewind |
---|---|
Source lines: | 2823 - 2829 |
Type | subroutine |
Call | pipe_rewind(fd, ios) |
Module | f95pipes |
Notes | rewind pipe |
Name of routine: | pipe_read_integer |
---|---|
Source lines: | 2832 - 2854 |
Type | subroutine |
Call | pipe_read_integer(fd, res, ios) |
Module | f95pipes |
Notes | wrapper for read |
Name of routine: | pipe_read |
---|---|
Source lines: | 2857 - 2883 |
Type | subroutine |
Call | pipe_read(fd, lin, advance, ios) |
Module | f95pipes |
Notes | wrapper for fgets |
Name of routine: | pipe_readtoken |
---|---|
Source lines: | 2887 - 2911 |
Type | subroutine |
Call | pipe_readtoken(fd, word, separator, ios) |
Module | f95pipes |
Notes | next whitespace separated token - wraps fgetc |
Name of routine: | pipe_write |
---|---|
Source lines: | 2914 - 2934 |
Type | subroutine |
Call | pipe_write(fd, lin, advance, ios) |
Module | f95pipes |
Notes | wrapper for fputs |
Name of routine: | pipe_close |
---|---|
Source lines: | 2937 - 2945 |
Type | subroutine |
Call | pipe_close(fd, ios) |
Module | f95pipes |
Notes | wrapper for pclose |
Name of routine: | newlun |
---|---|
Source lines: | 2967 - 2981 |
Type | subroutine |
Call | newlun(strm) |
Module | fileio |
Notes | Find a free Fortran style unit |
Name of routine: | isgzipped |
---|---|
Source lines: | 2985 - 3019 |
Type | function |
Call | isgzipped(filnam) |
Module | fileio |
Notes | Test if gzipped file, reading magic number 31,139,8 |
Name of routine: | readbigreal |
---|---|
Source lines: | 3023 - 3042 |
Type | subroutine |
Call | readbigreal(strm, n, vec) |
Module | fileio |
Notes | Fill large real array from stream |
Name of routine: | open_port |
---|---|
Source lines: | 3046 - 3132 |
Type | subroutine |
Call | open_port(filnam, port, mode, ios) |
Module | fileio |
Notes | Open a (plain or gzipped) file or pipe for reading or writing |
Name of routine: | rewind_port |
---|---|
Source lines: | 3136 - 3156 |
Type | subroutine |
Call | rewind_port(port, ios) |
Module | fileio |
Notes | Reopen a file for reading or writing |
Name of routine: | seek_port |
---|---|
Source lines: | 3160 - 3181 |
Type | subroutine |
Call | seek_port(port, pos, ios) |
Module | fileio |
Notes | Set (read) position in a file or stream (if possible) |
Name of routine: | port_position |
---|---|
Source lines: | 3185 - 3189 |
Type | function |
Call | port_position(port) |
Module | fileio |
Notes | Return position in file |
Name of routine: | readline |
---|---|
Source lines: | 3193 - 3230 |
Type | subroutine |
Call | readline(port, lin, advance, ignore_eol, ios) |
Module | fileio |
Notes | Read one record from file |
Name of routine: | readtoken |
---|---|
Source lines: | 3234 - 3254 |
Type | subroutine |
Call | readtoken(port, word, ios) |
Module | fileio |
Notes | Read next whitespace separated token from file, flagging if eol |
Name of routine: | stream_readtoken |
---|---|
Source lines: | 3256 - 3278 |
Type | subroutine |
Call | stream_readtoken(port, word, separator, ios) |
Module | fileio |
Notes | Readline subroutine for either plain or (b)gzipped files -- |
Name of routine: | read_bytes |
---|---|
Source lines: | 3282 - 3288 |
Type | subroutine |
Call | read_bytes(port, lin, ios) |
Module | fileio |
Notes | read N bytes from the current port |
Name of routine: | writeline |
---|---|
Source lines: | 3292 - 3316 |
Type | subroutine |
Call | writeline(port, lin, advance, ios) |
Module | fileio |
Notes | Write one record to file |
Name of routine: | close_port |
---|---|
Source lines: | 3321 - 3346 |
Type | subroutine |
Call | close_port(port, ios) |
Module | fileio |
Notes | Close file for reading - if gzipped but ZLIB not available, then delete temporary file |
Name of routine: | chfind |
---|---|
Source lines: | 3357 - 3381 |
Type | function |
Call | chfind(string, ch) |
Module | string_utilities |
Notes | find an unescaped character in a string |
Name of routine: | alnum |
---|---|
Source lines: | 3386 - 3394 |
Type | function |
Call | alnum(ch) |
Module | string_utilities |
Notes | functions supporting regexp notice alnum includes "_" |
Name of routine: | on_sow |
---|---|
Source lines: | 3396 - 3410 |
Type | function |
Call | on_sow(string, pos) |
Module | string_utilities |
Notes | String utilities |
Name of routine: | on_eow |
---|---|
Source lines: | 3413 - 3425 |
Type | function |
Call | on_eow(string, pos) |
Module | string_utilities |
Notes | word end is backward looking |
Name of routine: | strfind |
---|---|
Source lines: | 3431 - 3535 |
Type | function |
Call | strfind(regexp, targt, nocase) |
Module | string_utilities |
Notes | Compare string to a search string, allowing wildcards '*.', metacharacters \<, \>, simple lists of characters [ccc], and case matching |
Name of routine: | escape |
---|---|
Source lines: | 3539 - 3565 |
Type | subroutine |
Call | escape(str, trget) |
Module | string_utilities |
Notes | Escape a target character, usually " |
Name of routine: | toupper |
---|---|
Source lines: | 3569 - 3578 |
Type | subroutine |
Call | toupper(str) |
Module | string_utilities |
Notes | lower to upper case alphabetic |
Name of routine: | sow |
---|---|
Source lines: | 3602 - 3613 |
Type | function |
Call | sow(string) |
Module | scanner |
Notes | skip leading whitespace |
Name of routine: | countsep |
---|---|
Source lines: | 3618 - 3628 |
Type | function |
Call | countsep(sep, s) |
Module | scanner |
Notes | Test if reading a CSV file - based on whether current line contains a number of likely separators |
Name of routine: | nextword |
---|---|
Source lines: | 3644 - 3764 |
Type | subroutine |
Call | nextword(pos, s, eos, reserved, nword, word, stat, sep, typ) |
Module | scanner |
Notes | Next token in buffer Need to know which word if reading pedigree or case-control data (with or without ID) as slashes separate alleles in data but are allowed in ID strings typ action 1 SEP_WHITE whitespace separated 2 SEP_WH_RES whitespace separated or reserved character (id by reserved string) 3 SEP_WH_SLASH whitespace or slash separated (so genotypes can be written a/b) ped data 4 SEP_WH_SLASH_CAS whitespace or slash separated (so genotypes can be written a/b) case data 5 SEP_WH_SLASH_CAS_NOID whitespace or slash separated (so genotypes can be written a/b) case data, noid 6 SEP_CHAR character separated (eg CSV, TSV) |
Name of routine: | args |
---|---|
Source lines: | 3768 - 3798 |
Type | subroutine |
Call | args(s, narg, arg, sep, typ) |
Module | scanner |
Notes | extracts narg arguments from input string s |
Name of routine: | getword |
---|---|
Source lines: | 3803 - 3838 |
Type | subroutine |
Call | getword(s, which, word, sep, style) |
Module | scanner |
Notes | extracts the nth whitespace or character separated argument from input string s |
Name of routine: | wordpos |
---|---|
Source lines: | 3842 - 3877 |
Type | function |
Call | wordpos(s, which, first) |
Module | scanner |
Notes | Find start or end of nth whitespace-separated argument in input string s |
Name of routine: | countargs |
---|---|
Source lines: | 3881 - 3902 |
Type | function |
Call | countargs(s, sep, typ) |
Module | scanner |
Notes | Return count of (whitespace-separated) arguments from input string s |
Name of routine: | wordfind |
---|---|
Source lines: | 3908 - 3949 |
Type | function |
Call | wordfind(target_word, s, sep, typ, exact) |
Module | scanner |
Notes | Return index of first matching (whitespace-or-other-separated) word in input string s eg wordfind('GQ','GT:AD:GQ:PL:DP',':',SEP_CHAR) => 3 |
Name of routine: | getlabel |
---|---|
Source lines: | 3953 - 4003 |
Type | subroutine |
Call | getlabel(val, s, label, prefix) |
Module | scanner |
Notes | Extracts the matching label for a list of value=label pairs in a string |
Name of routine: | getpairval |
---|---|
Source lines: | 4007 - 4042 |
Type | subroutine |
Call | getpairval(varnam, s, reserved, res, forward) |
Module | scanner |
Notes | Extracts the value or the name from a matched name=value pair in a string |
Name of routine: | dsort |
---|---|
Source lines: | 4053 - 4172 |
Type | subroutine |
Call | dsort(n, dx) |
Module | sorts |
Notes | SLATEC quicksort routine. Jones, Kahaner and Wisniewski. double precision |
Name of routine: | srank |
---|---|
Source lines: | 4179 - 4345 |
Type | subroutine |
Call | srank(n, x, iy) |
Module | sorts |
Notes | SLATEC quicksort routine. Jones, Kahaner and Wisniewski. here allowing for a missing value indicator, and carrying an indicator along pulls down the missing data. To sort test statistics retaining a pointer to the variable name |
Name of routine: | isort |
---|---|
Source lines: | 4351 - 4595 |
Type | subroutine |
Call | isort(bot, top, ix, iy, kflag) |
Module | sorts |
Notes | SLATEC quicksort routine. Jones, Kahaner and Wisniewski. The option to sort descending has been removed, the argument order changed, and the sort is now from bot...top, rather than 1...top. |
Name of routine: | long_isort |
---|---|
Source lines: | 4597 - 4842 |
Type | subroutine |
Call | long_isort(bot, top, ix, iy, kflag) |
Module | sorts |
Notes | Sorting etc |
Name of routine: | imultsort |
---|---|
Source lines: | 4986 - 5009 |
Type | subroutine |
Call | imultsort(nr, nc, mat, idx) |
Module | sorts |
Notes | Sort a matrix by multiple keys |
Name of routine: | msdsort |
---|---|
Source lines: | 5013 - 5036 |
Type | subroutine |
Call | msdsort(bot,top,key1,key2,ord) |
Module | sorts |
Notes | MSD radix sort key1, key2 |
Name of routine: | setup_hash |
---|---|
Source lines: | 5058 - 5106 |
Type | subroutine |
Call | setup_hash(keytyp, nrec, hashtab, load) |
Module | idhash_class |
Notes | Allocate an open addressed hash table number of buckets is prime probe using exponential hash following Muehlbacher 2004 JUCS 10: 1239-1249 |
Name of routine: | cleanup_hash |
---|---|
Source lines: | 5110 - 5119 |
Type | subroutine |
Call | cleanup_hash(hashtab) |
Module | idhash_class |
Notes | release memory held by a hash table |
Name of routine: | fill_hash |
---|---|
Source lines: | 5123 - 5140 |
Type | subroutine |
Call | fill_hash(hashtab, string_array) |
Module | idhash_class |
Notes | populate hash table |
Name of routine: | fill_hash_int |
---|---|
Source lines: | 5142 - 5159 |
Type | subroutine |
Call | fill_hash_int(hashtab, iarray) |
Module | idhash_class |
Notes | Hash table for indexing IDs etc |
Name of routine: | insert_hash |
---|---|
Source lines: | 5163 - 5177 |
Type | subroutine |
Call | insert_hash(hashtab, string, iaddress) |
Module | idhash_class |
Notes | add new element to hash table |
Name of routine: | find_hashtab |
---|---|
Source lines: | 5181 - 5200 |
Type | subroutine |
Call | find_hashtab(str, string_array, hashtab, iaddress) |
Module | idhash_class |
Notes | Search hash table |
Name of routine: | find_hashtab_int |
---|---|
Source lines: | 5202 - 5221 |
Type | subroutine |
Call | find_hashtab_int(iv, iarray, hashtab, iaddress) |
Module | idhash_class |
Notes | Hash table for indexing IDs etc |
Name of routine: | string_hash |
---|---|
Source lines: | 5225 - 5236 |
Type | function |
Call | string_hash(str, ibound) |
Module | idhash_class |
Notes | String hash function (that used by SRFI-64) |
Name of routine: | integer_hash |
---|---|
Source lines: | 5240 - 5245 |
Type | function |
Call | integer_hash(iv, ibound) |
Module | idhash_class |
Notes | integer hash function |
Name of routine: | get_table_cell_type |
---|---|
Source lines: | 5278 - 5282 |
Type | function |
Call | get_table_cell_type(x) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | copystring |
---|---|
Source lines: | 5286 - 5296 |
Type | subroutine |
Call | copystring(string, x) |
Module | table_cell_type |
Notes | recast |
Name of routine: | set_table_cell_type |
---|---|
Source lines: | 5298 - 5365 |
Type | subroutine |
Call | set_table_cell_type(newtyp, x) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | table_cell_numeric |
---|---|
Source lines: | 5369 - 5373 |
Type | function |
Call | table_cell_numeric(x) |
Module | table_cell_type |
Notes | is non-string |
Name of routine: | table_cell_string_numeric |
---|---|
Source lines: | 5377 - 5396 |
Type | function |
Call | table_cell_string_numeric(x) |
Module | table_cell_type |
Notes | Is string and contents of string numeric? |
Name of routine: | table_cell_string_int |
---|---|
Source lines: | 5401 - 5419 |
Type | function |
Call | table_cell_string_int(x) |
Module | table_cell_type |
Notes | Is string and contents of string an integer? Useful for factor levels |
Name of routine: | table_cell_eq |
---|---|
Source lines: | 5424 - 5451 |
Type | function |
Call | table_cell_eq(x, y) |
Module | table_cell_type |
Notes | numbers precede strings in collation sequence, integer-real comparisons cast former to real |
Name of routine: | table_cell_ne |
---|---|
Source lines: | 5453 - 5457 |
Type | function |
Call | table_cell_ne(x, y) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | table_cell_gt |
---|---|
Source lines: | 5459 - 5502 |
Type | function |
Call | table_cell_gt(x, y) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | table_cell_lt |
---|---|
Source lines: | 5504 - 5550 |
Type | function |
Call | table_cell_lt(x, y) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | set_table_cell |
---|---|
Source lines: | 5552 - 5575 |
Type | subroutine |
Call | set_table_cell(x, ivalue, rvalue, string) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | get_table_cell |
---|---|
Source lines: | 5577 - 5637 |
Type | subroutine |
Call | get_table_cell(x, ivalue, rvalue, string) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | write_table_cell |
---|---|
Source lines: | 5639 - 5704 |
Type | subroutine |
Call | write_table_cell(strm, x, width, tabsep, advance) |
Module | table_cell_type |
Notes | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
Name of routine: | setup_table |
---|---|
Source lines: | 5730 - 5752 |
Type | subroutine |
Call | setup_table(ncat, maxcells, table) |
Module | contingency_table |
Notes | allocate space for contingency table |
Name of routine: | zero_table |
---|---|
Source lines: | 5756 - 5771 |
Type | subroutine |
Call | zero_table(table) |
Module | contingency_table |
Notes | zero table for reuse |
Name of routine: | clean_table |
---|---|
Source lines: | 5775 - 5789 |
Type | subroutine |
Call | clean_table(table) |
Module | contingency_table |
Notes | deallocate space |
Name of routine: | expand_table |
---|---|
Source lines: | 5793 - 5822 |
Type | subroutine |
Call | expand_table(nextra, table) |
Module | contingency_table |
Notes | increase available space |
Name of routine: | set_table_colname |
---|---|
Source lines: | 5826 - 5831 |
Type | subroutine |
Call | set_table_colname(icol, colnam, table) |
Module | contingency_table |
Notes | insert colname |
Name of routine: | cell_hash |
---|---|
Source lines: | 5835 - 5859 |
Type | function |
Call | cell_hash(ncat, values, ibound) |
Module | contingency_table |
Notes | hash vector of table values |
Name of routine: | cell_vector_eq |
---|---|
Source lines: | 5861 - 5872 |
Type | function |
Call | cell_vector_eq(vec1, vec2) |
Module | contingency_table |
Notes |
Name of routine: | cell_vector_gt |
---|---|
Source lines: | 5874 - 5889 |
Type | function |
Call | cell_vector_gt(vec1, vec2) |
Module | contingency_table |
Notes |
Name of routine: | cell_vector_le |
---|---|
Source lines: | 5891 - 5895 |
Type | function |
Call | cell_vector_le(vec1, vec2) |
Module | contingency_table |
Notes |
Name of routine: | cell_vector_lt |
---|---|
Source lines: | 5897 - 5912 |
Type | function |
Call | cell_vector_lt(vec1, vec2) |
Module | contingency_table |
Notes |
Name of routine: | cell_vector_ge |
---|---|
Source lines: | 5914 - 5918 |
Type | function |
Call | cell_vector_ge(vec1, vec2) |
Module | contingency_table |
Notes |
Name of routine: | insert_table_cells |
---|---|
Source lines: | 5922 - 5982 |
Type | subroutine |
Call | insert_table_cells(ncat, values, table, iwt, slot) |
Module | contingency_table |
Notes | insert data |
Name of routine: | insert_table |
---|---|
Source lines: | 5984 - 5995 |
Type | subroutine |
Call | insert_table(ncat, rvalues, table, iwt) |
Module | contingency_table |
Notes |
Name of routine: | fill_tablehash |
---|---|
Source lines: | 5999 - 6018 |
Type | subroutine |
Call | fill_tablehash(table) |
Module | contingency_table |
Notes | rehash table_hash |
Name of routine: | sort_table |
---|---|
Source lines: | 6022 - 6179 |
Type | subroutine |
Call | sort_table(table, columns) |
Module | contingency_table |
Notes | Quicksort multicategory table categories - changes idx and catlabel |
Name of routine: | search_table |
---|---|
Source lines: | 6184 - 6219 |
Type | function |
Call | search_table(ncat, values, table) |
Module | contingency_table |
Notes | Search table -- needs table to be sorted returns rank of row |
Name of routine: | incr_table |
---|---|
Source lines: | 6223 - 6229 |
Type | subroutine |
Call | incr_table(pos, table, iwt) |
Module | contingency_table |
Notes | Increment cell count if correct address already available |
Name of routine: | table_column_widths |
---|---|
Source lines: | 6233 - 6258 |
Type | subroutine |
Call | table_column_widths(table, widths) |
Module | contingency_table |
Notes | print a table -- needs table to be sorted |
Name of routine: | print_table_unsorted |
---|---|
Source lines: | 6260 - 6327 |
Type | subroutine |
Call | print_table_unsorted(table) |
Module | contingency_table |
Notes |
Name of routine: | print_table |
---|---|
Source lines: | 6329 - 6398 |
Type | subroutine |
Call | print_table(table, show_presentation_order) |
Module | contingency_table |
Notes |
Name of routine: | marginal_table |
---|---|
Source lines: | 6402 - 6419 |
Type | subroutine |
Call | marginal_table(nmargin, margin, table, martable) |
Module | contingency_table |
Notes | fill a table with marginal counts from another table |
Name of routine: | flat_table |
---|---|
Source lines: | 6424 - 6478 |
Type | subroutine |
Call | flat_table(mtable1, mtable2, table, mat) |
Module | contingency_table |
Notes | Convert table counts to a R (dim1 x dim2 ..x dimN-1) x C (dimN) matrix so mtable1 is marginal table for vars 1..nloc-1, mtable2 is univariate |
Name of routine: | dim_table |
---|---|
Source lines: | 6482 - 6495 |
Type | function |
Call | dim_table(margin, table) |
Module | contingency_table |
Notes | get dimension of a margin |
Name of routine: | findlev |
---|---|
Source lines: | 6499 - 6545 |
Type | function |
Call | findlev(val, table) |
Module | contingency_table |
Notes | legacy real specific factor level corresponding to value |
Name of routine: | findrank_cell |
---|---|
Source lines: | 6549 - 6578 |
Type | function |
Call | findrank_cell(val, table) |
Module | contingency_table |
Notes | find rank based on position in 1-D table |
Name of routine: | findrank |
---|---|
Source lines: | 6582 - 6602 |
Type | function |
Call | findrank(val, table) |
Module | contingency_table |
Notes | legacy real specific |
Name of routine: | table_r_array |
---|---|
Source lines: | 6606 - 6616 |
Type | subroutine |
Call | table_r_array(table, rarray) |
Module | contingency_table |
Notes | write 1-D table category real values to ordered real array |
Name of routine: | show_one_iarray |
---|---|
Source lines: | 6624 - 6636 |
Type | subroutine |
Call | show_one_iarray(nam, sep, sta, fin, isall, array) |
Module | showcomponent |
Notes | Utilities to print arrays |
Name of routine: | show_one_carray |
---|---|
Source lines: | 6638 - 6650 |
Type | subroutine |
Call | show_one_carray(nam, sep, sta, fin, isall, array) |
Module | showcomponent |
Notes | Utilities to print arrays |
Name of routine: | show_one_farray |
---|---|
Source lines: | 6652 - 6673 |
Type | subroutine |
Call | show_one_farray(nam, sep, sta, fin, isall, array) |
Module | showcomponent |
Notes | Utilities to print arrays |
Name of routine: | loccode |
---|---|
Source lines: | 6709 - 6736 |
Type | function |
Call | loccode(ch) |
Module | locus_types |
Notes | Locus types bitpatterns loctyp Compression_scheme Deleted Marker: Autosomal X-marker Haploid Y-chrom / Affection Quantitative CC D T 1 00 0 0 001 Autosomal marker 2 00 0 0 010 X-chromosome marker 4 00 0 0 100 Haploid unspecified 5 00 0 0 101 Mitochondrial marker 6 00 0 0 110 Y-Chromosome marker 8 00 0 1 000 Trait unspecified 9 00 0 1 001 Quantitative trait 10 00 0 1 010 Binary trait 11 00 0 1 011 Categorical trait 12 00 0 1 100 Special trait (computed) |
Name of routine: | same_loctyp |
---|---|
Source lines: | 6740 - 6756 |
Type | function |
Call | same_loctyp(loctyp, reftyp) |
Module | locus_types |
Notes | same locus type or same class, ignoring compression type but not where dropped |
Name of routine: | isactive |
---|---|
Source lines: | 6758 - 6762 |
Type | function |
Call | isactive(loctyp) |
Module | locus_types |
Notes | is an active variable |
Name of routine: | istrait |
---|---|
Source lines: | 6764 - 6768 |
Type | function |
Call | istrait(loctyp) |
Module | locus_types |
Notes | trait - active |
Name of routine: | isspecial |
---|---|
Source lines: | 6770 - 6774 |
Type | function |
Call | isspecial(loctyp) |
Module | locus_types |
Notes | calculated trait |
Name of routine: | isqtrait |
---|---|
Source lines: | 6776 - 6780 |
Type | function |
Call | isqtrait(loctyp) |
Module | locus_types |
Notes | quantitative trait |
Name of routine: | iscattrait |
---|---|
Source lines: | 6782 - 6786 |
Type | function |
Call | iscattrait(loctyp) |
Module | locus_types |
Notes | categorical trait - active |
Name of routine: | ismarker |
---|---|
Source lines: | 6788 - 6792 |
Type | function |
Call | ismarker(loctyp) |
Module | locus_types |
Notes | marker - inactive or active |
Name of routine: | gencode |
---|---|
Source lines: | 6794 - 6798 |
Type | function |
Call | gencode(loctyp) |
Module | locus_types |
Notes | genotype encoding 1=standard 2=sequence 3=compressed SNP |
Name of routine: | ishaploid |
---|---|
Source lines: | 6800 - 6804 |
Type | function |
Call | ishaploid(loctyp) |
Module | locus_types |
Notes | is a haploid locus |
Name of routine: | iscompressed |
---|---|
Source lines: | 6806 - 6810 |
Type | function |
Call | iscompressed(loctyp) |
Module | locus_types |
Notes | is genotype storage compact (gencode > 1) |
Name of routine: | isactdip |
---|---|
Source lines: | 6812 - 6816 |
Type | function |
Call | isactdip(loctyp) |
Module | locus_types |
Notes | most association/linkage procedures are for active diploid codominant markers |
Name of routine: | iseligiblemarker |
---|---|
Source lines: | 6818 - 6828 |
Type | function |
Call | iseligiblemarker(loctyp, choice, active) |
Module | locus_types |
Notes | eligible for a keep or drop |
Name of routine: | make_lochash |
---|---|
Source lines: | 6845 - 6869 |
Type | subroutine |
Call | make_lochash(nloci, loc, lochash) |
Module | lochash_class |
Notes | Locus name hash table |
Name of routine: | insert_lochash |
---|---|
Source lines: | 6873 - 6891 |
Type | subroutine |
Call | insert_lochash(str, nloci, loc, lochash) |
Module | lochash_class |
Notes | append most recent locus to hash table |
Name of routine: | show_lochash |
---|---|
Source lines: | 6893 - 6902 |
Type | subroutine |
Call | show_lochash(nloci, lochash) |
Module | lochash_class |
Notes | Locus name hash table |
Name of routine: | make_maphash |
---|---|
Source lines: | 6906 - 6939 |
Type | subroutine |
Call | make_maphash(nloci, loctyp, group, map, map_str, maphash) |
Module | lochash_class |
Notes | hash map position 'chr:bp' |
Name of routine: | setup_loci |
---|---|
Source lines: | 6996 - 7012 |
Type | subroutine |
Call | setup_loci(n) |
Module | locus_data |
Notes | Allocate storage for locus descriptions |
Name of routine: | setup_auto |
---|---|
Source lines: | 7016 - 7050 |
Type | subroutine |
Call | setup_auto() |
Module | locus_data |
Notes | Initialize automatic variables |
Name of routine: | count_specials |
---|---|
Source lines: | 7054 - 7065 |
Type | subroutine |
Call | count_specials(nvars) |
Module | locus_data |
Notes | Count number of automatic variables (eg interrogate old binary images) |
Name of routine: | cleanup_loci |
---|---|
Source lines: | 7069 - 7074 |
Type | subroutine |
Call | cleanup_loci() |
Module | locus_data |
Notes | Deallocate storage for locus descriptions |
Name of routine: | expand_loci |
---|---|
Source lines: | 7078 - 7121 |
Type | subroutine |
Call | expand_loci(nextra, plevel) |
Module | locus_data |
Notes | Expand arrays for locus descriptions |
Name of routine: | insloc |
---|---|
Source lines: | 7126 - 7137 |
Type | subroutine |
Call | insloc(pos) |
Module | locus_data |
Notes | insert a locus into the locus list other details of the slot are left blank |
Name of routine: | setupmer |
---|---|
Source lines: | 7141 - 7167 |
Type | subroutine |
Call | setupmer(port, plevel) |
Module | locus_data |
Notes | Preallocate arrays for locus descriptions from MERLIN locus file |
Name of routine: | setup_plink |
---|---|
Source lines: | 7171 - 7192 |
Type | subroutine |
Call | setup_plink(port, nmark, newsiz, typ) |
Module | locus_data |
Notes | Allocate arrays for locus descriptions from PLINK .map file |
Name of routine: | setup_stat |
---|---|
Source lines: | 7200 - 7208 |
Type | subroutine |
Call | setup_stat(comment, typ) |
Module | locus_data |
Notes | initialize locstat (stores test statistic for each locus) locstat_typ is type of statistic: 0 = P-value 1 = continuous 2 = categorical |
Name of routine: | show_locus_allocation |
---|---|
Source lines: | 7212 - 7237 |
Type | subroutine |
Call | show_locus_allocation(first, last) |
Module | locus_data |
Notes | Diagnostics for locus structure |
Name of routine: | newloctyp |
---|---|
Source lines: | 7240 - 7253 |
Type | subroutine |
Call | newloctyp() |
Module | locus_data |
Notes | Old to new locus types |
Name of routine: | gettrait |
---|---|
Source lines: | 7264 - 7315 |
Type | subroutine |
Call | gettrait(nam, typ1, typ2, nloci, loc, lochash, loctyp, trait, plevel) |
Module | locus_list |
Notes | determine if word is name of a trait locus |
Name of routine: | isinuse |
---|---|
Source lines: | 7319 - 7354 |
Type | function |
Call | isinuse(namechek, string, loc, lochash) |
Module | locus_list |
Notes | check if name is not already used or reserved |
Name of routine: | getbin |
---|---|
Source lines: | 7358 - 7395 |
Type | subroutine |
Call | getbin(sta, fin, words, nloci, loc, lochash, loctyp, trait, gt, thresh) |
Module | locus_list |
Notes | Get a single binary trait or dichotomized quantitative trait |
Name of routine: | loadnam |
---|---|
Source lines: | 7405 - 7606 |
Type | subroutine |
Call | loadnam(sta, fin, words, nloci, loc, lochash, loctyp, group, map, locstat, chosen, nterms, terms, filter, typ) |
Module | locus_list |
Notes | Load list of traits into an array allows wild cards and spans filter= selection must also be of class eg LOC_CODOM, LOC_ANY typ=1 active loci, =2 inactive loci, =3 all loci (used by ls etc) output both as list (terms) and as index vector (chosen) |
Name of routine: | neighbours |
---|---|
Source lines: | 7610 - 7639 |
Type | subroutine |
Call | neighbours(idx, dir, nreq, nloci, loctyp, chosen) |
Module | locus_list |
Notes | Nearest neighbours in locus list of same type |
Name of routine: | actlist |
---|---|
Source lines: | 7643 - 7673 |
Type | subroutine |
Call | actlist(typ, nloci, loctyp, nchosen, chosen) |
Module | locus_list |
Notes | All active/inactive |
Name of routine: | mappedlist |
---|---|
Source lines: | 7677 - 7693 |
Type | subroutine |
Call | mappedlist(nloci, map, nchosen, chosen) |
Module | locus_list |
Notes | All mapped loci |
Name of routine: | search_annot |
---|---|
Source lines: | 7697 - 7735 |
Type | subroutine |
Call | search_annot(sta, fin, words, nloci, locnotes, chosen, nterms, terms) |
Module | locus_list |
Notes | Select loci based on search of annotations |
Name of routine: | search_chrom |
---|---|
Source lines: | 7739 - 7776 |
Type | subroutine |
Call | search_chrom(sta, fin, words, nloci, group, chosen, nterms, terms) |
Module | locus_list |
Notes | Select loci based on chromosome |
Name of routine: | listloci |
---|---|
Source lines: | 7781 - 7901 |
Type | subroutine |
Call | listloci(nord, locord, nloci, loc, loctyp, outpos, locnotes, typ, prompt, plevel) |
Module | locus_list |
Notes | List loci using short (typ=2) or long (typ=1) form plevel < -1 will give a simple list of names |
Name of routine: | cntclasses |
---|---|
Source lines: | 7905 - 7942 |
Type | subroutine |
Call | cntclasses(nloci, loctyp) |
Module | locus_list |
Notes | Output counts of class of loci |
Name of routine: | cntmark |
---|---|
Source lines: | 7946 - 7973 |
Type | subroutine |
Call | cntmark(nloci, loctyp, nmark, typ) |
Module | locus_list |
Notes | Count active codominant markers or active loci |
Name of routine: | findmk |
---|---|
Source lines: | 7977 - 7995 |
Type | function |
Call | findmk(sta, fin, loctyp) |
Module | locus_list |
Notes | Find next active codominant marker in list |
Name of routine: | findml |
---|---|
Source lines: | 7999 - 8015 |
Type | function |
Call | findml(nord, locord, loctyp) |
Module | locus_list |
Notes | Find first codominant or haploid marker in list |
Name of routine: | ldlist |
---|---|
Source lines: | 8020 - 8068 |
Type | subroutine |
Call | ldlist(typ, loc1, loc2, nloci, loctyp, last) |
Module | locus_list |
Notes | produce next pair of markers from: 1. named pair 2. One named 3. map order 4. all pairs 10. empty |
Name of routine: | matrix_set_bufwidth |
---|---|
Source lines: | 8119 - 8134 |
Type | subroutine |
Call | matrix_set_bufwidth(bufwidth) |
Module | matrix_class |
Notes | Create a matrix container |
Name of routine: | matrix_create |
---|---|
Source lines: | 8136 - 8182 |
Type | subroutine |
Call | matrix_create(nr, nc, a, astat, setbufwidth) |
Module | matrix_class |
Notes | A container for large (dense) matrices that can keep them as random access files and buffer a subset of columns in memory |
Name of routine: | matrix_zero |
---|---|
Source lines: | 8186 - 8205 |
Type | subroutine |
Call | matrix_zero(a) |
Module | matrix_class |
Notes | zero a matrix |
Name of routine: | matrix_copy |
---|---|
Source lines: | 8209 - 8309 |
Type | subroutine |
Call | matrix_copy(a, b, iflag, newrows, rowfilter, newcols, colfilter, setbufwidth) |
Module | matrix_class |
Notes | Copy a matrix container (a -> b) |
Name of routine: | matrix_destroy |
---|---|
Source lines: | 8313 - 8327 |
Type | subroutine |
Call | matrix_destroy(a) |
Module | matrix_class |
Notes | Destroy a matrix container |
Name of routine: | matrix_active |
---|---|
Source lines: | 8331 - 8335 |
Type | function |
Call | matrix_active(a) |
Module | matrix_class |
Notes | Test if matrix allocated/active |
Name of routine: | matrix_size |
---|---|
Source lines: | 8339 - 8347 |
Type | function |
Call | matrix_size(a) |
Module | matrix_class |
Notes | Size of matrix in container |
Name of routine: | matrix_nrows |
---|---|
Source lines: | 8351 - 8356 |
Type | function |
Call | matrix_nrows(a) |
Module | matrix_class |
Notes | Number of matrix rows accessor |
Name of routine: | matrix_ncols |
---|---|
Source lines: | 8360 - 8365 |
Type | function |
Call | matrix_ncols(a) |
Module | matrix_class |
Notes | Number of matrix cols accessor |
Name of routine: | matrix_type |
---|---|
Source lines: | 8369 - 8374 |
Type | function |
Call | matrix_type(a) |
Module | matrix_class |
Notes | Matrix storage type |
Name of routine: | matrix_write |
---|---|
Source lines: | 8378 - 8418 |
Type | subroutine |
Call | matrix_write(a, stream, iflag) |
Module | matrix_class |
Notes | Write a matrix |
Name of routine: | matrix_write_row |
---|---|
Source lines: | 8423 - 8444 |
Type | subroutine |
Call | matrix_write_row(irow, a, stream) |
Module | matrix_class |
Notes | Write one row of a matrix to an open stream, needed by disjoin, nuclear etc |
Name of routine: | matrix_write_filtered_row |
---|---|
Source lines: | 8448 - 8473 |
Type | subroutine |
Call | matrix_write_filtered_row(irow, a, ncols, cols, stream) |
Module | matrix_class |
Notes | Write selected elements of one row |
Name of routine: | matrix_read |
---|---|
Source lines: | 8477 - 8496 |
Type | subroutine |
Call | matrix_read(stream, a, iflag) |
Module | matrix_class |
Notes | Read a matrix |
Name of routine: | matrix_read_unformatted |
---|---|
Source lines: | 8500 - 8518 |
Type | subroutine |
Call | matrix_read_unformatted(stream, nr, nc, a, iflag) |
Module | matrix_class |
Notes | Fill a matrix container from a unformatted stream |
Name of routine: | matrix_read_contents |
---|---|
Source lines: | 8522 - 8585 |
Type | subroutine |
Call | matrix_read_contents(stream, a, iflag) |
Module | matrix_class |
Notes | Read in actual contents of matrix |
Name of routine: | matrix_read_row |
---|---|
Source lines: | 8590 - 8618 |
Type | subroutine |
Call | matrix_read_row(stream, irow, a) |
Module | matrix_class |
Notes | Read one row of a matrix from an open stream, was written row major by matrix_write_row |
Name of routine: | matrix_set_row |
---|---|
Source lines: | 8622 - 8669 |
Type | subroutine |
Call | matrix_set_row(ivals, irow, a, iflag) |
Module | matrix_class |
Notes | Set row |
Name of routine: | matrix_get_row |
---|---|
Source lines: | 8673 - 8706 |
Type | subroutine |
Call | matrix_get_row(a, irow, ivals, iflag) |
Module | matrix_class |
Notes | Get row |
Name of routine: | matrix_copy_row |
---|---|
Source lines: | 8710 - 8739 |
Type | subroutine |
Call | matrix_copy_row(rowa, a, rowb, b, iflag) |
Module | matrix_class |
Notes | Copy row |
Name of routine: | matrix_set_col |
---|---|
Source lines: | 8743 - 8790 |
Type | subroutine |
Call | matrix_set_col(ivals, icol, a, iflag) |
Module | matrix_class |
Notes | Set col |
Name of routine: | matrix_get_col |
---|---|
Source lines: | 8794 - 8828 |
Type | subroutine |
Call | matrix_get_col(a, icol, ivals, iflag) |
Module | matrix_class |
Notes | Get col: updates column buffer |
Name of routine: | matrix_set_el |
---|---|
Source lines: | 8832 - 8854 |
Type | subroutine |
Call | matrix_set_el(ival, irow, icol, a, iflag) |
Module | matrix_class |
Notes | Set element: updates column buffer as well if current |
Name of routine: | matrix_get_el |
---|---|
Source lines: | 8858 - 8897 |
Type | subroutine |
Call | matrix_get_el(irow, icol, a, ival, iflag) |
Module | matrix_class |
Notes | Get element: updates column buffer |
Name of routine: | matrix_print |
---|---|
Source lines: | 8901 - 8929 |
Type | subroutine |
Call | matrix_print(a) |
Module | matrix_class |
Notes | Print matrix |
Name of routine: | setup_tbi |
---|---|
Source lines: | 8998 - 9026 |
Type | subroutine |
Call | setup_tbi(tbi_index) |
Module | tabixtools |
Notes | tabix position index |
Name of routine: | read_tbi |
---|---|
Source lines: | 9028 - 9179 |
Type | subroutine |
Call | read_tbi(filnam, tbi_index, istat) |
Module | tabixtools |
Notes | tabix position index |
Name of routine: | load_tbi |
---|---|
Source lines: | 9183 - 9208 |
Type | subroutine |
Call | load_tbi(filnam, tbi_index, has_tbi) |
Module | tabixtools |
Notes | Test if matching tbi file available |
Name of routine: | show_tbi |
---|---|
Source lines: | 9212 - 9341 |
Type | subroutine |
Call | show_tbi(tbi_index, plevel) |
Module | tabixtools |
Notes | Summarize current tabix indices |
Name of routine: | tbi_virpos |
---|---|
Source lines: | 9345 - 9350 |
Type | subroutine |
Call | tbi_virpos(pos, bpos, boff) |
Module | tabixtools |
Notes | tabix "virtual position" |
Name of routine: | reg2bin |
---|---|
Source lines: | 9355 - 9372 |
Type | function |
Call | reg2bin(sta, fin1) |
Module | tabixtools |
Notes | tabix index bin corresponding to region after the C example code by Heng Li |
Name of routine: | search_tbi |
---|---|
Source lines: | 9376 - 9471 |
Type | subroutine |
Call | search_tbi(tbi_index, coordinates, typ) |
Module | tabixtools |
Notes | Search indexed file |
Name of routine: | moveto_tbi |
---|---|
Source lines: | 9479 - 9537 |
Type | subroutine |
Call | moveto_tbi(tbi_index, chr, mappos, port, slin, stat) |
Module | tabixtools |
Notes | Move to position corresponding to genomic location in indexed VCF file stat= 1 greater than 0 exact position -1 not present in indices -2 read error |
Name of routine: | openvcf |
---|---|
Source lines: | 9548 - 9602 |
Type | subroutine |
Call | openvcf(filnam, port, lin, stat) |
Module | vcftools |
Notes | Open VCF file and read metainformation |
Name of routine: | metavcf_vars |
---|---|
Source lines: | 9607 - 9695 |
Type | subroutine |
Call | metavcf_vars(port, lin, infovars, stat, plevel) |
Module | vcftools |
Notes | Count or check INFO variables are declared in heading VCF file infovars contains comma separated list of variables that should be present |
Name of routine: | increment_vcfcounts |
---|---|
Source lines: | 9699 - 9723 |
Type | subroutine |
Call | increment_vcfcounts(mappos, refallele, othallele, filter, info, newchrom, lastpos, sorted, mapstart, mapend, nmar, nindel, npass, nstruct) |
Module | vcftools |
Notes | Update various summaries about VCF file |
Name of routine: | count_vcflines |
---|---|
Source lines: | 9727 - 9785 |
Type | subroutine |
Call | count_vcflines(filnam, nlines, exact) |
Module | vcftools |
Notes | Just number of loci |
Name of routine: | queryvcf |
---|---|
Source lines: | 9794 - 10120 |
Type | subroutine |
Call | queryvcf(filnam, addloci, numloc, offset, plevel) |
Module | vcftools |
Notes | Basic descriptives addloci=2: declare loci chrcode=1: standard codes for chromosomes, number, X, Y, Mt 2: and, 23=X 24=Y 25=PAR 26=Mit offset : usually 0, but ANNOVAR appends data after annotations so offset=51 for the examples I have |
Name of routine: | rdvcf |
---|---|
Source lines: | 10128 - 10278 |
Type | subroutine |
Call | rdvcf(port, chrcode, nmark, selchrom, mapstart, mapend, numloc, offset) |
Module | vcftools |
Notes | Declare markers read from VCF file CHROM POS ID REF ALT QUAL FILTER INFO chrcode=2 if numeric X,Y,Mit If tabix indexed, then must be sorted, so do not have to (re)read entire file |
Name of routine: | read_vcfmap |
---|---|
Source lines: | 10282 - 10422 |
Type | subroutine |
Call | read_vcfmap(port, nterms, terms, plevel) |
Module | vcftools |
Notes | Read just the locations and INFO for existing loci |
Name of routine: | info_description |
---|---|
Source lines: | 10427 - 10513 |
Type | subroutine |
Call | info_description(nvars, vars, varsubsep, slin, nfound, ninfovars, ninfosubvars, plevel) |
Module | vcftools |
Notes | Read and find INFO variable description Recode subvariables in search strings to their list position |
Name of routine: | extract_annotation |
---|---|
Source lines: | 10517 - 10574 |
Type | subroutine |
Call | extract_annotation(nvars, vars, varsubsep, slin, res) |
Module | vcftools |
Notes | Extract VCF INFO variables from line |
Name of routine: | getvcfanno |
---|---|
Source lines: | 10581 - 10766 |
Type | subroutine |
Call | getvcfanno(typ, filnam, nterms, terms, plevel) |
Module | vcftools |
Notes | (re)scan VCF file and extract INFO variable data to locnotes (typ=1), locstats (typ=2), loc (typ=3), or screen (typ=4) include ability to extract nth value from an ANNOVAR type list variable In files I am currently dealing with, this variable is CSQ |
Name of routine: | tabulate_info |
---|---|
Source lines: | 10770 - 10941 |
Type | subroutine |
Call | tabulate_info(filnam, nterms, terms, plevel) |
Module | vcftools |
Notes | Tabulate VCF INFO variable values |
Name of routine: | make_vcfhash |
---|---|
Source lines: | 10969 - 11128 |
Type | subroutine |
Call | make_vcfhash(filnam, vcfhash, plevel, offset) |
Module | vcfhash_class |
Notes | hash VCF file by locus name |
Name of routine: | expand_vcfhash |
---|---|
Source lines: | 11132 - 11183 |
Type | subroutine |
Call | expand_vcfhash(vcfhash, expand) |
Module | vcfhash_class |
Notes | Expand vcfhash storage |
Name of routine: | write_vcfhash |
---|---|
Source lines: | 11185 - 11224 |
Type | subroutine |
Call | write_vcfhash(filnam, vcfhash) |
Module | vcfhash_class |
Notes | hash VCF file by locus name |
Name of routine: | read_vcfhash |
---|---|
Source lines: | 11226 - 11313 |
Type | subroutine |
Call | read_vcfhash(filnam, vcfhash, plevel) |
Module | vcfhash_class |
Notes | hash VCF file by locus name |
Name of routine: | show_vcfhash |
---|---|
Source lines: | 11315 - 11324 |
Type | subroutine |
Call | show_vcfhash(vcfhash) |
Module | vcfhash_class |
Notes | hash VCF file by locus name |
Name of routine: | check_vcfhash |
---|---|
Source lines: | 11326 - 11415 |
Type | subroutine |
Call | check_vcfhash(vcfhash, plevel) |
Module | vcfhash_class |
Notes | hash VCF file by locus name |
Name of routine: | moveto_vcf |
---|---|
Source lines: | 11422 - 11468 |
Type | subroutine |
Call | moveto_vcf(vcfhash, pos_str, port, slin, stat) |
Module | vcfhash_class |
Notes | Move to position corresponding to genomic location in vcfhash VCF file stat= 0 exact position -1 not present in indices -2 read error |
Name of routine: | search_vcfhash |
---|---|
Source lines: | 11470 - 11530 |
Type | subroutine |
Call | search_vcfhash(ntrget, trget, vcfhash) |
Module | vcfhash_class |
Notes | hash VCF file by locus name |
Name of routine: | getvcfanno2 |
---|---|
Source lines: | 11534 - 11641 |
Type | subroutine |
Call | getvcfanno2(typ, nterms, terms, vcfhash, plevel) |
Module | vcfhash_class |
Notes | Get annotation from hashed VCF file |
Name of routine: | reorder_vcf |
---|---|
Source lines: | 11645 - 11787 |
Type | subroutine |
Call | reorder_vcf(vcfhash, infil, outfil, liftover) |
Module | vcfhash_class |
Notes | Reorder VCF file following Sib-pair locus order - needs to be hashed |
Name of routine: | get_varinfo |
---|---|
Source lines: | 11794 - 11832 |
Type | subroutine |
Call | get_varinfo(lin, locnam, refall, altall) |
Module | gtftools |
Notes | GTF (GFF, GVF) |
Name of routine: | open_fasta |
---|---|
Source lines: | 11860 - 11912 |
Type | subroutine |
Call | open_fasta(fil, fasta_container, stat) |
Module | fastatools |
Notes | FASTA .fa and .fai index file .fai contains 5 tab-delimited fields per record (made by faidx or Sib-pair): NAME Name of this reference sequence LENGTH Total length of this reference sequence, in bases OFFSET Offset within the FASTA file of this sequence's first base LINEBASES The number of bases on each line, usually 60 LINEWIDTH The number of bytes in each line, including the newline .fa file is description string (one line), then corresponding sequence |
Name of routine: | close_fasta |
---|---|
Source lines: | 11914 - 11922 |
Type | subroutine |
Call | close_fasta(fasta_container) |
Module | fastatools |
Notes | FASTA .fa and .fai index file .fai contains 5 tab-delimited fields per record (made by faidx or Sib-pair): NAME Name of this reference sequence LENGTH Total length of this reference sequence, in bases OFFSET Offset within the FASTA file of this sequence's first base LINEBASES The number of bases on each line, usually 60 LINEWIDTH The number of bytes in each line, including the newline .fa file is description string (one line), then corresponding sequence |
Name of routine: | get_fastaref |
---|---|
Source lines: | 11926 - 11964 |
Type | subroutine |
Call | get_fastaref(group, bp, fasta_container, refall) |
Module | fastatools |
Notes | Retrieve reference sequence at given position |
Name of routine: | show_fasta |
---|---|
Source lines: | 11968 - 11997 |
Type | subroutine |
Call | show_fasta(fasta_container, plevel) |
Module | fastatools |
Notes | summary of FASTA file |
Name of routine: | query_fastaseq |
---|---|
Source lines: | 12001 - 12037 |
Type | subroutine |
Call | query_fastaseq(fil, mappos, seqlen) |
Module | fastatools |
Notes | wrapper for get_fastaref |
Name of routine: | query_fasta |
---|---|
Source lines: | 12041 - 12051 |
Type | subroutine |
Call | query_fasta(fil, plevel) |
Module | fastatools |
Notes | wrapper for show_fasta |
Name of routine: | index_fasta |
---|---|
Source lines: | 12055 - 12141 |
Type | subroutine |
Call | index_fasta(fil, stat) |
Module | fastatools |
Notes | Make an faindex type index file |
Name of routine: | genofile_create |
---|---|
Source lines: | 12164 - 12175 |
Type | subroutine |
Call | genofile_create(filnam, f) |
Module | genofile_class |
Notes | an object representing genotype data in a file |
Name of routine: | genofile_destroy |
---|---|
Source lines: | 12177 - 12185 |
Type | subroutine |
Call | genofile_destroy(f) |
Module | genofile_class |
Notes | an object representing genotype data in a file |
Name of routine: | genofile_active |
---|---|
Source lines: | 12189 - 12193 |
Type | function |
Call | genofile_active(f) |
Module | genofile_class |
Notes | Test if matrix allocated/active |
Name of routine: | setup_peds |
---|---|
Source lines: | 12258 - 12360 |
Type | subroutine |
Call | setup_peds(nped, nobs, numloc, numcol, dataset, astat, plevel) |
Module | ped_class |
Notes | allocate pedigree data |
Name of routine: | copy_peds |
---|---|
Source lines: | 12364 - 12403 |
Type | subroutine |
Call | copy_peds(set1, set2) |
Module | ped_class |
Notes | copy pedigree data |
Name of routine: | cleanup_peds |
---|---|
Source lines: | 12407 - 12438 |
Type | subroutine |
Call | cleanup_peds(dataset) |
Module | ped_class |
Notes | deallocate pedigree structure arrays |
Name of routine: | insert_new_record |
---|---|
Source lines: | 12449 - 12572 |
Type | subroutine |
Call | insert_new_record(pos, dataset, stat, before) |
Module | ped_class |
Notes | insert a new pedigree member into active dataset 1. unrelated, new pedigree 2. unrelated, existing pedigree 3. parent of index 4. offspring of mating Low level insertion of a record before/after position in same pedigree Pedigree level variables num and nfound are updated |
Name of routine: | expand_pheno |
---|---|
Source lines: | 12577 - 12599 |
Type | subroutine |
Call | expand_pheno(newcol, dataset, astat) |
Module | ped_class |
Notes | expand phenotype storage |
Name of routine: | expand_geno |
---|---|
Source lines: | 12603 - 12649 |
Type | subroutine |
Call | expand_geno(newcol, dataset, astat) |
Module | ped_class |
Notes | expand genotype storage |
Name of routine: | expand_sgeno |
---|---|
Source lines: | 12653 - 12697 |
Type | subroutine |
Call | expand_sgeno(newcol, dataset, astat) |
Module | ped_class |
Notes | expand SNP storage |
Name of routine: | get_geno |
---|---|
Source lines: | 12701 - 12748 |
Type | subroutine |
Call | get_geno(idx, gcol1, gcol2, dataset, g1, g2) |
Module | ped_class |
Notes | Extract a genotype either stored as alleles or SNP genotypes |
Name of routine: | encode_geno1 |
---|---|
Source lines: | 12753 - 12770 |
Type | subroutine |
Call | encode_geno1(g1, g2, ig1, ig2) |
Module | ped_class |
Notes | Transfer genotype to internal coding if snptyp = 1, then one allele per byte |
Name of routine: | encode_geno2 |
---|---|
Source lines: | 12775 - 12803 |
Type | subroutine |
Call | encode_geno2(g1, g2, ig, whichpos) |
Module | ped_class |
Notes | Transfer genotype to internal coding if snptyp = 2, then one genotype per byte |
Name of routine: | set_geno |
---|---|
Source lines: | 12807 - 12830 |
Type | subroutine |
Call | set_geno(idx, gcol1, gcol2, dataset, g1, g2) |
Module | ped_class |
Notes | Set a genotype |
Name of routine: | observed |
---|---|
Source lines: | 12834 - 12854 |
Type | function |
Call | observed(idx, gcol, dataset) |
Module | ped_class |
Notes | Test if genotype is observed |
Name of routine: | missing |
---|---|
Source lines: | 12856 - 12881 |
Type | function |
Call | missing(idx, gcol, dataset) |
Module | ped_class |
Notes |
Name of routine: | show_ped_allocation |
---|---|
Source lines: | 12883 - 12968 |
Type | subroutine |
Call | show_ped_allocation(dataset, firstloc, lastloc, nshow) |
Module | ped_class |
Notes |
Name of routine: | show_snp |
---|---|
Source lines: | 12970 - 12990 |
Type | subroutine |
Call | show_snp(idx, gpos, dataset) |
Module | ped_class |
Notes |
Name of routine: | setup_freq |
---|---|
Source lines: | 13040 - 13047 |
Type | subroutine |
Call | setup_freq(nall, allele_buffer) |
Module | alleles_class |
Notes | initialize allele_data |
Name of routine: | copyfreq |
---|---|
Source lines: | 13051 - 13073 |
Type | subroutine |
Call | copyfreq(allele_buffer, allele_buffer2) |
Module | alleles_class |
Notes | Copy allele frequency data from one structure to another |
Name of routine: | expand_alleles |
---|---|
Source lines: | 13077 - 13100 |
Type | subroutine |
Call | expand_alleles(allele_buffer, nextra) |
Module | alleles_class |
Notes | expand size of an allele frequency structure |
Name of routine: | cleanup_alleles |
---|---|
Source lines: | 13104 - 13126 |
Type | subroutine |
Call | cleanup_alleles(allele_buffer) |
Module | alleles_class |
Notes | release memory held by an allele frequency structure |
Name of routine: | genot |
---|---|
Source lines: | 13130 - 13144 |
Type | subroutine |
Call | genot(allele_buffer, gfrq) |
Module | alleles_class |
Notes | produce genotype frequencies for Metropolis algorithm |
Name of routine: | calc_gtp_freqs |
---|---|
Source lines: | 13147 - 13165 |
Type | subroutine |
Call | calc_gtp_freqs(allele_buffer) |
Module | alleles_class |
Notes | or for sequential imputation |
Name of routine: | calc_naive_freq_ase |
---|---|
Source lines: | 13169 - 13182 |
Type | subroutine |
Call | calc_naive_freq_ase(allele_buffer) |
Module | alleles_class |
Notes | naive standard errors for allele frequencies |
Name of routine: | setup_allele_array |
---|---|
Source lines: | 13186 - 13193 |
Type | subroutine |
Call | setup_allele_array(nmark, alleles) |
Module | alleles_class |
Notes | initialize allele_array |
Name of routine: | cleanup_allele_array |
---|---|
Source lines: | 13195 - 13200 |
Type | subroutine |
Call | cleanup_allele_array(alleles) |
Module | alleles_class |
Notes | Allele frequency data structure |
Name of routine: | is_a |
---|---|
Source lines: | 13226 - 13230 |
Type | function |
Call | is_a(g) |
Module | nucleotides |
Notes | each nucleotide |
Name of routine: | is_c |
---|---|
Source lines: | 13231 - 13235 |
Type | function |
Call | is_c(g) |
Module | nucleotides |
Notes | each nucleotide |
Name of routine: | is_g |
---|---|
Source lines: | 13236 - 13240 |
Type | function |
Call | is_g(g) |
Module | nucleotides |
Notes | each nucleotide |
Name of routine: | is_t |
---|---|
Source lines: | 13241 - 13245 |
Type | function |
Call | is_t(g) |
Module | nucleotides |
Notes | each nucleotide |
Name of routine: | flip_atgc |
---|---|
Source lines: | 13249 - 13257 |
Type | function |
Call | flip_atgc(g) |
Module | nucleotides |
Notes | complement nucleotide: all |
Name of routine: | flip_ac |
---|---|
Source lines: | 13261 - 13267 |
Type | function |
Call | flip_ac(g) |
Module | nucleotides |
Notes | complement nucleotide: AC |
Name of routine: | flip_ag |
---|---|
Source lines: | 13271 - 13277 |
Type | function |
Call | flip_ag(g) |
Module | nucleotides |
Notes | complement nucleotide: AG |
Name of routine: | flip_ct |
---|---|
Source lines: | 13281 - 13287 |
Type | function |
Call | flip_ct(g) |
Module | nucleotides |
Notes | complement nucleotide: CT |
Name of routine: | flip_gt |
---|---|
Source lines: | 13291 - 13297 |
Type | function |
Call | flip_gt(g) |
Module | nucleotides |
Notes | complement nucleotide: GT |
Name of routine: | nttonum |
---|---|
Source lines: | 13301 - 13314 |
Type | function |
Call | nttonum(g) |
Module | nucleotides |
Notes | number code nucleotide |
Name of routine: | numtont |
---|---|
Source lines: | 13318 - 13326 |
Type | function |
Call | numtont(g) |
Module | nucleotides |
Notes | number code nucleotide |
Name of routine: | isntcode |
---|---|
Source lines: | 13334 - 13348 |
Type | function |
Call | isntcode(g) |
Module | nucleotides |
Notes | test if locus has only nucleotide alleles in consistent encoding 0 = no 1 = (1,2,3,4) 2 = (A,C,G,T) 3 = (a,c,g,t) |
Name of routine: | allntcode |
---|---|
Source lines: | 13350 - 13382 |
Type | function |
Call | allntcode(typ, gene, dataset) |
Module | nucleotides |
Notes | Routines to manipulate nucleotide alleles: numeric to letter, strand flipping, |
Name of routine: | ntcode |
---|---|
Source lines: | 13386 - 13428 |
Type | subroutine |
Call | ntcode(typ, gene, dataset) |
Module | nucleotides |
Notes | recode SNP alleles to/from numerical coding A<->1 C<->2 G<->3 T<->4 |
Name of routine: | nuccode |
---|---|
Source lines: | 13432 - 13488 |
Type | subroutine |
Call | nuccode(gene, loctyp, locnotes, allele_buffer, dataset) |
Module | nucleotides |
Notes | recode 1,2 or A,B to nucleotide code based on annotation |
Name of routine: | flip_buffer |
---|---|
Source lines: | 13493 - 13508 |
Type | subroutine |
Call | flip_buffer(allele_buffer, flip_) |
Module | nucleotides |
Notes | flip allele labels in allele container to complement eg other strand A<->T G<->C NB allele container allele list is usually ordered by allele collation order |
Name of routine: | flip |
---|---|
Source lines: | 13512 - 13551 |
Type | subroutine |
Call | flip(loc, gene, flip_, dataset, plevel) |
Module | nucleotides |
Notes | flip alleles in dataset to complement eg other strand A<->T G<->C |
Name of routine: | strandhet |
---|---|
Source lines: | 13556 - 13671 |
Type | subroutine |
Call | strandhet(loc, gene, dataset, allele_buffer, nhetclasses, hetclasses, hwep, plevel) |
Module | nucleotides |
Notes | Test if mix of genotypes for a locus are compatible with a strand mixup Either test observed genotypes or compare to reference set |
Name of routine: | refstrand |
---|---|
Source lines: | 13679 - 13821 |
Type | subroutine |
Call | refstrand(typ, loc, gene, dataset, allele_buffer, ref_allele_buffer, comp_status, plevel) |
Module | nucleotides |
Notes | Reconcile strand for observed genotypes to a reference set Use frequency information when complementary alleles within system typ=1 flip genotypes in current dataset typ=2 flip list of alleles in *reference* set, to be used to read in matching VCF or PLINK file |
Name of routine: | extract_one_allele |
---|---|
Source lines: | 13826 - 13836 |
Type | subroutine |
Call | extract_one_allele(str, longall, all1) |
Module | nucleotides |
Notes | Suitably mung long alleles in a VCF type ALT (usually comma separated) to a character (similar routine for allele_data) |
Name of routine: | extract_alt_alleles |
---|---|
Source lines: | 13838 - 13861 |
Type | subroutine |
Call | extract_alt_alleles(str, all1, all2) |
Module | nucleotides |
Notes | Routines to manipulate nucleotide alleles: numeric to letter, strand flipping, |
Name of routine: | load_refallele |
---|---|
Source lines: | 13865 - 13888 |
Type | subroutine |
Call | load_refallele(refall, altall, altfreq, ref_allele_buffer) |
Module | nucleotides |
Notes | Load reference alleles into an allele container |
Name of routine: | load_vcf_refall |
---|---|
Source lines: | 13893 - 13992 |
Type | subroutine |
Call | load_vcf_refall(typ, vcf_ac, vcf_an, vcf_het, vcf_hom, slin, vcf_alleles) |
Module | nucleotides |
Notes | Load reference alleles from a line of a VCF file into an allele container if typ == 2 then VCF file expected to have summary allele count information |
Name of routine: | make_ntlist |
---|---|
Source lines: | 13996 - 14037 |
Type | subroutine |
Call | make_ntlist(allele_buffer, A, C, T, G, numnt, ntlist, astat) |
Module | nucleotides |
Notes | List nucleotides in allele list , returning indicator variables and string |
Name of routine: | complement |
---|---|
Source lines: | 14041 - 14057 |
Type | function |
Call | complement(nt) |
Module | nucleotides |
Notes | Complement nucleotide characters for annotation |
Name of routine: | dohash_ped_id |
---|---|
Source lines: | 14069 - 14077 |
Type | function |
Call | dohash_ped_id(idx, dataset, maxkey) |
Module | idhash_funs |
Notes | pedigree + individual ID |
Name of routine: | dohash_id |
---|---|
Source lines: | 14079 - 14086 |
Type | function |
Call | dohash_id(idx, dataset, maxkey) |
Module | idhash_funs |
Notes | individual ID |
Name of routine: | domatch_ped_id |
---|---|
Source lines: | 14088 - 14096 |
Type | function |
Call | domatch_ped_id(idx, iaddress, dataset) |
Module | idhash_funs |
Notes | match pedigree + individual ID |
Name of routine: | domatch_id |
---|---|
Source lines: | 14098 - 14104 |
Type | function |
Call | domatch_id(idx, iaddress, dataset) |
Module | idhash_funs |
Notes | match individual id |
Name of routine: | domatch_string_ped_id |
---|---|
Source lines: | 14106 - 14115 |
Type | function |
Call | domatch_string_ped_id(pedstr, indstr, iaddress, dataset) |
Module | idhash_funs |
Notes | match search string to pedigree + individual ID |
Name of routine: | domatch_string_id |
---|---|
Source lines: | 14117 - 14124 |
Type | function |
Call | domatch_string_id(idstr, iaddress, dataset) |
Module | idhash_funs |
Notes | match search string to individual ID |
Name of routine: | jack_useful |
---|---|
Source lines: | 14153 - 14169 |
Type | function |
Call | jack_useful(npairs, iter, plevel) |
Module | relpair_classes |
Notes | function to test if jackknife sensible |
Name of routine: | kuonen_k0 |
---|---|
Source lines: | 14183 - 14188 |
Type | function |
Call | kuonen_k0(zeta, a) |
Module | kuonen_chisqsum |
Notes | Statistical functions library First, support routines for Kuonen saddlepoint approximation for the distribution of a quadratic form in p standard Normal variables ie a linear combination of p chi-squared distributions with 1 df. After the code in Thomas Lumley's survey package |
Name of routine: | kuonen_kp0 |
---|---|
Source lines: | 14189 - 14194 |
Type | function |
Call | kuonen_kp0(zeta, a) |
Module | kuonen_chisqsum |
Notes | Statistical functions library First, support routines for Kuonen saddlepoint approximation for the distribution of a quadratic form in p standard Normal variables ie a linear combination of p chi-squared distributions with 1 df. After the code in Thomas Lumley's survey package |
Name of routine: | kuonen_kpp0 |
---|---|
Source lines: | 14195 - 14200 |
Type | function |
Call | kuonen_kpp0(zeta, a) |
Module | kuonen_chisqsum |
Notes | Statistical functions library First, support routines for Kuonen saddlepoint approximation for the distribution of a quadratic form in p standard Normal variables ie a linear combination of p chi-squared distributions with 1 df. After the code in Thomas Lumley's survey package |
Name of routine: | brent_kp0 |
---|---|
Source lines: | 14203 - 14207 |
Type | function |
Call | brent_kp0(zeta) |
Module | kuonen_chisqsum |
Notes | And for minimizing wrt observed statistic |
Name of routine: | betacf |
---|---|
Source lines: | 14223 - 14258 |
Type | function |
Call | betacf(a,b,x) |
Module | statfuns |
Notes | betacf from Numerical Recipes, 1986 |
Name of routine: | ibeta |
---|---|
Source lines: | 14266 - 14333 |
Type | function |
Call | ibeta(x, p, q) |
Module | statfuns |
Notes | This function computes the beta cumulative distribution function at the point x. p and q are the exponents of x and 1-x in the beta density. see KL Majumder GP Bhattacharjee (1973). Algorithm AS 63 The incomplete beta integral. Appl Stat 22: 409-411. |
Name of routine: | fp |
---|---|
Source lines: | 14337 - 14362 |
Type | function |
Call | fp(x, n1, n2) |
Module | statfuns |
Notes | F-ratio P-values |
Name of routine: | tp |
---|---|
Source lines: | 14366 - 14373 |
Type | function |
Call | tp(x, df) |
Module | statfuns |
Notes | Wrap fp to give t-distribution P-values |
Name of routine: | chip |
---|---|
Source lines: | 14377 - 14410 |
Type | function |
Call | chip(chisq, df) |
Module | statfuns |
Notes | Evaluate central chi-square in FORTRAN |
Name of routine: | gammad |
---|---|
Source lines: | 14416 - 14524 |
Type | function |
Call | gammad(x, p, ifault) |
Module | statfuns |
Notes | Algorithm AS239 Appl. Statist. (1988) Vol. 37, No. 3 Computation of the Incomplete Gamma Integral |
Name of routine: | alngam |
---|---|
Source lines: | 14529 - 14639 |
Type | function |
Call | alngam(xvalue, ifault) |
Module | statfuns |
Notes | ALGORITHM AS245 APPL. STATIST. (1989) VOL. 38, NO. 2 Calculation of the logarithm of the gamma function |
Name of routine: | chi2nc |
---|---|
Source lines: | 14647 - 14710 |
Type | function |
Call | chi2nc(x, f, ncp, ifault) |
Module | statfuns |
Notes | ALGORITHM AS 275 APPL.STATIST. (1992), VOL.41, NO.2 Computes the noncentral chi-square distribution function with positive real degrees of freedom f and nonnegative noncentrality parameter theta |
Name of routine: | zp |
---|---|
Source lines: | 14716 - 14760 |
Type | function |
Call | zp(z) |
Module | statfuns |
Notes | Normal distribution probabilities accurate to 1d-15. Reference: J.L. Schonfelder, Math Comp 32(1978), pp 1232-1240. Gives one additional digit of accuracy cf Alan Miller's |
Name of routine: | mvbvu |
---|---|
Source lines: | 14784 - 14881 |
Type | function |
Call | mvbvu(sh, sk, r) |
Module | statfuns |
Notes | A function for computing bivariate normal probabilities; developed using Drezner, Z. and Wesolowsky, G. O. (1989), On the Computation of the Bivariate Normal Integral, J. Stat. Comput. Simul.. 35 pp. 101-107. with extensive modications for double precisions by Alan Genz and Yihong Ge Department of Mathematics Washington State University Pullman, WA 99164-3113 Email : alangenz@wsu.edu BVN - calculate the probability that X is larger than SH and Y is larger than SK. Parameters SH REAL, integration limit SK REAL, integration limit R REAL, correlation coefficient LG INTEGER, number of Gauss Rule Points and Weights |
Name of routine: | mecdf |
---|---|
Source lines: | 14898 - 14962 |
Type | subroutine |
Call | mecdf(ndim, d, idir, rho, prob, ier) |
Module | statfuns |
Notes | From TOMS717 Bunch DS, Gay DM, Welsch RE. Subroutines for Maximum Likelihood and Quasi-Likelihood Estimation of Parameters in Nonlinear Regression Models mecdf is designed to calculate the MVN CDF using the Mendell-Elston procedure as described in Kamakura (1989). NOTE: Equation (15) in Kamakura has an error. Specifically, assume that Z is a set of random variables with a standard normal distribution with correlations stored in RHO (in packed form). Then this subroutine calculates Prob[Z(1)>D(1);...; Z(NDIM) > D(NDIM)]. Code converted using TO_F90 by Alan Miller |
Name of routine: | phi |
---|---|
Source lines: | 14964 - 14978 |
Type | function |
Call | phi(x, y) |
Module | statfuns |
Notes | All the functions |
Name of routine: | ppnd |
---|---|
Source lines: | 14984 - 15067 |
Type | function |
Call | ppnd(p) |
Module | statfuns |
Notes | ALGORITHM AS241 APPL. STATIST. (1988) VOL. 37, NO. 3 Produces the normal deviate Z corresponding to a given lower tail area of P. Replaces AS111 as more accurate for smaller P's. |
Name of routine: | chisqd |
---|---|
Source lines: | 15073 - 15134 |
Type | function |
Call | chisqd(p, n) |
Module | statfuns |
Notes | Richard Goldstein, Algorithm 451: Chi-Square Quantiles, Communications of the ACM, August 1973, Volume 16, Number 8, pages 483-484. Transcribed to machine readable form by John Burkhardt |
Name of routine: | satterthwaite |
---|---|
Source lines: | 15187 - 15200 |
Type | function |
Call | satterthwaite(q, a) |
Module | statfuns |
Notes | Satterthwaite approximation for quadratic form of normals |
Name of routine: | fact |
---|---|
Source lines: | 15204 - 15221 |
Type | function |
Call | fact(n) |
Module | statfuns |
Notes | Factorial |
Name of routine: | lfact |
---|---|
Source lines: | 15225 - 15230 |
Type | function |
Call | lfact(n) |
Module | statfuns |
Notes | Log factorial |
Name of routine: | dnorm |
---|---|
Source lines: | 15234 - 15245 |
Type | function |
Call | dnorm(x, mu, sd) |
Module | statfuns |
Notes | Log gaussian density |
Name of routine: | dpois |
---|---|
Source lines: | 15249 - 15261 |
Type | function |
Call | dpois(x, mu) |
Module | statfuns |
Notes | Log poisson density |
Name of routine: | dweib |
---|---|
Source lines: | 15265 - 15282 |
Type | function |
Call | dweib(x, mu, shap, cens) |
Module | statfuns |
Notes | Log Weibull density (with censoring) |
Name of routine: | binp |
---|---|
Source lines: | 15286 - 15309 |
Type | function |
Call | binp(np,nq) |
Module | statfuns |
Notes | Binomial probabilities for x,n-x with p=0.5 |
Name of routine: | pchisqsum |
---|---|
Source lines: | 15314 - 15358 |
Type | subroutine |
Call | pchisqsum(q, a, pval) |
Module | statfuns |
Notes | Saddlepoint approximation routine for quadratic form in normal variables |
Name of routine: | mvndst |
---|---|
Source lines: | 15419 - 15456 |
Type | subroutine |
Call | mvndst(n, lower, upper, infin, correl, maxpts, abseps, releps, error, value, inform) |
Module | mftfuns |
Notes | A subroutine for computing multivariate normal probabilities. This subroutine uses an algorithm given in the paper "Numerical Computation of Multivariate Normal Probabilities", in J. of Computational and Graphical Stat., 1(1992), pp. 141-149, by Alan Genz Department of Mathematics Washington State University Pullman, WA 99164-3113 Email : AlanGenz@wsu.edu Parameters N INTEGER, the number of variables. LOWER REAL, array of lower integration limits. UPPER REAL, array of upper integration limits. INFIN INTEGER, array of integration limits flags: if INFIN(I) < 0, Ith limits are (-infinity, infinity); if INFIN(I) = 0, Ith limits are (-infinity, UPPER(I)]; if INFIN(I) = 1, Ith limits are [LOWER(I), infinity); if INFIN(I) = 2, Ith limits are [LOWER(I), UPPER(I)]. CORREL REAL, array of correlation coefficients; the correlation coefficient in row I column J of the correlation matrix should be stored in CORREL( J + ((I-2)*(I-1))/2 ), for J < I. The correlation matrix must be positive semidefinite. MAXPTS INTEGER, maximum number of function values allowed. This parameter can be used to limit the time. A sensible strategy is to start with MAXPTS = 1000*N, and then increase MAXPTS if ERROR is too large. ABSEPS REAL absolute error tolerance. RELEPS REAL relative error tolerance. ERROR REAL estimated absolute error, with 99% confidence level. VALUE REAL estimated value for the integral INFORM INTEGER, termination status parameter: if INFORM = 0, normal completion with ERROR < EPS; if INFORM = 1, completion with ERROR > EPS and MAXPTS function values used; increase MAXPTS to decrease ERROR; if INFORM = 2, N > 500 or N < 1. |
Name of routine: | mvndfn |
---|---|
Source lines: | 15460 - 15548 |
Type | function |
Call | mvndfn( n, w ) |
Module | mftfuns |
Notes | Integrand subroutine |
Name of routine: | mvnlms |
---|---|
Source lines: | 15550 - 15565 |
Type | subroutine |
Call | mvnlms( a, b, infin, lower, upper ) |
Module | mftfuns |
Notes |
Name of routine: | covsrt |
---|---|
Source lines: | 15569 - 15737 |
Type | subroutine |
Call | covsrt(n, lower, upper, correl, infin, y, infis, a, b, cov, infi) |
Module | mftfuns |
Notes | Subroutine to sort integration limits and determine Cholesky factor. |
Name of routine: | dkswap |
---|---|
Source lines: | 15739 - 15746 |
Type | subroutine |
Call | dkswap( x, y ) |
Module | mftfuns |
Notes | Swap elements |
Name of routine: | rcswp |
---|---|
Source lines: | 15750 - 15782 |
Type | subroutine |
Call | rcswp( p, q, a, b, infin, n, c ) |
Module | mftfuns |
Notes | Swaps rows and columns P and Q in situ, with P <= Q. |
Name of routine: | dkbvrc |
---|---|
Source lines: | 15833 - 16041 |
Type | subroutine |
Call | dkbvrc(ndim, minvls, maxvls, functn, abseps, releps, abserr, finest, inform ) |
Module | mftfuns |
Notes | ABSEPS Required absolute accuracy. RELEPS Required relative accuracy. ***** Output parameters MINVLS Actual number of function evaluations used. ABSERR Estimated absolute accuracy of FINEST. FINEST Estimated value of integral. INFORM INFORM = 0 for normal exit, when ABSERR <= MAX(ABSEPS, RELEPS*ABS(FINEST)) and INTVLS <= MAXCLS. INFORM = 1 If MAXVLS was too small to obtain the required accuracy. In this case a value FINEST is returned with estimated absolute accuracy ABSERR. |
Name of routine: | dksmrc |
---|---|
Source lines: | 16043 - 16077 |
Type | subroutine |
Call | dksmrc( ndim, klim, sumkro, prime, vk, functn, x ) |
Module | mftfuns |
Notes |
Name of routine: | printmat |
---|---|
Source lines: | 16182 - 16193 |
Type | subroutine |
Call | printmat(n, c, fstring) |
Module | symmetric_matrix |
Notes | print n rows of symmetric lower triangular matrix |
Name of routine: | printmat_full |
---|---|
Source lines: | 16197 - 16216 |
Type | subroutine |
Call | printmat_full(n, c) |
Module | symmetric_matrix |
Notes | print entire symmetric matrix |
Name of routine: | hashmat |
---|---|
Source lines: | 16220 - 16232 |
Type | function |
Call | hashmat(n, c) |
Module | symmetric_matrix |
Notes | hash code for a matrix - after the Java equivalent |
Name of routine: | postmult |
---|---|
Source lines: | 16238 - 16258 |
Type | subroutine |
Call | postmult(n, x, c, w) |
Module | symmetric_matrix |
Notes | Evaluate S x where S is symmetric lower triangular matrix x is a vector |
Name of routine: | postmultm |
---|---|
Source lines: | 16264 - 16288 |
Type | subroutine |
Call | postmultm(n, m, x, c, w) |
Module | symmetric_matrix |
Notes | Evaluate S X where S is symmetric lower triangular matrix X is a full n*m matrix |
Name of routine: | sumsym |
---|---|
Source lines: | 16293 - 16309 |
Type | subroutine |
Call | sumsym(n, c, res) |
Module | symmetric_matrix |
Notes | Evaluate 1' S 1 where S is symmetric lower triangular matrix |
Name of routine: | quadmult |
---|---|
Source lines: | 16314 - 16335 |
Type | subroutine |
Call | quadmult(typ, n, x, c, res) |
Module | symmetric_matrix |
Notes | Evaluate (typ=1) x' S x or (typ=2) 1' S x where S is symmetric lower triangular matrix |
Name of routine: | quadxxm |
---|---|
Source lines: | 16342 - 16362 |
Type | subroutine |
Call | quadxxm(n, m, x, c, res) |
Module | symmetric_matrix |
Notes | Evaluate X' S X where S is symmetric lower triangular matrix X n*m matrix result returned in lower triangular form |
Name of routine: | quadxy |
---|---|
Source lines: | 16368 - 16383 |
Type | subroutine |
Call | quadxy(n, x, c, y, res) |
Module | symmetric_matrix |
Notes | Evaluate x' S y where S is symmetric lower triangular matrix x, y are 1-D arrays |
Name of routine: | quadxymv |
---|---|
Source lines: | 16389 - 16405 |
Type | subroutine |
Call | quadxymv(n, m, x, c, y, res) |
Module | symmetric_matrix |
Notes | Evaluate X' S y where S is symmetric lower triangular matrix X full n*m matrix, y n-vector |
Name of routine: | quadxym |
---|---|
Source lines: | 16411 - 16422 |
Type | subroutine |
Call | quadxym(n, m1, m2, x, c, y, res) |
Module | symmetric_matrix |
Notes | Evaluate X' S Y where S is symmetric lower triangular matrix X, Y full n*m1,n*m2 matrices |
Name of routine: | quadxy1 |
---|---|
Source lines: | 16428 - 16443 |
Type | subroutine |
Call | quadxy1(n, m, c, y, res) |
Module | symmetric_matrix |
Notes | Evaluate 1' S Y where S is symmetric lower triangular matrix Y full n*m matrix |
Name of routine: | quadform |
---|---|
Source lines: | 16447 - 16461 |
Type | subroutine |
Call | quadform(n, x, m, c, res) |
Module | symmetric_matrix |
Notes | Evaluate (y-m)' S (y-m) where S is symmetric lower triangular matrix |
Name of routine: | chol |
---|---|
Source lines: | 16465 - 16522 |
Type | subroutine |
Call | chol(a, n, nn, u, nullty, ifault) |
Module | symmetric_matrix |
Notes | Choleski decomposition of a symmetric matrix stored as lower triangular |
Name of routine: | lowermult |
---|---|
Source lines: | 16526 - 16540 |
Type | subroutine |
Call | lowermult(n, y, s, w) |
Module | symmetric_matrix |
Notes | Evaluate S y, where S is lower triangular |
Name of routine: | addridge |
---|---|
Source lines: | 16544 - 16554 |
Type | subroutine |
Call | addridge(n, s, m) |
Module | symmetric_matrix |
Notes | Augment main diagnonal of symmetric matrix by factor |
Name of routine: | rs |
---|---|
Source lines: | 17596 - 17621 |
Type | subroutine |
Call | rs(nm, n, a, w, matz, z, fv1, fv2, ierr) |
Module | EISPACK |
Notes | This subroutine calls the recommended sequence of subroutines from the Eigensystem Subroutine Package (EISPACK) to find the eigenvalues and eigenvectors (if desired) of a real symmetric matrix. |
Name of routine: | tred1 |
---|---|
Source lines: | 17630 - 17733 |
Type | subroutine |
Call | tred1(nm, n, a, d, e, e2) |
Module | EISPACK |
Notes | This EISPACK subroutine is a translation of the Algol procedure TRED1, Num. Math. 11, 181-195(1968) by Martin, Reinsch, and Wilkinson. Handbook for Auto. Comp., Vol.II-Linear Algebra, 212-226(1971). This subroutine reduces a real symmetric matrix to a symmetric tridiagonal matrix using orthogonal similarity transformations. |
Name of routine: | tred2 |
---|---|
Source lines: | 17742 - 17882 |
Type | subroutine |
Call | tred2(nm, n, a, d, e, z) |
Module | EISPACK |
Notes | This EISPACK subroutine is a translation of the Algol procedure TRED2, Num. Math. 11, 181-195(1968) by Martin, Reinsch, and Wilkinson. Handbook for Auto. Comp., Vol.II-Linear Algebra, 212-226(1971). This subroutine reduces a real symmetric matrix to a symmetric tridiagonal matrix using and accumulating orthogonal similarity transformations. |
Name of routine: | tqlrat |
---|---|
Source lines: | 17890 - 17987 |
Type | subroutine |
Call | tqlrat(n, d, e2, ierr) |
Module | EISPACK |
Notes | This EISPACK subroutine is a translation of the Algol procedure TQLRAT, Algorithm 464, Comm. ACM 16, 689(1973) By Reinsch. This subroutine finds the eigenvalues of a symmetric tridiagonal matrix by the rational QL method. |
Name of routine: | tql2 |
---|---|
Source lines: | 17999 - 18141 |
Type | subroutine |
Call | tql2(nm, n, d, e, z, ierr) |
Module | EISPACK |
Notes | This EISPACK subroutine is a translation of the Algol procedure TQL2, Num. Math. 11, 293-306(1968) by Bowdler, Martin, Reinsch, and Wilkinson. Handbook for Auto. Comp., Vol.II-Linear Algebra, 227-240(1971). This subroutine finds the eigenvalues and eigenvectors of a symmetric tridiagonal matrix by the ql method. The eigenvectors of a full symmetric matrix can also be found if tred2 has been used to reduce this full matrix to tridiagonal form. |
Name of routine: | pythag |
---|---|
Source lines: | 18145 - 18166 |
Type | function |
Call | pythag(a, b) |
Module | EISPACK |
Notes | Finds dsqrt(A**2+B**2) without overflow or destructive underflow |
Name of routine: | |
---|---|
Source lines: | 18170 - 18184 |
Type | function |
Call | epslon (x) |
Module | EISPACK |
Notes | estimate unit roundoff in quantities of size x |
Name of routine: | decgtp |
---|---|
Source lines: | 18211 - 18222 |
Type | subroutine |
Call | decgtp(val, g1, g2) |
Module | recast_data |
Notes | Decode hashed genotype code |
Name of routine: | encgtp |
---|---|
Source lines: | 18226 - 18236 |
Type | function |
Call | encgtp(a1, a2) |
Module | recast_data |
Notes | Hash a genotype |
Name of routine: | iencgtp |
---|---|
Source lines: | 18240 - 18250 |
Type | function |
Call | iencgtp(a1, a2) |
Module | recast_data |
Notes | Hash an integer genotype |
Name of routine: | encchr |
---|---|
Source lines: | 18254 - 18276 |
Type | subroutine |
Call | encchr(chr, val) |
Module | recast_data |
Notes | Hash a chromosome retaining nice collation order |
Name of routine: | decchr |
---|---|
Source lines: | 18280 - 18302 |
Type | subroutine |
Call | decchr(val, chr) |
Module | recast_data |
Notes | Unhash a chromosome |
Name of routine: | chr_convert |
---|---|
Source lines: | 18306 - 18322 |
Type | subroutine |
Call | chr_convert(typ, string, chr) |
Module | recast_data |
Notes | read in a chromosome name - HSA chr 23-26 often are X, Y, PAR (XY), MT |
Name of routine: | make_mapranges |
---|---|
Source lines: | 18347 - 18381 |
Type | subroutine |
Call | make_mapranges(rangetable, mr) |
Module | maprange_class |
Notes | make_mapranges takes a table of three vars: chr, lower, upper |
Name of routine: | show_mapranges |
---|---|
Source lines: | 18383 - 18393 |
Type | subroutine |
Call | show_mapranges(mr) |
Module | maprange_class |
Notes | Storage for a range of map positions chromosome chromosome_name mapranges range_start range_end chromrange first_range_record last_range_record |
Name of routine: | clean_mapranges |
---|---|
Source lines: | 18395 - 18406 |
Type | subroutine |
Call | clean_mapranges(mr) |
Module | maprange_class |
Notes | Storage for a range of map positions chromosome chromosome_name mapranges range_start range_end chromrange first_range_record last_range_record |
Name of routine: | in_mapranges |
---|---|
Source lines: | 18410 - 18431 |
Type | subroutine |
Call | in_mapranges(chr, mappos, mr, res) |
Module | maprange_class |
Notes | Test if in ranges |
Name of routine: | loadpos |
---|---|
Source lines: | 18458 - 18622 |
Type | subroutine |
Call | loadpos(sta, fin, words, nloci, loc, lochash, loctyp, group, map, locstat, chosen, nterms, terms, typ) |
Module | map_position_list |
Notes | like loadnam, but by position typ=1 active loci, =2 inactive loci |
Name of routine: | marshare |
---|---|
Source lines: | 18636 - 18674 |
Type | subroutine |
Call | marshare(idx, nloci, loctyp, locpos, dataset, marcom) |
Module | read_data |
Notes | Count maximum number of active markers where proband and any of relatives is genotyped at (for autovar) |
Name of routine: | autovar |
---|---|
Source lines: | 18678 - 18772 |
Type | subroutine |
Call | autovar(idx, ctag, nloci, loctyp, locpos, dataset, res) |
Module | read_data |
Notes | Evaluate automatic variable |
Name of routine: | readval |
---|---|
Source lines: | 18776 - 18807 |
Type | subroutine |
Call | readval(mistyp, idx, nloc, loclist, nloci, loc, locpos, loctyp, dataset, val, astat) |
Module | read_data |
Notes | Values for one individual for insertion into contingency table |
Name of routine: | readoneval |
---|---|
Source lines: | 18811 - 18848 |
Type | subroutine |
Call | readoneval(idx, lpos, ltyp, nloci, loctyp, locpos, dataset, mistyp, val, astat) |
Module | read_data |
Notes | Value for one phenotype for one individual |
Name of routine: | maketab |
---|---|
Source lines: | 18852 - 18897 |
Type | subroutine |
Call | maketab(mistyp, weight, nloc, loclist, nloci, loc, locpos, loctyp, dataset, nmiss, table) |
Module | read_data |
Notes | Fill a crosstabulation from dataset |
Name of routine: | strat_freq |
---|---|
Source lines: | 18901 - 18965 |
Type | subroutine |
Call | strat_freq(nloc, loclist, nloci, loc, locpos, loctyp, allele_buffer, dataset, nmiss, table) |
Module | read_data |
Notes | Returns table of allele counts by stratum 1..(nloc-1)=strata levels nloc=gene |
Name of routine: | copy_mem |
---|---|
Source lines: | 19219 - 19239 |
Type | subroutine |
Call | copy_mem(a, b) |
Module | scheme_lang |
Notes | Memory management copy contents of a to b |
Name of routine: | init_mem |
---|---|
Source lines: | 19241 - 19254 |
Type | subroutine |
Call | init_mem(a, sta, fin) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | setup_mem |
---|---|
Source lines: | 19258 - 19292 |
Type | subroutine |
Call | setup_mem(siz) |
Module | scheme_lang |
Notes | allocate cells for main memory object mem |
Name of routine: | cleanup_bank |
---|---|
Source lines: | 19298 - 19312 |
Type | subroutine |
Call | cleanup_bank(sta, fin) |
Module | scheme_lang |
Notes | Clean up memory arrays Zero a block of cells, including deallocating strings |
Name of routine: | cleanup_mem |
---|---|
Source lines: | 19316 - 19319 |
Type | subroutine |
Call | cleanup_mem() |
Module | scheme_lang |
Notes | Free all memory |
Name of routine: | save_scheme_image |
---|---|
Source lines: | 19323 - 19343 |
Type | subroutine |
Call | save_scheme_image(strm, ios) |
Module | scheme_lang |
Notes | Save memory image |
Name of routine: | read_scheme_image |
---|---|
Source lines: | 19347 - 19378 |
Type | subroutine |
Call | read_scheme_image(strm, ios) |
Module | scheme_lang |
Notes | Read memory image |
Name of routine: | gc_mark |
---|---|
Source lines: | 19384 - 19423 |
Type | subroutine |
Call | gc_mark(a) |
Module | scheme_lang |
Notes | Mark-sweep garbage collector Mark cells to be saved |
Name of routine: | gc |
---|---|
Source lines: | 19428 - 19468 |
Type | subroutine |
Call | gc(a, b, plevel) |
Module | scheme_lang |
Notes | Copy all registers to free memory Reset pointers from old addresses to new addresses |
Name of routine: | getcell |
---|---|
Source lines: | 19472 - 19496 |
Type | function |
Call | getcell(a, b) |
Module | scheme_lang |
Notes | Get next free cell |
Name of routine: | set_type |
---|---|
Source lines: | 19501 - 19505 |
Type | subroutine |
Call | set_type(p, iflag) |
Module | scheme_lang |
Notes | Cell type operations Setting values |
Name of routine: | set_ivalue |
---|---|
Source lines: | 19506 - 19511 |
Type | subroutine |
Call | set_ivalue(p, ivalue) |
Module | scheme_lang |
Notes | Cell type operations Setting values |
Name of routine: | set_value |
---|---|
Source lines: | 19512 - 19517 |
Type | subroutine |
Call | set_value(p, val) |
Module | scheme_lang |
Notes | Cell type operations Setting values |
Name of routine: | set_string |
---|---|
Source lines: | 19518 - 19531 |
Type | subroutine |
Call | set_string(p, str) |
Module | scheme_lang |
Notes | Cell type operations Setting values |
Name of routine: | set_substring |
---|---|
Source lines: | 19532 - 19542 |
Type | subroutine |
Call | set_substring(p, sta, fin, str) |
Module | scheme_lang |
Notes | Cell type operations Setting values |
Name of routine: | set_car |
---|---|
Source lines: | 19544 - 19547 |
Type | subroutine |
Call | set_car(p, icar) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | set_cdr |
---|---|
Source lines: | 19548 - 19551 |
Type | subroutine |
Call | set_cdr(p, icdr) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | set_caar |
---|---|
Source lines: | 19552 - 19555 |
Type | subroutine |
Call | set_caar(p, icaar) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | set_cdar |
---|---|
Source lines: | 19556 - 19559 |
Type | subroutine |
Call | set_cdar(p, icdar) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | set_syntaxnum |
---|---|
Source lines: | 19560 - 19563 |
Type | subroutine |
Call | set_syntaxnum(p, op) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | get_ivalue |
---|---|
Source lines: | 19567 - 19571 |
Type | function |
Call | get_ivalue(p) |
Module | scheme_lang |
Notes | Getting values |
Name of routine: | get_value |
---|---|
Source lines: | 19573 - 19581 |
Type | function |
Call | get_value(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | rvalue |
---|---|
Source lines: | 19583 - 19591 |
Type | function |
Call | rvalue(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | get_string |
---|---|
Source lines: | 19595 - 19605 |
Type | function |
Call | get_string(p) |
Module | scheme_lang |
Notes | Strings |
Name of routine: | append_string |
---|---|
Source lines: | 19609 - 19632 |
Type | subroutine |
Call | append_string(p, str) |
Module | scheme_lang |
Notes | Append to existing string |
Name of routine: | get_substr |
---|---|
Source lines: | 19634 - 19647 |
Type | function |
Call | get_substr(p, sta, fin) |
Module | scheme_lang |
Notes | Substring |
Name of routine: | get_strlen |
---|---|
Source lines: | 19649 - 19653 |
Type | function |
Call | get_strlen(p) |
Module | scheme_lang |
Notes | String length |
Name of routine: | get_listlen |
---|---|
Source lines: | 19655 - 19667 |
Type | function |
Call | get_listlen(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | get_listtail |
---|---|
Source lines: | 19671 - 19682 |
Type | function |
Call | get_listtail(p, idx) |
Module | scheme_lang |
Notes | memory location of kth list item |
Name of routine: | ishomog |
---|---|
Source lines: | 19686 - 19700 |
Type | function |
Call | ishomog(p, typfun) |
Module | scheme_lang |
Notes | is homogenous list of given type? |
Name of routine: | get_carray |
---|---|
Source lines: | 19704 - 19717 |
Type | subroutine |
Call | get_carray(p, n, strings, width) |
Module | scheme_lang |
Notes | homogenous list to Fortran array |
Name of routine: | get_iarray |
---|---|
Source lines: | 19719 - 19732 |
Type | subroutine |
Call | get_iarray(p, n, r) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | get_rarray |
---|---|
Source lines: | 19734 - 19773 |
Type | subroutine |
Call | get_rarray(p, n, r, missing) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | append_iarray |
---|---|
Source lines: | 19777 - 19787 |
Type | subroutine |
Call | append_iarray(ivals, res) |
Module | scheme_lang |
Notes | append fortran array values to list |
Name of routine: | append_rarray |
---|---|
Source lines: | 19789 - 19799 |
Type | subroutine |
Call | append_rarray(rvals, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | get_var |
---|---|
Source lines: | 19806 - 19916 |
Type | subroutine |
Call | get_var(string, pos, fin, istat) |
Module | scheme_lang |
Notes | allowing access to Scheme environment from Sib-pair accessible variables are atomic result inserted into passed string |
Name of routine: | list_var |
---|---|
Source lines: | 19920 - 19986 |
Type | subroutine |
Call | list_var(typ, ple) |
Module | scheme_lang |
Notes | List Sib-pair accessible (atomic or pair) variables |
Name of routine: | isbound |
---|---|
Source lines: | 19990 - 20015 |
Type | function |
Call | isbound(nam) |
Module | scheme_lang |
Notes | test if a name is bound in the top environment |
Name of routine: | isafun |
---|---|
Source lines: | 20019 - 20048 |
Type | function |
Call | isafun(nam) |
Module | scheme_lang |
Notes | Test if a macro function exists, and return address of body |
Name of routine: | procnum |
---|---|
Source lines: | 20050 - 20054 |
Type | function |
Call | procnum(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | syntaxnum |
---|---|
Source lines: | 20055 - 20059 |
Type | function |
Call | syntaxnum(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | typeof |
---|---|
Source lines: | 20063 - 20067 |
Type | function |
Call | typeof(p) |
Module | scheme_lang |
Notes | Underlying primitives for Scheme |
Name of routine: | isstring |
---|---|
Source lines: | 20068 - 20072 |
Type | function |
Call | isstring(p) |
Module | scheme_lang |
Notes | Underlying primitives for Scheme |
Name of routine: | isnumber |
---|---|
Source lines: | 20073 - 20077 |
Type | function |
Call | isnumber(p) |
Module | scheme_lang |
Notes | Underlying primitives for Scheme |
Name of routine: | ispair |
---|---|
Source lines: | 20078 - 20082 |
Type | function |
Call | ispair(p) |
Module | scheme_lang |
Notes | Underlying primitives for Scheme |
Name of routine: | car |
---|---|
Source lines: | 20086 - 20090 |
Type | function |
Call | car(p) |
Module | scheme_lang |
Notes | car, cdr etc |
Name of routine: | cdr |
---|---|
Source lines: | 20091 - 20095 |
Type | function |
Call | cdr(p) |
Module | scheme_lang |
Notes | car, cdr etc |
Name of routine: | caar |
---|---|
Source lines: | 20097 - 20102 |
Type | function |
Call | caar(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cadr |
---|---|
Source lines: | 20103 - 20108 |
Type | function |
Call | cadr(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cdar |
---|---|
Source lines: | 20109 - 20114 |
Type | function |
Call | cdar(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cddr |
---|---|
Source lines: | 20115 - 20120 |
Type | function |
Call | cddr(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cadar |
---|---|
Source lines: | 20121 - 20127 |
Type | function |
Call | cadar(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | caddr |
---|---|
Source lines: | 20128 - 20134 |
Type | function |
Call | caddr(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cadaar |
---|---|
Source lines: | 20135 - 20142 |
Type | function |
Call | cadaar(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cadddr |
---|---|
Source lines: | 20143 - 20150 |
Type | function |
Call | cadddr(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | cddddr |
---|---|
Source lines: | 20151 - 20158 |
Type | function |
Call | cddddr(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | issymbol |
---|---|
Source lines: | 20160 - 20164 |
Type | function |
Call | issymbol(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | issyntax |
---|---|
Source lines: | 20165 - 20169 |
Type | function |
Call | issyntax(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | isproc |
---|---|
Source lines: | 20170 - 20174 |
Type | function |
Call | isproc(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | isclosure |
---|---|
Source lines: | 20175 - 20179 |
Type | function |
Call | isclosure(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | ismacro |
---|---|
Source lines: | 20180 - 20184 |
Type | function |
Call | ismacro(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | iscontinuation |
---|---|
Source lines: | 20185 - 20189 |
Type | function |
Call | iscontinuation(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | ispromise |
---|---|
Source lines: | 20190 - 20194 |
Type | function |
Call | ispromise(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | isport |
---|---|
Source lines: | 20195 - 20199 |
Type | function |
Call | isport(p) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | istrue |
---|---|
Source lines: | 20201 - 20205 |
Type | function |
Call | istrue(p) |
Module | scheme_lang |
Notes | true or false value functions |
Name of routine: | isfalse |
---|---|
Source lines: | 20206 - 20210 |
Type | function |
Call | isfalse(p) |
Module | scheme_lang |
Notes | true or false value functions |
Name of routine: | isinteger |
---|---|
Source lines: | 20214 - 20218 |
Type | function |
Call | isinteger(p) |
Module | scheme_lang |
Notes | tower of numbers |
Name of routine: | isfloat |
---|---|
Source lines: | 20219 - 20223 |
Type | function |
Call | isfloat(p) |
Module | scheme_lang |
Notes | tower of numbers |
Name of routine: | isatom |
---|---|
Source lines: | 20227 - 20231 |
Type | function |
Call | isatom(p) |
Module | scheme_lang |
Notes | Garbage collection |
Name of routine: | setatom |
---|---|
Source lines: | 20232 - 20235 |
Type | subroutine |
Call | setatom(p) |
Module | scheme_lang |
Notes | Garbage collection |
Name of routine: | clratom |
---|---|
Source lines: | 20236 - 20239 |
Type | subroutine |
Call | clratom(p) |
Module | scheme_lang |
Notes | Garbage collection |
Name of routine: | ismark |
---|---|
Source lines: | 20240 - 20244 |
Type | function |
Call | ismark(p) |
Module | scheme_lang |
Notes | Garbage collection |
Name of routine: | setmark |
---|---|
Source lines: | 20245 - 20248 |
Type | subroutine |
Call | setmark(p) |
Module | scheme_lang |
Notes | Garbage collection |
Name of routine: | clrmark |
---|---|
Source lines: | 20249 - 20252 |
Type | subroutine |
Call | clrmark(p) |
Module | scheme_lang |
Notes | Garbage collection |
Name of routine: | cons |
---|---|
Source lines: | 20256 - 20263 |
Type | function |
Call | cons(reg1, reg2) |
Module | scheme_lang |
Notes | Cons |
Name of routine: | ceqstr |
---|---|
Source lines: | 20267 - 20284 |
Type | function |
Call | ceqstr(cstr, reg) |
Module | scheme_lang |
Notes | Contents of a Lisp string cell equal to a Fortran string |
Name of routine: | streq |
---|---|
Source lines: | 20288 - 20304 |
Type | function |
Call | streq(a, b) |
Module | scheme_lang |
Notes | Contents of a Lisp string equal to a Lisp string |
Name of routine: | mk_number |
---|---|
Source lines: | 20308 - 20316 |
Type | function |
Call | mk_number(num) |
Module | scheme_lang |
Notes | Declare a number |
Name of routine: | mk_real |
---|---|
Source lines: | 20320 - 20328 |
Type | function |
Call | mk_real(num) |
Module | scheme_lang |
Notes | Declare a real |
Name of routine: | mk_string |
---|---|
Source lines: | 20332 - 20340 |
Type | function |
Call | mk_string(str) |
Module | scheme_lang |
Notes | Declare a string |
Name of routine: | mk_symbol |
---|---|
Source lines: | 20344 - 20361 |
Type | function |
Call | mk_symbol(nam) |
Module | scheme_lang |
Notes | Declare a symbol |
Name of routine: | append_one_string |
---|---|
Source lines: | 20364 - 20378 |
Type | function |
Call | append_one_string(str, l, protect) |
Module | scheme_lang |
Notes | cons string to list |
Name of routine: | append_one_real |
---|---|
Source lines: | 20381 - 20395 |
Type | function |
Call | append_one_real(num, l, protect) |
Module | scheme_lang |
Notes | cons real to list |
Name of routine: | append_one_number |
---|---|
Source lines: | 20398 - 20412 |
Type | function |
Call | append_one_number(num, l, protect) |
Module | scheme_lang |
Notes | cons integer to list |
Name of routine: | make_real_matrix |
---|---|
Source lines: | 20416 - 20449 |
Type | function |
Call | make_real_matrix(nvals, vals, nr, protect) |
Module | scheme_lang |
Notes | make matrix from 1-D array |
Name of routine: | gensym |
---|---|
Source lines: | 20453 - 20472 |
Type | function |
Call | gensym() |
Module | scheme_lang |
Notes | automatically generate a unique symbol |
Name of routine: | mk_atom |
---|---|
Source lines: | 20477 - 20517 |
Type | function |
Call | mk_atom(str) |
Module | scheme_lang |
Notes | make symbol or number atom from string |
Name of routine: | mk_const |
---|---|
Source lines: | 20521 - 20565 |
Type | function |
Call | mk_const(nam) |
Module | scheme_lang |
Notes | Make a constant |
Name of routine: | mk_closure |
---|---|
Source lines: | 20569 - 20578 |
Type | function |
Call | mk_closure(c, e) |
Module | scheme_lang |
Notes | make closure, c is code, e is environment |
Name of routine: | mk_continuation |
---|---|
Source lines: | 20582 - 20590 |
Type | function |
Call | mk_continuation(d) |
Module | scheme_lang |
Notes | make continuation |
Name of routine: | mk_port |
---|---|
Source lines: | 20594 - 20604 |
Type | function |
Call | mk_port(iport, nam) |
Module | scheme_lang |
Notes | make a port |
Name of routine: | test_port |
---|---|
Source lines: | 20607 - 20618 |
Type | function |
Call | test_port(iport) |
Module | scheme_lang |
Notes | Test a port - return location in portaddress |
Name of routine: | reverse |
---|---|
Source lines: | 20622 - 20637 |
Type | function |
Call | reverse(a) |
Module | scheme_lang |
Notes | Reverse list |
Name of routine: | non_alloc_rev |
---|---|
Source lines: | 20641 - 20657 |
Type | function |
Call | non_alloc_rev(term, list) |
Module | scheme_lang |
Notes | Reverse list -- no new cell generated |
Name of routine: | append |
---|---|
Source lines: | 20661 - 20677 |
Type | function |
Call | append(a, b) |
Module | scheme_lang |
Notes | append list -- make new cells |
Name of routine: | eqv |
---|---|
Source lines: | 20681 - 20696 |
Type | function |
Call | eqv(a, b) |
Module | scheme_lang |
Notes | equivalence of atoms |
Name of routine: | save_linbuffer |
---|---|
Source lines: | 20700 - 20712 |
Type | subroutine |
Call | save_linbuffer() |
Module | scheme_lang |
Notes | save or restore command line buffer (f95 compatible) |
Name of routine: | restore_linbuffer |
---|---|
Source lines: | 20714 - 20721 |
Type | subroutine |
Call | restore_linbuffer() |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | inchar |
---|---|
Source lines: | 20725 - 20754 |
Type | subroutine |
Call | inchar(ch) |
Module | scheme_lang |
Notes | get a new character from input file or stdin |
Name of routine: | clearinput |
---|---|
Source lines: | 20758 - 20760 |
Type | subroutine |
Call | clearinput() |
Module | scheme_lang |
Notes | clear input buffer |
Name of routine: | flushinput |
---|---|
Source lines: | 20764 - 20770 |
Type | subroutine |
Call | flushinput() |
Module | scheme_lang |
Notes | back to standard input |
Name of routine: | backchar |
---|---|
Source lines: | 20774 - 20776 |
Type | subroutine |
Call | backchar() |
Module | scheme_lang |
Notes | backstep one character in input buffer |
Name of routine: | skipspace |
---|---|
Source lines: | 20780 - 20790 |
Type | subroutine |
Call | skipspace() |
Module | scheme_lang |
Notes | skip whitespace |
Name of routine: | token |
---|---|
Source lines: | 20794 - 20839 |
Type | function |
Call | token() |
Module | scheme_lang |
Notes | get next token |
Name of routine: | scheme_delim |
---|---|
Source lines: | 20843 - 20851 |
Type | function |
Call | scheme_delim(ch) |
Module | scheme_lang |
Notes | read characters to delimiter -- hard coded to work on Windows as well |
Name of routine: | readstr |
---|---|
Source lines: | 20853 - 20871 |
Type | subroutine |
Call | readstr(res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | readstrexp |
---|---|
Source lines: | 20875 - 20898 |
Type | subroutine |
Call | readstrexp(res, reslen) |
Module | scheme_lang |
Notes | read rest of a quoted string |
Name of routine: | printatom |
---|---|
Source lines: | 20902 - 20979 |
Type | subroutine |
Call | printatom(l, space, ndigits, commainterval, style) |
Module | scheme_lang |
Notes | print an atom |
Name of routine: | padprint |
---|---|
Source lines: | 20983 - 21020 |
Type | subroutine |
Call | padprint(str, space, commainterval) |
Module | scheme_lang |
Notes | Pad printing of an atom |
Name of routine: | ok_abbrev |
---|---|
Source lines: | 21022 - 21026 |
Type | function |
Call | ok_abbrev(x) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | s_save |
---|---|
Source lines: | 21028 - 21033 |
Type | subroutine |
Call | s_save(a, b, c) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | s_return |
---|---|
Source lines: | 21034 - 21042 |
Type | subroutine |
Call | s_return(a) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | s_retbool |
---|---|
Source lines: | 21043 - 21050 |
Type | subroutine |
Call | s_retbool(tf) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | opexe0 |
---|---|
Source lines: | 21055 - 21393 |
Type | subroutine |
Call | opexe0(op, inline) |
Module | scheme_lang |
Notes | Apply Scheme commands - split into opexe0 to opexe14 load -- let* |
Name of routine: | opexe1 |
---|---|
Source lines: | 21397 - 21622 |
Type | subroutine |
Call | opexe1(op) |
Module | scheme_lang |
Notes | Scheme procedures letrc -- call/cc |
Name of routine: | opexe2 |
---|---|
Source lines: | 21626 - 21895 |
Type | subroutine |
Call | opexe2(op) |
Module | scheme_lang |
Notes | Scheme procedures plus -- set-cdr! |
Name of routine: | opexe3 |
---|---|
Source lines: | 21899 - 21986 |
Type | subroutine |
Call | opexe3(op) |
Module | scheme_lang |
Notes | Scheme procedures not -- eqv? |
Name of routine: | opexe4 |
---|---|
Source lines: | 21990 - 22099 |
Type | subroutine |
Call | opexe4(op, plevel) |
Module | scheme_lang |
Notes | Scheme procedures force -- gc -- new-segment |
Name of routine: | opexe5 |
---|---|
Source lines: | 22103 - 22239 |
Type | subroutine |
Call | opexe5(op, plevel) |
Module | scheme_lang |
Notes | Scheme procedures read expression |
Name of routine: | opexe6 |
---|---|
Source lines: | 22243 - 22298 |
Type | subroutine |
Call | opexe6(op) |
Module | scheme_lang |
Notes | Scheme procedures length -- macro? |
Name of routine: | opexe7 |
---|---|
Source lines: | 22302 - 22387 |
Type | subroutine |
Call | opexe7(op) |
Module | scheme_lang |
Notes | Mathematical functions |
Name of routine: | opexe8 |
---|---|
Source lines: | 22391 - 22499 |
Type | subroutine |
Call | opexe8(op) |
Module | scheme_lang |
Notes | A few other library functions eg min, max |
Name of routine: | opexe9 |
---|---|
Source lines: | 22503 - 22775 |
Type | subroutine |
Call | opexe9(op) |
Module | scheme_lang |
Notes | string functions |
Name of routine: | getint |
---|---|
Source lines: | 22777 - 22793 |
Type | subroutine |
Call | getint(pos, slen, string, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | opexe10 |
---|---|
Source lines: | 22798 - 23365 |
Type | subroutine |
Call | opexe10(op, plevel) |
Module | scheme_lang |
Notes | Nonstandard library additions for system interface such as system, read-line Extensions for i/o and accessing system facilities eg inquire, time, date |
Name of routine: | opexe11 |
---|---|
Source lines: | 23369 - 23533 |
Type | subroutine |
Call | opexe11(op) |
Module | scheme_lang |
Notes | Statistical library |
Name of routine: | opexe12 |
---|---|
Source lines: | 23537 - 23921 |
Type | subroutine |
Call | opexe12(op, plevel) |
Module | scheme_lang |
Notes | Procedures that interact with Sib-pair |
Name of routine: | opexe13 |
---|---|
Source lines: | 23925 - 24584 |
Type | subroutine |
Call | opexe13(op, plevel) |
Module | scheme_lang |
Notes | Manipulate Sib-pair dataset |
Name of routine: | table_label |
---|---|
Source lines: | 24586 - 24614 |
Type | function |
Call | table_label(i, ncol, table, protect) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | alldata |
---|---|
Source lines: | 24618 - 24632 |
Type | subroutine |
Call | alldata(res, extractor) |
Module | scheme_lang |
Notes | pedigree data accessor |
Name of routine: | extract_ped |
---|---|
Source lines: | 24636 - 24642 |
Type | function |
Call | extract_ped(i, res) |
Module | scheme_lang |
Notes | extractors for different pedigree data fields |
Name of routine: | extract_id |
---|---|
Source lines: | 24644 - 24650 |
Type | function |
Call | extract_id(i, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | extract_iped |
---|---|
Source lines: | 24652 - 24658 |
Type | function |
Call | extract_iped(i, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | extract_fa |
---|---|
Source lines: | 24660 - 24666 |
Type | function |
Call | extract_fa(i, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | extract_mo |
---|---|
Source lines: | 24668 - 24674 |
Type | function |
Call | extract_mo(i, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | extract_imztwin |
---|---|
Source lines: | 24676 - 24682 |
Type | function |
Call | extract_imztwin(i, res) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | opexe14 |
---|---|
Source lines: | 24686 - 24995 |
Type | subroutine |
Call | opexe14(op) |
Module | scheme_lang |
Notes | Scheme and xlispstat list procedures |
Name of routine: | accum_stats |
---|---|
Source lines: | 25000 - 25029 |
Type | subroutine |
Call | accum_stats(x, n, m, mean, ss, minv, maxv) |
Module | scheme_lang |
Notes | univariate summary stats - accumulate one observation n=obs m=missing mean=mean ss=sum-of-squares minv=min maxv=max |
Name of routine: | get_quantile |
---|---|
Source lines: | 25033 - 25054 |
Type | subroutine |
Call | get_quantile(q, n, rvals, val, ifault) |
Module | scheme_lang |
Notes | ith quantile |
Name of routine: | opexe17 |
---|---|
Source lines: | 25058 - 25086 |
Type | subroutine |
Call | opexe17(op) |
Module | scheme_lang |
Notes | car-cdr compositions |
Name of routine: | opexe18 |
---|---|
Source lines: | 25090 - 25176 |
Type | subroutine |
Call | opexe18(op) |
Module | scheme_lang |
Notes | set procedures |
Name of routine: | opexe15 |
---|---|
Source lines: | 25181 - 25884 |
Type | subroutine |
Call | opexe15(op) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | opexe16 |
---|---|
Source lines: | 25890 - 26228 |
Type | subroutine |
Call | opexe16(op) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | mk_syntax |
---|---|
Source lines: | 26234 - 26242 |
Type | subroutine |
Call | mk_syntax(op, nam) |
Module | scheme_lang |
Notes | Initialization of internal keywords |
Name of routine: | mk_proc |
---|---|
Source lines: | 26244 - 26253 |
Type | subroutine |
Call | mk_proc(op, nam) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | init_vars_global |
---|---|
Source lines: | 26257 - 26264 |
Type | subroutine |
Call | init_vars_global() |
Module | scheme_lang |
Notes | Initiate global environment |
Name of routine: | init_syntax |
---|---|
Source lines: | 26268 - 26286 |
Type | subroutine |
Call | init_syntax() |
Module | scheme_lang |
Notes | Initiate syntax |
Name of routine: | init_procs |
---|---|
Source lines: | 26290 - 26642 |
Type | subroutine |
Call | init_procs() |
Module | scheme_lang |
Notes | Initiate procedures |
Name of routine: | init_scm |
---|---|
Source lines: | 26646 - 26823 |
Type | subroutine |
Call | init_scm() |
Module | scheme_lang |
Notes | Inlined init.scm |
Name of routine: | init_globals |
---|---|
Source lines: | 26827 - 26839 |
Type | subroutine |
Call | init_globals() |
Module | scheme_lang |
Notes | Initiate procedures |
Name of routine: | error0 |
---|---|
Source lines: | 26843 - 26849 |
Type | subroutine |
Call | error0(s) |
Module | scheme_lang |
Notes | Error handling |
Name of routine: | error1 |
---|---|
Source lines: | 26851 - 26859 |
Type | subroutine |
Call | error1(s, a) |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | init_scheme |
---|---|
Source lines: | 26861 - 26864 |
Type | subroutine |
Call | init_scheme() |
Module | scheme_lang |
Notes | Miniscm |
Name of routine: | repl_scheme |
---|---|
Source lines: | 26868 - 26969 |
Type | subroutine |
Call | repl_scheme(inline, ple) |
Module | scheme_lang |
Notes | Scheme read-eval-print loop |
Name of routine: | setup_cats |
---|---|
Source lines: | 26984 - 27009 |
Type | subroutine |
Call | setup_cats(categories) |
Module | categorical_data |
Notes | Factor type representations for categorical data Currently factor labels are recorded in locnotes |
Name of routine: | clean_cats |
---|---|
Source lines: | 27011 - 27018 |
Type | subroutine |
Call | clean_cats(categories) |
Module | categorical_data |
Notes | Factor type representations for categorical data Currently factor labels are recorded in locnotes |
Name of routine: | relevel_cats |
---|---|
Source lines: | 27022 - 27046 |
Type | subroutine |
Call | relevel_cats(categories, dataset) |
Module | categorical_data |
Notes | recode levels so they match collation order of labels |
Name of routine: | reorder_cat |
---|---|
Source lines: | 27048 - 27084 |
Type | subroutine |
Call | reorder_cat(table, trait, dataset, allinteger) |
Module | categorical_data |
Notes | Factor type representations for categorical data Currently factor labels are recorded in locnotes |
Name of routine: | append_annotation |
---|---|
Source lines: | 27088 - 27103 |
Type | subroutine |
Call | append_annotation(cell, annotation, spaces) |
Module | categorical_data |
Notes | List levels of categorical trait for annotation |
Name of routine: | annotate_cat |
---|---|
Source lines: | 27105 - 27131 |
Type | subroutine |
Call | annotate_cat(table, annotation, allinteger) |
Module | categorical_data |
Notes | Factor type representations for categorical data Currently factor labels are recorded in locnotes |
Name of routine: | add_scheme_annotation |
---|---|
Source lines: | 27133 - 27143 |
Type | subroutine |
Call | add_scheme_annotation(loc, annotation) |
Module | categorical_data |
Notes | Factor type representations for categorical data Currently factor labels are recorded in locnotes |
Name of routine: | extract_cat |
---|---|
Source lines: | 27147 - 27179 |
Type | subroutine |
Call | extract_cat(annotation, cat_table) |
Module | categorical_data |
Notes | Extract existing level-label pairs from annotation |
Name of routine: | expand_form |
---|---|
Source lines: | 27221 - 27436 |
Type | subroutine |
Call | expand_form(sta, fin, terms, ios) |
Module | formula_class |
Notes | expand symbolic formulas involving brackets, exponentiation |
Name of routine: | find_brackets |
---|---|
Source lines: | 27438 - 27468 |
Type | subroutine |
Call | find_brackets(sta, fin, terms, lb, rb, ios) |
Module | formula_class |
Notes | Simple regression formula structure and parser formula and design matrix formula is: a b c a*b a*c b*c a*b*c T1 1 2 3 1 1 2 1 T2 . . . 2 3 3 2 T3 . . . . . . 3 TERMDIM 1 1 1 2 2 2 3 Effects 1 2 3 NLEV n1 n2 n3 STA 1 n1+1 n1+n2+1 FIN n1 n1+n2 n1+n2+n3 INFORM 1 1 1 |
Name of routine: | create_form |
---|---|
Source lines: | 27472 - 27650 |
Type | subroutine |
Call | create_form(sta, fin, terms, nloci, loc, lochash, formula) |
Module | formula_class |
Notes | read commands and write appropriate formula structure |
Name of routine: | cleanup_form |
---|---|
Source lines: | 27652 - 27663 |
Type | subroutine |
Call | cleanup_form(formula) |
Module | formula_class |
Notes | Simple regression formula structure and parser formula and design matrix formula is: a b c a*b a*c b*c a*b*c T1 1 2 3 1 1 2 1 T2 . . . 2 3 3 2 T3 . . . . . . 3 TERMDIM 1 1 1 2 2 2 3 Effects 1 2 3 NLEV n1 n2 n3 STA 1 n1+1 n1+n2+1 FIN n1 n1+n2 n1+n2+n3 INFORM 1 1 1 |
Name of routine: | sumcols_form |
---|---|
Source lines: | 27667 - 27707 |
Type | subroutine |
Call | sumcols_form(formula) |
Module | formula_class |
Notes | If levels available, evaluate total number of model parameters |
Name of routine: | show_form |
---|---|
Source lines: | 27709 - 27731 |
Type | subroutine |
Call | show_form(formula) |
Module | formula_class |
Notes | Simple regression formula structure and parser formula and design matrix formula is: a b c a*b a*c b*c a*b*c T1 1 2 3 1 1 2 1 T2 . . . 2 3 3 2 T3 . . . . . . 3 TERMDIM 1 1 1 2 2 2 3 Effects 1 2 3 NLEV n1 n2 n3 STA 1 n1+1 n1+n2+1 FIN n1 n1+n2 n1+n2+n3 INFORM 1 1 1 |
Name of routine: | test_form |
---|---|
Source lines: | 27733 - 27755 |
Type | subroutine |
Call | test_form(sta, fin, terms, nloci, loc, lochash) |
Module | formula_class |
Notes | Simple regression formula structure and parser formula and design matrix formula is: a b c a*b a*c b*c a*b*c T1 1 2 3 1 1 2 1 T2 . . . 2 3 3 2 T3 . . . . . . 3 TERMDIM 1 1 1 2 2 2 3 Effects 1 2 3 NLEV n1 n2 n3 STA 1 n1+1 n1+n2+1 FIN n1 n1+n2 n1+n2+n3 INFORM 1 1 1 |
Name of routine: | setup_props |
---|---|
Source lines: | 27915 - 27919 |
Type | subroutine |
Call | setup_props(maxsiz) |
Module | mcmc_model |
Notes | Allocate or deallocate work arrays |
Name of routine: | clean_props |
---|---|
Source lines: | 27920 - 27922 |
Type | subroutine |
Call | clean_props() |
Module | mcmc_model |
Notes | Allocate or deallocate work arrays |
Name of routine: | setup_mix |
---|---|
Source lines: | 27926 - 27981 |
Type | subroutine |
Call | setup_mix(ped, dataset, nchain, nqtl, nvar, family) |
Module | mcmc_model |
Notes | Allocate a pedigree's data arrays |
Name of routine: | setup_ibd |
---|---|
Source lines: | 28019 - 28031 |
Type | subroutine |
Call | setup_ibd(ped, nobs, nvar, family) |
Module | ibd_class |
Notes | Allocate a pedigree's data arrays |
Name of routine: | print_ibd |
---|---|
Source lines: | 28033 - 28046 |
Type | subroutine |
Call | print_ibd(family) |
Module | ibd_class |
Notes | Show a pedigree's data arrays |
Name of routine: | setup_pairs |
---|---|
Source lines: | 28065 - 28075 |
Type | subroutine |
Call | setup_pairs(npairs, pairlist) |
Module | pairlist_class |
Notes | allocate space for pairlist |
Name of routine: | clean_pairs |
---|---|
Source lines: | 28079 - 28085 |
Type | subroutine |
Call | clean_pairs(pairlist) |
Module | pairlist_class |
Notes | deallocate space |
Name of routine: | expand_pairs |
---|---|
Source lines: | 28089 - 28104 |
Type | subroutine |
Call | expand_pairs(nextra, pairlist) |
Module | pairlist_class |
Notes | increase available space |
Name of routine: | append_pair |
---|---|
Source lines: | 28108 - 28122 |
Type | subroutine |
Call | append_pair(key1, key2, pairlist) |
Module | pairlist_class |
Notes | append data, testing only latest entry for uniqueness |
Name of routine: | insert_pair |
---|---|
Source lines: | 28126 - 28174 |
Type | subroutine |
Call | insert_pair(key1, key2, pairlist) |
Module | pairlist_class |
Notes | insert data |
Name of routine: | find_pair |
---|---|
Source lines: | 28178 - 28217 |
Type | function |
Call | find_pair(key1, key2, pairlist) |
Module | pairlist_class |
Notes | find a pair |
Name of routine: | complete |
---|---|
Source lines: | 28241 - 28275 |
Type | function |
Call | complete(useimp, idx, nvar, terms, locpos, loctyp, dataset) |
Module | covariate_data |
Notes | test if complete data for i'th individual |
Name of routine: | varlevels |
---|---|
Source lines: | 28280 - 28369 |
Type | subroutine |
Call | varlevels(typ, gene, numal, nvar, varlist, loc, loctyp, locpos, dataset, covariates, plevel) |
Module | covariate_data |
Notes | Collect necessary information to create dummy variables encoding a categorical trait allocates necessary marginal table storage |
Name of routine: | fixeff |
---|---|
Source lines: | 28380 - 28534 |
Type | subroutine |
Call | fixeff(idx, designpos, interc, gene, genemod, allele_buffer, useimp, nvar, varlist, nloci, loctyp, locpos, covariates, dataset, vals, stand) |
Module | covariate_data |
Notes | One row of the design matrix for the fixed effects part of model for varcom and segsim. Possibly including one marker for full dummy encoding, which may be imputed Possibly including an intercept. Missing x values replaced by overall mean NB (20150813): if intercept present, then covariates off by one - repaired Values may be stand=1: untransformed stand=2: rescaled, affecting only quantitative traits |
Name of routine: | xmeans |
---|---|
Source lines: | 28538 - 28634 |
Type | subroutine |
Call | xmeans(nvar, varlist, nloci, loctyp, locpos, dataset, covariates) |
Module | covariate_data |
Notes | Means for set of variables (incl dummies) in formula |
Name of routine: | inicov |
---|---|
Source lines: | 28646 - 28657 |
Type | subroutine |
Call | inicov(nter, ncov, r) |
Module | AS164 |
Notes | Initialize covariance matrix used by AS164 |
Name of routine: | givenc |
---|---|
Source lines: | 28662 - 28742 |
Type | subroutine |
Call | givenc(r, ir, nvars, x, v, ifault) |
Module | AS164 |
Notes | Algorithm AS164 Appl. Statist. (1981) vol.30, no.2 Incorporate new row of data into R matrix |
Name of routine: | bsub |
---|---|
Source lines: | 28747 - 28844 |
Type | subroutine |
Call | bsub(r, ir, idep, coeff, ic, ifault) |
Module | AS164 |
Notes | Algorithm AS 164.1 Appl. Statist. (1981) vol.30, no.2 Perform back substitution to get regression coefficient estimates |
Name of routine: | var |
---|---|
Source lines: | 28849 - 28950 |
Type | subroutine |
Call | var(r, ir, s, is, idep, nobs, typ, ifault) |
Module | AS164 |
Notes | Algorithm AS164.3 Appl. Statist. (1981) vol.30, no.2 Estimates var/covar matrix of regression coefficients |
Name of routine: | alias |
---|---|
Source lines: | 28956 - 29006 |
Type | subroutine |
Call | alias(r, ir, nvars, eps, worksp, ifault) |
Module | AS164 |
Notes | Algorithm AS164.4 Appl. Statist. (1981) vol.30, no.2 Assumes any diagonal elements of d less than eps are rounding errors and reduces them to zero |
Name of routine: | clean_AS164 |
---|---|
Source lines: | 29017 - 29028 |
Type | subroutine |
Call | clean_AS164() |
Module | AS164_class |
Notes | Work arrays for AS164 -- allow passing of results to other routines |
Name of routine: | mvnlik |
---|---|
Source lines: | 29058 - 29114 |
Type | function |
Call | mvnlik(npar, parest) |
Module | likelihoods |
Notes | MVN model loglikelihood |
Name of routine: | mftlik |
---|---|
Source lines: | 29118 - 29206 |
Type | function |
Call | mftlik(npar, parest) |
Module | likelihoods |
Notes | MFT model loglikelihood |
Name of routine: | varmet |
---|---|
Source lines: | 29222 - 29392 |
Type | subroutine |
Call | varmet(fun, npar, b, f0, gradtl, toler, maxfn, ifault, plevel) |
Module | varmet_optimizer |
Notes | Algorithm AS 319 variable metric function minimisation Algorithm AS 319 Appl Statist (1997), Vol 46, No 4 Converted to Fortran 90 free-format style by Alan Miller e-mail: Alan.Miller @ vic.cmis.csiro.au URL: www.ozemail.com.au/~milleraj Actual varmet minimizer |
Name of routine: | grad |
---|---|
Source lines: | 29396 - 29439 |
Type | subroutine |
Call | grad(fun, npar, b, f0, g, sa, er, ifault) |
Module | varmet_optimizer |
Notes | Calculate approximate gradient |
Name of routine: | vmerr |
---|---|
Source lines: | 29443 - 29459 |
Type | subroutine |
Call | vmerr(ier, maxfn) |
Module | varmet_optimizer |
Notes | varmet error messages |
Name of routine: | calfun |
---|---|
Source lines: | 29470 - 29480 |
Type | subroutine |
Call | calfun(n, x, f) |
Module | bobyqa_optimizer |
Notes | Mike Powell's BOBYQA minimizer |
Name of routine: | popgen_init |
---|---|
Source lines: | 31866 - 31871 |
Type | subroutine |
Call | popgen_init() |
Module | popgen_vcdata |
Notes | Cockerham-like multi-locus variance components |
Name of routine: | popgen_summary |
---|---|
Source lines: | 31872 - 31898 |
Type | subroutine |
Call | popgen_summary(outstr, plevel) |
Module | popgen_vcdata |
Notes | Cockerham-like multi-locus variance components |
Name of routine: | popgen_homoz |
---|---|
Source lines: | 31900 - 31918 |
Type | subroutine |
Call | popgen_homoz(outstr, plevel) |
Module | popgen_vcdata |
Notes | Cockerham-like multi-locus variance components |
Name of routine: | setup_kinmat |
---|---|
Source lines: | 31941 - 31975 |
Type | subroutine |
Call | setup_kinmat(nobs, ncov, ridge_constant, plevel, ifail) |
Module | popgen_kinship |
Notes | Large dense empirical kinship matrix, its latest active subset and corresponding inverse and a hash of the ids of the dropped rows |
Name of routine: | hash_kinship |
---|---|
Source lines: | 31981 - 31994 |
Type | subroutine |
Call | hash_kinship(nfull, active) |
Module | popgen_kinship |
Notes | hash identifying particular subset of kinship matrix used to memoise inverses etc. subset_hash, subset_size are globals in module popgen_kinship |
Name of routine: | ismemoizedinv |
---|---|
Source lines: | 31996 - 32006 |
Type | function |
Call | ismemoizedinv() |
Module | popgen_kinship |
Notes | Large dense empirical kinship matrix, its latest active subset and corresponding inverse and a hash of the ids of the dropped rows |
Name of routine: | save_kininv |
---|---|
Source lines: | 32010 - 32055 |
Type | subroutine |
Call | save_kininv(nrows, logdet, ainv, stat) |
Module | popgen_kinship |
Notes | write inverse kinship matrix to file |
Name of routine: | load_kininv |
---|---|
Source lines: | 32059 - 32104 |
Type | subroutine |
Call | load_kininv(nrows, logdet, ainv, stat) |
Module | popgen_kinship |
Notes | read kinship inverse from file |
Name of routine: | cleanup_memoized_kininv |
---|---|
Source lines: | 32108 - 32117 |
Type | subroutine |
Call | cleanup_memoized_kininv() |
Module | popgen_kinship |
Notes | Remove work files |
Name of routine: | has_kinmat |
---|---|
Source lines: | 32125 - 32130 |
Type | function |
Call | has_kinmat() |
Module | kinship_io |
Notes | Higher level i/o routines for popgen_kinship |
Name of routine: | subset_active |
---|---|
Source lines: | 32134 - 32153 |
Type | subroutine |
Call | subset_active(dataset, nwanted, nreturned, indices) |
Module | kinship_io |
Notes | Indices for subset of active individuals |
Name of routine: | showkin |
---|---|
Source lines: | 32157 - 32239 |
Type | subroutine |
Call | showkin(nrows, dataset, plevel) |
Module | kinship_io |
Notes | head kinmat |
Name of routine: | highkin |
---|---|
Source lines: | 32243 - 32286 |
Type | subroutine |
Call | highkin(dataset, plevel) |
Module | kinship_io |
Notes | Show high kinships |
Name of routine: | kinridge |
---|---|
Source lines: | 32290 - 32302 |
Type | subroutine |
Call | kinridge(ridge_constant) |
Module | kinship_io |
Notes | Add ridge constant |
Name of routine: | setup_bigC |
---|---|
Source lines: | 32306 - 32338 |
Type | subroutine |
Call | setup_bigC(dataset, plevel) |
Module | kinship_io |
Notes | Set large C matrix |
Name of routine: | setup_bigA |
---|---|
Source lines: | 32342 - 32390 |
Type | subroutine |
Call | setup_bigA(dataset, plevel) |
Module | kinship_io |
Notes | Set large A matrix |
Name of routine: | readkin |
---|---|
Source lines: | 32396 - 32531 |
Type | subroutine |
Call | readkin(fil, ridge_constant, hashtab, dataset, ifail, plevel) |
Module | kinship_io |
Notes | Read a kinship matrix in from a file, allocating kinmat ped1 id1 ped2 id2 ... kin uses untyped() to filter useable values |
Name of routine: | writekin |
---|---|
Source lines: | 32535 - 32603 |
Type | subroutine |
Call | writekin(fil, trait, dataset, plevel) |
Module | kinship_io |
Notes | Write out kinship matrix as square matrix |
Name of routine: | readgrm |
---|---|
Source lines: | 32608 - 32811 |
Type | subroutine |
Call | readgrm(file_prefix, ridge_constant, hashtab, dataset, ifail, plevel) |
Module | kinship_io |
Notes | Read in GCTA binary format GRM mapping from grm to pedigree 1 0 2 3 10 4 0 ... |
Name of routine: | writegrm |
---|---|
Source lines: | 32815 - 32909 |
Type | subroutine |
Call | writegrm(file_prefix, trait, dataset, plevel) |
Module | kinship_io |
Notes | Write out GCTA binary format GRM |
Name of routine: | big_hash_kinship |
---|---|
Source lines: | 32917 - 32931 |
Type | subroutine |
Call | big_hash_kinship(nfull, active) |
Module | kinship_io |
Notes | hash identifying particular subset of kinship matrix used to memoise inverses etc. subset_hash, subset_size are globals in module popgen_kinship this version aimed at big kinship matrix, but is same as popgen_kinship::hash_kinship |
Name of routine: | get_kinship |
---|---|
Source lines: | 32935 - 32983 |
Type | subroutine |
Call | get_kinship(nfull, nreduced, active, a) |
Module | kinship_io |
Notes | Subset full kinship matrix written to a |
Name of routine: | protect_kin |
---|---|
Source lines: | 32985 - 32989 |
Type | subroutine |
Call | protect_kin(on) |
Module | kinship_io |
Notes | Higher level i/o routines for popgen_kinship |
Name of routine: | free_kin |
---|---|
Source lines: | 32991 - 33025 |
Type | subroutine |
Call | free_kin(plevel) |
Module | kinship_io |
Notes | Higher level i/o routines for popgen_kinship |
Name of routine: | pre_grapheps |
---|---|
Source lines: | 33035 - 33367 |
Type | subroutine |
Call | pre_grapheps(outstr, xbound, ybound) |
Module | grapheps |
Notes | The grapheps Postscript functions See http://swiss.csail.mit.edu/~jaffer/Docupage/grapheps |
Name of routine: | xy_grapheps |
---|---|
Source lines: | 33374 - 33488 |
Type | subroutine |
Call | xy_grapheps(outstr, nvals, xvals, yvals, xlab, ylab, title, gstyle, gratio, typ) |
Module | grapheps |
Notes | Draw simple plot typ 1=scatterplot 2=jittered dotplot 3=mountain 4=bargraph 10=square Q-Q plot |
Name of routine: | scatter_grapheps |
---|---|
Source lines: | 33492 - 33557 |
Type | subroutine |
Call | scatter_grapheps(outstr, nvals, symbols, xvals, yvals, slab, xlab, ylab, title, gratio) |
Module | grapheps |
Notes | Draw scatterplot with different glyphs for each category |
Name of routine: | nextcmd |
---|---|
Source lines: | 45482 - 45540 |
Type | subroutine |
Call | nextcmd(commands, numcmd, linlen, s, more) |
Module | None |
Notes | count number of commands on line and delineate next command (using position of ";"'s) to be evaluated |
Name of routine: | ival |
---|---|
Source lines: | 45544 - 45591 |
Type | function |
Call | ival(string) |
Module | None |
Notes | character to integer conversion via internal read |
Name of routine: | fval |
---|---|
Source lines: | 45595 - 45623 |
Type | function |
Call | fval(string) |
Module | None |
Notes | character to float conversion via internal read |
Name of routine: | fval2 |
---|---|
Source lines: | 45627 - 45657 |
Type | subroutine |
Call | fval2(string, res, ierr) |
Module | None |
Notes | subroutine version |
Name of routine: | tobp |
---|---|
Source lines: | 45661 - 45665 |
Type | function |
Call | tobp(mapval) |
Module | None |
Notes | Lossless conversion of double precision Mbp to integer bp |
Name of routine: | tobp8 |
---|---|
Source lines: | 45667 - 45671 |
Type | function |
Call | tobp8(mapval) |
Module | None |
Name of routine: | frommega |
---|---|
Source lines: | 45675 - 45697 |
Type | subroutine |
Call | frommega(mapval, bpval) |
Module | None |
Notes | And as a string |
Name of routine: | aval |
---|---|
Source lines: | 45702 - 45751 |
Type | function |
Call | aval(string, gcode) |
Module | None |
Notes | read allele values either numeric or letter code range of legal alleles depends on storage type |
Name of routine: | locfmt |
---|---|
Source lines: | 45755 - 45785 |
Type | subroutine |
Call | locfmt(str, rep, newtyp) |
Module | None |
Notes | Read simplified locus declaration eg 10m 10 m -> 10 autosomal markers |
Name of routine: | sow |
---|---|
Source lines: | 45789 - 45799 |
Type | function |
Call | sow(string) |
Module | None |
Notes | skip leading whitespace |
Name of routine: | eow |
---|---|
Source lines: | 45803 - 45812 |
Type | function |
Call | eow(string) |
Module | None |
Notes | find end of string |
Name of routine: | sclean |
---|---|
Source lines: | 45816 - 45824 |
Type | subroutine |
Call | sclean(string) |
Module | None |
Notes | scrub non-ASCII characters |
Name of routine: | ismiss |
---|---|
Source lines: | 45828 - 45832 |
Type | function |
Call | ismiss(string) |
Module | None |
Notes | See if a string is a missing value |
Name of routine: | isint |
---|---|
Source lines: | 45836 - 45863 |
Type | function |
Call | isint(string) |
Module | None |
Notes | see if a string is a valid integer |
Name of routine: | is_strict_int |
---|---|
Source lines: | 45865 - 45877 |
Type | function |
Call | is_strict_int(string) |
Module | None |
Name of routine: | isreal |
---|---|
Source lines: | 45882 - 45904 |
Type | function |
Call | isreal(string) |
Module | None |
Notes | See if a string is a valid double precision number Free format fails for comma containing lists |
Name of routine: | is_strict_real |
---|---|
Source lines: | 45906 - 45924 |
Type | function |
Call | is_strict_real(string) |
Module | None |
Name of routine: | iscomment |
---|---|
Source lines: | 45928 - 45943 |
Type | function |
Call | iscomment(string) |
Module | None |
Notes | See if a string is a comment |
Name of routine: | ismappos |
---|---|
Source lines: | 45950 - 45979 |
Type | function |
Call | ismappos(string) |
Module | None |
Notes | See if a string is a map position of form CHR:bp 0 = no 1 = <any>:<int> 2 = [chr](<int>|X|Y|XY|MT):<int> |
Name of routine: | wrsex |
---|---|
Source lines: | 45983 - 45992 |
Type | subroutine |
Call | wrsex(sex,ch) |
Module | None |
Notes | write sex as character |
Name of routine: | wrdate |
---|---|
Source lines: | 45996 - 46008 |
Type | subroutine |
Call | wrdate(date,str,typ) |
Module | None |
Notes | write date as character |
Name of routine: | wraff |
---|---|
Source lines: | 46012 - 46023 |
Type | subroutine |
Call | wraff(val, ch, typ) |
Module | None |
Notes | binary trait as character |
Name of routine: | wrint |
---|---|
Source lines: | 46027 - 46047 |
Type | subroutine |
Call | wrint(intval, str) |
Module | None |
Notes | A big integer as integer or rounded scientific notation |
Name of routine: | wrform |
---|---|
Source lines: | 46051 - 46068 |
Type | subroutine |
Call | wrform(typ, nwid, ndec, fstring) |
Module | None |
Notes | Fortran format statement to write one number |
Name of routine: | idwidths |
---|---|
Source lines: | 46072 - 46100 |
Type | subroutine |
Call | idwidths(dataset, widths, name_formats) |
Module | None |
Notes | Get maximum lengths of ID strings |
Name of routine: | phist |
---|---|
Source lines: | 46104 - 46120 |
Type | subroutine |
Call | phist(pval1, pval2, histo) |
Module | None |
Notes | Write P-values as a histogram: . + * ** *** |
Name of routine: | gstring |
---|---|
Source lines: | 46124 - 46130 |
Type | function |
Call | gstring(x) |
Module | None |
Notes | Write real as a string |
Name of routine: | pstring |
---|---|
Source lines: | 46134 - 46165 |
Type | function |
Call | pstring(pval) |
Module | None |
Notes | Write P-values as a string |
Name of routine: | corstring |
---|---|
Source lines: | 46169 - 46179 |
Type | function |
Call | corstring(rval) |
Module | None |
Notes | Write correlation as a 6 character string (deal nicely with -1) |
Name of routine: | append |
---|---|
Source lines: | 46183 - 46193 |
Type | subroutine |
Call | append(word, note) |
Module | None |
Notes | append one word to a string if enough room |
Name of routine: | addlet |
---|---|
Source lines: | 46198 - 46208 |
Type | subroutine |
Call | addlet(old, new) |
Module | None |
Notes | prepend "x" to a string if starts with an integer Loki and R for example do not allow variable names that start with a digit |
Name of routine: | shorten |
---|---|
Source lines: | 46213 - 46254 |
Type | subroutine |
Call | shorten(idx, nwords, words, newlen, res) |
Module | None |
Notes | create a shorter unique version of a string eg locus name Old versions of MENDEL for instance wants 8 character locus names |
Name of routine: | makeind |
---|---|
Source lines: | 46259 - 46305 |
Type | subroutine |
Call | makeind(typ, idx, eos, los, string) |
Module | None |
Notes | hash an integer to a two character string 01-99,A-Z,a-z,a-z... append to name: typ=1, appended with underscore; typ=2, appended directly |
Name of routine: | mktmpfil |
---|---|
Source lines: | 46309 - 46331 |
Type | subroutine |
Call | mktmpfil(str, filnam, wrkdir, ioerr) |
Module | None |
Notes | Create a new unique temporary file |
Name of routine: | wrinline |
---|---|
Source lines: | 46336 - 46355 |
Type | subroutine |
Call | wrinline(nlin, outstr) |
Module | None |
Notes | Copy inline data to a file Relies on iostat=-2 as eol to use lin as a buffer |
Name of routine: | openlog |
---|---|
Source lines: | 46359 - 46391 |
Type | subroutine |
Call | openlog(lstr, logfil, nhis) |
Module | None |
Notes | Open the standard log file "sib-pair.log" |
Name of routine: | findfile |
---|---|
Source lines: | 46397 - 46426 |
Type | subroutine |
Call | findfile(filnam, stat) |
Module | None |
Notes | System utilities Find a file along the search path -- check pwd, then HOME first |
Name of routine: | expandtilde |
---|---|
Source lines: | 46430 - 46444 |
Type | subroutine |
Call | expandtilde(filnam) |
Module | None |
Notes | Evaluate tilde in path names |
Name of routine: | delfile |
---|---|
Source lines: | 46448 - 46465 |
Type | subroutine |
Call | delfile(filnam, plevel) |
Module | None |
Notes | Delete a file |
Name of routine: | unzipper |
---|---|
Source lines: | 46470 - 46491 |
Type | subroutine |
Call | unzipper(filnam, wrkfil, gzipped) |
Module | None |
Notes | Flag a file as gzip compressed and unzip for reading (necessary for binary files) |
Name of routine: | reclen |
---|---|
Source lines: | 46499 - 46538 |
Type | subroutine |
Call | reclen(port, buffer, longest, testlines, skipcomments) |
Module | None |
Notes | Return length of longest line of file Use lin as buffer Relies on iostat code for eol testlines limits to the first testlines lines: set to -1 to check all if skipcomments is set, testlines excludes comment lines |
Name of routine: | filecols |
---|---|
Source lines: | 46543 - 46575 |
Type | subroutine |
Call | filecols(port, buffer, testlines, nwords, plevel) |
Module | None |
Notes | Return representative number of words per line in file Use lin as buffer |
Name of routine: | fchooser |
---|---|
Source lines: | 46581 - 46633 |
Type | subroutine |
Call | fchooser(fil, gui, plevel) |
Module | None |
Notes | GUI stuff Uses JAPI to call AWT, or PILIB to call GTK2 if present else simple file picker |
Name of routine: | fpicker |
---|---|
Source lines: | 46638 - 46744 |
Type | subroutine |
Call | fpicker(fil, plevel) |
Module | None |
Notes | Text based Windows file picker |
Name of routine: | fpicker |
---|---|
Source lines: | 46749 - 46833 |
Type | subroutine |
Call | fpicker(fil, plevel) |
Module | None |
Notes | Text based file picker |
Name of routine: | info |
---|---|
Source lines: | 46838 - 46933 |
Type | subroutine |
Call | info(lin, burnin, imp, iter, mapf, mincnt, plevel, genemod, showorig, chek, droperr, prompt, use2, gui, twintrait, sexmarker, datdir, wrkdir) |
Module | None |
Notes | Display information about program and current settings |
Name of routine: | help |
---|---|
Source lines: | 46937 - 47494 |
Type | subroutine |
Call | help(typ, regexp, lin, twrk) |
Module | None |
Notes | brief online help |
Name of routine: | shell |
---|---|
Source lines: | 47498 - 47531 |
Type | subroutine |
Call | shell(lin, plevel) |
Module | None |
Notes | pass line to shell -- requires existence of fairly standard routine system() |
Name of routine: | stamp |
---|---|
Source lines: | 47535 - 47551 |
Type | subroutine |
Call | stamp(t0) |
Module | None |
Notes | write elapsed time since first/last asked |
Name of routine: | proct |
---|---|
Source lines: | 47555 - 47563 |
Type | subroutine |
Call | proct(t1, plevel) |
Module | None |
Notes | time a procedure |
Name of routine: | getlin |
---|---|
Source lines: | 47567 - 47583 |
Type | subroutine |
Call | getlin(port, narg, words, lin, skipbl) |
Module | None |
Notes | Get a line from a port |
Name of routine: | rdmerloc |
---|---|
Source lines: | 47587 - 47687 |
Type | subroutine |
Call | rdmerloc(port, xli, nloci, loc, locpos, outpos, loctyp, locnotes, numloc, twinning, twintype, twintrait, nread, plevel) |
Module | None |
Notes | Read a MERLIN locus file |
Name of routine: | rdloci |
---|---|
Source lines: | 47696 - 47885 |
Type | subroutine |
Call | rdloci(port, typ, chrcode, namechek, nloci, loc, lochash, locpos, outpos, loctyp, locnotes, numloc, group, map, nread) |
Module | None |
Notes | Read PLINK or other .map file (combines locus and map information) typ=1: standard PLINK, one dummy trait, overwrite any existing loci 2: PLINK, no dummy trait, append 3: Other, columns specified, append chrcode=1: standard codes for chromosomes, number, X, Y, Mt 2: and, 23=X 24=Y 25=PAR 26=Mit |
Name of routine: | getfilehint |
---|---|
Source lines: | 47892 - 47905 |
Type | subroutine |
Call | getfilehint(filnam, filtyp) |
Module | None |
Notes | read file suffix to obtain hint as to type, currently: filtyp 3 GTF/GFF 4 VCF 5 PLINK .bim |
Name of routine: | maphead |
---|---|
Source lines: | 47909 - 48146 |
Type | subroutine |
Call | maphead(port, units, filehinted, lin, words, filtyp, nampos, chrpos, bppos, mappos, mapunits, plevel) |
Module | None |
Notes | Read start of map file, working out file type or column names |
Name of routine: | comparemap |
---|---|
Source lines: | 48150 - 48311 |
Type | subroutine |
Call | comparemap(port, plevel) |
Module | None |
Notes | Compare Sib-pair map and locus list to map |
Name of routine: | renamer |
---|---|
Source lines: | 48315 - 48470 |
Type | subroutine |
Call | renamer(filnam, pos_chrom, pos_bp, pos_id, plevel) |
Module | None |
Notes | rename loci based on matching position on a map |
Name of routine: | testflips_map |
---|---|
Source lines: | 48475 - 48669 |
Type | subroutine |
Call | testflips_map(port, plevel) |
Module | None |
Notes | test strand flips based on matching to a reference set reads a VCF or GTF file |
Name of routine: | testflips_fasta |
---|---|
Source lines: | 48677 - 48793 |
Type | subroutine |
Call | testflips_fasta(typ, fil, plevel) |
Module | None |
Notes | Compare reference alleles in annotation to the consensus allele from FASTA sequence file Scans annotations rather than map file since latter is indexed and bigger. Swaps around the references alleles in the annotation to match the consensus Does not touch actual genotypes |
Name of routine: | testflips_source |
---|---|
Source lines: | 48798 - 48989 |
Type | subroutine |
Call | testflips_source(typ, lodthresh, loc, trait, loctyp, locnote, gene, locnam, allele_buffer, dataset, assoc_stat, statval, plevel) |
Module | None |
Notes | Test for allele swaps or flips for genotypes coming from different sources typ=1 report, typ=2 carry out swap in appropriate stratum |
Name of routine: | flipper |
---|---|
Source lines: | 48995 - 49177 |
Type | subroutine |
Call | flipper(typ, port, dataset, plevel) |
Module | None |
Notes | flip strand based on matching to a reference set typ=1 looks in annotations for "[A/B]" A=Ref B=Alt typ=2 reads a VCF or GTF file |
Name of routine: | readstats |
---|---|
Source lines: | 49181 - 49256 |
Type | subroutine |
Call | readstats(port, statcol, lin, words, plevel) |
Module | None |
Notes | Read a set of locus statistics for locstat - usually P-values |
Name of routine: | readmap |
---|---|
Source lines: | 49261 - 49546 |
Type | subroutine |
Call | readmap(port, units, filehint, lin, words, plevel) |
Module | None |
Notes | Read a mapfile -- attempts to intelligently decide what to read |
Name of routine: | readchain |
---|---|
Source lines: | 49551 - 49692 |
Type | subroutine |
Call | readchain(port, plevel) |
Module | None |
Notes | Read a UCSC chain file following https://github.com/hmgu-itg/VCF-liftover |
Name of routine: | readnames |
---|---|
Source lines: | 49696 - 49745 |
Type | subroutine |
Call | readnames(port, nloci, loc, lochash, chosen, plevel) |
Module | None |
Notes | Read a list of locus names from a file to keep/drop/undrop |
Name of routine: | rdlinloc |
---|---|
Source lines: | 49749 - 49959 |
Type | subroutine |
Call | rdlinloc(port, lin, words, nord, numloc) |
Module | None |
Notes | Read a Linkage locus file |
Name of routine: | rdfreq |
---|---|
Source lines: | 49966 - 50119 |
Type | subroutine |
Call | rdfreq(typ, sta, fin, words, allele_buffer) |
Module | None |
Notes | Read a set of allele frequencies from the command line, making up some numbers if necessary typ=1 only expect list of allele frequencies 2 check for allele names alternating with frequencies |
Name of routine: | ordvar |
---|---|
Source lines: | 50124 - 50177 |
Type | subroutine |
Call | ordvar(twrk, nloci, loc, loctyp, locpos, outpos, nord, locord, group, map, locstat, locnotes, ord) |
Module | None |
Notes | Make change in order of variables Note that automatic variables get special treatment (esp since 20180829) |
Name of routine: | packer |
---|---|
Source lines: | 50184 - 50348 |
Type | subroutine |
Call | packer(typ, wrk, wrk2, nloci, loc, loctyp, locpos, group, map, locnotes, numloc, dataset, plevel) |
Module | None |
Notes | Pack pedigrees and loci Writes and reads temporary data to disk Note that SNPs stored as 2 genotypes per byte cannot be packed, so if hassnps == 2 then slocus is left unchanged |
Name of routine: | packloci |
---|---|
Source lines: | 50352 - 50404 |
Type | subroutine |
Call | packloci(nloci, loc, loctyp, locpos, group, map, locnotes, numloc, plevel) |
Module | None |
Notes | Pack locus list if dataset not yet read in |
Name of routine: | bonf |
---|---|
Source lines: | 50408 - 50417 |
Type | function |
Call | bonf(ntest,alpha) |
Module | None |
Notes | Calculate Bonferroni corrected P-value for given number of tests |
Name of routine: | isaff |
---|---|
Source lines: | 50421 - 50453 |
Type | function |
Call | isaff(val, thresh, gt) |
Module | None |
Notes | Determine if index person is affected or unaffected |
Name of routine: | isatwin |
---|---|
Source lines: | 50457 - 50465 |
Type | function |
Call | isatwin(twintype, twinind) |
Module | None |
Notes | Is an MZ twin? |
Name of routine: | ismzpair |
---|---|
Source lines: | 50470 - 50484 |
Type | function |
Call | ismzpair(i, j, dataset) |
Module | None |
Notes | Is pair MZ? index i must precede j |
Name of routine: | order |
---|---|
Source lines: | 50488 - 50497 |
Type | subroutine |
Call | order(all1, all2) |
Module | None |
Notes | swap alleles so ordered consistently |
Name of routine: | swap |
---|---|
Source lines: | 50501 - 50509 |
Type | subroutine |
Call | swap(all1, all2) |
Module | None |
Notes | swap alleles |
Name of routine: | lorder |
---|---|
Source lines: | 50521 - 50597 |
Type | subroutine |
Call | lorder(typ, addummy, liab, liabclass, nloci, loctyp, nord, locord) |
Module | None |
Notes | Create order of loci for outputting a pedigree 1 = as is 2 = LINKAGE 3 = GENEHUNTER 4 = MENDEL 5 = LINKAGE PPD 6 = FBAT 7 = MERLIN |
Name of routine: | isinenv |
---|---|
Source lines: | 50601 - 50612 |
Type | function |
Call | isinenv(word,nvar,envnam) |
Module | None |
Notes | Is a bound environmental variable? and if so where? |
Name of routine: | readbin |
---|---|
Source lines: | 50623 - 50898 |
Type | subroutine |
Call | readbin(strm, filnam, wrkfil, typ, numloc, dataset, red, plevel) |
Module | None |
Notes | Read a Sib-pair binary file encoded using various levels of compression (currently just calls gunzip) Default (compress_level=1) is a "Fortran unformatted write" dump of the locus and pedigree arrays typ=format version 1=current (2012/02) 2=older (2009/08) 3=original (change in loctyp coding) |
Name of routine: | writebin |
---|---|
Source lines: | 50910 - 50988 |
Type | subroutine |
Call | writebin(strm, compress_level, filnam, dataset, plevel) |
Module | None |
Notes | Write a Sib-pair binary file Default was a "Fortran unformatted write" dump of the locus and pedigree arrays, but now is stream output If compress=2, currently calls gzip to compress the resulting file 2.0 stream based write 2.1 first NUMENV variables are automatic 2.2 NUMENV increased by 1 2.3 adjustable ped_width id_width |
Name of routine: | rdspbin |
---|---|
Source lines: | 50992 - 51084 |
Type | subroutine |
Call | rdspbin(filnam) |
Module | None |
Notes | Summarize Sib-pair binary file |
Name of routine: | readhapmap |
---|---|
Source lines: | 51088 - 51260 |
Type | subroutine |
Call | readhapmap(filnam, numloc, dataset, longnam, red, plevel) |
Module | None |
Notes | Read in HapMap format |
Name of routine: | readgeno |
---|---|
Source lines: | 51271 - 51498 |
Type | subroutine |
Call | readgeno(typ, port, gt, thresh, skipline, hashtab, dataset, plevel) |
Module | None |
Notes | Read genotyping file where one genotype per record (eg Sequenom, Illumina report) typ=1 id locus_name allele1 allele2 ... [quality score etc] typ=2 locus_name id allele1 allele2 ... [quality score etc] typ=3 locus_name id qual_score allele1 allele2 typ=4 Illumina CSV locus_name=4 id=2 qual_score=5 allele1=10 allele2=11 Format includes "[Header]" and "[Data]" sections gt thresh used if quality score available skipline defaults to 1 (skipping a header line) |
Name of routine: | readprobs |
---|---|
Source lines: | 51512 - 51793 |
Type | subroutine |
Call | readprobs(port, typ, mergekey, pedfil, longest, hashtab, dataset, plevel) |
Module | None |
Notes | Read in biallelic genotypic probabilities from a file, imputing the most likely genotype Need to have numeric variable in pedigree that matches column of genotypes Assumes that all SNPs have been declared already file formats typ=1: (Beagle) marker alleleA alleleB col.3 col.3 col.3 col.5 col.5 col.5 col.7 col.7 col.7 col rs885550 C T 0.9846 0.0154 0.0001 0.9846 0.0154 0.0001 0.9846 0.0154 0.0001 0.98 typ=2: -- rs885550 9887804 C T 0.97 0.03 0 0.97 0.03 0 0.97 0.03 0 0.97 0.03 0 0.97 |
Name of routine: | rdplinkdose |
---|---|
Source lines: | 51799 - 52000 |
Type | subroutine |
Call | rdplinkdose(port, thresh, longest, hashtab, dataset, plevel) |
Module | None |
Notes | Merge in most likely genotype based on PLINK dosage file SNP A1 A2 00010 0001002 00028 0002801 rs2237028 T G 1 2 2 1 0 2 |
Name of routine: | readmach |
---|---|
Source lines: | 52010 - 52126 |
Type | subroutine |
Call | readmach(locfil, pedfil, thresh, hashtab, dataset, plevel) |
Module | None |
Notes | Read MaCH/minimac type allelic dosages pedigree file: 00359 0035902 0035903 0035904 2 -9 2.000 2.000 2.000 locus file: Z Zygosity T COUNT(T,18:28937192) T COUNT(G,18:28937474) |
Name of routine: | rdmachdose |
---|---|
Source lines: | 52130 - 52272 |
Type | subroutine |
Call | rdmachdose(port, thresh, firstcol, firstloc, longest, hashtab, dataset, nmatched, ngeno, plevel) |
Module | None |
Notes | Actually read MaCH/minimac dosage file |
Name of routine: | readvcf |
---|---|
Source lines: | 52288 - 52394 |
Type | subroutine |
Call | readvcf(typ, addref, qualstat, gt, thresh, linlen, filnam, numloc, hashtab, dataset, red, plevel) |
Module | None |
Notes | Read in VCF dataset typ=1 read in pedigree data 2 read in pedigree data where VCF IDs of form ped_id 3 merge in genotype data on individual ID 4 merge in genotype data on VCF IDs of form ped_id 5 report matching IDs in VCF file 6 count matching VCF IDs of form ped_id 7 count matching individual IDs 8 fill in missing genotypes with reference allele homozygote 9 fill in missing genotypes with major allele homozygote addref replaces missing genotypes with reference allele homozygote qualstat is the genotype quality score to return in locstat |
Name of routine: | rdvcfped |
---|---|
Source lines: | 52398 - 52526 |
Type | subroutine |
Call | rdvcfped(typ, longest, port, numloc, dataset, red, plevel) |
Module | None |
Notes | read in IDs from VCF dataset |
Name of routine: | readmultvcf |
---|---|
Source lines: | 52530 - 52692 |
Type | subroutine |
Call | readmultvcf(typ, nfil, filnams, numloc, dataset, red, plevel) |
Module | None |
Notes | Read multiple VCF files with a view to merging them |
Name of routine: | rdvcfgeno |
---|---|
Source lines: | 52702 - 53379 |
Type | subroutine |
Call | rdvcfgeno(typ, addref, qualstat, gt, thresh, longest, port, hashtab, dataset, nmatched, ngeno, plevel) |
Module | None |
Notes | Actually read VCF file genotypes where corresponding pedigree is active (was all matchable IDs, changed 20161017) merge on id (typ=1) or ped_id (typ=2) count matching VCF IDs on id (typ=3) or ped_id (typ=4) count matching VCF genotypes on id (typ=5) or ped_id (typ=6) if addref, replace missing genotypes with reference allele homozygote also check strand etc |
Name of routine: | refvcfgeno |
---|---|
Source lines: | 53383 - 53580 |
Type | subroutine |
Call | refvcfgeno(typ, vcf_ac, vcf_an, port, dataset, plevel) |
Module | None |
Notes | Replace missing genotypes with reference (ref or maj) allele in VCF file |
Name of routine: | mergebed |
---|---|
Source lines: | 53621 - 54162 |
Type | subroutine |
Call | mergebed(strm, typ, chrcode, keytyp, keyloc, filnam, hashtab, dataset, plevel) |
Module | None |
Notes | Read PLINK .bed format The .bim and .fam files are plain ASCII and allow us to fix the expected number of genotypes. In the .bed file, the first 3 bytes have a special meaning. The first two bytes are a 'magic number' that enables PLINK to confirm that a BED file is really a BED file: that is, BED files should always start 01101100 00011011. The third byte indicates whether the BED file is in SNP-major or individual-major mode: a value of 00000001 indicates SNP-major (i.e. list all individuals for first SNP, all individuals for second SNP, etc) whereas a value of 00000000 indicates individual-major (i.e. list all SNPs for the first individual, list all SNPs for the second individual, etc). By default, all BED files are SNP-major mode. For the genotype data, each byte encodes up to four genotypes (2 bits per genotype). The coding is 00 Homozygote 1/1 01 Heterozygote 1/2 11 Homozygote 2/2 10 Missing x/x The only slightly confusing wrinkle is that each byte is effectively read backwards. That is, if we label each of the 8 position as A to H, we would label backwards: 01101100 HGFEDCBA | | | AB 00 -- homozygote (first) | | CD 11 -- other homozygote | EF 01 -- heterozygote GH 10 -- missing genotype (fourth) Finally, when we reach the end of a SNP (or if in individual-mode, the end an individual) we skip to the start of a new byte (i.e. skip any remaining bits in that byte). Data read in is either stored as normal genotypes (typ=1,2) or as 4-bits per genotype (typ=3). A join operation (appending any new loci) is carried out for typ=2 or typ=3, while a merge affecting only existing loci is typ=1 |
Name of routine: | fromplink |
---|---|
Source lines: | 54166 - 54193 |
Type | subroutine |
Call | fromplink(pcode, a1, a2, snpswap, g1, g2, ngeno) |
Module | None |
Notes | Convert PLINK .bed genotype codes to alleles |
Name of routine: | mergefim |
---|---|
Source lines: | 54206 - 54538 |
Type | subroutine |
Call | mergefim(typ, mapfil, genofil, chrcode, keytyp, hashtab, dataset, plevel) |
Module | None |
Notes | Read FImpute imputed genotypes The snp_info.txt file gives the SNP (FImpute does diallelic markers only) map The genotypes_imp.txt gives the genotypes ID Chip Calls... 0001001 2 3004440003233 ... First allele is paternal and the second is maternal. 0=1|1 1=1/2 2=2|2 3=1|2 4=2|1 5=x/x 6=1|x 7=2|x 8=x|1 9=x|2 |
Name of routine: | fromfimp |
---|---|
Source lines: | 54542 - 54564 |
Type | subroutine |
Call | fromfimp(geno, refall, altall, g1, g2) |
Module | None |
Notes | Read FImpute output genotype |
Name of routine: | readcsv |
---|---|
Source lines: | 54568 - 54759 |
Type | subroutine |
Call | readcsv(filnam, header, sepchar, numloc, nread, hasid, headerpos) |
Module | None |
Notes | Infer type of variables in a csv file |
Name of routine: | readcases |
---|---|
Source lines: | 54766 - 55045 |
Type | subroutine |
Call | readcases(port, hasid, hassex, inputsep, skipline, numloc, coltyp, locnotes, dataset, longnam, longest, nwarn, plevel) |
Module | None |
Notes | Read file containing just unrelated individuals Duplicates (if contiguous) are combined into the same "family" with appended copy numbers Annotates locnotes with labels for categorical variable levels |
Name of routine: | readpeds |
---|---|
Source lines: | 55049 - 55573 |
Type | subroutine |
Call | readpeds(port, wrk, wrk2, skipline, link, unspecified, mztwin, gt, thresh, sexchek, hassex, nextped, numloc, coltyp, dataset, longnam, longest, nwarn, plevel) |
Module | None |
Notes | Read pedigree file |
Name of routine: | nextped |
---|---|
Source lines: | 55577 - 55582 |
Type | function |
Call | nextped(str, pedigree) |
Module | None |
Notes | Test if current line is next pedigree |
Name of routine: | nonextped |
---|---|
Source lines: | 55586 - 55591 |
Type | function |
Call | nonextped(str, pedigree) |
Module | None |
Notes | Does not use pedigree IDs |
Name of routine: | processfam |
---|---|
Source lines: | 55595 - 55750 |
Type | subroutine |
Call | processfam(sexchek, mztwin, gt, thresh, wrk, wrk2, nped, pedigree, num, nfound, numloc, nobs, buffer, nid, higen, ord, key1, key2, plevel) |
Module | None |
Notes | All members of pedigree now read in, error check and sort |
Name of routine: | tabid |
---|---|
Source lines: | 55754 - 55794 |
Type | subroutine |
Call | tabid(curid, nid, indx, id, counts, incr, idpos) |
Module | None |
Notes | Tabulate alphanumeric IDs in order of appearance |
Name of routine: | addsexes |
---|---|
Source lines: | 55799 - 56051 |
Type | subroutine |
Call | addsexes(mztwin, gt, thresh, pedigree, num, buffer, key1, ord, nerr, plevel) |
Module | None |
Notes | Check consistency of sexes, allowing for MZ twins and mating cycles |
Name of routine: | famsort |
---|---|
Source lines: | 56058 - 56210 |
Type | subroutine |
Call | famsort(pedigree, num, nfound, nid, id, pid, fa, mo, key1, ord, higen, nerr, plevel) |
Module | None |
Notes | Work out generation number ord(), then sort family on founder status, generation number, parental ID, and personal ID giving their position in ord(). Returns the ranking in ord(), and the depth of the pedigree in higen |
Name of routine: | mkdummy |
---|---|
Source lines: | 56214 - 56240 |
Type | subroutine |
Call | mkdummy(num, nfound, sx, numloc, buffer) |
Module | None |
Notes | Create dummy records for added individals |
Name of routine: | asstyp |
---|---|
Source lines: | 56244 - 56268 |
Type | subroutine |
Call | asstyp(nloci, loctyp, locpos, totloc, coltyp) |
Module | None |
Notes | Assign a locus type to every column of data file |
Name of routine: | addvar |
---|---|
Source lines: | 56272 - 56349 |
Type | subroutine |
Call | addvar(wrk, wrk2, dclass, newloc, dataset, plevel) |
Module | None |
Notes | Add extra blank columns to the dataset |
Name of routine: | addtmpvar |
---|---|
Source lines: | 56353 - 56373 |
Type | subroutine |
Call | addtmpvar(tmpnam, dataset, tmppos, ifail) |
Module | None |
Notes | Create a temporary quantitative variable |
Name of routine: | wrkout |
---|---|
Source lines: | 56377 - 56416 |
Type | subroutine |
Call | wrkout(wrk, wrk2, ped, dataset, nped, nobs) |
Module | None |
Notes | Write out current pedigree to a work file, updating number of records |
Name of routine: | pedin |
---|---|
Source lines: | 56422 - 56480 |
Type | subroutine |
Call | pedin(wrk, wrk2, nped, nobs, numloc, numcol, dataset) |
Module | None |
Notes | Read pedigree back in from work files May allocate extra blank columns in dataset%plocus for later use by numcol > numloc |
Name of routine: | replacedata |
---|---|
Source lines: | 56488 - 56825 |
Type | subroutine |
Call | replacedata(port, typ, inputsep, nloci, loc, lochash, loctyp, locpos, chosen, hashtab, dataset, longest, plevel) |
Module | None |
Notes | Read in data updates from a file file format: [ped] id loc1 loc2 ... locN, with header giving locus names uses hash to match up ids in file and current dataset and to match locus names in file to current dataset typ=1 overwrite all =2 update if missing =3 compare |
Name of routine: | concat |
---|---|
Source lines: | 56830 - 56862 |
Type | subroutine |
Call | concat(dirnam, filnam) |
Module | None |
Notes | Prefix filnam with a dirnam If filnam starts with ~/, expand this instead of dirnam |
Name of routine: | extprefix |
---|---|
Source lines: | 56866 - 56885 |
Type | subroutine |
Call | extprefix(filnam, suffix) |
Module | None |
Notes | Extract prefix from filnam |
Name of routine: | extsuffix |
---|---|
Source lines: | 56889 - 56908 |
Type | subroutine |
Call | extsuffix(filnam, suffix) |
Module | None |
Notes | Extract suffix from filnam - skipping past .gz etc |
Name of routine: | extpath |
---|---|
Source lines: | 56912 - 56929 |
Type | subroutine |
Call | extpath(filnam) |
Module | None |
Notes | Extract path from filnam |
Name of routine: | slash |
---|---|
Source lines: | 56934 - 56947 |
Type | subroutine |
Call | slash(dirnam, lend) |
Module | None |
Notes | Test what character used to separate directories and append to directory |
Name of routine: | display |
---|---|
Source lines: | 56951 - 56982 |
Type | subroutine |
Call | display(str) |
Module | None |
Notes | Print a string, stripping out C-style escapes |
Name of routine: | cat |
---|---|
Source lines: | 56986 - 57010 |
Type | subroutine |
Call | cat(fil) |
Module | None |
Notes | Display contents of a file |
Name of routine: | head |
---|---|
Source lines: | 57014 - 57037 |
Type | subroutine |
Call | head(fil, nlin) |
Module | None |
Notes | Display first N lines of a file |
Name of routine: | tail |
---|---|
Source lines: | 57041 - 57078 |
Type | subroutine |
Call | tail(fil, nlin) |
Module | None |
Notes | Display last N lines of a file |
Name of routine: | countfields |
---|---|
Source lines: | 57083 - 57234 |
Type | subroutine |
Call | countfields(fil, exclude_comments, plevel) |
Module | None |
Notes | Utility to count number of columns in a file simpler scanner than args |
Name of routine: | ftranspose |
---|---|
Source lines: | 57238 - 57259 |
Type | subroutine |
Call | ftranspose(fil, misval, plevel) |
Module | None |
Notes | Utility routine to transpose contents of a file: multipass |
Name of routine: | ftranspose1 |
---|---|
Source lines: | 57263 - 57350 |
Type | subroutine |
Call | ftranspose1(port, fil, misval, longest, plevel) |
Module | None |
Notes | Buffered out-of-core transpose |
Name of routine: | fprinter |
---|---|
Source lines: | 57354 - 57624 |
Type | subroutine |
Call | fprinter(nwords, words, linbuf, plevel) |
Module | None |
Notes | Utility to extract columns from a file |
Name of routine: | print_sstate |
---|---|
Source lines: | 57634 - 57669 |
Type | subroutine |
Call | print_sstate(port, stype, iskip, ispan, sstring, sstring2, linbuf, inspan, nrec, sstate) |
Module | None |
Notes | Current line print status based on search strategy and state sstate action 0 nothing 1 found search string 2 in search block /start/, /end/ 3 end of search block 4 in search block /start/, Np ; inspan=line count in block |
Name of routine: | csvline |
---|---|
Source lines: | 57673 - 57694 |
Type | subroutine |
Call | csvline(outsep, printn, linenumber, nwords, words) |
Module | None |
Notes | one line of character separated output |
Name of routine: | wrinverse |
---|---|
Source lines: | 57700 - 57830 |
Type | subroutine |
Call | wrinverse(fil, typ, ridge_constant, invalg, plevel) |
Module | None |
Notes | Invert a matrix read from text file, where each line comprises a row index, col index, and element value. for use with programs such as Wombat |
Name of routine: | fisherp |
---|---|
Source lines: | 57834 - 57888 |
Type | subroutine |
Call | fisherp(fil, firstcol) |
Module | None |
Notes | Fisher combination of P values on each line of a file |
Name of routine: | tometasoft |
---|---|
Source lines: | 57894 - 58076 |
Type | subroutine |
Call | tometasoft(lin, plevel) |
Module | None |
Notes | Combine multiple files (one per study) containing beta, se into single wide format for the Metasoft program the master list of loci is contained in loc |
Name of routine: | sibloci |
---|---|
Source lines: | 58081 - 58122 |
Type | subroutine |
Call | sibloci(ostr, nloci, loc, loctyp, outpos, group, map, locnotes) |
Module | None |
Notes | write Sib-pair locus declarations |
Name of routine: | fimpmap |
---|---|
Source lines: | 58127 - 58201 |
Type | subroutine |
Call | fimpmap(ostr, chip, dataset) |
Module | None |
Notes | Write FImpute SNPinfo file Note requires 2 or fewer alleles |
Name of routine: | onchip |
---|---|
Source lines: | 58205 - 58232 |
Type | subroutine |
Call | onchip(trait, gene, nchips, traittable, chip_fnd, dataset) |
Module | None |
Notes | Indicate categories that include typed second trait |
Name of routine: | wrmap |
---|---|
Source lines: | 58256 - 58587 |
Type | subroutine |
Call | wrmap(ostr, typ, mapf, nloci, loc, loctyp, locnotes, nord, locord, group, map) |
Module | None |
Notes | Write map 10 = table for Sib-pair output 0 = LINKAGE 1 = LINKAGE plus dummy binary trait 2 = GENEHUNTER plus dummy binary trait 3 = GENEHUNTER 4 = MENDEL 14 = MENDEL free format 20 = MENDEL .var file 21 = MENDEL SNP DEF file 5 = ASPEX 6 = MERLIN 7 = LOKI 8 = STRUCTURE 9 = SOLAR 11 = MORGAN 12 = Haploview 13 = PLINK 22 = hapfind |
Name of routine: | pedhead |
---|---|
Source lines: | 58592 - 58658 |
Type | subroutine |
Call | pedhead(strm, typ, pedmask, name_widths, name_formats, nwid, nloci, loc, loctyp) |
Module | None |
Notes | Write out pedigree header with locus names either multiline (typ=1) or simple |
Name of routine: | onestripe |
---|---|
Source lines: | 58662 - 58699 |
Type | subroutine |
Call | onestripe(strm, linenum, totlines, width, string, truncate) |
Module | None |
Notes | Writing a string within a given rectangle: one line |
Name of routine: | pedout |
---|---|
Source lines: | 58714 - 58923 |
Type | subroutine |
Call | pedout(strm, header, pedmask, fieldsep, allsep, imp, nwid, ndec, sexcode, misval, nrc, skip, filter, show_cat, nloci, loc, loctyp, locpos, locnotes, dataset) |
Module | None |
Notes | Write out GAS style pedigree header=print variable names as header pedmask=control printing of ped,id,fa,mo,sex fields fieldsep=field separator allsep=allele separator imp=show imputed genotypes nwid,ndec=format for quantitative trait values misval=missing data token nrc=number of records to print skip=number of records to skip at beginning filter=(1=show all) (2=flagged) show_cat=(1=levels) (2=labels) |
Name of routine: | wrlink |
---|---|
Source lines: | 58940 - 59170 |
Type | subroutine |
Call | wrlink(strm, typ, imp, addummy, liabclass, renumall, twinning, twintype, nwid, ndec, nloci, loctyp, locpos, nord, locord, dataset) |
Module | None |
Notes | write out Linkage type file pre- or post- Makeped style style typ property --------- --- -------- lin, pre 1 ppd 2 extra pedigree pointer fields gh 3 MISS='-', ordering binary_trait1, marker1...markerN, quantitative traits asp, tcl 4 marker names prepended to file hap 5 SNP alleles coded ACGT 1234 mer 6 If present, zygosity indicator in column 6: 1,3,5...for each MZ set pre: ped id fa mo sex ... ppd: ped.n id.n fa.n mo.n child1.n patsibid.n matsibid.n sex proband.n ... where ped.n, id.n are sequential numerical ID number |
Name of routine: | wrphe |
---|---|
Source lines: | 59176 - 59250 |
Type | subroutine |
Call | wrphe(strm, typ, nwid, ndec, nloci, loc, loctyp, locpos, dataset) |
Module | None |
Notes | write out Mapmaker-Sibs/FBAT/etc phenotype file whitespace delimited ped id trait1...traitN write out Mapmaker-Sibs phenotype file |
Name of routine: | wrcsv |
---|---|
Source lines: | 59263 - 59535 |
Type | subroutine |
Call | wrcsv(strm, typ, imp, nwid, ndec, sep, allsep, misval, gmisval, twinning, twintype, nloci, loc, loctyp, locpos, locnotes, nord, locord, dataset) |
Module | None |
Notes | Write out pedigree as character-delimited typ 1 full pedigree 2 id,fa,mo,sex,ped,mztwin,hhid (for SOLAR) 3 ped, id, phenotype_data 4 id, phenotype_data 5 ped, id, genotype_data 6 id, genotype_data 10 full pedigree with mztwin, na=' ' (for MENDEL 8.0) 11 full pedigree with mztwin, na='.' (for SAS) |
Name of routine: | wrmorg |
---|---|
Source lines: | 59542 - 59698 |
Type | subroutine |
Call | wrmorg(strm, typ, nwid, ndec, nloci, loc, loctyp, locpos, smlfreq, smlpen, dataset) |
Module | None |
Notes | Write out pedigree for Morgan typ 1 pedigree and traits 2 id, markers |
Name of routine: | wrfish |
---|---|
Source lines: | 59702 - 59824 |
Type | subroutine |
Call | wrfish(strm, ndec, twinning, twintype, nloci, loctyp, locpos, nord, locord, dataset, fstyle, plevel) |
Module | None |
Notes | write out FISHER or MENDEL type pedigree file |
Name of routine: | wrdot |
---|---|
Source lines: | 59828 - 59964 |
Type | subroutine |
Call | wrdot(strm, trait, gene, loctyp, nwid, ndec, allsep, dotfixedsep, dotcrossings, dotnodesep, dotranksep, dotboxsize, trcoly, trcoln, trcolx, gcolor, dataset) |
Module | None |
Notes | Describe pedigree using dot graphics language |
Name of routine: | wrarl |
---|---|
Source lines: | 59968 - 60117 |
Type | subroutine |
Call | wrarl(strm, popind, typ, nloci, loc, loctyp, locpos, dataset) |
Module | None |
Notes | write out Arlequin data file (haplotype or genotype data) |
Name of routine: | wrprd |
---|---|
Source lines: | 60121 - 60165 |
Type | subroutine |
Call | wrprd(strm, typ, trait, nloci, loc, loctyp, locpos, dataset) |
Module | None |
Notes | write out data file used by Jonathon Pritchard's structure program |
Name of routine: | wrbeagle |
---|---|
Source lines: | 60170 - 60286 |
Type | subroutine |
Call | wrbeagle(strm, typ, dataset) |
Module | None |
Notes | write out data file used by Browning and Browning's Beagle program exclude MZ cotwins |
Name of routine: | wrped |
---|---|
Source lines: | 60290 - 60347 |
Type | subroutine |
Call | wrped(strm, typ, censor, trait, misval, dataset) |
Module | None |
Notes | Simpler pedigree writer - for findhap sex,id,fa,mo,dob |
Name of routine: | filter_snp |
---|---|
Source lines: | 60351 - 60380 |
Type | subroutine |
Call | filter_snp(trait, dataset) |
Module | None |
Notes | filter markers on indicator trait |
Name of routine: | wrsnp_col |
---|---|
Source lines: | 60393 - 60501 |
Type | subroutine |
Call | wrsnp_col(typ, strm, trait, pheno, sep, gsep, misval, dataset) |
Module | None |
Notes | Write out SNPs as ID-major dosages typ=1 row ID and column headers - FImpute typ=2 unadorned typ=3 BLUPF90 style typ=4 findhap style For FImpute genotype files, pheno = array/source For findhap genotype files, currently array/source is fixed to 1, and has nsnps before genotypes reference allele now defaults to annotation if present 20180828 |
Name of routine: | wrsnp_row |
---|---|
Source lines: | 60509 - 60594 |
Type | subroutine |
Call | wrsnp_row(typ, strm, trait, sep, misval, dataset) |
Module | None |
Notes | Write out SNP-major data file with typ=1 SNP and column names typ=2 no SNP and column names typ=3 integer genotype encoding used by ROADTRIPS genotypes are -9,0,1,2 |
Name of routine: | wrsnp2 |
---|---|
Source lines: | 60599 - 60674 |
Type | subroutine |
Call | wrsnp2(strm, trait, dataset) |
Module | None |
Notes | Write out PLINK's SNP-major .tped data file format genotypes are 0 0,1 1,1 2,2 2 as required by MQLS_XM |
Name of routine: | wrsnp3 |
---|---|
Source lines: | 60681 - 60753 |
Type | subroutine |
Call | wrsnp3(strm, trait, dataset) |
Module | None |
Notes | Write out CHIAMO/IMPUTE etc genotype probability file 20 rs1 1000 A C 1 0 0 1 0 0 20 rs2 2000 G T 1 0 0 0 1 0 |
Name of routine: | wrsnp4 |
---|---|
Source lines: | 60759 - 60822 |
Type | subroutine |
Call | wrsnp4(strm, trait, dose, key, dataset) |
Module | None |
Notes | Write out SNP-major data file with real allelic dose encoding used by WOMBAT imputing any missing genotypes |
Name of routine: | wrpap |
---|---|
Source lines: | 60826 - 60971 |
Type | subroutine |
Call | wrpap(trip, phen, nloci, loc, loctyp, locpos, dataset) |
Module | None |
Notes | Write out old-style PAP pedigree |
Name of routine: | wrcri |
---|---|
Source lines: | 60975 - 61042 |
Type | subroutine |
Call | wrcri(strm, nloci, loc, loctyp, locpos, locord, dataset) |
Module | None |
Notes | Write out .gen pedigree file for CRI-MAP |
Name of routine: | wrvcf |
---|---|
Source lines: | 61049 - 61295 |
Type | subroutine |
Call | wrvcf(strm, typ, trait, filnam, allele_buffer, nord, dataset, plevel) |
Module | None |
Notes | Write VCF GT format typ=1 id 2 ped_id 3 locus information only |
Name of routine: | wrbed |
---|---|
Source lines: | 61299 - 61473 |
Type | subroutine |
Call | wrbed(strm, filnam, trait, censor, allele_buffer, dataset) |
Module | None |
Notes | Write PLINK .bed format (also used by MENDEL 10.0+) |
Name of routine: | simdata |
---|---|
Source lines: | 61477 - 61543 |
Type | subroutine |
Call | simdata(strm, nped, ngen, nminoff, nmaxoff, pedprefix, totloc, nsimped) |
Module | None |
Notes | Write a file of simulated pedigrees |
Name of routine: | showdata |
---|---|
Source lines: | 61547 - 61681 |
Type | subroutine |
Call | showdata(fped, fid, larg, words, nloci, loc, loctyp, locpos, locnotes, dataset, pedmask, nwid, ndec, sexcode, misval, show_cat, fieldsep, allsep, pstyle) |
Module | None |
Notes | Write out data for particular pedigree or particular person |
Name of routine: | wrind |
---|---|
Source lines: | 61685 - 61778 |
Type | subroutine |
Call | wrind(idx, nloci, loc, loctyp, locpos, dataset, pedmask, nwid, ndec, misval, allsep, pstyle) |
Module | None |
Notes | Write out data for an individual |
Name of routine: | wrvert |
---|---|
Source lines: | 61782 - 61865 |
Type | subroutine |
Call | wrvert(nloci, loc, loctyp, locpos, locnotes, dataset, nwid, ndec, allsep) |
Module | None |
Notes | Write out data for individuals vertically |
Name of routine: | prgtp |
---|---|
Source lines: | 61869 - 61883 |
Type | subroutine |
Call | prgtp(idx, gene, dataset, gtp) |
Module | None |
Notes | print one genotype from dataset |
Name of routine: | wrid |
---|---|
Source lines: | 61888 - 61908 |
Type | subroutine |
Call | wrid(just, id, chid, sx) |
Module | None |
Notes | Write id as justified (l,c,r) string, possibly indicating sex as male [101] or female (102) |
Name of routine: | wrpercent |
---|---|
Source lines: | 61912 - 61922 |
Type | function |
Call | wrpercent(num, den) |
Module | None |
Notes | Write out a percentage |
Name of routine: | wrpercentd |
---|---|
Source lines: | 61924 - 61934 |
Type | function |
Call | wrpercentd(num, den) |
Module | None |
Name of routine: | wrpercentl |
---|---|
Source lines: | 61936 - 61946 |
Type | function |
Call | wrpercentl(num, den) |
Module | None |
Name of routine: | wrtrait |
---|---|
Source lines: | 61950 - 62028 |
Type | subroutine |
Call | wrtrait(val, str, typ, catlabels, nwid, ndec) |
Module | None |
Notes | Write out trait value to a string |
Name of routine: | get_notes |
---|---|
Source lines: | 62033 - 62047 |
Type | function |
Call | get_notes(loc, locnote) |
Module | None |
Notes | Extract annotations from locnotes or from macro variable Can escape a sensitive character, eg ';' if writing script |
Name of routine: | get_whichcat |
---|---|
Source lines: | 62052 - 62110 |
Type | subroutine |
Call | get_whichcat(word, trait, val) |
Module | None |
Notes | Extract matching category level from locus annotation, adding category label with a new largest level if not present |
Name of routine: | get_snpallele1 |
---|---|
Source lines: | 62114 - 62127 |
Type | subroutine |
Call | get_snpallele1(locnote, alleles) |
Module | None |
Notes | Extract alleles from locus annotation of form "A/B" to string "AB" |
Name of routine: | get_snpallele2 |
---|---|
Source lines: | 62131 - 62152 |
Type | subroutine |
Call | get_snpallele2(locnote, allele_buffer) |
Module | None |
Notes | Extract alleles from locus annotation of form "A/B" to allele data structure |
Name of routine: | wrgtp |
---|---|
Source lines: | 62158 - 62218 |
Type | subroutine |
Call | wrgtp(all1, all2, gtp, allsep, locnote, typ) |
Module | None |
Notes | Write out a genotype typ 1=unobserved and observed same style typ 2=unobserved genotypes separated by ":", observed " " |
Name of routine: | wrall |
---|---|
Source lines: | 62222 - 62239 |
Type | subroutine |
Call | wrall(iall, allel) |
Module | None |
Notes | Write an allele |
Name of routine: | wrall2 |
---|---|
Source lines: | 62244 - 62268 |
Type | subroutine |
Call | wrall2(anum, allele_buffer, allel) |
Module | None |
Notes | Code large numbered alleles, usually STRs, as fake polyA alleles |
Name of routine: | juststr |
---|---|
Source lines: | 62272 - 62299 |
Type | subroutine |
Call | juststr(just,string,length) |
Module | None |
Notes | Justify a string of characters within a string |
Name of routine: | ascend |
---|---|
Source lines: | 62303 - 62310 |
Type | subroutine |
Call | ascend(n, ia) |
Module | None |
Notes | Initialize array with value of index |
Name of routine: | connect |
---|---|
Source lines: | 62314 - 62414 |
Type | subroutine |
Call | connect(num, fa, mo, set, nsub, maxgrp) |
Module | None |
Notes | See if all members of a pedigree are connected |
Name of routine: | addlist |
---|---|
Source lines: | 62419 - 62429 |
Type | subroutine |
Call | addlist(pos, idx, set) |
Module | None |
Notes | Shift an individual from the list of ungrouped individuals to the appropriate group (subpedigree) nucleating around the index person. |
Name of routine: | findlist |
---|---|
Source lines: | 62433 - 62448 |
Type | subroutine |
Call | findlist(trget, num, set, pos) |
Module | None |
Notes | Find list number <target> |
Name of routine: | badloop |
---|---|
Source lines: | 62452 - 62520 |
Type | subroutine |
Call | badloop(pedigree, num, id, key, fa, mo, nerr) |
Module | None |
Notes | Find pathological loops in current pedigree |
Name of routine: | wrsubped |
---|---|
Source lines: | 62524 - 62562 |
Type | subroutine |
Call | wrsubped(pedigree, num, id, key, set, nsub, maxgrp, plevel) |
Module | None |
Notes | List the members of pedigree(s) |
Name of routine: | gener |
---|---|
Source lines: | 62568 - 62740 |
Type | subroutine |
Call | gener(pedigree, num, fa, mo, nsub, set, ord, higen, nerr, plevel) |
Module | None |
Notes | Work out generation number ord(). Visit every person in each subpedigree in turn. The missing value for generation must be a large negative value. |
Name of routine: | dogen |
---|---|
Source lines: | 62745 - 62882 |
Type | subroutine |
Call | dogen(dataset, trait, typ, plevel) |
Module | None |
Notes | Write out pedigrees as list of nuclear families plus marry-ins by generation number |
Name of routine: | wrgen |
---|---|
Source lines: | 62887 - 62944 |
Type | subroutine |
Call | wrgen(ped, dataset, curped, set, higen, ord) |
Module | None |
Notes | Write out structure and generation numbers List of sibships by generation number |
Name of routine: | tidydata |
---|---|
Source lines: | 62948 - 62995 |
Type | subroutine |
Call | tidydata(nloci, loctyp, locpos, dataset, tottyp) |
Module | None |
Notes | Round up allele sizes etc |
Name of routine: | duplicates |
---|---|
Source lines: | 62999 - 63034 |
Type | subroutine |
Call | duplicates(dataset, plevel) |
Module | None |
Notes | Check for duplicate pedigrees or records |
Name of routine: | showdups |
---|---|
Source lines: | 63038 - 63066 |
Type | subroutine |
Call | showdups(pos, ncopies, pedname, pedpos, dataset, plevel) |
Module | None |
Notes | Print the duplicates for current pedigree |
Name of routine: | testhap |
---|---|
Source lines: | 63070 - 63275 |
Type | subroutine |
Call | testhap(typ, nloci, loc, loctyp, locpos, dataset, inconsist, plevel) |
Module | None |
Notes | Check haploid markers 1=Y 2=Mit |
Name of routine: | testsex |
---|---|
Source lines: | 63302 - 63680 |
Type | subroutine |
Call | testsex(seximpute, sexcrit, sexmarker, heterror, nloci, loc, lochash, loctyp, locpos, dataset, allele_buffer, inconsist, plevel) |
Module | None |
Notes | Check sex using sex-linked markers assuming false het call rate z Male outcomes A AB B p(1-z) z q(1-z) Female outcomes AA AB BB pp(1-z) 2pq+z(1-2pq) qq(1-z) LR(G=AB) = Pr(AB|Sex=M)/Pr(AB|Sex=Female) z = ----------------------- 2pq+z(1-2pq) = z/(2pq+z(1-2pq)) LR(G=AA) = Pr(A|Sex=M)/Pr(AA|Sex=Female) p = ----------------------- p^2 = 1/p Absence of Y-haplotype data can be female sex or ungenotyped With core exome data at least, a subset of Y snps regularly appear typed in females, but Scott Gordon points out there is still strongly informative bimodality in total typed per individual. |
Name of routine: | imputesex |
---|---|
Source lines: | 63685 - 63897 |
Type | subroutine |
Call | imputesex(seximpute, dataset, plevel) |
Module | None |
Notes | Test consistency of sexes Assign consistent sexes where missing, allowing for possible MZ twins |
Name of routine: | mzgtp |
---|---|
Source lines: | 63901 - 64060 |
Type | subroutine |
Call | mzgtp(mztwin, gt, thresh, nloci, loc, loctyp, locpos, dataset, inconsist, plevel) |
Module | None |
Notes | Test monozygotic twins |
Name of routine: | dropt2 |
---|---|
Source lines: | 64065 - 64258 |
Type | subroutine |
Call | dropt2(mztwin, gt, thresh, typ, nloci, loc, loctyp, locpos, dataset, plevel) |
Module | None |
Notes | Delete MZ twin with least phenotype information out of pair or clean MZ genotypes |
Name of routine: | countmz |
---|---|
Source lines: | 64262 - 64374 |
Type | subroutine |
Call | countmz(mztwin, gt, thresh, dataset, plevel) |
Module | None |
Notes | Count up MZ twins, triplets, quads, higher |
Name of routine: | mzfind |
---|---|
Source lines: | 64379 - 64588 |
Type | subroutine |
Call | mzfind(typ, mztrait, mistyping, minmarkers, nloci, loc, loctyp, locpos, locstat, dataset, plevel) |
Module | None |
Notes | Find MZ twins/duplicates based on genotype concordance Abort pairwise comparison after <nfailure> mismatches |
Name of routine: | mztest |
---|---|
Source lines: | 64593 - 64630 |
Type | subroutine |
Call | mztest(id1, id2, nmark, mark, dataset, nfailure, nonmatch, typed, istwin) |
Module | None |
Notes | Test if pair are genetically identical, aborting if nfailure nonmatches |
Name of routine: | mzdiscord |
---|---|
Source lines: | 64635 - 64661 |
Type | subroutine |
Call | mzdiscord(id1, id2, nmark, markid, mark, dataset) |
Module | None |
Notes | If pair are assumed genetically identical, score SNPs for discordance saving to locstat |
Name of routine: | prdiscord |
---|---|
Source lines: | 64665 - 64719 |
Type | subroutine |
Call | prdiscord(id1, id2, nloci, loc, loctyp, locpos, locnotes, dataset, plevel) |
Module | None |
Notes | Genotype diff for two individuals |
Name of routine: | duptest |
---|---|
Source lines: | 64723 - 64840 |
Type | subroutine |
Call | duptest(typ, nloci, loc, loctyp, locpos, dataset, thresh, mintyp, plevel) |
Module | None |
Notes | Test only identical individual IDs as genetic duplicates |
Name of routine: | testage |
---|---|
Source lines: | 64844 - 64899 |
Type | subroutine |
Call | testage(typ, locnam, trait, thresh, dataset, droperr) |
Module | None |
Notes | Test ages or DOB for consistency |
Name of routine: | testpage |
---|---|
Source lines: | 64903 - 64950 |
Type | subroutine |
Call | testpage(typ, trait, ped, idx, parent, thresh, dataset, droperr) |
Module | None |
Notes | Test a parent |
Name of routine: | ckibs |
---|---|
Source lines: | 64955 - 65061 |
Type | subroutine |
Call | ckibs(nloci, loctyp, locpos, allele_buffer, dataset) |
Module | None |
Notes | Check if multilocus ibs sharing for pairs of sibs is consistent with purported relationship. Again as per Bishop et al 1990 |
Name of routine: | momentibs |
---|---|
Source lines: | 65069 - 65262 |
Type | subroutine |
Call | momentibs(typ, trait, gt, thresh, nloci, loc, loctyp, locpos, dataset, plevel) |
Module | None |
Notes | Estimate kinship coefficients based on overall ibs sharing diallelic markers Shrinkage estimator of Endelman and Jannink [2012] Either founders only (typ=1), all individuals (typ=2), all individuals written to kinmat (typ=3), or subsetted on a phenotype (typ=4) |
Name of routine: | load_allele_array |
---|---|
Source lines: | 65266 - 65299 |
Type | subroutine |
Call | load_allele_array(nloci, loctyp, locpos, dataset, nmark, alleles) |
Module | None |
Notes | fill array of allele frequencies for all active markers |
Name of routine: | ibskin |
---|---|
Source lines: | 65307 - 65503 |
Type | subroutine |
Call | ibskin(typ, trait, gt, thresh, nloci, loc, loctyp, locpos, dataset, plevel) |
Module | None |
Notes | Estimate kinship coefficients based on overall ibs sharing EM algorithm of Choi et al Genet Epidemiol 33:668-678 Either founders only (typ=1), all individuals (typ=2), within pedigrees (typ=3), subsetted on a phenotype (typ=4), or all v. index individual (typ=5). |
Name of routine: | empkin |
---|---|
Source lines: | 65509 - 65605 |
Type | subroutine |
Call | empkin(ped, dataset, kin, plevel) |
Module | None |
Notes | Estimate kinship based on overall ibs sharing EM algorithm of Choi et al Genet Epidemiol 33:668-678 Saves empirical kinship matrix for current pedigree |
Name of routine: | ibskin_one |
---|---|
Source lines: | 65610 - 65728 |
Type | subroutine |
Call | ibskin_one(peri, perj, locpos, alleles, dataset, useful, ibscoef) |
Module | None |
Notes | Estimate kinship coefficients based on overall ibs sharing One pair of relatives |
Name of routine: | emibskin |
---|---|
Source lines: | 65732 - 65780 |
Type | subroutine |
Call | emibskin(nmark, nused, ibscoef, k0, k1, k2, plevel) |
Module | None |
Notes | EM approach of Choi et al 2009 |
Name of routine: | bluefreq |
---|---|
Source lines: | 65788 - 65902 |
Type | subroutine |
Call | bluefreq(gene, filter, gt, thresh, dataset, allele_buffer, plevel) |
Module | None |
Notes | BLUE allele frequency estimator of McPeek et al 2004 a = (1' L^(-1) 1)^(-1) 1' L^(-1) Z Var(a) = 0.5 * (1' L^(-1) 1)^(-1) a(1-a) Z=ith allele count L=NRM |
Name of routine: | bigblue |
---|---|
Source lines: | 65911 - 66008 |
Type | subroutine |
Call | bigblue(gene, filter, gt, thresh, dataset, allele_buffer, plevel) |
Module | None |
Notes | BLUE allele frequency estimator of McPeek et al 2004 using empirical kinship matrix for entire sample a = (1' L^(-1) 1)^(-1) 1' L^(-1) Z Var(a) = 0.5 * (1' L^(-1) 1)^(-1) a(1-a) Z=ith allele count L=NRM |
Name of routine: | save_bluefreqs |
---|---|
Source lines: | 66012 - 66064 |
Type | subroutine |
Call | save_bluefreqs(filter, allele_buffer, totobs, ns, ds, plevel) |
Module | None |
Notes | Save BLUE estimates to allele_buffer |
Name of routine: | domqls |
---|---|
Source lines: | 66068 - 66451 |
Type | subroutine |
Call | domqls(typ, trait, gt, thresh, gene, locnam, prev, nulltyp, dataset, allele_buffer, iter, pval, plevel) |
Module | None |
Notes | MQLS of Bourgain et al 2003, Thornton et al 2007 |
Name of routine: | big_mqls |
---|---|
Source lines: | 66456 - 66789 |
Type | subroutine |
Call | big_mqls(typ, trait, gt, thresh, gene, locnam, prev, nulltyp, dataset, allele_buffer, pval, plevel) |
Module | None |
Notes | MQLS of Bourgain et al 2003, Thornton et al 2007 using empirical kinship matrix for entire sample |
Name of routine: | corchi |
---|---|
Source lines: | 66794 - 67108 |
Type | subroutine |
Call | corchi(kintyp, trait, loctyp, gene, locnam, hashtab, dataset, allele_buffer, iter, pval, plevel) |
Module | None |
Notes | WQLS association chi-square extending Bourgain et al 2003 to categorical traits with more than 2 levels |
Name of routine: | loadphenos |
---|---|
Source lines: | 67112 - 67163 |
Type | subroutine |
Call | loadphenos(trait, loctyp, gene, offset, num, allele_buffer, dataset, ncats, traitcols, traittable, phenos, genos) |
Module | None |
Notes | Set up phenotype and genotype matrices |
Name of routine: | corchi_one |
---|---|
Source lines: | 67168 - 67193 |
Type | subroutine |
Call | corchi_one(nobs, ncats, traitcols, phenos, genos, ainv, u11, uscore, u12, u22) |
Module | None |
Notes | S = u2' I21~ u2 I21 = U22-(U21' U11~ U21) |
Name of routine: | freq |
---|---|
Source lines: | 67201 - 67348 |
Type | subroutine |
Call | freq(gene, loctyp, fndr, dataset, allele_buffer) |
Module | None |
Notes | Count alleles in entire sample -- codominant system Either unweighted or weighted by number of founders in pedigree If imputation has been done and fndr=2, then return the count of alleles in the founders, both observed and imputed |
Name of routine: | tab |
---|---|
Source lines: | 67353 - 67388 |
Type | subroutine |
Call | tab(curr, allele_buffer, wei) |
Module | None |
Notes | update table of counts of alleles -- binary search and insertion sort if allele_buffer too small, increase size |
Name of routine: | wrfreq |
---|---|
Source lines: | 67392 - 67661 |
Type | subroutine |
Call | wrfreq(strm, locnam, group, mappos, locnote, allele_buffer, fstyle) |
Module | None |
Notes | Write out frequencies in 19 different styles |
Name of routine: | get_refalleles |
---|---|
Source lines: | 67666 - 67695 |
Type | subroutine |
Call | get_refalleles(locnote, all1, all2) |
Module | None |
Notes | Get set of reference alleles from an annotation of form [x/y] where x,y ~ {ACGT} y may be comma-delimited set of alternates - only return first |
Name of routine: | set_refalleles |
---|---|
Source lines: | 67699 - 67716 |
Type | subroutine |
Call | set_refalleles(all1, all2, locnote) |
Module | None |
Notes | Set reference alleles as an annotation of form [x/y] where x,y ~ {ACGT} |
Name of routine: | getchr |
---|---|
Source lines: | 67721 - 67775 |
Type | subroutine |
Call | getchr(locnam, locnote, chr) |
Module | None |
Notes | Get chromosome number from a locus name of form "DnnSn" ^[Dd][0-9]+[Ss]$ or an annotation of form "chr NN" \<[Cc][Hh][Rr][ :]*[0-9]+\> |
Name of routine: | thischr |
---|---|
Source lines: | 67779 - 67808 |
Type | subroutine |
Call | thischr(string, eos, pos, chr) |
Module | None |
Notes | Read a chromosome number from a string after the start position [1-9]|[1-4][0-9]|X|Y |
Name of routine: | chrnum |
---|---|
Source lines: | 67812 - 67834 |
Type | function |
Call | chrnum(chr) |
Module | None |
Notes | Convert the chromosome number to an integer |
Name of routine: | precis |
---|---|
Source lines: | 67839 - 67873 |
Type | subroutine |
Call | precis(numal, allele_freqs, ndec) |
Module | None |
Notes | remove rounding errors in allele frequencies printed out to precision ndec from f3.1 to f9.7 |
Name of routine: | uninf |
---|---|
Source lines: | 67877 - 67888 |
Type | function |
Call | uninf(numal, allele_freqs) |
Module | None |
Notes | Frequency of uninformative matings for marker locus |
Name of routine: | getfreq |
---|---|
Source lines: | 67892 - 67913 |
Type | function |
Call | getfreq(allele, allele_set) |
Module | None |
Notes | find allele frequency |
Name of routine: | getnam |
---|---|
Source lines: | 67917 - 67945 |
Type | function |
Call | getnam(rall, allele_set) |
Module | None |
Notes | find index for allele |
Name of routine: | get_namedgeno |
---|---|
Source lines: | 67949 - 67963 |
Type | subroutine |
Call | get_namedgeno(idx, gene, gen2, dataset, allele_set, g1, g2) |
Module | None |
Notes | find indices for i'th individual's genotype |
Name of routine: | match |
---|---|
Source lines: | 67967 - 67988 |
Type | subroutine |
Call | match(ival,num,key,pos) |
Module | None |
Notes | Binary search for position of value in an ascending sorted array -- integer |
Name of routine: | dmatch |
---|---|
Source lines: | 67992 - 68013 |
Type | subroutine |
Call | dmatch(val, num, key, pos) |
Module | None |
Notes | Binary search for position of value in an ascending sorted array -- double precision |
Name of routine: | actped |
---|---|
Source lines: | 68021 - 68182 |
Type | subroutine |
Call | actped(typ, red, pedfil, nloci, loc, loctyp, locpos, outpos, locnotes, typed, locstat, dataset, plevel) |
Module | None |
Notes | summarize current pedigree file typ=1 as for info 2 numbers typed at each locus 3 numbers typed at active loci 4 numbers missing at active loci |
Name of routine: | sumped |
---|---|
Source lines: | 68186 - 68248 |
Type | subroutine |
Call | sumped(nloci, loctyp, locpos, dataset) |
Module | None |
Notes | Summary statistics on families |
Name of routine: | countships |
---|---|
Source lines: | 68252 - 68269 |
Type | function |
Call | countships(ped, dataset) |
Module | None |
Notes | Count matings/sibships in current family |
Name of routine: | listpeds |
---|---|
Source lines: | 68273 - 68321 |
Type | subroutine |
Call | listpeds(typ, dataset, nwords, words) |
Module | None |
Notes | List all pedigree IDs |
Name of routine: | make_idlist |
---|---|
Source lines: | 68325 - 68374 |
Type | subroutine |
Call | make_idlist(dataset, nids, key, icount, nextcopy) |
Module | None |
Notes | Tabulate all active IDs |
Name of routine: | listids |
---|---|
Source lines: | 68378 - 68458 |
Type | subroutine |
Call | listids(dataset, ithresh, trait, plevel) |
Module | None |
Notes | Tabulate all active IDs and write an indicator variable if requested |
Name of routine: | tabulate_anno |
---|---|
Source lines: | 68462 - 68495 |
Type | subroutine |
Call | tabulate_anno(nterms, terms) |
Module | None |
Notes | Tabulate columns of locnotes |
Name of routine: | tabulate_chroms |
---|---|
Source lines: | 68499 - 68582 |
Type | subroutine |
Call | tabulate_chroms(nloci, loc, loctyp, map, group, chrom_table) |
Module | None |
Notes | Table of number of markers or traits per chromosome |
Name of routine: | listchroms |
---|---|
Source lines: | 68584 - 68651 |
Type | subroutine |
Call | listchroms(nloci, loc, loctyp, map, group) |
Module | None |
Name of routine: | testmap |
---|---|
Source lines: | 68655 - 68834 |
Type | subroutine |
Call | testmap(typ, thresh, nloci, loc, loctyp, locpos, locnotes, group, map, locstat, dataset, plevel) |
Module | None |
Notes | check for identical map positions |
Name of routine: | show_spectrum |
---|---|
Source lines: | 68838 - 68924 |
Type | subroutine |
Call | show_spectrum(dataset) |
Module | None |
Notes | Summary table for allelic spectrum |
Name of routine: | check |
---|---|
Source lines: | 68937 - 69275 |
Type | subroutine |
Call | check(checkall, nloci, loc, loctyp, locpos, locnotes, locstat, dataset, droperr, ndiscard, inconsist, plevel) |
Module | None |
Notes | check for simple inconsistencies between child and parent if requested, delete any problem genotypes (up to and including all genotypes for a nuclear family) error action if droperr ---------------------------------------- ---------------------------- 11=single parent-offspring inconsistency delete child genotype 12=Multiple p-o inconsistencies delete all nuclear fam genos 13=Inconsistencies between siblings delete all nuclear fam genos 14=More than 4 alleles segregating delete all nuclear fam genos |
Name of routine: | addall |
---|---|
Source lines: | 69279 - 69295 |
Type | subroutine |
Call | addall(iall, nall, allmax, allele) |
Module | None |
Notes | identify parental alleles in nuclear family |
Name of routine: | nuchek |
---|---|
Source lines: | 69299 - 69386 |
Type | subroutine |
Call | nuchek(xlinkd, ptyped, p11, p12, p21, p22, nkids, set, xmale, nall, allele, thiserr) |
Module | None |
Notes | nuclear family consistency check (untyped parents) |
Name of routine: | famerr |
---|---|
Source lines: | 69390 - 69426 |
Type | subroutine |
Call | famerr(locnam, gene, xlinkd, ped, dataset, currf, currm, badchild, sta, fin, errtyp, plevel) |
Module | None |
Notes | Write out nuclear family error |
Name of routine: | inderr |
---|---|
Source lines: | 69430 - 69449 |
Type | subroutine |
Call | inderr(idx, locnam, gene, gen2, dataset) |
Module | None |
Notes | write genotype for an individual flagged as a Mendelian error |
Name of routine: | remove |
---|---|
Source lines: | 69453 - 69466 |
Type | subroutine |
Call | remove(idx, gene, dataset, ndiscard) |
Module | None |
Notes | Remove a genotype from data |
Name of routine: | remfam |
---|---|
Source lines: | 69470 - 69486 |
Type | subroutine |
Call | remfam(currf, currm, sta, fin, gene, dataset, ndiscard) |
Module | None |
Notes | drop a nuclear family's genotypes |
Name of routine: | parcon |
---|---|
Source lines: | 69492 - 69511 |
Type | function |
Call | parcon(c1, c2, p11, p12, p21, p22, xmale) |
Module | None |
Notes | Tests if child genotype consistent with parental genotypes: parcon=4*Pr(Child_genotype|Father_genotype,Mother_genotype) if xmale TRUE then X-linked locus *and* male child |
Name of routine: | opcon |
---|---|
Source lines: | 69515 - 69522 |
Type | function |
Call | opcon(c1,c2,p1,p2) |
Module | None |
Notes | test if child genotype consistent with one parental genotype |
Name of routine: | shipcon |
---|---|
Source lines: | 69526 - 69543 |
Type | function |
Call | shipcon(pg1, pg2, mg1, mg2, nkids, set, xmale) |
Module | None |
Notes | test consistency of a sibship with parents |
Name of routine: | couple |
---|---|
Source lines: | 69548 - 69565 |
Type | subroutine |
Call | couple(idx,tot,rang,i1,i2) |
Module | None |
Notes | Enumerate all combinations of i ~ I(1..range) with itself If index=tot then return last tuple |
Name of routine: | whall |
---|---|
Source lines: | 69569 - 69584 |
Type | function |
Call | whall(iall,nall,allele) |
Module | None |
Notes | Find index of allele segregating in nuclear family |
Name of routine: | describe |
---|---|
Source lines: | 69588 - 69854 |
Type | subroutine |
Call | describe(locnam, gene, xlinkd, ped, dataset, currf, currm, sta, fin, mesg) |
Module | None |
Notes | write out genotypes in nuclear family and grandparents |
Name of routine: | famset |
---|---|
Source lines: | 69859 - 70019 |
Type | subroutine |
Call | famset(ped, dataset, currf, currm, sta, fin, gene, set, gset) |
Module | None |
Notes | Write out phenoset for a nuclear family (plus grandparents and halfsibs) Useful in detecting sources of long distance Mendelian inconsistencies. |
Name of routine: | indset |
---|---|
Source lines: | 70023 - 70066 |
Type | subroutine |
Call | indset(idx, gene, pedoffset, dataset, set, gset) |
Module | None |
Notes | write out phenoset for an individual |
Name of routine: | allinset |
---|---|
Source lines: | 70070 - 70086 |
Type | function |
Call | allinset(idx, iall, ngeno, gset) |
Module | None |
Notes | see if particular allele in phenoset for idx person |
Name of routine: | cntbad |
---|---|
Source lines: | 70090 - 70102 |
Type | subroutine |
Call | cntbad(idx, ngeno, gset) |
Module | None |
Notes | If phenoset contains zero legal genotypes, reconstruct last state |
Name of routine: | wroddall |
---|---|
Source lines: | 70106 - 70126 |
Type | subroutine |
Call | wroddall(pedigree, parent, child, iall, partyp) |
Module | None |
Notes | If find an odd-allele-out, write out its location |
Name of routine: | start |
---|---|
Source lines: | 70131 - 70251 |
Type | subroutine |
Call | start(maxtry, nloci, loc, loctyp, locpos, dataset, allele_buffer, inconsist, plevel) |
Module | None |
Notes | If Lange-Goradia algorithm not used, initialize genotypes for random walk algorithms via a conditional gene dropping algorithm |
Name of routine: | workpointers |
---|---|
Source lines: | 70255 - 70280 |
Type | subroutine |
Call | workpointers(ped, dataset, fa, mo, imztwin) |
Module | None |
Notes | make parental pointers offset for local work array |
Name of routine: | dattoset |
---|---|
Source lines: | 70284 - 70312 |
Type | subroutine |
Call | dattoset(sta, fin, gene, dataset, allele_buffer, set) |
Module | None |
Notes | transfer genotypes to working array |
Name of routine: | startone |
---|---|
Source lines: | 70316 - 70400 |
Type | subroutine |
Call | startone(maxtry, allele_buffer, num, nfound, fa, mo, sex, set, sibd, key, failid, plevel) |
Module | None |
Notes | start genotypes for one pedigree |
Name of routine: | genof3 |
---|---|
Source lines: | 70406 - 70499 |
Type | subroutine |
Call | genof3(idx, fa, mo, xmale, set, sibd, key, failid) |
Module | None |
Notes | Drop ibd-alleles conditional on observed markers and randomly where marker genotype not observed -- restart if later generates inconsistency |
Name of routine: | fillin |
---|---|
Source lines: | 70503 - 70555 |
Type | subroutine |
Call | fillin(allele_buffer, num, nfound, set, sibd, key, sta, fin, gene, dataset) |
Module | None |
Notes | infer missing genotypes based on sibd values after run of start |
Name of routine: | found |
---|---|
Source lines: | 70559 - 70570 |
Type | subroutine |
Call | found(cumfrq, allele) |
Module | None |
Notes | founder frequency |
Name of routine: | countp |
---|---|
Source lines: | 70574 - 70592 |
Type | subroutine |
Call | countp(trait, dataset, typed) |
Module | None |
Notes | Give count of individuals typed at one phenotype |
Name of routine: | coutyp |
---|---|
Source lines: | 70596 - 70635 |
Type | subroutine |
Call | coutyp(nloci, loctyp, locpos, dataset, eligible, typed) |
Module | None |
Notes | Give counts of typed individuals for each locus |
Name of routine: | thetaf |
---|---|
Source lines: | 70645 - 70662 |
Type | function |
Call | thetaf(het, n) |
Module | None |
Notes | Xu and Fu 2004 correction for thetaf=4Nu=1/2(1/F^2-1) where F is the observed homozygosity for the locus is: 1/2 (1/F^2-1) = a thetaf + b sqrt(thetaf) where thetaf <=10 >10 a 1.1313+3.4882/n+28.2878/n^2ltyp, 1.1675+3.3232/n+63.698/n^2 b 0.3998 0.2569 |
Name of routine: | mutage |
---|---|
Source lines: | 70666 - 70678 |
Type | subroutine |
Call | mutage(p, ne, r) |
Module | None |
Notes | Age of an allele (Ohta, Nei, Rannala & Slatkin) |
Name of routine: | qtlpars |
---|---|
Source lines: | 70682 - 70727 |
Type | subroutine |
Call | qtlpars(p,m1,m2,m3,sd1,sd2,sd3) |
Module | None |
Notes | Calculate variances for a given SML model |
Name of routine: | ccpen |
---|---|
Source lines: | 70733 - 70749 |
Type | subroutine |
Call | ccpen(prev, pca, pco, typ) |
Module | None |
Notes | Calculate penetrances for a particular prevalence and case and control allele frequencies, assuming multiplicative model Controls are unaffected (1), or population (2) |
Name of routine: | grrpen |
---|---|
Source lines: | 70753 - 70786 |
Type | subroutine |
Call | grrpen(model, prev, q, grr) |
Module | None |
Notes | Calculate penetrances for a particular prevalence and genotypic RR |
Name of routine: | recrisk |
---|---|
Source lines: | 70790 - 70880 |
Type | subroutine |
Call | recrisk(q,f1,f2,f3) |
Module | None |
Notes | Calculate recurrence risks and risk ratios for given SML model |
Name of routine: | doito |
---|---|
Source lines: | 70884 - 70936 |
Type | subroutine |
Call | doito(typ, pars) |
Module | None |
Notes | Calculate GPE for a relative: ITO method |
Name of routine: | ito |
---|---|
Source lines: | 70940 - 70979 |
Type | subroutine |
Call | ito(rel, q, r) |
Module | None |
Notes | ITO calculation |
Name of routine: | tetcor |
---|---|
Source lines: | 70984 - 70996 |
Type | function |
Call | tetcor(prev, prrr) |
Module | None |
Notes | MFT heritability Tetrachoric correlation for given prevalence and recurrence risk ratio |
Name of routine: | brent_tet |
---|---|
Source lines: | 71000 - 71008 |
Type | function |
Call | brent_tet(r) |
Module | None |
Notes | likelihood function for tetrachoric r |
Name of routine: | polycor |
---|---|
Source lines: | 71012 - 71067 |
Type | subroutine |
Call | polycor(nr, nc, tab, polyr, assocX2, modelX2) |
Module | None |
Notes | Two-stage polychoric r - fixed thresholds |
Name of routine: | brent_polyr |
---|---|
Source lines: | 71072 - 71096 |
Type | function |
Call | brent_polyr(r) |
Module | None |
Notes | Likelihood function for 1-dim ML estimation of polychoric r, fixed threshholds in module brent_mft |
Name of routine: | dataset_uses |
---|---|
Source lines: | 71101 - 71117 |
Type | function |
Call | dataset_uses(dataset) |
Module | None |
Name of routine: | dataset_uses |
---|---|
Source lines: | 71119 - 71135 |
Type | function |
Call | dataset_uses(dataset) |
Module | None |
Name of routine: | macsub |
---|---|
Source lines: | 71140 - 71251 |
Type | subroutine |
Call | macsub(narg, words, commands, plevel) |
Module | None |
Notes | Perform simple macro substitutions on contents of command buffer |
Name of routine: | macloop |
---|---|
Source lines: | 71261 - 71416 |
Type | subroutine |
Call | macloop(lin, nloci, loc, loctyp, commands, plevel) |
Module | None |
Notes | Expand an iterator list of tokens in a command These implicit loops are signalled by a list surrounded by braces Implemented as a naive immediate macro expansion so: {1 2} + 1 -> 1 + 1; 2 + 1 {1 : 3} -> 1;2;3 {1 2} + {1 2} -> 1 + {1 2}; 2 + {1 2} requiring further evaluation |
Name of routine: | macvar |
---|---|
Source lines: | 71421 - 71500 |
Type | subroutine |
Call | macvar(lin, commands, plevel) |
Module | None |
Notes | Perform simple macro variable substitutions on contents of command buffer cf macro functions which are handled by macsub |
Name of routine: | preparser |
---|---|
Source lines: | 71506 - 71556 |
Type | subroutine |
Call | preparser(first, narg, words) |
Module | None |
Notes | Other syntax transformations replace category labels in expressions with corresponding values eg 'Hair_colour == red' -> 'Hair_colour == 1' |
Name of routine: | parser |
---|---|
Source lines: | 71567 - 71705 |
Type | subroutine |
Call | parser(nterm, wtyp, wtag, expr, error) |
Module | None |
Notes | Evaluate and apply simple expressions either (1) pure arithmetic, so no effect on pedigree file (2) Dry run, so can test if will lead to a legal effect on pedigree file all variables set to MISS (3) Pedigree operation -- individual-wise calculation and update The parser |
Name of routine: | simpev |
---|---|
Source lines: | 71709 - 71946 |
Type | subroutine |
Call | simpev(sta, fin, nterm, wtyp, wtag, expr, error) |
Module | None |
Notes | The non-compound evaluator |
Name of routine: | wrans |
---|---|
Source lines: | 71950 - 71989 |
Type | subroutine |
Call | wrans(prefix, nterm, expr, wtyp, wtag, val) |
Module | None |
Notes | write out results of command line expression evaluation |
Name of routine: | legall |
---|---|
Source lines: | 71993 - 72007 |
Type | function |
Call | legall(xall) |
Module | None |
Notes | the legal range of alleles |
Name of routine: | isdata |
---|---|
Source lines: | 72011 - 72016 |
Type | function |
Call | isdata(idx) |
Module | None |
Notes | Is a stack element a number, variable or operator |
Name of routine: | isenv |
---|---|
Source lines: | 72020 - 72025 |
Type | function |
Call | isenv(idx) |
Module | None |
Notes | Is a stack element an automatic variable |
Name of routine: | isvar |
---|---|
Source lines: | 72029 - 72034 |
Type | function |
Call | isvar(idx) |
Module | None |
Notes | Is a stack element data |
Name of routine: | isop |
---|---|
Source lines: | 72038 - 72043 |
Type | function |
Call | isop(idx) |
Module | None |
Notes | Is a stack element an operator |
Name of routine: | isvec |
---|---|
Source lines: | 72047 - 72052 |
Type | function |
Call | isvec(idx) |
Module | None |
Notes | Is a stack element a genotype - both values of interest |
Name of routine: | ismis |
---|---|
Source lines: | 72056 - 72061 |
Type | function |
Call | ismis(idx) |
Module | None |
Notes | Is a stack element missing data |
Name of routine: | addcolon |
---|---|
Source lines: | 72065 - 72100 |
Type | subroutine |
Call | addcolon(nterm, wtyp, wtag, expr) |
Module | None |
Notes | Convert (expr) (expr) to (expr : expr) |
Name of routine: | compop |
---|---|
Source lines: | 72104 - 72152 |
Type | subroutine |
Call | compop(pos, sta, fin, nterm, wtyp, wtag, expr, error) |
Module | None |
Notes | compound operators eg <= >= == ^= |
Name of routine: | zerop |
---|---|
Source lines: | 72156 - 72198 |
Type | subroutine |
Call | zerop(pos, wtyp, wtag, expr, error) |
Module | None |
Notes | zero argument functions |
Name of routine: | unop |
---|---|
Source lines: | 72202 - 72361 |
Type | subroutine |
Call | unop(pos, sta, fin, nterm, wtyp, wtag, expr, error) |
Module | None |
Notes | unary operators |
Name of routine: | binop |
---|---|
Source lines: | 72365 - 72596 |
Type | subroutine |
Call | binop(pos, sta, fin, nterm, wtyp, wtag, expr, error) |
Module | None |
Notes | binary operators |
Name of routine: | typwords |
---|---|
Source lines: | 72615 - 72680 |
Type | subroutine |
Call | typwords(farg, larg, words, nloci, loc, lochash, loctyp, wtyp, wtag, expr, actn) |
Module | None |
Notes | Evaluate type of each term in expression word(farg...larg) and actn actn=0 error =1 purely arithmetic =2 legal Types are: wtyp wtag expr ---- -------- -------- tokens 0 0...TOKNUM - env 1 1...ENVNUM (value) constant 2 value trait data 2 1...NLOCI (value) constant genotype 3 value, value genotype data 3 1...NLOCI (value, value) MISS 4 MISS missing trait 4 1...NLOCI MISS MISS genotype 5 MISS/MISS missing trait 5 1...NLOCI MISS/MISS NUM 6 - |
Name of routine: | dryrun |
---|---|
Source lines: | 72685 - 72696 |
Type | subroutine |
Call | dryrun(farg, larg, wtyp) |
Module | None |
Notes | If checking arguments via dry run of parser, replace variable values with (generic) NUM |
Name of routine: | pull |
---|---|
Source lines: | 72700 - 72718 |
Type | subroutine |
Call | pull(pos, dec, fin, nterm, typ, tag, expr) |
Module | None |
Notes | Pull up expr |
Name of routine: | isgeno |
---|---|
Source lines: | 72722 - 72755 |
Type | function |
Call | isgeno(string) |
Module | None |
Notes | See if a string is a valid genotype |
Name of routine: | getgeno |
---|---|
Source lines: | 72759 - 72802 |
Type | subroutine |
Call | getgeno(string, a1, a2, wtyp) |
Module | None |
Notes | Get a valid genotype |
Name of routine: | incpos |
---|---|
Source lines: | 72806 - 72815 |
Type | subroutine |
Call | incpos(pos, minpos, maxpos) |
Module | None |
Notes | Increment counter mod maxpos |
Name of routine: | getrelval |
---|---|
Source lines: | 72819 - 73071 |
Type | subroutine |
Call | getrelval(relate, summary, locnam, loctyp, trait, sumval, dataset, plevel) |
Module | None |
Notes | Get values for trait in relatives |
Name of routine: | priallval |
---|---|
Source lines: | 73075 - 73152 |
Type | subroutine |
Call | priallval(summary, trait, loctyp, ped, sumval, totobs, dataset, plevel) |
Module | None |
Notes | Output single summary value for entire pedigree |
Name of routine: | prirelval |
---|---|
Source lines: | 73156 - 73330 |
Type | subroutine |
Call | prirelval(relate, summary, trait, loctyp, ped, nobs, relid, sumval, totobs, dataset, plevel) |
Module | None |
Notes | Output values for each eligible person |
Name of routine: | evalped |
---|---|
Source lines: | 73334 - 73659 |
Type | subroutine |
Call | evalped(narg, words, nloci, loc, lochash, loctyp, locpos, locnotes, locstat, wtyp, wtag, expr, allele_buffer, dataset, chek, imp, maxtry, droperr, plevel) |
Module | None |
Notes | Evaluate expression for each pedigree member |
Name of routine: | findth |
---|---|
Source lines: | 73663 - 73698 |
Type | subroutine |
Call | findth(nterm, wtyp, wtag, posif, posth, posel, posen) |
Module | None |
Notes | Find if/then/else |
Name of routine: | findend |
---|---|
Source lines: | 73702 - 73733 |
Type | subroutine |
Call | findend(sta, fin, nterm, wtyp, wtag, posen) |
Module | None |
Notes | Find end of block |
Name of routine: | findwh |
---|---|
Source lines: | 73737 - 73750 |
Type | function |
Call | findwh(farg, larg, narg, args) |
Module | None |
Notes | Find the start of a "where" clause on command line |
Name of routine: | findword |
---|---|
Source lines: | 73754 - 73768 |
Type | function |
Call | findword(word, farg, larg, narg, args) |
Module | None |
Notes | Find a keyword -- exact match |
Name of routine: | findbracket |
---|---|
Source lines: | 73774 - 73796 |
Type | subroutine |
Call | findbracket(lb, rb, lin, sta, fin, istat) |
Module | None |
Notes | Find matching bracket in string starting at a left bracket if unmatched, returns to end of line rb may equal lb, brackets may be nested |
Name of routine: | loadvar |
---|---|
Source lines: | 73803 - 73865 |
Type | subroutine |
Call | loadvar(idx, nloci, loctyp, locpos, dataset, sta, fin, wtyp, wtag, expr) |
Module | None |
Notes | Load variable values for ith individual code y and n as 1 and 0 tot records number of active records evaluated to date nped records number of active pedigrees evaluated to date |
Name of routine: | doselect |
---|---|
Source lines: | 73869 - 74007 |
Type | subroutine |
Call | doselect(typ, nprob, farg, larg, words, nloci, loc, lochash, loctyp, locpos, wtyp, wtag, expr, dataset, nobs, plevel) |
Module | None |
Notes | Select pedigrees where probands meet a given criterion v2 |
Name of routine: | edit |
---|---|
Source lines: | 74011 - 74122 |
Type | subroutine |
Call | edit(tped, tid, gene, loc, loctyp, all1, all2, dataset, plevel) |
Module | None |
Notes | Edit alleles for particular gene for particular person |
Name of routine: | copydata |
---|---|
Source lines: | 74128 - 74237 |
Type | subroutine |
Call | copydata(typ, ped1, id1, ped2, id2, nloci, loc, loctyp, locpos, dataset, hashtab, plevel) |
Module | None |
Notes | Copy data for person A to person B typ=1 overwrite at B if A nonmissing for that variable typ=2 insert data only where B is missing for that variable |
Name of routine: | mergeloci |
---|---|
Source lines: | 74241 - 74419 |
Type | subroutine |
Call | mergeloci(first, second, thresh, nloci, loc, loctyp, locpos, locnotes, group, map, dataset, plevel) |
Module | None |
Notes | Merge genotype data for two loci together eg same map position |
Name of routine: | selped |
---|---|
Source lines: | 74423 - 74477 |
Type | subroutine |
Call | selped(typ, farg, larg, words, dataset, plevel) |
Module | None |
Notes | include or exclude a list of pedigrees |
Name of routine: | selped_fil |
---|---|
Source lines: | 74481 - 74547 |
Type | subroutine |
Call | selped_fil(typ, port, hashtab, dataset, plevel) |
Module | None |
Notes | select pedigrees listed in file |
Name of routine: | unsel |
---|---|
Source lines: | 74551 - 74606 |
Type | subroutine |
Call | unsel(dataset, rollback, plevel) |
Module | None |
Notes | unselect |
Name of routine: | docount |
---|---|
Source lines: | 74610 - 74882 |
Type | subroutine |
Call | docount(typ, farg, larg, words, nloci, loc, lochash, loctyp, locpos, locnotes, wtyp, wtag, expr, dataset, pedmask, nwid, ndec, sexcode, misval, fieldsep, allsep, show_cat, pstyle, plevel) |
Module | None |
Notes | Count or print individuals per pedigree fulfilling criterion |
Name of routine: | seldel |
---|---|
Source lines: | 74886 - 75005 |
Type | subroutine |
Call | seldel(nord, locord, farg, larg, words, nloci, loc, lochash, loctyp, locpos, wtyp, wtag, expr, dataset, plevel) |
Module | None |
Notes | Delete data for individuals fulfilling criterion |
Name of routine: | prexpr |
---|---|
Source lines: | 75009 - 75041 |
Type | subroutine |
Call | prexpr(typ, nprob, farg, larg, words) |
Module | None |
Notes | Echo action to be performed |
Name of routine: | hashids |
---|---|
Source lines: | 75045 - 75062 |
Type | subroutine |
Call | hashids(typ, dataset, hashtab, load, plevel) |
Module | None |
Notes | Hash IDs |
Name of routine: | dohashids |
---|---|
Source lines: | 75064 - 75148 |
Type | subroutine |
Call | dohashids(typ, dataset, hashtab, load, hasher, matcher, plevel) |
Module | None |
Name of routine: | hashprint |
---|---|
Source lines: | 75150 - 75196 |
Type | subroutine |
Call | hashprint(hashtab, dataset, loc, plevel) |
Module | None |
Name of routine: | matchid |
---|---|
Source lines: | 75200 - 75251 |
Type | subroutine |
Call | matchid(keytyp, idstr1, idstr2, dataset, hashtab, iaddress, plevel) |
Module | None |
Notes | Search for ID using hash |
Name of routine: | findids |
---|---|
Source lines: | 75255 - 75486 |
Type | subroutine |
Call | findids(port, lin, pedcol, idcol, hashtab, dataset, plevel) |
Module | None |
Notes | Match list of IDs from file |
Name of routine: | searchid |
---|---|
Source lines: | 75490 - 75512 |
Type | subroutine |
Call | searchid(sstrings, dataset) |
Module | None |
Notes | Wild card searching IDs |
Name of routine: | sextable |
---|---|
Source lines: | 75516 - 75543 |
Type | subroutine |
Call | sextable(dataset) |
Module | None |
Notes | Tabulate sexes |
Name of routine: | xtab |
---|---|
Source lines: | 75550 - 75646 |
Type | subroutine |
Call | xtab(analys, mistyp, sample_weight, nloc, loclist, nloci, loc, locpos, loctyp, locnotes, dataset, iter, nwid, ndec, pval, plevel) |
Module | None |
Notes | N-way cross-tabulation analys=1 simple cross-tab 2 K-W test 3 polychoric correlation |
Name of routine: | onetab |
---|---|
Source lines: | 75650 - 75697 |
Type | subroutine |
Call | onetab(loc, loctyp, locnote, table, nmiss, nwid, ndec) |
Module | None |
Notes | print summary of one-way table |
Name of routine: | listab |
---|---|
Source lines: | 75701 - 75755 |
Type | subroutine |
Call | listab(nloc, loclist, loc, loctyp, locnotes, table, nmiss, nwid, ndec) |
Module | None |
Notes | print listwise contingency table |
Name of routine: | wrtab |
---|---|
Source lines: | 75759 - 76054 |
Type | subroutine |
Call | wrtab(analys, mistyp, nloc, loclist, loc, loctyp, locnotes, table, nmiss, iter, nwid, ndec, pval) |
Module | None |
Notes | print RxC contingency table |
Name of routine: | kwtest |
---|---|
Source lines: | 76058 - 76159 |
Type | subroutine |
Call | kwtest(nloc, loclist, loc, loctyp, locnotes, martable1, martable2, table, nwid, ndec, pval) |
Module | None |
Notes | Kruskal-Wallis test |
Name of routine: | histogram |
---|---|
Source lines: | 76163 - 76195 |
Type | subroutine |
Call | histogram(trait, nloci, loc, locpos, loctyp, histcat, dataset, nwid, ndec, outfil, plevel) |
Module | None |
Notes | plot a histogram |
Name of routine: | logrank |
---|---|
Source lines: | 76199 - 76378 |
Type | subroutine |
Call | logrank(typ, nloc, loclist, nloci, loc, loctyp, locpos, locnotes, dataset, nwid, ndec, lrstat, df, pval, plevel) |
Module | None |
Notes | Logrank test: table 1..(nloc-2)=covariate levels (nloc-1)=time nloc=censor |
Name of routine: | simlogrank |
---|---|
Source lines: | 76382 - 76711 |
Type | subroutine |
Call | simlogrank(locnam, gene, onset, censor, iter, mincnt, norder, dataset, allele_buffer, pval, plevel) |
Module | None |
Notes | Logrank association test: gene time censor |
Name of routine: | survtab |
---|---|
Source lines: | 76715 - 76739 |
Type | subroutine |
Call | survtab(timelev, ngroups, table, dij, cij, nij, ni, di) |
Module | None |
Notes | Life table logrank test |
Name of routine: | calclogrank |
---|---|
Source lines: | 76743 - 76802 |
Type | subroutine |
Call | calclogrank(timelev, ngroups, ns2, di, ni, naff, cij, dij, nij, ediff, vardiff, vinv, lrstat, df) |
Module | None |
Notes | Calculate log rank statistic |
Name of routine: | simtrend |
---|---|
Source lines: | 76812 - 77042 |
Type | subroutine |
Call | simtrend(typ, locnam, gene, trait, iter, mincnt, norder, dataset, allele_buffer, pval, plevel) |
Module | None |
Notes | Nonparametric SNP association test for trend An exact (permutation) version of the Jonckheere-Terpstra test, but gene dropping. It uses the statistic Sum_{k<l} Sum_{ij} I(X_{ik} < X_{jl}) + 0.5 I(X_{ik} = X_{jl}), where i, j are observations in groups k and l respectively. |
Name of routine: | groupgenos |
---|---|
Source lines: | 77046 - 77064 |
Type | subroutine |
Call | groupgenos(nobs, geno, ngroups, gstrata) |
Module | None |
Notes | partition ordered list of genotypes returning boundaries of each subset |
Name of routine: | terpstra |
---|---|
Source lines: | 77069 - 77094 |
Type | subroutine |
Call | terpstra(ngroups, gstrata, nobs, pheno, tau) |
Module | None |
Notes | Sum_{k<l} Sum_{ij} I(X_{ik} < X_{jl}) + 0.5 I(X_{ik} = X_{jl}), where i, j are observations in groups k and l respectively. |
Name of routine: | pedtab |
---|---|
Source lines: | 77098 - 77165 |
Type | subroutine |
Call | pedtab(trait, nloci, loc, loctyp, locpos, locnotes, dataset, nwid, ndec, plevel) |
Module | None |
Notes | One-way tabulation by pedigree |
Name of routine: | fitloglin |
---|---|
Source lines: | 77169 - 77621 |
Type | subroutine |
Call | fitloglin(sta, fin, terms, nloci, loc, lochash, loctyp, locpos, locnotes, dataset, mlik, mpar, pval, nwid, ndec, plevel) |
Module | None |
Notes | Fit poisson model to a contingency table |
Name of routine: | strattyp |
---|---|
Source lines: | 77626 - 77800 |
Type | subroutine |
Call | strattyp(trait, nloci, loc, loctyp, locpos, locnotes, locord, dataset, locstat, plevel) |
Module | None |
Notes | Tabulate counts of typed individuals for each locus versus stratifying variables |
Name of routine: | dohwe |
---|---|
Source lines: | 77804 - 78109 |
Type | subroutine |
Call | dohwe(locnam, gene, loctyp, iter, mincnt, hwefnd, norder, dataset, outp, restrand, plevel) |
Module | None |
Notes | Monte-Carlo test for HWE |
Name of routine: | tabgen |
---|---|
Source lines: | 78116 - 78134 |
Type | subroutine |
Call | tabgen(a1, a2, xmale, ngcount, gcount) |
Module | None |
Notes | Increment counts of genotypes and alleles for HWE test Storage of allele counts in gcount(,2) indexed from 1..nall Genotypes indexed from 1..ngtp by gcount(,1). Males contribute to allele counts but not genotype counts |
Name of routine: | hwep |
---|---|
Source lines: | 78138 - 78192 |
Type | subroutine |
Call | hwep(numal) |
Module | None |
Notes | Calculate HWE Chi-square for table entered on command line |
Name of routine: | hwechi |
---|---|
Source lines: | 78196 - 78239 |
Type | function |
Call | hwechi(numal, ngcount, gcount, tot, totmal) |
Module | None |
Notes | Calculate Gibbs chi-square for HWE |
Name of routine: | hwe2 |
---|---|
Source lines: | 78244 - 78271 |
Type | subroutine |
Call | hwe2(n11, n12, n22, pa, pvalue) |
Module | None |
Notes | calculate hwe test for diallelic autosomal marker |
Name of routine: | dhwe2 |
---|---|
Source lines: | 78275 - 78289 |
Type | function |
Call | dhwe2(n11, n12, n22) |
Module | None |
Notes | hypergeometric for diallelic genotypes under hwe |
Name of routine: | domar |
---|---|
Source lines: | 78293 - 78397 |
Type | subroutine |
Call | domar(gene, dataset, allele_buffer, plevel) |
Module | None |
Notes | Do ibs sharing in parents |
Name of routine: | margen |
---|---|
Source lines: | 78401 - 78493 |
Type | subroutine |
Call | margen(gene, dataset, allele_buffer, iter, plevel) |
Module | None |
Notes | Tabulate maternal v. paternal genotypes |
Name of routine: | doplot |
---|---|
Source lines: | 78499 - 78591 |
Type | subroutine |
Call | doplot(fil, typ, xtrait, ytrait, ztrait, xlab, ylab, zlab, pedfil, dataset) |
Module | None |
Notes | Produce a scatterplot of two traits typ=1 scatterplot =2 dotplot (xtrait is categorical) |
Name of routine: | dohist |
---|---|
Source lines: | 78595 - 78693 |
Type | subroutine |
Call | dohist(locnam, histcat, cat, table, nwid, ndec, outfil) |
Module | None |
Notes | Produce a histogram with histcat intervals from sorted tabulation |
Name of routine: | sumucsc |
---|---|
Source lines: | 78697 - 78716 |
Type | subroutine |
Call | sumucsc(chr) |
Module | None |
Notes | Summarize test statistics for UCSC browser |
Name of routine: | tabstat |
---|---|
Source lines: | 78720 - 78842 |
Type | subroutine |
Call | tabstat(plevel) |
Module | None |
Notes | Summarize test statistics |
Name of routine: | histstat |
---|---|
Source lines: | 78846 - 78896 |
Type | subroutine |
Call | histstat(plevel) |
Module | None |
Notes | Histogram of test statistics |
Name of routine: | sumstat |
---|---|
Source lines: | 78900 - 78965 |
Type | subroutine |
Call | sumstat(numval, plevel) |
Module | None |
Notes | Show ranked test statistics |
Name of routine: | rankstat |
---|---|
Source lines: | 78969 - 78983 |
Type | subroutine |
Call | rankstat(nvar) |
Module | None |
Notes | Rank the test statistics (nvar=no. nonmissing values) |
Name of routine: | combine_stats |
---|---|
Source lines: | 78987 - 79075 |
Type | subroutine |
Call | combine_stats(nord, pval, plevel) |
Module | None |
Notes | Combine P-values from a region |
Name of routine: | get_stats |
---|---|
Source lines: | 79080 - 79116 |
Type | subroutine |
Call | get_stats(statnam) |
Module | None |
Notes | Extract statistics from locus annotation pick nth column or name=value pairs in text |
Name of routine: | dumpstats |
---|---|
Source lines: | 79120 - 79152 |
Type | subroutine |
Call | dumpstats(strm) |
Module | None |
Notes | Dump all P-values to a file |
Name of routine: | todistmix |
---|---|
Source lines: | 79156 - 79192 |
Type | subroutine |
Call | todistmix(strm, selchr, dataset, allele_buffer) |
Module | None |
Notes | Dump stats for DISTmix |
Name of routine: | asciiplot |
---|---|
Source lines: | 79196 - 79318 |
Type | subroutine |
Call | asciiplot(plevel) |
Module | None |
Notes | Produce a plot of P-values |
Name of routine: | sumplot |
---|---|
Source lines: | 79322 - 79379 |
Type | subroutine |
Call | sumplot(fil) |
Module | None |
Notes | Produce a plot of P-values |
Name of routine: | qqplot |
---|---|
Source lines: | 79383 - 79423 |
Type | subroutine |
Call | qqplot(fil) |
Module | None |
Notes | Produce a Q-Q (quantile-quantile) plot of P-values |
Name of routine: | selstat |
---|---|
Source lines: | 79427 - 79446 |
Type | subroutine |
Call | selstat(message, thresh, gt, plevel) |
Module | None |
Notes | Select loci (wloc) based on test on value of locstat |
Name of routine: | traceplot |
---|---|
Source lines: | 79450 - 79481 |
Type | subroutine |
Call | traceplot(fil, nobs, nmult, yvals) |
Module | None |
Notes | Produce a MCMC trace |
Name of routine: | filliben |
---|---|
Source lines: | 79489 - 79544 |
Type | subroutine |
Call | filliben(table, plevel) |
Module | None |
Notes | Filliben correlation here testing for normality m(i) = 1 - m(n) for i = 1 m(i) = (i - 0.3175)/(n + 0.365) for i = 2, 3, ..., n-1 m(i) = 0.5**(1/n) for i = n |
Name of routine: | symtest |
---|---|
Source lines: | 79552 - 79623 |
Type | subroutine |
Call | symtest(table, plevel) |
Module | None |
Notes | David & Johnson's Jr test for symmetry of a distribution Resek Busi Stat 1975; 546-551 Doksum Biometrika 1977; 64: 473-487 Standard error of Jr based on simulations under Gaussian true distribution |
Name of routine: | unidens |
---|---|
Source lines: | 79636 - 79764 |
Type | subroutine |
Call | unidens(num, xvals, xmode, plevel) |
Module | None |
Notes | Unimodal density estimation using modified PAVA algorithm adapted from code written by Mary Meyer Statistica Sinica 11(2001), 1159-1174 AN ALTERNATIVE UNIMODAL DENSITY ESTIMATOR WITH A CONSISTENT ESTIMATE OF THE MODE Mary C. Meyer University of Georgia starts with unimodal interval and then does LCM and GCM on either side Approach is a NPMLE modified to handle the unknown mode case - with penalty on mode |
Name of routine: | evdtailp |
---|---|
Source lines: | 79774 - 79793 |
Type | function |
Call | evdtailp(xpos, n, mm, xvals, xnew) |
Module | None |
Notes | Tail estimation procedure of Davis and Resnick (1984; Ann Stat 12:1467-87) Pareto tail estimate from order statistics per extreme value theory. xvals(1:(m+2)) contains the ordered m highest out of n values where xvals(1) is work space, xvals(2) = b = the n-m'th order statistic, a is the tail index, here estimated using Hill's (1975) estimator. xpos is the rank of xnew in the distribution, so that if b <= 0, then returns xpos/n |
Name of routine: | clcmcn |
---|---|
Source lines: | 79797 - 79806 |
Type | function |
Call | clcmcn(b,c) |
Module | None |
Notes | calculate McNemar statistic |
Name of routine: | binz |
---|---|
Source lines: | 79810 - 79819 |
Type | function |
Call | binz(x, n, e) |
Module | None |
Notes | normal approx binomial deviate |
Name of routine: | ftdev |
---|---|
Source lines: | 79823 - 79828 |
Type | function |
Call | ftdev(o,e) |
Module | None |
Notes | Freeman-Tukey deviates |
Name of routine: | clcpos |
---|---|
Source lines: | 79833 - 79842 |
Type | function |
Call | clcpos(i,j) |
Module | None |
Notes | find index of coefficient for pair i,j in a lower triangular matrix stored as a 1-D array |
Name of routine: | big_clcpos |
---|---|
Source lines: | 79847 - 79856 |
Type | function |
Call | big_clcpos(i,j) |
Module | None |
Notes | find index of coefficient for pair i,j in a lower triangular matrix stored as a big 1-D array |
Name of routine: | copy |
---|---|
Source lines: | 79860 - 79867 |
Type | subroutine |
Call | copy(n, ia, ib) |
Module | None |
Notes | Copy integer array A to integer array B |
Name of routine: | filltri |
---|---|
Source lines: | 79871 - 79890 |
Type | subroutine |
Call | filltri(n, nn, a, dval, oval) |
Module | None |
Notes | Load a lower triangular matrix |
Name of routine: | ln |
---|---|
Source lines: | 79894 - 79902 |
Type | function |
Call | ln(x) |
Module | None |
Notes | zero-trapped log |
Name of routine: | logit |
---|---|
Source lines: | 79906 - 79916 |
Type | function |
Call | logit(p) |
Module | None |
Notes | logit of p |
Name of routine: | alogit |
---|---|
Source lines: | 79920 - 79924 |
Type | function |
Call | alogit(x) |
Module | None |
Notes | Reverse logit |
Name of routine: | inht |
---|---|
Source lines: | 79928 - 79932 |
Type | function |
Call | inht(x) |
Module | None |
Notes | Inverse hyperbolic tan |
Name of routine: | fishzse |
---|---|
Source lines: | 79936 - 79940 |
Type | function |
Call | fishzse(n) |
Module | None |
Notes | Standard error for Fisher-Z transformed correlation coefficient |
Name of routine: | fishzci |
---|---|
Source lines: | 79944 - 79955 |
Type | subroutine |
Call | fishzci(r, n, rlo, rhi) |
Module | None |
Notes | 95%CI via Fisher-Z transform for correlation coefficient |
Name of routine: | sech |
---|---|
Source lines: | 79959 - 79963 |
Type | function |
Call | sech(x) |
Module | None |
Notes | Hyperbolic secant |
Name of routine: | cortest |
---|---|
Source lines: | 79969 - 79981 |
Type | function |
Call | cortest(r1, r2, n1, n2) |
Module | None |
Notes | Test equality of two correlation coefficients via LRTS (Brandner 1933; Stuart & Ord Volume 2, Exercise 26.21) Direction of test is retained |
Name of routine: | rtheta |
---|---|
Source lines: | 79985 - 79989 |
Type | function |
Call | rtheta(x) |
Module | None |
Notes | ibd correlation to recombination fraction |
Name of routine: | wrpropci |
---|---|
Source lines: | 79994 - 80004 |
Type | subroutine |
Call | wrpropci(num, den, width) |
Module | None |
Notes | Confidence intervals around a proportion: approach of Wilson (Agresti & Coull) -- wrapper |
Name of routine: | propci |
---|---|
Source lines: | 80008 - 80036 |
Type | subroutine |
Call | propci(num, den, inwidth, phat, ll, ul) |
Module | None |
Notes | Actual Wilson algorithm |
Name of routine: | moment |
---|---|
Source lines: | 80040 - 80050 |
Type | subroutine |
Call | moment(n, x, mean, ss) |
Module | None |
Notes | accumulate mean and sum-of-squares following AS41 |
Name of routine: | dssp |
---|---|
Source lines: | 80054 - 80076 |
Type | subroutine |
Call | dssp(nvar, nobs, iwt, x, mean, cov) |
Module | None |
Notes | accumulate means and SSCP following AS41 |
Name of routine: | covcor |
---|---|
Source lines: | 80080 - 80100 |
Type | subroutine |
Call | covcor(nvar, nobs, cov) |
Module | None |
Notes | Standardize covariance matrix (variances left on diagonal) |
Name of routine: | thincov |
---|---|
Source lines: | 80104 - 80139 |
Type | subroutine |
Call | thincov(nfull, nreduced, active, cov) |
Module | None |
Notes | Thin a covariance matrix |
Name of routine: | predmat |
---|---|
Source lines: | 80147 - 80190 |
Type | subroutine |
Call | predmat(nfull, yindicator, cov, xval, yp) |
Module | None |
Notes | Predicting values for subset (indexed by yindicator) given covariance matrix and values for complementary subset. X values are stored counting backwards in xval(nfull-ny+1:nfull) (the observed values for the predicted group are stored xval(1:ny) On output, yp contains ny (sum(active)) predicted values. |
Name of routine: | iquadmult |
---|---|
Source lines: | 80194 - 80229 |
Type | subroutine |
Call | iquadmult(n, y, s, res) |
Module | None |
Notes | Use AS164 to evaluate quadratic y' S~ y where S not necessarily full rank |
Name of routine: | loglin |
---|---|
Source lines: | 80233 - 80314 |
Type | subroutine |
Call | loglin(ncells, totpars, npars, counts, model, offset, b, cov, lrts) |
Module | None |
Notes | Use AS164 to fit a log-linear model |
Name of routine: | emllm |
---|---|
Source lines: | 80319 - 80435 |
Type | subroutine |
Call | emllm(ncells, nfull, totpars, npars, counts, scatter, model, ex, oldex, full, offset, b, cov, lrts, plevel) |
Module | None |
Notes | Use AS164 and EM algorithm to fit a log-linear model to incomplete tables |
Name of routine: | gl |
---|---|
Source lines: | 80439 - 80481 |
Type | subroutine |
Call | gl(nr, nc, design, sta, levels, reps, droplev) |
Module | None |
Notes | Appropriate design matrix for factor |
Name of routine: | logccs |
---|---|
Source lines: | 80485 - 80710 |
Type | subroutine |
Call | logccs(nstrata, nobs, nv, nv1, ivar, nca, nct, z, b, cov, chi2, st, ifault, plevel) |
Module | None |
Notes | AS162 - Conditional logistic regression. Converted to Fortran 95 |
Name of routine: | twidl |
---|---|
Source lines: | 80715 - 80764 |
Type | subroutine |
Call | twidl(x, y, z, done, p, n2) |
Module | None |
Notes | this generates all combinations of m out of n. CACM algorithm 382 |
Name of routine: | segrat |
---|---|
Source lines: | 80768 - 81015 |
Type | subroutine |
Call | segrat(locnam, trait, dataset) |
Module | None |
Notes | Binary trait prevalences and recurrence risks. |
Name of routine: | catseg |
---|---|
Source lines: | 81019 - 81231 |
Type | subroutine |
Call | catseg(typ, trait, dataset, jdraw, iter, plevel) |
Module | None |
Notes | Familial association for categorical or ordinal trait |
Name of routine: | famcatass |
---|---|
Source lines: | 81235 - 81497 |
Type | subroutine |
Call | famcatass(typ, trait, traitlevels, traittable, dataset, npairs, crosstables, corstat) |
Module | None |
Notes | Pairwise familial Cohen Kappa (typ=1) or polychoric correlation (typ=2) |
Name of routine: | twincon |
---|---|
Source lines: | 81501 - 81708 |
Type | subroutine |
Call | twincon(locnam, trait, mztwin, gt, thresh, dataset, plevel) |
Module | None |
Notes | Classical twin analysis: binary trait prevalences and recurrence risks |
Name of routine: | concest |
---|---|
Source lines: | 81712 - 81736 |
Type | subroutine |
Call | concest(group, concord, npairs, prev, con, locon, hicon) |
Module | None |
Notes | Summary statistics for recurrence risk calculation |
Name of routine: | conchi |
---|---|
Source lines: | 81740 - 81756 |
Type | subroutine |
Call | conchi(a, b, c, d, lrts) |
Module | None |
Notes | LRTS for equality of 2x2 |
Name of routine: | tarone |
---|---|
Source lines: | 81760 - 81852 |
Type | subroutine |
Call | tarone(trait, dataset, plevel) |
Module | None |
Notes | Test for extrabinomial variation |
Name of routine: | davie |
---|---|
Source lines: | 81856 - 81971 |
Type | subroutine |
Call | davie(loc1, trait, loc2, proband, dataset, plevel) |
Module | None |
Notes | Segregation ratios using Davie 1976 |
Name of routine: | davstat |
---|---|
Source lines: | 81975 - 82007 |
Type | subroutine |
Call | davstat(typ, pos, sta, npro, trait, dataset, class, j, q, t, r) |
Module | None |
Notes | Accumulate counts needed for Davie formula in current family |
Name of routine: | davwri |
---|---|
Source lines: | 82011 - 82040 |
Type | subroutine |
Call | davwri(ped, currf, currm, pos, sta, npro, trait, dataset) |
Module | None |
Notes | print prop affected per sibship |
Name of routine: | marseg |
---|---|
Source lines: | 82053 - 82199 |
Type | subroutine |
Call | marseg(gene, locnam, typ, dataset, allele_buffer, plevel) |
Module | None |
Notes | Simple segregation tabulations for a codominant marker Phase the genotypes if requested So either Father Mother Child ng ng na*na or mating Child ng*(ng+1)/2 ng |
Name of routine: | famimp |
---|---|
Source lines: | 82204 - 82429 |
Type | subroutine |
Call | famimp(locnam, trait, dataset, plevel) |
Module | None |
Notes | Simple family based imputation of age/yob/etc ego ~ midparent + sibs + spouses + offspring |
Name of routine: | famcor |
---|---|
Source lines: | 82433 - 82644 |
Type | subroutine |
Call | famcor(locnam, trait, dataset, jdraw, iter, plevel) |
Module | None |
Notes | Quantitative trait relatives means and covariances |
Name of routine: | fammeans |
---|---|
Source lines: | 82649 - 82747 |
Type | subroutine |
Call | fammeans(trait, dataset, nobserved, obs_indx, plevel) |
Module | None |
Notes | Simple descriptive statistics for a quantitative trait sets up dataset%untyped |
Name of routine: | famcovar |
---|---|
Source lines: | 82751 - 82964 |
Type | subroutine |
Call | famcovar(trait, dataset, npairs, mu, cvar, cov) |
Module | None |
Notes | Pairwise familial correlations |
Name of routine: | sibvar |
---|---|
Source lines: | 82968 - 83093 |
Type | subroutine |
Call | sibvar(trait, dataset, plevel) |
Module | None |
Notes | Sibship variance tests |
Name of routine: | twincor |
---|---|
Source lines: | 83097 - 83305 |
Type | subroutine |
Call | twincor(locnam, trait, mztwin, gt, thresh, dataset, plevel) |
Module | None |
Notes | Classical twin analysis contrasting monozygotic twins v. other siblings. |
Name of routine: | corr |
---|---|
Source lines: | 83315 - 83337 |
Type | subroutine |
Call | corr(typ, x1, x2, nclass, npairs, mean, var, cov) |
Module | None |
Notes | update means and sums of squares and products 1=Marital 2=Grandparent-Grandchild 3=Half-sib 4=Parent-Offspring 5=Full-sib 6=MZ-Twin 7=father-son 8=father-daugher 9=mother-son 10=mother-daughter 11=brother 12=sister 13=brother-sister 14=MZ-Males 15=MZ-Females |
Name of routine: | corrstd |
---|---|
Source lines: | 83341 - 83357 |
Type | subroutine |
Call | corrstd(nclass, npairs, var, cov) |
Module | None |
Notes | cor to cov for classes |
Name of routine: | docov |
---|---|
Source lines: | 83364 - 83477 |
Type | subroutine |
Call | docov(typ, nterms, terms, nloci, loc, loctyp, locpos, dataset) |
Module | None |
Notes | Means and covariances for multiple trait typ=1 means and correlations 2 means and covariances 3 plus PCA |
Name of routine: | domix |
---|---|
Source lines: | 83481 - 83537 |
Type | subroutine |
Call | domix(locnam, trait, nmix, typ, histcat, outfil, dataset, logl, df, nwid, ndec, plevel) |
Module | None |
Notes | Fit mixture of distributions to quantitative trait |
Name of routine: | fitmix |
---|---|
Source lines: | 83541 - 83618 |
Type | subroutine |
Call | fitmix(nmix, typ, table, prob, den, alpha, mean, sd, logl, df, plevel) |
Module | None |
Notes | Fit mixture of distributions to univariate tabulated data |
Name of routine: | mixture |
---|---|
Source lines: | 83623 - 83817 |
Type | subroutine |
Call | mixture(a, k, m, x, n, alpha, mean, sd, f, g, nobs, logl, ifail, plevel) |
Module | None |
Notes | Fit mixture of distributions Algorithm AS 203 (Appl Stat 1984; 33:327-332) |
Name of routine: | regress |
---|---|
Source lines: | 83828 - 84190 |
Type | subroutine |
Call | regress(typ, nterms, terms, nloci, loc, loctyp, locpos, gene, genemod, allele_buffer, dataset, mlik, mpar, pval, plevel) |
Module | None |
Notes | linear regression analysis of quantitative trait typ -2 SNP regression -1 run silently 0 regression summary table 1 calculate residuals 2 imputation 3 predicted value |
Name of routine: | binreg |
---|---|
Source lines: | 84195 - 84720 |
Type | subroutine |
Call | binreg(ilink, nterms, terms, nloci, loc, loctyp, locpos, offset, censor, gene, genemod, allele_buffer, mcp, useimp, fixshape, iter, mincnt, dataset, wshap, mlik, mpar, statval, pval, plevel) |
Module | None |
Notes | Binomial (ilink=2), Poisson (ilink=3), Weibull (ilink=4), Exponential (ilink=5), EVD (ilink=6) regression analysis |
Name of routine: | fitbin |
---|---|
Source lines: | 84724 - 84770 |
Type | subroutine |
Call | fitbin(ilink, nobs, nter, ncov, it, x2, r, b, y, v, offval, x, shap, ierr, plevel) |
Module | None |
Notes | Perform binomial (ilink=2) or poisson (ilink=3) regression IRLS, |
Name of routine: | binirls |
---|---|
Source lines: | 84774 - 84847 |
Type | subroutine |
Call | binirls(ilink, nobs, nter, nel, x2, r, b, y, v, offval, x, shap, ierr, plevel) |
Module | None |
Notes | One iteration of IRLS for binomial or poisson regression |
Name of routine: | glmscale |
---|---|
Source lines: | 84851 - 84887 |
Type | subroutine |
Call | glmscale(ilink, nobs, nter, b, y, offval, x, shap, scaleval) |
Module | None |
Notes | Scale parameter for GLM |
Name of routine: | weishape |
---|---|
Source lines: | 84892 - 84925 |
Type | subroutine |
Call | weishape(nobs, naff, nter, b, y, offval, x, alpha, alpha2) |
Module | None |
Notes | Estimate shape for Weibull distribution Use relaxation methods and hard limit on step size |
Name of routine: | rcp |
---|---|
Source lines: | 84929 - 84989 |
Type | subroutine |
Call | rcp(typ, nr, nc, narg, args, iter) |
Module | None |
Notes | Simulation P for RxC contingency table read from stdin |
Name of routine: | poltest |
---|---|
Source lines: | 84993 - 85051 |
Type | subroutine |
Call | poltest(nr, nc, tble) |
Module | None |
Notes | Polychoric r and LRTS for RxC contingency table |
Name of routine: | rctest |
---|---|
Source lines: | 85055 - 85161 |
Type | subroutine |
Call | rctest(nr, nc, tble, e, iter) |
Module | None |
Notes | LRTS and Permutation P for RxC contingency table |
Name of routine: | simchi |
---|---|
Source lines: | 85165 - 85233 |
Type | subroutine |
Call | simchi(nr, rows, nc, cols, tble, e, obschi, tot, iter, pval) |
Module | None |
Notes | MCMC a RxC contingency table retaining given margins |
Name of routine: | upchi |
---|---|
Source lines: | 85237 - 85253 |
Type | subroutine |
Call | upchi(ncells, tble, e, lrts) |
Module | None |
Notes | LRTS for contingency table in MCMC |
Name of routine: | rclrts |
---|---|
Source lines: | 85257 - 85303 |
Type | subroutine |
Call | rclrts(nr, nc, tble, e, lrts, df) |
Module | None |
Notes | Contingency table LRTS |
Name of routine: | mkchoose |
---|---|
Source lines: | 85307 - 85319 |
Type | subroutine |
Call | mkchoose(ni, eligible , nelig) |
Module | None |
Notes | Load an array with indices of eligible choices (eg nonmissing alleles) |
Name of routine: | choose |
---|---|
Source lines: | 85324 - 85336 |
Type | subroutine |
Call | choose(nch, ni, idx) |
Module | None |
Notes | Shuffle array of indices so can randomly select combination from as first r elements |
Name of routine: | uniqid |
---|---|
Source lines: | 85340 - 85385 |
Type | subroutine |
Call | uniqid(typ, dataset, plevel) |
Module | None |
Notes | Make every individual and pedigree ID a unique number |
Name of routine: | prunep |
---|---|
Source lines: | 85389 - 85557 |
Type | subroutine |
Call | prunep(wrk, wrk2, locnam, trait, gt, thresh, dataset, plevel) |
Module | None |
Notes | Prune pedigree to ancestors shared by affecteds |
Name of routine: | relations |
---|---|
Source lines: | 85561 - 85746 |
Type | subroutine |
Call | relations(tped, tid, dataset, trait, typ, plevel) |
Module | None |
Notes | Write relatives of index |
Name of routine: | prrel |
---|---|
Source lines: | 85750 - 85783 |
Type | subroutine |
Call | prrel(iclass, ped, kin, dataset, key, eop, trait, typ) |
Module | None |
Notes | print list of relatives |
Name of routine: | appval |
---|---|
Source lines: | 85787 - 85839 |
Type | subroutine |
Call | appval(idx, trait, typ, kin, dataset) |
Module | None |
Notes | append locus value if asked |
Name of routine: | pairlink |
---|---|
Source lines: | 85843 - 85960 |
Type | subroutine |
Call | pairlink(ped, idx, dataset, plevel) |
Module | None |
Notes | Show relationship to ego: Djikstra's shortest path algorithm |
Name of routine: | conlen |
---|---|
Source lines: | 85964 - 85980 |
Type | function |
Call | conlen(i, j, ped, dataset) |
Module | None |
Notes | Are i and j a parent-offspring pair? |
Name of routine: | findloop |
---|---|
Source lines: | 85996 - 86202 |
Type | subroutine |
Call | findloop(trait, dataset, plevel) |
Module | None |
Notes | Find loops Marriage node representation Traverses depth-first with backtracking Trades time for space ;) Data structure: nodal backlink typelink nodal is the list of vertices 1..maxact are individuals with edge to mating maxact+1... are matings with edges to parents backlink contains the "thread" or point stack, and also the mark (negative) typelink shows direction of edge |
Name of routine: | wricas |
---|---|
Source lines: | 86208 - 86297 |
Type | subroutine |
Call | wricas(typ, newped, wrk, wrk2, trait, dataset) |
Module | None |
Notes | extract unrelated (typ=1) or all (typ=2) individuals with information for a criterion trait As of 20151205, does not generate new pedigree IDs unless asked |
Name of routine: | nuclear |
---|---|
Source lines: | 86301 - 86362 |
Type | subroutine |
Call | nuclear(wrk, wrk2, typ, maxsibs, dataset) |
Module | None |
Notes | convert into nuclear families, duplicating individuals as needed |
Name of routine: | onefam |
---|---|
Source lines: | 86366 - 86495 |
Type | subroutine |
Call | onefam(wrk, wrk2, typ, maxsibs, ped, dataset, nuc, newoffset, currf, currm, sta, fin) |
Module | None |
Notes | Write out current nuclear family -- with or without grandparents |
Name of routine: | disjoin |
---|---|
Source lines: | 86501 - 86618 |
Type | subroutine |
Call | disjoin(wrk, wrk2, dataset, plevel) |
Module | None |
Notes | chop into disjoint subpedigrees note that the pointers in set(,2) do not follow the sort order of the pedigree, as connect() moves both up and down the generations |
Name of routine: | joinped |
---|---|
Source lines: | 86624 - 86944 |
Type | subroutine |
Call | joinped(wrk, wrk2, typ, farg, larg, words, nloci, loc, locpos, loctyp, locnotes, locstat, dataset, chek, droperr, plevel) |
Module | None |
Notes | join families together by duplicated individuals (assuming unique individual IDs) had to exempt automatic variables from test of phenotype discordance 20180828 |
Name of routine: | pedsort |
---|---|
Source lines: | 86948 - 87064 |
Type | subroutine |
Call | pedsort(ped, dataset, nerr, plevel) |
Module | None |
Notes | Sort a pedigree in a dataset |
Name of routine: | doanova |
---|---|
Source lines: | 87068 - 87415 |
Type | subroutine |
Call | doanova(trait, locnam, gene, genetyp, iter, mincnt, norder, assfnd, conibd, dataset, freqfnd, use_fixfreq, fixfreq_buffer, allele_buffer2, pval, plevel, typ) |
Module | None |
Notes | Additive allelic model for association with a quantitative trait |
Name of routine: | qtdt |
---|---|
Source lines: | 87421 - 87807 |
Type | subroutine |
Call | qtdt(trait, locnam, gene, genetyp, freqfnd, iter, mincnt, use2, typ, dataset, pval, plevel) |
Module | None |
Notes | Quantitative trait TDT following Gauderman 2003 25(4): 327-338 E(Y_i) = a_MTi + beta Z(G_i) |
Name of routine: | cpganova |
---|---|
Source lines: | 87812 - 88043 |
Type | subroutine |
Call | cpganova(trait, locnam, gene, genetyp, iter, mincnt, freqfnd, dataset, plevel) |
Module | None |
Notes | Additive allelic model for association with a quantitative trait Conditional on parental genotypes |
Name of routine: | haploid_count |
---|---|
Source lines: | 88049 - 88082 |
Type | subroutine |
Call | haploid_count(nloc, loclist, loc, locpos, loctyp, dataset, haplotable) |
Module | None |
Notes | MC approach to association to haploid markers Enumerate haplotypes for haploid SNPs |
Name of routine: | set_hval |
---|---|
Source lines: | 88086 - 88123 |
Type | subroutine |
Call | set_hval(nloc, loclist, loc, locpos, loctyp, haplotable, hval, dataset, plevel) |
Module | None |
Notes | encode observed haplotypes |
Name of routine: | fillin_yha |
---|---|
Source lines: | 88127 - 88175 |
Type | subroutine |
Call | fillin_yha(haplotable, hval, dataset, plevel) |
Module | None |
Notes | fill in missing haplotypes and check for mutation/error |
Name of routine: | fillin_mit |
---|---|
Source lines: | 88179 - 88223 |
Type | subroutine |
Call | fillin_mit(haplotable, hval, dataset, plevel) |
Module | None |
Notes | Mitochondrial |
Name of routine: | haploid_freq |
---|---|
Source lines: | 88227 - 88416 |
Type | subroutine |
Call | haploid_freq(nloc, loclist, loc, locpos, loctyp, dataset, plevel, typ) |
Module | None |
Notes | Count of haplotypes from haploid markers |
Name of routine: | haploid_aov |
---|---|
Source lines: | 88420 - 88725 |
Type | subroutine |
Call | haploid_aov(trait, nloc, loclist, loc, locpos, loctyp, iter, mincnt, dataset, pval, plevel, typ) |
Module | None |
Notes | MC approach to association to haploid markers |
Name of routine: | haploid_ass |
---|---|
Source lines: | 88729 - 89109 |
Type | subroutine |
Call | haploid_ass(trait, nloc, loclist, loc, locpos, loctyp, locnotes, assoc_stat, iter, mincnt, dataset, pval, plevel, typ) |
Module | None |
Notes | Count of marker alleles/genotypes in cases and controls -- haploid marker(s) |
Name of routine: | doassoc |
---|---|
Source lines: | 89113 - 89868 |
Type | subroutine |
Call | doassoc(trait, loc, loctyp, locnote, locnam, gene, genetyp, assoc_stat, iter, mincnt, norder, assfnd, gt, thresh, conibd, dataset, freqfnd, use_fixfreq, fixfreq_buffer, allele_buffer2, prevalence, pval, sumstat, plevel, typ) |
Module | None |
Notes | Count of marker alleles/genotypes in cases and controls -- codominant system |
Name of routine: | pearson |
---|---|
Source lines: | 89875 - 89902 |
Type | function |
Call | pearson(sta, fin, nlev, nca, cntall) |
Module | None |
Notes | Chi-square measures of association in flat contingency tables Pearson chi-sq for slice of RxC table (uses cntall(,1:traitlevels+1), nca(1:traitlevels)) |
Name of routine: | gibbs |
---|---|
Source lines: | 89907 - 89936 |
Type | function |
Call | gibbs(sta, fin, nlev, nca, cntall) |
Module | None |
Notes | Gibbs chi-sq for slice of RxC table (uses cntall(,1:traitlevels+1), nca(1:traitlevels)) |
Name of routine: | twobyk |
---|---|
Source lines: | 89940 - 89961 |
Type | function |
Call | twobyk(sta, fin, cntall, pexp) |
Module | None |
Notes | Pearson chi-sq for 2xK table (uses only cntall(,1-3)) |
Name of routine: | rctdt |
---|---|
Source lines: | 89974 - 90351 |
Type | subroutine |
Call | rctdt(trait, locnam, gene, genetyp, iter, mincnt, gt, thresh, fbatimp, freqfnd, dataset, plevel) |
Module | None |
Notes | perform sibship association permutation test Combines TDT with SDT: appropriate permutation set for each sibship If both parents genotyped, then each child can be drawn from 13,14,23,24 If one or no parents genotyped, but may be reconstructed, then draw from mixture of obligate genotypes (those usable to reconstruct the missing parents) and 13,14,23,24. If cannot unequivocally reconstruct parental genotypes draw only from obligate (observed) genotypes among children |
Name of routine: | parimp |
---|---|
Source lines: | 90355 - 90473 |
Type | subroutine |
Call | parimp(pg1, pg2, mg1, mg2, sta, fin, set, parall) |
Module | None |
Notes | Make list of possible parental genotypes for this sibship |
Name of routine: | rctperm |
---|---|
Source lines: | 90485 - 90571 |
Type | subroutine |
Call | rctperm(ifam, sibships, set) |
Module | None |
Notes | Simulate the null distribution of sibship genotypes Parental alleles imputed via the children must be transmitted at least once to that sibship Furthermore, if two imputed alleles are the same in the two parents, then these must be transmitted together to at least one child And (Jun 2008), if only A/A and A/B segregating in sibship, need to also condition on total number of each type of genotype in sibship for -/- x -/- and A/B x -/- matings (sticking point is A/B x A/B possibility) |
Name of routine: | ranall |
---|---|
Source lines: | 90575 - 90588 |
Type | function |
Call | ranall(par) |
Module | None |
Notes | Randomly transmit nonmissing alleles |
Name of routine: | conoff |
---|---|
Source lines: | 90593 - 90606 |
Type | subroutine |
Call | conoff(tr, par, imputd, off) |
Module | None |
Notes | Conditional parent-offspring transmission Flag whether an imputed parental allele is transmitted |
Name of routine: | rctsim |
---|---|
Source lines: | 90610 - 90639 |
Type | subroutine |
Call | rctsim(nfam, sibships, aff, set, numal, trans) |
Module | None |
Notes | One simulation of entire set of informative nuclear families |
Name of routine: | rctuse |
---|---|
Source lines: | 90643 - 90693 |
Type | function |
Call | rctuse(pg1, pg2, mg1, mg2, ptyped, parall, contrib, naff) |
Module | None |
Notes | test if useful for RC-TDT/FBAT |
Name of routine: | sibass |
---|---|
Source lines: | 90698 - 90865 |
Type | subroutine |
Call | sibass(trait, locnam, gene, allele_buffer, dataset, iter, typ, pval, plevel) |
Module | None |
Notes | Tabulate sibship affection by genotype for fast test of total association |
Name of routine: | whitehead |
---|---|
Source lines: | 90869 - 91168 |
Type | subroutine |
Call | whitehead(trait, gt, thresh, locnam, gene, loctyp, allele_buffer, stratloc, stratvar, strattyp, stratlabels, dataset, pval, ptype, plevel) |
Module | None |
Notes | Random effects stratified proportional odds model of Whitehead and Whitehead |
Name of routine: | vcfcascon |
---|---|
Source lines: | 91172 - 91559 |
Type | subroutine |
Call | vcfcascon(trait, gt, thresh, assfnd, vcf_ac, vcf_an, vcf_het, vcf_hom, port, dataset, plevel) |
Module | None |
Notes | Read summary allele counts from a VCF file and do case-population comparison |
Name of routine: | rarecarrier |
---|---|
Source lines: | 91563 - 91661 |
Type | subroutine |
Call | rarecarrier(mark, thresh, dataset, plevel) |
Module | None |
Notes | Recode rare allele carriers for currently active markers to a marker |
Name of routine: | rarecascon |
---|---|
Source lines: | 91665 - 91860 |
Type | subroutine |
Call | rarecascon(trait, thresh, dataset, plevel) |
Module | None |
Notes | Enumerate rare alleles in cases and controls for currently active markers |
Name of routine: | doskat |
---|---|
Source lines: | 91864 - 92102 |
Type | subroutine |
Call | doskat(trait, typ, dataset, pval, plevel) |
Module | None |
Notes | SKAT test |
Name of routine: | simped |
---|---|
Source lines: | 92107 - 92169 |
Type | subroutine |
Call | simped(ped, dataset, allele_buffer, set) |
Module | None |
Notes | Simulate (gene-dropping) genotypes at a single autosomal locus in a pedigree of arbitrary complexity |
Name of routine: | xsimped |
---|---|
Source lines: | 92174 - 92247 |
Type | subroutine |
Call | xsimped(ped, dataset, allele_buffer, set) |
Module | None |
Notes | Simulate (gene-dropping) genotypes at a single X-linked locus in a pedigree of arbitrary complexity |
Name of routine: | csimped |
---|---|
Source lines: | 92254 - 92318 |
Type | subroutine |
Call | csimped(ped, dataset, untyped, set, xlinkd) |
Module | None |
Notes | Simulate (gene-dropping) genotypes at a single codominant locus Conditioning on typed ``founder'' genotypes (true founders/marry-ins plus individuals without typed parents) heading informative chains of descent |
Name of routine: | genoff |
---|---|
Source lines: | 92322 - 92348 |
Type | subroutine |
Call | genoff(idx, fa, mo, set) |
Module | None |
Notes | transmit genes from parents to child |
Name of routine: | mumson |
---|---|
Source lines: | 92352 - 92364 |
Type | subroutine |
Call | mumson(idx, mo, set) |
Module | None |
Notes | Transmit single X-linked allele from mother to son |
Name of routine: | gencopy |
---|---|
Source lines: | 92368 - 92373 |
Type | subroutine |
Call | gencopy(idx, origin, set) |
Module | None |
Notes | Copy genotype from MZ cotwin to ego |
Name of routine: | simhaploid |
---|---|
Source lines: | 92377 - 92405 |
Type | subroutine |
Call | simhaploid(typ, ped, dataset, nhaps, cumhaps, hval) |
Module | None |
Notes | Simulate Y or mitochondrial haplotypes |
Name of routine: | fsimped |
---|---|
Source lines: | 92410 - 92538 |
Type | subroutine |
Call | fsimped(it, pedigree, num, nfound, id, fa, mo, imztwin, set, sibd, untyped, key, plevel) |
Module | None |
Notes | Simulate pedigree conditional on all founders (all must be typed) and typed nonfounders |
Name of routine: | genof4 |
---|---|
Source lines: | 92545 - 92630 |
Type | subroutine |
Call | genof4(idx, fa, mo, imztwin, set, sibd, untyped, key, failid) |
Module | None |
Notes | Drop ibd-alleles conditional on observed markers and randomly where marker genotype not observed -- restart if later generates inconsistency This version assumes all founders are typed |
Name of routine: | fill2 |
---|---|
Source lines: | 92635 - 92660 |
Type | subroutine |
Call | fill2(num, set, sibd, untyped, key) |
Module | None |
Notes | infer missing genotypes based on sibd values after run of fsimped assume all founders are typed |
Name of routine: | cisimped |
---|---|
Source lines: | 92665 - 92715 |
Type | subroutine |
Call | cisimped(ped, gene, allele_buffer, allele_buffer2, dataset, set) |
Module | None |
Notes | Simulate a single marker consistent with ibd sharing at a target marker locus If there are missing genotypes, call should be preceded by call to newstart() |
Name of routine: | sample |
---|---|
Source lines: | 92719 - 92774 |
Type | subroutine |
Call | sample(trait, ped, dataset, typ) |
Module | None |
Notes | Sample with or without replacement from the trait values within an entire pedigree |
Name of routine: | drop |
---|---|
Source lines: | 92794 - 93019 |
Type | subroutine |
Call | drop(it, ped, dataset, cntmat, numal, gfrq, set, sibd, set2, key, iprop, plevel) |
Module | None |
Notes | Modified random walk simulation (one iteration) of pedigree missing genotypes (Metropolis-Hastings algorithm) -- proposal uses founder allele mutations propagated throughout then pedigree conditional on (identity by) descent, swapping ibd origins for heterozygotes, alternated with a randomization of descent conditional on marker genotype. This procedure has the advantage of being quick, but the proposal probabilities are not always symmetric, so they are combined with additional local proposals It is alternated with a locally updating Gibbs sampler. This jointly simulates Untyped x Untyped founder matings genotypes conditional on offspring and other spouses; other genotypes individual-by-individual, conditional on parental, spouse and child genotypes. set and sibd (set2 and sibd2) are genotypes for current pedigree only only fa and mo need to be redirected |
Name of routine: | simnuc |
---|---|
Source lines: | 93028 - 93100 |
Type | subroutine |
Call | simnuc(par1, par2, num, nfound, fa, mo, numal, gfrq, set) |
Module | None |
Notes | Gibbs sampler for codominant marker locus Simulate parental genotypes for untyped x untyped mating conditional on offspring genotypes or for untyped nonfounders conditional on offspring, spouses and parents. Family may be contained within larger pedigree, and multiple spouses are possible |
Name of routine: | nuclik |
---|---|
Source lines: | 93106 - 93170 |
Type | subroutine |
Call | nuclik(par1, par2, sta, fin, fa, mo, numal, gfrq, set, targt) |
Module | None |
Notes | Nuclik is run twice, once to calculate the total likelihood <totlik> of the legal genotypes (with target=1), the second time to select a parental genotypes with target ~ U(0,totlik). |
Name of routine: | foulik |
---|---|
Source lines: | 93177 - 93224 |
Type | subroutine |
Call | foulik(idx, fa, mo, sta, fin, numal, gfrq, set, targt) |
Module | None |
Notes | Founder codominant locus conditional likelihood foulik is run twice, once to calculate the total likelihood <totlik> of the legal genotypes (with target=1), the second time to select a genotype, with target ~ U(0,totlik). |
Name of routine: | onelik |
---|---|
Source lines: | 93231 - 93275 |
Type | subroutine |
Call | onelik(idx, fa, mo, sta, fin, set, targt) |
Module | None |
Notes | nonfounder codominant locus conditional likelihood onelik is run twice, once to calculate the total likelihood <totlik> of the legal genotypes (with target=1), the second time to select a genotype, with target ~ U(0,totlik). |
Name of routine: | simpar |
---|---|
Source lines: | 93282 - 93324 |
Type | subroutine |
Call | simpar(par1, par2, numal, num, nfound, fa, mo, set) |
Module | None |
Notes | Propose parental genotypes for untyped x untyped mating conditional on offspring genotypes Family may be contained within larger pedigree, and multiple spouses are possible |
Name of routine: | inuclik |
---|---|
Source lines: | 93331 - 93376 |
Type | subroutine |
Call | inuclik(par1, par2, sta, fin, numal, fa, mo, set, targt, totp) |
Module | None |
Notes | inuclik is an integer version of nuclik inuclik is run twice, once to calculate the total number <totp> of the legal genotypes (with target=MAXG*MAXG), the second time to select a parental genotype. |
Name of routine: | mutate |
---|---|
Source lines: | 93383 - 93426 |
Type | subroutine |
Call | mutate(numal, num, nfound, set, sibd, set2, untyped) |
Module | None |
Notes | Mutate 1-4 allele in untyped founders. Can never fail, due "backmutation". (1) mutate an allele never transmitted to a typed individual (2) swap parent of origin if have no offspring sharing ibd-allele |
Name of routine: | switch |
---|---|
Source lines: | 93430 - 93549 |
Type | subroutine |
Call | switch(num, nfound, id, fa, mo, set, sibd, set2, untyped) |
Module | None |
Notes | Do a switch of grandparent of origin of alleles = switch lineage |
Name of routine: | cpibd |
---|---|
Source lines: | 93556 - 93576 |
Type | subroutine |
Call | cpibd(i, j, sibd, sibd2, imiss) |
Module | None |
Notes | Copy ibd for a pair of relatives. Person j has a typing-genotype at sibd2, person i does not. The typing-allele corresponding to that shared at sibd() is "transmitted" to person i from person j. |
Name of routine: | update |
---|---|
Source lines: | 93580 - 93593 |
Type | subroutine |
Call | update(idx, all1, all2, set) |
Module | None |
Notes | update new genotype |
Name of routine: | simibd |
---|---|
Source lines: | 93600 - 93696 |
Type | subroutine |
Call | simibd(typ, pedigree, num, nfound, fa, mo, imztwin, set, sibd) |
Module | None |
Notes | Given genotypes at a single locus in a pedigree of arbitrary complexity, generate ibd by gene dropping a perfectly informative marker a la John Blangero. Type=1 unconditional, =2, conditional on observed markers |
Name of routine: | genof2 |
---|---|
Source lines: | 93704 - 93765 |
Type | subroutine |
Call | genof2(pedigree, idx, fa, mo, imztwin, set, sibd, ifault) |
Module | None |
Notes | transmit ibd-marker from parents to child, test if consistent with observed marker In this version 12/99, the sibd pairs are ordered by the collating order of the marker alleles they represent and not the collating order of the sibd allele. |
Name of routine: | wrhbd |
---|---|
Source lines: | 93769 - 93994 |
Type | subroutine |
Call | wrhbd(gene, trait, iter, burnin, allele_buffer, dataset, plevel) |
Module | None |
Notes | Monte-Carlo approach to estimating one-locus homozygosity by descent |
Name of routine: | mcgpe |
---|---|
Source lines: | 93998 - 94218 |
Type | subroutine |
Call | mcgpe(gene, trait, iter, burnin, allele_buffer, dataset, plevel) |
Module | None |
Notes | MCMC for genotype probability estimates and allele doses |
Name of routine: | mcfreq |
---|---|
Source lines: | 94222 - 94438 |
Type | subroutine |
Call | mcfreq(gene, iter, emiter, dataset, allele_buffer, plevel) |
Module | None |
Notes | MCEM for pedigree allele frequencies |
Name of routine: | newstart |
---|---|
Source lines: | 94442 - 94595 |
Type | subroutine |
Call | newstart(gene, allele_buffer, dataset, plevel) |
Module | None |
Notes | Call drop to shuffle the unobserved genotypes |
Name of routine: | cntprop |
---|---|
Source lines: | 94599 - 94607 |
Type | subroutine |
Call | cntprop(iprop, proprate, proptyp) |
Module | None |
Notes | Increment counts of MCMC proposal type |
Name of routine: | wrprop |
---|---|
Source lines: | 94611 - 94626 |
Type | subroutine |
Call | wrprop(ilabel, proprate, proptyp) |
Module | None |
Notes | Summary of MCMC proposals from drop() |
Name of routine: | tabmat |
---|---|
Source lines: | 94630 - 94647 |
Type | subroutine |
Call | tabmat(ped, dataset, cntmat) |
Module | None |
Notes | count the untyped founder x founder matings for use by Metropolis algs |
Name of routine: | nucseg |
---|---|
Source lines: | 94669 - 94909 |
Type | subroutine |
Call | nucseg(trait, locnam, gene, genetyp, freqfnd, spec_candal, dataset, pval, plevel) |
Module | None |
Notes | Approach of Schaid and Sommer (1993), amplified by Knapp et al (1995) MM x MM MM x MN MM x NN MN x MN MN x NN NN x NN MM MM MN MN MM MN NN MN NN NN n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 a=4*n1 + 3*n2 + 3*n3 + 2*n4 + 2*n5 + 2*n6 + 2*n7 + n8 + n9 b=n2 + n3 + 2*n4 + 2*n5 + 2*n6 + 2*n7 + 3*n8 + 3*n9 + 4*n10 c=n1 + n2 + n5 d=n3 + n4 + n6 + n8 providing n-c-d!=0 and a-2c-d!=0 then p=(a-2*c-d)/2n r1= (1-p)*d/(2*p*(n-c-d)) r2= (1-p)^2 c/(p^2*(n-c-d)) Here, actually done as the log-linear model, as the closed form standard error formulae are ugly |
Name of routine: | dohomoz |
---|---|
Source lines: | 94913 - 95107 |
Type | subroutine |
Call | dohomoz(trait, locnam, gene, genetyp, freqfnd, iter, mincnt, norder, gt, thresh, dataset, pval, plevel) |
Module | None |
Notes | marker homozygosity in all subjects or just probands -- codominant system |
Name of routine: | sibpair |
---|---|
Source lines: | 95120 - 95696 |
Type | subroutine |
Call | sibpair(tranam, trait, locnam, gene, mappos, typ, sibm, sibr, sibv, mcp, iter, mincnt, weight, dataset, allele_buffer, pval, plevel) |
Module | None |
Notes | perform Haseman-Elston sib-pair regression: univariate using squared difference or centred cross-product and ibds estimated from the entire sibship if missing parental genotypes typ 1 Original Haseman-Elston 2 Haseman-Elston II 3 Sham and Purcell 4 Visscher and Hopper |
Name of routine: | sibcor |
---|---|
Source lines: | 95700 - 95804 |
Type | subroutine |
Call | sibcor(trait, typ, dataset, muy, vay, rf, rh, npairs, bigship, plevel) |
Module | None |
Notes | Estimate sibling and half-sib intraclass correlations |
Name of routine: | nucibd |
---|---|
Source lines: | 95816 - 96015 |
Type | subroutine |
Call | nucibd(gene, setoffset, fa, mo, sta, fin, set, untyped, allele_buffer, ibd) |
Module | None |
Notes | Routines to calculate ibd sharing using full sibship information where parent(s) untyped. ibd(1..nsib*(nsib+1)/2) prall(5) probs for 1..4 observed alleles plus all others 1. enumerate alleles segregating among children 2. generate short list of genotypes for parents 3. sum up ibd sharing for each pair of sibs for each genotype freq |
Name of routine: | shibd |
---|---|
Source lines: | 96019 - 96070 |
Type | function |
Call | shibd(c11, c12, c21, c22, p11, p12, p21, p22) |
Module | None |
Notes | Calculate ibd sharing for full sibs when parental genotypes known |
Name of routine: | regwt |
---|---|
Source lines: | 96074 - 96089 |
Type | function |
Call | regwt(weight, i, j, dataset) |
Module | None |
Notes | Calculate regression weight |
Name of routine: | hibd |
---|---|
Source lines: | 96094 - 96152 |
Type | function |
Call | hibd(c11, c12, c21, c22, p11, p12, pc1, pc2, p21, p22) |
Module | None |
Notes | estimate ibd score for a pair of half-sibs -- parents known tabulations of number of genes expected shared ibd |
Name of routine: | twopoi |
---|---|
Source lines: | 96161 - 96293 |
Type | subroutine |
Call | twopoi(mark1, loc1, mark2, loc2, allele_buffer1, allele_buffer2, dataset, plevel) |
Module | None |
Notes | perform Elston & Keats sib pair linkage analysis between two codominant markers recombination fraction c= 0.5 (1-sqrt(r)) where r is the correlation between mean ibd at marker1 and mean ibd at marker2 for all sib pairings |
Name of routine: | countall |
---|---|
Source lines: | 96297 - 96328 |
Type | subroutine |
Call | countall(p1, p2, p3, p4, nallele, nmiss) |
Module | None |
Notes | Count alleles in pair of relatives or spouses |
Name of routine: | doasp |
---|---|
Source lines: | 96332 - 96570 |
Type | subroutine |
Call | doasp(trait, locnam, gene, gt, thresh, allele_buffer, dataset, pval, plevel) |
Module | None |
Notes | Do ibs sharing ASP analysis as per Lange 1986 and Bishop 1990 |
Name of routine: | sshare |
---|---|
Source lines: | 96574 - 96585 |
Type | subroutine |
Call | sshare(g1, g2, g3, g4, zibs) |
Module | None |
Notes | Return IBS sharing for relative pair |
Name of routine: | dopenrose |
---|---|
Source lines: | 96589 - 96711 |
Type | subroutine |
Call | dopenrose(loc1, trait, typ1, loc2, gene, typ2, dataset, iter, plevel) |
Module | None |
Notes | Penrose sib pair linkage analysis |
Name of routine: | shipsiz |
---|---|
Source lines: | 96715 - 96742 |
Type | subroutine |
Call | shipsiz(dataset, bigship) |
Module | None |
Notes | Find biggest active sibship |
Name of routine: | doapm |
---|---|
Source lines: | 96746 - 97331 |
Type | subroutine |
Call | doapm(trait, locnam, gene, typ, iter, burnin, gt, thresh, dataset, allele_buffer, pvalout, plevel) |
Module | None |
Notes | Perform Monte-Carlo based APM analysis |
Name of routine: | loadset |
---|---|
Source lines: | 97335 - 97379 |
Type | subroutine |
Call | loadset(gene, ped, allele_buffer, dataset, set, nuntyp) |
Module | None |
Notes | Copy genotypes from pedigree to set |
Name of routine: | pedibd |
---|---|
Source lines: | 97383 - 97412 |
Type | subroutine |
Call | pedibd(typ, ped, dataset, set, sibd) |
Module | None |
Notes | Pedigree structure type call to simibd |
Name of routine: | makewt |
---|---|
Source lines: | 97418 - 97436 |
Type | function |
Call | makewt(typ, naff, unaff, var) |
Module | None |
Notes | Calculate some plausible weights to allow combination of APM statistics from different pedigrees type=1 pair=AA, 2 AU, 3 UU, 4 GPM, 5 W-H |
Name of routine: | clcibs |
---|---|
Source lines: | 97440 - 97552 |
Type | subroutine |
Call | clcibs(naff, unaff, aff, allele_buffer, set, z) |
Module | None |
Notes | Calculate ibs statistic |
Name of routine: | delta |
---|---|
Source lines: | 97556 - 97561 |
Type | function |
Call | delta(g1,g2) |
Module | None |
Notes | measure of IBS sharing |
Name of routine: | clcibd |
---|---|
Source lines: | 97565 - 97629 |
Type | subroutine |
Call | clcibd(naff, unaff, aff, sibd, zibd) |
Module | None |
Notes | calculate ibd sharing statistic based on simulated ibd |
Name of routine: | share |
---|---|
Source lines: | 97633 - 97647 |
Type | subroutine |
Call | share(g1, g2, g3, g4, zibd) |
Module | None |
Notes | Return IBD sharing for relative pair based on ibd-alleles |
Name of routine: | simil |
---|---|
Source lines: | 97669 - 97730 |
Type | function |
Call | simil(nfound, naff, aff, sibd, key) |
Module | None |
Notes | Whittemore's & Halpern's (Biometrics 1994; 50:118-127) measure of ibd sharing for multiple relatives for a set of N individuals, enumerate 2**N vectors containing one ibd-allele from each person. For each such set u_i, calculate a measure of overall similarity as the number of [additional] "nontrivial" permutations of that set that leave u unchanged. For example, if 3 individuals are {1/2} {1/3} {1/2}, there are 8 u's, which give a total abc Legal permutations (excl obs) of 10 possible permutations, with 111 5 acb, bac, bca, cab, cba a mean of 10/8. If a 4th relative 112 1 bac was ibd-genotype {4/5}, the mean 131 1 cba would be 10/16. The mean score (S) 132 0 is used to derive a standardized 211 1 acb score [S-E(S)]/SD(S), as in the APM 212 1 cba method, although direct enumeration 231 0 is of course feasible for small N. 232 1 cba Randomized version |
Name of routine: | clreg |
---|---|
Source lines: | 97736 - 98027 |
Type | subroutine |
Call | clreg(typ, styp, nterms, terms, nloci, loc, loctyp, locpos, gene, genemod, allele_buffer, useimp, dataset, mlik, mpar, statval, pval, plevel) |
Module | None |
Notes | Conditional logistic regression version of 20151026 Stratum variable is either pedigree, sibship or (new) stratifying variable (which may cross pedigrees) |
Name of routine: | getstrata |
---|---|
Source lines: | 98037 - 98126 |
Type | subroutine |
Call | getstrata(styp, dataset, nstrata, strata, stratpos) |
Module | None |
Notes | Locate beginnings and ends of strata stratpos is position of ith individual strata 0 1 2 3 0 3 5 7 stratpos 2 4 7 1 5 3 6 from data: B A C A B C A |
Name of routine: | dohrr |
---|---|
Source lines: | 98130 - 98451 |
Type | subroutine |
Call | dohrr(trait, locnam, gene, iter, mincnt, gt, thresh, dataset, allele_buffer, pval, plevel) |
Module | None |
Notes | Haplotype Relative Risk |
Name of routine: | dotdt |
---|---|
Source lines: | 98455 - 98888 |
Type | subroutine |
Call | dotdt(trait, locnam, gene, genetyp, freqfnd, iter, mincnt, use2, typ, cutoff, gt, thresh, dataset, pval, plevel) |
Module | None |
Notes | Monte-Carlo approach to various TDTs |
Name of routine: | tdtuse |
---|---|
Source lines: | 98892 - 98911 |
Type | function |
Call | tdtuse(pg1, pg2, mg1, mg2, naff, use2, xlinkd) |
Module | None |
Notes | test if useful for TDT |
Name of routine: | shuffle |
---|---|
Source lines: | 98917 - 98984 |
Type | subroutine |
Call | shuffle(nallele, cntall, tot, cutoff, tdt, mxiter, mincnt, pvalue) |
Module | None |
Notes | randomization test for allelic TDT -- shuffle table ITER times using TOT swaps per shuffle Genotype counts: all1, all2, #all1 trans, #all2 trans |
Name of routine: | clctdt |
---|---|
Source lines: | 98988 - 99007 |
Type | function |
Call | clctdt(ngcount, gcount, cutoff) |
Module | None |
Notes | calculate symmetry pearson chi-square |
Name of routine: | clcchi |
---|---|
Source lines: | 99011 - 99032 |
Type | function |
Call | clcchi(ngcount, gcount, cutoff) |
Module | None |
Notes | calculate g.o.f. LR chi-square |
Name of routine: | trans |
---|---|
Source lines: | 99037 - 99126 |
Type | subroutine |
Call | trans(pg1, pg2, mg1, mg2, cg1, cg2, tr1, tr2, nt1, nt2, typ) |
Module | None |
Notes | Test the 4 possible unions of gametes 1 2 3 4 -> 13 14 23 24 if typ=0 return both parental contributions, else 2=pat, 1=mat |
Name of routine: | xtrans |
---|---|
Source lines: | 99130 - 99150 |
Type | subroutine |
Call | xtrans(mg1, mg2, cg1, cg2, tr1, tr2, nt1, nt2) |
Module | None |
Notes | Transmission of X-linked marker to a male |
Name of routine: | incpo |
---|---|
Source lines: | 99154 - 99176 |
Type | subroutine |
Call | incpo(tr, nt, nall, cntall) |
Module | None |
Notes | Increment counts of transmitted and nontransmitted alleles: parentwise |
Name of routine: | incr |
---|---|
Source lines: | 99181 - 99207 |
Type | subroutine |
Call | incr(tr1, tr2, nt1, nt2, ngcount, gcount) |
Module | None |
Notes | Increment counts of transmitted and expected genotypes Revised after reading Thomas 1999 |
Name of routine: | insgen |
---|---|
Source lines: | 99212 - 99256 |
Type | subroutine |
Call | insgen(a1, a2, ngcount, gcount, typ, haplo) |
Module | None |
Notes | update counts of genotypes or haplotypes for cases or controls -- binary search and insertion sort |
Name of routine: | ldp |
---|---|
Source lines: | 99260 - 99318 |
Type | subroutine |
Call | ldp(numal, numal2, plevel) |
Module | None |
Notes | Do LD analysis for unphased data |
Name of routine: | cubicld |
---|---|
Source lines: | 99322 - 99497 |
Type | subroutine |
Call | cubicld(loc1, loc2, typ, counts, pval, sumtyp, plevel) |
Module | None |
Notes | Two SNPs, unphased and phased data |
Name of routine: | cubiclik |
---|---|
Source lines: | 99501 - 99578 |
Type | subroutine |
Call | cubiclik(typ, nunph, nph, praw, counts, h1, h2, h3, h4, ex, lik, eh) |
Module | None |
Notes | Likelihood for pairwise SNP LD table under given level of LD |
Name of routine: | ld2 |
---|---|
Source lines: | 99582 - 99895 |
Type | subroutine |
Call | ld2(loc1, numal, name1, loc2, numal2, name2, typ, ngcat, nhcat, nxcat, counts, pval, sumtyp, plevel) |
Module | None |
Notes | Do LD analysis for unphased and phased data |
Name of routine: | haptogen |
---|---|
Source lines: | 99899 - 99946 |
Type | subroutine |
Call | haptogen(numal, numal2, scatter, typ, xlinkd) |
Module | None |
Notes | Map haplotypes to genotypes 1=phase unknown 2=phase KNOWN |
Name of routine: | twohwe |
---|---|
Source lines: | 99950 - 100002 |
Type | subroutine |
Call | twohwe(numal, numal2, nfull, totpars, model, typ, xlinkd) |
Module | None |
Notes | Double HWE |
Name of routine: | twofrq |
---|---|
Source lines: | 100006 - 100080 |
Type | subroutine |
Call | twofrq(numal, numal2, ncells, counts, typ, xlinkd) |
Module | None |
Notes | Marginal allele frequencies two loci |
Name of routine: | ldtab |
---|---|
Source lines: | 100084 - 100151 |
Type | subroutine |
Call | ldtab(numal, numal2, counts, ex, typ, xlinkd) |
Module | None |
Notes | Show table of genotypes and haplotypes |
Name of routine: | twold |
---|---|
Source lines: | 100156 - 100491 |
Type | subroutine |
Call | twold(zrec, maxhap, gene1, loc1, ltyp1, gene2, loc2, ltyp2, allele_buffer1, allele_buffer2, dataset, iter, pval, sumtyp, plevel) |
Module | None |
Notes | Two locus linkage disequilibrium: autosomal or X-linked loci identify typed founders or nonfounders who have untyped parents |
Name of routine: | inchap |
---|---|
Source lines: | 100496 - 100534 |
Type | subroutine |
Call | inchap(g11, g12, g21, g22, ngcat, npg, allele_buffer1, allele_buffer2, counts, typ) |
Module | None |
Notes | increment count of phased or unphased genotype, haplotype contingency table is partitioned 1..ngcat...ngcat+npg... |
Name of routine: | tabhap |
---|---|
Source lines: | 100538 - 100554 |
Type | subroutine |
Call | tabhap(g1, g2, allele_buffer1, allele_buffer2, tble) |
Module | None |
Notes | straight haplotype count |
Name of routine: | useld |
---|---|
Source lines: | 100558 - 100582 |
Type | function |
Call | useld(c1, c2, c3, c4, f1, f2, f3, f4, m1, m2, m3, m4) |
Module | None |
Notes | Check if useful triad for haplotype inference |
Name of routine: | ldtest |
---|---|
Source lines: | 100586 - 100705 |
Type | subroutine |
Call | ldtest(loc1, allele_buffer1, loc2, allele_buffer2, tble, iter, pval, plevel) |
Module | None |
Notes | LRTS and Permutation P for haplotype table |
Name of routine: | compld |
---|---|
Source lines: | 100709 - 100815 |
Type | subroutine |
Call | compld(gene1, gene2, newgene, cutoff, allele_buffer1, allele_buffer2, dataset) |
Module | None |
Notes | Infer haplotypes for SNPs in complete LD |
Name of routine: | moskvina |
---|---|
Source lines: | 100820 - 100931 |
Type | subroutine |
Call | moskvina(window, alpha, maxhap, nloci, loc, loctyp, locpos, locord, map, dataset, efftests, plevel) |
Module | None |
Notes | An improved correction for multiple testing Moskvina V, Schmidt KM (2008) Genet Epidemiol 32: 567-573 |
Name of routine: | moskld |
---|---|
Source lines: | 100935 - 100960 |
Type | subroutine |
Call | moskld(maxhap, loc1, loc2, loc, locpos, loctyp, allele_buffer1, dataset, r) |
Module | None |
Notes | wrapper for twold |
Name of routine: | stand |
---|---|
Source lines: | 100965 - 101024 |
Type | subroutine |
Call | stand(trait, dataset, typ) |
Module | None |
Notes | Standardization of quantitative trait overall or *within* family as required by the approach of Commenge |
Name of routine: | lifetab |
---|---|
Source lines: | 101027 - 101411 |
Type | subroutine |
Call | lifetab(date1, date2, censor, covar, covtyp, width1, width2, typ, dataset, plevel) |
Module | None |
Notes |
Name of routine: | prodlim |
---|---|
Source lines: | 101419 - 101550 |
Type | subroutine |
Call | prodlim(trait, censor, dataset, typ, resid, plevel) |
Module | None |
Notes | Kaplan-Meier estimator of survival function and the Nelson-Aalen estimator of cumulative hazard. The Nelson-Aalen estimator is used to produce residuals, if requested. These are the deviance residuals of Therneau et al Biometrika 1990: equivalent to a variance-stabilized transformed martingale residual. |
Name of routine: | dorank |
---|---|
Source lines: | 101558 - 101635 |
Type | subroutine |
Call | dorank(trget, trait, typ, dataset) |
Module | None |
Notes | Rank trait values 1=rank all 2=within family rank 3=Blom score all 4=within family Blom score |
Name of routine: | quantnorm |
---|---|
Source lines: | 101641 - 101771 |
Type | subroutine |
Call | quantnorm(nloc, loclist, loc, locpos, loctyp, dataset, plevel) |
Module | None |
Notes | Quantile normalization missing values are dealt with reuse of nearest value rather than linear interpolation |
Name of routine: | wrdrop |
---|---|
Source lines: | 101776 - 101848 |
Type | subroutine |
Call | wrdrop(gene, dataset, plevel) |
Module | None |
Notes | Gene drop a single marker, conditionally on observed founder genotypes |
Name of routine: | wrsim |
---|---|
Source lines: | 101853 - 101949 |
Type | subroutine |
Call | wrsim(typ, mark, gene, allele_buffer, allele_buffer2, dataset, plevel) |
Module | None |
Notes | Simulate a single marker, either unconditionally, or consistent with ibd sharing at a given locus |
Name of routine: | wrsimq |
---|---|
Source lines: | 101955 - 102066 |
Type | subroutine |
Call | wrsimq(typ, trait, loctyp, prevalence, h2, gene, allele_buffer, allele_buffer2, dataset, plevel) |
Module | None |
Notes | Simulate a quantitative trait of given heritability, either unconditionally, or consistent with complete linkage to a given locus |
Name of routine: | wrsimqtl |
---|---|
Source lines: | 102071 - 102287 |
Type | subroutine |
Call | wrsimqtl(trait, gene, smlfreq, smlpen, h2, dataset, plevel) |
Module | None |
Notes | Simulate QTL genotypes conditional on binary trait values, heritability and marginal QTL penetrances by rejection sampling |
Name of routine: | permdata |
---|---|
Source lines: | 102291 - 102313 |
Type | subroutine |
Call | permdata(trait, dataset) |
Module | None |
Notes | Permute trait values within pedigrees |
Name of routine: | dateconv |
---|---|
Source lines: | 102317 - 102373 |
Type | subroutine |
Call | dateconv(locnam, trait, dataset, typ) |
Module | None |
Notes | Convert to/from Julian etc |
Name of routine: | combine |
---|---|
Source lines: | 102377 - 102416 |
Type | subroutine |
Call | combine(crit, recto, nf, recfro, allele_buffer) |
Module | None |
Notes | identify rare alleles at a marker locus and list for combination |
Name of routine: | swapalleles |
---|---|
Source lines: | 102420 - 102469 |
Type | subroutine |
Call | swapalleles(loc, gene, allele_buffer, dataset, plevel) |
Module | None |
Notes | swap diallelic marker alleles eg 1->2 2->1 |
Name of routine: | renumb |
---|---|
Source lines: | 102473 - 102527 |
Type | subroutine |
Call | renumb(loc, gene, typ, allele_buffer, dataset) |
Module | None |
Notes | renumber alleles to consecutive integers |
Name of routine: | recode |
---|---|
Source lines: | 102532 - 102682 |
Type | subroutine |
Call | recode(loc, gene, loctyp, nto, recto, nf, recfro, dataset, plevel) |
Module | None |
Notes | recode alleles or values for particular locus -- replace all "from" values with "to" values |
Name of routine: | refgeno |
---|---|
Source lines: | 102689 - 102738 |
Type | subroutine |
Call | refgeno(typ, loc, gene, loctyp, locnote, allele_buffer, dataset, plevel) |
Module | None |
Notes | Replace missing genotypes with reference (typ=1) or major (typ=2) allele homozygote. Most useful when sequence data (wt by omission) Filtering on trait performed by setting dataset%untyped using filter_snp() before call. |
Name of routine: | recast |
---|---|
Source lines: | 102742 - 102811 |
Type | subroutine |
Call | recast(typ, trait, dataset, plevel) |
Module | None |
Notes | Recast aff or cat to qua or qua to aff or cat |
Name of routine: | snpenc |
---|---|
Source lines: | 102815 - 102868 |
Type | subroutine |
Call | snpenc(gene, trait, typ, dataset) |
Module | None |
Notes | Dummy encode a SNP 1=add 2=dom 3=rec |
Name of routine: | wribs |
---|---|
Source lines: | 102872 - 103020 |
Type | subroutine |
Call | wribs(trait, gt, thresh, nloci, loc, loctyp, locpos, dataset, plevel) |
Module | None |
Notes | Multipoint IBS sharing for all pairs |
Name of routine: | ibspca |
---|---|
Source lines: | 103024 - 103239 |
Type | subroutine |
Call | ibspca(typ, nloci, loc, loctyp, locpos, ncomps, loadvars, dataset, plevel) |
Module | None |
Notes | Principal components or classical MDS analysis of multipoint IBS sharing |
Name of routine: | wribd |
---|---|
Source lines: | 103245 - 103419 |
Type | subroutine |
Call | wribd(nmark, mark, loc, loctyp, locpos, dataset, burnin, iter, typ, plevel) |
Module | None |
Notes | Monte-Carlo approach to estimating IBD sharing at a marker typ=1 as lower triangular matrix 2 pairwise |
Name of routine: | markeribd |
---|---|
Source lines: | 103423 - 103619 |
Type | subroutine |
Call | markeribd(gene, iter, burnin, allele_buffer, ped, dataset, ibdcount, ibdvar, plevel) |
Module | None |
Notes | Monte-Carlo approach to estimating IBD sharing at a marker for a pedigree |
Name of routine: | dokin |
---|---|
Source lines: | 103623 - 103772 |
Type | subroutine |
Call | dokin(typ, dataset) |
Module | None |
Notes | Write kinship coefficients |
Name of routine: | kinship |
---|---|
Source lines: | 103776 - 103822 |
Type | subroutine |
Call | kinship(ped, dataset, kin) |
Module | None |
Notes | Calculate kinship coefficient |
Name of routine: | frater |
---|---|
Source lines: | 103826 - 103854 |
Type | subroutine |
Call | frater(ped, dataset, kin, dom) |
Module | None |
Notes | Calculate coefficient of fraternity |
Name of routine: | delta7 |
---|---|
Source lines: | 103859 - 103894 |
Type | function |
Call | delta7(peri, perj, ped, dataset, kin) |
Module | None |
Notes | Coefficient of fraternity for one pair of relatives peri and perj are relative to start of current pedigree |
Name of routine: | inbreeding |
---|---|
Source lines: | 103898 - 103934 |
Type | subroutine |
Call | inbreeding(ped, dataset, iter, fvalues, estimator) |
Module | None |
Notes | Estimate inbreeding coefficient for pedigree |
Name of routine: | exact_inbreeding |
---|---|
Source lines: | 103938 - 103970 |
Type | subroutine |
Call | exact_inbreeding(ped, dataset, kin, fvalues) |
Module | None |
Notes | kinship based version |
Name of routine: | drop_inbreeding |
---|---|
Source lines: | 103974 - 104048 |
Type | subroutine |
Call | drop_inbreeding(ped, dataset, iter, fvalues) |
Module | None |
Notes | MC version |
Name of routine: | doinbred |
---|---|
Source lines: | 104052 - 104146 |
Type | subroutine |
Call | doinbred(iter, dataset, trait, plevel) |
Module | None |
Notes | inbreeding for all active pedigrees |
Name of routine: | invkin |
---|---|
Source lines: | 104151 - 104200 |
Type | subroutine |
Call | invkin(ped, dataset, ainv) |
Module | None |
Notes | A~ = (T~)' D~ T~ |
Name of routine: | segerr |
---|---|
Source lines: | 104205 - 104246 |
Type | subroutine |
Call | segerr(ped, dataset, rsd) |
Module | None |
Notes | Calculate standard deviation of segregation error (used for gametic model breeding value calculation) |
Name of routine: | casekin |
---|---|
Source lines: | 104250 - 104499 |
Type | subroutine |
Call | casekin(locnam, trait, gt, thresh, dataset, statval, pval, iter, plevel) |
Module | None |
Notes | Give kinships among affecteds |
Name of routine: | ancest |
---|---|
Source lines: | 104504 - 104632 |
Type | subroutine |
Call | ancest(locnam, trait, gt, thresh, dataset, plevel) |
Module | None |
Notes | Find the ancestor(s) shared by the maximum number of affecteds Also calculate inbreeding among all cases within each family |
Name of routine: | wrdesc |
---|---|
Source lines: | 104636 - 104651 |
Type | subroutine |
Call | wrdesc(pedigree, cid, sx, ndesc, ntot) |
Module | None |
Notes | write person and number of descendants |
Name of routine: | mksegmod |
---|---|
Source lines: | 104655 - 105048 |
Type | subroutine |
Call | mksegmod(narg, words, trait, gt, thresh, offset, censor, nvar, varlist, nloci, loc, lochash, loctyp, priran, nqtl, linkf, modtyp, shap) |
Module | None |
Notes | Parse a mixed model |
Name of routine: | preseg |
---|---|
Source lines: | 105052 - 105109 |
Type | subroutine |
Call | preseg(nvar, fixed, loc, loctyp, gene, allele_buffer, covariates) |
Module | None |
Notes | Names and preliminary estimates for fixed effects part of mixed model |
Name of routine: | segsim |
---|---|
Source lines: | 105116 - 106159 |
Type | subroutine |
Call | segsim(linkf, modtyp, shap, trait, gt, thresh, offset, censor, nvar, fixed, gene, genemod, allele_buffer, nloci, loc, loctyp, locpos, burnin, iter, nbatch, nsamples, tune, nchain, nqtl, dataset, mlik, mpar, priran, mcalg, plevel) |
Module | None |
Notes | Mixed model MCMC: simulate genotypes at 1..N unlinked QTLs Gaussian breeding values family intercepts regression coefficients for fixed effects |
Name of routine: | genfreq |
---|---|
Source lines: | 106163 - 106174 |
Type | subroutine |
Call | genfreq(pall, qtl_buffer) |
Module | None |
Notes | QTL genotypic log frequencies |
Name of routine: | oneprop |
---|---|
Source lines: | 106179 - 106315 |
Type | subroutine |
Call | oneprop(it, typ, mcalg, linkf, modtyp, nchain, nqtl, nfix, ncol, totobs, nprops, ncomp, tune, yvar, qtl_buffer, prop_buffer, nfam, families, dataset, empmu, empvar, lik, newlik, plevel) |
Module | None |
Notes | One iteration of the sampler: either parameters or random effects Give "empirical" estimates of random effects variances |
Name of routine: | mhprop |
---|---|
Source lines: | 106320 - 106406 |
Type | subroutine |
Call | mhprop(iprop, linkf, modtyp, nchain, nqtl, nfix, ncol, tune, yvar, qtl_buffer, nfam, families, dataset, lik, newlik, plevel) |
Module | None |
Notes | Metropolis sampler for global parameters |
Name of routine: | slprop |
---|---|
Source lines: | 106411 - 106539 |
Type | subroutine |
Call | slprop(iprop, linkf, modtyp, nchain, nqtl, nfix, ncol, qtl_buffer, nfam, families, dataset, lik, newlik, plevel) |
Module | None |
Notes | end-of-mhprop Slice sampler for global parameters |
Name of routine: | parprop |
---|---|
Source lines: | 106545 - 106571 |
Type | subroutine |
Call | parprop(typ, tune, yvar, oobounds) |
Module | None |
Notes | end-of-slprop Make a proposal for one QTL model parameter for Metropolis sampler oobounds!=0 when proposal is illegal |
Name of routine: | parbounds |
---|---|
Source lines: | 106577 - 106598 |
Type | subroutine |
Call | parbounds(typ, oobounds) |
Module | None |
Notes | end-of-parprop Check Metropolis proposal oobounds!=0 when proposal is illegal |
Name of routine: | qtlmod |
---|---|
Source lines: | 106612 - 106699 |
Type | subroutine |
Call | qtlmod(linkf, modtyp, nqtl, qtl_buffer) |
Module | None |
Notes | end-of-parbounds QTL allelic deviations, allele and genotype frequencies For identity link models, use pA, mu, totvar, a2, d2, h2, c2 to calculate all other parameters For other GLMs, use VA etc model pars 1=P(all) 2=a 3=d 4=AA 5=AB 6=BB 7=mu 8=totvar 9=VA 10=VD 11=VG 12=VC 13=VS 14=VE 15=sdG 16=sdC 17=sdS 18=sdE 19=a2 20=d2 21=h2 22=c2 23=s2 24=e2 25..MAXPAR=Betas |
Name of routine: | chkbin |
---|---|
Source lines: | 106703 - 106721 |
Type | subroutine |
Call | chkbin(nqtl, oobounds) |
Module | None |
Notes | check bounds on linear binomial model terms |
Name of routine: | triprop |
---|---|
Source lines: | 106726 - 106737 |
Type | subroutine |
Call | triprop(tune, p) |
Module | None |
Notes | end-of-chkbin Circularized triangular random proportion |
Name of routine: | linfun |
---|---|
Source lines: | 106743 - 106767 |
Type | subroutine |
Call | linfun(linkf, y, thresh) |
Module | None |
Notes | end-of-triprop link function for binary data linkf=1 identity 2 logit 3 probit 4 MFT 5=Log |
Name of routine: | dens |
---|---|
Source lines: | 106772 - 106816 |
Type | function |
Call | dens(x, mu, sd, shap, cens, modtyp) |
Module | None |
Notes | end-of-linfun Poisson or Binomial or Gaussian log density for FPM |
Name of routine: | pedlik |
---|---|
Source lines: | 106822 - 106860 |
Type | subroutine |
Call | pedlik(linkf, modtyp, nchain, nqtl, nfix, ncol, qtl_buffer, nfam, families, dataset, lik, oobounds, plevel) |
Module | None |
Notes | end-of-dens Calculate likelihood under FPM for entire sample of pedigrees over all chains (replicates) |
Name of routine: | seglik |
---|---|
Source lines: | 106865 - 106917 |
Type | subroutine |
Call | seglik(linkf, modtyp, ichain, nqtl, nfix, qtl_buffer, family, dataset, plevel) |
Module | None |
Notes | end-of-pedlik Calculate likelihood under FPM for one pedigree (one chain/replicate) |
Name of routine: | oneseg |
---|---|
Source lines: | 106923 - 107154 |
Type | subroutine |
Call | oneseg(it, linkf, modtyp, ichain, nqtl, nfix, qtl_buffer, prop_buffer, family, dataset, mcalg, plevel) |
Module | None |
Notes | end-of-seglik Update (gene-dropping) genotypes at one of N unlinked QTLs or Gaussian polygenotype or familial random intercept |
Name of routine: | oneslice |
---|---|
Source lines: | 107158 - 107295 |
Type | subroutine |
Call | oneslice(ieff, linkf, modtyp, shap, ichain, nqtl, nfix, qtl_buffer, family, dataset, plevel) |
Module | None |
Notes | Slice sampler updating Gaussian polygenotype |
Name of routine: | sliceprop |
---|---|
Source lines: | 107300 - 107325 |
Type | subroutine |
Call | sliceprop(ieff, idx, mztwin_proposal, twinlist, ichain, prop, family) |
Module | None |
Notes | end-of-oneslice copy proposal to appropriate location |
Name of routine: | idxlik |
---|---|
Source lines: | 107331 - 107378 |
Type | subroutine |
Call | idxlik(linkf, modtyp, shap, ichain, nqtl, nfix, qtl_buffer, family, dataset, lik, gtplik) |
Module | None |
Notes | end-of-sliceprop Gaussian polygenotype likelihood contribution of individual idx (and affected relatives) |
Name of routine: | seglf |
---|---|
Source lines: | 107382 - 107460 |
Type | subroutine |
Call | seglf(typ, idx, ichain, linkf, modtyp, shap, nqtl, nfix, qtl_buffer, family, dataset, yp, lik, gtplik) |
Module | None |
Notes | Likelihood contribution of a founder |
Name of routine: | seglnf |
---|---|
Source lines: | 107464 - 107531 |
Type | subroutine |
Call | seglnf(typ, idx, ichain, curmo, linkf, modtyp, shap, nqtl, nfix, qtl_buffer, family, dataset, yp, lik, gtplik) |
Module | None |
Notes | Likelihood contribution of a nonfounder |
Name of routine: | isimped |
---|---|
Source lines: | 107536 - 107619 |
Type | subroutine |
Call | isimped(ped, dataset, qtl_buffer, set) |
Module | None |
Notes | Resimulate (gene-dropping) genotypes at a single autosomal locus in descendants of randomly selected index |
Name of routine: | simpol |
---|---|
Source lines: | 107623 - 107705 |
Type | subroutine |
Call | simpol(vsd, ichain, family) |
Module | None |
Notes | Propose updated additive polygenic values in a pedigree |
Name of routine: | simmat |
---|---|
Source lines: | 107710 - 107743 |
Type | subroutine |
Call | simmat(vstep, ichain, family) |
Module | None |
Notes | end-of-simpol Propose updated sibship/maternal effects in a pedigree |
Name of routine: | empval |
---|---|
Source lines: | 107749 - 107848 |
Type | subroutine |
Call | empval(linkf, modtyp, nchain, nqtl, nfix, nfam, families, totobs, empmu, empvar) |
Module | None |
Notes | end-of-simmat Get empirical estimates of random effects Tote up empirical statistics for random effects: VG, VC, VS, VE |
Name of routine: | initvc |
---|---|
Source lines: | 107853 - 107920 |
Type | subroutine |
Call | initvc(nchain, nfam, families) |
Module | None |
Notes | end-of-empval Initialize additive genetic and/or maternal random effects |
Name of routine: | set2hap |
---|---|
Source lines: | 107926 - 107953 |
Type | subroutine |
Call | set2hap(ichain, iqtl, num, set, hset, typ) |
Module | None |
Notes | end-of-initvc Copy or swap genotypes from set to hset 1=set->hset; 2=hset->set; 3=swap |
Name of routine: | fpmpred |
---|---|
Source lines: | 107958 - 107994 |
Type | subroutine |
Call | fpmpred(typ, idx, ichain, linkf, nqtl, nfix, family, yp, ypf) |
Module | None |
Notes | end-of-set2hap FPM Linear predictor |
Name of routine: | updateblups |
---|---|
Source lines: | 107998 - 108060 |
Type | subroutine |
Call | updateblups(whichblup, nvals, nchain, nfam, families) |
Module | None |
Notes | Accumulate BLUP for additive genetic effects |
Name of routine: | dobatch |
---|---|
Source lines: | 108064 - 108093 |
Type | subroutine |
Call | dobatch(nbatch, nvar, batch, batchse) |
Module | None |
Notes | Produce batch estimates of Monte-Carlo error variance |
Name of routine: | wronep |
---|---|
Source lines: | 108097 - 108130 |
Type | subroutine |
Call | wronep(idx, it, ichain, yp, iqtl, nqtl, ieff, lik, family, dataset) |
Module | None |
Notes | Print oneseg's proposed genotypes for one individual |
Name of routine: | wrfpm |
---|---|
Source lines: | 108135 - 108225 |
Type | subroutine |
Call | wrfpm(it, linkf, modtyp, ichain, nqtl, nfix, family, dataset) |
Module | None |
Notes | end-of-wronep Print simulated genotypes from FPM iteration |
Name of routine: | wlscor |
---|---|
Source lines: | 108229 - 108277 |
Type | subroutine |
Call | wlscor(cor, npairs, stderr) |
Module | None |
Notes | WLS analysis of familial correlations |
Name of routine: | domft |
---|---|
Source lines: | 108281 - 108486 |
Type | subroutine |
Call | domft(trait, prevalence, logrid, higrid, gridstep, dataset, mlik, mpar, herit, iter, typ, plevel) |
Module | None |
Notes | MFT |
Name of routine: | sibqtl |
---|---|
Source lines: | 108490 - 108751 |
Type | subroutine |
Call | sibqtl(tranam, trait, locnam, gene, allele_buffer, dataset, pval, plevel, invalg, toler) |
Module | None |
Notes | Variance components analysis |
Name of routine: | varcom |
---|---|
Source lines: | 108760 - 109660 |
Type | subroutine |
Call | varcom(modtyp, nterms, terms, nloci, loc, loctyp, locpos, gene, genemod, allele_buffer, nmark, mark, dataset, totobs, mlik, mpar, pval, plevel, burnin, iter, typ, invalg, optim, toler) |
Module | None |
Notes | Variance components analysis modtyp 1=MVN 2=MFT 3=MFT_BOBYQA typ 1=CE 2=AE 3=ACE 4=ADE 5=AQE (6=AQE emp kin for Q) 7=CQE (8=AQE ibd inline in script) 9=QE (emp kin for Q) |
Name of routine: | covreg |
---|---|
Source lines: | 109664 - 109705 |
Type | subroutine |
Call | covreg() |
Module | None |
Notes | Regression analysis to generate starting values for varcom |
Name of routine: | vcprofile |
---|---|
Source lines: | 109709 - 109752 |
Type | subroutine |
Call | vcprofile(modtyp, whichpar, vc_nfix, npar, parest, modlik, lo95, up95) |
Module | None |
Notes | Function to give profile likelihood for given parameter of MVN model |
Name of routine: | brent_proflik |
---|---|
Source lines: | 109756 - 109766 |
Type | function |
Call | brent_proflik(x) |
Module | None |
Notes | Functions to give profile likelihood for A in AE model |
Name of routine: | brent_proflik_mft |
---|---|
Source lines: | 109768 - 109778 |
Type | function |
Call | brent_proflik_mft(x) |
Module | None |
Name of routine: | vcov |
---|---|
Source lines: | 109782 - 109832 |
Type | subroutine |
Call | vcov(va, vq, ve, vcvmat) |
Module | None |
Notes | GLS model VCOV for fixed effects part of MVN mixed model |
Name of routine: | thinibd |
---|---|
Source lines: | 109836 - 109867 |
Type | subroutine |
Call | thinibd(ped, dataset, nobs, ibd1, ibd2) |
Module | None |
Notes | Drop covariance matrix entries for unused records |
Name of routine: | syminv |
---|---|
Source lines: | 109871 - 109913 |
Type | subroutine |
Call | syminv(a, n, c, logdet, info) |
Module | None |
Notes | Call to LINPACK routines to invert packed lower triangular symmetric matrix |
Name of routine: | geninv |
---|---|
Source lines: | 109917 - 109954 |
Type | subroutine |
Call | geninv(a, n, c, logdet, matrank, info) |
Module | None |
Notes | Call to LINPACK routines to pseudo-invert packed lower triangular symmetric matrix |
Name of routine: | gibinv |
---|---|
Source lines: | 109979 - 110038 |
Type | subroutine |
Call | gibinv(cov, n, invcov, logdet, iter, plevel) |
Module | None |
Notes | D. A. Harville. Use of the Gibbs sampler to invert large, possibly sparse, positive definite matrices. Linear Algebra and its Applications, 289:203-224, 1999. Proposal of Harville is Gibbs sampler using just (3) 1. Set arbitrary starting values for z, z* for instance z_i=0, z*_i=i 2. Sample Phi as a vector containing independent draws according with definition (5) and (6): (5) E(Phi)=0 (6) E(Phi[k]*Phi[l])=I*delta(k,l) 3. Update z, z* by using equations (3) (3) z_i[k] = Phi_i[k]/sqrt(c_ii) - Sum(z_j[k] c_ij, j=1,i-1)/c_ii - Sum(z_j[k-1] c_ij, j=i+1,n)/c_ii 4. p = p + 1 5. Go to step 2 until abs(z'z*) < tol 6. Sample Phi as a vector containing independent draws according with definition (5) and (6) 7. Update z using equation (3) 8. Accumulate Cov(z) in s 9. Go to step 6 to compute the next round of iteration (B - p times) 10. Set the final estimate: Inv(C) = s/(B - p) |
Name of routine: | oneinv |
---|---|
Source lines: | 110042 - 110065 |
Type | subroutine |
Call | oneinv(n, nn, cov, z) |
Module | None |
Notes | One iteration of update of z |
Name of routine: | brent |
---|---|
Source lines: | 110092 - 110189 |
Type | function |
Call | brent(ax, bx, f, tol) |
Module | None |
Notes | Brent's one-dimensional minimizer The method used is a combination of golden section search and successive parabolic interpolation. Convergence is never much slower than that for a Fibonacci search. If F has a continuous second derivative which is positive at the minimum (which is not at AX or BX), then convergence is superlinear, and usually of the order of about 1.324.... INPUT PARAMETERS AX (real) left endpoint of initial interval BX (real) right endpoint of initial interval F Real function of the form REAL FUNCTION F(X) which evaluates F(X) for any X in the interval (AX,BX) Must be declared EXTERNAL in calling routine. TOL (real) desired length of the interval of uncertainty of the final result ( .ge. 0.0) OUTPUT PARAMETERS FMIN abcissa approximating the minimizer of F AX lower bound for minimizer BX upper bound for minimizer |
Name of routine: | |
---|---|
Source lines: | 110213 - 110273 |
Type | subroutine |
Call | fibmin (func, xlo, xhi, tol, xmin, fxmin) |
Module | None |
Notes | Charles Reeve's Fibonacci search from STSPAC converted to modern Fortran, with fibonacci array dynamically allocated replacing REAL with double precision throughout ----------------------------------------------------------------------- FIBMIN WRITTEN BY CHARLES P. REEVE, STATISTICAL ENGINEERING DIVISION, NATIONAL BUREAU OF STANDARDS, GAITHERSBURG, MARYLAND 20899 FOR: COMPUTING THE X VALUE (XMIN) AT WHICH THE FUNCTION FUNC(X) IS MINIMAL IN THE INTERVAL [XLO,XHI]. IN THAT INTERVAL FUNC IS ASSUMED TO BE UNIMODAL. THE TOLERANCE ON XMIN (TOL) MUST BE SPECIFIED. THE FUNCTION VALUE AT XMIN (FXMIN) IS RETURNED. THE MINIMUM IS FOUND USING A FIBONACCI SEARCH ALGORITHM. NOTE: IF TOL < [XHI-XLO]/[THE JX(TH) FIBONACCI NUMBER], THEN JX SHOULD BE INCREASED. THE 100(TH) FIBONACCI NUMBER IS ABOUT 3.5E+20. SUBPROGRAMS CALLED: -NONE- CURRENT VERSION COMPLETED AUGUST 12, 1988 ----------------------------------------------------------------------- |
Name of routine: | polyinter |
---|---|
Source lines: | 110278 - 110333 |
Type | subroutine |
Call | polyinter(idegree, nvals, yval, xval, varwt, maxx, maxy, plevel) |
Module | None |
Notes | Fit curve and interpolates maximum of y Passes coefficients to brent_interp using AS164_class |
Name of routine: | brent_inter |
---|---|
Source lines: | 110337 - 110346 |
Type | function |
Call | brent_inter(x) |
Module | None |
Notes | predicted value from regression equation |
Name of routine: | |
---|---|
Source lines: | 110356 - 110398 |
Type | subroutine |
Call | qdcrt (a, z) |
Module | None |
Notes | QDCRT computes the roots of the real polynomial A(1) + A(2)*Z + A(3)*Z**2 and stores the results in Z. It is assumed that A(3) is nonzero. Converted to be compatible with ELF90 by Alan Miller amiller @ bigpond.net.au Latest revision - 27 February 1997 |
Name of routine: | counthom |
---|---|
Source lines: | 110402 - 110428 |
Type | subroutine |
Call | counthom(gene, dataset, obshom) |
Module | None |
Notes | Count proportion of observed homozygotes for a locus |
Name of routine: | globhom |
---|---|
Source lines: | 110433 - 110659 |
Type | subroutine |
Call | globhom(dataset, long_roh, trait, plevel) |
Module | None |
Notes | Calculate observed and expected homozygosity for all individuals Save F_roh to quantitative variable |
Name of routine: | globhom_onelocus |
---|---|
Source lines: | 110663 - 110690 |
Type | subroutine |
Call | globhom_onelocus(gene, loctyp, dataset, exphom) |
Module | None |
Notes | Homozygosity contribution for ith locus |
Name of routine: | mulhom |
---|---|
Source lines: | 110695 - 111007 |
Type | subroutine |
Call | mulhom(trait, gt, thresh, xlinkd, iter, mincnt, nloci, loc, loctyp, locpos, map, dataset, plevel) |
Module | None |
Notes | Calculate observed and expected multipoint homozygosity Expected distribution simulated using given map |
Name of routine: | clcrun |
---|---|
Source lines: | 111011 - 111055 |
Type | subroutine |
Call | clcrun(ped, dataset, nmark, hset, runlen, totrunlen, averun) |
Module | None |
Notes | calculate average maximum run length of homozygosity |
Name of routine: | simhap |
---|---|
Source lines: | 111059 - 111134 |
Type | subroutine |
Call | simhap(nmark, recdist, alleles, ped, dataset, hset, plevel) |
Module | None |
Notes | Drop haplotypes for all family members for given map |
Name of routine: | exclude |
---|---|
Source lines: | 111139 - 111165 |
Type | subroutine |
Call | exclude(imp, nloci, loc, loctyp, locpos, dataset, inconsist, imputd, plevel) |
Module | None |
Notes | Excluding genotypes from parental phenoset Straight Lange & Goradia AJHG 1987 40: 250-256 |
Name of routine: | exclude_onelocus |
---|---|
Source lines: | 111169 - 111241 |
Type | subroutine |
Call | exclude_onelocus(imp, gene, loc, loctyp, dataset, inconsist, imputd, plevel) |
Module | None |
Notes | Exclude at one locus |
Name of routine: | exclude_oneped |
---|---|
Source lines: | 111245 - 111579 |
Type | subroutine |
Call | exclude_oneped(imp, reduce, locnam, gene, xlinkd, ped, dataset, allele_buffer, set, gset, inconsist, imputd, plevel) |
Module | None |
Notes | Do one pedigree at one locus |
Name of routine: | wrset |
---|---|
Source lines: | 111583 - 111613 |
Type | subroutine |
Call | wrset(locnam, ped, dataset, set, gset) |
Module | None |
Notes | write out phenoset |
Name of routine: | exc |
---|---|
Source lines: | 111617 - 111751 |
Type | subroutine |
Call | exc(locnam, xlinkd, gene, ped, dataset, set, gset, inconsist, plevel) |
Module | None |
Notes | perform exclusion for the pedigree regardless of imputation level |
Name of routine: | landg |
---|---|
Source lines: | 111755 - 111873 |
Type | subroutine |
Call | landg(xlinkd, currf, currm, sta, fin, sex, set, gset, change, incon) |
Module | None |
Notes | 2nd version of impute -- following Lange & Goradia, 1987 |
Name of routine: | prune |
---|---|
Source lines: | 111877 - 111901 |
Type | subroutine |
Call | prune(idx, ngeno, gset, keep) |
Module | None |
Notes | Remove unwanted genotypes from phenoset |
Name of routine: | swapg |
---|---|
Source lines: | 111905 - 111916 |
Type | subroutine |
Call | swapg(idx, gset, j, k) |
Module | None |
Notes | Swap two genotypes within a phenoset array |
Name of routine: | doblup |
---|---|
Source lines: | 111921 - 112006 |
Type | subroutine |
Call | doblup(locnam, trait, h2, blupout, dataset, plevel) |
Module | None |
Notes | Calculate BLUPs for VC model save if requested |
Name of routine: | blup |
---|---|
Source lines: | 112015 - 112096 |
Type | subroutine |
Call | blup(lam, trait, ped, dataset, ainv, bval, fmu) |
Module | None |
Notes | Calculate BLUPs for current pedigree quantitative trait MME: intercept only, n1 obs [ Z'X Z'Z+lam A~ ] [ u ] [ Z'y ] [ !is.na(y)' lam Ainv+diag(!is.na(y)) ] [!is.na(y)*y ] [ X'X X'Z ] [ b ] = [ X'y ] -> [ n !is.na(y) ] [ Sum(y) ] |
Name of routine: | hapassoc |
---|---|
Source lines: | 112105 - 112546 |
Type | subroutine |
Call | hapassoc(nmark, markers, loc, loctyp, locpos, locnotes, dataset, pval, plevel) |
Module | None |
Notes | Association haplotype analysis for unphased data counts ncells ncat*(na1*(na1+1)/2)*(na2*(na2+1)/2) full nfull ncat*(nh1*(nh1+1)/2)*(nh2*(nh2+1)/2) scatter nfull*nobs model nfull*(ncat + nh1 + nh2 + nh1*nh2 [ + ncat*nh1*nh2 ]) |
Name of routine: | agl |
---|---|
Source lines: | 112555 - 112585 |
Type | subroutine |
Call | agl(nr, nc, design, sta, nalleles, nstrata) |
Module | None |
Notes | Appropriate design matrix columns for allelic model a1 a2 gen 2 0 1/1 1 1 1/2 1 1 2/1 0 2 2/2 |
Name of routine: | hap2gen |
---|---|
Source lines: | 112589 - 112640 |
Type | subroutine |
Call | hap2gen(nrep, nmarkers, numals, scatter) |
Module | None |
Notes | Phased genotype to unphased genotype mapping |
Name of routine: | wrmat |
---|---|
Source lines: | 112643 - 112654 |
Type | subroutine |
Call | wrmat(nr, nc, mat) |
Module | None |
Notes | Convenience routine |
Name of routine: | nearloc |
---|---|
Source lines: | 112660 - 112726 |
Type | subroutine |
Call | nearloc(pos, thresh, maxcluster, nloci, loc, loctyp, group, map, nmark, mark, plevel) |
Module | None |
Notes | The set of markers close to an index marker A B map distances are interpreted adjacently ie 10-5-15 = B unlinked C unlinked 10 |
Name of routine: | dopeel |
---|---|
Source lines: | 112755 - 112821 |
Type | subroutine |
Call | dopeel(typ, gene, trait, maxiter, allele_buffer, dataset, totlik, plevel) |
Module | None |
Notes | Iterative peeling in pedigrees -- Description from thesis of Schelling 2004 1. for each pedigree member i to initialize anterior values to the population genotype frequency and posterior values to unity subsequently calculate its penetrance values. 2. Then, for each connector i a) for families in which i is an offspring, its anterior value ai (ui ) is calculated non-recursively using (2.16) and the current values of the required quantities. b) for families in which i is a parent, its posterior value pij (ui ) through each mate j is calculated non-recursively using (2.17) and the current values of the required quantities. Repeat 2 until values converge Additionally, anterior, posterior and penetrance values may be scaled to sum to unity over genotype as described in Wang et al. (1996) to avoid numerical underflow. The log scaling factors Kai , Kgi and Kpij for the anterior, posterior and penetrance values are also calculated using the current values of the required quantities. They denote the accumulative log of the scaling factors for the anterior, posterior and penetrance values for member i with its mother mi and father pi . In 2.16 and 2.17, S denotes set of mates, C denotes set of full-sibs typ=1 likelihood typ=2 GPE |
Name of routine: | itpeel |
---|---|
Source lines: | 112825 - 113376 |
Type | subroutine |
Call | itpeel(typ, ped, dataset, gene, allele_buffer, gfrq, transprob, trait, maxiter, lik, ifail, plevel) |
Module | None |
Notes | pth ped |
Name of routine: | filltrans |
---|---|
Source lines: | 113380 - 113407 |
Type | subroutine |
Call | filltrans(numal, ngeno, transprob) |
Module | None |
Notes | Create table of transmission probabilities |
Name of routine: | postprod |
---|---|
Source lines: | 113411 - 113431 |
Type | function |
Call | postprod(idx, geno, nmates, mates, postp) |
Module | None |
Notes | Product of posterior values for all matings of ego |
Name of routine: | postprodex |
---|---|
Source lines: | 113435 - 113459 |
Type | function |
Call | postprodex(idx, except, geno, nmates, mates, postidx, postp) |
Module | None |
Notes | Product of posterior values for all matings of ego save one |
Name of routine: | postscale |
---|---|
Source lines: | 113463 - 113477 |
Type | function |
Call | postscale(idx, nmates, mates, pscale) |
Module | None |
Notes | Sum of posterior value scaling factors for all matings of ego |
Name of routine: | postscalex |
---|---|
Source lines: | 113481 - 113499 |
Type | function |
Call | postscalex(idx, except, nmates, mates, postidx, pscale) |
Module | None |
Notes | Sum of posterior value scaling factors for all matings of ego |
Name of routine: | nglist |
---|---|
Source lines: | 113503 - 113511 |
Type | function |
Call | nglist(gtp,ngeno) |
Module | None |
Notes | Length of list of genotypes |
Name of routine: | glist |
---|---|
Source lines: | 113515 - 113523 |
Type | function |
Call | glist(gtp, idx) |
Module | None |
Notes | member of list of genotypes |
Name of routine: | itlik |
---|---|
Source lines: | 113527 - 113560 |
Type | subroutine |
Call | itlik(trget, ngeno, gtp, nmates, mates, antp, postp, ascale, pscale, lik) |
Module | None |
Notes | Likelihood from iterative peeling |
Name of routine: | dopeel2 |
---|---|
Source lines: | 113568 - 113698 |
Type | subroutine |
Call | dopeel2(typ, mark1, mark2, theta, maxiter, allele_buffer1, allele_buffer2, dataset, plevel) |
Module | None |
Notes | Two locus version typ=1 likelihood typ=2 grid typ=3 GPE at r=0 typ=4 first locus allelic dose, r=0 |
Name of routine: | itpeel2 |
---|---|
Source lines: | 113702 - 114360 |
Type | subroutine |
Call | itpeel2(typ, ped, dataset, mark1, mark2, allele_buffer1, allele_buffer2, ngeno, phased, gfrq, ngrid, grid, famlik, istat, maxiter, ifail, plevel) |
Module | None |
Notes | Iterative peeling two codominant loci over grid of recombination fractions: pth ped |
Name of routine: | nglist2 |
---|---|
Source lines: | 114364 - 114369 |
Type | function |
Call | nglist2(gtp) |
Module | None |
Notes | Length of list of genotypes |
Name of routine: | glist2 |
---|---|
Source lines: | 114373 - 114379 |
Type | function |
Call | glist2(gtp, idx) |
Module | None |
Notes | member of list of genotypes |
Name of routine: | transprob |
---|---|
Source lines: | 114383 - 114399 |
Type | function |
Call | transprob(geno, fgeno, mgeno, ngeno, phased, prec, pnrec) |
Module | None |
Notes | Parent-offspring triad |
Name of routine: | transmit |
---|---|
Source lines: | 114407 - 114420 |
Type | function |
Call | transmit(p11, p12, p21, p22, c1, c2, prec, pnrec) |
Module | None |
Notes | Transmission probabilities: two codominant loci, phased genotypes p11 | p12 c1 | => p21 | p22 c2 |
Name of routine: | itlik2 |
---|---|
Source lines: | 114424 - 114457 |
Type | subroutine |
Call | itlik2(trget, gtp, nmates, mates, antp, postp, ascale, pscale, lik) |
Module | None |
Notes | Likelihood from iterative peeling |
Name of routine: | fillphase |
---|---|
Source lines: | 114461 - 114510 |
Type | subroutine |
Call | fillphase(allele_buffer1, allele_buffer2, ngeno, phased, gfrq) |
Module | None |
Notes | Phased genotype frequencies |
Name of routine: | dochol |
---|---|
Source lines: | 114512 - 114543 |
Type | subroutine |
Call | dochol(n) |
Module | None |
Name of routine: | doeigen |
---|---|
Source lines: | 114545 - 114579 |
Type | subroutine |
Call | doeigen(n) |
Module | None |
Name of routine: | dcentre |
---|---|
Source lines: | 114584 - 114608 |
Type | subroutine |
Call | dcentre(n, nn, x) |
Module | None |
Notes | double centre a distance matrix (lower triangular form) used for MDS |
Name of routine: | twinken |
---|---|
Source lines: | 114613 - 114848 |
Type | subroutine |
Call | twinken(locnam, trait, cenloc, censor, mztwin, gt, thresh, dataset, iter, mincnt, norder, plevel) |
Module | None |
Notes | Oakes' Kendall tau for bivariate survival analysis contrasting monozygotic twins v. other siblings. |
Name of routine: | twinkencon |
---|---|
Source lines: | 114852 - 114915 |
Type | subroutine |
Call | twinkencon(maxpairs, sta, fin, plist, pairs, trait, censor, dataset, nc, nd, tau, taunorm) |
Module | None |
Notes | Estimate Kendall tau for one set of pairs stored pairs(sta+1, fin) |
Name of routine: | eigen |
---|---|
Source lines: | 114919 - 114946 |
Type | subroutine |
Call | eigen(typ, n, a, z) |
Module | None |
Notes | Wrapper for EISPACK real symmetric matrix routines |
Name of routine: | eigens |
---|---|
Source lines: | 114950 - 114965 |
Type | subroutine |
Call | eigens(n, as, w) |
Module | None |
Notes | eigenvalues for full square real matrix |
Name of routine: | kininv |
---|---|
Source lines: | 115061 - 115134 |
Type | subroutine |
Call | kininv(a, n, ainv, logdet, ifail, plevel) |
Module | None |
Notes | Wrapper for syminv and geninv or memoized |
AS164 | Algorithm AS 164: Least Squares Subject to Linear Constraints Author(s): W. Douglas Stirling Source: Applied Statistics, Vol. 30, No. 2, (1981), pp. 204-212 |
AS164_class | Work arrays for AS164 -- allow passing of results to other routines |
AS319 | Algorithm AS 319 variable metric function minimisation Algorithm AS 319 Appl Statist (1997), Vol 46, No 4 Converted to Fortran 90 free-format style by Alan Miller e-mail: Alan.Miller @ vic.cmis.csiro.au URL: www.ozemail.com.au/~milleraj |
BLAS | Selected BLAS routines |
EISPACK | Selected EISPACK subroutines |
LINPACK | Selected LINPACK subroutines |
alleles_class | Allele frequency data structure |
automatic_data | Environmental (automatic) variables for evaluator |
bgzf | Reading bgzipped files * BGZF/GZIP header (specialized from RFC 1952; little endian): ID1 ID2 CM FLG MTIME XFL OS XLEN SI1 SI2 SLEN +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 31|139| 8| 4| 0| 0|255| 6| 66| 67| 2|BLK_LEN| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ BGZF extension: ^ ^ ^ ^ | | | | FLG.EXTRA XLEN B C BGZF format is compatible with GZIP. It limits the size of each compressed block to 2^16 bytes and adds and an extra "BC" field in the gzip header which records the size. |
bobyqa_optimizer | Mike Powell's BOBYQA minimizer |
brent_mft | MFT bivariate normal likelihood |
brent_vcdata | Data to be passed to function called by brent() MVN profile likelihood |
categorical_data | Factor type representations for categorical data Currently factor labels are recorded in locnotes |
comp_ops | parse comparison in isaff (simple expression) 15='<', 16='>', 17='ge', 18='le', 19='ne', 20='eq' 21='odd', 22='even' |
contingency_table | |
covariate_data | Accessory routines and structure to store information about variables in formula |
directory_utilities | higher level file directory routines |
extras | Sib-pair is a computer program for genetic analysis Author: David L Duffy Compiler, version, linked in external libraries etc recorded here: 1) GUI additions 1a) Hooks to call JAPI (library calling AWT) Java Application Programming Interface 1.0.6 (http://www.japi.de/) Main author: Merten Joost japi is an open source free software GUI toolkit, which makes it easy to develop platform independent applications. Written in JAVA and C, provides the JAVA AWT Toolkit to non object-oriented languages incl Fortran 77 and Fortran 90 onwards. Development stopped in 2003 1b) Hooks to call PILIB (library calling GTK+) Platform Independent Library for use with Fortran 9x PILIB 0.5 (http://www.sourceforge.net/projects/pilib) 1c) Interface to EGGX/ProCALL graphics library X Library for use with C or Fortran 9x Main author: Chisato Yamauchi 2) Interface to ZLib 3) Unix pipes |
f95pipes | |
f95zlib | |
fastatools | FASTA .fa and .fai index file .fai contains 5 tab-delimited fields per record (made by faidx or Sib-pair): NAME Name of this reference sequence LENGTH Total length of this reference sequence, in bases OFFSET Offset within the FASTA file of this sequence's first base LINEBASES The number of bases on each line, usually 60 LINEWIDTH The number of bytes in each line, including the newline .fa file is description string (one line), then corresponding sequence |
fileio | Readline subroutine for either plain or (b)gzipped files -- |
formula_class | Simple regression formula structure and parser formula and design matrix formula is: a b c a*b a*c b*c a*b*c T1 1 2 3 1 1 2 1 T2 . . . 2 3 3 2 T3 . . . . . . 3 TERMDIM 1 1 1 2 2 2 3 Effects 1 2 3 NLEV n1 n2 n3 STA 1 n1+1 n1+n2+1 FIN n1 n1+n2 n1+n2+n3 INFORM 1 1 1 |
genetic_maps | Linkage and physical maps genetic map functions are 1=Haldane, 2=Kosambi default map units is Mbp or cM (assuming 1 Mbp/cM) mapunits=type of map unit mapconstant=multiplier for internal map units (Mbp/cM) |
genofile_class | an object representing genotype data in a file |
genolist_class | Lists of genotypes |
glm_types | GLM model types |
grapheps | The grapheps Postscript functions See http://swiss.csail.mit.edu/~jaffer/Docupage/grapheps |
gtftools | GTF (GFF, GVF) |
ibd_class | Variance components data structure |
idhash_class | Hash table for indexing IDs etc |
idhash_funs | hash functions for IDs |
idstring_widths | One big pedigree data structure Updating size requires copying entire structure (hopefully maintaining contiguous storage) Preliminary work to make ID string widths adjustable |
interrupt | interrupt |
iobuff | Input buffer, stack of input streams, prompt string etc ilevel=0 historical or macro command; =1 keyboard; =2,3,4 files toplevel=highest occupied level ilevold=last level, if ilevel currently 0 incstr stream for ith inclusion infil name of file incaction 1=read entire stream 2=read locus information only 3=1+delete |
iocodes | iostat codes needed for wrinline etc now available in the intrinsic module |
ioports | Definition of a port slots: associated file name 1=uncompressed 2=gzipped 3=bgzipped 4=unzipped copy 5=pipe Fortran style logical unit number gzip C-style file handle |
japi | |
julian_epoch | epoch for Julian dates (defaults to 2440588==1970-01-01), |
kinship_io | Higher level i/o routines for popgen_kinship |
kuonen_chisqsum | Statistical functions library First, support routines for Kuonen saddlepoint approximation for the distribution of a quadratic form in p standard Normal variables ie a linear combination of p chi-squared distributions with 1 df. After the code in Thomas Lumley's survey package |
likelihoods | Pedigree MVN and MFT model loglikelihood mftlik_plevel controls output detail from mftlik() mftlik_nerrors counts number of pedigrees causing problems mftlik_interval is estimate of 99% interval containing likelihood (MC error) |
lochash_class | Locus name hash table |
locstring_widths | String length for locus names and annotations |
locus_data | Storage for the locus data |
locus_list | Subset, manipulate or print locus_data |
locus_types | Locus types bitpatterns loctyp Compression_scheme Deleted Marker: Autosomal X-marker Haploid Y-chrom / Affection Quantitative CC D T 1 00 0 0 001 Autosomal marker 2 00 0 0 010 X-chromosome marker 4 00 0 0 100 Haploid unspecified 5 00 0 0 101 Mitochondrial marker 6 00 0 0 110 Y-Chromosome marker 8 00 0 1 000 Trait unspecified 9 00 0 1 001 Quantitative trait 10 00 0 1 010 Binary trait 11 00 0 1 011 Categorical trait 12 00 0 1 100 Special trait (computed) |
map_position_list | Subset of loci by map ranges read in range of map positions eg 6:112345 -- 142441 => 6:112345-6:142441 6:112345-142441 => 6:112345-6:142441 chr6 112345 -- 142441 1424450 => 6:112345-6:142441 6:1424450-6:1424450 -- 6:112345 => 6:0-6:112345 6:112345 -- => 6:112345-6:1e99 6:112345 -- 7:142441 => 6:112345 --, -- 7:142441 => 6:112345-6:1e99, 7:0-7:142441 pos1 => " ":pos1 -- " ":pos1 pos2 => chr1:pos2 -- chr1:pos2 chr1:pos1 => chr1:pos1 -- chr1:pos1 chr1:pos1 -- chr1:pos2 => chr1:pos1 -- chr1:pos2 chr1:pos1 -- pos2 => chr1:pos1 -- chr1:pos2 chr1:pos1 -- => chr1:pos1 -- chr1:1e99 -- chr1:pos2 => chr1:0 -- chr1:pos2 |
maprange_class | Storage for a range of map positions chromosome chromosome_name mapranges range_start range_end chromrange first_range_record last_range_record |
matrix_class | A container for large (dense) matrices that can keep them as random access files and buffer a subset of columns in memory |
mcmc_model | Mixed model analysis parameters linkf=link function 1=identity 2=logit 3=probit 4=MFT 5=log modtyp=likelihood family (1=gaussian, 2=binomial, 3=poisson) nqtl=trait loci in model nfix=number of fixed effects MAXPAR=maximum number of segregation model parameters RANPAR=number of random effects model parameters Model parameters model pars 1=P(all) 2=a 3=d 4=AA 5=AB 6=BB 7=mu 8=totvar 9=VA 10=VD 11=VG 12=VC 13=VS 14=VE 15=sdG 16=sdC 17=sdM 18=sdE 19=a2 20=d2 21=h2 22=c2 23=m2 24=e2 25..MAXPAR=Betas Random Effects: QTL: 1=P(all) 2=a 3=d 4=muAA 5=muAB 6=muBB 7=mu 8=totvar 9=VA 10=VD Polygenes: 11=VG 14=sdG Familial environment 12=VC 15=sdC Maternal/sibship effect 13=VS 17=sdS Error 14=VE 18=sdE Proportions of variance 19=a2 20=d2 21=h2 22=c2 23=s2 24=e2 Fixed Effects: 25...MAXPAR parnam = parameter name paract = status 0=excluded 1=estimated 2=fixed 3=function of estimated parameter par = parameter estimate parscal = scale size for MCMC proposal distribution (usually approx standard error) |
mftcontrol | MVN integration control variables mftalgo 1=Mendell-Elston 2=Genz mfteval maximum number of function values allowed. This parameter can be used to limit the time. A sensible strategy is to start with MAXPTS = 1000*N, and then increase MAXPTS if ERROR is too large. abseps absolute error tolerance. releps relative error tolerance. |
mftfuns | Main multivariate normal integration routines (Alan Genz) |
nucleotides | Routines to manipulate nucleotide alleles: numeric to letter, strand flipping, |
outstream | Output stream, formatting |
pairlist_class | expandable ordered list of (unique) pairs of integers new entries are either inserted or appended after comparison to most recent addition npairs=#pairs pairs=set of pairs |
parser_data | List of reserved words Token name, left binding power, right binding power, operation Pos Name LBP RBP Op (1=unary postfix; 2=binary, infix; 3=if; --- ------- --- --- -- 10=zero-arg functions eg rand) 0 null 0 0 0 1 ( 200 0 0 2 ) 0 5 0 3 if 0 45 3 4 then 5 25 0 5 else 5 25 0 6 * 120 121 2 7 / 120 121 2 8 + 100 101 2 9 - 100 101 2 10 ^ 139 138 2 11 = 0 0 2 12 not 70 70 1 13 and 65 66 2 14 or 60 61 2 15 < 80 80 2 16 > 80 80 2 17 ge 80 80 2 18 le 80 80 2 19 ne 80 80 2 20 eq 80 80 2 21 neg 138 138 1 22 pos 138 138 1 23 abs 140 140 1 24 sqrt 140 140 1 25 log 140 140 1 26 exp 140 140 1 27 sin 140 140 1 28 cos 140 140 1 29 tan 140 140 1 30 asin 140 140 1 31 acos 140 140 1 32 atan 140 140 1 33 inht 140 140 1 34 int 140 140 1 35 round 140 140 1 36 istyp 140 140 1 37 untyp 140 140 1 38 ishet 140 140 1 39 ishom 140 140 1 40 alla 140 140 1 41 allb 140 140 1 42 rand 0 0 10 43 rnorm 0 0 10 44 pi 0 0 10 45 y 0 0 10 46 n 0 0 10 47 x 0 0 10 48 NUM 0 0 10 49 julian 140 140 1 50 greg 140 140 1 51 log10 140 140 1 52 begin 201 0 0 53 end 0 4 0 54 ; 0 0 0 55 eps 0 0 10 56 pnorm 140 140 1 57 qnorm 140 140 1 58 fact 140 140 1 59 mod 120 121 2 |
ped_class | |
pedigree_data | Pedigree storage |
popgen_kinship | Large dense empirical kinship matrix, its latest active subset and corresponding inverse and a hash of the ids of the dropped rows |
popgen_vcdata | Cockerham-like multi-locus variance components |
posix_dir | Interface to posix file handling on Unix and Darwin |
read_data | Extract values from dataset |
recast_data | Recast data to and from dp representation |
relpair_classes | Types of relative pair |
rndseed | time/random number generator seeds |
rngs | random number generators |
scanner | Scanner |
scheme_lang | Miniscm |
showcomponent | Utilities to print arrays |
sorts | Sorting etc |
statfuns | All the functions |
statresults | Results of statistical tests Likelihoods and no. parameters for consecutive model fits (varcom, llm, segsim) whlik points to last result pval is P-value arising from current test statval is statistic and error variance (asymptotic and empirical estimates) or d.f. arising from current test (binreg, clreg) |
storage_classes | Phenotype/genotype data storage classes are currently: SCLASS = i1 4-bit genotypes or 8-bit alleles GCLASS = i2 16-bit alleles PCLASS = r8 (TCLASS = any) Chunksize is the blocksize for reading/writing binary images, so as not to exceed LRECL or buffers |
string_utilities | String utilities |
symmetric_matrix | Simple symmetric matrix operations |
tabixtools | tabix position index |
table_cell_type | multidimensional contingency table ncat=#dimensions of table ncells=#cells in table ntot=grand total of counts hits=#insertions already present in table misses=#insertions not already present in table used to optimize expansion of arrays idx=pointer to label/data for cell, icount=counts categories=workspace containing all labels/data, hashed with delayed quicksort (20190406) cell categories are stored as type table_cell: |
timelib | date and time subroutines |
varmet_optimizer | Algorithm AS 319 variable metric function minimisation Algorithm AS 319 Appl Statist (1997), Vol 46, No 4 Converted to Fortran 90 free-format style by Alan Miller e-mail: Alan.Miller @ vic.cmis.csiro.au URL: www.ozemail.com.au/~milleraj Actual varmet minimizer |
vcfhash_class | hash VCF file by locus name |
vcftools | VCF (Variant Call Format) file utilities |