Here’s a detailed documentation of the target file test/preprocess_tests/collapse_umi_test.py
:
This file contains unit tests for the UMI Collapsing module in the Cassiopeia preprocessing pipeline. It tests various aspects of UMI collapsing, including sorting BAM files, forming collapsed clusters, and converting BAM files to DataFrames.
The main class TestCollapseUMIs
inherits from unittest.TestCase
and contains several test methods. The setUp
method prepares the test environment by creating test files and running UMI collapsing operations. The test methods then verify the correctness of these operations.
A test class that contains unit tests for the UMI Collapsing functionality.
setUp
.Prepares the test environment by creating test files and running UMI collapsing operations.
Tests the sorting of BAM files.
Tests the sorting of uncorrected BAM files.
Similar to test_sort_bam
, but uses uncorrected test files.
Tests the collapsing of BAM files.
Tests the Bayesian collapsing of BAM files.
Similar to test_collapse_bam
, but uses Bayesian collapsed files.
Tests the collapsing of uncorrected BAM files.
Similar to test_collapse_bam
, but uses uncorrected collapsed files.
Tests the conversion of BAM files to DataFrames.
Tests that the collapsing process correctly passes header information.
Dependency | Purpose |
---|---|
os | File and directory operations |
unittest | Unit testing framework |
pandas | Data manipulation and analysis |
pathlib | Object-oriented filesystem paths |
pysam | Reading/writing SAM/BAM/VCF/BCF files |
cassiopeia.preprocess | UMI collapsing functionality |
The tests use assertions to verify the correctness of operations. If any assertion fails, an AssertionError
will be raised, indicating a test failure.
This file is crucial for ensuring the correctness of the UMI collapsing functionality in the Cassiopeia preprocessing pipeline. It covers various scenarios and edge cases, helping to maintain the reliability of the UMI collapsing process.
Here’s a detailed documentation of the target file test/preprocess_tests/collapse_umi_test.py
:
This file contains unit tests for the UMI Collapsing module in the Cassiopeia preprocessing pipeline. It tests various aspects of UMI collapsing, including sorting BAM files, forming collapsed clusters, and converting BAM files to DataFrames.
The main class TestCollapseUMIs
inherits from unittest.TestCase
and contains several test methods. The setUp
method prepares the test environment by creating test files and running UMI collapsing operations. The test methods then verify the correctness of these operations.
A test class that contains unit tests for the UMI Collapsing functionality.
setUp
.Prepares the test environment by creating test files and running UMI collapsing operations.
Tests the sorting of BAM files.
Tests the sorting of uncorrected BAM files.
Similar to test_sort_bam
, but uses uncorrected test files.
Tests the collapsing of BAM files.
Tests the Bayesian collapsing of BAM files.
Similar to test_collapse_bam
, but uses Bayesian collapsed files.
Tests the collapsing of uncorrected BAM files.
Similar to test_collapse_bam
, but uses uncorrected collapsed files.
Tests the conversion of BAM files to DataFrames.
Tests that the collapsing process correctly passes header information.
Dependency | Purpose |
---|---|
os | File and directory operations |
unittest | Unit testing framework |
pandas | Data manipulation and analysis |
pathlib | Object-oriented filesystem paths |
pysam | Reading/writing SAM/BAM/VCF/BCF files |
cassiopeia.preprocess | UMI collapsing functionality |
The tests use assertions to verify the correctness of operations. If any assertion fails, an AssertionError
will be raised, indicating a test failure.
This file is crucial for ensuring the correctness of the UMI collapsing functionality in the Cassiopeia preprocessing pipeline. It covers various scenarios and edge cases, helping to maintain the reliability of the UMI collapsing process.