| 188 | | |
| | 188 | === Split by strand by matched strand === |
| | 189 | |
| | 190 | {{{ |
| | 191 | # input: accepted_hits.bam |
| | 192 | # output: accepted_hits_negStrand.bam: mapped to negative strand |
| | 193 | # accepted_hits_posStrand.bam: mapped to positive strand |
| | 194 | |
| | 195 | bsub "samtools view -f 16 -b accepted_hits.bam >| accepted_hits_negStrand.bam" |
| | 196 | bsub "samtools view -F 16 -b accepted_hits.bam >| accepted_hits_posStrand.bam" |
| | 197 | |
| | 198 | }}} |
| | 199 | |
| | 200 | === Split reads by pair === |
| | 201 | {{{ |
| | 202 | # input: accepted_hits_posStrand.bam or accepted_hits_negStrand.bam |
| | 203 | # output: 1st pair: *_1stPair.bam |
| | 204 | # 2nd pair: *_2ndPair.bam |
| | 205 | bsub "samtools view -b -f 0x0040 accepted_hits_posStrand.bam > accepted_hits_posStrand_1stPair.bam" |
| | 206 | bsub "samtools view -b -F 0x0040 accepted_hits_posStrand.bam > accepted_hits_posStrand_2ndPair.bam" |
| | 207 | bsub "samtools view -b -f 0x0040 accepted_hits_negStrand.bam > accepted_hits_negStrand_1stPair.bam" |
| | 208 | bsub "samtools view -b -F 0x0040 accepted_hits_negStrand.bam > accepted_hits_negStrand_2ndPair.bam" |
| | 209 | }}} |