chip-meta-import 1.14 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python

from pymongo import MongoClient
import argparse
import json
import sys
from chipathlon.utils import progress
import os
import os.path

parser = argparse.ArgumentParser(description="Read per-experiment JSON files and create experiment and samples collections.")
12
13
14
parser.add_argument("-H", "--host", dest="host", default="localhost", help="Database host. (default: %(default)s)")
parser.add_argument("-u", "--username", dest="username", help="Database username (if required).")
parser.add_argument("-p", "--password", dest="password", help="Database password (if required).")
15
16
17
parser.add_argument("-i", "--input-dir", dest="inputdir", default=os.getcwd(), help="Directory containing per-experiment JSON files.  (default: %(default)s)")
parser.add_argument("-d", "--drop", dest="drop", default=False, action="store_true", help="Drop data if it exists. (default: %(default)s)")
parser.add_argument("-s", "--samples", dest="samples", default=False, action="store_true", help="Only recreate the samples collection.")
18
parser.add_argument("-q", "--quiet", action='store_true', help="Quiet mode.  Do not print progress information. (default: false)")