BigRiverQTLPlots.get_chromosome_stepsMethod

getchromosomesteps(vLoc, vChr) => Vector(::Float64)

Returns a vector containing the accumulated version of all maximimum loci.

Arguments

  • vLoc contains the loci
  • vChr contains the chromosome names
BigRiverQTLPlots.get_eQTL_accMbMethod

geteQTLaccMb(mlodmax::Matrix{Float64}, dfpInfo::DataFrame, dfgInfo::DataFrame; chrColname::String = "Chr", mbColname::String = "Mb", threshold::Float64 = 5.0)=>

Returns pseudo "acculumated" loci for plotting, according to the phenotype and genotype annotations.

Arguments

  • multiLODs is the matrix containing the LOD's values.
  • dfpInfo is a dataframe containing the phenotype information such as probeset, chromosomes names and Mb distance
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance
  • chrColname column name containing the chromosomes information, default is "Chr", in the dataframes.
  • mbColname column name containing the Mb distance information, default is "Mb", in the dataframes.
  • threshold is the LOD threshold value, default is 5.0`.

Output

  • pheno_gmap_lod.acc_geno_mb vector contains pseudo "accumulated" loci (mB) based on genotype.
  • pheno_gmap_lod.acc_phenocovar_mb vector contains pseudo "accumulated" loci (mB) based on phenotype.
  • pheno_gmap_lod.maxlod vector contains the maximum LOD scores above the threshold value threshold.
  • steps contains the accumulated version of all maximimum loci above the threshold value threshold.
  • vChrNames contains the chromosome names.
BigRiverQTLPlots.get_plot_QTL_inputsMethod

getplotQTL_inputs(vLOD::Vector{<: AbstractFloat}, dfgInfo::DataFrame; chrColname::String="Chr", mbColname::String="Mb")

Obtains required inputs to generates a QTL plot.

Arguments

  • vLOD is the vector containing the maximum value of LOD score of each phenotype and its corresponding index.
  • dfpInfo is a dataframe containing the phenotype information such as probeset, chromosomes names and Mb distance.
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance.
  • chrColname is the name of the column containing the chromosomes' names, default name is "Chr".
  • mbColname is the name of the column containing the megabase DNA length, default name is "Mb".
BigRiverQTLPlots.get_pseudo_lociMethod

getpseudoloci(vLoc, vChr, vSteps) => Vector(::Float64)

Returns a vector containing the pseudo "accumulated" loci (mB).

Arguments

  • vLoc contains the loci
  • vChr contains the chromosome names
  • vSteps contains the accumulated version of all maximimum loci.
BigRiverQTLPlots.get_qtl_coordMethod

getqtlcoord(vLoci, vChr, vLod)

Return coordinates vectors for plotting QTL figure.

Arguments

  • vLoc contains the loci
  • vChr contains the chromosome names
  • vLod contains the LOD scores
BigRiverQTLPlots.plot_QTLMethod

plot_QTL(vLOD::Vector{<: AbstractFloat}, dfgInfo::DataFrame; chrColname::String="Chr", mbColname::String="Mb", thresholds::Vector{<: AbstractFloat}=[], kwargs...)

Generates a scatter plot for QTL analysis.

Arguments

  • vLOD is the vector containing the maximum value of LOD score.
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance.
  • chrColname is the name of the column containing the chromosomes' names, default name is "Chr".
  • mbColname is the name of the column containing the megabase DNA length, default name is "Mb".
  • thresholds is <: AbstractFloat number vector containing desired LOD score thresholds for plotting.

plot_QTL(scanresult::NamedTuple, dfgInfo::DataFrame; chrColname::String="Chr", mbColname::String="Mb", thresholds::Vector{<: AbstractFloat}=[], kwargs...)

Generates a scatter plot for QTL analysis.

Arguments

  • scanresult is NamedTuple object resulting from the scan() function in BulkLMM.jl.
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance.
  • chrColname is the name of the column containing the chromosomes' names, default name is "Chr".
  • mbColname is the name of the column containing the megabase DNA length, default name is "Mb".
  • significance is <: AbstractFloat number vector containing significant levels to estimate LOD score thresholds.

If the scanresult does not contain a permutation matrix, the original maximum LOD scores will be plotted, and the values in the significance vector will be used as the threshold values for comparison.

BigRiverQTLPlots.plot_eQTLMethod

plot_eQTL(multiLODs::Array{Float64, 2}, dfpInfo::DataFrame, dfgInfo::DataFrame; threshold::Float64 = 5.0, kwargs...)

Generates a scatter plot for eQTL analysis.

Arguments

  • multiLODs is the matrix containing the LOD's values.
  • dfpInfo is a dataframe containing the phenotype information such as probeset, chromosomes names and Mb distance.
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance.
  • threshold is the LOD threshold value, default is 5.0`.
BigRiverQTLPlots.plot_manhattanMethod

plot_manhattan(vLOD::Vector{<: AbstractFloat}, dfgInfo::DataFrame; chrColname::String="Chr", mbColname::String="Mb", thresholds::Vector{<: AbstractFloat}=[], kwargs...)

Generates a scatter plot for QTL analysis.

Arguments

  • vLOD is the vector containing the maximum value of LOD score.
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance.
  • chrColname is the name of the column containing the chromosomes' names, default name is "Chr".
  • mbColname is the name of the column containing the megabase DNA length, default name is "Mb".
  • thresholds is <: AbstractFloat number vector containing desired LOD score thresholds for plotting.

plot_manhattan(scanresult::NamedTuple, dfgInfo::DataFrame; chrColname::String="Chr", mbColname::String="Mb", thresholds::Vector{<: AbstractFloat}=[], kwargs...)

Generates a scatter plot for QTL analysis.

Arguments

  • scanresult is NamedTuple object resulting from the scan() function in BulkLMM.jl.
  • dfgInfo is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distance.
  • chrColname is the name of the column containing the chromosomes' names, default name is "Chr".
  • mbColname is the name of the column containing the megabase DNA length, default name is "Mb".
  • significance is <: AbstractFloat number vector containing significant levels to estimate LOD score thresholds.

If the scanresult does not contain a permutation matrix, the original maximum LOD scores will be plotted, and the values in the significance vector will be used as the threshold values for comparison.

BigRiverQTLPlots.pseudoticksMethod
pseudotick(mytick::Vector{Float64}) => Vector{Float64}

Returns coordinates of the new ticks. It returns the midpoints between each consecutive pairs of value.

Example

julia> vticks = [1,4,5,7] |> float;

julia> pseudoticks(vticks)
4-element Vector{Float64}:
 0.5
 2.5
 4.5
 6.0
BigRiverQTLPlots.sortnaturalMethod

sortnatural(x::Vector{String}) => Vector(::String)

Natural sort a string vector accounting for numeric sorting.

Example

julia> myvec = ["12", "2", "1", "Y", "10", "X"];
julia> sort(myvec)
6-element Vector{String}:
 "1"
 "10"
 "12"
 "2"
 "X"
 "Y"
 julia> sortnatural(myvec)
 6-element Vector{String}:
  "1"
  "2"
  "10"
  "12"
  "X"
  "Y"