hartleys / QoRTs

Quality of RNA-Seq Toolset
52 stars 14 forks source link

what can I do to fix the error? #20

Closed HIM72 closed 8 years ago

HIM72 commented 8 years ago

I get the follwoing erro if I include an one particular sample in the decoder.txt Error in paste0(unique, collapse = ",") : cannot coerce type 'closure' to vector of type 'character'

and I don't understand why this is

my running environment is as follows. platform x86_64-w64-mingw32
os mingw32
version.string R version 3.3.0 (2016-05-03)

I've downloaded all the resultfile from the cluster to windows and try to make the plot on R running on top of windows. Thank you.

hartleys commented 8 years ago

There should not be any issue with this. Can you post the decoder file and the commands used to get to this error?

Can you also post the rest of the output from the QoRTs run?

HIM72 commented 8 years ago

Following is the decoder file

unique.ID sample.ID lane.ID group.ID qc.data.dir input.read.pair.count multi.mapped.read.pair.count 1a patient 1218 NT \QoRT1218\STAR 44949656 2062723 2a patient 0421 NT \QoRT0421\STAR 7557746 2691726 3a patient 1345 NT \QoRT1345\STAR 46474808 1890304 4a patient 0812 NT \QoRT0812\STAR 60008436 3477489 5a donor 065 NT \QoRT0065\STAR 59990203 3144663 6a donor UNKONWN FACS \QoRT1646\STAR 64212876 5076550

the R commands I run is following base.dir ="D:\Download\812_G\Sample_0812-G" decoder="D:\Download\0812_G\Sample_0812-G\decoder.txt" output.dir="D:\Download\0812_G\Sample_0812-Globin\output" pngReq <- require(png); edgeRReq <- require(edgeR); deseqReq <- require(DESeq2); res <- read.qc.results.data(base.dir, decoder.files = decoder, calc.DESeq2 = deseqReq, calc.edgeR = edgeRReq);

upto sample 5a everything runs fine but when adding 6a I get the above mentioned error. when I have 6a separately it runs fine.

following is the output with 5 samples

base.dir ="D:\Download\0812_G\Sample_0812-G" decoder="D:\Download\0812_G\Sample_0812-G\decoder.txt" output.dir="D:\Download\0812_Globin\Sample_0812-G\output" message("base directory: ", base.dir); base directory: D:\Download\0812_G\Sample_0812-G message("decoder file: ", decoder); decoder file: D:\Download\0812_G\Sample_0812-G\decoder.txt message("output directory: ", output.dir); output directory: D:\Download\0812_G\Sample_0812-G\output pngReq <- require(png); Loading required package: png edgeRReq <- require(edgeR); Loading required package: edgeR Loading required package: limma deseqReq <- require(DESeq2); Loading required package: DESeq2 Loading required package: S4Vectors Loading required package: stats4 Loading required package: BiocGenerics Loading required package: parallel

Attaching package: 멊iocGenerics? The following objects are masked from 몆ackage:parallel? clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from 몆ackage:limma? plotMA The following object is masked from 몆ackage:stats? xtabs The following objects are masked from 몆ackage:base? anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, do.call, duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames, sapply, setdiff, sort, table, tapply, union, unique, unlist, unsplit

Creating a generic function for 몁char?from package 멳ase?in package 멣4Vectors?Loading required package: IRanges Loading required package: GenomicRanges Loading required package: GenomeInfoDb Loading required package: Rcpp Loading required package: RcppArmadillo Warning messages: 1: package 멢cpp?was built under R version 3.3.1 2: package 멢cppArmadillo?was built under R version 3.3.1 3: replacing previous import 멣4Vectors::Position?by 멺gplot2::Position?when loading 멏ESeq2?

res <- read.qc.results.data(base.dir, decoder.files = decoder, calc.DESeq2 = deseqReq, calc.edgeR = edgeRReq); reading QC.summary.txt files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.03 secs] Autodetected Paired-End mode. reading QC.gc.byPair.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.03 secs] reading QC.gc.byRead.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.02 secs] reading QC.gc.byRead.vsBaseCt.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.11 secs] reading QC.quals.r1.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.03 secs] reading QC.quals.r2.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.06 secs] reading QC.cigarOpDistribution.byReadCycle.R1.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.05 secs] reading QC.cigarOpDistribution.byReadCycle.R2.txt.gz files... done. [time: 2016-08-24 01:09:57],[elapsed: 0.06 secs] reading QC.cigarOpLengths.byOp.R1.txt.gz files... done. [time: 2016-08-24 01:09:58],[elapsed: 0.6 secs] reading QC.cigarOpLengths.byOp.R2.txt.gz files... done. [time: 2016-08-24 01:09:59],[elapsed: 0.64 secs] reading QC.geneBodyCoverage.by.expression.level.txt.gz files... done. [time: 2016-08-24 01:09:59],[elapsed: 0.03 secs] reading QC.geneCounts.txt.gz files... done. [time: 2016-08-24 01:10:01],[elapsed: 2 secs] reading QC.insert.size.txt.gz files... done. [time: 2016-08-24 01:10:02],[elapsed: 0.52 secs] reading QC.NVC.raw.R1.txt.gz files... done. [time: 2016-08-24 01:10:02],[elapsed: 0.06 secs] reading QC.NVC.raw.R2.txt.gz files... done. [time: 2016-08-24 01:10:02],[elapsed: 0.05 secs] reading QC.NVC.lead.clip.R1.txt.gz files... done. [time: 2016-08-24 01:10:03],[elapsed: 0.53 secs] reading QC.NVC.lead.clip.R2.txt.gz files... done. [time: 2016-08-24 01:10:03],[elapsed: 0.5 secs] reading QC.NVC.tail.clip.R1.txt.gz files... done. [time: 2016-08-24 01:10:03],[elapsed: 0.45 secs] reading QC.NVC.tail.clip.R2.txt.gz files... done. [time: 2016-08-24 01:10:04],[elapsed: 0.91 secs] reading QC.NVC.minus.clipping.R1.txt.gz files... done. [time: 2016-08-24 01:10:04],[elapsed: 0.05 secs] reading QC.NVC.minus.clipping.R2.txt.gz files... done. [time: 2016-08-24 01:10:04],[elapsed: 0.06 secs] reading QC.chromCount.txt.gz files... done. [time: 2016-08-24 01:10:04],[elapsed: 0.02 secs] reading QC.biotypeCounts.txt.gz files... done. [time: 2016-08-24 01:10:05],[elapsed: 0.03 secs] reading QC.geneBodyCoverage.byExpr.avgPct.txt.gz files... done. [time: 2016-08-24 01:10:05],[elapsed: 0.03 secs] calculating secondary data: Calculating DESeq2 Normalization Factors (Geometric normalization)... Calculating edgeR Normalization Factors (all edgeR normalizations)... Calculating DESeq2 Normalization Factors (Geometric normalization)... Calculating edgeR Normalization Factors (all edgeR normalizations)... debug 3B done. [time: 2016-08-24 01:10:06],[elapsed: 1 secs]

Now when I add 6a to the decoder.txt file and run I get following

res <- read.qc.results.data(base.dir, decoder.files = decoder,

  • calc.DESeq2 = deseqReq, calc.edgeR = edgeRReq); Error in paste0(unique, collapse = ",") : cannot coerce type 'closure' to vector of type 'character'
hartleys commented 8 years ago

It sounds like your decoder file might have invisible problems? Maybe extra white space or a carriage return or something. Or a space instead of a tab? I can't tell from the copy-pasted decoder though.

Instead of copy-pasting the decoder contents, could you attach the decoder.txt file as an attachment? Like this: test.txt

You can just drag-drop it into the comment reply text box.

HIM72 commented 8 years ago

Here it is. decoder.txt BTW. the file has some names chnaged but it behaves the same as described.

hartleys commented 8 years ago

Normally, "unique.ID" is used to allow multiple technical replicates of the same biological samples. The "group" column is intended to refer to biological sample groups.

QoRTs assumes that "group.ID" is consistent across all technical replicates of a sample.

The sample "donor" has two groups. 5a is group "NT", and 6a is group "FACS". This is why there is an error. You can use another column (with any name you like) for "NT/FACS" status.

HIM72 commented 8 years ago

got it. Thank you.