@@ -56,7 +56,7 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
5656 containerPath : containerPath ,
5757 dataRegionName : dataRegionName ,
5858 outputFileIds : checked ,
59- libraryId : distinctGenomes . length == 1 ? distinctGenomes [ 0 ] : null ,
59+ libraryId : distinctGenomes . length === 1 ? distinctGenomes [ 0 ] : null ,
6060 toolParameters : results . toolParameters
6161 } ) . show ( ) ;
6262 }
@@ -71,7 +71,7 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
7171 initComponent : function ( ) {
7272 Ext4 . apply ( this , {
7373 bodyStyle : 'padding: 5px;' ,
74- width : 500 ,
74+ width : 600 ,
7575 modal : true ,
7676 title : 'Liftover File(s) To Alternate Genome' ,
7777 items : [ {
@@ -117,12 +117,17 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
117117 itemId : 'useBcfTools' ,
118118 checked : true ,
119119 fieldLabel : 'Use bcftools'
120- } , {
120+ } , {
121121 xtype : 'checkbox' ,
122- itemId : 'doNotRetainUnmapped ' ,
122+ itemId : 'retainUnmapped ' ,
123123 checked : false ,
124- fieldLabel : 'Do Not Retain Unmapped'
125- } ] . concat ( SequenceAnalysis . window . OutputHandlerWindow . getCfgForToolParameters ( this . toolParameters ) ) ,
124+ fieldLabel : 'Retain Unmapped Variants'
125+ } ] . concat ( SequenceAnalysis . window . OutputHandlerWindow . getCfgForToolParameters ( this . toolParameters ) ) . concat ( [ {
126+ xtype : 'sequenceanalysis-variantscattergatherpanel' ,
127+ defaultFieldWidth : 500 ,
128+ labelWidth : 200 ,
129+ bodyStyle : ''
130+ } ] ) ,
126131 buttons : [ {
127132 text : 'Submit' ,
128133 handler : this . onSubmit ,
@@ -158,21 +163,23 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
158163 params . pct = this . down ( '#pctField' ) . getValue ( ) ;
159164 }
160165
161- if ( this . down ( '#dropGenotypes' ) . getValue ( ) ) {
162- params . dropGenotypes = this . down ( '#dropGenotypes ' ) . getValue ( ) ;
163- }
166+ params . dropGenotypes = ! ! this . down ( '#dropGenotypes' ) . getValue ( ) ;
167+ params . useBcfTools = ! ! this . down ( '#useBcfTools ' ) . getValue ( ) ;
168+ params . retainUnmapped = ! ! this . down ( '#retainUnmapped' ) . getValue ( ) ;
164169
165- if ( this . down ( '#useBcfTools ' ) . getValue ( ) ) {
166- params . useBcfTools = this . down ( '#useBcfTools' ) . getValue ( ) ;
167- }
170+ Ext4 . Array . forEach ( this . down ( 'sequenceanalysis-variantscattergatherpanel ' ) . query ( 'field' ) , function ( field ) {
171+ params [ field . name ] = field . getValue ( ) ;
172+ } , this ) ;
168173
169- if ( this . down ( '#doNotRetainUnmapped' ) . getValue ( ) ) {
170- params . doNotRetainUnmapped = this . down ( '#doNotRetainUnmapped' ) . getValue ( ) ;
174+ var actionName = 'runSequenceHandler' ;
175+ if ( params . scatterGatherMethod && params . scatterGatherMethod !== 'none' ) {
176+ params . scatterGather = true ;
177+ actionName = 'runVariantProcessing' ;
171178 }
172179
173180 Ext4 . Msg . wait ( 'Saving...' ) ;
174181 LABKEY . Ajax . request ( {
175- url : LABKEY . ActionURL . buildURL ( 'sequenceanalysis' , 'runSequenceHandler' , this . containerPath ) ,
182+ url : LABKEY . ActionURL . buildURL ( 'sequenceanalysis' , actionName , this . containerPath ) ,
176183 jsonData : {
177184 handlerClass : 'org.labkey.sequenceanalysis.analysis.LiftoverHandler' ,
178185 outputFileIds : this . outputFileIds ,
0 commit comments