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

Tyler Backman tbackman at ucr.edu
Wed Jan 20 19:13:56 CET 2010

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

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

More information about the Bioc-sig-sequencing mailing list