# [Bioc-sig-seq] Calculating insert size for paired-end /mate pair samples

Pratap, Abhishek APratap at som.umaryland.edu
Thu Jan 21 18:19:08 CET 2010

```Thanks Tyler for a quick reply. I see with few manipulations we can get to the insert size. Although this isn't bad but it will be nice to include direct function in ShortRead to infer insert size.

Cheers,
-Abhi

-----Original Message-----
From: Tyler Backman [mailto:tbackman at ucr.edu]
Sent: Wednesday, January 20, 2010 1:17 PM
To: Tyler Backman
Cc: Pratap, Abhishek; bioc-sig-sequencing at r-project.org
Subject: Re: [Bioc-sig-seq] Calculating insert size for paired-end /mate pair samples

I forgot to mention- this is for use with ShortRead.

Sincerely,
Tyler William H Backman
Bioinformatics Analyst
Institute for Integrative Genome Biology (IIGB)
Department of Botany and Plant Sciences
E-mail: tyler.backman at ucr.edu
1207E Genomics Building
University of California
Riverside, CA 92521

On Jan 20, 2010, at 10:13 AM, Tyler Backman wrote:

> Hello Abhi,
>
> Here is an example for calculating insert size of GA reads via a bowtie alignment:
>
> # align with bowtie
> system("bowtie -q reference.fasta -1 "pair1filtered.fastq" -2 "pair2filtered.fastq" -n 3 -e 160 -p 5 -I 0 -X 500 --fr > alignment.bowtie")
> # import alignment
> alignedReads <- readAligned("./", pattern="alignment.bowtie", type="Bowtie")
> # calculate insert sizes
> distance <- position(alignedReads[seq(2,length(alignedReads),by=2)]) - position(alignedReads[seq(1,length(alignedReads),by=2)]) + width(alignedReads)[1]
> # look at stats
> median(distance)
> sd(distance)
>
> Sincerely,
> Tyler William H Backman
> Bioinformatics Analyst
> Institute for Integrative Genome Biology (IIGB)
> Department of Botany and Plant Sciences
> E-mail: tyler.backman at ucr.edu
> 1207E Genomics Building
> University of California
> Riverside, CA 92521
>
> On Jan 20, 2010, at 9:52 AM, Pratap, Abhishek wrote:
>
>> Hi All
>>
>> Recently it has been quiet here. I hope you all had a good start to 2010.
>>
>> I wanted to know if there is already a method in ShortRead or some other package to calculate the insert size for pair end or mate pair data from GA and plot it on a graph. I guess the latter part is trivial.
>>
>> Thanks,
>> -Abhi
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-sig-sequencing mailing list
>> Bioc-sig-sequencing at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

```

More information about the Bioc-sig-sequencing mailing list