API
GeneticsMakie.findclosestgene
GeneticsMakie.findgene
GeneticsMakie.findgwasloci
GeneticsMakie.labelgenome
GeneticsMakie.mungesumstats!
GeneticsMakie.parsegtf!
GeneticsMakie.plotgenes!
GeneticsMakie.plotgenes!
GeneticsMakie.plotgwas!
GeneticsMakie.plotisoforms!
GeneticsMakie.plotld
GeneticsMakie.plotlocus!
GeneticsMakie.plotloops!
GeneticsMakie.plotqq!
GeneticsMakie.plotrg
GeneticsMakie.findclosestgene
— Methodfindclosestgene(chr::AbstractString, bp::Real, gencode::DataFrame; start::Bool, proteincoding::Bool)
-findclosestgene(df::DataFrame, gencode::DataFrame; start::Bool, proteincoding::Bool)
Find the closest gene(s) to a genomic coordinate or a list of genomic coordinates using gencode
.
Optionally, the closest gene can be defined from the gene start site using start
, and only protein coding genes can be considered using proteincoding
. The default start
and proteincoding
are false
.
GeneticsMakie.findgene
— Methodfindgene(gene::AbstractString, gencode::DataFrame)
Find chromosome, gene start, and gene stop sites for the gene
of interest.
GeneticsMakie.findgwasloci
— Methodfindgwasloci(gwas::DataFrame; p::Real)
-findgwasloci(gwas::Vector{DataFrame}; p::Real)
Find genome-wide significant loci for gwas
that are separated from each other by at least 1 Mb.
Alternatively, find genome-wide significant loci across multiple gwas
that are all separated by at least 1 Mb. p
determines the genome-wide significance threshold, which is 5e-8 by default.
GeneticsMakie.labelgenome
— Methodlabelgenome(g::GridPosition, chromosome::AbstractString, range1::Real, range2::Real)
Label g
with a given chromosome
and genomic range between range1
and range2
.
GeneticsMakie.mungesumstats!
— Methodmungesumstats!(gwas::DataFrame)
-mungesumstats!(gwas::Vector{DataFrame})
Munge gwas
by harmonizing the names of columns, their types, and P values, among others.
GeneticsMakie.parsegtf!
— Methodparsegtf!(gencode::DataFrame)
Parse gencode
by extracting gene_id
, gene_name
, gene_type
, transcript_id
, transcript_support_level
information from the info
column.
GeneticsMakie.plotgenes!
— Methodplotgenes!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, gencode::DataFrame)
+findclosestgene(df::DataFrame, gencode::DataFrame; start::Bool, proteincoding::Bool)
Find the closest gene(s) to a genomic coordinate or a list of genomic coordinates using gencode
.
Optionally, the closest gene can be defined from the gene start site using start
, and only protein coding genes can be considered using proteincoding
. The default start
and proteincoding
are false
.
GeneticsMakie.findgene
— Methodfindgene(gene::AbstractString, gencode::DataFrame)
Find chromosome, gene start, and gene stop sites for the gene
of interest.
GeneticsMakie.findgwasloci
— Methodfindgwasloci(gwas::DataFrame; p::Real)
+findgwasloci(gwas::Vector{DataFrame}; p::Real)
Find genome-wide significant loci for gwas
that are separated from each other by at least 1 Mb.
Alternatively, find genome-wide significant loci across multiple gwas
that are all separated by at least 1 Mb. p
determines the genome-wide significance threshold, which is 5e-8 by default.
GeneticsMakie.labelgenome
— Methodlabelgenome(g::GridPosition, chromosome::AbstractString, range1::Real, range2::Real)
Label g
with a given chromosome
and genomic range between range1
and range2
.
GeneticsMakie.mungesumstats!
— Methodmungesumstats!(gwas::DataFrame)
+mungesumstats!(gwas::Vector{DataFrame})
Munge gwas
by harmonizing the names of columns, their types, and P values, among others.
GeneticsMakie.parsegtf!
— Methodparsegtf!(gencode::DataFrame)
Parse gencode
by extracting gene_id
, gene_name
, gene_type
, transcript_id
, transcript_support_level
information from the info
column.
GeneticsMakie.plotgenes!
— Methodplotgenes!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, gencode::DataFrame)
plotgenes!(ax::Axis, chromosome::AbstractString, bp::Real, gencode::DataFrame)
plotgenes!(ax::Axis, gene::AbstractString, gencode::DataFrame)
Plot collapsed gene bodies for genes within a given chromosome
and genomic range between range1
and range2
.
Alternatively, plot within a given chromosome
and a certain window
around a genomic coordinate bp
or plot within a certain window
around gene
.
Keyword arguments
height height of exons; default 0.25
genecolor color of genes; default :royalblue
textcolor color of gene labels; default :black
-window window around bp or gene; default 1e6
GeneticsMakie.plotgenes!
— Methodplotgenes!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, highlight::Tuple{AbstractVector, AbstractVector}, gencode::DataFrame; height::Real)
+window window around bp or gene; default 1e6
GeneticsMakie.plotgenes!
— Methodplotgenes!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, highlight::Tuple{AbstractVector, AbstractVector}, gencode::DataFrame; height::Real)
plotgenes!(ax::Axis, chromosome::AbstractString, bp::Real, highlight::Tuple{AbstractVector, AbstractVector}, gencode::DataFrame; window::Real, height::Real)
-plotgenes!(ax::Axis, gene::AbstractString, highlight::Tuple{AbstractVector, AbstractVector}, gencode::DataFrame; window::Real, height::Real)
Plot gene bodies with a vector of genes highlighted by a vector of colors via highlight
.
GeneticsMakie.plotgwas!
— Methodplotgwas!(ax::Axis, gwas::DataFrame)
Plot gwas
results as a Manhattan plot.
Keyword arguments
ymax maximum value for y-axis
+plotgenes!(ax::Axis, gene::AbstractString, highlight::Tuple{AbstractVector, AbstractVector}, gencode::DataFrame; window::Real, height::Real)
Plot gene bodies with a vector of genes highlighted by a vector of colors via highlight
.
GeneticsMakie.plotgwas!
— Methodplotgwas!(ax::Axis, gwas::DataFrame)
Plot gwas
results as a Manhattan plot.
Keyword arguments
ymax maximum value for y-axis
p genome-wide significance threshold; default 5e-8
linecolor color of genome-wide significance line, which can be turned off by setting to nothing; default :red2
scattercolor color of genome-wide significant variants, which can be turned off by setting to nothing; default "#4DB069"
chromcolors colors of even and odd chromosomes; default ["#0D0D66", "#7592C8"]
-build::Int human genome build; default 37
GeneticsMakie.plotisoforms!
— Methodplotisoforms!(ax::Axis, gene::AbstractString, gencode::DataFrame)
Plot each isoform of a given gene
on a separate row.
Keyword arguments
orderby::Union{Nothing, AbstractVector{<:AbstractString}} order of isoforms; default nothing
+build::Int human genome build; default 37
GeneticsMakie.plotisoforms!
— Methodplotisoforms!(ax::Axis, gene::AbstractString, gencode::DataFrame)
Plot each isoform of a given gene
on a separate row.
Keyword arguments
orderby::Union{Nothing, AbstractVector{<:AbstractString}} order of isoforms; default nothing
highlight::Union{Nothing, Tuple{AbstractVector, AbstractVector}} isoforms to be highlighted and their colors; default nothing
height height of exons; default 0.25
isoformcolor color of isoforms; default :royalblue
textcolor color of isoform labels; default :black
-text::Union{Bool, Symbol} position of isoform labels; default :top
GeneticsMakie.plotld
— Methodplotld(LD::AbstractMatrix; kwargs)
+text::Union{Bool, Symbol} position of isoform labels; default :top
GeneticsMakie.plotld
— Methodplotld(LD::AbstractMatrix; kwargs)
plotld!(ax::Axis, LD::AbstractMatrix; kwargs)
Heatmap of symmetric correlation matrix LD
with the diagonal elements on the x-axis.
Keyword arguments
threshold threshold below which values are ignored; default 1/9
colormap colormap of values; default cgrad(:Blues_9, 9, categorical = true)
colorrange start and end points of colormap; default (0, 1)
-strokewidth width of outline around heatmap boxes; default 0
GeneticsMakie.plotlocus!
— Methodplotlocus!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, gwas::DataFrame; kwargs)
+strokewidth width of outline around heatmap boxes; default 0
GeneticsMakie.plotlocus!
— Methodplotlocus!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, gwas::DataFrame; kwargs)
plotlocus!(ax::Axis, chromosome::AbstractString, bp::Real, gwas::DataFrame; kwargs)
plotlocus!(ax::Axis, gene::AbstractString, gwas::DataFrame, gencode::DataFrame; kwargs)
Plot gwas
results within a given chromosome
and genomic range between range1
and range2
.
Alternatively, plot within a given chromosome
and a certain window
around a genomic coordinate bp
or plot within a certain window
around gene
.
Keyword arguments
ld::Union{Nothing, SnpData, Tuple{SnpData, Union{AbstractString, Tuple{AbstractString, Int}}}} default nothing
ymax maximum value for y-axis
-window window around genomic coordinate or gene; default 1e6
GeneticsMakie.plotloops!
— Methodplotloops!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, loopdf::DataFrame)
+window window around genomic coordinate or gene; default 1e6
GeneticsMakie.plotloops!
— Methodplotloops!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, loopdf::DataFrame)
plotloops!(ax::Axis, chromosome::AbstractString, bp::Real, loopdf::DataFrame)
plotloops!(ax::Axis, gene::AbstractString, loopdf::DataFrame, gencode::DataFrame)
Plot loops present in loopdf
within a given chromosome
and genomic range between range1
and range2
.
Alternatively, plot within a given chromosome
and a certain window
around a genomic coordinate bp
or plot within a certain window
around gene
.
Keyword arguments
ymax maximum value for y-axis; default 102
linewidth line width of the arcs; default 0.25
colorarc color of arcs; default #9658B2
colorend color of arcs' ends; default ("#FFBB00", 0.5)
resolution plot `resolution` points along x-axis within the given range; default 1000
-window window around genomic coordinate or gene; default 1e6
GeneticsMakie.plotqq!
— Methodplotqq!(ax::Axis, P::AbstractVector)
+window window around genomic coordinate or gene; default 1e6
GeneticsMakie.plotqq!
— Methodplotqq!(ax::Axis, P::AbstractVector)
plotqq!(ax::Axis, gwas::DataFrame)
Plot QQ plot of P
values where the expected distribution is the uniform distribution.
Keyword arguments
xstep x-axis ticks step size; default 1
-ystep y-axis ticks step size; default 2
GeneticsMakie.plotrg
— Methodplotrg(r::AbstractMatrix)
+ystep y-axis ticks step size; default 2
GeneticsMakie.plotrg
— Methodplotrg(r::AbstractMatrix)
plotrg!(ax::Axis, r::AbstractMatrix)
Correlation plot of matrix r
.
Keyword arguments
circle whether to draw cicles instead of rectangles; default true
diagonal whether to visualize diagonal elements; default false
colormap colormap of values; default :RdBu_10
colorrange start and end points of colormap; default (-1, 1)
-strokewidth width of outline around surrounding boxes; default 0.5