subset of paired end reads from bam file or fastq file of different depth
1
0
Entering edit mode
2.9 years ago
rthapa ▴ 90

Hi,

I want to subsample the reads of different depth from a bam file. For eg. 10X, 20X, 30X and so on. I tried with ShortRead R package but I can input only certain number of reads. I couldn't know how depth I am subsampling. Does any one have suggestion on how to subsample paired end reads of desired depth from fastq file or bam file?

Thanks

depth ShortRead samtools read • 1.1k views
ADD COMMENT
0
Entering edit mode
2.9 years ago

get the mean depth of coverage using , for example, mosdepth and then subsample the bam using the option -s <float> of samtools view

ADD COMMENT
0
Entering edit mode

Thank you. Do we need to specify anything for the paired end reads? The bam file is after mapping the paired end reads.

ADD REPLY

Login before adding your answer.

Traffic: 1983 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