changeset 5:3888ec1918d0 draft

Uploaded
author ieguinoa
date Thu, 03 Jan 2019 10:51:18 -0500
parents ef2031036f47
children d22f69a2e80e
files data_manager/salmon_index_builder.py data_manager_conf.xml
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/salmon_index_builder.py	Mon Nov 26 10:53:58 2018 -0500
+++ b/data_manager/salmon_index_builder.py	Thu Jan 03 10:51:18 2019 -0500
@@ -30,17 +30,19 @@
     target_directory = params[ 'output_data' ][0]['extra_files_path']
     if not os.path.exists( target_directory ):
         os.mkdir( target_directory )
+    path=sequence_id
     args = [ 'salmon', 'index' ]
     if options.kmer_size != '':
         args.append('-k')
         args.append(options.kmer_size)
+        path=path + '_kmer_'+ options.kmer_size   
     args.extend( [ '-t' , options.fasta_filename, '-i', target_directory ] )
     proc = subprocess.Popen( args=args, shell=False)
     return_code = proc.wait()
     if return_code:
         print("Error building index.", file=sys.stderr)
         sys.exit( return_code )
-    data_table_entry = dict( value=sequence_id, dbkey=options.fasta_dbkey, name=sequence_name, path=sequence_id )
+    data_table_entry = dict( value=sequence_id, dbkey=options.fasta_dbkey, name=sequence_name, path=path )
     _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry )
 
 
--- a/data_manager_conf.xml	Mon Nov 26 10:53:58 2018 -0500
+++ b/data_manager_conf.xml	Thu Jan 03 10:51:18 2019 -0500
@@ -9,9 +9,9 @@
                 <column name="path" output_ref="out_file" >
                     <move type="directory" relativize_symlinks="True">
                         <!-- <source>${path}</source>--> <!-- out_file.extra_files_path is used as base by default --> <!-- if no source, eg for type=directory, then refers to base -->
-                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">${dbkey}/salmon_index/${value}</target>
+                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">${dbkey}/salmon_index/${path}</target>
                     </move>
-                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/${dbkey}/salmon_index/${value}/${path}</value_translation>
+                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/${dbkey}/salmon_index/${path}</value_translation>
                     <value_translation type="function">abspath</value_translation>
                 </column>
             </output>