Have all sample names in samples, one per line and run:
for sample in $(cat samples); do
IFS=$'\n'
for line in $(./sra-runs.py $sample); do
echo $sample $line >> runs
done
| #!/usr/bin/env python | |
| # install imagesize: pip install imagesize pyyaml | |
| __author__ = 'Olivier Pieters' | |
| __author_email__ = 'me@olivierpieters.be' | |
| __license__ = 'BSD-3-Clause' | |
| import yaml, imagesize | |
| from os import listdir, rename |
| /* | |
| For any 1<k<=64, let mask=(1<<k)-1. hash_64() is a bijection on [0,1<<k), which means | |
| hash_64(x, mask)==hash_64(y, mask) if and only if x==y. hash_64i() is the inversion of | |
| hash_64(): hash_64i(hash_64(x, mask), mask) == hash_64(hash_64i(x, mask), mask) == x. | |
| */ | |
| // Thomas Wang's integer hash functions. See <https://gist.github.com/lh3/59882d6b96166dfc3d8d> for a snapshot. | |
| uint64_t hash_64(uint64_t key, uint64_t mask) | |
| { | |
| key = (~key + (key << 21)) & mask; // key = (key << 21) - key - 1; |
| #!/usr/bin/env python | |
| """ | |
| Convert camel-case to snake-case in python. | |
| e.g.: CamelCase -> snake_case | |
| e.g.: snake_case -> CamelCase | |
| e.g.: CamelCase -> dash-case | |
| e.g.: dash-case -> CamelCase | |
| By: Jay Taylor [@jtaylor] | |
| Me<modifier>: Yahya Kacem <fuj.tyoli@gmail.com> | |
| Original gist: https://gist.github.com/jaytaylor/3660565 |
| """ | |
| Example for a colourised logging output. | |
| This example uses "blessings" to handle console escape sequences. ``blessings`` | |
| itself is a very harmless package in that it does not have any external | |
| dependencies. And it's code-base is very clean and small. | |
| The example extends the core logging formatter (logging.Formatter) and | |
| colourises the complete line. This takes advantage of any upstream updates | |
| related to logging. When writing this against Python 2.7, the parent code |
rsync (Everyone seems to like -z, but it is much slower for me)
| Arg Name or Optional Flags: | |
| positional : str = "foo" | |
| options : str = "-f", "--foo" | |
| Standard: | |
| action : str = [store], append, store_true, store_false, store_const, append_const, version | |
| default : * = [None] | |
| type : callable = [str], argparse.FileType(mode='wb', bufsize=0) | |
| Exotic: |