Enhance VCF to MAF error message when no input file is provided.

This commit is contained in:
Daniel Blankenberg
2010-07-13 10:44:45 -04:00
parent 61fd5063d8
commit 72c3b8cb89
2 changed files with 12 additions and 2 deletions
+4
View File
@@ -1,5 +1,6 @@
#Dan Blankenberg
from optparse import OptionParser
import sys
import galaxy_utils.sequence.vcf
from galaxy import eggs
@@ -57,11 +58,14 @@ def main():
parser.add_option( "-p", "--population", action="store_true", dest="population", default=False, help="Create MAF on a per population basis")
parser.add_option( "-s", "--sample", action="store_true", dest="sample", default=False, help="Create MAF on a per sample basis")
parser.add_option( "-n", "--name", dest="name", default='Unknown Custom Track', help="Name for Custom Track")
parser.add_option( "-g", "--galaxy", action="store_true", dest="galaxy", default=False, help="Tool is being executed by Galaxy (adds extra error messaging).")
( options, args ) = parser.parse_args()
if len ( args ) < 3:
if options.galaxy:
print >>sys.stderr, "It appears that you forgot to specify an input VCF file, click 'Add new VCF...' to add at least input.\n"
parser.error( "Need to specify an output file, a dbkey and at least one input file" )
if not ( options.population ^ options.sample ):
+8 -2
View File
@@ -1,13 +1,19 @@
<tool id="vcf_to_maf_customtrack1" name="VCF to MAF Custom Track">
<description>for display at UCSC</description>
<command interpreter="python">vcf_to_maf_customtrack.py $out_file1 ${vcf_source_type.vcf_file[0].vcf_input.dbkey} ${vcf_source_type.vcf_source} -n '$track_name'
##
<command interpreter="python">vcf_to_maf_customtrack.py '$out_file1'
#if $vcf_source_type.vcf_file
'${vcf_source_type.vcf_file[0].vcf_input.dbkey}'
#else
'?'
#end if
${vcf_source_type.vcf_source} -n '$track_name'
#for $vcf_repeat in $vcf_source_type.vcf_file
'${vcf_repeat.vcf_input}'
#if $vcf_source_type.vcf_source == '-p'
'${vcf_repeat.population_name}'
#end if
#end for
-g
</command>
<inputs>
<param name="track_name" type="text" label="Custom Track Name" value="Galaxy Custom Track" size="30" />