Skip to content

Description of programflow

Harald Grove edited this page Dec 19, 2016 · 1 revision

Known weaknesses: Reads all genotypes into memory -> Not good for very large files. No way to handle duplicate IDs in the input genotype file.

Flow of snptranslate:

Read in pedigree, if provided in external file. Store in rped If no external pedigree, set rped to None

Read in marker information, if provided in external file Store in rmark If no external markerlist, set rmark to None

Create input object (gen1) and pass rped,rmark to the object at creation > self.ped and self.mark stores rped and rmark resp.

Create output object (gen2) and pass rped,rmark to the object at creation > self.ped and self.mark stores rped and rmark

Read genotypes in input object and return them to local variable (genos), pass rmark and input file to the object. The returned object also contains pedigree and marker information from the input file. > Collect information about pedigree and markerlist from input file, store it in ped and mark. (This step might be skipped for either ped, mark or both depending on the inputfile.) > Order of samples and markers are stored in ped and mark objects (resp.). > Order of samples and markers are copied to new variables (pedlist, marklist). > If marker information are not present in the input file, the externally provided marker info (optional input parameter, emark) are used instead. > Create a numpy array with pedlist x marklist elements, fill in all elements with genotypes from the input file. Genotypes are represented as numerals in the form: 0,11,12,13,14,15,16,21,22,...

Send genotypes to output object for writing to file, pass genos and outpufile to the object. > If self.ped is non empty, output pedigree (ped) will be from self.ped, otherwise it will use pedigree from input file. > If self.mark is non empty, output markerinfo (mark) will be from self.mark, otherwise it will use markerinfo from input file. > Set local variables pedlist and marklist from ped and mark objects. > Write genotypes to output file.

Clone this wiki locally