How to use biopython - 7 common examples

To help you get started, we’ve selected a few biopython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)
github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)
github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)
github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)
github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)
github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)
github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def __init__(self, methodName="runTest"):
        super().__init__(methodName)
        self.files = rcsb.fetch(pdb_ids, "cif", data_dir)

biopython

Freely available tools for computational molecular biology.

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

94 / 100
Full package analysis

Similar packages