Propose a new subpackage proteinshake.transforms. Subclasses of this package take a protein dict as input, apply some processing and return a new protein dictionary. This follows the template of pytorch transforms classes.
We currently have two transforms:
proteinshake.transforms.IdentityTransform which maps a protein dictionary to itself.
proteinshake.transforms.SurfaceTransform which maps a protein dictionary to a protein dict with a reduced set of atoms such that remaining atoms are on the surface of the protein. This is computed using the software DMS.
Tranform objects are passed to the representation conversion methods to_point(), to_graph(), to_voxel().
Test it out:
from proteinshake.datasets import TMAlignDataset
from proteinshake.transforms import SurfaceTransform
import tempfile
with tempfile.TemporaryDirectory() as tf:
da = TMAlignDataset(root=tf)
da_surf = da.to_point(
resolution='atom',
transform=SurfaceTransform()
).torch()
Propose a new subpackage
proteinshake.transforms
. Subclasses of this package take a protein dict as input, apply some processing and return a new protein dictionary. This follows the template of pytorch transforms classes.We currently have two transforms:
proteinshake.transforms.IdentityTransform
which maps a protein dictionary to itself.proteinshake.transforms.SurfaceTransform
which maps a protein dictionary to a protein dict with a reduced set of atoms such that remaining atoms are on the surface of the protein. This is computed using the software DMS.Tranform objects are passed to the representation conversion methods
to_point(), to_graph(), to_voxel()
.Test it out:
TODO: implement a compose() transform