timplab/T2T-Epigenetics

Way to filter winnowmap2 BAM files for read lengths

Closed this issue · 3 comments

Could I use 'samtools view -h Winnowmap.bam | awk 'length($10) > 50000 || $1 ~ /^@/' | samtools view -bS - > 50k.bam' to get winnowmap2 BAM files filtered for read lengths greater than 50 kb? like mentioned in 'Epigenetic Patterns in a Complete Human Genome' ?

I didn't find the step to get BAM files filtered for read lengths ike mentioned in 'Epigenetic Patterns in a Complete Human Genome' paper in this repositories.

Hi. Yes, that is exactly how we did it. Refer to line 7 here:

samtools view -h ont.primary.bam | awk 'length($10) > 50000 || $1 ~ /^@/' | samtools view -Sb > ont.primary50kb.bam

Thank you for your kind help !