rotheconrad / F100_Prok_Recombination

Repository for F100 method of prokaryote recombination analysis
1 stars 3 forks source link

AF_ANI_plot_GAM point size not working #1

Closed jianshu93 closed 9 months ago

jianshu93 commented 9 months ago

Hello Roth,

python F100_Prok_Recombination/00d_Workflow_Scripts/01b_fastANI_scatter_pyGAM.py -i fastANI_clade_Ic -s SAR11_Clade_Ic -m True -o AF_ANI_clade_Ic.pdf -xmin 88.0 -z True -g True -p 15.0 -a 1

I think the point size and transparency option did not work. I quote from kostas "several in the lab have used the code", but no body found this option did not work. Hope this helps. I attached the plot with the above command line options. Change of -p and -a showed the same plot, no changes. Let me know if I miss something.

Thank you,

Jianshu

AF_ANI_clade_Ic.pdf

jianshu93 commented 9 months ago

Hey Roth,

It seems the script 02d_f100_scatter_pyGAM.py, cannot adjust ymin, which looks strange when I have a collection of genomes with ANI around 94% or so (attached). I can change it there in the code but it will be more convenient to add to the command line option.

python 00d_Workflow_Scripts/02d_f100_scatter_pyGAM.py -i Simulated_Neutral_Model_Data.tsv -i2 OMZ_SAR11_Clade_Ic_F100_F100.tsv -o OMZ_SAR11_Clade_Ic_F100_model_simulated -xmin 88

Thank you,

Jianshu OMZ_SAR11_Clade_Ic_F100_model_simulated_GAMplot.pdf

rotheconrad commented 9 months ago

Hello Jianshu,

Thanks for the comment. The point size and point alpha settings do not work with the -z density layer setting. You get one or the other. For less than around n=1000 points, I don't think -z True is necessary. In which case the -p and -a params control normal MatPlotLib scatter point settings. With -z True, regular points are not plotted but instead the datashader package is used. This returns a rasterized scatter/heatmap image that is placed inside the figure axes. This works best with a lot of points.

Does that help?

rotheconrad commented 9 months ago

Hello Jianshu,

Thanks again for the additional comment. This is a good point. During development I have been letting Matplotlib auto-fit the y-axis as we were focused primarily on various x-axis ranges. But, I agree, y-axis parameters are needed. I'll add this soon.

Thank you.

rotheconrad commented 9 months ago

Added ymin and ymax params to 02d_f100_scatter_pyGAM.py