toil.test.wdl.toilwdlTest
¶
Module Contents¶
Classes¶
Base test class for WDL tests |
|
General tests for Toil WDL |
|
Test class for WDL standard functions. |
|
Test class for WDL tests that need extra workflows and data downloaded |
Functions¶
|
Takes two directories and compares all of the files between those two |
|
Asserts that two .vcf files contain the same variant findings. |
- class toil.test.wdl.toilwdlTest.BaseToilWdlTest(methodName='runTest')[source]¶
Bases:
digraph inheritance45bfce28bb { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaseToilWdlTest" [URL="#toil.test.wdl.toilwdlTest.BaseToilWdlTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base test class for WDL tests"]; "ToilTest" -> "BaseToilWdlTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TestCase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class whose instances are single test cases."]; "ToilTest" [URL="../../index.html#toil.test.ToilTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A common base class for Toil tests."]; "TestCase" -> "ToilTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; }toil.test.ToilTest
Base test class for WDL tests
- class toil.test.wdl.toilwdlTest.ToilWdlTest(methodName='runTest')[source]¶
Bases:
digraph inheritance8230a42fd9 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaseToilWdlTest" [URL="#toil.test.wdl.toilwdlTest.BaseToilWdlTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base test class for WDL tests"]; "ToilTest" -> "BaseToilWdlTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TestCase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class whose instances are single test cases."]; "ToilTest" [URL="../../index.html#toil.test.ToilTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A common base class for Toil tests."]; "TestCase" -> "ToilTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ToilWdlTest" [URL="#toil.test.wdl.toilwdlTest.ToilWdlTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="General tests for Toil WDL"]; "BaseToilWdlTest" -> "ToilWdlTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; }BaseToilWdlTest
General tests for Toil WDL
- class toil.test.wdl.toilwdlTest.ToilWDLLibraryTest(methodName='runTest')[source]¶
Bases:
digraph inheritanced3e3984f23 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaseToilWdlTest" [URL="#toil.test.wdl.toilwdlTest.BaseToilWdlTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base test class for WDL tests"]; "ToilTest" -> "BaseToilWdlTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TestCase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class whose instances are single test cases."]; "ToilTest" [URL="../../index.html#toil.test.ToilTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A common base class for Toil tests."]; "TestCase" -> "ToilTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ToilWDLLibraryTest" [URL="#toil.test.wdl.toilwdlTest.ToilWDLLibraryTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Test class for WDL standard functions."]; "BaseToilWdlTest" -> "ToilWDLLibraryTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; }BaseToilWdlTest
Test class for WDL standard functions.
- testFn_SelectFirst()[source]¶
Test the wdl built-in functional equivalent of ‘select_first()’, which returns the first value in a list that is not None.
- testFn_Size()[source]¶
Test the wdl built-in functional equivalent of ‘size()’, which returns a file’s size based on the path.
- Return type
None
- testFn_Glob()[source]¶
Test the wdl built-in functional equivalent of ‘glob()’, which finds all files with a pattern in a directory.
- testFn_ParseMemory()[source]¶
Test the wdl built-in functional equivalent of ‘parse_memory()’, which parses a specified memory input to an int output.
The input can be a string or an int or a float and may include units such as ‘Gb’ or ‘mib’ as a separate argument.
- testFn_ParseCores()[source]¶
Test the wdl built-in functional equivalent of ‘parse_cores()’, which parses a specified disk input to an int output.
The input can be a string or an int.
- testFn_ParseDisk()[source]¶
Test the wdl built-in functional equivalent of ‘parse_disk()’, which parses a specified disk input to an int output.
The input can be a string or an int or a float and may include units such as ‘Gb’ or ‘mib’ as a separate argument.
The minimum returned value is 2147483648 bytes.
- class toil.test.wdl.toilwdlTest.ToilWdlIntegrationTest(methodName='runTest')[source]¶
Bases:
digraph inheritancebafb15e1b9 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaseToilWdlTest" [URL="#toil.test.wdl.toilwdlTest.BaseToilWdlTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base test class for WDL tests"]; "ToilTest" -> "BaseToilWdlTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TestCase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class whose instances are single test cases."]; "ToilTest" [URL="../../index.html#toil.test.ToilTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A common base class for Toil tests."]; "TestCase" -> "ToilTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ToilWdlIntegrationTest" [URL="#toil.test.wdl.toilwdlTest.ToilWdlIntegrationTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Test class for WDL tests that need extra workflows and data downloaded"]; "BaseToilWdlTest" -> "ToilWdlIntegrationTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; }BaseToilWdlTest
Test class for WDL tests that need extra workflows and data downloaded
- testTut01()[source]¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #1.
- testTut02()[source]¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #2.
- testTut03()[source]¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #3.
- testTut04()[source]¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #4.
- testENCODE()[source]¶
Test if toilwdl produces the same outputs as known good outputs for a short ENCODE run.
- toil.test.wdl.toilwdlTest.compare_runs(output_dir, ref_dir)[source]¶
Takes two directories and compares all of the files between those two directories, asserting that they match.
Ignores outputs.txt, which contains a list of the outputs in the folder.
Compares line by line, unless the file is a .vcf file.
Ignores potentially date-stamped comments (lines starting with ‘#’).
Ignores quality scores in .vcf files and only checks that they found the same variants. This is due to assumed small observed rounding differences between systems.
- Parameters
ref_dir – The first directory to compare (with output_dir).
output_dir – The second directory to compare (with ref_dir).
- toil.test.wdl.toilwdlTest.compare_vcf_files(filepath1, filepath2)[source]¶
Asserts that two .vcf files contain the same variant findings.
Ignores potentially date-stamped comments (lines starting with ‘#’).
Ignores quality scores in .vcf files and only checks that they found the same variants. This is due to assumed small observed rounding differences between systems.
VCF File Column Contents: 1: #CHROM 2: POS 3: ID 4: REF 5: ALT 6: QUAL 7: FILTER 8: INFO
- Parameters
filepath1 – First .vcf file to compare.
filepath2 – Second .vcf file to compare.