idsubset for qtscore

Questions about GenABEL (aka *ABEL) suite of packages
Forum rules
Please remember not to post any sensitive data on this public forum.
The first few posts of newly registered users will be moderated in order to filter out any spammers.

When get a solution to the problem you posted, please change the topic name (e.g. from "how to ..." to "[SOLVED] how to ..."). This will make it easier for the community to follow the posts yet to be attended.
thurlowl
Posts: 1
Joined: Tue Feb 04, 2014 12:39 am

idsubset for qtscore

Postby thurlowl » Tue Feb 04, 2014 12:51 am

. I am trying to select a subset of my sheep Id’s for this particular GWAS but I can not get the subset function to work .


This is my code

Code: Select all

vec<-(phdata(df)$X1 == 1)
data2.qte <- qtscore(X.4, df,idsubset=vec, trait="gaussian")

I get this message in return

Code: Select all

Error: NAs in foreign function call (arg 7)

Phdata(df) is my dat file containing a list of id’s and phenotypes. Within this file I have SNPS list 1-15 and for each id they either have a 1 2 or 3 depending on the inheritance patterns of their alleles . for this instance above im just wanting to carry out GWAS on those that for SNP1 (X1) have a 1 which means they inherited their first allele from their sire and carry out a GWAS for trait (X.4) which is a meat trait (in millimeters) If you can help in any way please get back to me asap
Last edited by lckarssen on Tue Feb 04, 2014 10:51 am, edited 1 time in total.
Reason: Reformatted code with the [code] tag

Nicola Pirastu
GenABEL senior expert
GenABEL senior expert
Posts: 151
Joined: Wed Feb 09, 2011 3:24 pm

Re: idsubset for qtscore

Postby Nicola Pirastu » Sun Feb 09, 2014 8:29 am

If I understand correctly what you are trying to do, I think you should try something like:

Code: Select all

vec<-phdata(df)$id[which(phdata(df)$X1 == 1)]


There might be some NAs in $X1 which idsubset seems to not like very much.

Best.

Nicola


Return to “GenABEL”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest