view cgatools/tools/cgatools_1.6/listvariants.xml @ 23:982e19c29ec0 draft default tip

Uploaded
author bcrain-completegenomics
date Mon, 10 Sep 2012 14:12:23 -0400
parents 382c50ce0519
children
line wrap: on
line source

<tool id="cg_listvariant" name="listvariants(beta) 1.6" version="1.0.1">
<!--
This tool creates a GUI for the listvariants function of cgatools from Complete Genomics, Inc.
written 6-18-2012 by bcrain@completegenomics.com
updated 8-13-2012 by bcrain@completegenomics.com
-->

  <description>lists all called variants</description>

  <command>
<!-- print version of cgatools to STDOUT-->
cgatools | head -1;

<!-- print command lines to STDOUT-->
echo "cgatools listvariants --beta
--reference ${crr.fields.path}
--output $output
#if $include_list.listing == "yes"
--variant-listing $include_list.list
#end if
$longvar
--variants 
#if $data_sources.data_source == "in"  <!--data in galaxy-->
#for $v in $data_sources.file_types.files <!--get each var/mastervar file-->
${v.input}
#end for
#else <!--data outside galaxy-->
`cat $data_sources.list`
#end if
";

<!-- execute cgatools-->
cgatools listvariants --beta
--reference ${crr.fields.path}
--output $output
#if $include_list.listing == "yes"
  --variant-listing $include_list.list
#end if
$longvar
--variants 
#if $data_sources.data_source == "in"  <!--data in galaxy-->
  #for $v in $data_sources.file_types.files <!--get each var/mastervar file-->
    ${v.input}
  #end for
#else <!--data outside galaxy-->
  `cat $data_sources.list`
#end if
  </command>

  <outputs>
    <data format="tabular" name="output" label="${tool.name} output"/>
  </outputs>

  <inputs>
		<!--form field to select crr file-->
		<param name="crr" type="select" label="Reference genome (.crr file)">
			<options from_data_table="cg_crr_files" />
		</param>
	
  	<!--form field to select long variants option-->
    <param name="longvar" type="select" label="List long variants?">
      <option value="" selected="true">no</option>
      <option value="--list-long-variants">yes</option>
    </param>

  	<!--form fields to include existing variant list-->
    <conditional name="include_list">
      <param name="listing" type="select" label="Include variant listing (existing listvariants output)?">
        <option value="no" selected="true">no</option>
        <option value="yes">yes</option>
      </param>
      <when value="yes">
        <param name="list" type="data" format="tabular" label="Variant listing">
					<validator type="dataset_ok_validator" />
					<validator type="dataset_metadata_in_file" filename="cg_crr_files.loc"
						metadata_name="dbkey" metadata_column="1"
						message="cgatools is not currently available for this build."/>
				</param>
      </when>
    </conditional>

		<!--conditional to select data in/outside galaxy-->
		<conditional name="data_sources">
			<param name="data_source" type="select" label="Where are the input files?">
				<option value="in" selected="true">imported into Galaxy</option>
				<option value="out">located outside Galaxy (data on server or mounted drive)</option>
			</param>
			
			<when value="in">
				<!--conditional to select input file type-->
				<conditional name="file_types">
					<param name="file_type" type="select" label="Select the input file type">
						<option value="var" selected="true">var files</option>
						<option value="mastervar">mastervar files</option>
					</param>
					
					<!--form field to select var files-->
					<when value="var">			
						<repeat name="files" title="Var file" min="1">
							<param name="input" type="data" format="cg_var" label="Dataset">
								<validator type="dataset_ok_validator" />
								<validator type="dataset_metadata_in_file" filename="cg_crr_files.loc"
								 metadata_name="dbkey" metadata_column="1"
								 message="cgatools is not currently available for this build."/>
							</param>
						</repeat>
					</when>
												
					<!--form field to select masterVar files-->
					<when value="mastervar">			
						<repeat name="files" title="MasterVar file" min="1">
							<param name="input" type="data" format="cg_mastervar" label="Dataset">
								<validator type="dataset_ok_validator" />
								<validator type="dataset_metadata_in_file" filename="cg_crr_files.loc"
								 metadata_name="dbkey" metadata_column="1"
								 message="cgatools is not currently available for this build."/>
							</param>
						</repeat>
					</when>
				</conditional>
			</when>
			
			<!--form field to enter list file-->
			<when value="out">
				<param name="list" type="text" label="Enter file containing list of var or masterVar files (/path/file)" size="200" help="This file should contain a list of var or masterVar files, one per line in the format /path/varfile (e.g. /harddrive/GS00000XXXX-DID/GS00000YYYY-ASM/GS00123-DNA_G01_2000/ASM/var-GS00000YYYY-ASM.tsv.bz2), var or masterVar files can be compressed (gz, bz2).">
					<validator type="empty_field" message="You must supply a file containing a list of var or masterVar files"/>
				</param>
			</when>
		</conditional>
  </inputs>
  
  <help>

**What it does**

This tool uses the cgatools listvariants to list all called variants present in the var or mastervar files.

**cgatools 1.6.0 Documentation**

Userguide: http://cgatools.sourceforge.net/docs/1.6.0/cgatools-user-guide.pdf

Release notes: http://cgatools.sourceforge.net/docs/1.6.0/cgatools-release-notes.pdf

**Command line reference**::

		COMMAND NAME
		  listvariants - Lists the variants present in a variant file.

		DESCRIPTION
		  Lists all called variants present in the specified variant files, in a 
		  format suitable for processing by the testvariants command. The output is a
		  tab-delimited file consisting of the following columns:
			 
		    variantId  Sequential id assigned to each variant.
		    chromosome The chromosome of the variant.
		    begin      0-based reference offset of the beginning of the variant.
		    end        0-based reference offset of the end of the variant.
		    varType    The varType as extracted from the variant file.
		    reference  The reference sequence.
		    alleleSeq  The variant allele sequence as extracted from the variant 
		               file.
		    xRef       The xRef as extrated from the variant file.

		OPTIONS
		  -h [ --help ] 
		      Print this help message.

		  --beta 
		      This is a beta command. To run this command, you must pass the --beta 
		      flag.

		  --reference arg
		      The reference crr file.

		  --output arg (=STDOUT)
		      The output file (may be omitted for stdout).

		  --variants arg
		      The input variant files (may be positional args).

		  --variant-listing arg
		      The output of another listvariants run, to be merged in to produce the 
		      output of this run.

		  --list-long-variants 
		      In addition to listing short variants, list longer variants as well 
		      (10's of bases) by concatenating nearby calls.

		SUPPORTED FORMAT_VERSION
		  0.3 or later
  </help>
</tool>