Skip to content
Prev 314625 / 398502 Next

Index out SNP position

So given B
[,1]     [,2]    [,3]
[1,] 35838396 36151202  312806
[2,] 35838674 35838584     -90
[3,] 36003908 35838674 -165234
[4,] 36004090 36003908    -182
[5,] 36150188 36003992 -146196

Row 1 is start/end and rows 2 through 5 are end/start
so you only want to exclude nucleotides that fall
between start/end in row 1, ignoring rows 2 through 5
which are end/start? Given your sample matrix A, which
rows do you want to include/exclude?

David C

From: JiangZhengyu [mailto:zhyjiang2006 at hotmail.com] 
Sent: Thursday, January 03, 2013 6:36 PM
To: dcarlson at tamu.edu; r-help at r-project.org
Cc: sarah.goslee at gmail.com
Subject: RE: [R] Index out SNP position

Hi David,
?
Thanks for your reply! 
?
But what if I cannot change the?positions of each row pairs in A.?Sorry I
did not make it very clear.
?
The two columns?in A represent start-and-end or end-and-start positions of a
gene. The one column in B is the?single nucleotide position .? I am?trying
to?index out all the??single nucleotides that fall between the start and end
region of a gene.
?
Jiang
?
?
&g t; > > do it. Could anyone help me with the code? Thanks,Jiang----