Convert list of PEDMAP files to GEN SAMPLE user Kantale

From PyPedia
Jump to: navigation, search

Contents

[edit] Documentation

Converts many Ped and Map genotype files usually used by plink to gen and sample files usually used by impute, chiamo, hapgen and snptest. The conversion tool that is used is gtool. All Python lists have to have the same size.

Example

import pypedia
from pypedia import ConvertListsOfPedAndMapFilesToGenAndSample

output_divided_path = "/path/to/output/files"
suffix = "_chr"

Convert_list_of_PEDMAP_files_to_GEN_SAMPLE_user_Kantale(
		gtoolPath = "/Users/alexandroskanterakis/Tools/gtool/gtool",
		pedInputListOfFiles= [output_divided_path+ "/" + suffix + "_" + str(x) + ".ped" for x in range(1,22)+['X', 'Y']],
		mapInputListOfFiles=[output_divided_path+ "/" + suffix + "_" + str(x) + ".map" for x in range(1,22)+['X', 'Y']],
		sampleOutputListOfFiles=[output_divided_path+ "/" + suffix + "_" + str(x) + ".sample" for x in range(1,22)+['X', 'Y']],
		genOutputListOfFiles=[output_divided_path+ "/" + suffix + "_" + str(x) + ".gen" for x in range(1,22)+['X', 'Y']]
		)


[edit] Parameters

The path of the gtool:
List of ped filenames comma separated:
List of map filenames comma separated:
List of sample output filenames comma separated:
List of gen output filenames comma separated:

<inputs>
<param name="gtoolPath" type="data" value="" label="The path of the gtool: "/>
<param name="pedInputListOfFiles" type="data" value="" label="List of ped filenames comma separated: "/>
<param name="mapInputListOfFiles" type="data" value="" label="List of map filenames comma separated: "/>
<param name="sampleOutputListOfFiles" type="data" value="" label="List of sample output filenames comma separated: "/>
<param name="genOutputListOfFiles" type="data" value="" label="List of gen output filenames comma separated: "/>
</inputs>


[edit] Return

None

[edit] See also

Convert_PEDMAP_to_GEN_SAMPLE_user_Kantale

[edit] Code

def Convert_list_of_PEDMAP_files_to_GEN_SAMPLE_user_Kantale(gtoolPath=None,
	pedInputListOfFiles=None,
	mapInputListOfFiles=None,
	sampleOutputListOfFiles=None,
	genOutputListOfFiles=None):

	pedInputListOfFiles = From_WPL_parameters_to_list_of_strings_user_Kantale(pedInputListOfFiles)
	mapInputListOfFiles = From_WPL_parameters_to_list_of_strings_user_Kantale(mapInputListOfFiles)
	sampleOutputListOfFiles = From_WPL_parameters_to_list_of_strings_user_Kantale(sampleOutputListOfFiles)
	genOutputListOfFiles = From_WPL_parameters_to_list_of_strings_user_Kantale(genOutputListOfFiles)

	pList = pedInputListOfFiles
	mList = mapInputListOfFiles
	sList = sampleOutputListOfFiles
	gList = genOutputListOfFiles
	if not All_equal_user_Kantale([len(pList), len(mList), len(sList), len(gList)]):
		raise Exception("Number of Values in the lists are not equal")
	allLists = zip(pList, mList, sList, gList)
	for p,m,s,g in allLists:
		Convert_PEDMAP_to_GEN_SAMPLE_user_Kantale(gtoolPath, p, m, s, g)

[edit] Unit Tests

def uni1():
   return True

[edit] Development Code

def Convert_list_of_PEDMAP_files_to_GEN_SAMPLE_user_Kantale():
	pass

[edit] Permissions

[edit] Documentation Permissions

Kantale

[edit] Code Permissions

Kantale

[edit] Unit Tests Permissions

Kantale

[edit] Permissions Permissions

Kantale

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox