6fb70d8a08c5b0278b02d5c82a2ad761a18063f7,anvio/structureops.py,PDBDatabase,export_pdb,#PDBDatabase#Any#Any#,1635

Before Change



    def export_pdb(self, pdb_id, output_path):
        x = self.db.get_some_rows_from_table("structures", "representative_id = "%s"" % pdb_id)
        import pdb; pdb.set_trace()


    def size_of_database(self):
        return utils.human_readable_file_size(os.path.getsize(self.db_path))

After Change


            output_path = filesnpaths.get_temp_file_path()

        as_bytes = self.db.get_some_rows_from_table_as_dict("structures", "representative_id = "%s"" % pdb_id)[pdb_id]["pdb_content"]
        with open(output_path, "wb") as f:
            f.write(as_bytes)

        return output_path


    def size_of_database(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: merenlab/anvio
Commit Name: 6fb70d8a08c5b0278b02d5c82a2ad761a18063f7
Time: 2020-03-25
Author: kiefl.evan@gmail.com
File Name: anvio/structureops.py
Class Name: PDBDatabase
Method Name: export_pdb


Project Name: studioml/studio
Commit Name: 81633e02b2c07bd6080e5639c04e4f73eb7d1cce
Time: 2017-09-10
Author: peter.zhokhov@sentient.ai
File Name: util/completion_service.py
Class Name: CompletionService
Method Name: submitTask


Project Name: azavea/raster-vision
Commit Name: afeec8a22c2936dd9b2a94eec64cd89442fe9598
Time: 2019-01-03
Author: jmcclain@azavea.com
File Name: rastervision/data/label_store/semantic_segmentation_raster_store.py
Class Name: SemanticSegmentationRasterStore
Method Name: save