Description Usage Arguments Details Examples
View source: R/NanoSatelliteR_functions.R
clusters_per_read() extracts the cluster per tandem repeat unit and concatenates them according to their original sequence in the sequencing read.
1 | clusters_per_read(tsclust_obj)
|
tsclust_obj |
A tsclust object generated by dtwclust::tsclust() |
This function uses a tsclust object generated by dtwclust::tsclust() and returns a data.frame containing a comma-separated series of tandem repeat unit clusters.
1 2 3 4 5 6 7 8 9 10 11 12 13 | df <- load_summary("/storage/NanoSatellite_chunks/")
qc <- summary_qc(df)
df2 <- qual_reads(df,qc$center_cutoff)
squiggles <- load_squiggles("/storage/NanoSatellite_chunks/",df2)
library(doParallel)
library(dtwclust)
k_clusters=2
registerDoParallel(cores=8)
positive_clustering=tsclust(squiggles$positive,type="h",k=k_clusters,trace=TRUE,distance = "dtw_basic", control=hierarchical_control(method="ward.D",symmetric = T))
cpr=clusters_per_read(positive_clustering)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.