Question: Subset analyze of multiple sample file in PLINK 1.9
1
gravatar for mike229lin
8 months ago by
mike229lin10
mike229lin10 wrote:

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 plink sequence • 313 views
ADD COMMENTlink modified 8 months ago by zx87547.1k • written 8 months ago by mike229lin10
1
gravatar for zx8754
8 months ago by
zx87547.1k
London
zx87547.1k wrote:

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 COMMENTlink modified 8 months ago • written 8 months ago by zx87547.1k

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 REPLYlink modified 8 months ago • written 8 months ago by mike229lin10

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 REPLYlink written 8 months ago by mike229lin10

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 REPLYlink written 8 months ago by mike229lin10
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.3.0
Traffic: 649 users visited in the last hour