From 9091d11ef3c72cc20e564093bfe8fec01e7ae75d Mon Sep 17 00:00:00 2001 From: mgrasshoff Date: Fri, 9 Jun 2023 19:24:04 +0200 Subject: [PATCH 01/21] Add UMI preprocessing and changed MAEGATK loading. --- R/CalculateQuality.R | 32 ++++++++ R/CalculateStrandCorrelation.R | 8 +- R/LoadingMAEGATK_typewise.R | 32 +++++--- R/LoadingVarTrix_typewise.R | 1 + .../UMI_Preprocessing/AddReadGroup.py | 53 ++++++++++++ .../UMI_Preprocessing/AddReadGroup.sh | 55 +++++++++++++ .../UMI_Preprocessing/ReadMoleculeInfo.R | 80 +++++++++++++++++++ preprocessing/VarTrix_preprocessing.sh | 4 +- 8 files changed, 246 insertions(+), 19 deletions(-) create mode 100644 R/CalculateQuality.R create mode 100644 preprocessing/UMI_Preprocessing/AddReadGroup.py create mode 100644 preprocessing/UMI_Preprocessing/AddReadGroup.sh create mode 100644 preprocessing/UMI_Preprocessing/ReadMoleculeInfo.R diff --git a/R/CalculateQuality.R b/R/CalculateQuality.R new file mode 100644 index 0000000..5467d23 --- /dev/null +++ b/R/CalculateQuality.R @@ -0,0 +1,32 @@ +#'CalculateQuality +#'@description +#'We calculate the quality per variant. +#'@import MatrixGenerics SummarizedExperiment +#'@param SE SummarizedExperiment object. +#'@param chromosome_prefix List of matrices for the alternative reads. +#'@export +CalculateQuality <- function(SE, variants = rownames(reads_alt), chromosome_prefix = "chrM"){ + variants <- gsub(paste0(chromosome_prefix, "_"), "", variants) + qualities <- lapply(c("A", "T", "C", "G"), function(x){ + fwrev <- cbind(assays(SE)[[paste0(x, "_counts_fw")]], assays(SE)[[paste0(x, "_counts_rev")]]) + qualities_fwrev <- cbind(assays(SE)[[paste0(x, "_qual_fw")]], assays(SE)[[paste0(x, "_qual_rev")]]) + variants_use <- strsplit(variants, "") + variants_use <- sapply(variants_use, tail, n = 1) + variants_use <- variants_use == x + variants_use_names <- variants[variants_use] + variants_use <- as.numeric(gsub("_.*", "", variants_use_names)) + variants_use_names <- paste0(chromosome_prefix, "_", variants_use_names) + fwrev <- fwrev[variants_use,] + rownames(fwrev) <- variants_use_names + qualities_fwrev <- qualities_fwrev[variants_use,] + rownames(qualities_fwrev) <- variants_use_names + fwrev <- fwrev > 0 + qualities_fwrev <- qualities_fwrev * fwrev + qualities <- apply(qualities_fwrev, 1, sum) / rowSums(fwrev > 0) + qualities[qualities == 0] <- NA + return(qualities) + }) + qualities <- unlist(qualities) + qualities <- qualities[paste0(chromosome_prefix, "_", variants)] + return(qualities) +} diff --git a/R/CalculateStrandCorrelation.R b/R/CalculateStrandCorrelation.R index 6fc7340..1731609 100644 --- a/R/CalculateStrandCorrelation.R +++ b/R/CalculateStrandCorrelation.R @@ -22,7 +22,7 @@ CalculateStrandCorrelation <- function(SE, chromosome_prefix = "chrM"){ dt <- data.table(variant = variants_A[dt[[1]]], cell_id = dt[[2]], fw = dt[[3]], rev = dt[[4]]) - cor_result_A <- dt[, .(cor = cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete")), by = list(variant)] + cor_result_A <- dt[, .(cor = suppressWarnings(cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete"))), by = list(variant)] variants_C <- paste0(chromosome_prefix, "_", 1:length(ref_allele), "_", ref_allele, "_C") variants_C <- variants_C[ref_allele != "C"] @@ -39,7 +39,7 @@ CalculateStrandCorrelation <- function(SE, chromosome_prefix = "chrM"){ dt <- data.table(variant = variants_C[dt[[1]]], cell_id = dt[[2]], fw = dt[[3]], rev = dt[[4]]) - cor_result_C <- dt[, .(cor = cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete")), by = list(variant)] + cor_result_C <- dt[, .(cor = suppressWarnings(cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete"))), by = list(variant)] variants_G <- paste0(chromosome_prefix, "_", 1:length(ref_allele), "_", ref_allele, "_G") variants_G <- variants_G[ref_allele != "G"] @@ -56,7 +56,7 @@ CalculateStrandCorrelation <- function(SE, chromosome_prefix = "chrM"){ dt <- data.table(variant = variants_G[dt[[1]]], cell_id = dt[[2]], fw = dt[[3]], rev = dt[[4]]) - cor_result_G <- dt[, .(cor = cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete")), by = list(variant)] + cor_result_G <- dt[, .(cor = suppressWarnings(cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete"))), by = list(variant)] variants_T <- paste0(chromosome_prefix, "_", 1:length(ref_allele), "_", ref_allele, "_T") variants_T <- variants_T[ref_allele != "T"] @@ -73,7 +73,7 @@ CalculateStrandCorrelation <- function(SE, chromosome_prefix = "chrM"){ dt <- data.table(variant = variants_T[dt[[1]]], cell_id = dt[[2]], fw = dt[[3]], rev = dt[[4]]) - cor_result_T <- dt[, .(cor = cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete")), by = list(variant)] + cor_result_T <- dt[, .(cor = suppressWarnings(cor(c(fw), c(rev), method = "pearson", use = "pairwise.complete"))), by = list(variant)] cor_results <- rbind(cor_result_A, cor_result_C, cor_result_G, cor_result_T) diff --git a/R/LoadingMAEGATK_typewise.R b/R/LoadingMAEGATK_typewise.R index 151aa69..68dcaf9 100755 --- a/R/LoadingMAEGATK_typewise.R +++ b/R/LoadingMAEGATK_typewise.R @@ -76,6 +76,11 @@ LoadingMAEGATK_typewise <- function(samples_file, samples_path = NULL, patient, print("We get the number of alternative reads per variant.") reads_alt <- CalculateAltReads(SE = se_merged, chromosome_prefix = chromosome_prefix) + + print("We get the quality information.") + variant_quality <- CalculateQuality(SE = se_merged, variants = rownames(reads_alt), chromosome_prefix = chromosome_prefix) + + print("We get the number of reference reads.") reads_ref <- coverage - reads_alt @@ -105,28 +110,29 @@ LoadingMAEGATK_typewise <- function(samples_file, samples_path = NULL, patient, # reads_alt <- reads_alt[keep_variants,] # reads_ref <- reads_ref[keep_variants,] consensus <- consensus[keep_variants,] - consensus <- matrix(consensus, nrow = length(variant_names), ncol = length(cell_ids)) + consensus <- suppressWarnings(matrix(consensus, nrow = length(variant_names), ncol = length(cell_ids))) colnames(consensus) <- cell_ids rownames(consensus) <- variant_names consensus <- as(consensus, "dgCMatrix") coverage <- coverage[keep_variants,] - coverage <- matrix(coverage, nrow = length(variant_names), ncol = length(cell_ids)) + coverage <- suppressWarnings(matrix(coverage, nrow = length(variant_names), ncol = length(cell_ids))) colnames(coverage) <- cell_ids rownames(coverage) <- variant_names coverage <- as(coverage, "dgCMatrix") fraction <- fraction[keep_variants,] - fraction <- matrix(fraction, nrow = length(variant_names), ncol = length(cell_ids)) + fraction <- suppressWarnings(matrix(fraction, nrow = length(variant_names), ncol = length(cell_ids))) colnames(fraction) <- cell_ids rownames(fraction) <- variant_names fraction <- as(fraction, "dgCMatrix") concordance <- concordance[keep_variants] + variant_quality <- variant_quality[keep_variants] reads_alt <- reads_alt[keep_variants,] - reads_alt <- matrix(reads_alt, nrow = length(variant_names), ncol = length(cell_ids)) + reads_alt <- suppressWarnings(matrix(reads_alt, nrow = length(variant_names), ncol = length(cell_ids))) colnames(reads_alt) <- cell_ids rownames(reads_alt) <- variant_names reads_alt <- as(reads_alt, "dgCMatrix") reads_ref <- reads_ref[keep_variants,] - reads_ref <- matrix(reads_ref, nrow = length(variant_names), ncol = length(cell_ids)) + reads_ref <- suppressWarnings(matrix(reads_ref, nrow = length(variant_names), ncol = length(cell_ids))) colnames(reads_ref) <- cell_ids rownames(reads_ref) <- variant_names reads_ref <- as(reads_ref, "dgCMatrix") @@ -144,27 +150,27 @@ LoadingMAEGATK_typewise <- function(samples_file, samples_path = NULL, patient, # reads_alt <- reads_alt[,keep_cells] # reads_ref <- reads_ref[,keep_cells] consensus <- consensus[,keep_cells] - consensus <- matrix(consensus, nrow = length(variant_names), ncol = length(cell_ids)) + consensus <- suppressWarnings(matrix(consensus, nrow = length(variant_names), ncol = length(cell_ids))) colnames(consensus) <- cell_ids rownames(consensus) <- variant_names consensus <- as(consensus, "dgCMatrix") coverage <- coverage[,keep_cells] - coverage <- matrix(coverage, nrow = length(variant_names), ncol = length(cell_ids)) + coverage <- suppressWarnings(matrix(coverage, nrow = length(variant_names), ncol = length(cell_ids))) colnames(coverage) <- cell_ids rownames(coverage) <- variant_names coverage <- as(coverage, "dgCMatrix") fraction <- fraction[,keep_cells] - fraction <- matrix(fraction, nrow = length(variant_names), ncol = length(cell_ids)) + fraction <- suppressWarnings(matrix(fraction, nrow = length(variant_names), ncol = length(cell_ids))) colnames(fraction) <- cell_ids rownames(fraction) <- variant_names fraction <- as(fraction, "dgCMatrix") reads_alt <- reads_alt[,keep_cells] - reads_alt <- matrix(reads_alt, nrow = length(variant_names), ncol = length(cell_ids)) + reads_alt <- suppressWarnings(matrix(reads_alt, nrow = length(variant_names), ncol = length(cell_ids))) colnames(reads_alt) <- cell_ids rownames(reads_alt) <- variant_names reads_alt <- as(reads_alt, "dgCMatrix") reads_ref <- reads_ref[,keep_cells] - reads_ref <- matrix(reads_ref, nrow = length(variant_names), ncol = length(cell_ids)) + reads_ref <- suppressWarnings(matrix(reads_ref, nrow = length(variant_names), ncol = length(cell_ids))) colnames(reads_ref) <- cell_ids rownames(reads_ref) <- variant_names reads_ref <- as(reads_ref, "dgCMatrix") @@ -181,15 +187,15 @@ LoadingMAEGATK_typewise <- function(samples_file, samples_path = NULL, patient, coverage_depth_per_cell <- rownames(coverage) coverage_depth_per_cell <- gsub("_._.$", "", coverage_depth_per_cell) coverage_depth_per_cell <- !duplicated(coverage_depth_per_cell) + coverage_depth_per_cell <- coverage[coverage_depth_per_cell,] cell_ids <- colnames(coverage) variant_names <- rownames(coverage) - coverage_depth_per_cell <- coverage[coverage_depth_per_cell,] - coverage_depth_per_cell <- matrix(coverage_depth_per_cell, nrow = length(variant_names), ncol = length(cell_ids)) + coverage_depth_per_cell <- suppressWarnings(matrix(coverage, nrow = length(variant_names), ncol = length(cell_ids))) colnames(coverage_depth_per_cell) <- cell_ids rownames(coverage_depth_per_cell) <- variant_names coverage_depth_per_cell <- colMeans(coverage_depth_per_cell) meta_data_col <- data.frame(Cell = colnames(consensus), AverageCoverage = coverage_depth_per_cell) - meta_data_row <- data.frame(VariantName = rownames(consensus), Concordance = concordance) + meta_data_row <- data.frame(VariantName = rownames(consensus), Concordance = concordance, VariantQuality = variant_quality) se_output <- SummarizedExperiment(assays = list(consensus = consensus, fraction = fraction, coverage = coverage, alts = reads_alt, refs = reads_ref), colData = meta_data_col, rowData = meta_data_row) return(se_output) diff --git a/R/LoadingVarTrix_typewise.R b/R/LoadingVarTrix_typewise.R index 07d1007..d5e5024 100644 --- a/R/LoadingVarTrix_typewise.R +++ b/R/LoadingVarTrix_typewise.R @@ -12,6 +12,7 @@ #'@param samples_path Path to the input folder. Must include a barcodes file. #'@param samples_file Path to the csv file with the samples to be loaded. #'@param vcf_path Path to the VCF file with the variants. +#'@param snp_path Path to the SNP file used for VarTrix (SNV.loci.txt). #'@param patient The patient you want to load. #'@param type_use The type of input. Has to be one of: scRNAseq_Somatic, Amplicon_Somatic, scRNAseq_MT, Amplicon_MT. #'@param min_reads The minimum number of reads we want. Otherwise we treat this as a NoCall. Default = NULL. diff --git a/preprocessing/UMI_Preprocessing/AddReadGroup.py b/preprocessing/UMI_Preprocessing/AddReadGroup.py new file mode 100644 index 0000000..ef45883 --- /dev/null +++ b/preprocessing/UMI_Preprocessing/AddReadGroup.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# We load the BAM file and add the UG tag, a combination of the CB and UB tag. +# Then we remove all UMIs per cell that have less than --min_reads_per_umi reads. +# The number of reads per UMI was calculated in ReadMoleculeInfo.R. + +# Libraries. +import pysam +import sys +import pandas as pd + +# Loading the supplied input. +# sys.argv[0] is the script itself. +# sys.argv[1] the input bam file. +# sys.argv[2] the output folder. +# sys.argv[3] the UG file. +bam_input_path = sys.argv[1] +output_path = sys.argv[2] +UGs_path = sys.argv[3] +print("Using:") +print("BAM: " + bam_input_path) +print("Output: " + output_path) +print("UGs: " + UGs_path) + +# We read the UG file. +ugs = pd.read_csv(UGs_path, header = None, names = ["UG"]) + +# We open the original BAM file. +bam_file = pysam.AlignmentFile(bam_input_path, "rb") + +# We open a connection to the output file. +out_file = pysam.AlignmentFile(output_path+"possorted_genome_UG_tagged.bam", "wb", template=bam_file) + +# We read the BAM file. +for line in bam_file: + # line = next(bam_file) # Reading the next line. This is for test purposes only. + # print(line) + # We check if the CB tag is present. + CB_check = line.has_tag("CB") + # We check if the UB tag is present. + UB_check = line.has_tag("UB") + # We only proceed if both tags are present. Otherwise, we go to the next read. + if all((CB_check, UB_check)): + # We add the new tag. + line.tags += [("UG", line.get_tag("CB")+"_"+line.get_tag("UB"))] + # We check if the tag is white listed. + if line.get_tag("UG") in ugs["UG"].values: + # Writing the new line to the output file. + out_file.write(line) + +bam_file.close() +out_file.close() diff --git a/preprocessing/UMI_Preprocessing/AddReadGroup.sh b/preprocessing/UMI_Preprocessing/AddReadGroup.sh new file mode 100644 index 0000000..ebb5cf9 --- /dev/null +++ b/preprocessing/UMI_Preprocessing/AddReadGroup.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +echo "Running script:" +echo "AddReadGroup.sh" +echo "Starting time:" +date + +# Variables +# Where do you want the output to be? +output="/Path/To/Your/Output/Folder/" +# What is the sample you are using? +sample_use="SampleID" +# Where is the cell barcodes file? +cells_use="/Path/To/Your/CellRanger/barcodes.tsv" +# Where is the respective molecule_info.h5 file from cellranger? +molecule_info_use="/Path/To/Your/molecule_info.h5" +# Where is the original BAM file? +bams_use="/Path/To/Your/CellRanger/possorted_genome_bam.bam" +# How many reads should a UMI have in a specific cell? +# UMIs in different cells are not relevant. +min_reads_per_umi_use=10 +# What is the length of your UMIs? +# 10 for 3'v2 or 5' chemistry and 12 for 3'v3 chemistry. +umi_length_use=12 + +echo "Using output: ${output}" +echo "Doing sample: ${sample_use}" +echo "Doing cells: ${cells_use}" +echo "Doing molecule info: ${molecule_info_use}" +echo "Doing BAM: ${bams_use}" +echo "Minimum Reads per UMI: ${min_reads_per_umi_use}" +echo "UMI length: ${umi_length_use}" + +# Creating the output folder for the sample. +mkdir -p ${output_path}/$sample_use/ +cd ${output_path}/${sample_use}/ + +echo "We subset the UMIs." +Rscript ~/sigurd/preprocessing/UMI_Preprocessing/ReadMoleculeInfo.R \ + --molecule_info $molecule_info_use \ + --barcodes_path $cells_use \ + --output $output_path \ + --sample $sample_use \ + --min_reads_per_umi $min_reads_per_umi_use \ + --umi_length $umi_length_use + + +python ~/sigurd/preprocessing/UMI_Preprocessing/AddReadGroup.py \ + $bam_use \ + $output_path/${sample_use}/ \ + ${output_path}/$sample_use/UGs_Filtered.csv +samtools index $output_path/${sample_use}/possorted_genome_UG_tagged.bam + +echo "Finishing time:" +date diff --git a/preprocessing/UMI_Preprocessing/ReadMoleculeInfo.R b/preprocessing/UMI_Preprocessing/ReadMoleculeInfo.R new file mode 100644 index 0000000..0478cef --- /dev/null +++ b/preprocessing/UMI_Preprocessing/ReadMoleculeInfo.R @@ -0,0 +1,80 @@ +# We read in the molecule_info.h5 file per sample. +# We only use filtered cells. +# We then only retain CB UB combinations with more than min_reads_per_umi occurences. +# We save the combinations in a file and use them to subset the modified bam files. + +print("Libraries.") +suppressPackageStartupMessages(library(DropletUtils)) +suppressPackageStartupMessages(library(R.utils)) +suppressPackageStartupMessages(library(optparse)) + + +print("Variables.") +option_list = list( + make_option("--molecule_info", type = "character", default = "", help = "The molecule info input file.", metavar = "character"), + make_option("--barcodes_path", type = "character", default = "", help = "The barcodes.", metavar = "character"), + make_option("--output", type = "character", default = "", help = "The output path.", metavar = "character"), + make_option("--sample", type = "character", default = "", help = "The sample used.", metavar = "character"), + make_option("--min_reads_per_umi", type = "character", default = 10, help = "The minimum number of reads a UMI needs.", metavar = "numeric"), + make_option("--umi_length", type = "character", default = 12, help = "The length of a UMI.", metavar = "numeric") +) +opt_parser <- OptionParser(option_list = option_list) +opt <- parse_args(opt_parser) + +molecule_info_path <- opt$molecule_info +barcodes_path <- opt$barcodes_path +output <- opt$output +sample <- opt$sample +min_reads_per_umi <- as.numeric(opt$min_reads_per_umi) +umi_length <- as.numeric(opt$umi_length) + +print("Custom function.") +# This function is from 10X. +# https://kb.10xgenomics.com/hc/en-us/articles/360004105372-How-do-you-decompress-the-2-bit-barcode-sequences-in-molecule-info-h5-file- +UMI_seq <- function(number, umi_length) { + # Binary string needs to be zero-padded to ensure consistent length + string_length <- umi_length * 2 + binary_number <- R.utils::intToBin(number) + if(nchar(binary_number) < string_length){ + zeros_for_padding <- string_length - nchar(binary_number) + zeros_for_padding <- paste0(base::rep(0, zeros_for_padding), collapse = "") + binary_number <- paste0(zeros_for_padding, binary_number) + } + # Split binary_str into chunks of 2. + nuc_list <- substring(binary_number, seq(1, nchar(binary_number), by = 2), seq(2, nchar(binary_number), by = 2)) + UMI_seq <- "" + for (i in nuc_list) { + if (i == "00") { + UMI_seq <- paste0(UMI_seq, "A") + } else if (i == "01") { + UMI_seq <- paste0(UMI_seq, "C") + } else if (i == "10") { + UMI_seq <- paste0(UMI_seq, "G") + } else { + UMI_seq <- paste0(UMI_seq, "T") + } + } + return(UMI_seq) +} + + +print("We read the molecule_info.h5 file.") +molecule_info <- read10xMolInfo(molecule_info_path) +molecule_info <- molecule_info$data +molecule_info$cell <- paste0(molecule_info$cell, "-1") + + +print("We load the barcodes.") +barcodes <- read.table(barcodes_path, header = FALSE, sep = "\t")[,1] + + +print("We get the number of UGs (CB+UB combinations) that appear often enough.") +molecule_info <- subset(molecule_info, cell %in% barcodes) +molecule_info <- subset(molecule_info, reads >= min_reads_per_umi) +molecule_info$umi <- unlist(lapply(molecule_info$umi, UMI_seq, umi_length = umi_length)) +UGs <- data.frame(paste0(molecule_info$cell, "_", molecule_info$umi)) + + +print("We save the UGs.") +dir.create(paste0(output, sample), showWarnings = FALSE, recursive = TRUE) +write.table(UGs, paste0(output, sample, "/UGs_Filtered.csv"), sep = ",", col.names = FALSE, row.names = FALSE, quote = FALSE) \ No newline at end of file diff --git a/preprocessing/VarTrix_preprocessing.sh b/preprocessing/VarTrix_preprocessing.sh index 90348aa..036c307 100644 --- a/preprocessing/VarTrix_preprocessing.sh +++ b/preprocessing/VarTrix_preprocessing.sh @@ -40,13 +40,13 @@ cells_use="/Path/To/Your/CellRanger/barcodes.tsv" mkdir -p $OUTPUT/$sample_use echo "Coverage" -vartrix_linux --threads $NCORES --mapq $MAPQ --bam $bam_use \ +vartrix_linux --threads $NCORES --mapq $MAPQ --bam $bam_use --umi \ --vcf $GenesOfInterest --scoring-method "coverage" \ --ref-matrix $OUTPUT/$sample_use/ref_matrix_coverage.mtx \ --cell-barcodes $cells_use --fasta $REFERENCE_FASTA \ --out-matrix $OUTPUT/$sample_use/out_matrix_coverage.mtx echo "Consensus" -vartrix_linux --threads $NCORES --mapq $MAPQ --bam $bam_use \ +vartrix_linux --threads $NCORES --mapq $MAPQ --bam $bam_use --umi \ --vcf $GenesOfInterest --scoring-method "consensus" \ --cell-barcodes $cells_use --fasta $REFERENCE_FASTA \ --out-matrix $OUTPUT/$sample_use/out_matrix_consensus.mt From a2c885fb45e300837fd2a0b68b575d21d1b5100c Mon Sep 17 00:00:00 2001 From: mgrasshoff Date: Fri, 9 Jun 2023 19:59:35 +0200 Subject: [PATCH 02/21] Updated manuals. --- DESCRIPTION | 2 +- NAMESPACE | 1 + README.md | 2 +- docs/404.html | 2 +- docs/articles/SiGURD.html | 4 +- docs/articles/index.html | 2 +- docs/authors.html | 6 +- docs/index.html | 4 +- docs/pkgdown.yml | 2 +- docs/reference/AmpliconSupplementing.html | 2 +- docs/reference/CalculateAlleleFrequency.html | 2 +- docs/reference/CalculateAltReads.html | 2 +- docs/reference/CalculateConsensus.html | 2 +- .../reference/CalculateCorrelationPValue.html | 2 +- docs/reference/CalculateCoverage.html | 2 +- docs/reference/CalculateFisherTestPValue.html | 2 +- docs/reference/CalculateQuality.html | 88 +++++++++++++++++++ .../reference/CalculateStrandCorrelation.html | 2 +- docs/reference/CombineSEobjects.html | 2 +- docs/reference/Filtering.html | 2 +- docs/reference/GetCellInfoPerVariant.html | 2 +- docs/reference/HeatmapVoi.html | 2 +- docs/reference/LoadingMAEGATK_typewise.html | 2 +- docs/reference/LoadingVarTrix_ori.html | 2 +- docs/reference/LoadingVarTrix_typewise.html | 6 +- docs/reference/Merging_SE_list.html | 2 +- docs/reference/RowWiseSplit.html | 2 +- docs/reference/SeparatingMatrixToList.html | 2 +- docs/reference/VariantBurden.html | 2 +- .../VariantCloneSizeThresholding.html | 2 +- docs/reference/VariantCorrelationHeatmap.html | 2 +- docs/reference/VariantFisherTestHeatmap.html | 2 +- .../VariantQuantileThresholding.html | 2 +- docs/reference/VariantWiseCorrelation.html | 2 +- docs/reference/VariantWiseFisherTest.html | 2 +- docs/reference/combine_NAMES.html | 2 +- docs/reference/combine_SparseMatrix.html | 2 +- docs/reference/computeAFMutMatrix.html | 2 +- docs/reference/getAltMatrix.html | 2 +- docs/reference/getReadMatrix.html | 2 +- docs/reference/getRefMatrix.html | 2 +- docs/reference/get_consensus.html | 2 +- docs/reference/ggsci_pal.html | 2 +- docs/reference/index.html | 7 +- docs/reference/load_object.html | 2 +- docs/reference/save_object.html | 2 +- docs/reference/sdiv.html | 2 +- docs/search.json | 2 +- docs/sitemap.xml | 3 + man/CalculateQuality.Rd | 20 +++++ man/LoadingVarTrix_typewise.Rd | 2 + 51 files changed, 173 insertions(+), 50 deletions(-) create mode 100644 docs/reference/CalculateQuality.html create mode 100644 man/CalculateQuality.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 34bc18c..2c9a6d6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: sigurd Type: Package Title: Single cell Genotyping Using RNA Data -Version: 0.2.13 +Version: 0.2.14 Authors@R: c( person(given = "Martin", family = "Grasshoff", diff --git a/NAMESPACE b/NAMESPACE index 78e700c..c8fa551 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,6 +7,7 @@ export(CalculateConsensus) export(CalculateCorrelationPValue) export(CalculateCoverage) export(CalculateFisherTestPValue) +export(CalculateQuality) export(CalculateStrandCorrelation) export(CombineSEobjects) export(Filtering) diff --git a/README.md b/README.md index 4b10535..f39411e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The mutation data was obtained from the Sanger Institute Catalogue Of Somatic Mu ``` -# Current Features v0.2.13 +# Current Features v0.2.14 - Loading data from VarTrix and MAEGATK. - Transforming the data to be compatible for joint analysis. diff --git a/docs/404.html b/docs/404.html index 7a0033a..9e0ff50 100644 --- a/docs/404.html +++ b/docs/404.html @@ -24,7 +24,7 @@ sigurd - 0.2.13 + 0.2.14 + + + + + +
+
+
+ +
+

We calculate the quality per variant.

+
+ +
+

Usage

+
CalculateQuality(
+  SE,
+  variants = rownames(reads_alt),
+  chromosome_prefix = "chrM"
+)
+
+ +
+

Arguments

+
SE
+

SummarizedExperiment object.

+ + +
chromosome_prefix
+

List of matrices for the alternative reads.

+ +
+ +
+ + +
+ + + +
+ + + + + + + diff --git a/docs/reference/CalculateStrandCorrelation.html b/docs/reference/CalculateStrandCorrelation.html index dcd6f62..fafb5da 100644 --- a/docs/reference/CalculateStrandCorrelation.html +++ b/docs/reference/CalculateStrandCorrelation.html @@ -10,7 +10,7 @@ sigurd - 0.2.13 + 0.2.14