Hi,

I'm analyzing **human cancer cell line** ATAC-seq data (PE 75bp Illumina) and have encountered a weird insert size distribution. For ATAC-seq PE data, insert size distribution is a good quality control of how well the experiment worked (This is how it would ideally look https://dbrg77.wordpress.com/2017/02/10/atac-seq-insert-size-plotting/). I have used several mapping strategies and always come to a similar distribution plot.

Sequencing is good quality with 50-60 million reads per sample with min. 3 replicates and mapping >80% for all samples. > 95% of forward and reverse reads are paired. 

**Analysis** 

    java -jar $tool_path/trimmomatic-0.36.jar PE -phred33 -threads 20 $forward $reverse $forward_1_paired.fastq $forward_unpaired.fastq $reverse_paired.fastq $reverse_unpaired.fastq ILLUMINACLIP:$tool_path/adapters/TruSeq3-PE.fa:2:30:10 LEADING:10 TRAILING:10 MINLEN:50

    bowtie2 --threads 20 --very-sensitive -x $bowtie2index -1 $forward_paired -2 $reverse_paired -S $filename_aligned.sam

**Plotting** 

    samtools view ATAC_f2q30_sorted.bam | awk '$9>0' | cut -f 9 | sort | uniq -c | sort -b -k2,2n | sed -e 's/^[ \t]*//' > fragment_length_count.txt

**Alternative way of plotting** 

    java -Xmx20g -jar picard.jar CollectInsertSizeMetrics I=$file O=insert_size_metrics.txt H=insert_size_histogram.pdf

[Insert size distribution][1]
*In the plot it should be written insert length, not fragment length. 

Does anyone have an idea what went wrong here? Could this data be still useful to analysis? I was thinking to extract PE reads with insert size between 0-300nt and proceed only with these reads for downstream analysis?  


  [1]: https://ibb.co/frQb6U
For anyone looking at this post in the future, I will explain how I solved this issue:
The issue was in the raw data I was given. The data, as i mentioned above was PE sequencing and i was given two files per sample, marked as _1 and _2, and the information that these are forward and reverse reads. I processed them as such and gotten no errors and good mapping results. But in fact, what I realised later is that these were lane 1 and lane 2 files and both files contained both forward and reverse reads. Oddly i didn't get any errors while removing adapters or mapping, despite the fact that i treated them as if file 1 contained forward reads and file 2 reverse reads. The data now looks as it should, with the typical nucleosome phasing pattern and good quality.   

So lesson learned, always double check the information you are given together with the files. 
