From 8f575d654a8224f8b0456a1d810daf04d9ee5abd Mon Sep 17 00:00:00 2001 From: James Ashmore Date: Fri, 23 Feb 2024 11:59:58 +0000 Subject: [PATCH 1/2] Stop R converting sample names with '-' in string --- bin/run_dexseq_dtu.R | 6 +++--- bin/run_dexseq_exon.R | 4 ++-- bin/run_drimseq_filter.R | 2 +- bin/run_edger_exon.R | 4 ++-- bin/suppa_split_file.R | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/run_dexseq_dtu.R b/bin/run_dexseq_dtu.R index fca4364..5fe3d3b 100755 --- a/bin/run_dexseq_dtu.R +++ b/bin/run_dexseq_dtu.R @@ -77,21 +77,21 @@ vectorToDataFrame <- function(x) { # Read samples table -samples <- read.delim(samples, stringsAsFactors = TRUE) +samples <- read.delim(samples, stringsAsFactors = TRUE, check.names = FALSE) colnames(samples) <- c("sample", "condition") # Read contrasts table -contrasts <- read.csv(contrasts) +contrasts <- read.csv(contrasts, check.names = FALSE) contrasts <- contrasts[, c("contrast", "treatment", "control"), drop = FALSE] # Read counts table -counts <- read.table(counts, sep = "\t", header = TRUE) +counts <- read.table(counts, sep = "\t", header = TRUE, check.names = FALSE) annotation <- data.frame( featureID = counts$feature_id, diff --git a/bin/run_dexseq_exon.R b/bin/run_dexseq_exon.R index 3528937..162ab66 100755 --- a/bin/run_dexseq_exon.R +++ b/bin/run_dexseq_exon.R @@ -99,7 +99,7 @@ write.plotDEXSeq <- function(x, file, ntop = 10) { # Read samples table -samples <- read.csv(samples, stringsAsFactors = TRUE) +samples <- read.csv(samples, stringsAsFactors = TRUE, check.names = FALSE) samples <- samples[, c("sample", "condition"), drop = FALSE] @@ -107,7 +107,7 @@ samples <- unique(samples) # Read contrasts table -contrasts <- read.csv(contrasts) +contrasts <- read.csv(contrasts, check.names = FALSE) contrasts <- contrasts[, c("contrast", "treatment", "control"), drop = FALSE] diff --git a/bin/run_drimseq_filter.R b/bin/run_drimseq_filter.R index d2f3319..7153a3f 100755 --- a/bin/run_drimseq_filter.R +++ b/bin/run_drimseq_filter.R @@ -43,7 +43,7 @@ tx2gene <- read.csv(tximport_tx2gene, sep="\t", header = TRUE) ###################################### # Read in Sample sheet -samps <- read.csv(samplesheet, sep=",", header = TRUE) +samps <- read.csv(samplesheet, sep=",", header = TRUE, check.names = FALSE) # check header of sample sheet if (!c("sample") %in% colnames(samps) | !c("condition") %in% colnames(samps)) { diff --git a/bin/run_edger_exon.R b/bin/run_edger_exon.R index 8068bf7..39fd5c0 100755 --- a/bin/run_edger_exon.R +++ b/bin/run_edger_exon.R @@ -28,7 +28,7 @@ library(edgeR) # Read samples table -samples <- read.csv(samplesheet) +samples <- read.csv(samplesheet, check.names = FALSE) samples <- samples[, c("sample", "condition"), drop = FALSE] @@ -37,7 +37,7 @@ samples <- unique(samples) # Read contrasts table -contrasts <- read.csv(contrastsheet) +contrasts <- read.csv(contrastsheet, check.names = FALSE) contrasts <- contrasts[, c("contrast", "treatment", "control"), drop = FALSE] diff --git a/bin/suppa_split_file.R b/bin/suppa_split_file.R index 1971ffb..dfbf181 100755 --- a/bin/suppa_split_file.R +++ b/bin/suppa_split_file.R @@ -39,14 +39,14 @@ if (length(args) == 5){ ######### Read in input file ######### ###################################### -input_data <- read.csv(input_file, sep="\t", header=TRUE) +input_data <- read.csv(input_file, sep = "\t", header = TRUE, check.names = FALSE) ###################################### ####### Process samplesheet ########## ###################################### # Read in samplesheet -samplesheet <- read.csv(samplesheet, header = TRUE) +samplesheet <- read.csv(samplesheet, header = TRUE, check.names = FALSE) # check header of sample sheet if (!c("sample") %in% colnames(samplesheet) | !c("condition") %in% colnames(samplesheet)) { From 561f14ba0d4d7a7cdc3b9b7b2960a63a67a187fd Mon Sep 17 00:00:00 2001 From: James Ashmore Date: Fri, 23 Feb 2024 13:29:01 +0000 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 101448b..de1cc28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v1.0.3 - 2024-02-23 + +- Improved TPM file splitting performance (Issue #120). +- Fixed an issue where R scripts altered sample names upon loading (Issue #122). + ## v1.0.2 - 2024-01-08 Patch for run_stager.R (#108) and template update v2.11.1 (#109).