The peek rule matched every th, so header cells that hold file content (RexpBase's first line, QIIME2's labels) became grey and unselectable. column_index_header_cell() now marks its cells with the column-index-header class, as the preview's header cells already are, and the rule targets that class.
Pileup passed its column labels only to its peek, so the preview showed the raw metadata names (chromCol, startCol, baseCol). The labels are now the class's column_parameter_alias, which both the peek and the preview read.
The dataset preview took its column names only from the dataset's
column_names metadata, so BED, GFF/GTF and other datatypes that define
their column names on the datatype showed only numbers in the preview
while the peek showed names.
TabularData.column_headers() now computes the names once: explicit
names, else the column_names metadata, else the datatype's own
column_names, then column parameter metadata (chromCol, ...) for the
columns still unnamed. The peek header and every preview chunk use it,
and the preview reads the names from the chunk. Interval's column
parameter aliases become a class attribute so both paths see them.
The preview tests now mount the table and check the rendered column
index instead of the fields passed to the table.
#22947 removed the generated header from generic tabular peeks and
previews, so that a file's own first line would not look like data
under a header. That also removed the column names that tools such as
DESeq2 set through metadata, and the column numbers users rely on to
fill in column parameters (#25084).
Give every tabular datatype the same header, in both the history peek
and the dataset preview: a column index row styled as interface chrome
rather than as a line of the file. Each cell shows the column number,
left-aligned like a spreadsheet column letter, and the column name from
metadata, centred, when there is one. Thin lines mark where columns
start. The row has a tooltip saying it is Galaxy metadata and not part
of the file, and it cannot be selected, so copying the table copies
exactly the file's lines. Every row below it is the file, line for
line, including a CSV/TSV header line.
The peek cells are built by one helper, column_index_header_cell(),
which the datatypes with their own peek tables (Eland, GenomeGraphs,
SffFlow) now use as well.
Fixes#25084
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Point the converter lint at the checkout's datatypes_conf.xml.sample via
DATATYPES_CONF, so it knows datatypes added in the same change instead of
only those in planemo's installed galaxy-tool-util release.
Call the declared sniff_prefix(FilePrefix(...)) in the unit test, as the
parquet and mzspeclib tests do; mypy cannot see the decorator-added sniff.
Co-authored-by: David Molik <9337053+molikd@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lines starting with ';' were comments in the FASTA format of Pearson &
Lipman (1988, https://doi.org/10.1073/pnas.85.8.2444), and FAIR-bioHeaders
files write their metadata as such a block. htslib and Biopython's
"fasta" parser reject these lines, so instead of widening the fasta
datatype this adds a separate pearson_fasta datatype that subclasses
Sequence, not Fasta, and so is not offered for fasta inputs directly.
Its sniffer requires a ';' block (';' and empty lines, starting in the
first column) followed by a '>' header; from the header on it applies
the fasta sniffer's checks. It also rejects files whose first sequence
line is numeric (qual454, qualsolid) or color-space (csfasta), so those
stay unrecognised as without the comment block. It runs just before
Fasta in the sample sniff order. Files without a leading ';' line are
not affected.
set_meta counts sequences and data lines from the first header on, so
the values match those of the converted fasta.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
History export didn't record which ImplicitCollectionJobs populate an
implicit HDCA, so an imported map-over collection lost that link while
its jobs kept theirs. Export the HDCA's implicit_collection_jobs
identifier and relink it once the jobs are imported. Without this, the
Job Outputs table of an imported mapped job still listed the whole
map-over collection (#25004).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DatasetCollectionWrapper.all_paths, all_metadata_files,
element_identifiers_extensions_paths_and_metadata_files,
get_all_staging_paths and serialize() read their rows from a model query,
DatasetCollection.element_identifiers_extensions_paths_and_metadata_files,
next to the per-element wrappers the collection wrapper already holds.
Build the rows from those wrappers instead, flattening nested collections
from the element list so repeated identifiers are all kept as the query
did. Paths are still where Galaxy stores each dataset.
The rows are cached, as the model-backed row list was, and each dataset
wrapper caches its metadata files, so repeated accessors neither re-walk
the collection nor reload metadata files. all_paths and
get_all_staging_paths no longer load metadata files at all.
Drop the now unused model property and its mapping test assertion. No
change to what the accessors return.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A user-defined tool job's model store could put a new dataset in any
backend of the instance; only user object stores were limited to the
ones the job uses. New datasets now must use an object store of the
job or its outputs.
With split workflow object stores and no preferred outputs store, the
job recorded None for its workflow outputs, so datasets discovered for
them went to whichever store the metadata step picked. The job now
records the store its precreated outputs settled on.
With object_store_store_by = uuid a dataset's uuid picks its file, the same
as its object store, so a user-defined tool's model store may no longer
change it for an existing output. The integration test now also runs the
user-defined tool untampered to show its own outputs still import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With extended metadata, a job writes metadata/outputs_populated and
Galaxy imports it with allow_edit. The import looked up every object the
store named by database id without checking that it belongs to the job,
so whoever can write that directory (the job, a compromised Pulsar node,
or a container escape) could rename, re-type or purge any dataset,
replace any collection's elements, add datasets to any library folder
and report a state for any job.
The import now takes the objects it may edit from the job in the
database: the job, its output datasets, collections and their elements,
the datasets behind them, and library folders the job's user can add
to. Any other id is refused, as is a metadata file uuid that belongs to
other datasets, which would make them share a file.
User-defined tool jobs also may not link an output to a server file
(external_filename), move an existing output to another object store,
or put a new dataset in a user object store their outputs don't use.
Data fetch jobs need external_filename for linked uploads, so the rule
applies only to user-defined tools for now.
The job-side copy of each output is exported with the name and info it had
at job setup, and the importer wrote them back when the job finished, so a
rename made while the job was queued or running was reverted.
Compare the job's values with the ones exported at job setup and keep the
server's value unless the job changed it. Lines the job appended to info
(stdout) are appended to the edited info, as with the directory strategy.
https://github.com/galaxyproject/galaxy/issues/25000
The job-side copy of each output is exported with the visibility it had at
job setup, and the importer wrote it back when the job finished. This
unhid outputs hidden while the job ran, e.g. the originals of a collection
built with "hide original elements".
Only apply the job's visibility to unhide outputs that failed, which is
the only change the job side makes to it.
https://github.com/galaxyproject/galaxy/issues/25000
When an extended metadata job finishes, its metadata is copied to every
HDA sharing the output's dataset. copy_dataset_instance_metadata_attributes
set the metadata before the extension, but the metadata setter only keeps
keys known to the target's current datatype. A copy made while the job ran
(e.g. a collection element built from a running upload) still had the
"auto" extension, so data_lines, columns, column_types and the rest were
dropped and the copy ended up as an empty tabular dataset.
Also group the condition selecting the HDAs to copy to, so the output HDA
itself is never selected.
https://github.com/galaxyproject/galaxy/issues/25000
The cli fixture prefers a galaxy-delete-sessions next to sys.executable,
which is how the package tests exercise the console script. In a venv
with a galaxy-data from another version, it would silently test that
installed code instead. Assert that the module the command's interpreter
imports has the same content as the one pytest imported. Compare
content, not paths: the package tests import from packages/data/src but
run a non-editable install whose copy lives in site-packages.
The header check added for DICOM support in #21385 only accepts the
classic TIFF magic numbers, so BigTIFF files (II+\0 / MM\0+) are sniffed
as binary since 26.0. The previous tifffile-based sniffer accepted them.
sqlite3's legacy transaction control does not BEGIN before WITH-prefixed
DML, so _transaction issues BEGIN itself. Nothing tested that since the
per-page rollback test was dropped: replacing the BEGIN with pass kept
the module green. Without it, a SIGTERM between a page's DELETE and its
commit leaves the page deleted although the reported after_id says it
must be scanned again. The new test interrupts the second page after
its DELETE and fails if the BEGIN is removed.
Both entries named a module as the attribute of galaxy.model.scripts,
so installing galaxy-data produced commands that failed with
AttributeError before parsing any arguments. galaxy-delete-sessions had
the same bug until #24750. Each module already has a main() that parses
argv, so target that, and test that every galaxy-data console script
loads to a callable.
PostgreSQL only accepts the MATERIALIZED keyword from 12 on, so on 9.6
to 11, which db_indexes.yaml still checks the schema against, every
page failed with a syntax error. Those versions always materialize
CTEs, so dropping the keyword there keeps the one-lookup-per-user plan.
SQLite 3.35+, which RETURNING already requires, keeps the hint. The
PostgreSQL 12 floor in the docs no longer applies.
The newest-session CTE and the outer predicate each bound the scanned
page IDs as an expanded IN list, so every statement carried twice the
batch size in bind parameters. Stock SQLite caps a statement at 32766,
so --batch-size above 16383 failed with 'too many SQL variables', and
PostgreSQL had to parse and plan the same large lists on every page.
Select each page as the ID range (after_id, last scanned ID] instead.
The DELETE still re-evaluates the full predicate. Rows committed inside
the range after the scan are now judged by that predicate too, instead
of being skipped until the next full run.
The new test caps SQLite at its stock 32766 variables, because builds
such as Debian's raise the limit and would hide the failure.
The __DATA_FETCH__ request_json job parameter holds decoded ids: the
library folder of a library_folder destination and the precreated HDAs
and HDCAs (object_id). Job show and search, parameters_display and
model store exports returned them as they are, so anyone who could view
the job or dataset saw raw database ids. Encode them on the way out
(with the export identifier for model stores; extended metadata exports
keep them decoded).
Tool landings store their request state with decoded dataset ids and
returned it as is, to anonymous callers too. Encode it with
landing_encode, which also needed the None guard landing_decode has for
unset optional data inputs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>