pyGenClean.SampleMissingness package

For more information about how to use this module, refer to the Sample Missingness Module.

Module contents

Submodules

pyGenClean.SampleMissingness.sample_missingness module

exception pyGenClean.SampleMissingness.sample_missingness.ProgramError(msg)[source]

Bases: exceptions.Exception

An Exception raised in case of a problem.

Parameters:msg (str) – the message to print to the user before exiting.
pyGenClean.SampleMissingness.sample_missingness.checkArgs(args)[source]

Checks the arguments and options.

Parameters:args (argparse.Namespace) – a object containing the options of the program.
Returns:True if everything was OK.

If there is a problem with an option, an exception is raised using the ProgramError class, a message is printed to the sys.stderr and the program exists with code 1.

pyGenClean.SampleMissingness.sample_missingness.main(argString=None)[source]

The main function of the module.

Parameters:argString (list) – the options.

These are the steps:

  1. Prints the options.
  2. Runs Plink with the mind option (runPlink()).
pyGenClean.SampleMissingness.sample_missingness.parseArgs(argString=None)[source]

Parses the command line options and arguments.

Parameters:argString (list) – the options.
Returns:A argparse.Namespace object created by the argparse module. It contains the values of the different options.
Options Type Description
--ifile string The input file prefix (either a Plink binary file or a tfile).
--is-bfile bool The input file (--ifile) is a bfile instead of a tfile.
--mind float The missingness threshold.
--out string The prefix of the output files.

Note

No option check is done here (except for the one automatically done by argparse). Those need to be done elsewhere (see checkArgs()).

Run Plink with the mind option.

Parameters:options (argparse.Namespace) – the options.
pyGenClean.SampleMissingness.sample_missingness.safe_main()[source]

A safe version of the main function (that catches ProgramError).