Subset analyze of multiple sample file in PLINK 1.9
1
1
Entering edit mode
5.7 years ago
mike229lin ▴ 50

Hello,

I want to do GWAS with PLINK. I already have a data containing all the samples and have done association analyze with plink command below.

plink --bfile All_SNP.binary --make-pheno phenotype.pheno "phenoA" --aec --assoc --reference-allele All_alt_alleles --allow-no-sex --adjust --noweb --out output &

However, there are four groups of samples and I want to analyze the GWAS in two of these groups which are different phenotypes.

Is there any way indicating plink which of the two to analyze ?

The sample's information looks like this:

sample1  phenoB    location1
sample2  phenoB    location1
sample3  phenoA   location1
sample4  phenoA   location1
sample5  phenoB    location2
sample6  phenoB    location2
sample7  phenoA   location2
sample8  phenoA   location2

I have analyzed the association between phenoA and SNP sites

however, I want to analyze the association between phenoA and SNP sites of samples only in location1 and location2 separately. Is --within argument in PLINK useful in such a situation?

Thanks for help

SNP sequence plink • 2.2k views
ADD COMMENT
1
Entering edit mode
5.7 years ago
zx8754 11k

Using input filters for samples: --keep or --remove

We can use grep to make mylist_location1.txt something like:

grep location1 myFile.txt > mylist_location1.txt

Then run plink with filter keep:

plink --file data --keep mylist_location1.txt
ADD COMMENT
0
Entering edit mode

Thanks for your help

So, the command

plink --file data --keep mylist_location1.txt

means that PLINK generate the binary files with the list from my input data? the command may look like plink --file data --keep mylist_location1.txt --make-bed --out output.binary?

or means I can only use the list to generate an association analyze like

'plink --file data.binary --keep mylist_location1.txt --assoc --make-pheno phenotype.pheno "phenoB" --adjust --allow-no-sex --out output'

ADD REPLY
0
Entering edit mode

Besides that How about using

--within [filename] <keep-na> ?

I want to know how to use clusters of samples, but I don't quite understand the format of cluster file

ADD REPLY
0
Entering edit mode

I have tried the --keep mylist_location.txt in my command But it shows

Error: Line 1 of --keep file has fewer tokens than expected.

the format in mylist_location1.txt looks like

sample1
sample2
sample3
sample4

but it shows Error in the end

ADD REPLY

Login before adding your answer.

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