jump_target2 takes plates=, a list of barcodes, with TARGET2_DEFAULT (ds/_datasets.py:36) holding eleven of them to mean "one plate from each source". The intent is not expressible by a caller: anyone who wants a different slice of the same idea, say two sources, or three plates from one source, has to name barcodes.
docs/tutorials/10_differential_features.ipynb shows the shape of the problem. It wants two sources and writes:
("jump_target2", lambda: mt.ds.jump_target2(plates=["BR00121438", "JCPQC051"])),
with a comment explaining the intent, because the API has no way to say it.
The source is available without new data: every file's s3_key is cpg0016-jump/source_N/workspace/..., and _plate(file.name) at ds/_datasets.py:68 already parses the file names for the batch. A _source(file) helper beside it, plus a sources= or n_per_source= argument, would express the default rather than freeze it.
Two arguments against doing it, which is why #79 kept the tuple and why this is an issue rather than a patch:
- Deriving the default makes a public default depend on registry row order and on the S3 path shape. A reordered registry would silently change which plates
mt.ds.jump_target2() returns.
- The pinned tuple is greppable and diffable; a derived default is not.
A middle option is to keep the literal as the default and add sources= purely as a filter over it and over plates=None.
jump_target2takesplates=, a list of barcodes, withTARGET2_DEFAULT(ds/_datasets.py:36) holding eleven of them to mean "one plate from each source". The intent is not expressible by a caller: anyone who wants a different slice of the same idea, say two sources, or three plates from one source, has to name barcodes.docs/tutorials/10_differential_features.ipynbshows the shape of the problem. It wants two sources and writes:with a comment explaining the intent, because the API has no way to say it.
The source is available without new data: every file's
s3_keyiscpg0016-jump/source_N/workspace/..., and_plate(file.name)atds/_datasets.py:68already parses the file names for the batch. A_source(file)helper beside it, plus asources=orn_per_source=argument, would express the default rather than freeze it.Two arguments against doing it, which is why #79 kept the tuple and why this is an issue rather than a patch:
mt.ds.jump_target2()returns.A middle option is to keep the literal as the default and add
sources=purely as a filter over it and overplates=None.