API

GeneticsMakie.findclosestgeneMethod
findclosestgene(chr::AbstractString, bp::Real, gencode::DataFrame)
findclosestgene(df::DataFrame, gencode::DataFrame)

Find the closest gene to a genomic coordinate or a list of genomic coordinates using gencode.

Keyword arguments

start::Bool             find closest gene from gene start site; default false
proteincoding::Bool     find closest protein coding gene; default 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)
findgwasloci(gwas::Vector{DataFrame})

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.

Keyword argument

p::Real        genome-wide significance threshold; default 5e-8
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)
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
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)

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 
source
GeneticsMakie.plotisoforms!Method
plotisoforms!(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
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 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
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.

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
source
GeneticsMakie.plotloops!Method
plotloops!(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
source
GeneticsMakie.plotqq!Method
plotqq!(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
source