samplot-ml icon indicating copy to clipboard operation
samplot-ml copied to clipboard

Support for Google Cloud Storage?

Open pbilling opened this issue 2 years ago • 2 comments

I was made aware that you can run Samplot-ML on Google Cloud Platform (https://docs.google.com/document/d/1EfrNv6Y5aGDbQ3Je5jBI83owdOveVbmqIP6fuCDmEEw), but from the workflows/conf/samplot-ml-predict.yaml config file it looks like only local and S3 storage are supported. Is Google Cloud Storage supported as well?

pbilling avatar Jul 29 '22 00:07 pbilling

Hi pbilling! Out of the box it does not, but it would not be to difficult to implement.

  • In samplot-ml/workflows/config_utils.py, I have a abstract class Data from which I derived the S3Data and LocalData types.

  • To implement support GCP, you could write another class (say GCPData...) and implement the get_cmd method. The goal of this method is to return the command that will be run by the snakemake rule that gets the alignment file data. For example the S3Data type returns a string containing a call to the aws-cli.

  • In addition to implementing this class, we also add a elif clause in the data_factory function in config_utils.py.

I don't use google cloud myself, so I wouldn't know the exact commands to use myself, but I am open to accepting a pull request for an implementation

mchowdh200 avatar Jul 29 '22 19:07 mchowdh200

Great, thanks @mchowdh200! Looks simple enough, I'll see about adding GCP support.

Best, Paul

pbilling avatar Jul 29 '22 22:07 pbilling