{ "cells": [ { "cell_type": "code", "execution_count": 60, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [], "source": [ "import requests\n", "import json\n", "QUAY_API_URL = 'https://quay.io/api/v1/repository'\n", "\n", "def get_all_repos(url):\n", " repos = []\n", " r = requests.get(url)\n", " data = r.json()\n", " repos.extend(data['repositories'])\n", " while True:\n", " next_link = r.headers.get('Link', None)\n", " if not next_link:\n", " return repos\n", " r = requests.get(next_link.split(';')[0], params={'n': 50, 'next': repos[-1]})\n", " data = r.json()\n", " repos.extend(data['repositories'])\n", "r = get_all_repos('https://quay.io/v2/_catalog')" ] }, { "cell_type": "code", "execution_count": 61, "metadata": { "collapsed": false }, "outputs": [], "source": [ "all_quay_repos = len(r)" ] }, { "cell_type": "code", "execution_count": 62, "metadata": { "collapsed": false }, "outputs": [], "source": [ "mulled = [repo for repo in r if repo.startswith('biocontainers/')]" ] }, { "cell_type": "code", "execution_count": 63, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1642" ] }, "execution_count": 63, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mulled_repos = len(mulled)\n", "mulled_repos" ] }, { "cell_type": "code", "execution_count": 73, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "biocontainers/align-it 489\n", "biocontainers/arvados-cwl-runner 502\n", "biocontainers/awk 511\n", "biocontainers/azure-cli 512\n", "biocontainers/bambamc 514\n", "biocontainers/bamutil 514\n", "biocontainers/bcalm 516\n", "biocontainers/bcbio-nextgen-vm 529\n", "biocontainers/bcbio-rnaseq 530\n", "biocontainers/bcl2fastq-nextseq 534\n", "biocontainers/beagle-lib 536\n", "biocontainers/beast 536\n", "biocontainers/bio_assembly_refinement 541\n", "biocontainers/bioawk 541\n", "biocontainers/bioconductor-bsgenome.mmusculus.ucsc.mm9 565\n", "biocontainers/bioconductor-bubbletree 565\n", "biocontainers/bioconductor-chipcomp 571\n", "biocontainers/bioconductor-ebimage 587\n", "biocontainers/bioconductor-ggbio 602\n", "biocontainers/bioconductor-minfi 629\n", "biocontainers/bioconductor-motifrg 631\n", "biocontainers/bioconductor-rcas 648\n", "biocontainers/biofluff 687\n", "biocontainers/biokit 687\n", "biocontainers/bio-vcf 688\n", "biocontainers/blast 689\n", "biocontainers/bmfilter 694\n", "biocontainers/bmtool 695\n", "biocontainers/burrito-fillings 700\n", "biocontainers/bwakit 701\n", "biocontainers/byobu 702\n", "biocontainers/cap-mirseq 704\n", "biocontainers/c-ares 704\n", "biocontainers/cgat-report 706\n", "biocontainers/chromhmm 710\n", "biocontainers/ciso8601 715\n", "biocontainers/cityhash 715\n", "biocontainers/cmfinder 719\n", "biocontainers/collectl 720\n", "biocontainers/cuneiform 726\n", "biocontainers/dammit 731\n", "biocontainers/dfam 741\n", "biocontainers/dinopy 743\n", "biocontainers/discovar-denovo 744\n", "biocontainers/dominate 745\n", "biocontainers/dreamtools 745\n", "biocontainers/ea-utils 749\n", "biocontainers/eigen 749\n", "biocontainers/eigensoft 749\n", "biocontainers/emperor 750\n", "biocontainers/ete2 754\n", "biocontainers/express 757\n", "biocontainers/fast5 759\n", "biocontainers/fastlmm 761\n", "biocontainers/fastqc 762\n", "biocontainers/fastq-join 762\n", "biocontainers/ficus 771\n", "biocontainers/fitter 773\n", "biocontainers/flash 773\n", "biocontainers/flask-basicauth 774\n", "biocontainers/flask-bootstrap 774\n", "biocontainers/flux-simulator 781\n", "biocontainers/fuma 785\n", "biocontainers/gat 791\n", "biocontainers/gcs_oauth2_boto_plugin 795\n", "biocontainers/genblasta 797\n", "biocontainers/genomebaser 811\n", "biocontainers/gettext 814\n", "biocontainers/ggplot 817\n", "biocontainers/ghc 817\n", "biocontainers/gimmemotifs 818\n", "biocontainers/gnu-getopt 824\n", "biocontainers/gnuplot 824\n", "biocontainers/graph_embed 830\n", "biocontainers/graphicsmagick 830\n", "biocontainers/graphlan 830\n", "biocontainers/graphmap 831\n", "biocontainers/graphviz 831\n", "biocontainers/gromacs_no_mpi 834\n", "biocontainers/group_humann2_uniref_abundances_to_go 834\n", "biocontainers/hall-lab-svtools 842\n", "biocontainers/hapbin 842\n", "biocontainers/hivtrace 863\n", "biocontainers/hmmlearn 864\n", "biocontainers/htseq 865\n", "biocontainers/icqsol 873\n", "biocontainers/idr 874\n", "biocontainers/igdiscover 875\n", "biocontainers/intervals 879\n", "biocontainers/intervalstats 879\n", "biocontainers/ipython-cluster-helper 879\n", "biocontainers/joblib 885\n", "biocontainers/julia 885\n", "biocontainers/kat 885\n", "biocontainers/leptonica 891\n", "biocontainers/libbambamc 891\n", "biocontainers/libffi 892\n", "biocontainers/libmagic 894\n", "biocontainers/libsbml 894\n", "biocontainers/libssh2 894\n", "biocontainers/libsvm 894\n", "biocontainers/libxml2 894\n", "biocontainers/lightning 894\n", "biocontainers/limix 894\n", "biocontainers/lrzip 897\n", "biocontainers/matplotlib-venn 906\n", "biocontainers/medusa 909\n", "biocontainers/meme 911\n", "biocontainers/metaseq 914\n", "biocontainers/metaseq-all 914\n", "biocontainers/mgkit 918\n", "biocontainers/miniasm 922\n", "biocontainers/minimap 922\n", "biocontainers/moods 927\n", "biocontainers/mreps 930\n", "biocontainers/multiqc 935\n", "biocontainers/multiqc-bcbio 935\n", "biocontainers/mummer 935\n", "biocontainers/mysqlclient 938\n", "biocontainers/mysql-connector-c 938\n", "biocontainers/nanopolish 941\n", "biocontainers/ncbi-vdb 949\n", "biocontainers/neptune 949\n", "biocontainers/nextflow 952\n", "biocontainers/nglview 952\n", "biocontainers/ngs-sdk 952\n", "biocontainers/oligotyping 957\n", "biocontainers/oncofuse 957\n", "biocontainers/optitype 960\n", "biocontainers/osra 961\n", "biocontainers/p7zip 961\n", "biocontainers/pandoc 961\n", "biocontainers/peakranger 966\n", "biocontainers/pear 967\n", "biocontainers/pedagree 967\n", "biocontainers/peddy 967\n", "biocontainers/perl-appconfig 974\n", "biocontainers/perl-archive-extract 975\n", "biocontainers/perl-bio-db-sam 979\n", "biocontainers/perl-bio-phylo 982\n", "biocontainers/perl-carp 991\n", "biocontainers/perl-config-general 1001\n", "biocontainers/perl-data-stag 1006\n", "biocontainers/perl-dbd-mysql 1007\n", "biocontainers/perl-extutils-makemaker 1024\n", "biocontainers/perl-file-path 1027\n", "biocontainers/perl-font-afm 1035\n", "biocontainers/perl-gdgraph-histogram 1039\n", "biocontainers/perl-getopt-long 1040\n", "biocontainers/perl-html-parser 1048\n", "biocontainers/perl-io 1061\n", "biocontainers/perl-ipc-run 1068\n", "biocontainers/perl-lwp-protocol-https 1076\n", "biocontainers/perl-math-base-convert 1078\n", "biocontainers/perl-module-build 1090\n", "biocontainers/perl-params-validate 1103\n", "biocontainers/perl-set-intervaltree 1127\n", "biocontainers/perl-term-ansicolor 1147\n", "biocontainers/perl-test 1148\n", "biocontainers/perl-test-base 1148\n", "biocontainers/perl-test-yaml 1164\n", "biocontainers/perl-xml-libxml 1187\n", "biocontainers/perl-xml-libxslt 1187\n", "biocontainers/perl-xml-parser-lite 1189\n", "biocontainers/phizz 1201\n", "biocontainers/pindel 1207\n", "biocontainers/plink2 1212\n", "biocontainers/pomegranate 1213\n", "biocontainers/potrace 1215\n", "biocontainers/prinseq 1217\n", "biocontainers/protrac 1221\n", "biocontainers/pyfasta 1233\n", "biocontainers/pyopt 1241\n", "biocontainers/pysnptools 1250\n", "biocontainers/python-hivclustering 1260\n", "biocontainers/python-igraph 1262\n", "biocontainers/python-intermine 1262\n", "biocontainers/python-wget 1266\n", "biocontainers/pyutilib 1267\n", "biocontainers/query_phenomizer 1274\n", "biocontainers/rainbow 1277\n", "biocontainers/rapclust 1279\n", "biocontainers/rapmap 1279\n", "biocontainers/r-bma 1297\n", "biocontainers/r-checkmate 1301\n", "biocontainers/r-coala 1301\n", "biocontainers/r-deldir 1307\n", "biocontainers/r-dt 1315\n", "biocontainers/requests-mock 1320\n", "biocontainers/retrying 1321\n", "biocontainers/r-flowr 1328\n", "biocontainers/r-gplots 1337\n", "biocontainers/r-gsubfn 1338\n", "biocontainers/r-htmlwidgets 1340\n", "biocontainers/r-jpeg 1343\n", "biocontainers/r-ks 1346\n", "biocontainers/rmblast 1354\n", "biocontainers/r-mixomics 1355\n", "biocontainers/r-pheatmap 1363\n", "biocontainers/r-polynom 1368\n", "biocontainers/r-rainbow 1376\n", "biocontainers/r-rBLAST 1376\n", "biocontainers/r-rehh 1382\n", "biocontainers/r-rgl 1383\n", "biocontainers/r-rjson 1383\n", "biocontainers/r-robustbase 1385\n", "biocontainers/rsem 1398\n", "biocontainers/r-spp 1408\n", "biocontainers/rtg-tools 1412\n", "biocontainers/r-tiff 1412\n", "biocontainers/r-tximport 1412\n", "biocontainers/rust 1418\n", "biocontainers/sailfish 1426\n", "biocontainers/salmon 1426\n", "biocontainers/samblaster 1426\n", "biocontainers/samsifter 1426\n", "biocontainers/scalpel 1426\n", "biocontainers/scikit-allel 1430\n", "biocontainers/scikit-bio 1430\n", "biocontainers/scoop 1430\n", "biocontainers/scrm 1432\n", "biocontainers/sed 1432\n", "biocontainers/sga 1444\n", "biocontainers/shape-it 1444\n", "biocontainers/sickle 1445\n", "biocontainers/sickle-trim 1445\n", "biocontainers/skewer 1448\n", "biocontainers/snap-aligner 1453\n", "biocontainers/soapdenovo2-gapcloser 1458\n", "biocontainers/socksipy-branch 1460\n", "biocontainers/spades 1461\n", "biocontainers/spanki 1461\n", "biocontainers/sphinx-argparse 1464\n", "biocontainers/sqlalchemy-utils 1468\n", "biocontainers/srprism 1471\n", "biocontainers/star-fusion 1472\n", "biocontainers/stride 1472\n", "biocontainers/strip-it 1472\n", "biocontainers/suma_package 1475\n", "biocontainers/svgutils 1476\n", "biocontainers/swarm 1481\n", "biocontainers/tables 1484\n", "biocontainers/tabview 1485\n", "biocontainers/tdrmapper 1489\n", "biocontainers/tesseract 1489\n", "biocontainers/tn93 1492\n", "biocontainers/tophat2 1493\n", "biocontainers/treemix 1500\n", "biocontainers/trim_galore 1502\n", "biocontainers/ucsc-ave 1512\n", "biocontainers/ucsc-blat 1517\n", "biocontainers/ucsc-calc 1517\n", "biocontainers/ucsc-chromgraphtobin 1525\n", "biocontainers/ucsc-genepredtobiggenepred 1555\n", "biocontainers/ucsc-getrna 1556\n", "biocontainers/ucsc-getrnapred 1556\n", "biocontainers/ucsc-gfclient 1556\n", "biocontainers/ucsc-gff3topsl 1557\n", "biocontainers/ucsc-gfserver 1557\n", "biocontainers/ucsc-gmtime 1557\n", "biocontainers/ucsc-headrest 1557\n", "biocontainers/ucsc-hgfindspec 1557\n", "biocontainers/ucsc-hgloadnet 1558\n", "biocontainers/ucsc-hgloadout 1558\n", "biocontainers/ucsc-hgloadoutjoined 1558\n", "biocontainers/ucsc-hgspeciesrna 1558\n", "biocontainers/ucsc-hgsqldump 1558\n", "biocontainers/ucsc-hgtrackdb 1558\n", "biocontainers/ucsc-htmlcheck 1558\n", "biocontainers/ucsc-hubcheck 1558\n", "biocontainers/ucsc-hubpubliccheck 1558\n", "biocontainers/ucsc-ixixx 1558\n", "biocontainers/ucsc-lavtoaxt 1558\n", "biocontainers/ucsc-ldhggene 1558\n", "biocontainers/ucsc-linestora 1558\n", "biocontainers/ucsc-localtime 1558\n", "biocontainers/ucsc-maketablelist 1558\n", "biocontainers/ucsc-mktime 1559\n", "biocontainers/ucsc-mrnatogene 1559\n", "biocontainers/ucsc-netsplit 1561\n", "biocontainers/ucsc-newprog 1563\n", "biocontainers/ucsc-overlapselect 1567\n", "biocontainers/umis 1572\n", "biocontainers/vardict 1576\n", "biocontainers/variantbam 1577\n", "biocontainers/vcf2db 1579\n", "biocontainers/vispr 1587\n", "biocontainers/vsearch 1589\n", "biocontainers/vt 1589\n", "biocontainers/whatshap 1596\n", "biocontainers/xmltodict 1601\n", "biocontainers/yahmm 1603\n", "biocontainers/perl-moose 1609\n", "biocontainers/perl-module-pluggable 1617\n", "biocontainers/pydotplus 1651\n", "biocontainers/pygraphviz 1651\n", "biocontainers/cwltest 1655\n", "biocontainers/xopen 1655\n", "biocontainers/No 1656\n", "biocontainers/tests 1656\n", "biocontainers/defined 1656\n", "biocontainers/cromwell 1662\n", "biocontainers/sbt 1662\n", "biocontainers/scala 1662\n", "biocontainers/extract_genome_region 1676\n", "biocontainers/snpsift 1676\n", "biocontainers/kronik 1677\n", "biocontainers/mgf-formatter 1677\n", "biocontainers/pyquant-ms 1677\n", "biocontainers/pyteomics 1677\n", "biocontainers/pyprophet 1684\n" ] }, { "data": { "text/plain": [ "1693" ] }, "execution_count": 73, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\n", "tags_count = 0\n", "for repository_string in mulled:\n", " url = \"%s/%s\" % (QUAY_API_URL, repository_string)\n", " infos = requests.get(url, headers={'Accept-encoding': 'gzip'}, timeout=30)\n", " json_decoder = json.JSONDecoder()\n", " decoded_request = json_decoder.decode(infos.text)\n", " tags = decoded_request.get('tags', False).keys()\n", " if 'latest' in tags: tags.remove('latest')\n", " tags_count += len(tags)\n", " if len(tags) == 0: print repository_string, tags_count\n", "\n", "tags_count\n" ] }, { "cell_type": "code", "execution_count": 74, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "# Quay.io repositories: 13316\n", "# Mulled repositories: 1642\n", "# Mulled images: 1693\n" ] } ], "source": [ "print '# Quay.io repositories: %s' % all_quay_repos\n", "print '# Mulled repositories: %s' % mulled_repos\n", "print '# Mulled images: %s' % tags_count" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 0 }