Question: Remove Some Snps In Plink
1
gravatar for mary
6.8 years ago by
mary200
Bologna university
mary200 wrote:

Hello all

I want remove some snp from map and also genotype from ped file. I used this command in plink:

plink --file FILE  --exclude SNP-LIST-FILE

I think the some SNP in map file should be deleted and also genotype in ped, but when I check the number of raw in map and the column of ped file its same as before exclude

is there any one know my snp in snplist excluded or not?

thanks

plink • 9.2k views
ADD COMMENTlink modified 3.7 years ago by chenhr0 • written 6.8 years ago by mary200
6
gravatar for Giovanni M Dall'Olio
6.8 years ago by
London, UK
Giovanni M Dall'Olio26k wrote:

Your command is correct, but you should add two options: --out and --recode. If you don't specify these, plink executes the commands and prints a summary to the screen (and to the .log file), but does not actually write the results to a ped file nor overwrites your original data.

The --recode option specifies that you want to write a .ped file as output. The --out option specifies the suffix of the output file:

plink --file mydata --exclude snp_list --recode --out filter_data

Also, check that the the SNP-LIST-FILE is formatted correctly. It must contain the ids of the SNPs that you want to remove:

ADD COMMENTlink modified 6.8 years ago • written 6.8 years ago by Giovanni M Dall'Olio26k

I also used the above command but it only removes one occurrence and the remaining stays the same. For example, if rs12345 occurs 5 times, it only removes one of them.

Is there a way of removing all occurrences in one go?

ADD REPLYlink written 6.6 years ago by roll290
1
gravatar for mary
6.8 years ago by
mary200
Bologna university
mary200 wrote:

thank you very much. it worked

ADD COMMENTlink written 6.8 years ago by mary200
1
gravatar for emblascz
4.7 years ago by
emblascz10
United States
emblascz10 wrote:

Does this completely remove records or just recode them so PLINK doesn't use the data?  I want the new PED file to actually have fewer records. I am the data manager for a project using using PLINK and we've discovered consent issues with a handful of cases. I want to completely eliminate their data, not just recode data so PLINK doesn't use it.  Is this the best way to do that? 

Thanks,

Emily

ADD COMMENTlink modified 4.7 years ago • written 4.7 years ago by emblascz10
1

With --recode (or better, --make-bed), the newly written file will not contain the excluded records at all.

ADD REPLYlink written 4.7 years ago by chrchang5235.5k
0
gravatar for roll
6.6 years ago by
roll290
United Kingdom
roll290 wrote:

I also used the above command but it only removes one occurrence and the remaining stays the same. For example, if rs12345 occurs 5 times, it only removes one of them.

Is there a way of removing all occurrences in one go?

ADD COMMENTlink written 6.6 years ago by roll290
0
gravatar for chenhr
3.7 years ago by
chenhr0
chenhr0 wrote:

hello

I want to used .ped and .map file to make population structure by frappe with a maximum
likelihood method.first ,I used this command in plink:  plink --ped DataResult.ped --recode12 ,then used this command in frappe: frappe MyParamSim.txt, but it aways failed,the error as follow:

        marker 664146 has only 2 non-missing alleles (8 required)
        marker 664153 has only 2 non-missing alleles (8 required)
        marker 664155 has only 4 non-missing alleles (8 required)
        marker 664171 has only 2 non-missing alleles (8 required)
        marker 664201 has only 2 non-missing alleles (8 required)
        marker 664203 has only 6 non-missing alleles (8 required)
        marker 664231 has only 2 non-missing alleles (8 required)
        marker 664255 has only 2 non-missing alleles (8 required)
        marker 664265 has only 6 non-missing alleles (8 required)
        marker 664270 has only 6 non-missing alleles (8 required)
        marker 664278 has only 4 non-missing alleles (8 required)
        marker 664295 has only 6 non-missing alleles (8 required)
        marker 664297 has only 6 non-missing alleles (8 required)
        marker 664309 has only 6 non-missing alleles (8 required)
        marker 664362 has only 6 non-missing alleles (8 required)----

 according to the error,i used this command in plink: plink --file DataResult.ped --geno 0.1,but it fail.

please help me ,please,thankyou!

ADD COMMENTlink written 3.7 years ago by chenhr0
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: 1886 users visited in the last hour