Skip to content

Commit

Permalink
v1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
hartleys committed Jun 14, 2016
1 parent 7f4e5d6 commit 7a81482
Show file tree
Hide file tree
Showing 122 changed files with 807 additions and 627 deletions.
Binary file modified QoRTs-vignette.pdf
Binary file not shown.
Binary file removed QoRTs_1.1.2.zip
Binary file not shown.
Binary file removed QoRTs_1.1.2/QoRTs_1.1.2.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed QoRTs_1.1.2/QoRTs.jar → QoRTs_1.1.6/QoRTs.jar
Binary file not shown.
Binary file not shown.
Binary file added QoRTs_1.1.6/QoRTs_1.1.6.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions QoRTs_1.1.2/README.txt → QoRTs_1.1.6/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# QoRTs v1.1.2
(Compiled Mon Jun 6 15:18:28 EDT 2016)
# QoRTs v1.1.6
(Compiled Tue Jun 14 15:00:02 EDT 2016)

The [QoRTs software package](http://hartleys.github.io/QoRTs/) is a fast, efficient, and portable
multifunction toolkit designed to assist in
Expand Down
Binary file not shown.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# QoRTs v1.1.2
(Compiled Mon Jun 6 15:18:28 EDT 2016)
# QoRTs v1.1.6
(Compiled Tue Jun 14 15:00:02 EDT 2016)

The [QoRTs software package](http://hartleys.github.io/QoRTs/) is a fast, efficient, and portable
multifunction toolkit designed to assist in
Expand Down
1,132 changes: 579 additions & 553 deletions src/HartleyUtils/.cache

Large diffs are not rendered by default.

Binary file modified src/HartleyUtils/bin/fileConversionUtils/gtfConverter$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/fileConversionUtils/makeBedFromFlatGff$.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/fileConversionUtils/prepFlatGtfFile$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/fileConversionUtils/prepFlatGtfFile.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/fileConversionUtils/runFeatureComboCt$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$FlatGtfLine.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$FlatGtfReader$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$FlatGtfReader.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$FlatInputGtfLine$.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$FlatOutputGtfLine$.class
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$GtfCodes$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$GtfCodes.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$GtfLine.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$GtfReader$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$GtfReader.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$InputGtfLine$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$InputGtfLine.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$OutputGtfLine$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$OutputGtfLine.class
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$StdGtfReader$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$StdGtfReader.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$StdInputGtfLine$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$StdInputGtfLine.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$StdOutputGtfLine$.class
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool$defaultGtfCodes$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/internalUtils/GtfTool.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$10.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$11.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$12.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$13.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$14.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$15.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$16.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$2.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$3.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$4.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$5.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$6.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$7.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$8.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$$anonfun$9.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts$.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/qcJunctionCounts.class
Binary file not shown.
Binary file modified src/HartleyUtils/bin/qcUtils/runAllQC$.class
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,52 @@ object prepFlatGtfFile {
}
}
*/

private def buildGenomicArrayOfSets_Tx_and_Map(stranded : Boolean, gtffile : String, codes : GtfCodes = new GtfCodes()) : (GenomicArrayOfSets[String], Map[String,String], Map[String,(Char,Map[String,Char])]) = {
private def buildTxCdsSpanMap(stranded: Boolean, gtffile : String, codes : GtfCodes = new GtfCodes()): Map[String,(Int,Int)] = {
var txCDS : Map[String,(Int,Int)] = Map[String,(Int,Int)]();
val gtfReader = GtfReader.getStdGtfReader(gtffile, stranded, true, "\\s+", codes);

for(gtfLine <- gtfReader){
if(gtfLine.isCDS){
val tx = gtfLine.getTxID;
txCDS.get(tx) match {
case Some((currStart : Int, currEnd : Int)) => {
txCDS += ((tx,(math.min(currStart,gtfLine.start),math.max(currEnd,gtfLine.end))))
}
case None => {
txCDS += ((tx,(gtfLine.start,gtfLine.end)))
}
}
}
}

return txCDS.withDefaultValue((0,0));
}
private def buildGenomicArrayOfSets_Tx_and_Map(stranded : Boolean, gtffile : String, codes : GtfCodes = new GtfCodes()) : (GenomicArrayOfSets[String], Map[String,String], Map[String,(Char,Map[String,Char])], Map[String,(Int,Int)]) = {
val txArray : GenomicArrayOfSets[String] = GenomicArrayOfSets[String](stranded);
val gtfReader = GtfReader.getStdGtfReader(gtffile, stranded, true, "\\s+", codes);
var txMap : Map[String,String] = Map[String,String]();
var geneInfoMap = Map[String,(Char,Map[String,Char])]();

var txCDS : Map[String,(Int,Int)] = Map[String,(Int,Int)]()
// returns txArray, txMap, geneInfoMap:
// txArray:
// GenomicArrayOfSets -> geneID
// txMap:
// Map[(geneID : String) -> (txID : String)]
// geneInfoMap:
// Map [ (geneID : String) -> (strand : Char, Map[(txID : String) -> (strand : Char)] ) ]

for(gtfLine <- gtfReader){
if(gtfLine.isExon){
if(gtfLine.isCDS){
val tx = gtfLine.getTxID;
txCDS.get(tx) match {
case Some((currStart : Int, currEnd : Int)) => {
txCDS += ((tx,(math.min(currStart,gtfLine.start),math.max(currEnd,gtfLine.end))))
}
case None => {
txCDS += ((tx,(gtfLine.start,gtfLine.end)))
}
}
} else if(gtfLine.isExon){
val tx = gtfLine.getTxID;
val gene = gtfLine.getGeneID;
val strandedStrand : Char = gtfLine.strandedStrand;
Expand All @@ -158,7 +194,7 @@ object prepFlatGtfFile {
}
}
}
return ((txArray.finalizeStepVectors, txMap, geneInfoMap));
return ((txArray.finalizeStepVectors, txMap, geneInfoMap, txCDS.withDefaultValue((0,0))));
}

private def buildSpliceJunctionMap(txArray : GenomicArrayOfSets[String]) : (Map[GenomicInterval, Set[String]]) = {
Expand Down Expand Up @@ -215,7 +251,9 @@ object prepFlatGtfFile {
txMap : Map[String,String],
spliceJunctionMap : Map[GenomicInterval,Set[String]],
aggregateGeneMap : Map[String,String],
aggregateSet : Set[String], gtfCodes : GtfCodes = new GtfCodes()) : Iterator[FlatGtfLine] = {
aggregateSet : Set[String],
txCDS : Map[String,(Int,Int)],
gtfCodes : GtfCodes = new GtfCodes()) : Iterator[FlatGtfLine] = {
//var featureCountMap : Map[String,Int] = Map[String,Int]().withDefault(k => 0);
//var featureList : Seq[GtfLine] = Seq[GtfLine]();

Expand All @@ -238,16 +276,15 @@ object prepFlatGtfFile {
soFar;
}
});


reportln(" FlatteningGtf: Adding the aggregate genes themselves...("+getDateAndTimeString+")","debug");
val featureListMap2 = aggregateSet.foldLeft(featureListMap)((soFar, aggregateGene) =>{
val features = soFar(aggregateGene);
val iv = new GenomicInterval(features.head.chromName, features.head.strand, features.head.start - 1, features.last.end);

val (geneStrand, geneCt, txInfoMap) = aggregateInfoMap(aggregateGene);
val gtfLine = FlatOutputGtfLine.makeFlatGtfLine_aggregateGene(iv, stranded , aggregateGene , geneStrand, geneCt, txInfoMap, gtfCodes);

val gtfLine = FlatOutputGtfLine.makeFlatGtfLine_aggregateGene(iv, stranded , aggregateGene , geneStrand, geneCt, txInfoMap, txCDS, gtfCodes);
soFar.updated(aggregateGene, gtfLine +: features);
});

Expand Down Expand Up @@ -345,10 +382,11 @@ object prepFlatGtfFile {
//OutputGtfLine(iv : .GenomicInterval, featureType : String, attributeMap : Map[String,String], stranded : Boolean)


//txCDS:Map[String,(Int,Int)]

private def getFlatGtfIterator(infile : String, stranded : Boolean) : Iterator[FlatGtfLine] = {
reportln("FlatteningGtf: starting...("+getDateAndTimeString+")","debug");
val (txArray, txMap, geneInfoMap) : (GenomicArrayOfSets[String], Map[String,String], Map[String, (Char, Map[String,Char])]) = buildGenomicArrayOfSets_Tx_and_Map(stranded,infile);
val (txArray, txMap, geneInfoMap, txCDS) : (GenomicArrayOfSets[String], Map[String,String], Map[String, (Char, Map[String,Char])], Map[String,(Int,Int)]) = buildGenomicArrayOfSets_Tx_and_Map(stranded,infile);

//val txStrandMap = scala.collection.mutable.AnyRefMap[String,Char]();

Expand Down Expand Up @@ -383,7 +421,7 @@ object prepFlatGtfFile {
reportln(" FlatteningGtf: Finished Compiling Aggregate Info. ("+getDateAndTimeString+")","debug");

//val sortedFeatureList = buildFeatures(stranded, txArray, txMap , spliceJunctionMap , aggregateGeneMap , aggregateSet );
val sortedFeatureIterator : Iterator[internalUtils.GtfTool.FlatGtfLine] = buildFeatures2(stranded, aggregateInfoMap, txArray, txMap , spliceJunctionMap , aggregateGeneMap , aggregateSet);
val sortedFeatureIterator : Iterator[internalUtils.GtfTool.FlatGtfLine] = buildFeatures2(stranded, aggregateInfoMap, txArray, txMap , spliceJunctionMap , aggregateGeneMap , aggregateSet, txCDS);
reportln(" FlatteningGtf: Features Built.("+getDateAndTimeString+")","debug");
return(sortedFeatureIterator);
}
Expand Down
20 changes: 15 additions & 5 deletions src/HartleyUtils/src/main/scala/internalUtils/GtfTool.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ object GtfTool {
val JS_AGGREGATEGENE_TXCT = "tx_ct";
val JS_AGGREGATEGENE_TXSTRANDS = "tx_strands";

val JS_TRANSCRIPT_CDS_SPANS = "tx_cds_spans";

val JS_FEATURETYPE_CODEMAP = Map(JS_FEATURETYPE_GENE -> "A", JS_FEATURETYPE_EXON -> "E", JS_FEATURETYPE_KNOWNSPLICE -> "J", JS_FEATURETYPE_NOVELSPLICE -> "N");

def getJSFeatureName(gtfLine : GtfLine) : String = {
Expand Down Expand Up @@ -100,7 +102,8 @@ object GtfTool {
JS_AGGREGATEGENE_CT : String = defaultGtfCodes.JS_AGGREGATEGENE_CT,
JS_AGGREGATEGENE_TXCT : String = defaultGtfCodes.JS_AGGREGATEGENE_TXCT,
JS_AGGREGATEGENE_TXSTRANDS : String = defaultGtfCodes.JS_AGGREGATEGENE_TXSTRANDS,
BIOTYPE_ATTRIBUTE_KEY : String = defaultGtfCodes.BIOTYPE_ATTRIBUTE_KEY
BIOTYPE_ATTRIBUTE_KEY : String = defaultGtfCodes.BIOTYPE_ATTRIBUTE_KEY,
JS_TRANSCRIPT_CDS_SPANS : String = defaultGtfCodes.JS_TRANSCRIPT_CDS_SPANS
) {

val KEY_SORTING : List[String] = List[String]( GENE_ID_ATTRIBUTE_KEY,
Expand All @@ -112,6 +115,7 @@ object GtfTool {
JS_AGGREGATEGENE_CT,
JS_AGGREGATEGENE_TXCT,
JS_AGGREGATEGENE_TXSTRANDS,
JS_TRANSCRIPT_CDS_SPANS,
BIOTYPE_ATTRIBUTE_KEY
);
}
Expand Down Expand Up @@ -167,15 +171,19 @@ object GtfTool {
new FlatOutputGtfLine(iv.chromName, DEF_FEATURESOURCE, featureType, iv.start + 1, iv.end, DEF_SCORE, iv.strand, attributeMap, DEF_ATTRBREAK, stranded, Some(codes.KEY_SORTING), codes);
}

def makeFlatGtfLine_aggregateGene(iv : internalUtils.commonSeqUtils.GenomicInterval, stranded : Boolean, aggregateGene : String, geneStrand : Char, geneCt : Int, txInfoMap : Map[String,Char], codes : GtfCodes = new GtfCodes()) : FlatOutputGtfLine = {
def makeFlatGtfLine_aggregateGene(iv : internalUtils.commonSeqUtils.GenomicInterval, stranded : Boolean, aggregateGene : String, geneStrand : Char, geneCt : Int, txInfoMap : Map[String,Char], txCDS : Map[String,(Int,Int)], codes : GtfCodes = new GtfCodes()) : FlatOutputGtfLine = {
val attributeMap = Map[String,String](codes.GENE_ID_ATTRIBUTE_KEY -> aggregateGene,
codes.JS_EXONIC_PART_NUMBER_ATTRIBUTE_KEY -> "000",
codes.JS_AGGREGATEGENE_STRAND -> geneStrand.toString,
codes.JS_AGGREGATEGENE_CT -> geneCt.toString,
codes.JS_AGGREGATEGENE_TXCT -> txInfoMap.keySet.size.toString,
codes.JS_TX_ID_ATTRIBUTE_KEY -> txInfoMap.keySet.toVector.sorted.mkString("+"),
codes.JS_AGGREGATEGENE_TXSTRANDS -> txInfoMap.keySet.toVector.sorted.map(txInfoMap(_).toString).mkString(",")
);
codes.JS_AGGREGATEGENE_TXSTRANDS -> txInfoMap.keySet.toVector.sorted.map(txInfoMap(_).toString).mkString(","),
codes.JS_TRANSCRIPT_CDS_SPANS -> txInfoMap.keySet.toVector.sorted.map((txID : String) => {
val (s,e) = txCDS(txID);
s + "_" + e;
}).mkString(",")
)
return makeFlatGtfLine(iv,codes.JS_FEATURETYPE_GENE, attributeMap, stranded, codes);
}

Expand All @@ -188,7 +196,9 @@ object GtfTool {

return makeFlatGtfLine(iv, featureType, attributeMap, stranded, codes);
}




}

var ERROR_COUNT_SORTING = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ object qcJunctionCounts {
})
})
}

}
}
//runFunc.contains("writeDEXSeq"), runFunc.contains("writeSpliceExon"), runFunc.contains("writeKnownSplices"), runFunc.contains("writeNovelSplices")
class qcJunctionCounts(anno_holder : qcGtfAnnotationBuilder, stranded : Boolean, fr_secondStrand : Boolean,
writeDEXSeq : Boolean, writeSpliceExon : Boolean, writeKnownSplices : Boolean, writeNovelSplices : Boolean, annotatedSpliceExonCounts : Boolean,
Expand Down
2 changes: 1 addition & 1 deletion src/HartleyUtils/src/main/scala/qcUtils/runAllQC.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ object runAllQC {

summaryWriter.write("KEPT_NOT_UNIQUE_ALIGNMENT "+keptMultiMappedCt+"\n");
summaryWriter.write("minObservedReadLength\t"+minObsReadLength + "\n");
summaryWriter.write("maxObservedReadLength\t"+minObsReadLength + "\n");
summaryWriter.write("maxObservedReadLength\t"+maxObsReadLength + "\n");
summaryWriter.write("maxLegalPhredScore\t"+maxPhredScore + "\n");

if(isSingleEnd){
Expand Down
4 changes: 2 additions & 2 deletions src/HartleyUtils/src/main/scala/runner/runner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import internalUtils.commandLineUI._;

object runner {

final val QORTS_VERSION = "1.1.2"; // REPLACE_THIS_QORTS_VERSION_VARIABLE_WITH_VERSION_NUMBER (note this exact text is used in a search-and-replace. Do not change it.)
final val QORTS_COMPILE_DATE = "Mon Jun 6 15:18:28 EDT 2016"; // REPLACE_THIS_QORTS_DATE_VARIABLE_WITH_DATE (note this exact text is used in a search-and-replace. Do not change it.)
final val QORTS_VERSION = "1.1.6"; // REPLACE_THIS_QORTS_VERSION_VARIABLE_WITH_VERSION_NUMBER (note this exact text is used in a search-and-replace. Do not change it.)
final val QORTS_COMPILE_DATE = "Tue Jun 14 15:00:02 EDT 2016"; // REPLACE_THIS_QORTS_DATE_VARIABLE_WITH_DATE (note this exact text is used in a search-and-replace. Do not change it.)

//final val FOR_HELP_STRING = "For help, use command: "

Expand Down
4 changes: 2 additions & 2 deletions src/QoRTs/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: QoRTs
Version: 1.1.2
Date: 2016-06-06
Version: 1.1.6
Date: 2016-06-14
Title: Quality of RNA-seq Tool
Authors@R: c(person("Stephen Hartley, PhD", "Developer", role = c("aut", "cre"),
email = "[email protected]"))
Expand Down
9 changes: 8 additions & 1 deletion src/QoRTs/NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
## v1.1.0:
## v1.1.6:
Minor additions and tweaks:
* Added new optional tag to "flattened" GFF file, containing transcript coding region information. This is intended for use by a future update to JunctionSeq.
* Fixed x-axis label autofitting to not produce oversized x-axis labels when there is only one column to label.
* Legend plot now autofits and autoselects the number of columns. Added cex.legend and ncol parameters to these functions to allow users to override this behavior.
* Fixed bug with maxObsReadLength field.

## v1.1.2:
New features, updates, and bug-fixes.
* Major bugfix: Fixed the geneCounts file so that UTR/CDS counts are no longer switched. Thanks to Roy Francis!
* Added "rasterize.medium.plots" parameter to all makeMultiPlot functions. This option will
Expand Down
40 changes: 25 additions & 15 deletions src/QoRTs/R/external.plotting.func.R
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,7 @@ makePlot.splicing.mismatch <- function(plotter, debugMode = DEFAULTDEBUGMODE, s
####################################################################################


makePlot.legend.box <- function(plotter,debugMode = DEFAULTDEBUGMODE, singleEndMode = plotter$res@singleEnd, ...){
makePlot.legend.box <- function(plotter,debugMode = DEFAULTDEBUGMODE, singleEndMode = plotter$res@singleEnd, cex.legend = NULL, ncol = NULL, ...){
plot.name <- "legend box";
plotter.error.wrapper(plot.name, plotterFcn = function(){
plotter.NVC <- plotter;
Expand All @@ -2546,45 +2546,55 @@ makePlot.legend.box <- function(plotter,debugMode = DEFAULTDEBUGMODE, singleEndM
title.text <- paste0("Sample Highlight:\n",plotter$title.highlight.name,"\nColored by Lane")
title.cex <- fit.character.vector(title.text);

text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
internal.plot.legend(plotter,"lnpt","bottom", ...);
#text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
#internal.plot.legend(plotter,"lnpt","bottom", ...);
#internal.plot.legend(plotter.NVC,"NVC.both","center");
} else if(plotter$plot.type == "highlightSample") {
#internal.plot.legend(plotter.NVC,"NVC.both","center");
title.text <- paste0("Sample Highlight:\n",plotter$title.highlight.name)
title.cex <- fit.character.vector(title.text);

internal.plot.legend(plotter,"lnpt","bottom", ...);
text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
#internal.plot.legend(plotter,"lnpt","bottom", ...);
#text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
} else if(plotter$plot.type == "colorBySample") {
title.text <- paste0("Summary Plots, By Sample")
title.cex <- fit.character.vector(title.text);
text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
internal.plot.legend(plotter,"lnpt","bottom", ...);
#text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
#internal.plot.legend(plotter,"lnpt","bottom", ...);
} else if(plotter$plot.type == "summary"){
title.text <- paste0("All\nQuality Control\nSummary Plots")
title.cex <- fit.character.vector(title.text);
text(0.5,0.5,title.text,adj=c(0.5,0.5),cex=title.cex, ...);
return("");
} else if(plotter$plot.type == "colorByLane"){
title.text <- paste0("Summary Plots, By Lane")
title.cex <- fit.character.vector(title.text);
text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
internal.plot.legend(plotter,"lnpt","bottom", ...);
#text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
#internal.plot.legend(plotter,"lnpt","bottom", ...);
} else if(plotter$plot.type == "colorByGroup"){
title.text <- paste0("Summary Plots, By Group")
title.cex <- fit.character.vector(title.text);
text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
internal.plot.legend(plotter,"lnpt","bottom", ...);
} else {
#text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);
#internal.plot.legend(plotter,"lnpt","bottom", ...);
} #else {
#Do nothing.
return("");
# return("");
#}
text(0.5,1,title.text,adj=c(0.5,1),cex=title.cex, ...);

if(is.null(cex.legend)){
autofit.limits <- device.limits();
autofit.limits[4] <- par("usr")[4] - strheight(paste0(title.text,"\n"),cex = title.cex);
internal.plot.legend(plotter,"lnpt","bottom",autofit.limits=autofit.limits, ncol=ncol, ...);
} else {
internal.plot.legend(plotter,"lnpt","bottom", cex = cex.legend, ncol=ncol, ...);
}
})
}

makePlot.legend.over <- function(position, plotter, debugMode = DEFAULTDEBUGMODE, singleEndMode = plotter$res@singleEnd, ...) {
makePlot.legend.over <- function(position, plotter, debugMode = DEFAULTDEBUGMODE, singleEndMode = plotter$res@singleEnd,ncol = NULL, ...) {
plotter.NVC <- plotter;
internal.plot.legend(plotter, "lnpt", position, ...);
internal.plot.legend(plotter, "lnpt", position,ncol=ncol, ...);
}

get.summary.table <- function(res, outfile = NULL, debugMode = DEFAULTDEBUGMODE){
Expand Down
Loading

0 comments on commit 7a81482

Please sign in to comment.