Skip to content

Feature request: optional paired-end read identifier validation #720

Description

@thierrygosselin

Hi, and thank you for maintaining fastp.

While testing fastp 1.3.6, I noticed that separate paired-end files with equal read counts but mismatched identifiers are accepted without a pairing diagnostic.

Observed behaviour

Using synthetic FASTQ files containing 2,000 records per mate:

  • R1 contained identifiers in their original order.
  • R2 contained the corresponding identifiers in reverse order.
  • fastp completed with exit status 0 and retained all records.

Equal counts therefore do not establish that records at corresponding positions belong to the same pair.

Proposed enhancement

Would you consider an optional check that compares paired-read identifiers and fails explicitly on a mismatch?

It could:

  • Recognise common conventions, including /1 and /2 suffixes and Illumina mate information after whitespace.
  • Report the first mismatched identifiers and both input filenames.
  • Avoid attempting automatic reordering or repair.
  • Document supported naming conventions and any performance cost.

An opt-in mode could preserve compatibility with existing workflows and unusual header conventions.

Relationship to #719

PR #719 addresses detected read-count mismatches. This proposal concerns equal-length files with incorrect pairing, which count checks cannot detect.

I would be happy to help with an implementation and synthetic regression tests if this fits the intended scope of fastp.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions