Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Small bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jenzopr committed Apr 30, 2018
1 parent 1f380e1 commit d5d77b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
- salmon
- kallisto
#- htstream
#- umis
- umis
- r-magrittr
- r-data.table
- r-readr
Expand Down
5 changes: 4 additions & 1 deletion src/auxiliary.snake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def find_nested_key(d, k):
return(None)

def find_metadata_files(wildcards):
metadata = [config['samplesheet']['file'], join(config['dirs']['tables'], 'salmon.txt')]
metadata = [config['samplesheet']['file']]
if config['action']['quantification'] == 'salmon':
metadata.extend([config['samplesheet']['file'], join(config['dirs']['tables'], 'salmon.txt')])

if config['action']['clean']:
metadata.extend([join(config['dirs']['tables'], 'htstream.txt')])
if config['action']['demultiplex']:
Expand Down
2 changes: 1 addition & 1 deletion src/createSCE_kallisto.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (!is.null(metadata_files)) {
metadata_ <- lapply(metadata_files, function(p) metadata <- data.table::fread(input = p, sep = "\t", header = T, stringsAsFactors = T, na.strings = "NA"))
metadata <- Reduce(function(a, b) dplyr::left_join(a, b, by = snakemake@config$samplesheet$index), metadata_)

m <- match(colnames(expression[[1]]), make.names(metadata[, snakemake@config$samplesheet$index]))
m <- match(colnames(expression[[1]]), make.names(metadata[[which(colnames(metadata) == snakemake@config$samplesheet$index)]]))
colData_ <- as.data.frame(metadata[na.omit(m), ])
rownames(colData_) <- make.names(colData_[, snakemake@config$samplesheet$index])
} else {
Expand Down

0 comments on commit d5d77b7

Please sign in to comment.