Skip to content

Commit

Permalink
Merge pull request nf-core#124 from zifornd/hotfix-check-names
Browse files Browse the repository at this point in the history
Stop R converting sample names with '-' in string
  • Loading branch information
jma1991 authored Feb 23, 2024
2 parents be1e0f2 + 561f14b commit 5560492
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 3 additions & 3 deletions bin/run_dexseq_dtu.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions bin/run_dexseq_exon.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ 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]

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]

Expand Down
2 changes: 1 addition & 1 deletion bin/run_drimseq_filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions bin/run_edger_exon.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions bin/suppa_split_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 5560492

Please sign in to comment.