BigRiverQTLPlots.get_chromosome_steps
— Methodgetchromosomesteps(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_accMb
— MethodgeteQTLaccMb(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 distancedfgInfo
is a dataframe containing the genotype information such as locus, cM distance, chromosomes names and Mb distancechrColname
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 is5.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 valuethreshold
.steps
contains the accumulated version of all maximimum loci above the threshold valuethreshold
.vChrNames
contains the chromosome names.
BigRiverQTLPlots.get_plot_QTL_inputs
— MethodgetplotQTL_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_loci
— Methodgetpseudoloci(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_coord
— Methodgetqtlcoord(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_QTL
— Methodplot_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 thescan()
function inBulkLMM.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_eQTL
— Methodplot_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 is5.0
`.
BigRiverQTLPlots.plot_manhattan
— Methodplot_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 thescan()
function inBulkLMM.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.pseudoticks
— Methodpseudotick(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.sortnatural
— Methodsortnatural(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"