| 0 | 1 <tool id="generate_pyclone_input" name="Generate PyClone input" version="14.2"> | 
|  | 2 	<description> | 
|  | 3 		Generate PyClone input files from SNV and copy number data | 
|  | 4 	</description> | 
|  | 5 | 
|  | 6 	<requirements> | 
|  | 7 		<requirement type="package" version="1.0">generate_pyclone_input</requirement> | 
|  | 8 		<requirement type="package" version="14.2">morinlab_scripts</requirement> | 
|  | 9 		<requirement type="set_environment">MORINLAB_SCRIPTS</requirement> | 
|  | 10 	</requirements> | 
|  | 11 | 
|  | 12 	<stdio> | 
|  | 13 	   <exit_code range="1:" level="warning" /> | 
|  | 14 	   <exit_code range=":-1" level="warning" /> | 
|  | 15 	   <regex match="Error:" /> | 
|  | 16 	   <regex match="Exception:" /> | 
|  | 17 	</stdio> | 
|  | 18 | 
|  | 19 	<command> | 
|  | 20 		Rscript \$MORINLAB_SCRIPTS/generate_pyclone_input/generate_pyclone_input.R | 
|  | 21 		$segments $segments_mode $maf $sample_id .; | 
|  | 22 | 
|  | 23 		mv ./${sample_id}_pyclone_in.tsv $pyclone_input; | 
|  | 24 	</command> | 
|  | 25 | 
|  | 26 	<inputs> | 
|  | 27 		<!-- Required inputs --> | 
|  | 28 		<param type="data" name="segments" format="tabular" label="Sequenza, Titan, OncoSNP, or IGV-friendly segments file"/> | 
|  | 29 		<param name="segments_mode" label="Specify the source of the segments file" type="select"> | 
|  | 30 			<option value="S">Sequenza</option> | 
|  | 31 			<option value="T">Titan</option> | 
|  | 32 			<option value="I">IGV-friendly</option> | 
|  | 33 		</param> | 
|  | 34 		<param type="data" name="maf" format="tabular" label="Patient MAF file"/> | 
|  | 35 		<param type="text" name="sample_id" size="20" label="Sample ID"/> | 
|  | 36 	</inputs> | 
|  | 37 | 
|  | 38 	<outputs> | 
|  | 39 		<data format="tabular" name="pyclone_input"/> | 
|  | 40 	</outputs> | 
|  | 41 | 
|  | 42 	<tests> | 
|  | 43 	</tests> | 
|  | 44 | 
|  | 45 	<help> | 
|  | 46 	</help> | 
|  | 47 | 
|  | 48 </tool> | 
|  | 49 |