API

GeneticsMakie.findclosestgeneMethod
findclosestgene(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.

source
GeneticsMakie.findgeneMethod
findgene(gene::AbstractString, gencode::DataFrame)

Find chromosome, gene start, and gene stop sites for the gene of interest.

source
GeneticsMakie.findgwaslociMethod
findgwasloci(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.

source
GeneticsMakie.labelgenomeMethod
labelgenome(g::GridPosition, chromosome::AbstractString, range1::Real, range2::Real)

Label g with a given chromosome and genomic range between range1 and range2.

source
GeneticsMakie.mungesumstats!Method
mungesumstats!(gwas::DataFrame)
mungesumstats!(gwas::Vector{DataFrame})

Munge gwas by harmonizing the names of columns, their types, and P values, among others.

source
GeneticsMakie.parsegtf!Method
parsegtf!(gencode::DataFrame)

Parse gencode by extracting gene_id, gene_name, gene_type, transcript_id, transcript_support_level information from the info column.

source
GeneticsMakie.plotgenes!Method
plotgenes!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, gencode::DataFrame; kwargs)
plotgenes!(ax::Axis, chromosome::AbstractString, bp::Real, gencode::DataFrame; kwargs)
plotgenes!(ax::Axis, gene::AbstractString, gencode::DataFrame; kwargs)

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.

Arguments

  • height::Real = 0.25: the height of exons.
  • genecolor = :royalblue: the color of genes.
  • textcolor = :black: the color of gene labels.
  • window::Real = 1e6: the window around bp or gene.
source
GeneticsMakie.plotgenes!Method
plotgenes!(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.

source
GeneticsMakie.plotgwas!Method
plotgwas!(ax::Axis, gwas::DataFrame; ymax::Real, p::Real, sigline::Bool, sigcolor::Bool, build = 37)

Plot gwas results as a Manhattan plot.

Arguments

  • ymax::Real: the maximum value for y axis.
  • p::Real = 5e-8: the genome-wide significance threshold.
  • linecolor = :red2: the color of genome-wide significance line, which can be turned off by setting to nothing.
  • scattercolor = "#4DB069": the color of genome-wide significant variants, which can be turned off by setting to nothing.
  • chromcolors = ["#0D0D66", "#7592C8"]: the colors of even and odd chromosomes.
  • build::Int = 37: the human genome build.
source
GeneticsMakie.plotisoforms!Method
plotisoforms!(ax::Axis, gene::AbstractString, gencode::DataFrame; kwargs)

Plot each isoform of a given gene on a separate row.

Arguments

  • orderby::Union{Nothing, AbstractVector{<:AbstractString}} = nothing: the order of isoforms.
  • highlight::Union{Nothing, Tuple{AbstractVector, AbstractVector}} = nothing: isoforms to be highlighted and their colors.
  • height::Real = 0.25: the height of exons.
  • isoformcolor = :royalblue: the color of isoforms.
  • textcolor = :black: the color of isoform labels.
  • text::Union{Bool, Symbol} = :top: the position of isoform labels.
source
GeneticsMakie.plotldMethod
plotld(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 to 1/9)
  • colormap : colormap of values (default to cgrad(:Blues_9, 9, categorical = true))
  • colorrange : start and end points of colormap (default to (0, 1))
  • strokewidth : width of outline around heatmap boxes (default to 0)
source
GeneticsMakie.plotlocus!Method
plotlocus!(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.

Arguments

  • ld::Union{Nothing, SnpData, Tuple{SnpData, Union{AbstractString, Tuple{AbstractString, Int}}}} = nothing: the reference panel for which LD is calculated.
  • ymax::Real: the maximum value for y axis.
  • window::Real = 1e6: the window around bp or gene.
source
GeneticsMakie.plotloops!Method
plotloops!(ax::Axis, chromosome::AbstractString, range1::Real, range2::Real, loopdf::DataFrame; kwargs)
plotloops!(ax::Axis, chromosome::AbstractString, bp::Real, loopdf::DataFrame; kwargs)
plotloops!(ax::Axis, gene::AbstractString, loopdf::DataFrame, gencode::DataFrame; kwargs)

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.

Arguments

  • ymax::Real = 102: the maximum value for y axis.
  • linewidth = 0.25: the line width of the loops' arcs.
  • colorarc = "#9658B2": the color of loops' arcs.
  • colorend = ("#FFBB00", 0.5): the color of loops' ends.
  • resolution = 1000: plot resolution points along x-axis within the given range.
source
GeneticsMakie.plotqq!Method
plotqq!(ax::Axis, gwas::DataFrame; kwargs)
plotqq!(ax::Axis, P::AbstractVector; kwargs)

Plot QQ plot of P values where the expected distribution is the uniform distribution.

Keyword arguments include xstep::Real and ystep::Real for x and y axes ticks step sizes.

source
GeneticsMakie.plotrgMethod
plotrg(r::AbstractMatrix; kwargs)
plotrg!(ax::Axis, r::AbstractMatrix; kwargs)

Correlation plot of matrix r.

Keyword arguments

  • circle : whether to draw cicles instead of rectangles (default to true)
  • diagonal : whether to visualize diagonal elements (default to false)
  • colormap : colormap of values (default to :RdBu_10)
  • colorrange : start and end points of colormap (default to (-1, 1))
  • strokewidth : width of outline around surrounding boxes (default to 0.5)
source