| 175 | |
| 176 | === ConvertListsOfPedAndMapFilesToGenAndSample === |
| 177 | Converts many Ped and Map genotype files usually used by [http://pngu.mgh.harvard.edu/~purcell/plink/ plink] to gen and sample files usually used by [http://mathgen.stats.ox.ac.uk/impute/impute.html impute], [http://www.stats.ox.ac.uk/~marchini/software/gwas/chiamo.html chiamo], [http://www.stats.ox.ac.uk/~marchini/software/gwas/hapgen.html hapgen] and [http://www.stats.ox.ac.uk/~marchini/software/gwas/snptest.html snptest]. The conversion tool that is used is [http://www.well.ox.ac.uk/~cfreeman/software/gwas/gtool.html gtool]. All Python lists have to have the same size. |
| 178 | |
| 179 | ==== Parameters ==== |
| 180 | * gtoolPath : Path to gtool (example: /Users/alexandroskanterakis/Tools/gtool/gtool) |
| 181 | * pedInputListOfFiles : Python list of input ped files |
| 182 | * mapInputListOfFiles : Python list of input map files |
| 183 | * sampleOutputListOfFiles : Python list of output sample files |
| 184 | * genOutputListOfFiles : Python list of output gen files |
| 185 | |
| 186 | ==== Example ==== |
| 187 | |
| 188 | {{{ |
| 189 | #!div style="font-size: 80%" |
| 190 | Code highlighting: |
| 191 | {{{#!python |
| 192 | output_divided_path = "/path/to/output/files" |
| 193 | suffix = "_chr" |
| 194 | |
| 195 | ConvertListsOfPedAndMapFilesToGenAndSample( |
| 196 | gtoolPath = "/Users/alexandroskanterakis/Tools/gtool/gtool", |
| 197 | pedInputListOfFiles= [output_divided_path+ "/" + suffix + "_" + str(x) + ".ped" for x in range(1,22)+['X', 'Y']], |
| 198 | mapInputListOfFiles=[output_divided_path+ "/" + suffix + "_" + str(x) + ".map" for x in range(1,22)+['X', 'Y']], |
| 199 | sampleOutputListOfFiles=[output_divided_path+ "/" + suffix + "_" + str(x) + ".sample" for x in range(1,22)+['X', 'Y']], |
| 200 | genOutputListOfFiles=[output_divided_path+ "/" + suffix + "_" + str(x) + ".gen" for x in range(1,22)+['X', 'Y']] |
| 201 | ) |
| 202 | }}} |
| 203 | }}} |
| 204 | |
| 205 | ==== Source code ==== |
| 206 | http://www.bbmriwiki.nl/svn/Imputation/impute2/ConvertListsOfPedAndMapFilesToGenAndSample.py |