refgenie / refgenconf

A Python object for standardized reference genome assets.
http://refgenie.databio.org
BSD 2-Clause "Simplified" License
3 stars 6 forks source link

add 'tag' to pull_asset #54

Closed nsheff closed 5 years ago

nsheff commented 5 years ago

new signature for pull_asset will be:

        rgc.pull_asset(genome, asset, tag, gencfg, ...)
stolarczyk commented 5 years ago

one issue here:

rgc.pull_asset() allows for fetching multiple assets for a single genome when fed with collection of asset names. This gets ambiguous with introduction of tags.

  1. Do we allow only one tag to be provided and download each of the assets from the collection tagged with it? (I don't like that)
  2. Do we prohibit pull_assets from getting collection of asset names and have one one-to-one asset-tag mapping
  3. Do we allow for collection of asset and collection of tags if they are the same length and have multiple one-to-one asset-tag mappings

I can see that we're iterating over assets here so it'd make sense to go with number 2

stolarczyk commented 5 years ago

went with no. 2 for now

nsheff commented 5 years ago

yeah. The pull asset function should just take 1 at a time, and the user has to iterate. in this case, the CLI is the user, so the iteration can happen there. Sounds good.

If you want to, you could pull that logic out into a pull_assets() function that just loops calling pull_asset -- but the server will just respond to 1 at a time.