Entering edit mode
11.6 years ago
marcodpc
▴
60
I want to reduce my bam file, obtaining a new bam file that contain
only loci in the bed file in input like
chr1 30498890 34983248
chr2 30398890 31483248
chr3 10492890 14983248
chr4 30492890 34283248
I try with:
samtools view -L test.bed test.bam | awk '$2 != 4 {print}'
and
intersectBed -abam file.bam -b test.bed
but the source bam file isn't reduce dimension.
How can I do ?