Mercurial > repos > ieguinoa > data_manager_fetch_gff
changeset 2:c57bd7f3fb46 draft
Uploaded
author | ieguinoa |
---|---|
date | Tue, 10 Jul 2018 10:55:47 -0400 |
parents | 955a8d483fa3 |
children | cb0fa3584aeb |
files | data_manager/data_manager_fetch_gff.py data_manager/data_manager_fetch_gff.xml data_manager_conf.xml tool-data/all_gff.loc.sample tool-data/representative_gff.loc.sample |
diffstat | 5 files changed, 17 insertions(+), 58 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/data_manager_fetch_gff.py Tue Jul 10 05:30:23 2018 -0400 +++ b/data_manager/data_manager_fetch_gff.py Tue Jul 10 10:55:47 2018 -0400 @@ -39,19 +39,20 @@ def get_dbkey_dbname_id_name( params, dbkey_description=None ): - dbkey = params['param_dict']['dbkey_source']['dbkey'] +# dbkey = params['param_dict']['dbkey_source']['dbkey'] #TODO: ensure sequence_id is unique and does not already appear in location file sequence_id = params['param_dict']['sequence_id'] if not sequence_id: sequence_id = dbkey #uuid.uuid4() generate and use an uuid instead? - if params['param_dict']['dbkey_source']['dbkey_source_selector'] == 'new': - dbkey_name = params['param_dict']['dbkey_source']['dbkey_name'] - if not dbkey_name: - dbkey_name = dbkey - else: - dbkey_name = None - +# if params['param_dict']['dbkey_source']['dbkey_source_selector'] == 'new': +# dbkey_name = params['param_dict']['dbkey_source']['dbkey_name'] +# if not dbkey_name: +# dbkey_name = dbkey +# else: +# dbkey_name = None + dbkey = params['param_dict']['dbkey'] + dbkey_name = dbkey_description sequence_name = params['param_dict']['sequence_name'] if not sequence_name: sequence_name = dbkey_description @@ -360,14 +361,8 @@ #sort_fasta( fasta_filename, params['param_dict']['sorting']['sort_selector'], params ) - dbkey_dict = None - if dbkey_name: - #do len calc here - #len_base_name = "%s.len" % ( dbkey ) - #compute_fasta_length( fasta_filename, os.path.join( target_directory, len_base_name ), keep_first_word=True ) - dbkey_dict = dict( value=dbkey, name=dbkey_name, len_path='' ) - return [ ( '__dbkeys__', dbkey_dict ), ( DATA_TABLE_NAME, dict( value=sequence_id, dbkey=dbkey, name=sequence_name, path=fasta_base_filename ) ) ] + return [ ( DATA_TABLE_NAME, dict( value=sequence_id, dbkey=dbkey, name=sequence_name, path=fasta_base_filename ) ) ] def compute_fasta_length( fasta_file, out_file, keep_first_word=False ): @@ -407,15 +402,7 @@ fasta_base_filename = "%s.fa" % sequence_id fasta_filename = os.path.join( target_directory, fasta_base_filename ) os.symlink( input_filename, fasta_filename ) - - dbkey_dict = None - if dbkey_name: - #do len calc here - len_base_name = "%s.len" % ( dbkey ) - compute_fasta_length( fasta_filename, os.path.join( target_directory, len_base_name ), keep_first_word=True ) - dbkey_dict = dict( value=dbkey, name=dbkey_name, len_path=len_base_name ) - - return [ ( '__dbkeys__', dbkey_dict ), ( DATA_TABLE_NAME, dict( value=sequence_id, dbkey=dbkey, name=sequence_name, path=fasta_base_filename ) ) ] + return [ ( DATA_TABLE_NAME, dict( value=sequence_id, dbkey=dbkey, name=sequence_name, path=fasta_base_filename ) ) ] REFERENCE_SOURCE_TO_DOWNLOAD = dict( ucsc=download_from_ucsc, ncbi=download_from_ncbi, url=download_from_url, history=download_from_history, directory=copy_from_directory )
--- a/data_manager/data_manager_fetch_gff.xml Tue Jul 10 05:30:23 2018 -0400 +++ b/data_manager/data_manager_fetch_gff.xml Tue Jul 10 10:55:47 2018 -0400 @@ -3,11 +3,7 @@ <command><![CDATA[ python "$__tool_directory__"/data_manager_fetch_gff.py "${out_file}" --type $file_type - #if str( $dbkey_source.dbkey_source_selector ) == 'existing': - --dbkey_description ${ dbkey_source.dbkey.get_display_text() } - #else - --dbkey_description "${ dbkey_source.dbkey_name or $dbkey_source.dbkey }" - #end if + --dbkey_description ${ dbkey.get_display_text() } ]]></command> <inputs> @@ -16,19 +12,7 @@ <option value="full">GFF with complete features</option> </param> - <conditional name="dbkey_source"> - <param name="dbkey_source_selector" type="select" label="Use existing dbkey or create a new one."> - <option value="existing" selected="True">Existing</option> - <option value="new">New</option> - </param> - <when value="existing"> - <param name="dbkey" type="genomebuild" label="DBKEY to assign to data" /> - </when> - <when value="new"> - <param type="text" name="dbkey" value="" label="dbkey" optional="False" /> - <param type="text" name="dbkey_name" value="" label="Display name for dbkey" /> - </when> - </conditional> + <param name="dbkey" type="genomebuild" label="DBKEY to assign to data" /> <param type="text" name="sequence_name" value="" label="Name of sequence" /> <param type="text" name="sequence_id" value="" label="ID for sequence" /> <conditional name="reference_source">
--- a/data_manager_conf.xml Tue Jul 10 05:30:23 2018 -0400 +++ b/data_manager_conf.xml Tue Jul 10 10:55:47 2018 -0400 @@ -31,20 +31,5 @@ </column> </output> </data_table> - - <data_table name="__dbkeys__"> - <output> - <column name="value" /> - <column name="name" /> - <column name="len_path" output_ref="out_file"> - <move type="file"> - <source>${len_path}</source> - <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">${value}/len/${len_path}</target> - </move> - <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/${value}/len/${len_path}</value_translation> - <value_translation type="function">abspath</value_translation> - </column> - </output> - </data_table> </data_manager> </data_managers>