precellar.utils.multiplex_fastq#

precellar.utils.multiplex_fastq(input_read1, output_read1, output_barcode, *, input_read2=None, output_read2=None, compression=None, compression_level=None, num_threads=16)#

Create multiplexed FASTQ files by merging multiple FASTQ files into single output files, while generating barcodes for each read based on their file of origin.

Parameters:
  • input_read1 (list[str]) – List of paths to the first read (R1) FASTQ files.

  • output_read1 (str) – Path to the output file for merged R1 reads.

  • output_barcode (str) – Path to the output barcode file.

  • input_read2 (list[str] | None) – Optional list of paths to the second read (R2) FASTQ files.

  • output_read2 (str | None) – Optional path to the output file for merged R2 reads.

  • compression (Literal['gzip', 'zst'] | None) – Compression algorithm to use. If None, the compression algorithm will be inferred from the file extension.

  • compression_level (int | None) – Compression level to use.

  • num_threads (int) – Number of threads to use for compression.