Hello,
How to define the open chromatin region in ATACseq? The tutorial (https://rockefelleruniversity.github.io/RU_ATAC_Workshop.html) saids insert size less than 100 bp is open chromatin region and insert size in (180, 240) is mono-nucleosome region, I am wondering what is the insert size in (100, 180) belong to? I know the 9th column of .bam file is the inset size, how to filter the .bam file based on insert size? I tried
samtools view $(FILE)"_mm10.bam" | awk '$9<100' | awk '$9>0' | samtools view -b > openregionbam/$(FILE)"_mm10.bam"
But get error
[E::sam_parse1] missing SAM header
[W::sam_read1] parse error at line 1
[main_samview] truncated file.
What should I do? Thanks a lot.