ANGSD / angsd

Program for analysing NGS data.
230 stars 50 forks source link

visualizing the 2D-SFS #567

Closed yangwukaidi closed 1 year ago

yangwukaidi commented 1 year ago

hi. How do I visualize the 2D-SFS produced by this software? According to MFumagalli's tutorial (https://github.com/mfumagalli) . I try to get 2 D-SFS using the following script, Rscript $NGSTOOLS/Scripts/plot2DSFS.R Results/LWK.PEL.sfs LWK-PEL 10-10 But I failed, and I got a strange picture. As follows 1680575567157 How can these problems be solved? I get 2D-SFS file with only one row in it. Is that correct? Look forward to your reply! Thanks!

ANGSD commented 1 year ago

Plotting the 2dsfs can be abit tricky and will likely require some tweaking since it is visualized as a heatmap. It should indeed be one row, this is a flattened matrix. If you want to validate correctness of dimension you can convert to a matrix and look at the 1d marginals.

On 4 Apr 2023, at 04.34, yangwukaidi @.***> wrote:

hi. How do I visualize the 2D-SFS produced by this software? According to MFumagalli's tutorial (https://github.com/mfumagalli) . I try to get 2 D-SFS using the following script, Rscript $NGSTOOLS/Scripts/plot2DSFS.R Results/LWK.PEL.sfs LWK-PEL 10-10 But I failed, and I got a strange picture. As follows https://user-images.githubusercontent.com/127917612/229671814-fba48e22-15e6-4d27-a343-a91db5e8f235.png How can these problems be solved? I get 2D-SFS file with only one row in it. Is that correct? Look forward to your reply! Thanks!

— Reply to this email directly, view it on GitHub https://github.com/ANGSD/angsd/issues/567, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQOR3X7WE6Z3VDV4IOZAPDW7OCDNANCNFSM6AAAAAAWSCT5PE. You are receiving this because you are subscribed to this thread.