From the fastq data (read 1 and read 2) from illumina GAIIx platform ( paired-end library), I created the Sam and bam file using BWA. I got the statistics of number of uniquely-paired reads and total reads mapped to my reference genome. I was wondering how to get a complete list of insert size across the data set from my Sam or bam file? It could be just for uniquely paired reads or all mapped reads. I don't want to write a long script for that. Is there any easy commands from samtools or other options that I can use?
BWA's command line output already gives info about the mean and the SD of insert size while its running.
What command are you talking about? Tha samtools flagstat usually gives a basic statistics of the mapping like uniquely-paired, total reads mapped, singletons etc. I'm not sure which step you are mentioning. Can you explain me a bit more?
when you ran bwa it displayed the insert size info - but if you did not save that then that information is probably lost now