Error running the pipeline on multiple samples

35 views
Skip to first unread message

marcma...@gmail.com

unread,
Jun 1, 2017, 1:32:46 PM6/1/17
to MetaSRA Users
Hello,

I am trying to setup the pipeline using the source code on github but I am not able to run it on multiple samples. When I run it on just one sample it works fine, for example:
{   
   
"ID": "P352_141",
   
"age": "48",
   
"bmi": "24",
   
"gender": "female",
   
"source_name": "vastus lateralis muscle_female",
   
"tissue": "vastus lateralis muscle"
}

However, when I try to add additional samples to the json file, I get the following error: AttributeError: 'list' object has no attribute 'iteritems'. This is from line 103 in pipeline_components.py. I have tried formatting the json file in several different ways to no avail.

Thank you.

Matthew Bernstein

unread,
Jun 2, 2017, 2:23:18 PM6/2/17
to MetaSRA Users
Hello, Unfortunately, the script in its current form expects the JSON file to store only a single set of key-value pairs.  I definitely agree the script should be able to accept multiple sets of key-value pairs so I updated the run_pipeline.py script to accept a list of key-value pairs instead. The code is on GitHub now available in the latest version of the run_pipeline.py file. 
 
The file for a single set of key-value pairs would now look like:

[
{   
   
"ID": "P352_141",
   
"age": "48",
   
"bmi": "24",
   
"gender": "female",
   
"source_name": "vastus lateralis muscle_female",
   
"tissue": "vastus lateralis muscle"
}
]

If you want to run it on multiple sets of key-value pairs, the input file would look something like:

[
{   
   
"ID": "P352_141",
   
"age": "48",
   
"bmi": "24",
   
"gender": "female",
   
"source_name": "vastus lateralis muscle_female",
   
"tissue": "vastus lateralis muscle"
},
{   
    "ID": "P352_141",  
    "age": "48",  
    "bmi": "24",  
    "gender": "female",
    "source_name": "vastus lateralis muscle_female",
    "tissue": "vastus lateralis muscle"
 }

]

 Let me know if you have any issues.

marcma...@gmail.com

unread,
Jun 5, 2017, 7:11:56 PM6/5/17
to MetaSRA Users
Thank you for the quick response and making this all open source!
Reply all
Reply to author
Forward
0 new messages