Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_to_picard_basecalling_params_output_files fails on MacOS #116

Open
dsommer opened this issue Apr 5, 2022 · 0 comments
Open

test_to_picard_basecalling_params_output_files fails on MacOS #116

dsommer opened this issue Apr 5, 2022 · 0 comments

Comments

@dsommer
Copy link
Contributor

dsommer commented Apr 5, 2022

Running the test suite on the master branch fails on MacOS.
I am running MacOS Monterey 12.2.1 on a INTEL mac with python 3.7.

pytest Error:

E           AssertionError: 'BARC[68 chars]TC\t/System/Volumes/Data/home/user/49-tissue.e[278 chars]\t\n' != 'BARC[68 chars]TC\t/home/user/49-tissue.exp001/49-tissue.GAAC[218 chars]\t\n'
E           Diff is 748 characters long. Set self.maxDiff to None to see it.

Full Error:

>tox
...cut
________________________________________ TestSampleSheet.test_to_picard_basecalling_params_output_files _________________________________________

self = <test_sample_sheet.TestSampleSheet testMethod=test_to_picard_basecalling_params_output_files>

    def test_to_picard_basecalling_params_output_files(self):
        """Test ``to_picard_basecalling_params()`` output files"""
        bam_prefix = '/home/user'
        lanes = [1, 2]
        with TemporaryDirectory() as temp_dir:
            sample1 = Sample(
                {
                    'Sample_ID': 49,
                    'Sample_Name': '49-tissue',
                    'Library_ID': 'exp001',
                    'Description': 'Lorum ipsum!',
                    'index': 'GAACT',
                    'index2': 'AGTTC',
                }
            )
            sample2 = Sample(
                {
                    'Sample_ID': 23,
                    'Sample_Name': '23-tissue',
                    'Library_ID': 'exp001',
                    'Description': 'Test description!',
                    'index': 'TGGGT',
                    'index2': 'ACCCA',
                }
            )

            sample_sheet = SampleSheet()
            sample_sheet.add_sample(sample1)
            sample_sheet.add_sample(sample2)
            sample_sheet.to_picard_basecalling_params(
                directory=temp_dir, bam_prefix=bam_prefix, lanes=lanes
            )

            prefix = Path(temp_dir)
            assert_true((prefix / 'barcode_params.1.txt').exists())
            assert_true((prefix / 'barcode_params.2.txt').exists())
            assert_true((prefix / 'library_params.1.txt').exists())
            assert_true((prefix / 'library_params.2.txt').exists())

            barcode_params = (
                'barcode_sequence_1\tbarcode_sequence_2\tbarcode_name\tlibrary_name\n'  # noqa
                'GAACT\tAGTTC\tGAACTAGTTC\texp001\n'  # noqa
                'TGGGT\tACCCA\tTGGGTACCCA\texp001\n'
            )  # noqa

            library_params = (
                'BARCODE_1\tBARCODE_2\tOUTPUT\tSAMPLE_ALIAS\tLIBRARY_NAME\tDS\n'  # noqa
                'GAACT\tAGTTC\t/home/user/49-tissue.exp001/49-tissue.GAACTAGTTC.{lane}.bam\t49-tissue\texp001\tLorum ipsum!\n'  # noqa
                'TGGGT\tACCCA\t/home/user/23-tissue.exp001/23-tissue.TGGGTACCCA.{lane}.bam\t23-tissue\texp001\tTest description!\n'  # noqa
                'N\tN\t/home/user/unmatched.{lane}.bam\tunmatched\tunmatchedunmatched\t\n'
            )  # noqa

            self.assertMultiLineEqual(
                (prefix / 'barcode_params.1.txt').read_text(), barcode_params
            )
            self.assertMultiLineEqual(
                (prefix / 'barcode_params.2.txt').read_text(), barcode_params
            )
            self.assertMultiLineEqual(
                (prefix / 'library_params.1.txt').read_text(),
>               library_params.format(lane=1),
            )
E           AssertionError: 'BARC[68 chars]TC\t/System/Volumes/Data/home/user/49-tissue.e[278 chars]\t\n' != 'BARC[68 chars]TC\t/home/user/49-tissue.exp001/49-tissue.GAAC[218 chars]\t\n'
E           Diff is 748 characters long. Set self.maxDiff to None to see it.

tests/test_sample_sheet.py:535: AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant