Re: [R] mhplot error with test example: ylim not found
Many thanks Peter. I have uploaded 1.0-23 which should have this fixed. Jing Hua -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: 28 June 2010 15:47 To: vaneet Cc: r-help@r-project.org; Jing Hua Zhao Subject: Re: [R] mhplot error with test example: ylim not found It seems to me that gap::mhtplot needs a fix. You might want to contact the maintainer (cc'd). In the meantime, you should be able to place an object ylim in your workspace before calling the function: ylim - c(0, 10) mhtplot(test, ylim = c(0, 10)) Of course, you could also just fixt the function (it's short and the fix is easy). -Peter Ehlers On 2010-06-23 8:47, vaneet wrote: Hello all, I am trying to make a genome association plot for p-values related to SNPs and was fortunate to find that R contains a package that produces Manhattan plots which is what's preferred for my current project. The function mhtplot() is found in the 'gap' package which I installed in R 2.11.1 on Windows. I thought I'd test out the function first with the examples they give in the documentation: # foo example test- matrix(c(1,1,4,1,1,6,1,10,3,2,1,5,2,2,6,2,4,8),byrow=TRUE,6) mhtplot(test) mhtplot(test,logscale=F) # fake example with Affy500k data affy-c(40220, 41400, 33801, 32334, 32056, 31470, 25835, 27457, 22864, 28501, 26273, 24954, 19188, 15721, 14356, 15309, 11281, 14881, 6399, 12400, 7125, 6207) CM- cumsum(affy) n.markers- sum(affy) n.chr- length(affy) test- data.frame(chr=rep(1:n.chr,affy),pos=1:n.markers,p=runif(n.markers)) # to reduce size of the plot # bitmap(mhtplot.bmp,res=72*5) oldpar- par() par(las=2,cex=0.6) colors- rep(c(blue,green),11) mhtplot(test,colors=colors,pch=19,bg=colors) title(A simulated example according to EPIC-Norfolk QCed SNPs) When I run either of the examples the following results: Error in mhtplot() : object 'ylim' not found Even though I'm not sure why it would require this parameter, when I tried to fill in the parameter (ylim = c(0,10)) the same error results. I am not sure how to get around this. Vaneet __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] infer haplotypes phasing trios tdthap
Dear Tiago and David, Just for a bit of personal interest, Haplin has been part of CRAN which is potentially helpful. http://cran.r-project.org/web/packages/Haplin/index.html from http://www.uib.no/smis/gjessing/genetics/software/haplin/ Best regards, Jing Hua -Original Message- From: David Clayton [mailto:david.clay...@cimr.cam.ac.uk] Sent: 26 January 2009 10:07 To: Jing Hua Zhao Cc: Tiago R Magalhães; r-help@R-project.org Subject: Re: infer haplotypes phasing trios tdthap tdthap wassn't intended to solve that problem and it has been removed from my own web site since I no longer consider it important enough to support. DC -Original Message- From: Tiago R Magalhães [mailto:tiag...@gmail.com] Sent: 22 January 2009 11:10 To: r-help@R-project.org Subject: infer haplotypes phasing trios tdthap Dear R mailing list, I have a dataset with genotypes from trios and I would like to infer haplotypes for each mother, father and child. The package that I could find that can do this is tdthap. But when the mother is homozygous (e.g., 2/2) the haplotype is called as not possible to infer (0); I would prefer for it to call the genotype (2). From what I understand it is doing what I would like for the father (example below). Can anyone provide me with some information about this tdthap behaviour? And is there any other package that would do this? (Searched for it, couldn't find it) Thank you very much, Tiago Magalhães example (ped file with pedigrees) 9 100 102 101 1 2 1 1 2 1 2 2 1 2 9 101 0 0 2 1 1 1 2 1 2 2 2 2 9 102 0 0 1 1 2 1 2 1 2 2 1 1 data out: hap.transmit(example) pedidfathermother 9 100102 101 f.tr.1f.tr.2f.tr.3f.tr.4 1 0 2 1 m.tr.1m.tr.2m.tr.3m.tr.4 00 0 0 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] infer haplotypes phasing trios tdthap
Dear Tiago, I received this message from r-help. I should say I have limited experiences with tdthap so David should have the final say about it? Alternatively, you may wish to use independent programs as listed in the linkage server at Rockefeller? I would of course find out if I have miscopied David's original code! Many thanks, Jing Hua -Original Message- From: Tiago R Magalhães [mailto:tiag...@gmail.com] Sent: 22 January 2009 11:10 To: r-help@R-project.org Subject: infer haplotypes phasing trios tdthap Dear R mailing list, I have a dataset with genotypes from trios and I would like to infer haplotypes for each mother, father and child. The package that I could find that can do this is tdthap. But when the mother is homozygous (e.g., 2/2) the haplotype is called as not possible to infer (0); I would prefer for it to call the genotype (2). From what I understand it is doing what I would like for the father (example below). Can anyone provide me with some information about this tdthap behaviour? And is there any other package that would do this? (Searched for it, couldn't find it) Thank you very much, Tiago Magalhães example (ped file with pedigrees) 9 100 102 101 1 2 1 1 2 1 2 2 1 2 9 101 0 0 2 1 1 1 2 1 2 2 2 2 9 102 0 0 1 1 2 1 2 1 2 2 1 1 data out: hap.transmit(example) pedidfathermother 9 100102 101 f.tr.1f.tr.2f.tr.3f.tr.4 1 0 2 1 m.tr.1m.tr.2m.tr.3m.tr.4 00 0 0 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.