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:
toil.test.ToilTest
Base test class for WDL tests
- class toil.test.wdl.toilwdlTest.ToilWdlTest(methodName='runTest')[source]¶
Bases:
BaseToilWdlTest
General tests for Toil WDL
- class toil.test.wdl.toilwdlTest.ToilWDLLibraryTest(methodName='runTest')[source]¶
Bases:
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:
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.