Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fei-hgi committed Apr 11, 2024
1 parent 54f5809 commit 9a3c171
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
14 changes: 0 additions & 14 deletions R/classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,9 @@ create_sampleqc_object <- function(samples) {
}

samples_meta <- data.frame()
samples_info <- vector()
samples_exon <- vector()
list_counts <- list()
list_lengths <- list()
for (s in samples) {
samples_info <- append(samples_info, s@sample_info)
samples_exon <- append(samples_exon, paste0(s@sample_gene, ":Exon", s@sample_exon))

if (nrow(samples_meta) == 0) {
samples_meta <- data.frame(matrix(NA, 0, length(s@sample_meta)))
colnames(samples_meta) <- names(s@sample_meta)
Expand Down Expand Up @@ -373,8 +368,6 @@ create_sampleqc_object <- function(samples) {
samples = samples,
samples_ref = ref_samples,
samples_meta = samples_meta,
samples_info = samples_info,
samples_exon = samples_exon,
counts = list_counts,
lengths = list_lengths,
stats = df_stats)
Expand Down Expand Up @@ -474,12 +467,7 @@ create_experimentqc_object <- function(samqc_obj,
}

samples_meta <- data.frame()
samples_info <- vector()
samples_exon <- vector()
for (s in samqc_obj@samples) {
samples_info <- append(samples_info, s@sample_info)
samples_exon <- append(samples_exon, paste0(s@sample_gene, ":Exon", s@sample_exon))

if (nrow(samples_meta) == 0) {
samples_meta <- data.frame(matrix(NA, 0, length(s@sample_meta)))
colnames(samples_meta) <- names(s@sample_meta)
Expand Down Expand Up @@ -514,8 +502,6 @@ create_experimentqc_object <- function(samqc_obj,
experimentqc_object <- new("experimentQC",
samples = samqc_obj@samples,
samples_meta = samples_meta,
samples_info = samples_info,
samples_exon = samples_exon,
coldata = coldata,
ref_condition = refcond,
vep_anno = samqc_obj@samples[[1]]@vep_anno,
Expand Down
7 changes: 0 additions & 7 deletions R/ingest.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@ import_sge_files <- function(dir_path = NULL,
tmp_obj@per_r1_adaptor <- ifelse(is.na(qc_samplesheet[i, ]$per_r1_adaptor), 0, qc_samplesheet[i, ]$per_r1_adaptor)
tmp_obj@per_r2_adaptor <- ifelse(is.na(qc_samplesheet[i, ]$per_r2_adaptor), 0, qc_samplesheet[i, ]$per_r2_adaptor)

tmp_obj@sample_info <- paste(qc_samplesheet[i, ]$targeton_id,
qc_samplesheet[i, ]$condition,
qc_samplesheet[i, ]$replicate, sep = "_")
tmp_obj@sample_gene <- tmp_obj@vep_anno$symbol[1]
tmp_obj@sample_transcript <- tmp_obj@vep_anno$feature[1]
tmp_obj@sample_exon <- tmp_obj@vep_anno$exon[1]

tmp_obj@sample_meta["sample_name"] <- tmp_obj@sample
tmp_obj@sample_meta["sample_info"] <- paste(qc_samplesheet[i, ]$targeton_id,
qc_samplesheet[i, ]$condition,
Expand Down

0 comments on commit 9a3c171

Please sign in to comment.