Skip to content

Commit

Permalink
Merge pull request #77 from ywilke/bug_fix
Browse files Browse the repository at this point in the history
Fixed an issue where the edgeR and DESeq2 task would fail when there is only 1 sample being run with the pipeline.
  • Loading branch information
ffmmulder authored Mar 3, 2021
2 parents 38d8e21 + 8745b8d commit 76fad46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/deseq2Normalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ library("DESeq2")
args = commandArgs(trailingOnly=TRUE)
counts_raw <- read.delim(args[1], comment.char="#", row.names = 1)
cds = as.matrix(counts_raw[,7:ncol(counts_raw)])
colnames(cds) <- colnames(counts_raw)[7:ncol(counts_raw)]
#Get column data and set dummy condition
(colData <- data.frame(row.names=colnames(cds),condition=factor(c(rep("exp", ncol(cds))))))
#Create DEseq2 dataset
Expand Down
3 changes: 2 additions & 1 deletion bin/edgerNormalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ args = commandArgs(trailingOnly=TRUE)

fc.df <- read.delim(args[1], comment.char="#")
# Normalize
counts <- fc.df[,8:ncol(fc.df)]
counts <- data.frame(fc.df[,8:ncol(fc.df)])
colnames(counts) <- colnames(fc.df)[8:ncol(fc.df)]
rownames(counts) <- fc.df$Geneid
x <- DGEList(counts=counts, genes=fc.df[,c("Geneid","Length")] )
# RPKM/CPM normalization
Expand Down

0 comments on commit 76fad46

Please sign in to comment.