The MG-RAST API gives you the option to download organisms abundance for specific genes from the "Matrix" section, using always the linux command 'curl'. Example at the taxonomic level 'class' for the gene called 'Integrase':
curl -X GET -H "auth: user_key" "http://api.metagenomics.anl.gov/1/matrix/organism?id=mgm_1_number&id=mgm_2_number&group_level=class&result_type=abundance&filter=Integrase&filter_level=function&filter_source=Subsystems" > file_name.biom
The problem comes when the gene name you need has space characters, e.g., filter=DNA Polymerase
. It is an URL, so I tried filter=DNA%20Polymerase
and filter=DNA+Polymerase
, but it didn't work. The output was always: {"ERROR":"no data found for the given combination of ids and paramaters"}
Any help will be very appreciated. All the best, fibar
What about if you use single quotes instead of double quotes for the url?
It ended up being an MG-RAST problem, which was solved later by them.
Using %20 as space character is correct. Thanks for the comments.