This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to randomly extract pair reads from bam file?

How to randomly extract pair reads from bam file?

sam bam

1 answer

see option -s of samtools view

  --subsample FLOAT      Keep only FLOAT fraction of templates/read pairs
  --subsample-seed INT   Influence WHICH reads are kept in subsampling [0]
  -s INT.FRAC                Same as --subsample 0.FRAC --subsample-seed INT

Log in to answer this question.