8000 Patch fix v1.0.3 by jma1991 · Pull Request #125 · nf-core/rnasplice · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Patch fix v1.0.3 #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/rnasplice/releases/tag/1.0.2" target="_blank">nf-core/rnasplice</a>
This report has been generated by the <a href="https://github.com/nf-core/rnasplice/releases/tag/1.0.3" target="_blank">nf-core/rnasplice</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/rnasplice/1.0.2/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/rnasplice/1.0.3/docs/output" target="_blank">documentation</a>.

report_section_order:
"nf-core-rnasplice-methods-description":
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
21 changes: 12 additions & 9 deletions bin/suppa_split_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@ if (length(args) == 5){

}

######################################
######### Read in input file #########
######################################

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 All @@ -63,19 +69,16 @@ conditions <- unique(samplesheet[,"condition"])
#########################################################

# Function for taking all sample names associated with a given condition
split_files <- function(condition, samplesheet, input_file, output_file_suffix, prefix, calculate_ranges){
split_files <- function(condition, samplesheet, input_data, output_file_suffix, prefix, calculate_ranges){

# Get indices of rows which cover given condition for ranges
indices <- which(samplesheet$condition == condition)

# Get sample names for given condition
sample_names <- samplesheet[samplesheet$condition == condition,]$sample

# Read in input file
input_file <- read.csv(input_file, sep="\t", header=TRUE)

# Check header of input_file contains all samples from processed samplesheet
if (!all(samplesheet$sample %in% colnames(input_file))) {
# Check header of input_data contains all samples from processed samplesheet
if (!all(samplesheet$sample %in% colnames(input_data))) {

stop("suppa_split_file.R Input_file must contain samplesheet samples.", call.=FALSE)

Expand All @@ -92,7 +95,7 @@ split_files <- function(condition, samplesheet, input_file, output_file_suffix,
}

# Subset input files and save out as new file
write.table(input_file[,sample_names, drop=F], file = output_file, quote = FALSE, sep = "\t")
write.table(input_data[,sample_names, drop=F], file = output_file, quote = FALSE, sep = "\t")

# Get Cluster ranges which match the tpm and psi files above (1-3 4-6)
# Column numbers have to be continuous, with no overlapping or missing columns between them. Ex:1-3,4-6
Expand All @@ -118,7 +121,7 @@ split_files <- function(condition, samplesheet, input_file, output_file_suffix,
for (cond in conditions) {

# Split files
split_files(cond, samplesheet, input_file, output_file_suffix, prefix, calculate_ranges)
split_files(cond, samplesheet, input_data, output_file_suffix, prefix, calculate_ranges)

}

Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ manifest {
description = """Alternative splicing analysis using RNA-seq."""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '1.0.2'
version = '1.0.3'
doi = '10.5281/zenodo.8424632'
}

Expand Down
0