
    =h                     .    d dl mZ d dlZ G d de      Zy)    )WorkflowRunnerBaseNc                   ,     e Zd Zd fd	Zd Zd Z xZS )MergeByHorizonRunnerc	                 @    t         	|   |||||||dg ddd|       y )NzmergeByHorizon.py)
z-iz-oz-sz-tz-zz--input_dirz--output_dirz--sample_idsz	--threadsz--horizon-idbamT)loggermanifest_list
input_pathoutput_pathadditional_argsthreadsstepnamesoftware_nameunneeded_argsoutput_typerescan_outputmode)super__init__)
selfr   r	   r
   r   r   r   r   r   	__class__s
            P/mounts/lovelace/software/shotgun-workflow/dev/modules/mergeByHorizon_wrapper.pyr   zMergeByHorizonRunner.__init__   s<    '!#+- E 	 	
    c           	      ,   i }| j                   D ]9  }d|v s|d   d k7  s|d   |vrg ||d   <   ||d      j                  |d          ; |D ]7  }dj                  ||         }| j                  j                  ||d d d d       9 | j                  r|S y )Nhorizonid,)r   input1input2output1output2)r	   appendjoininput_file_listleaf)r   prev_step_fileshorizon_dictlinegrouphorizon_idss         r   find_input_filesz%MergeByHorizonRunner.find_input_files   s    &&DD 	?d*Il:8:T)_5 i188dD ' "E((<#67K  ''%)  " 99""r   c                    | j                   D ]q  }| j                  d| j                   d| j                   d|d    d|d    d| j                   g}| j
                  j                  dj                  |             s y )	Nz--input_dir z--output_dir z--horizon_id r   z--sample_ids r   z
--threads  )r$   r   r
   r   r   command_queuer"   r#   )r   itemcmds      r   build_command_queuez(MergeByHorizonRunner.build_command_queue.   s    ((D""t/0 0 012T
|,X/0T\\N+C %%chhsm4 )r   ) r2      r2   N)__name__
__module____qualname__r   r+   r1   __classcell__)r   s   @r   r   r      s    
 25r   r   )modules.software_baser   osr    r   r   <module>r;      s    4 	55- 55r   