Skip to content

Commit

Permalink
Fix R problem with empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
pfh committed Oct 6, 2017
1 parent ee7ab3e commit e7214d8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ dist/*
test/.state/*
doc/_*
nesoni.egg-info
*.sublime-*

12 changes: 10 additions & 2 deletions nesoni/nesoni-r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ Title: Nesoni R component
Description: The R component of the Nesoni toolsuite.
Author: Paul Harrison
Maintainer: Paul Harrison <[email protected]>
Depends: limma, edgeR, Matrix, parallel
Suggests: goseq, seriation, NMF
Depends:
limma,
edgeR,
Matrix,
parallel
Suggests:
goseq,
seriation,
NMF,
varistran
4 changes: 4 additions & 0 deletions nesoni/nesoni-r/R/counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ read.counts <- function(filename, min.total=0, min.max=0, keep=NULL, norm.file=N

data <- read.grouped.table(filename, require=c('Count'), default.group='Count')
counts <- as.matrix( data$Count )

# Can happen with empty data
if (storage.mode(counts) == "logical")
storage.mode(counts) <- "numeric"

gene <- data.frame(row.names=rownames(counts), locus_tag=rownames(counts))

Expand Down
6 changes: 3 additions & 3 deletions nesoni/nesoni-r/R/fitnoise.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#
#

library(Matrix)
library(limma) # EList class, p.adjust
library(parallel)
#library(Matrix)
#library(limma) # EList class, p.adjust
#library(parallel)


##################################
Expand Down
8 changes: 4 additions & 4 deletions nesoni/reference_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ def run(self):
reference.set_annotations(annotations)

with legion.Stage() as stage:
if self.genome:
stage.process(reference.build_genome, self.genome_select)
if config.apply_ifavailable_program(self.bowtie, 'bowtie2-build'):
stage.process(reference.build_bowtie_index)
if config.apply_ifavailable_program(self.ls, 'gmapper-ls'):
stage.process(reference.build_shrimp_mmap, False)
if config.apply_ifavailable_program(self.cs, 'gmapper-cs'):
stage.process(reference.build_shrimp_mmap, True)
if config.apply_ifavailable_program(self.bowtie, 'bowtie2-build'):
stage.process(reference.build_bowtie_index)
if self.genome:
stage.process(reference.build_genome, self.genome_select)
if config.apply_ifavailable_jar(self.snpeff, 'snpEff.jar'):
stage.process(reference.build_snpeff)

Expand Down

0 comments on commit e7214d8

Please sign in to comment.