Skip to content

Commit

Permalink
Merge pull request #43 from hkim89/master
Browse files Browse the repository at this point in the history
comment out QTLPlot module and update project.toml
  • Loading branch information
hkim89 authored Feb 13, 2024
2 parents f011d6b + beb18e4 commit 87943af
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 25 deletions.
8 changes: 2 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,19 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LossFunctions = "30fc2ffe-d236-52d8-8643-a9d8f7c094a7"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
Conda = "1"
DelimitedFiles = "1"
Distributions = "^0.23, 0.24, 0.25"
LossFunctions = "~0.11"
PyPlot = "~2.11"
Revise = "3.5"
StaticArrays = "1.7"
StaticArrays = "1.9"
StatsBase = "0.33, 0.34"
Statistics = "1"
StatsBase = "0.33"
julia = "~1.9"

[extras]
Expand Down
7 changes: 1 addition & 6 deletions docs/src/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ Modules = [FlxQTL, flxMLMM, EcmNestrv]
Modules = [GRM]
```

## Visualization (QTLplot)

```@autodocs
Modules = [QTLplot]
```

## Multivariate Linear Models (MLM)

```@autodocs
Expand All @@ -35,3 +29,4 @@ Modules = [MLM]
```@autodocs
Modules = [Util]
```

6 changes: 4 additions & 2 deletions docs/src/guide/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ third marker, type `B[:,:,3]`.

## Generating plots

To produce a plot (or plots) for LOD scores or effects, you need first a struct of arrays, `layers` consisting of chromosomes, marker positions,
The `QTLplot` module is currently unavailable but will replaced with [BigRiverQTLPlots.jl](https://github.com/senresearch/BigRiverQTLPlots.jl) soon.

<!-- To produce a plot (or plots) for LOD scores or effects, you need first a struct of arrays, `layers` consisting of chromosomes, marker positions,
LOD scores (or effects), which should be `Array{Float64,2}`. You can then generate one genome scan result or multiple genenome scan results on one plot. Note that the color is randomly selected to generate a plot.
The function `plot1d` has more keyword argument options: `yint=[]` for a vector of y-intercept(s), `yint_color=["red"]` for a vector of y-intercept
color(s), `Legend=[]` for multiple graphs, `loc="upper right"` for the location of `Legend`, etc.
Expand All @@ -155,7 +157,7 @@ plot1d(Arab_lod;title= "LOD for Arabidopsis thaliana : Fitness (2 site by 3 year
![arabidopsis](arab-lod.png)

-->

## Performing a permutation test

Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Or, equivalently,
```julia
julia> using Pkg; Pkg.add("FlxQTL")
```
Currently Julia `1.5` supports for the package.
<!-- Currently Julia `1.5` supports for the package. -->


To remove the package from the Julia REPL,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ structured multivariate traits.

- Genome scan (1D, 2D) for univariate, multivariate trait(s), and genotype (probability) data
- LOCO (Leave One Chromosome Out) support for genome scan
- Visualization (1D, 2D plots)
- Computation for Genetic (or Climatic) Relatedness matrix (or kinship)
- CPU parallelization
<!-- - Visualization (1D, 2D plots) -->

## Guide

Expand Down
16 changes: 8 additions & 8 deletions src/geneScan1D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ function geneScan(cross::Int64,Tg,Tc::Array{Float64,2},Λg,λc::Array{Float64,1}
for i=1:nChr
maridx=findall(XX.chr.==Chr[i])
# Xnul_t=Xnul*Tg[:,:,i]';
@fastmath @inbounds Xnul_t=BLAS.gemm('N','T',Xnul,@view Tg[:,:,i])
@fastmath @inbounds Xnul_t=BLAS.gemm('N','T',Xnul, Tg[:,:,i])
if (cross!=1)
@fastmath @inbounds @views Y2,X1=transForm(Tg[:,:,i],Y1,X0[maridx,:,:],cross)
@fastmath @inbounds Y2,X1=transForm(Tg[:,:,i],Y1,X0[maridx,:,:],cross)
else
@fastmath @inbounds @views Y2,X1=transForm(Tg[:,:,i],Y1,XX.X[maridx,:],cross)
@fastmath @inbounds Y2,X1=transForm(Tg[:,:,i],Y1,XX.X[maridx,:],cross)
end
#parameter estimation under the null
est00=nulScan(init,1,Λg[:,i],λc,Y2,Xnul_t,Z1,Σ1;ρ=ρ,itol=itol,tol=tol)
Expand Down Expand Up @@ -297,11 +297,11 @@ function geneScan(cross::Int64,Tg::Union{Array{Float64,3},Array{Float64,2}},Tc::
for i=1:nChr
maridx=findall(XX.chr.==Chr[i])
# Xnul_t=Xnul*Tg[:,:,i]';
@fastmath @inbounds Xnul_t=BLAS.gemm('N','T',Xnul,@view Tg[:,:,i])
@fastmath @inbounds Xnul_t=BLAS.gemm('N','T',Xnul,Tg[:,:,i])
if (cross!=1)
@fastmath @inbounds @views Y2,X1=transForm(Tg[:,:,i],Y1,X0[maridx,:,:],cross)
@fastmath @inbounds Y2,X1=transForm(Tg[:,:,i],Y1,X0[maridx,:,:],cross)
else
@fastmath @inbounds @views Y2,X1=transForm(Tg[:,:,i],Y1,XX.X[maridx,:],cross)
@fastmath @inbounds Y2,X1=transForm(Tg[:,:,i],Y1,XX.X[maridx,:],cross)
end
#parameter estimation under the null
est00=nulScan(init,1,Λg[:,i],λc,Y2,Xnul_t,Σ1;ρ=ρ,itol=itol,tol=tol)
Expand Down Expand Up @@ -363,9 +363,9 @@ function geneScan(cross::Int64,Tg,Λg,Y0::Array{Float64,2},XX::Markers,LOCO::Boo
# Xnul_t=Xnul*Tg[:,:,i]';
@fastmath @inbounds Xnul_t=BLAS.gemm('N','T',Xnul,@view Tg[:,:,i])
if (cross!=1)
@fastmath @inbounds @views Y,X=transForm(Tg[:,:,i],Y0,X0[maridx,:,:],cross)
@fastmath @inbounds Y,X=transForm(Tg[:,:,i],Y0,X0[maridx,:,:],cross)
else
@fastmath @inbounds @views Y,X=transForm(Tg[:,:,i],Y0,XX.X[maridx,:],cross)
@fastmath @inbounds Y,X=transForm(Tg[:,:,i],Y0,XX.X[maridx,:],cross)
end
#parameter estimation under the null
est00=nulScan(init,1,Λg[:,i],Y,Xnul_t;itol=itol,tol=tol,ρ=ρ)
Expand Down
2 changes: 1 addition & 1 deletion src/transformation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function transForm(Tg::Array{Float64,2},X0,cross::Int64)
else #cross>1 size(X0)= (p,cross,n)
p=size(X0,1); n=size(X0,3)
X=zeros(p,cross,n)
@fastmath @inbounds @views for j=1:cross
@fastmath @inbounds @views for j=1:cross
# X[:,j,:] = X0[:,j,:]*Tg'
X[:,j,:]= BLAS.gemm('N','T',X0[:,j,:],Tg)
end
Expand Down

0 comments on commit 87943af

Please sign in to comment.