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: icho...@illumina.com<mailto:icho...@illumina.com>
Website: www.illumina.com<http://www.illumina.com>


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to