new

improved

fixed

Client Library

onecodex client library release v1.2.0

New
  • Added support for pandas 3. pandas 2 remains supported.
  • Added filtered readcount metrics (
    filtered_readcount
    ,
    filtered_readcount_w_children
    , and their normalized variants), which are computed after artifact filtering and are consistent across samples with and without abundance estimates.
  • Added
    Jobs.publish()
    for publishing draft Workflows.
  • Added
    onecodex analyses files
    and
    onecodex analyses download
    CLI commands for listing and downloading an analysis's output files.
  • Added
    onecodex jobs publish
    CLI command.
  • Added
    description
    argument to
    Jobs.run()
    .
  • Added
    --description
    option to
    onecodex jobs run
    CLI command.
  • Added
    --gzip-output
    and
    --gzip-output-compresslevel
    to
    onecodex scripts subset_reads
    .
  • Added a
    nextflow_version
    argument to
    Jobs.create()
    and
    Jobs.update()
    , and a
    --nextflow-version
    option to the
    onecodex jobs create
    and
    onecodex jobs update
    CLI commands. Defaults to the latest supported Nextflow version.
    Jobs.details()
    reports the version a workflow runs.
  • Added a
    metric
    argument to
    FunctionalProfiles.table()
    which filters results to a single metric (e.g.,
    cpm
    ,
    rpk
    , etc.). To preserve backwards compatibility, this argument defaults to
    "all"
    which returns all metrics available for an annotation.
  • Added
    Analyses.cancel()
    and
    onecodex analyses cancel
    CLI command for canceling an in-progress Custom Workflow run.
  • Added
    tax_ids
    argument to
    Samples.where()
    for filtering samples by taxa. Only samples containing all the listed taxa are returned.
Changed
  • Nextflow Workflows no longer accept an image URI. Use
    nextflow_version
    (
    --nextflow-version
    ) instead.
    image_uri
    (
    --image-uri
    ) is still required for shell script Workflows.
  • Renamed the
    Metric.is_filtered_readcount_metric
    property to
    Metric.is_abundance_sensitive
    to better describe what it flags.
  • In
    plot_metadata(width="container", ...)
    , boxplot width is now dynamically adjusted based on the number of boxes
  • Improved speed of
    onecodex scripts subset_reads
    by around 20%.
  • FunctionalProfiles.table()
    and
    filtered_table()
    raise a
    OneCodexException
    when results are unavailable, instead of returning an empty DataFrame. They also raise when a metric is not valid for the requested annotation.
  • Column dtypes on
    FunctionalProfiles.table()
    and
    filtered_table()
    are now fixed: text columns use the nullable
    string
    dtype,
    taxa_stratified
    uses
    boolean
    , and
    value
    is always
    float64
    (it could previously come back as
    int64
    ). Missing values are
    pd.NA
    and empty results now have these same dtypes.
  • FunctionalProfiles.table()
    now returns a fresh, ordered zero-based index. It previously returned a filtered slice of the full results table, which kept original indices.
  • ocx.Assemblies
    and
    ocx.Genomes
    now use the more performant, cursor-based pagination method (like
    ocx.Samples
    and
    ocx.Metadata
    ).
  • plot_heatmap()
    legend title now defaults to the metric's display name (e.g., "Readcount With Children") instead of its field name.
  • to_functional_df(taxa_stratified=True)
    columns are now a MultiIndex of
    (feature_id, taxon_id)
    , matching the layout of
    to_classification_df()
    .
Removed
  • Removed the
    unfiltered_readcount
    metrics (
    Metric.UnfilteredReadcount
    ,
    Metric.NormalizedUnfilteredReadcount
    , etc.) in favor of the new
    filtered_readcount
    metrics. Note the semantics differ: unfiltered readcounts were computed before artifact filtering, whereas filtered readcounts are computed after.
Fixed
  • plot_functional_heatmap()
    no longer raises a
    MergeError
    when the sample collection contains more than one sample without functional profile results. Samples lacking functional results are now dropped from the plot (they were never plotted anyway).
  • Plots no longer raise a
    ValueError
    when a metadata field name contains a colon character (
    :
    ).
  • Passing non-existing
    group_by
    to
    plot_bargraph
    should not throw an error.
  • Sample.{status,visiblity}
    query type corrected to
    EnumStrFilter
  • $icontains
    and
    $contains
    removed from
    EnumStrFilter
    -- substring matching behavior requires that the substring be a valid enum member which behaved unintuitively.
  • onecodex analyses <subcommand> --help
    (e.g.
    onecodex analyses logs --help
    ) no longer requires being logged in.
  • SampleCollection.plot_distance
    no longer incorrectly warns about non-comparable metrics when plotting with comparable metrics.
  • Samples.where()
    no longer raises an
    AttributeError
    when combining sample and metadata filters.
  • to_functional_df(taxa_stratified=True)
    now gives each contributing taxon its own column. Previously only one taxon's value was kept per feature.
  • Analyses.download_file()
    no longer decompresses files served with
    Content-Encoding: gzip
    , which previously resulted in
    .gz
    files containing uncompressed data.