Search
Question: GENESIS: assocTestMM error for lack of sex chromosome info (not relevant for this species)
0
gravatar for naglemi
11 weeks ago by
naglemi0
naglemi0 wrote:

I'm working with a species that does not have sex chromosomes. The only part of the workflow in which I see I can note this is while building the GRM – by setting the option autosome.only to TRUE. I've looked through R documentation for assoctestMM and don't see a way to specify that there are no sex chromosomes in this dataset. How can I do this? Thanks for your time.

Here are relevant lines prior to the line causing the error, showing how I specify autosome-only to be TRUE:

grm <- snpgdsGRM(genofile, sample.id=keep, snp.id=NULL, autosome.only=TRUE, remove.monosnp=TRUE, maf=.05, missing.rate=.05, method="GCTA", num.thread=1L, with.id=TRUE, verbose=TRUE)
GRM=grm$grm
row.names(GRM)=grm$sample.id
colnames(GRM)=grm$sample.id
scanAnnotTRANS=ScanAnnotationDataFrame(mydat)
LMMnullmod=fitNullMM(scanData=scanAnnotTRANS,outcome="SW3_TDZ",covMatList=GRM, family=gaussian)

Here is the line that causes the errror, and the error:

> assoc <- assocTestMM(genoData = genoData, nullMMobj = LMMnullmod, test = "Wald")
Error in assocTestMM(genoData = genoData, nullMMobj = LMMnullmod, test = "Wald") : 
  Sex values for the samples are required to compute MAF for X chromosome SNPs
ADD COMMENTlink modified 11 weeks ago by mconomos20 • written 11 weeks ago by naglemi0
0
gravatar for mconomos
11 weeks ago by
mconomos20
United States
mconomos20 wrote:
Hello, How many chromosomes does your species have? Also, are all chromosomes diploid for all individuals? The reason assocTestMM wants sex is so that chromosome 23 (which typically represents the X chromosome in humans) can be coded correctly for males vs. females. If all of your individuals are diploid at all chromosomes, then the easiest thing might be to make a fake sex column in your scanAnnot that says 'F' for everyone. Let me know if you have further questions. Best, Matt On Tue, Jul 24, 2018 at 7:59 PM, naglemi [bioc] <noreply@bioconductor.org> wrote: > Activity on a post you are following on support.bioconductor.org > > User naglemi <https: support.bioconductor.org="" u="" 16588=""/> wrote Question: > GENESIS: assocTestMM error for lack of sex chromosome info (not relevant > for this species) <https: support.bioconductor.org="" p="" 111361=""/>: > > I'm working with a species that does not have sex chromosomes. The only > part of the workflow in which I see I can note this is while building the > GRM – by setting the option autosome.only to TRUE. I've looked through R > documentation for assoctestMM and don't see a way to specify that there are > no sex chromosomes in this dataset. How can I do this? Thanks for your time. > > Here are relevant lines prior to the line causing the error, showing how I > specify autosome-only to be TRUE: > > grm <- snpgdsGRM(genofile, sample.id=keep, snp.id=NULL, autosome.only=TRUE, remove.monosnp=TRUE, maf=.05, missing.rate=.05, method="GCTA", num.thread=1L, with.id=TRUE, verbose=TRUE) > GRM=grm$grm > row.names(GRM)=grm$sample.id > colnames(GRM)=grm$sample.id > scanAnnotTRANS=ScanAnnotationDataFrame(mydat) > LMMnullmod=fitNullMM(scanData=scanAnnotTRANS,outcome="SW3_TDZ",covMatList=GRM, family=gaussian) > > Here is the line that causes the errror, and the error: > > > assoc <- assocTestMM(genoData = genoData, nullMMobj = LMMnullmod, test = "Wald") > Error in assocTestMM(genoData = genoData, nullMMobj = LMMnullmod, test = "Wald") : > Sex values for the samples are required to compute MAF for X chromosome SNPs > > ------------------------------ > > Post tags: GENESIS, assoctestmm, GWAS > > You may reply via email or visit https://support.bioconductor. > org/p/111361/ > -- Matthew P. Conomos, PhD. Research Scientist Department of Biostatistics Genetics Analysis Center University of Washington Seattle, WA 98105-1016, USA email: mconomos@uw.edu phone: (206) 685-8848
ADD COMMENTlink written 11 weeks ago by mconomos20

Thank you for this suggestion. I've gotten it to work with a modification of the approach you suggested, and am now trying to figure out how to avoid this roundabout method. When I create a column for sex and set them all to either M or F, I get the following:

> assoc <- assocTestMM(genoData = genoData, nullMMobj = LMMnullmod, test = "Wald")

Error in assocTestMM(genoData = genoData, nullMMobj = LMMnullmod, test = "Wald") :

  Y chromosome SNPs should be analyzed with only males

 

Fortunately, there are some genotypes with NA phenotypes. If I change one of these so that one genotype is M or F and all the others are the other sex, it seems to work – no error. However, this is not ideal. In the future, we'll have datasets with no NA values, so this won't work. Can you suggest a good way to get around this?

​Thanks!

ADD REPLYlink modified 24 days ago • written 24 days ago by naglemi0

In the next release of GENESIS, assocTestMM will be deprecated in favor of a new function called assocTestSingle that does not have such strict requirements about chromosome and sex coding. (If you have chromosomes called X and Y and supply a sex column it will do the right thing with frequency, if not, it will treat all chromosomes the same.) If you want to try out this function sooner, you can install the development versions of GWASTools and GENESIS. Instructions for using devel are here: http://www.bioconductor.org/developers/how-to/useDevel/

ADD REPLYlink written 24 days ago by Stephanie M. Gogarten560
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 436 users visited in the last hour