List of InterMine training workshops and links to repos / materials
If you don’t have python installed, or if you aren’t sure, visit our setup guide to install things. You’ll only have to do this once!
Once you have python installed:
Generate Python Code
button at the top right of your results table.~/Downloads/query.py
cd ~/Downloads/
.
cd
stands for change directory - we’re telling the computer to change directory into the downloads folder.chmod +x query.py
.
chmod
is the unix command to change file permissions, +x
means “please make this file executable”, and query.py
is the name of the generated code script we downloaded. If you changed the file name when you downloaded it, make sure to substitute the correct name in the command!./query.py
. You should see the results of your query printed to the screen! If it looks a little odd, make the terminal wider and run it again the same way.
./some-file-name-here
- the ./
means “execute this script, please”.> results.txt
to the end of the command. It’ll now look something like this: ./query.py > results.txt
. You won’t see the results in the terminal this time, but your query results should now be in the downloads folder, inside the file named results.txt!
>
means “please output results to”, and results.txt could be any file name you like - you’re just asking your script to save results to a file with the name you specified.