Hey Greg,
Joe,Try editing your Sample Form Definition, changing the "Field name" value from the default of "1_field_name" to be your desired "agctac". Then, your csv file with the lineSample1,Library1,Lib1Folder1,History,Workflow,agctacshould work.GregOn Jun 9, 2011, at 6:03 PM, Joe Cruz wrote:Hey Greg,I got it to work by filling the field names with their default names, but I thought you could fill out the entire sample forms, including the field names, with the csv file. For example:Sample1,Library1,Lib1Folder1,History,Workflow,1_field_nameThe above works when imported, filling out the sample name, library, folder, history, and workflow fields but leaving 1_field_name (barcode field in this case) empty.We wish this next example to work,which I currently get the '1_field_name' error:Sample1,Library1,Lib1Folder1,History,Workflow,agctacCurrently we have clients fill out a spreadsheet for the samples they intend to submit, since many submit multiple samples and most of the time have the same parameters for all of them. We wish to convert their completed spreadsheet into a csv file and then import it into galaxy so they dont' have to fill out all the fields repetitively.joeOn Thu, Jun 9, 2011 at 3:20 PM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Hello Joe,Sorry you've bumped into problems - we know we're lacking on documentation for the sample tracking stuff currently. I believe this new issue is due to a field named differently in your Sample FormDefinition vs your csf file. In looking at this, I found a slightly incorrect description of the csv file layout on our Add Samples page, which I've corrected.In the Sample FormDefinition, the default name for a field is 1_field_name, 2_field_name, etc. Below is a screen capture that show this. However, the csv file you sent me previously includes the following:SampleName1,library1,library1_folder1,history1,workflow1,sampleType1,conc,runType,readLengthThe csv layout is as follows ( I've correct the incorrect FieldValue1, etc to be Field1Name, etc.The csv file must be in the following format:
SampleName,DataLibraryName,DataLibraryFolderName,HistoryName,WorkflowName,Field1Name,Field2name..
The Field1Name, Field2Name values in your csv file must match the value in the Field name form field in the screen shot below.After making this change, let me know if you bump into any other problems.Thanks for you patience on this,Greg<sample_form.tiff>On Jun 9, 2011, at 12:32 PM, Joe Cruz wrote:
Hey Greg,___________________________________________________________Unfortunately after pulling your changeset I got a new error related to '1_field_name'. Here is the error traceback:File '/home/jcruz/galaxy-central/eggs/WebError-0.8a-py2.6.egg/weberror/evalexception/middleware.py', line 364 in respondapp_iter = self.application(environ, detect_start_response)File '/home/jcruz/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/debug/prints.py', line 98 in __call__environ, self.app)File '/home/jcruz/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/wsgilib.py', line 539 in intercept_outputapp_iter = application(environ, replacement_start_response)File '/home/jcruz/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/recursive.py', line 80 in __call__return self.application(environ, start_response)File '/home/jcruz/galaxy-central/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py', line 632 in __call__return self.application(environ, start_response)File '/home/jcruz/galaxy-central/lib/galaxy/web/framework/base.py', line 145 in __call__body = method( trans, **kwargs )File '/home/jcruz/galaxy-central/lib/galaxy/web/framework/__init__.py', line 84 in decoratorreturn func( self, trans, *args, **kwargs )File '/home/jcruz/galaxy-central/lib/galaxy/web/controllers/requests_common.py', line 831 in add_samplesreturn self.__import_samples( trans, cntrller, request, displayable_sample_widgets, libraries, workflows, **kwd )File '/home/jcruz/galaxy-central/lib/galaxy/web/controllers/requests_common.py', line 1163 in __import_samplessample_copy_select_field=sample_copy_select_field )File '/home/jcruz/galaxy-central/lib/galaxy/web/framework/__init__.py', line 661 in fill_templatereturn self.fill_template_mako( filename, **kwargs )File '/home/jcruz/galaxy-central/lib/galaxy/web/framework/__init__.py', line 672 in fill_template_makoreturn template.render( **data )File '/home/jcruz/galaxy-central/eggs/Mako-0.2.5-py2.6.egg/mako/template.py', line 133 in renderreturn runtime._render(self, self.callable_, args, data)File '/home/jcruz/galaxy-central/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 364 in _render_render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))File '/home/jcruz/galaxy-central/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 381 in _render_context_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)File '/home/jcruz/galaxy-central/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 414 in _exec_templatecallable_(context, *args, **kwargs)File '/home/jcruz/galaxy-central/database/compiled_templates/base.mako.py', line 40 in render_body__M_writer(unicode(next.body()))File '/home/jcruz/galaxy-central/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 255 in <lambda>return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)File '/home/jcruz/galaxy-central/database/compiled_templates/requests/common/add_samples.mako.py', line 176 in render_body__M_writer(unicode(render_request_type_sample_form_grids( grid_index, grid_name, request.type.sample_form.grid_fields( grid_index ), displayable_sample_widgets=displayable_sample_widgets, show_saved_samples_read_only=True )))File '/home/jcruz/galaxy-central/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 255 in <lambda>return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)File '/home/jcruz/galaxy-central/database/compiled_templates/requests/common/common.mako.py', line 120 in render_render_request_type_sample_form_grids__M_writer(unicode(render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict, display_only )))File '/home/jcruz/galaxy-central/database/compiled_templates/requests/common/common.mako.py', line 73 in render_sample_formreturn render_render_sample_form(context,index,sample_name,sample_values,fields_dict,display_only)File '/home/jcruz/galaxy-central/database/compiled_templates/requests/common/common.mako.py', line 186 in render_render_sample_formfield_value = sample_values[ field_name ]KeyError: '1_field_name'Let me know if you need anything else. Thanks again!joe
On Wed, Jun 8, 2011 at 2:49 PM, Greg Von Kuster <greg@bx.psu.edu> wrote:Joe,Thanks very much for the example csv file. I've fixed this issue in change set 5668:81a5c317d909, which should be available in the distribution within the next few weeks. If you don't want to wait, you can update from our development repo at https://bitbucket.org/galaxy/galaxy-central/wiki/Home.Greg Von KusterOn Jun 7, 2011, at 6:21 PM, Joe Cruz wrote:<importSample.csv>For my sample forms I have fields for Sample type, concentration, run type, and read length.
I greatly appreciate your help Greg. If you have any other questions let me know.
Thanks,
JoeOn Tue, Jun 7, 2011 at 2:56 PM, Greg Von Kuster <greg@bx.psu.edu> wrote:Hello Joe,Can you send me your csv file?Thanks!On Jun 7, 2011, at 10:45 AM, Joe Cruz wrote:___________________________________________________________Hello Everyone,I wanted to ask if anyone has experience successfully importing sample information through a csv file.
I know there is an issue already created for csv file import, which I left a comment earlier:but my bug doesn't seem to deal with an 'Invalid Request ID' as the issue above states.This is the error I get:File '/home/galaxy1/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py', line 143 in __call__app_iter = self.application(environ, start_response)File '/home/galaxy1/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/debug/prints.py', line 98 in __call__environ, self.app)File '/home/galaxy1/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/wsgilib.py', line 539 in intercept_outputapp_iter = application(environ, replacement_start_response)File '/home/galaxy1/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/recursive.py', line 80 in __call__return self.application(environ, start_response)File '/home/galaxy1/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py', line 632 in __call__return self.application(environ, start_response)File '/home/galaxy1/galaxy-dist/lib/galaxy/web/framework/base.py', line 145 in __call__body = method( trans, **kwargs )File '/home/galaxy1/galaxy-dist/lib/galaxy/web/framework/__init__.py', line 84 in decoratorreturn func( self, trans, *args, **kwargs )File '/home/galaxy1/galaxy-dist/lib/galaxy/web/controllers/requests_common.py', line 829 in add_samplesreturn self.__import_samples( trans, cntrller, request, displayable_sample_widgets, libraries, **kwd )File '/home/galaxy1/galaxy-dist/lib/galaxy/web/controllers/requests_common.py', line 1109 in __import_samplessample_copy_select_field=sample_copy_select_field )File '/home/galaxy1/galaxy-dist/lib/galaxy/web/framework/__init__.py', line 650 in fill_templatereturn self.fill_template_mako( filename, **kwargs )File '/home/galaxy1/galaxy-dist/lib/galaxy/web/framework/__init__.py', line 661 in fill_template_makoreturn template.render( **data )File '/home/galaxy1/galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/template.py', line 133 in renderreturn runtime._render(self, self.callable_, args, data)File '/home/galaxy1/galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 364 in _render_render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))File '/home/galaxy1/galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 381 in _render_context_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)File '/home/galaxy1/galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 414 in _exec_templatecallable_(context, *args, **kwargs)File '/home/galaxy1/galaxy-dist/database/compiled_templates/base.mako.py', line 40 in render_body__M_writer(unicode(next.body()))File '/home/galaxy1/galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 255 in <lambda>return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)File '/home/galaxy1/galaxy-dist/database/compiled_templates/requests/common/add_samples.mako.py', line 164 in render_body__M_writer(unicode(render_samples_grid( cntrller, request, displayable_sample_widgets, action='edit_samples', adding_new_samples=True, encoded_selected_sample_ids=[], render_buttons=False, grid_header=grid_header )))File '/home/galaxy1/galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 255 in <lambda>return lambda *args, **kwargs:callable_(self.context, *args, **kwargs)File '/home/galaxy1/galaxy-dist/database/compiled_templates/requests/common/common.mako.py', line 749 in render_render_samples_gridsample_widget_history = sample_widget[ 'history' ]KeyError: 'history'I greatly appreciate your help and patience.Thanks,joe
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/Greg Von KusterGalaxy Development Team
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/
___________________________________________________________
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/