This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Separat The Samples As Carrier And Non-Carrier For A Genotype In Gwas ?

Hi,

I am working on a GWA dataset and I want to separate the samples based on a genotype i.e, as carriers and non-carriers for a particular genotype. Could anyone tell me how this can be done?

Thank you

gwas genotyping

1 answer

...supposing you work with R and your colums represent snp data and rows represent samples you could run something like this:

AAcarrier_idx = which(datasetname$markerid == 0)
AAcarrier = datsetname[AAcarrier_idx,]
ABcarrier_idx = which(datasetname$markerid == 1)
ABcarrier = datsetname[ABcarrier_idx,]
BBcarrier_idx = which(datasetname$markerid == 2)
BBcarrier = datsetname[BBcarrier_idx,]

but, please tell us more about data coding and tools you intend to adopt in the analysis...

Log in to answer this question.