51 | | * Remove reads with low quality score: MAPQ < 30 with alignmentSieve from [[https://deeptools.readthedocs.io/en/develop/|DeepTools]] |
52 | | {{{ |
53 | | alignmentSieve -b file.bam --minMappingQuality 30 --samFlagInclude 2 -o MAPQ30.bam" |
54 | | #samFlagInclude 2 is used to keep only properly paired reads |
| 51 | * Remove reads with low quality score: MAPQ < 30 |
| 52 | {{{ |
| 53 | # Use alignmentSieve from [[https://deeptools.readthedocs.io/en/develop/|DeepTools]] |
| 54 | # "--samFlagInclude 2" => keep only properly paired reads |
| 55 | alignmentSieve -b file.bam --minMappingQuality 30 --samFlagInclude 2 -o MAPQ30.bam |
| 56 | |
| 57 | # Use samtools (for single-end reads) |
| 58 | samtools view -b -q 30 file.bam > MAPQ30.bam |