problem of "ordering in physical positions" phasing SNPs with Shapeit I'm trying to phase my data (whole genome resequencing SNPs) with Shapeit (from ped file) and I get this error message : 

[33mERROR:[0m Wrong ordering in physical positions curr_pos=54 prev_pos=65


I found that it's due to the fact that my .map file is like this (4 columns):  

Chromosome_number    SNP_ID   SNP_genetic_position    SNP_physical_position  
Contig100131            .              0                        65  
Contig100220            .              0                        54  


And Shapeit only looks at SNP_physical_position but does not check if the SNPs are on the same contig or not and so it says it is not happy because position 54 is after 65! 

How could I make it understand that the positions are not in the same contig and so there is no mistake? Must I run Shapeit per contig (I have a lot of them so I hope not)?
The manual suggests that each &quot;chromosome&quot; needs to have its own input file.

You have to split the dataset by chromosomes. ShapeIT can just phase one chromosome at a time. If you are working on GWA data, you can proceed as follows:

for chr in $(seq 1 22) ; do plink --file example --chr $chr --recode --out example_chr$chr ; done

You will obtain 44 files; example_chr1.ped, example_chr1.map, ..., example_chr22.ped, example_chr22.map that you can phase separately.