Genotype API Documentation - v0.1.0
    Preparing search index...

    Class PairSyncError

    Paired-end FASTQ synchronization errors

    Thrown when read IDs don't match between R1 and R2 files, or when files have different lengths. Provides detailed context for debugging paired-end data issues.

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a new paired-end synchronization error

      Parameters

      • message: string

        Detailed error message

      • pairIndex: number

        Index of the pair where sync failed (0-based)

      • failedFile: "r1" | "r2" | "both"

        Which file(s) failed: 'r1', 'r2', or 'both'

      Returns PairSyncError

      try {
      for await (const pair of parser.parseFiles('R1.fq', 'R2.fq')) {
      // Process pairs
      }
      } catch (error) {
      if (error instanceof PairSyncError) {
      console.error(`Sync error at pair ${error.pairIndex}`);
      console.error(`Failed file: ${error.failedFile}`);
      console.error(error.message);
      }
      }

    Methods

    • Create error for read ID mismatch

      Parameters

      • r1Id: string
      • r2Id: string
      • pairIndex: number
      • OptionalbaseR1: string
      • OptionalbaseR2: string

      Returns PairSyncError

    Properties

    code: string
    lineNumber?: number
    context?: string
    format: string
    pairIndex: number

    Index of the pair where sync failed (0-based)

    failedFile: "r1" | "r2" | "both"

    Which file(s) failed: 'r1', 'r2', or 'both'