Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kmer diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Delattre
kmer diff
Commits
66644725
Verified
Commit
66644725
authored
Aug 5, 2023
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
add clustering analysis in addition to boostrap analaysis
parent
a494a7fb
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/bin/kmerclust_boot.R
+13
-0
13 additions, 0 deletions
src/bin/kmerclust_boot.R
src/bin/kmerclust_plot.R
+5
-6
5 additions, 6 deletions
src/bin/kmerclust_plot.R
src/modules/kmerclust.nf
+35
-9
35 additions, 9 deletions
src/modules/kmerclust.nf
with
53 additions
and
15 deletions
src/bin/kmerclust.R
→
src/bin/kmerclust
_boot
.R
+
13
−
0
View file @
66644725
...
...
@@ -2,5 +2,12 @@ library(kmerclust)
args
<-
commandArgs
(
trailingOnly
=
TRUE
)
print
(
args
)
load
(
file
=
paste0
(
args
[
1
],
".Rdata"
))
res
<-
compare_models
(
count
,
nboot
=
as.numeric
(
args
[
2
])
*
2
,
bootsize
=
nrow
(
count
),
core
=
as.numeric
(
args
[
2
]))
res
<-
count
%>%
dplyr
::
select
(
count_m
,
count_f
)
%>%
as.matrix
()
%>%
compute_tpm
()
%>%
log
()
%>%
compare_models_constraint
(
count
,
nboot
=
as.numeric
(
args
[
2
])
*
2
,
bootsize
=
nrow
(
count
),
core
=
as.numeric
(
args
[
2
]))
save
(
res
,
file
=
paste0
(
args
[
1
],
"_boot_"
,
args
[
3
],
".Rdata"
))
This diff is collapsed.
Click to expand it.
src/bin/kmerclust_plot.R
+
5
−
6
View file @
66644725
...
...
@@ -12,16 +12,15 @@ res %>%
geom_violin
()
+
theme_bw
()
ggsave
(
paste0
(
args
[
1
],
"_BIC.pdf"
))
res
%>%
ggplot
(
aes
(
x
=
name
,
y
=
WSS_f
/
BSS
))
+
geom_violin
()
+
theme_bw
()
ggsave
(
paste0
(
args
[
1
],
"_WSS_BSS.pdf"
))
rm
(
res
)
load
(
file
=
paste0
(
args
[
1
],
".Rdata"
))
count
%>%
sample_frac
(
0.1
)
%>%
mutate
(
count_m
=
log1p
(
count_m
),
count_f
=
log1p
(
count_f
),
)
ggplot
(
aes
(
x
=
count_m
,
y
=
count_f
))
+
geom_point
()
+
theme_bw
()
ggsave
(
paste0
(
args
[
1
],
"_scatter.pdf"
))
This diff is collapsed.
Click to expand it.
src/modules/kmerclust.nf
+
35
−
9
View file @
66644725
...
...
@@ -2,7 +2,7 @@ process KMERCLUST_LOAD {
tag
"$specie"
label
'big_mem_mono_cpus'
container
"lbmc/kmerclust:0.0.
2
"
container
"lbmc/kmerclust:0.0.
3
"
input:
tuple
val
(
specie
),
path
(
csv
)
...
...
@@ -19,7 +19,33 @@ process KMERCLUST_LOAD {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.1
Rkmerclust: 0.0.3
END_VERSIONS
"""
}
process
KMERCLUST_BOOT
{
tag
"$specie"
label
'big_mem_multi_cpus'
container
"lbmc/kmerclust:0.0.3"
publishDir
"results/${params.kmer_size}/${specie}/"
,
mode:
'copy'
input:
tuple
val
(
id
),
val
(
specie
),
path
(
rdata
)
output:
tuple
val
(
specie
),
path
(
"*.Rdata"
),
emit:
rdata
path
"versions.yml"
,
emit:
versions
script:
def
args
=
task
.
ext
.
args
?:
''
"""
Rscript ${projectDir}/bin/kmerclust_boot.R ${specie} ${task.cpus} ${id}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.3
END_VERSIONS
"""
}
...
...
@@ -28,7 +54,7 @@ process KMERCLUST {
tag
"$specie"
label
'big_mem_multi_cpus'
container
"lbmc/kmerclust:0.0.
2
"
container
"lbmc/kmerclust:0.0.
3
"
publishDir
"results/${params.kmer_size}/${specie}/"
,
mode:
'copy'
input:
...
...
@@ -41,11 +67,11 @@ process KMERCLUST {
script:
def
args
=
task
.
ext
.
args
?:
''
"""
Rscript ${projectDir}/bin/kmerclust.R ${specie} ${task.cpus}
${id}
Rscript ${projectDir}/bin/kmerclust.R ${specie} ${task.cpus}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.
1
Rkmerclust: 0.0.
3
END_VERSIONS
"""
}
...
...
@@ -54,7 +80,7 @@ process KMERCLUST_MERGE {
tag
"$specie"
label
'big_mem_mono_cpus'
container
"lbmc/kmerclust:0.0.
2
"
container
"lbmc/kmerclust:0.0.
3
"
publishDir
"results/${params.kmer_size}/${specie}/"
,
mode:
'copy'
input:
...
...
@@ -71,7 +97,7 @@ process KMERCLUST_MERGE {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.
1
Rkmerclust: 0.0.
3
END_VERSIONS
"""
}
...
...
@@ -80,7 +106,7 @@ process KMERCLUST_PLOT {
tag
"$specie"
label
'big_mem_mono_cpus'
container
"lbmc/kmerclust:0.0.
2
"
container
"lbmc/kmerclust:0.0.
3
"
publishDir
"results/${params.kmer_size}/${specie}/"
,
mode:
'copy'
input:
...
...
@@ -97,7 +123,7 @@ process KMERCLUST_PLOT {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Rkmerclust: 0.0.
1
Rkmerclust: 0.0.
3
END_VERSIONS
"""
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment