Example #1
0
 def test_does_lib_replicate_exist(self):
     """
     Test the function ``does_lib_replicate_exist()`` for correct result when we only care about
     whether the library has any replicates, and not any particular one.
     """
     lib_accession = "ENCLB690UAL"  # has replicate for (1,1).
     res = utils.does_lib_replicate_exist(replicates_json=self.replicates_json,
                                          lib_accession=lib_accession)
     self.assertEqual(res, ["37b3dabc-bbdc-4832-88a5-78c2a8369942"])
Example #2
0
 def test_5_does_lib_replicate_exist(self):
     """
     Test the function ``does_lib_replicate_exist()`` for the empty result when the library
     accession doesn't belong to any of the replicates.
     """
     lib_accession = "ENCLB000000"  # Doesn't exist.
     res = utils.does_lib_replicate_exist(replicates_json=self.replicates_json,
                                          lib_accession=lib_accession)
     self.assertEqual(res, [])
Example #3
0
    def test_3_does_lib_replicate_exist(self):
        """
        Test the function ``does_lib_replicate_exist()`` for the empty result when we restrict
        the replicates search to a `biological_replicate_number` that does not apply.
        """
        lib_accession = "ENCLB690UAL"  # has replicate for (1,1).
        brn = 2
        res = utils.does_lib_replicate_exist(
            replicates_json=self.replicates_json,
            lib_accession=lib_accession,
            biological_replicate_number=brn)

        self.assertEqual(res, [])
Example #4
0
    def test_2_does_lib_replicate_exist(self):
        """
        Test the function ``does_lib_replicate_exist()`` for the correct result when we restrict
        the replicate search to only those with the specific `biological_replicate_number`.
        """
        lib_accession = "ENCLB690UAL"  # has replicate for (1,1).
        brn = 1
        res = utils.does_lib_replicate_exist(
            replicates_json=self.replicates_json,
            lib_accession=lib_accession,
            biological_replicate_number=brn)

        self.assertEqual(res, ["37b3dabc-bbdc-4832-88a5-78c2a8369942"])