Skip to content

Reject --rest-file and --wildcard-file with linked adapters up front - #897

Open
DylanCosto wants to merge 1 commit into
marcelm:mainfrom
DylanCosto:fix/reject-linked-auxiliary-output
Open

DylanCosto wants to merge 1 commit into
marcelm:mainfrom
DylanCosto:fix/reject-linked-auxiliary-output

Conversation

@DylanCosto

Copy link
Copy Markdown

Using --rest-file or --wildcard-file with a linked adapter currently crashes partway through processing (AttributeError: 'LinkedMatch' object has no attribute 'rest', #856), after the output files have already been opened.

As you pointed out in #856, it isn't clear what the "rest" of a linked adapter should even be, and you mentioned possibly removing the option. So this doesn't try to define new output. It just turns the crash into a command-line error before any files are opened, the same way the guide already lists other options that don't work with linked adapters. For paired-end input only R1 adapters are checked, since both files describe R1. A linked adapter on R2 still works.

I added the limitation to the guide and a changelog entry, plus command-line tests for the rejected combinations and for the R2 case.

When --rest-file or --wildcard-file is combined with a linked adapter, the writer calls a method LinkedMatch does not implement. A matching read can therefore terminate processing after output files have already been opened.

Assisted-by: Codex:GPT-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant