xiaoming-liu / stairway-plot-v2

The stairway plot is a method for inferring detailed population demographic history using the site frequency spectrum (SFS) from DNA sequence data.
Other
31 stars 4 forks source link

SFS number from ANGSD not n-1..? #4

Closed cistarsa closed 3 years ago

cistarsa commented 3 years ago

Hello and thank you for this nifty program. I'm looking at recent changes in demographic history for two recently diverged populations (n=25) from an unfolded sfs spectra generated in ANGSD and realSFS as:


# angsd run for saf output:
./angsd/angsd -nThreads 28 -b WI_bam.list -out WI_angsd_sfs -doSaf 1 -minMapQ 1 -minQ 20 -GL 1 -anc F_Kansas_60.fasta

## sfs reconstruction using largest chromosome ~60MB
./angsd/misc/realSFS WI_angsd_sfs.saf.idx -r F_KS_P_RNA_scaffold_9 > WI_angsd_sfs_scaff9

However, the output from the realsfs command gives me 51 (2n+1) SFS not 49 (2n-1), which is consistent with the doc

any suggestions on how to generate SFS that can be used by your program? Thank you!

LZarri commented 2 years ago

Hello @xiaoming-liu I'm experiencing the same issue, did you drop the first two values or the first value and the last value? Thanks so much

xiaoming-liu commented 2 years ago

0 and n are not included.

On Thu, Feb 10, 2022 at 1:55 PM LZarri @.***> wrote:

Hello @xiaoming-liu https://github.com/xiaoming-liu I'm experiencing the same issue, did you drop the first two values or the first value and the last value? Thanks so much

— Reply to this email directly, view it on GitHub https://github.com/xiaoming-liu/stairway-plot-v2/issues/4#issuecomment-1035338431, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALODKSH7P3QFPDCX4JRJBMDU2QCYZANCNFSM44H2CUXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

xuefenfei712 commented 2 years ago

Hello, @xiaoming-liu, here you mean that the first and last number of sfs should be trash? Thankyou