def setUp(self): self.db = CoreDb(":memory:") self.db.create_tables() self.run_args = [ "abc", "--lane", "1", "--date", "2008-09-21", "--type", "Illumina-MiSeq", "--comment", "mdsnfa adsf", ] self.samples = [{ "SampleID": "abc123", "BarcodeSequence": "GGGCCT", "SampleType": "Oral swab", "bb": "cd e29", }]
def setUp(self): self.db = CoreDb(":memory:") self.db.create_tables() self.run = ( u"2015-10-11", u"HiSeq", u"Nextera XT", 1, u"run_file.fastq", u"Bob's run", ) self.run_acc = self.db.register_run(*self.run) self.sample_bcs = [ ("Sample1", "ABC"), ("Sample2", "DEF"), ("My.Sample3", "GHI"), ] self.single_sample = self.sample_bcs[0] self.annotations = { "SampleType": "Oral swab", "SubjectID": "Subj23", "study_group": "Healthy", "study_day": "1", }
"""Add samples and runs to the registry""" import argparse import itertools import os import re import sys import gzip from sample_registry.db import CoreDb from sample_registry.mapping import SampleTable from sample_registry.illumina import IlluminaFastq REGISTRY_DATABASE = CoreDb("/var/local/sample_registry/core.db") SAMPLES_DESC = """\ Add new samples to the registry, with annotations. """ ANNOTATIONS_DESC = """\ Replace annotations for samples in the registry. Samples are matched using the sample ID and barcode sequence. """ ANNOTATIONS_EPILOG = """\ **BEWARE USER** This script will replace all existing annotations with those found in the provided file! Make sure this is what you want, or you will be restoring database tables from backup files, as you deserve. You have been warned!!! """