<jupyter_start><jupyter_text>Import packages<jupyter_code>options(stringsAsFactors = FALSE)
library(GenomicRanges)
library(scABC)
library(Rsamtools)
library(data.table)
library(dplyr)
library(tidyverse)
library(Matrix)

library(gplots) 
library(RColorBrewer)
library(devtools)
source_url("https://raw.githubusercontent.com/obigriffith/biostar-tutorials/master/Heatmaps/heatmap.3.R")<jupyter_output>Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, basename, cbind, colMeans,
    colnames, colSums, dirname, do.call, duplicated, eval, evalq,
    Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,
    lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, Position, rank, rbind, Reduce, rowMeans, rownames,
    rowSums, sapply, setdiff, sort, table, tapply, union, unique,
    unsplit, which, which.max, which.min

Loading required package: S4Ve[...]<jupyter_text>Load Data<jupyter_code>load(file = '../../run_methods/scABC/scABC_10xpbmc5k.RData')
heatmap.3(InSilicoCell2LandmarkCorrelation_sorted, dendrogram='none', Rowv=FALSE, Colv=FALSE,
          trace='none', col = scalered, margin = c(5, 5), density.info = "none", 
          RowSideColors = rowcols, RowSideColorsSize=2, symm=F,symkey=F,
          symbreaks=F, scale="none",)
legend("bottomleft", legend = c(unique(cell.labels), paste0("cluster ", 1:length(unique(metadata$label)))), 
       col = c(rcols1, rcols2), border=FALSE, bty="n", y.intersp = 0.7, cex=0.7, pch = 15)
tail(InSilicoLandMarkAssignments_sorted)

result = data.frame('scABC'=InSilicoLandMarkAssignments_sorted)
rownames(result) = sapply(strsplit(basename(rownames(result)),'\\.'),'[', 2)

df_pre = result
df_pre$ord = 1:nrow(df_pre)
df_pre = df_pre[as.character(rownames(metadata)),]
df_out = data.frame('scABC'=df_pre[,'scABC'])
rownames(df_out) = rownames(df_pre)

write.table(result,file="clusteringSolution.tsv", quote=FALSE, sep='\t', col.names = NA)
tail(result)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1354292623941959, 'fraction_numerical': 0.009270455461507456, 'mean_word_length': 6.257309941520468, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '281525', 'license': 'MIT', 'n_tokens_mistral': 923, 'n_tokens_neox': 884, 'n_words': 178, 'path': 'Real_Data/10x_PBMC_5k/extra_clustering/scABC/scABC_10xpbmc5k.ipynb', 'repo_name': 'DaneseAnna/scATAC-benchmarking', 'size': '2481'}