Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchultheis committed Dec 4, 2018
1 parent 9bd64be commit 6cd5985
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/cdhit_wrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ opt <- parse_args(opt_parser)
#' cd-hit wrapper
#'
#' @param input
#' @param similarity cdhit = -c
#' @param coverage In Nucleotides. cdhit = -A
#' @param similarity Similarity threshold.
#' @param coverage Minimal alignment length for both sequences in nucelotides.
#' @param output Clustered bedfile. Adds cluster number in last column (lower number = bigger cluster).
#' @param clean Clean up after run.
#'
Expand All @@ -42,7 +42,7 @@ cdhitest <- function(input, similarity = 0.8, coverage = 8, output = "cluster.be

### cd-hit-est
cdhit_output <- "cdhit_output"
cdhit_call <- paste("cd-hit-est -i", fasta_file, "-o", cdhit_output, "-c", similarity, "-A", coverage, "-G 0 -n 3 -g 1 -r 0 -l 5 -sc 1")
cdhit_call <- paste("cd-hit-est -i", fasta_file, "-o", cdhit_output, "-c", similarity, "-A", coverage, "-G 0 -n 3 -g 1 -r 0 -l 5 -sc 1 -d 0")

system(command = cdhit_call, wait = TRUE)

Expand Down
2 changes: 2 additions & 0 deletions bin/reduce_bed.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ reduce_bed <- function(input, kmer = 10, motif = 10, output = "reduced.bed", thr
#' @param kmer Length of kmer
#' @param motif Length of motif
#' @param minoverlap Minimum number of bases overlapping between kmer and motif. Must be <= motif & <= kmer. Defaults to ceiling(motif / 2).
#'
#' @return Number of interesting kmer.
significant_kmer <- function(bed, kmer, motif, minoverlap = ceiling(motif / 2)) {
if (minoverlap > kmer || minoverlap > motif) {
stop("Kmer & motif must be greater or equal than minoverlap!")
Expand Down

0 comments on commit 6cd5985

Please sign in to comment.