[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bioc-devel
Subject:    Re: [Bioc-devel] Problem with merge
From:       Michael Lawrence <lawrence.michael () gene ! com>
Date:       2010-05-24 16:28:16
Message-ID: AANLkTikSZ32LzVkhPsoOMN0S-hkRAsh1LNfYSIgQixnD () mail ! gmail ! com
[Download RAW message or body]

On Mon, May 24, 2010 at 9:25 AM, Zhu, Julie <Julie.Zhu@umassmed.edu> wrote:

> Dear developers,
>
> I encountered a strange merge problem and hope you can help me to
> understand
> why this is happening and how to resolve it.
>
> r3 and z1 are both data frames produced inside a function, when I try to
> merge these two (R.2.10 and R.2.11),  chr 1 [19000000, 19000300], chr1
> [30000000, 30000300] and chr2 [  100000,   100300] in r3 failed to merge
> with the corresponding rows in z1. Is this related to the precision on auto
> conversion of character to numeric? Thanks so much for your help in
> advance!
>
> r3
>  feature_id name  chr  PeakLoc peakStart  peakEnd start_position
> end_position strand FeatureLoc
> 1          1    1 chr1  2000160   2000010  2000310        1000000
> 2000000      +    1000000
> 2          2    2 chr1 19000150  19000000 19000300       10000000
> 20000000      -   20000000
> 3          2    3 chr1 30000150  30000000 30000300       10000000
> 20000000      -   20000000
> 4          4    4 chr2      450       300      600           1000
> 5000      +       1000
> 5          5    5 chr2     5650      5500     5800           6000
> 7000      -       7000
> 6          6    6 chr2   100150    100000   100300          10000
> 15000      +      10000
>
> z1
>     name chr    peakStart  peakEnd    PeakLoc
> [1,] "1"  "chr1" "2000010"  "2000310"  "2000160"
> [2,] "2"  "chr1" "19000000" "19000300" "19000150"
> [3,] "3"  "chr1" "30000000" "30000300" "30000150"
> [4,] "4"  "chr2" "300"      "600"      "450"
> [5,] "5"  "chr2" "5500"     "5800"     "5650"
> [6,] "6"  "chr2" "100000"   "100300"   "100150"
>
>
Not sure if this question belongs on this list, but anyway, it looks like z1
is a character matrix, not a data.frame. Better convert it to a data.frame
with the correct types.


> Best regards,
>
> Julie
>
> *******************************************
> Lihua Julie Zhu, Ph.D
> Research Associate Professor
> Program in Gene Function and Expression
> Program in Molecular Medicine
> University of Massachusetts Medical School
> 364 Plantation Street, Room 613
> Worcester, MA 01605
> 508-856-5256
> http://www.umassmed.edu/pgfe/faculty/zhu.cfm
>
> _______________________________________________
> Bioc-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

	[[alternative HTML version deleted]]

_______________________________________________
Bioc-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic