ShredPacBio

Script: shredpacbio.sh Package: synth Class: ShredPacBio.java

Shreds long single-molecule reads (e.g. PacBio HiFi) into fake paired-end reads, walking each molecule front-to-back and using every base exactly once.

Basic Usage

shredpacbio.sh in=<file> out=<pairs> outs=<singletons> outd=<discards>

Converts long single-ended reads into fake paired-end reads for use with paired-end-oriented tools such as CallVariants. Each 2×readlen window of a molecule becomes one pair: the first readlen bases form read 1, the next readlen bases form read 2 (reverse-complemented by default so the pair is FR-oriented, matching real Illumina data). This lets a long span be placed with two short, cheap alignments instead of one long one, which helps in repetitive regions.

Parameters

Parameters control input/output files and the read-length/residual-handling behavior of the shredding process.

File Parameters

in=<file>
Input long reads (FASTQ), single-ended. Required parameter.
out=<file>
Interleaved proper pairs (FASTQ). Required parameter.
outs=<file>
Singletons: a leftover read from a molecule with no mate >= minlen. Optional.
outd=<file>
Discards: leftover fragments shorter than minlen. Optional.

Processing Parameters

readlen=500
Length of each emitted read; a full pair consumes 2×readlen bases from the source molecule. Aliases: rl, length, len.
minlen=200
Minimum length for any emitted read; shorter residuals are sent to discards. Must be <= readlen. Aliases: ml.
rcompmate=t
Reverse-complement read 2 (and reverse its quality) so each pair is FR-oriented like real Illumina data. Aliases: rcomp, rc.
reads=-1
If nonnegative, stop after this many input molecules.
overwrite=t
Permit overwriting existing output files. Alias: ow.

Examples

Basic Pairing

shredpacbio.sh in=pacbio.fastq out=pairs.fastq

Shreds PacBio HiFi reads into 500bp fake pairs using default settings; residuals below 200bp are silently dropped since no outs/outd is given.

Capturing Singletons and Discards

shredpacbio.sh in=hifi_reads.fastq out=pairs.fastq outs=singles.fastq outd=discards.fastq readlen=250

Uses a shorter 250bp read length and keeps every leftover fragment, routing unmatched reads to singles.fastq and sub-minlen fragments to discards.fastq.

Disabling Mate Reverse-Complement

shredpacbio.sh in=reads.fastq out=pairs.fastq rcompmate=f

Emits both reads of each pair in their original forward orientation instead of the default FR orientation.

How It Works

Each molecule is walked front-to-back in fixed 2×readlen windows; every base is used exactly once, so there is no coverage loss or duplication the way overlapping-shred approaches have. What happens to the residual left after the last full window depends on its length:

Output headers carry tab-delimited provenance back to the source molecule:

Support

For questions and support: