--file flag unrecognized by plink2

120 views
Skip to first unread message

Carol Buitrago

unread,
Oct 4, 2018, 6:42:23 AM10/4/18
to plink2-users
Dear PLINK2 users,

I've been trying to use PLINK to prune out SNP is LD. I don't work either with humans or model organisms, so my reference genome is scaffold based and the number of scaffolds goes way beyond the "regular" number of chromosomes (e.g 22)

I've transformed my VCF file to PLINK format using vcftools. Yet since the field CHROM in my VCF files isn't an integer, Ive modified myself the .map file to include the number of scaffold that corresponds.

I've been successful to run LD pruning method with PLINK1.7
/Users/buitracn/Documents/RADseq/RADseq-Big-project/tools/plink-1.07-mac-intel/plink --file spis296.all.loci.plink --indep-pairwise 50 1 0.5

Yet, I have no had any success with either PLINK1.9 nor PLINK2

plink1.9 --file spis296.all.loci.plink --indep-pairwise 50 1 0.5
returns an Error: Invalid chromosome code '27' on line 3310 of .map file.

/Users/buitracn/Documents/RADseq/RADseq-Big-project/tools/plink2 --file spis296.all.loci.plink --indep-pairwise 5kb 0.5
returns Error: Unrecognized flag ('--file')

Could someone advise if the results that I have gotten with PLINK1.7 are reliable? or how can I get it done in PLINK2

Thanks in advance

Christopher Chang

unread,
Oct 4, 2018, 1:01:59 PM10/4/18
to plink2-users
This particular PLINK 1.07 command may have worked, but in general v1.07 does not handle chromosome numbers above 26, and it interprets 23=X, 24=Y, 25=pseudoautosomal region, and 26=MT.

The solution is to use the original non-numeric chromosome IDs, and run the PLINK 1.9 command with the --allow-extra-chr flag (can abbreviate to --aec) to turn on support for alphanumeric scaffold IDs.

(As for PLINK 2.0, --file has been deliberately omitted for now since the program is still in alpha testing.  If you need to access a feature in v2.0 that isn't in v1.9, use --make-bed to convert to PLINK binary format first, or import the VCF directly with --vcf.)
Reply all
Reply to author
Forward
0 new messages