Gwa
manhattan(input_data, x_col=None, y_col='NLOG10_PVAL', scatter_kwargs=None, highlight_snps=None, highlight_snps_kwargs=None, chrom_sep_color='#f0f0f0', add_bonf_line=True, bonf_line_kwargs=None)
¶
Generate Manhattan plot where the x-axis is the genomic position (in BP) and the y-axis is the -log10(p-value) or some other statistic of the user's choice.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data
|
Union[GWADataLoader, SumstatsTable, DataFrame]
|
An instance of |
required |
x_col
|
The column name in the input data that contains the x-axis values. Defaults to None. If the user passes |
None
|
|
y_col
|
The column name in the input data that contains the y-axis values (default: 'NLOG10_PVAL'). |
'NLOG10_PVAL'
|
|
scatter_kwargs
|
A dictionary of keyword arguments to pass to the |
None
|
|
highlight_snps
|
A list or array of SNP rsIDs to highlight on the scatter plot. |
None
|
|
highlight_snps_kwargs
|
A dictionary of keyword arguments to pass to the |
None
|
|
chrom_sep_color
|
The color for the chromosome separator block. |
'#f0f0f0'
|
|
add_bonf_line
|
If True, add a line indicating the Bonferroni significance threshold. |
True
|
|
bonf_line_kwargs
|
The color of the Bonferroni significance threshold line. |
None
|
Source code in magenpy/plot/gwa.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
qq_plot(input_data, statistic='p_value')
¶
Generate a quantile-quantile (QQ) plot for the GWAS summary statistics. The function supports plotting QQ plots for the -log10(p-values) as well as the z-score (if available).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data
|
Union[GWADataLoader, SumstatsTable]
|
An instance of |
required |
statistic
|
The statistic to generate the QQ plot for. We currently support |
'p_value'
|