downsample reads¶
At a glance
Repository: atlasxomics/downsample · Display name: downsample reads · Modality: Platform · Stage: Utility
Overview¶
A quick, platform-agnostic Workflow for downsampling paired-end reads to an exact target read count. Useful for producing lighter test sets or normalizing sequencing depth across samples before preprocessing. Input may be FASTA or FASTQ.
Steps¶
downsample_task— Runsbbmap/reformat.shon the read pair withsamplereadstarget=<out_reads>, writing downsampled files prefixed withds_. Outputs are uploaded tolatch:///downsampled/<out_dir>/.
Inputs¶
| Parameter | Type | Description |
|---|---|---|
r1 |
LatchFile | Read 1 (FASTA or FASTQ). |
r2 |
LatchFile | Read 2 (FASTA or FASTQ). |
out_dir |
str | Subdirectory name under downsampled/. Cannot start with /. |
out_reads |
int | Exact number of output reads (or pairs) desired. |
Outputs¶
A tuple of two LatchFiles — the downsampled ds_<r1> and ds_<r2> — written
to latch:///downsampled/<out_dir>/.
downsampled/<out_dir>/
├── ds_<r1>
└── ds_<r2>
Example run¶
LaunchPlan(
downsample,
"Test Data",
{
"r1": LatchFile("latch:///.../D01033_NG01681_S3_L001_R1_001.fastq.gz"),
"r2": LatchFile("latch:///.../D01033_NG01681_S3_L001_R2_001.fastq.gz"),
"out_dir": "D01033_NG01681",
"out_reads": 1000000,
},
)