GWASTools
0
0
Entering edit mode
@stephanie-m-gogarten-5121
Last seen 4 months ago
University of Washington
Dear Uli, Thanks for the suggestion. In GWASTools 1.5.9 (which will become the next release very soon), the "snp.annot" argument in convertNcdfGds should be a SnpAnnotationDataFrame, and the chromosome codes from snp.annot will be preserved in the resulting GDS file. best wishes, Stephanie On 1/16/13 2:42 AM, Ulrich Knief wrote: > Dear Stephanie, > I entered this code and it seems it changes the internal chromosome > coding in SNPRelate after using 'convertNcdfGds'. > > path = "" > geno.nc.file <- "tmp.geno.nc" > ncfile <- paste(path,geno.nc.file,sep="") > gdsfile <- "tmp_geno.gds" > annot1 <- data.frame(pData(scanAnnot1)) > convertNcdfGds(ncfile, gdsfile, sample.annot=annot1) > > ZFwild <- openfn.gds("tmp_geno.gds", readonly=FALSE) > > # change internal chromosome coding > option <- snpgdsOption(autosome.start=1, autosome.end=32) > chrcode <- option$chromosome.code > chr <- snpAnnot$chromosome > for (i in names(chrcode)) chr[snpAnnot$chromosome == i] <- chrcode[[i]] > chr <- as.integer(chr) > chr[is.na(chr)] <- 0 > put.attr.gdsn(index.gdsn(ZFwild, c("snp.chromosome")), > "autosome.start", option$autosome.start) > put.attr.gdsn(index.gdsn(ZFwild, c("snp.chromosome")), > "autosome.end", option$autosome.end) > for (i in 1:length(option$chromosome.code)) { > put.attr.gdsn(index.gdsn(ZFwild, c("snp.chromosome")), > names(option$chromosome.code)[i], > option$chromosome.code[[i]]) > } > sync.gds(ZFwild) > > > Best wishes > Uli > > > > -------- Original Message -------- > Subject: Re: GWASTools > Date: Wed, 16 Jan 2013 10:12:16 +0100 > From: Ulrich Knief <uknief at="" orn.mpg.de=""> > To: Stephanie M. Gogarten <sdmorris at="" u.washington.edu=""> > > > > Dear Stephanie, > sorry to bother you again. I have a problem with defining new chromosome > codes during conversion from GWASTools to SNPRelate. I use the function > 'convertNcdfGds' from the GWASTools package. You cannot specify > differing chromosome names in this function. > Then I tried to change the internal chromosome representations in > SNPRelate with 'snpgdsOption'. But the list output of this function is > only useable for SNPRelate functions while importing data from PLINK or > VCF files (snpgdsBED2GDS, snpgdsVCF2GDS) and not for the > 'convertNcdfGds' function. Am I missing something? > > I am not sure, but I think in your tutorial on data cleaning you made a > mistake on page 47 when plotting heterozygosity in females on the X > chromosome. Shouldn't it be: > female <- scanAnnot$sex == "F" > boxplot(scanAnnot$het.X[female] ~ scanAnnot$population[female], main="X > Chromosome Heterozygosity in Females") > > > Best wishes > Uli > > > > > > > On 1/7/2013 5:46 PM, Stephanie M. Gogarten wrote: >> "anomDetectLOH" may be what you want. Be warned that it takes a long >> time to run. >> >> Stephanie >> >> On 1/6/13 4:19 PM, Uli wrote: >>> Dear Stephanie, >>> thank you very much for your information and support! I really >>> appreciate your help. I will start writing my scripts in GWASTools and >>> SNPRelate the next days. If I come across any bugs then I could contact >>> you again. Are you planning to implement something like PLINKs 'Runs of >>> Homozygosity' tool in the future? >>> >>> Best wishes >>> Uli >>> >>> >>> >>> Am 03.01.2013 22:49, schrieb Stephanie M. Gogarten: >>>> I think Xiuwen may still be on vacation, but I just noticed that the >>>> latest SNPRelate (0.9.8) has the option to change autosome coding. >>>> Look at "?snpgdsOption". >>>> >>>> Stephanie >>>> >>>> On 12/21/12 10:39 AM, Stephanie M. Gogarten wrote: >>>>> Dear Uli, >>>>> >>>>> Xiuwen Zheng is the author of SNPRelate, and as far as I know it still >>>>> has autosomes hard-coded as 1:22. >>>>> >>>>> Xiuwen, do you have any plans to revise SNPRelate so that it can be >>>>> used >>>>> with a different number of autosomes? I just did this in >>>>> GWASTools, so >>>>> I can give you an example. >>>>> >>>>> Stephanie >>>>> >>>>> On 12/20/12 4:23 PM, Uli wrote: >>>>>> Dear Stephanie, >>>>>> thank you very much for this update - which was very fast - and for >>>>>> letting me know! This gives GWASTools a clear advantage over PLINK in >>>>>> model organisms for all the quality checking. Actually, I think I >>>>>> will >>>>>> put together a pipeline that uses GWASTools for quality control >>>>>> and for >>>>>> the detection of trisomies, then SNPRelate for PCA and then either >>>>>> the >>>>>> emma or the GAPIT package (which includes emma) for the association >>>>>> testing. Since SNPRelate was written by your working group as well, >>>>>> does >>>>>> it also accept the new chromosome names? >>>>>> >>>>>> Regards >>>>>> Uli >>>>>> >>>>>> >>>>>> Am 19.12.2012 21:44, schrieb Stephanie M. Gogarten: >>>>>>> Dear Dr. Knief, >>>>>>> >>>>>>> GWASTools 1.5.5 (available here: >>>>>>>http://bioconductor.org/packages/2.12/bioc/html/GWASTools.html) now >>>>>>> allows you to change the chromosome annotations for autosomes. >>>>>>> There >>>>>>> is an example on the GenotypeData man page ("?GenotypeData") for how >>>>>>> to set up a GenotypeData object for a bird species. >>>>>>> >>>>>>> Stephanie >>>>>>> >>>>>>> On 11/15/12 1:50 AM, Ulrich Knief wrote: >>>>>>>> Hello Dr Gogarten, >>>>>>>> I would like to use your R package GWASTools but I am wondering >>>>>>>> whether >>>>>>>> it is possible to change the internal chromosome names. >>>>>>>> Specifically, >>>>>>>> the organism I am studying has more chromosomes than humans and it >>>>>>>> would >>>>>>>> thus be nice to change the chromosome annotations. Since I am >>>>>>>> working on >>>>>>>> a bird species it would also be nice to change X to Z but this >>>>>>>> is not >>>>>>>> absolutely necessary. >>>>>>>> Is that possible? >>>>>>>> >>>>>>>> Regards, >>>>>>>> Ulrich Knief >>>>>> >>> > > > > -- > J. Ulrich Knief > Max Planck Institute for Ornithology > Department of Behavioural Ecology & Evolutionary Genetics > Eberhard-Gwinner-Stra?e, House 7 > 82319 Seewiesen (Starnberg), Germany > Tel.: +49 (0) 8157 932 - 303 > > > >
Organism GWASTools Organism GWASTools SNPRelate • 2.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 606 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