public final class SamAssertionUtils
extends java.lang.Object
Constructor and Description |
---|
SamAssertionUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertCRAMContents(java.nio.file.Path putativeCRAMPath)
Unconditionally validate/assert that the contents are CRAM
|
static void |
assertCRAMContentsIfCRAM(java.io.File putativeCRAMFile)
Validate/assert that the contents are CRAM if the extension is .cram
|
static void |
assertCRAMContentsIfCRAM(java.nio.file.Path putativeCRAMPath)
Validate/assert that the contents are CRAM if the extension is .cram
|
static void |
assertEqualBamFiles(java.io.File resultFile,
java.io.File expectedFile,
boolean compareBamFilesSorted,
htsjdk.samtools.ValidationStringency stringency)
Compares the two given bam files, optionally sorting them before comparison.
|
static void |
assertEqualBamFiles(java.io.File resultFile,
java.io.File expectedFile,
java.io.File reference,
boolean compareBamFilesSorted,
htsjdk.samtools.ValidationStringency stringency)
Compares the two given bam files, optionally sorting them before comparison.
|
static void |
assertSamsEqual(java.io.File actualSam,
java.io.File expectedSam)
causes an exception if the given sam files aren't equal
|
static void |
assertSamsEqual(java.io.File actualSam,
java.io.File expectedSam,
java.io.File reference)
causes an exception if the given sam files aren't equal
|
static void |
assertSamsEqual(java.io.File actualSam,
java.io.File expectedSam,
htsjdk.samtools.ValidationStringency validationStringency)
causes an exception if the given sam files aren't equal
|
static void |
assertSamsEqual(java.io.File actualSam,
java.io.File expectedSam,
htsjdk.samtools.ValidationStringency validationStringency,
java.io.File reference)
causes an exception if the given sam files aren't equal
|
static void |
assertSamsEqual(java.nio.file.Path actualSam,
java.nio.file.Path expectedSam,
java.nio.file.Path reference) |
static void |
assertSamsEqual(java.nio.file.Path actualSam,
java.nio.file.Path expectedSam,
htsjdk.samtools.ValidationStringency validationStringency,
java.nio.file.Path reference) |
static void |
assertSamValid(java.io.File sam)
causes an exception if the given sam isn't valid
the default ValidationStringency value for this method is LENIENT
|
static void |
assertSamValid(java.io.File sam,
java.io.File reference)
causes an exception if the given sam isn't valid
|
static void |
assertSamValid(java.io.File sam,
htsjdk.samtools.ValidationStringency validationStringency)
causes an exception if the given sam isn't valid
|
static void |
assertSamValid(java.io.File sam,
htsjdk.samtools.ValidationStringency validationStringency,
java.io.File reference)
causes an exception if the given sam isn't valid
|
static java.lang.String |
samsEqualLenient(java.io.File actualSam,
java.io.File expectedSam,
htsjdk.samtools.ValidationStringency validation,
java.io.File reference)
Compares SAM/BAM files in a stringent way but not by byte identity (allow reorder of attributes).
|
static java.lang.String |
samsEqualStringent(java.io.File actualSam,
java.io.File expectedSam,
htsjdk.samtools.ValidationStringency validation,
java.io.File reference)
Compares SAM/BAM files in a stringent way but not by byte identity (allow reorder of attributes)
Comparing by MD5s is too strict and comparing by SamComparison is too lenient.
|
static java.lang.String |
samsEqualStringent(java.nio.file.Path actualSam,
java.nio.file.Path expectedSam,
htsjdk.samtools.ValidationStringency validation,
java.nio.file.Path reference)
Compares SAM/BAM files in a stringent way but not by byte identity (allow reorder of attributes)
Comparing by MD5s is too strict and comparing by SamComparison is too lenient.
|
public static void assertSamsEqual(java.io.File actualSam, java.io.File expectedSam, htsjdk.samtools.ValidationStringency validationStringency, java.io.File reference) throws java.io.IOException
actualSam
- the actual fileexpectedSam
- the expected filevalidationStringency
- how stringently do we validate the filesreference
- is allowed to be nulljava.io.IOException
public static void assertSamsEqual(java.nio.file.Path actualSam, java.nio.file.Path expectedSam, htsjdk.samtools.ValidationStringency validationStringency, java.nio.file.Path reference) throws java.io.IOException
java.io.IOException
public static void assertSamsEqual(java.io.File actualSam, java.io.File expectedSam, htsjdk.samtools.ValidationStringency validationStringency) throws java.io.IOException
actualSam
- the actual fileexpectedSam
- the expected filevalidationStringency
- how stringently do we validate the filesjava.io.IOException
public static void assertSamsEqual(java.io.File actualSam, java.io.File expectedSam, java.io.File reference) throws java.io.IOException
actualSam
- the actual fileexpectedSam
- the expected filereference
- is allowed to be nulljava.io.IOException
public static void assertSamsEqual(java.nio.file.Path actualSam, java.nio.file.Path expectedSam, java.nio.file.Path reference) throws java.io.IOException
java.io.IOException
public static void assertSamsEqual(java.io.File actualSam, java.io.File expectedSam) throws java.io.IOException
actualSam
- the actual fileexpectedSam
- the expected filejava.io.IOException
public static void assertSamValid(java.io.File sam, htsjdk.samtools.ValidationStringency validationStringency, java.io.File reference) throws java.io.IOException
reference
- is allowed to be nulljava.io.IOException
public static void assertSamValid(java.io.File sam, htsjdk.samtools.ValidationStringency validationStringency) throws java.io.IOException
java.io.IOException
public static void assertSamValid(java.io.File sam, java.io.File reference) throws java.io.IOException
reference
- is allowed to be null
the default ValidationStringency value for this method is LENIENTjava.io.IOException
public static void assertSamValid(java.io.File sam) throws java.io.IOException
java.io.IOException
public static java.lang.String samsEqualLenient(java.io.File actualSam, java.io.File expectedSam, htsjdk.samtools.ValidationStringency validation, java.io.File reference) throws java.io.IOException
SamComparison
. Compares headers, and if headers are compatible enough, compares SAMRecords,
looking only at basic alignment info.java.io.IOException
public static java.lang.String samsEqualStringent(java.io.File actualSam, java.io.File expectedSam, htsjdk.samtools.ValidationStringency validation, java.io.File reference) throws java.io.IOException
java.io.IOException
public static java.lang.String samsEqualStringent(java.nio.file.Path actualSam, java.nio.file.Path expectedSam, htsjdk.samtools.ValidationStringency validation, java.nio.file.Path reference) throws java.io.IOException
java.io.IOException
public static void assertEqualBamFiles(java.io.File resultFile, java.io.File expectedFile, boolean compareBamFilesSorted, htsjdk.samtools.ValidationStringency stringency) throws java.io.IOException
java.io.IOException
public static void assertEqualBamFiles(java.io.File resultFile, java.io.File expectedFile, java.io.File reference, boolean compareBamFilesSorted, htsjdk.samtools.ValidationStringency stringency) throws java.io.IOException
java.io.IOException
public static void assertCRAMContentsIfCRAM(java.io.File putativeCRAMFile)
public static void assertCRAMContentsIfCRAM(java.nio.file.Path putativeCRAMPath)
public static void assertCRAMContents(java.nio.file.Path putativeCRAMPath)