Changes¶
What each release adds and changes, newest first. A script that uses anything
listed under New in 0.3.2 needs multibench-sc>=0.3.2.
multibench --version prints the version you have.
New in 0.3.3¶
- Method environments download faster. The environments over 2 GiB now come from the GitHub release in parts, instead of from Zenodo.
mtb.env.installprints its progress while it downloads, one line per tenth. A dropped or stalled connection resumes where it stopped.- cLISI and iLISI now compute on Colab and other Linux hosts with an older glibc. The LISI helper of scib is rebuilt there on first use.
- The method scripts are fetched without git's per-file progress lines.
res.plot()andmtb.plot.bubbleshow their figure in a notebook without%matplotlib inline.- The tutorials install the environments and run the methods, on the demo data and on data written from an AnnData.
New in 0.3.2¶
Commands and flags¶
multibench fetch D46 D11downloads demo datasets.--outputsdownloads their storedrun-alloutputs instead,--scriptsthe method scripts, and--refpicks a commit or tag of the scripts.multibench configlists the paths in use and where each one comes from. Itsscripts_commitrow is the commit of the method scripts. WithMULTIBENCH_SCRIPTS_REFset, ascripts_refrow says whether it matches.--get data_pathprints one value.multibench info METHODprints what one method needs: environment, GPU use, labels, ATAC input, variants and observed runtimes with cell counts.multibench scan --strictexits with1when no requested row is runnable. With--methods, it exits with1when any named method has no runnable row. The error counts the blocked rows by cause: missing files, missing environment, no GPU on this computer, wrong ATAC kind, unreadable peak names and scripts not atMULTIBENCH_SCRIPTS_REF. It also exits with1while the method scripts are not fetched.multibench scan --assume-gpuandmultibench run-all --dry-run --assume-gpucheck a GPU-node job from a login node without a GPU.multibench scan --allow-atac-mismatchandmultibench run-all --allow-atac-mismatchcount a method as runnable when its ATAC file holds the other representation or peak names the method cannot read. The caveat stays.multibench run-all --dry-runruns without--out-dir. Its commands then show<out_dir>.multibench evaluate --leiden-flavorandmultibench run-all --leiden-flavorset the Leiden backend of the scoring.multibench run-all --batch CSVgives one batch id per cell, asmtb.run_all(batch=...)does. With--dry-run, a file of the wrong length exits with1.multibench evaluate --batch-column NAMEandmultibench run-all --batch-column NAMEread the batch from one column of a--batchCSV with several columns, such as a sample sheet. A first column of cell ids still aligns the rows to the cells.multibench evaluate --labels A.csv --labels B.csvstacks several label files in the order given, one batch per file. With--dataset,--categoryand--method, an order that contradicts the method's cell order exits with1.multibench evaluate --dataset D --method M --category Cwithout--labelsreads the label files ofmtb.labels_for.--data-pathsets their folder.multibench evaluate --name NAMEsets the row name of the long table, such asSCALEX_rerun. With--labels,--methodcan be left out. A--methodgiven with--namemust be a package method. It sets the label order, and aneeds_labelscolumn gives the rows theLbadge ofplot bubblewhen the method uses labels.multibench convert --overwritereplaces files already in the folder.multibench convert --batch-index Nwrites one file as batchNof a mosaic or cross dataset.multibench convert --atac-from atac.h5ad --category diagonalreads the ATAC cells from a second file.multibench plot bubble --na warn|skip|raisesets what happens to metrics a method lacks.multibench run --runner "srun --gres=gpu:1 {env_cmd}":{env_cmd}is the command inside the method environment.mtb.run(cmd_template=...)takes it too.
Python arguments and settings¶
mtb.io.export_dataset(..., overwrite=True)replaces files already in the folder.mtb.io.export_dataset(..., batch_index=N)writes the whole object as batchNof a mosaic or cross dataset.mtb.io.export_dataset(rna, folder, atac=atac, atac_kind="peak", category="diagonal")writes RNA and ATAC from different cells.- A selector can end with a feature filter, such as
rna="X[feature_types=Gene Expression]".multibench converttakes it too. mtb.scan(..., assume_gpu=True)andmtb.run_all(..., dry_run=True, assume_gpu=True)skip this computer's GPU test.mtb.scan(..., allow_atac_mismatch=True)andmtb.run_all(..., allow_atac_mismatch=True)do what--allow-atac-mismatchdoes.mtb.labels_for(..., check=True)raises for a vertical or diagonal category on a folder of per-batch files. The default,None, warns.mtb.recommend(..., atac="peak")filters by ATAC representation, asmtb.find_methodsdoes.MULTIBENCH_DATA_PATHandMULTIBENCH_REPO_PATHsetdata_pathandrepo_path.MULTIBENCH_SCRIPTS_REFpicks a commit or tag of the method scripts. When the scripts present are at another commit,scanmarks every row not runnable,run_allraisesValueErrorbefore any method starts, and the dry runs print a note.run_all(dry_run=True)prints the note only withverbose=True, as a[run_all]line on stdout after its count line. The config page lists every variable.data_path,repo_pathandenvs_dirofmtb.config.DEFAULTaccept a string.mtb.load_batch(out_dir, data_path=...)says where the dataset folders of a saved result are. Adata_pathwithout the dataset folder raisesValueError. Without it,load_batchandrescorelook for the dataset folder under the recordeddata_path, then underdata_root.
New fields in results¶
RunResult.obs_namesholds the cell barcodes of the output rows.RunResult.scripts_commit,env_flavorandhostnamerecord the method scripts, the environment build (cpu,gpuorsingle) and the computer. Eachrun_allrecord inBatchResult.recordshas them too. A record of a reused output (skip_existing=True) copies them from the earlier record.BatchResult.summaryandsummary.csvend with acaveatcolumn and areasoncolumn.reasonsays why aSKIPPEDmethod did not run. Each record inBatchResult.recordsandbatch_result.jsonhas acaveatkey. A record saved before 0.3.2 has none, andsummaryshows NaN there.- Each
run_allrecord hasdata_root, the absolute path of the data folder it used.batch_result.jsonholds it too.load_batchandrescorewrite the folder they find intodata_pathanddata_root. run_all(batch=...)andrun-all --batchsave the batch inout_dirasbatch_<hash>.csv. The record keybatch_filenames the file.BatchResult.savewrites it too, also afterrescore(batch=...).BatchResult.rescore()reuses that batch, also withlabels=. It drops the batch, with a warning, when the dataset folder is not found. For an older result it warns once whenmetrics=includes a batch metric: passbatch=again to keep the batch metrics.mtb.method_info(m)["gpu"]isrequired,used when present,not usedorunknown.reference_batchin each entry ofmtb.method_info(m)["supports"]names a fixed reference batch, such as batch 3 for StabMap in cross.- The
datasetscolumn ofmtb.recommendnames the datasets each score comes from. mtb.evaluate(...).attrsholdsleiden_flavor,clustering,multibench_versionandscib_version.- The
scored_withcolumn ofmtb.to_longrecords how the scores were computed, such asleidenalg/sweep/0.3.2.
Behaviour changes in 0.3.2¶
These changes can stop a 0.3.1 script or change its result.
Dataset folders¶
mtb.io.export_datasetandmultibench convertrefuse to replace existing files.FileExistsErrorlists them. Passoverwrite=Trueor--overwrite. A failed call writes nothing.category="mosaic"writes ATAC asatac<i>.h5, where 0.3.1 wroteatac_peak<i>.h5. Folders with the old names still work.category="diagonal"pairs no barcodes, so RNA and ATAC may come from different cells. The labels go torna_cty.csvandatac_cty.csv, notcty.csv.batch=withcategory="vertical"or"diagonal"raisesValueError. 0.3.1 wrote per-batch files that no vertical method reads.- A missing label (NaN, None or
'') raisesValueError. - RNA, ADT or peak values that are not whole numbers give a
UserWarning. The methods expect raw counts. mtb.io.to_canonical(src, folder, modality="gas")into a folder withatac_peak.h5writes the rows in that file's cell order.
File checks¶
- A vertical folder of per-batch files (
rna1.h5,rna2.h5, ...) fails the file check. 0.3.1 readrna1.h5asrna.h5. - Seurat_v5 needs
rna.h5andatac_peak.h5from the same cells. A folder whose two files hold different cells, D28 included, fails its file check, andrun_allskips Seurat_v5 there. mtb.labels_for(..., "Seurat_v5")listsatac_ctybeforerna_cty, Seurat_v5's cell order.mtb.labels_for(dataset, category, method)returns only the label files of the batches the method reads. UINMF on D52 getscty1andcty2, and the caveat ofscanandrun_allsaysUINMF reads batches 1-2 of 3. Batch 3 is not used.- In a diagonal folder,
atac_gas.h5must hold the cells ofatac_peak.h5in the same order. Otherwise the methods that readatac_gas.h5fail the file check. Barcodes that differ only in a trailing-<n>count as the same cell. - UnitedNet reads
cty.csv, where 0.3.1 readrna_cty.csv.inputs_forreturns the keycty. A folder with onlyrna_cty.csvstill works, andlabels_for(..., "vertical", "UnitedNet")returns that file undercty. The input keyrna_ctyofmtb.runandmultibench run --inputstill works, with aDeprecationWarning. modalities=["rna", "atac_peak"]selects the methods that read peaks, and"atac_gas"the methods that read gene activity. In 0.3.1,find_methodsandrecommendreturned every RNA+ATAC method for either token.- In
scanandrun_all,"atac_gas"no longer selects moETM, scMM and iPOLNG, which read peaks, unlessmethods=names them. Pass"atac_peak"for them."atac_peak"also lists MultiMAP and Seurat_v3, which read both ATAC files. - A row whose ATAC file holds the other representation, such as peaks for
Matilda, is not runnable in
scan, andrun_allskips it, also whenmethods=names the method.allow_atac_mismatch=Trueor--allow-atac-mismatchruns it with the caveat, as 0.3.1 did. - GLUE and Seurat_v3 are not runnable in
scanwhen the peak file holds names without chromosome, start and end, such aspeak_1.allow_atac_mismatch=Trueruns them anyway. 0.3.1 checked only GLUE on D28.
Runs¶
run_allinto anout_dirthat holds a saved result of the same dataset and category merges the records. Another dataset or category raisesValueErrorbefore any method runs.BatchResult.savedoes the same.mtb.run(..., dry_run=True)checks the inputs as a real run does. A MuData or.h5muinput raisesValueError. An input file that does not exist gets only a note, such asSCALEX reads data/LUNG/atac_gas.h5, which does not exist.mtb.runandmultibench run, dry run included, apply the cell checks of the file check to the files you pass. Seurat_v5 inputs from different cells, or anatac_gasfile whose cells differ fromatac_peakin set or order, raiseValueErrorbefore anything runs.- GLUE reads a copy of
atac_peak.h5whose peak namesmtb.runrewrites tochr:start-end, as for Seurat_v3. Thecommandcolumn ofscannames that copy, whichmtb.runwrites first. Start GLUE withmtb.run,run_allormultibench run. The printed command alone fails in a job script. mtb.runandmultibench runwarn once when an ATAC input holds the other representation or peak names the method cannot read, and still run. The dry run prints the same text on a line that starts with#.run_allprints the caveat of each row it runs in its log, in the dry run too.- The result lines of
run_allandrescorename the ARI, such asARI 0.629. AFAILorTIMEOUTline ends with the last line of the error that names a cause. - A real
run_alllogsskipping <method>: <reason>for a method it does not start, and records it with statusSKIPPEDand the reason inerror. This covers each named method with no runnable row and each blocked method whose files are present.failureslists it only whenmethods=named it. ASKIPPEDrecord never replaces an earlier run of that method inout_dir. When no requested method can start,run_allraisesValueErrorinstead, andmultibench run-allexits with1. scanandrun_all, dry run included, raiseValueErrorbefore anything runs whenmethods=names a method with no variant in the category or modalities. 0.3.1 dropped that method.multibench run-allexits with1.BatchResult.rescorekeepsFAILandTIMEOUTrecords as they are. 0.3.1 scored them again, and a failed method came back asCHAIN_OK,RUN_OK_EVAL_FAILEDorRUN_OK_NO_EMBEDDING.- A record that
rescorecannot score,RUN_OK_NO_LABEL_MATCHorRUN_OK_EVAL_FAILED, keeps no metrics,batch_sourceorn_batchesfrom an earlier scoring. 0.3.1 kept the batch columns, and the metrics when the output file could not be read. BatchResult.rescore(metrics=...)with no ARI, NMI or iF1 keeps the stored label order and runs no Leiden sweep. 0.3.1 ranked the label orders again.BatchResult.rescore(verbose=True)prints a line before each label-order ranking.BatchResult.rescoreno longer warns about the batch it takes from the label files whenmetrics=has no batch metric, such asrescore(metrics=["ARI", "NMI"])on a result with several label files.run_all(batch=...)takes the ids in the cell order oflabels_for(dataset)and puts them in each method's cell order. 0.3.1 used the vector as given for every method. A Series or one-column DataFrame indexed by barcode is matched by barcode, inBatchResult.rescore(batch=...)too.BatchResult.rescore(labels=...)aligns a Series or one-column DataFrame indexed by barcode, where 0.3.1 matched it by position.label_orderthen names the file order chosen.- A batch or labels CSV whose first column holds cell ids is aligned by that
column. 0.3.1 matched its rows by position. This applies to
run_all,rescoreandrun-all --batch, and toevaluatewhen the output has cell ids, also for several label files and--column. A column with no cell id is matched by position, with aUserWarningwhen it holds text. Numbers, such as R's row numbers, are matched by position unless they are exactly the cell ids. A first column with no header whose numbers restart at 0, aspd.concat(...).to_csv(path)writes, is read as an index. The same numbers out of order raiseValueError. - For
batch=,labels=and these CSVs, ids that are missing, repeated or not cells of the dataset raiseValueError.run_allraises it before any method runs. - The first real run fills an existing empty
repo_pathwith the method scripts, where 0.3.1 refused.multibench fetch --scriptsdoes the same. For arepo_paththat holds other files but no method scripts, runs raiseRuntimeErrorandscanmarks every row not runnable. multibench evaluatealso computes the batch metrics when--batchor several--labelsare given, asmtb.evaluatedoes.--taskis deprecated. Use--metrics.
Scores and figures¶
mtb.evaluateclips ASW, iASW, cLISI, ASW_batch, GC and iLISI to 0-1. A value within 1e-12 of 0 or 1 is recorded as 0 or 1.- Ranks and fills treat values that agree to 9 decimals as ties.
label_order_confidencestays within 0-1, because a runner-up ARI below 0 counts as 0. A value above 1 in an older folder reads 1.0 insummary. The column is numeric, also when every row is blank.mtb.to_longadds thescored_withcolumn. Scores with no record of how they were computed, such as a CSV read back, getunknownand aUserWarning.mtb.plot.bubbledraws a column whose rows all hold one value in grey, and every column of a one-method figure. The footnote and aUserWarningname them. Ranks and Overall are unchanged.- The chip key of
bubblereads? = a name the package does not know. bubblewidens a family pill to fit its header, and a figure of one to three metrics to fit its row labels and key. The height is unchanged.bubble,build_tableandbarwarn about rows from datasets that share no method, a dataset with only one method, and igraph-scored rows next to stored rows of their dataset when ARI, NMI or iF1 is shown.baralso warns about an incomplete method x dataset table, asbubbledoes.mtb.recommendwarns whenmodalitiesoratacnames a modality that none of the ranked datasets measured. Withlong_df=, it also warns when it ranks igraph-scored rows against stored rows of their dataset on ARI, NMI or iF1.mtb.catalog.datasets()no longer has the empty columnsassay,tissue,n_cells,n_batchesandsource.
Command line¶
multibench plot --inputexits with1when--datasetor--methodsremoves all your rows, and warns when it removes some.--format jsonwrites/unescaped.scanandrun-all --dry-runadd theatacandcaveatcolumns to the short table when they apply.run-all --assume-gpuwithout--dry-runis a usage error, exit code2.- The dry runs of
multibench runandrun-allprint# Dry run. Nothing was executed.first.run --dry-runthen prints its notes,# multibench run would execute:and the command. run-allexits with3after saving when a method failed, or a method named in--methodswas skipped. 0.3.1 exited with0. A chain such asrun-all ... && plot ...now stops afterrun-all. A line on stderr names those methods, such as# 1 failed (Seurat_WNN), 1 skipped (totalVI).Other skipped methods go on a# Not run: ...line and do not set3.- The last line of the
No method can runerror repeats the data path, modalities and other scan options of the call.
Changed messages
Many messages, warnings and printed lines were reworded. Apart from the download error under Downloads, the exception and warning types are the same. A script that matches message text may need an update.
- Messages printed by
multibenchname its commands and flags, not Python calls. caveattexts are sentences that start with the method name, such astotalVI needs raw counts. rna.h5 holds non-integer values.Thereasoncolumn ofscanis sentences with their own subjects, such asEnvironment scmb_r runs only on Linux, not on this computer.orscBridge needs atac_gas.h5, and LUNG has no such file.inputs_for(..., check=True)and thefiles_reasoncolumn ofscansay what the method needs and what the folder holds, such asSCALEX (diagonal) needs atac_gas.h5 in <folder>. The folder holds atac_cty.csv, atac_peak.h5, rna.h5 and rna_cty.csv.For MultiMAP and Seurat_v3, the text ends<method> reads both atac_peak.h5 and atac_gas.h5.- An unknown method id gets
Unknown method stabmap. Did you mean StabMap? mtb.list_methods() shows all methods.A category the method does not run on getsSCALEX does not run on vertical data. Its categories: diagonal.multibench evaluateadds the--nameand--labelsflags for your own rows. run_allwith no method to run raisesNo method can run on D11 (vertical).Withmethods=, the message startsNone of the requested methods (Matilda, totalVI) can run on D11 (vertical).On macOS and Windows, the error lists only the rows that something else also blocks.- The reason for scripts not at
MULTIBENCH_SCRIPTS_REFends with the fix, andscan --strictprints it in full:The method scripts are at 0c68f87, not deadbeef (MULTIBENCH_SCRIPTS_REF). Unset MULTIBENCH_SCRIPTS_REF, or set MULTIBENCH_REPO_PATH to a new folder and run multibench fetch --scripts. - A vertical folder whose ATAC file sits under
atac_peak.h5oratac_gas.h5gets a reason that names the fix, such asMIRA reads atac.h5 for vertical. Rename atac_peak.h5 to atac.h5, or write it with category="vertical".When the file holds the other representation, it readsMatilda needs gene-activity ATAC (atac.h5), and the folder has peaks (atac_peak.h5). - The warnings about ATAC feature names give the fix, such as
Only 0% of the ATAC feature names look like peaks such as chr1:100-200. If they are peaks, rename them to chr:start-end.They suggest gene activity only when the RNA names are unknown, as into_canonical, or most ATAC names are RNA gene names. - A Series matched by position gets a warning that says how to check its
order, such as
The labels Series is matched by position, because the embedding has no cell ids. Check that it follows the embedding rows, ...Whenrescorecannot find the dataset folder, the warning names the folders it looked in and gives the fix,Pass data_path= to mtb.load_batch, or run rescore from the folder where run_all ran.ARUN_OK_NO_LABEL_MATCHrecord gets the same fix in itsnote. - Count lines say methods when each method has one row, and rows
otherwise, such as
[scan] 13 of 14 methods have their input files.So does the list header of therun_allerror.mtb.run_all(dry_run=True)starts with[run_all] Dry run:. The commands header ofrun-all --dry-runexplains its tags, such as[env missing] marks a row whose environment is not installed. - Reworded: the messages of
export_dataset,to_canonical,inputs_for,params_forandevaluate. Also the environment messages, file checks, plot and scan warnings, the# Merged withline and thescan,convertandenvhelp. Errors for an unknown modality ormetrics=token, a missing folder or table, or aplot --inputfilter changed too. scanwithmodalities=["rna", "atac_peak"]no longer warns that scBridge is left out. scBridge reads gene activity.- The barcode error for RNA and ATAC with no shared cells points to
category="diagonal". labels='obs:cell_type'on a MuData whose column is only inmdata['rna'].obsgetsuse labels='rna:cell_type'. The.h5murecipes ofmultibench layout mosaicandmultibench convert --helpuse--labels rna:cell_type.- The raw-count hints follow the selector you passed, such as
adt='obsm:protein_counts'. - A method that needs a GPU on a computer without one gets
<method> needs an NVIDIA GPU, and this computer has none. - On macOS and Windows, the refusal of
mtb.runstarts withMethods run only on Linuxand names no install command. That ofmtb.env.installstarts withMethod environments run only on Linux. The summary line ofscansaysMethod environments run only on Linux.and what works on this computer. On Linux, it namesmtb.env.doctor()when an environment is missing. - A count mismatch in
mtb.evaluatenames the argument and both counts, such aslabels has 60 entries for 90 cells in the embedding.multibench evaluatenames the flag and the file. - A per-cell CSV with several columns and none chosen gets the columns
after the cell ids and how to choose one, such as
The --batch file obs_sheet.csv has several columns after the cell ids: celltype, sample. Choose one with --batch-column.A column name that is not in the file gets the same list. - Missing batch labels get
metrics='all' needs batch labels for ASW_batch, GC and iLISI. Pass batch=<vector>, or metrics='clustering'.A batch that no chosen metric uses getsbatch= changes nothing here, because metrics=['ARI', 'NMI'] has no batch metric. ... load_resultswith aresult_paththat does not exist raisesFileNotFoundErrornaming the path.load_results("mosaic")starts withmosaic has no published tables.and namessource='rerun'.multibench plot --category mosaicnames--source rerun.- The warning of
bubbleandbuild_tablefor several datasets readsThis figure averages each method over 3 datasets, D24, D25 and D28. Its rows mix datasets.multibench plot --inputwith--categoryprints# Added your 7 rows (MyMethod) to the stored diagonal table, which has 137 rows (source published). bubbleon your rows and stored rows under one method name saysYour rows and the stored table both have uniPort on D28. Give your rows another name, such as uniPort_rerun, with to_long(method=...).multibench plotnamesevaluate --nameinstead.scanandrun_allname what does not match, such asMatilda does not run on cross data. Its categories: vertical.orThe folder data/MYCITE does not exist. data holds D11, D28 and D52. ...A label file of the wrong length getscty.csv has 15 labels, but rna.h5 has 20 cells. Give each cell one label, in the order of the cells. ...- An unknown method or metric in
bubble,build_table,barandmultibench plotgetsUnknown method Matlida. Did you mean Matilda? The table has A and B. - The warning of
export_datasetfor gene-activity ATAC withcategory="mosaic"starts withEvery mosaic method reads peak ATAC.and names the fix. mtb.catalog.metrics()describes cLISI and iLISI as the median over cells, scaled to 0-1.- The note before the clustering sweep of
evaluatenames the cell count, the metrics and the Leiden backend, and how to skip the sweep. mtb.io.read_canonicalof a missing path namesmtb.config.DEFAULT.data_path.mtb.describe_layout(category)prints only that category. The diagonal layout names each method on one line.- A failed download of the method scripts names the offline route:
copy a fetched scripts folder and set
MULTIBENCH_REPO_PATH. env plan,env installand the install warning call an environment without a CPU build a single build, the same archive for CPU and GPU hosts.env status,env doctorandenv planshow noflavor=for it.
Downloads¶
mtb.data.fetchandfetch_outputsraiseOSError, naming the URL, when a download fails. 0.3.1 raised theurlliberror, now kept as__cause__. Code that catchesURLErrormust catchOSError.
Removed in 0.3.1¶
These calls no longer select or report anything and were removed.
| Call | What happens now |
|---|---|
find_methods(..., available=...) |
TypeError: find_methods() got an unexpected keyword argument 'available' |
method_info(m)["availability"], the "availability" key of mtb.env.plan() rows |
KeyError. The keys are gone. |
Deprecated in 0.3.0¶
Renamed 0.2.1 spellings still work in 0.3.x with a DeprecationWarning and
will be removed in 0.4. Removed ones raise an error.
| 0.2.1 | 0.3.0 |
|---|---|
mtb.plan(dataset, category, ...) |
mtb.scan(dataset, category, ...). It returns the same frame, with the command column. |
mtb.plan_commands(...) |
mtb.scan(...) |
mtb.runtime_hint(m) |
mtb.method_info(m)["runtime"] |
mtb.plot.plot_bubble(...) |
mtb.plot.bubble(...) |
evaluate(..., task="clustering" / "batch" / "all") |
evaluate(..., metrics="clustering" / "batch" / "all") |
evaluate(..., family=...) |
evaluate(..., metrics=<token>) |
evaluate(..., only=[...]) |
evaluate(..., metrics=[...]) |
load_results(..., method=...) |
load_results(..., methods=...) |
load_results(..., metric=[...]) |
load_results(..., metrics=[...]) |
load_results(..., task=... / family=...) |
load_results(..., metrics=<token>) |
recommend(..., task=... / family=...) |
recommend(..., metrics=<token>) |
multibench evaluate --only A,B |
multibench evaluate --metrics A,B (stderr: warning: --only is deprecated. Use --metrics.) |
Passing metrics= together with a deprecated selector raises TypeError:
evaluate() got metrics= together with the deprecated ['task']; pass metrics= only.
To find old spellings in your code, run it with
python -W error::DeprecationWarning. The warnings then become errors.
These spellings were removed in 0.3.0:
| removed | error |
|---|---|
mtb.command_preview(...) |
AttributeError. Use mtb.run(..., dry_run=True). |
mtb.io.from_mudata(...) |
AttributeError. Use mtb.io.export_dataset(mdata, ..., rna="rna", atac="atac", atac_kind="peak", labels="rna:celltype"). |
mtb.io.write_labels(...) |
AttributeError. export_dataset writes the label files. By hand, use pd.Series(labels, name="x").to_csv(path, index=False). |
list_methods(task=...) / (runnable=...) |
TypeError: list_methods() only takes category since 0.3.0; task=... are find_methods filters - use find_methods(category, task=...) |
find_methods("vertical", "clustering") (positional filters) |
TypeError: find_methods() takes from 0 to 1 positional arguments but 2 were given |
method_info(m, files_dir=...) |
TypeError: method_info() got an unexpected keyword argument 'files_dir'. The catalog columns are in mtb.catalog.methods(). |
cite(methods=[...]) |
TypeError: cite() got an unexpected keyword argument 'methods'. Use cite([...]) or one id per argument. |
cite([ids], "bibtex") |
TypeError: cite(): method ids must be strings, got list; pass one list (cite(['Matilda', 'MOFA2'])) or one id per argument. fmt= is keyword-only. |
inputs_for(dataset, method, category) |
TypeError: inputs_for argument order is (dataset, category, method) since 0.3.0; you passed (dataset, method, category) |
labels_for(dataset, method, category) |
TypeError: labels_for argument order is (dataset, category, method) since 0.3.0; you passed (dataset, method, category) |
labels_for(dataset, "<data_path>") |
TypeError: labels_for: pass data_path= by keyword; the 2nd positional argument is category since 0.3.0 (order: (dataset, category, method)) |
inputs_for(..., ["rna", "adt"]) (positional modalities) |
TypeError: inputs_for() takes 3 positional arguments but 4 were given |
scan(dataset, category, data_path) (positional) |
TypeError: scan() takes from 1 to 2 positional arguments but 3 were given |
run(method, category, "clustering", ...) (positional task) |
TypeError: run() takes 2 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given |
run_all(dataset, category) without out_dir |
TypeError: run_all() needs out_dir= for a real run (dry_run=True returns the scan frame without one) |
BatchResult.rescore(only=...) |
TypeError: BatchResult.rescore() got an unexpected keyword argument 'only'. Use metrics=. |
evaluate(output, category, ...) (positional category) |
TypeError: evaluate() got multiple values for argument 'labels'. labels is the second positional argument, and the rest are keyword-only. |
evaluate(..., slow_metrics=True) |
TypeError: evaluate() got slow_metrics=, removed in 0.3.0: pass metrics=[...] without cLISI/iLISI (kBET is computed only when it is named in that list) |
evaluate(..., column="x") |
TypeError: evaluate() got column=, removed in 0.3.0: pass the Series/column itself as labels= / batch= / clustering= |
evaluate(..., metric_set="scib") |
TypeError: evaluate() got metric_set=, removed in 0.3.0: only the scIB metric set exists - drop the argument |
to_long(df, method, dataset, category) (positional) |
TypeError: to_long() takes 1 positional argument but 4 were given |
to_long(..., needs_labels=True) |
TypeError: to_long() got an unexpected keyword argument 'needs_labels'. Add the column to the frame. |
load_results(category, "clustering") (positional) |
TypeError: load_results() takes from 0 to 1 positional arguments but 2 were given |
load_results(..., metric_set="scib") |
TypeError: load_results() got metric_set=, removed in 0.3.0: only the scIB metric set exists - drop the argument |
available_datasets(..., metric_set=... / clustering=...) |
TypeError: available_datasets() got an unexpected keyword argument 'metric_set' (likewise 'clustering') |
mtb.config.category_folder / metric_set_dir, mtb.plot.render / FamilyBlock, mtb.env.group_for and the other mtb.env helpers |
Still importable, but internal: out of __all__ and hidden from dir(). |