--sample-diff problem specifying ids

351 views
Skip to first unread message

Michael

unread,
Jun 7, 2021, 3:57:20 PM6/7/21
to plink2-users
Hello, 

   I am having trouble calling --sample-diff using the 'ids=sampleId1 sampleId2' 

For example executing:

./plink2 --vcf TBP_Walker_merged.vcf.gz --out TBP_Walker_merged.diff --allow-extra-chr --sample-diff 'id-delim=,' 'ids=SRR1158874,SRR1158890'


gives the output below with error: Error: --sample-diff 'base='/'ids=' require 2 or more space-separated sample

executing this same command using the file='samples.txt' with the same two samples works fine.   Any idea what is wrong?   I am working on a Mac.


 Thanks !

Output:

PLINK v2.00a3 64-bit (25 May 2021)             www.cog-genomics.org/plink/2.0/

(C) 2005-2021 Shaun Purcell, Christopher Chang   GNU General Public License v3

Logging to TBP_Walker_merged.diff.log.

Options in effect:

  --allow-extra-chr

  --out TBP_Walker_merged.diff

  --sample-diff id-delim=, ids=SRR1158874,SRR1158890

  --vcf TBP_Walker_merged.vcf.gz


Start time: Mon Jun  7 15:52:19 2021

Error: --sample-diff 'base='/'ids=' require 2 or more space-separated sample

IDs.

Ashish Jayamohan

unread,
Jun 7, 2021, 4:28:09 PM6/7/21
to Michael, plink2-users
Hello,
I believe the id's need to be space separated, not comma separated.
Best,
Ashish J

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plink2-users/47c0a68d-0452-4833-a5e4-ffdbf06ba9a1n%40googlegroups.com.


--
Regards,
Ashish Jayamohan

Michael

unread,
Jun 7, 2021, 4:32:36 PM6/7/21
to plink2-users
Thanks Ashish.   I did specify the --sample-diff 'id-delim=,'   in the command.  I also tried using spaces but that didn't seem to help.  

       Regards, 

          Michael 

Christopher Chang

unread,
Jun 7, 2021, 4:37:42 PM6/7/21
to plink2-users
id-delim= specifies the delimiter between PARTS of a sample ID (FID vs. IID vs. SID).

Michael

unread,
Jun 8, 2021, 9:57:30 AM6/8/21
to plink2-users
Unfortunately, I  still having problems with the --sample-diff command:   For example:

 ./plink2 --vcf all_TB2225_06022020_nc000962.merge.norm.snps.anno.vcf --out all_TB2225.diff --allow-extra-chr --sample-diff  'ids=SRR5152915 SRR5152916 SRR5152917 SRR5152918 SRR5152919 SRR5152920'

still results in error message:

Error: --sample-diff 'base='/'ids=' require 2 or more space-separated sample

IDs.


The ids listed are listed in the header of the VCF file.   Any advice is much appreciated.   Thanks, 


 Michael


Christopher Chang

unread,
Jun 8, 2021, 10:45:48 AM6/8/21
to plink2-users
Why are you quoting the "ids=" section?  That's confusing the argument parser.

Michael

unread,
Jun 8, 2021, 1:26:14 PM6/8/21
to plink2-users
That was the problem.   Thanks very much!

Michael
Reply all
Reply to author
Forward
0 new messages