pyGenClean.PlateBias package¶
For more information about how to use this module, refer to the Plate Bias Module.
Module contents¶
Submodules¶
pyGenClean.PlateBias.plate_bias module¶
-
exception
pyGenClean.PlateBias.plate_bias.ProgramError(msg)[source]¶ Bases:
exceptions.ExceptionAn
Exceptionraised in case of a problem.Parameters: msg (str) – the message to print to the user before exiting.
-
pyGenClean.PlateBias.plate_bias.checkArgs(args)[source]¶ Checks the arguments and options.
Parameters: args (argparse.Namespace) – an object containing the options of the program. Returns: Trueif everything was OK.If there is a problem with an option, an exception is raised using the
ProgramErrorclass, a message is printed to thesys.stderrand the program exists with code 1.
-
pyGenClean.PlateBias.plate_bias.computeFrequencyOfSignificantSNPs(options)[source]¶ Computes the frequency of the significant markers.
Parameters: options (argparse.Namespace) – the options. Extract a list of markers (significant after plate bias analysis) and computes their frequencies.
-
pyGenClean.PlateBias.plate_bias.createSummaryFile(results, maf, prefix)[source]¶ Creat the final summary file containing plate bias results.
Parameters:
-
pyGenClean.PlateBias.plate_bias.executePlateBiasAnalysis(options)[source]¶ Execute the plate bias analysis with Plink.
Parameters: options (argparse.Namespace) – the options.
-
pyGenClean.PlateBias.plate_bias.extractSignificantSNPs(prefix)[source]¶ Extract significant SNPs in the fisher file.
Parameters: prefix (str) – the prefix of the input file. Reads a list of significant markers (
prefix.assoc.fisher) after plate bias analysis with Plink. Writes a file (prefix.significant_SNPs.txt) containing those significant markers.
-
pyGenClean.PlateBias.plate_bias.main(argString=None)[source]¶ The main function of this module.
Parameters: argString (list) – the options. These are the steps:
- Runs a plate bias analysis using Plink
(
executePlateBiasAnalysis()). - Extracts the list of significant markers after plate bias analysis
(
extractSignificantSNPs()). - Computes the frequency of all significant markers after plate bias
analysis (
computeFrequencyOfSignificantSNPs()).
- Runs a plate bias analysis using Plink
(
-
pyGenClean.PlateBias.plate_bias.parseArgs(argString=None)[source]¶ Parses the command line options and arguments.
Parameters: argString (list) – the options. Returns: A argparse.Namespaceobject created by theargparsemodule. It contains the values of the different options.Options Type Description --bfilestring The input file prefix (Plink binary). --loop-assocstring The file containing the plate organization of each samples. --pfilterfloat The significance threshold used for the plate effect. --outstring 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()).
-
pyGenClean.PlateBias.plate_bias.runCommand(command)[source]¶ Run a command.
Parameters: command (list) – the command to run. Tries to run a command. If it fails, raise a
ProgramError. This function uses thesubprocessmodule.Warning
The variable
commandshould be a list of strings (no other type).
