kaustubhad / fastman

An R package for fast and efficient visualizing of GWAS results using Q-Q and Manhattan plots directly from PLINK output files.
GNU General Public License v3.0
36 stars 8 forks source link

Set negative gap.axis so that all contig (chr) labels are always printed #13

Closed mja closed 11 months ago

mja commented 1 year ago

Tick labels for smaller chromosomes (20, 21, 22) sometimes get dropped. The threshold for this is determined by the axis(gap.axis=)parameter, so setting it to a negative number ensures that labels are never dropped. Label overprinting can then be controlled through a combination of thecex.axis` argument and output width.

kaustubhad commented 11 months ago

Hi mja, Sorry for the delay. We don't want to set a negative value as default, since this can lead to the labels having overlap and becoming unreadable. If you create an image with half the width of the standard output image and gap.axis = -1, you will see this. The problem is particularly severe for non-model data where contig names can be very long. Instead, we have added gap.axis as an input parameter in the function. The default value is R's default value so will continue the default behaviour. But if you want you can pass -1 to this parameter when calling the function. Hope that is satisfactory. Cheers, Kaustubh.