This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to plot "normalized read density" vs "insert size"

Hello,

I've been requested how to make a plot Plot like this, which is from an ATAC-Seq methods paper (Buenrostro, J.D., et al. doi: 10.1002/0471142727.mb2129s109) of RNA-Seq Data I'm not sure how I can get the insert size and then the normalized read density. I've tried rseqc's insertion_profile.py but there are bugs in that script so I can't use it.

How can I go about making getting this data from fastq or aligned bam files? EDIT:

rna-seq

sorry, the image attachment wasn't working, I didn't realize that I double posted. I don't see how I can delete that question.

That is ok this time. Since the other question has a different answer I don't want to delete it.

2 answers

Try bamPEFragmentSize from deepTools.

Hi Devon,

sorry about the late reply (too many things to do) but this doesn't enter image description here generate the correct x axis ('insert size' vs 'fragment length'). Perhaps this is enough?

Insert size and fragment length are the same thing.

thank you Devon, you have been very helpful!

This plot was generated simply by applying CollectInsertSizeMetrics from Picard tools to the filtered bam file (removed chrM, MAPQ>int as you like, properly-paired only if you like, remove duplicates) and divide the obtained counts by the number of reads in the bam.

Just out of curiosity, what do you mean by "of RNA-seq data" in your question? This plot reflects the fragment sizes generated by the transposition of open chromatin regions; nothing to do with RNA at all.

"of RNA-seq data" means that dec986 has RNAseq data rather than ATACseq. This is also why the plot dec986 posted has such long apparent fragment lengths, since there's splicing.

Log in to answer this question.