Downsampling fastq reads
3
0
Entering edit mode
3.2 years ago
plicht ▴ 20

Hi all,

Do you have recommendations which tool to use to randomly downsample a fastq file to a specified read number? Specifically I am working on shotgun metagenomic data.

Thanks Philipp

next-gen metagenomics • 3.1k views
ADD COMMENT
3
Entering edit mode
3.2 years ago

seqtk sample or seqkit sample.

ADD COMMENT
1
Entering edit mode
3.2 years ago
GenoMax 141k

reformat.sh from BBMap suite. Following options are relevant.

reads=-1                Set to a positive number to only process this many INPUT reads (or pairs), then quit.
skipreads=-1            Skip (discard) this many INPUT reads before processing the rest.
samplerate=1            Randomly output only this fraction of reads; 1 means sampling is disabled.
sampleseed=-1           Set to a positive number to use that prng seed for sampling (allowing deterministic sampling).
samplereadstarget=0     (srt) Exact number of OUTPUT reads (or pairs) desired.
samplebasestarget=0     (sbt) Exact number of OUTPUT bases desired.
ADD COMMENT
0
Entering edit mode
ADD COMMENT

Login before adding your answer.

Traffic: 2662 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6