MEDIPS : Populating fragments from Paired End reads
1
0
Entering edit mode
@kuldeep5534-7497
Last seen 9.7 years ago

 

Hi Lukas,

I have a question about MeDIP R script.

MEDIPS/R/MEDIPS.readRegionsFile.R

 

regions = data.frame(chr=as.character(as.vector(regions$rname)), start=as.numeric(as.vector(regions$pos)), stop=as.numeric(as.vector(regions$pos)+as.vector(regions$qwidth)-1), strand=as.character(as.vector(regions$strand)), isize=as.numeric(as.vector(regions$isize)), stringsAsFactors=F)

plus=regions$strand=="+"

regions[plus, "stop"] = regions[plus, "stop"] + regions[plus, "isize"] + extend                            <------ line 153

regions[!plus, "start"] = regions[!plus, "start"] + regions[!plus,"isize" ] - extend                          <------ line  154

regions[, "stop"]=regions[, "stop"]+shift

regions[, "start"]=regions[, "start"]+shift

 

 

Let's take 'extend' to be zero, then template/fragment should be from start of first mate to end of second mate.

Insertion length is defined as distance between start of first mate and end of second mate. So it should have been

 

regions[plus, "stop"] = regions[plus, "start"] + regions[plus, "isize"]

                          |                                 |                                   |

                          |                                 |                                   |

        end of second mate       start of first mate            insertion size

 

Your implementation is adding extra length which is equal to read length of first mate.

And I have same opinion for line 154 as well.

 

Have it been done intentionally? 

Please! Correct me if my understanding is wrong.

 

Image link given below will help to understand if still the question is not clear.

https://cloud.githubusercontent.com/assets/1637382/6764850/66028a8e-cfeb-11e4-8cbc-2605d664acb3.jpg

Thanks for any help.

medips • 1.2k views
ADD COMMENT
0
Entering edit mode
Lukas Chavez ▴ 570
@lukas-chavez-5781
Last seen 6.8 years ago
USA/La Jolla/UCSD
Hi kuldeep5534, thank you for your message! I have modified the according paired-end sequencing data import function to avoid adding length of the reads: regions[plus, "stop"] = regions[plus, "start"] + regions[plus, "isize"] + extend regions[!plus, "start"] = regions[!plus, "stop"] + regions[!plus,"isize" ] - extend This should soon be available in dev v. 1.17.4. All the best, Lukas > On 21 Mar 2015, at 12:32, kuldeep5534 [bioc] <noreply@bioconductor.org> wrote: > > Activity on a post you are following on support.bioconductor.org <https: support.bioconductor.org=""/> > User kuldeep5534 <https: support.bioconductor.org="" u="" 7497=""/> wrote Question: MEDIPS : Populating fragments from Paired End reads <https: support.bioconductor.org="" p="" 65901=""/>: > > > > Hi Lukas, > > I have a question about MeDIP R script. > > MEDIPS/R/MEDIPS.readRegionsFile.R > > > regions = data.frame(chr=as.character(as.vector(regions$rname)), start=as.numeric(as.vector(regions$pos)), stop=as.numeric(as.vector(regions$pos)+as.vector(regions$qwidth)-1), strand=as.character(as.vector(regions$strand)), isize=as.numeric(as.vector(regions$isize)), stringsAsFactors=F) > > plus=regions$strand=="+" > > regions[plus, "stop"] = regions[plus, "stop"] + regions[plus, "isize"] + extend <------ line 153 > > regions[!plus, "start"] = regions[!plus, "start"] + regions[!plus,"isize" ] - extend <------ line 154 > > regions[, "stop"]=regions[, "stop"]+shift > > regions[, "start"]=regions[, "start"]+shift > > > > Let's take 'extend' to be zero, then template/fragment should be from start of first mate to end of second mate. > > Insertion length is defined as distance between start of first mate and end of second mate. So it should have been > > > regions[plus, "stop"] = regions[plus, "start"] + regions[plus, "isize"] > > | | | > > | | | > > end of second mate start of first mate insertion size > > > Your implementation is adding extra length which is equal to read length of first mate. > > And I have same opinion for line 154 as well. > > > Have it been done intentionally? > > Please! Correct me if my understanding is wrong. > > > Image link given below will help to understand if still the question is not clear. > > https://cloud.githubusercontent.com/assets/1637382/6764850/66028a8e-cfeb-11e4-8cbc-2605d664acb3.jpg <https: cloud.githubusercontent.com="" assets="" 1637382="" 6764850="" 66028a8e-cfeb-11e4-8cbc-2605d664acb3.jpg=""> > Thanks for any help. > > > You may reply via email or visit MEDIPS : Populating fragments from Paired End reads >
ADD COMMENT

Login before adding your answer.

Traffic: 546 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6