Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cAmpSeqR
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
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simeon Rossmann
cAmpSeqR
Commits
0dad8cc6
Commit
0dad8cc6
authored
1 year ago
by
Simeon
Browse files
Options
Downloads
Patches
Plain Diff
implement manual threshold override for meshclust
parent
c21f727c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/meshclustR.R
+14
-3
14 additions, 3 deletions
R/meshclustR.R
man/meshclustR.Rd
+11
-1
11 additions, 1 deletion
man/meshclustR.Rd
with
25 additions
and
4 deletions
R/meshclustR.R
+
14
−
3
View file @
0dad8cc6
...
...
@@ -13,6 +13,10 @@
#' `which meshclust` on commandline). Default is set to "meshclust".
#' @param filepath The path to the directory where the temporary and log
#' files will be saved.
#' @param threshold Numeric value between 0 and 0.99 or FALSE (default).
#' Numeric values will be used as clustering thresholds for meshclust to override
#' the automatically set threshold. If FALSE, meshclust will determine the
#' threshold (recommended).
#' @return A data frame with information regarding the clustering analysis.
#'
#' @examples
...
...
@@ -23,7 +27,8 @@
#' @export
meshclustR
<-
function
(
seqs
=
MyDNAStringSet
,
meshclust_bin
=
meshclust
,
filepath
=
path
){
filepath
=
path
,
threshold
=
FALSE
){
#create temporary file path
temp_file
<-
file.path
(
filepath
,
'cluster_me.fa'
)
...
...
@@ -34,8 +39,14 @@ meshclustR <- function(seqs = MyDNAStringSet,
tools
::
file_path_sans_ext
(
basename
(
temp_file
)),
'.txt'
))
#run Meshclust
system2
(
meshclust_bin
,
args
=
c
(
'-d'
,
temp_file
,
'-o'
,
out_file
))
if
(
is.numeric
(
threshold
)
&&
0
<
threshold
&&
threshold
<=
0.99
){
system2
(
meshclust
,
args
=
c
(
"-d"
,
temp_file
,
"-o"
,
out_file
,
"-t"
,
threshold
))
}
else
{
system2
(
meshclust
,
args
=
c
(
"-d"
,
temp_file
,
"-o"
,
out_file
))
}
#read output file and parse
stable_cluster
<-
readr
::
read_delim
(
out_file
,
delim
=
'\t'
,
...
...
This diff is collapsed.
Click to expand it.
man/meshclustR.Rd
+
11
−
1
View file @
0dad8cc6
...
...
@@ -4,7 +4,12 @@
\alias{meshclustR}
\title{Write temporary file to cluster using MeshclustR}
\usage{
meshclustR(seqs = MyDNAStringSet, meshclust_bin = meshclust, filepath = path)
meshclustR(
seqs = MyDNAStringSet,
meshclust_bin = meshclust,
filepath = path,
threshold = FALSE
)
}
\arguments{
\item{seqs}{A DNAStringSet object containing the DNA sequences to be clustered.}
...
...
@@ -14,6 +19,11 @@ meshclustR(seqs = MyDNAStringSet, meshclust_bin = meshclust, filepath = path)
\item{filepath}{The path to the directory where the temporary and log
files will be saved.}
\item{threshold}{Numeric value between 0 and 0.99 or FALSE (default).
Numeric values will be used as clustering thresholds for meshclust to override
the automatically set threshold. If FALSE, meshclust will determine the
threshold (recommended).}
}
\value{
A data frame with information regarding the clustering analysis.
...
...
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
register
or
sign in
to comment