Commit b2f7f01d authored by aknecht2's avatar aknecht2
Browse files

Added initial setup script. Added utils module. Updated import script.

parent f234af91
build/
*.swp
*.pyc
New project for Chip-seq stuff.
meta/ contains the initial metadata setup.
doc/ contains documentation for the project.
chipathlon/ contains workflow code.
import sys
def progress(current, end):
percent = float(current) / end
hashes = "#" * int(round(percent * 20))
spaces = " " * (20 - len(hashes))
sys.stdout.write("\rProcessed %s / %s entries. [%s] %s%%" % (current, end, hashes + spaces, int(round(percent * 100))))
......@@ -2,13 +2,7 @@ from pymongo import MongoClient
import argparse
import json
import sys
def progress(current, end):
percent = float(current) / end
hashes = "#" * int(round(percent * 20))
spaces = " " * (20 - len(hashes))
sys.stdout.write("\rProcessed %s / %s entries. [%s] %s%%" % (current, end, hashes + spaces, int(round(percent * 100))))
sys.stdout.flush()
from chipathlon.utils import progress
parser = argparse.ArgumentParser(description = "Import all test data into the database.")
parser.add_argument("--password", dest="password", required=True, help="Database user password.")
......@@ -29,7 +23,7 @@ if args.drop:
db.samples.drop()
# Insert all experiment metadata, expected in meta/meta_clean.json
with open("meta/meta_clean.json", "r") as rh:
with open("data/meta_clean.json", "r") as rh:
data = json.load(rh)
exp_ids = db.experiments.insert_many(data)
......
from distutils.core import setup
setup(
name="chipathlon",
version="1.0",
packages=["chipathlon"],
license="???",
scripts = []
)
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment