Skip to content

doIBS -maxFreq argument removes all sites #652

@alexpiper

Description

@alexpiper

There seems to be an issue with the new doIBS -maxFreq parameter (set at -1.1 as default) in that causes removal of all sites.

Using latest github version 6b5d906

Running doIBS with default parameters

angsd -bam ${Sample}_bams.txt -sites sites.txt 
	-ref $(basename ${ReferenceGenome}) \
	-GL 2 -doMajorMinor 1 \
	-doCounts 1 -doIBS 1 \
	-nThreads 1 \
	-out results

-> Total number of sites analyzed: 223800
-> Number of sites retained after filtering: 0

Using github version 68b0838

angsd -bam ${Sample}_bams.txt -sites sites.txt 
	-ref $(basename ${ReferenceGenome}) \
	-GL 2 -doMajorMinor 1 \
	-doCounts 1 -doIBS 1 \
	-nThreads 1 \
	-out results

 -> Total number of sites analyzed: 223800
 -> Number of sites retained after filtering: 991

Edit: i think this is a bug in abcIBS.cpp

//remove low or highfreq (freq = major/total)
	  
if( minFreq  >  siteCounts[whichMax] * 1.0/NnonMis || 1-minFreq < siteCounts[whichMax] * 1.0/NnonMis || maxFreq > siteCounts[whichMax]  * 1.0/NnonMis )
      pars->keepSites[s] = 0;

I think it should instead be maxFreq < siteCounts[whichMax] * 1.0/NnonMis to retain sites below the maximum frequency?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions