Skip to content

Commit bf4eba4

Browse files
authored
Merge pull request #55 from GregFa/main
added selection samples, marker and remove missing
2 parents fd64a26 + 1b40225 commit bf4eba4

File tree

13 files changed

+844
-498
lines changed

13 files changed

+844
-498
lines changed

example/example_qtl.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@
127127
"# We can get the genotype matrix using the following command:\n",
128128
"geno = reduce(hcat, data.geno.val);\n",
129129
"# For computing reasons, we need to convert the geno matrix in Float64\n",
130-
"geno_processed = convert(Array{Float64}, geno);"
130+
"geno_processed = geno .- 1.0 |>\n",
131+
" x -> replace(x, missing => 0.5) |>\n",
132+
"\n",
133+
"# geno_processed = convert(Matrix{Float64}, geno_processed);\n"
131134
]
132135
},
133136
{

example/example_qtl.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# extension: .jl
77
# format_name: light
88
# format_version: '1.5'
9-
# jupytext_version: 1.16.2
9+
# jupytext_version: 1.16.4
1010
# kernelspec:
1111
# display_name: Julia 1.10.4
1212
# language: julia
@@ -62,7 +62,11 @@ pheno = data.pheno.val;
6262
# We can get the genotype matrix using the following command:
6363
geno = reduce(hcat, data.geno.val);
6464
# For computing reasons, we need to convert the geno matrix in Float64
65-
geno_processed = convert(Array{Float64}, geno);
65+
geno_processed = geno .- 1.0 |>
66+
x -> replace(x, missing => 0.5) |>
67+
68+
# geno_processed = convert(Matrix{Float64}, geno_processed);
69+
6670
# -
6771

6872
# #### Preprocessing

src/BigRiverQTL.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ module BigRiverQTL
6262
######
6363
# IO #
6464
######
65-
include("io/io_utils.jl")
65+
include("io/io_helpers.jl")
6666
export get_control_file, encode_genotype
67+
6768
include("io/export_to_type.jl")
6869
export get_geneticstudydata
6970
export get_gmap, get_alleles, get_chromosome, get_crossinfo, get_crosstype
@@ -73,7 +74,7 @@ module BigRiverQTL
7374
#########
7475
# Plots #
7576
#########
76-
include("plots/plots_utils.jl")
77+
include("plots/plots_helpers.jl")
7778
export gmap2df, pmap2df
7879

7980
include("plots/plots_qtl.jl")
@@ -85,4 +86,10 @@ module BigRiverQTL
8586
include("plots/plots_eqtl.jl")
8687
export plot_eQTL
8788

89+
#########
90+
# Utils #
91+
#########
92+
include("utils/wrangling_utils.jl")
93+
export get_geno_completecases, summary_missing, select_sample, select_marker
94+
8895
end

0 commit comments

Comments
 (0)