What I am trying to do is, instead of having to select the genome from a drop down that points to the loc file, to take the metadata.dbkey attribute of an input file and use it to select the genome. I want to avoid having a user of my workflow select a genome n times in each step of a workflow. Attached is a sample cufflinks_wrapper.xml and gtf_indices.loc file. With regards to GATK, I want to edit the tools that are in the broad best practices workflow. http://www.broadinstitute.org/gsa/wiki/index.php/Best_Practice_Variant_Detec... Thanks, Ilya From: Daniel Blankenberg [mailto:dan@bx.psu.edu] Sent: Thursday, October 27, 2011 11:51 AM To: Chorny, Ilya Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: Modifying the GATK wrappers to pick genome infomration from bam/sam dbkey attribute Hi Ilya, You can validate dbkeys using validators including metadata, dataset_metadata_in_file/data_table, unspecified_build and others. Could you clarify what GATK tools you are trying to modify and exactly what you are trying accomplish? A complete example xml file, and any additional files (e.g. *.loc) would need to be provided to give you direction. Thanks for using Galaxy, Dan On Oct 27, 2011, at 1:03 PM, Chorny, Ilya wrote: Hi Dan, I want to modify the wrappers to get genome information from the bam/sam attribute. I did this for the tophat/cufflinks wrappers. I add another option to select genome called attribute and then I pass $bam.metadata.dkey in the command line (see example below). Is this something you might be interested in? Can you suggest an alternative way to do this? My only concern is my inability to validate that the $input.metadata.dbkey exists. Thanks, Ilya See example below. #if $reference_annotation.use_ref == "Use reference annotation": #if $reference_annotation.annotationSource.reference_annotation_file == "indexed": -G "${ filter( lambda x: str( x[0] ) == str( $reference_annotation.annotationSource.indices ), $__app__.tool_data_tables[ 'gtf_index' ].get_fields() )[0][-1] }" #else: #if $reference_annotation.annotationSource.reference_annotation_file == "attribute": -G "${ filter( lambda x: str( x[0] ) == str( $input.metadata.dbkey ), $__app__.tool_data_tables[ 'gtf_index' ].get_fields() )[0][-1] }" #else: -G "${reference_annotation.annotationSource.ownFile}" #end if #end if #end if <conditional name="annotationSource"> <param name="reference_annotation_file" type="select" label="Please select a reference Aonnotation"> <option value="indexed">Use a built-in index</option> <option value="history">Use one from the history</option> <option value="attribute">Use input bam metadata.dbkey attribute</option> </param> <when value="indexed"> <param name="indices" type="select" label="Select genome for gtf annotation"> <options from_data_table="gtf_index"> <filter type="sort_by" column="3" /> <validator type="no_options" message="No indexes are available for the selected input dataset" /> </options> </param> </when> <when value="history"> <param name="ownFile" type="data" format="gff3, gtf" label="Select a reference annotation file" /> </when> </conditional> Ilya Chorny Ph.D. Bioinformatics Scientist I Illumina, Inc. 9885 Towne Centre Drive San Diego, CA 92121 Work: 858.202.4582 Email: ichorny@illumina.com<mailto:ichorny@illumina.com> Website: www.illumina.com<http://www.illumina.com>