Skip to content

Commit

Permalink
scoreMatrixList.R:
Browse files Browse the repository at this point in the history
	- changed & -> && when testing for the file
  • Loading branch information
frenkiboy committed Nov 11, 2013
1 parent e6d4963 commit f85444f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/scoreMatrixList.R
Expand Up @@ -101,7 +101,7 @@ ScoreMatrixList = function(targets, windows=NULL, bin.num=NULL,

# ----------------------------------------------------------------- #
# checks whether the list argument contains only scoreMatrix objects
if(all(unlist(lapply(targets, class)) == 'scoreMatrix'))
if(all(unlist(lapply(targets, class)) == 'ScoreMatrix'))
return(new("ScoreMatrixList",targets))

# ----------------------------------------------------------------- #
Expand All @@ -114,7 +114,7 @@ ScoreMatrixList = function(targets, windows=NULL, bin.num=NULL,
GRangesList, a list of GRanges objects')
}

if(all(file.exists(targets)) & is.null(type))
if(!list.ind && all(file.exists(targets)) && is.null(type))
stop('When providing a file, it is necessary to give the type of the file')

# gets the names for the resulting list
Expand Down
3 changes: 1 addition & 2 deletions inst/doc/GenomationManual-knitr.Rnw
Expand Up @@ -236,13 +236,12 @@ is used to represent results from multiple experiments.
It can be in one of the three formats: a list of RleLists, a list of GRanges (or a GRangesList object),
or a character vector designating a set of .bam files.
<<ScoreMatrixList, eval=FALSE, tidy=TRUE>>=
library(genomationData)
data(promoters)
data(cpgi)
data(cage)
cage$tpm = NULL
targets = list(cage=cage, cpgi=cpge)
targets = list(cage=cage, cpgi=cpgi)
sm = ScoreMatrixList(targets=targets, windows=promoters, bin.num=50)
@

Expand Down

0 comments on commit f85444f

Please sign in to comment.