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')¶
Bases:
toil.test.ToilTest
Base test class for WDL tests
- setUp()¶
Runs anew before each test to create farm fresh temp dirs.
- Return type
None
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- Return type
None
- classmethod setUpClass()¶
Runs once for all tests.
- Return type
None
- class toil.test.wdl.toilwdlTest.ToilWdlTest(methodName='runTest')¶
Bases:
BaseToilWdlTest
General tests for Toil WDL
- testMD5sum()¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #1.
- class toil.test.wdl.toilwdlTest.ToilWDLLibraryTest(methodName='runTest')¶
Bases:
BaseToilWdlTest
Test class for WDL standard functions.
- testFn_SelectFirst()¶
Test the wdl built-in functional equivalent of ‘select_first()’, which returns the first value in a list that is not None.
- testFn_Size()¶
Test the wdl built-in functional equivalent of ‘size()’, which returns a file’s size based on the path.
- Return type
None
- testFn_Basename()¶
- testFn_Glob()¶
Test the wdl built-in functional equivalent of ‘glob()’, which finds all files with a pattern in a directory.
- testFn_ParseMemory()¶
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()¶
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()¶
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.
- testPrimitives()¶
Test if toilwdl correctly interprets some basic declarations.
- testCSV()¶
- testTSV()¶
- class toil.test.wdl.toilwdlTest.ToilWdlIntegrationTest(methodName='runTest')¶
Bases:
BaseToilWdlTest
Test class for WDL tests that need extra workflows and data downloaded
- classmethod setUpClass()¶
Runs once for all tests.
- Return type
None
- classmethod tearDownClass()¶
We generate a lot of cruft.
- Return type
None
- testTut01()¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #1.
- testTut02()¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #2.
- testTut03()¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #3.
- testTut04()¶
Test if toilwdl produces the same outputs as known good outputs for WDL’s GATK tutorial #4.
- testENCODE()¶
Test if toilwdl produces the same outputs as known good outputs for a short ENCODE run.
- testPipe()¶
Test basic bash input functionality with a pipe.
- testJSON()¶
- test_size_large()¶
Test the wdl built-in functional equivalent of ‘size()’, which returns a file’s size based on the path, on a large file.
- Return type
None
- classmethod fetch_and_unzip_from_s3(filename, data, data_dir)¶
- toil.test.wdl.toilwdlTest.compare_runs(output_dir, ref_dir)¶
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)¶
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.