ANGSD/angsd

Transitions not removed by -noTrans

OKersten opened this issue · 0 comments

Hi,

I am wondering whether I discovered a bug regarding removing transitions. This is with angsd 0.941 (but I think this behaviour is also observable in previous versions).
When running the following commands, I am getting different # of sites indicating that transitions are not removed despite adding the flag.

rmTrans + doMajorMinor

angsd -b bams_test2 -GL 1 -uniqueOnly 1 -remove_bads 1 -only_proper_pairs 1 -rmTrans 1 -C 50 -baq 2 -minMapQ 20 -minQ 20 -setMaxDepth 200 -doCounts 1 -doMajorMinor 1 -P 16 -ref Ref.fasta -anc Ref.fasta -r Chr_24 -out Chr_24 

--> 2,327,396 sites after filtering

noTrans + doMajorMinor

angsd -b bams_test2 -GL 1 -uniqueOnly 1 -remove_bads 1 -only_proper_pairs 1 -noTrans 1 -C 50 -baq 2 -minMapQ 20 -minQ 20 -setMaxDepth 200 -doCounts 1 -doMajorMinor 1 -P 16 -ref Ref.fasta -anc Ref.fasta -r Chr_24 -out Chr_24 

--> 3,433,604 sites after filtering

noTrans + doSaf (as in http://www.popgen.dk/angsd/index.php/SFS_Estimation)

angsd -b bams_test2 -GL 1 -uniqueOnly 1 -remove_bads 1 -only_proper_pairs 1 -noTrans 1 -C 50 -baq 2 -minMapQ 20 -minQ 20 -setMaxDepth 200 -doCounts 1 -doSaf 1 -P 16 -ref Ref.fasta -anc Ref.fasta -r Chr_24 -out Chr_24 

--> 3,433,604 sites after filtering

rmTrans + doSaf

angsd -b bams_test2 -GL 1 -uniqueOnly 1 -remove_bads 1 -only_proper_pairs 1 -rmTrans 1 -C 50 -baq 2 -minMapQ 20 -minQ 20 -setMaxDepth 200 -doCounts 1 -doSaf 1 -P 16 -ref Ref.fasta -anc Ref.fasta -r Chr_24 -out Chr_24 

--> ERROR (-rmTrans flag cannot be used with -doSaf)

Now from how I see and understand this, it is only in the first case that transitions are actually removed?! Can that be right?
If that is the case, I guess one should always use -rmTrans and if one plans on using -doSaf, they would need to do a pre-run to get a selection of sites and use those than in the post-run with -doSaf.

-Oliver