コード例 #1
0
 def setUp(self):
     DB.drop_database('atlas-test')
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")
     self.reference = Reference().create_and_save(
         name="NC_000962.3",
         md5checksum="sre",
         reference_sets=[self.reference_set])
コード例 #2
0
ファイル: test_calls.py プロジェクト: pombredanne/atlas-var
    def setUp(self):
        self.reference_set = ReferenceSet().create_and_save(name="ref_set")
        self.variant_set = VariantSet.create_and_save(
            name="this_vcf_file2",
            reference_set=self.reference_set)
        self.variant_sets = [self.variant_set]
        self.reference = Reference().create_and_save(
            name="ref",
            md5checksum="sre",
            reference_sets=[
                self.reference_set])
        self.call_set = VariantCallSet.create(
            sample_id="C00123",
            name="C00123",
            variant_sets=self.variant_sets)
        self.variant_snp = Variant.create(variant_sets=self.variant_sets,
                                          start=0, end=1, reference_bases="A",
                                          alternate_bases=["T"],
                                          reference=self.reference)

        self.variant_snp_mult_alts = Variant.create(
            variant_sets=self.variant_sets,
            start=0,
            end=1,
            reference_bases="T",
            alternate_bases=[
                "A",
                "C"],
            reference=self.reference)
コード例 #3
0
 def setUp(self):
     DB.drop_database('ga4ghmongo-test')
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")
     self.variant_set = VariantSet.create_and_save(
         name="this_vcf_file", reference_set=self.reference_set)
     self.variant_sets = [self.variant_set]
     self.reference = Reference().create_and_save(
         name="ref", md5checksum="sre", reference_sets=[self.reference_set])
コード例 #4
0
 def setUp(self):
     DB.drop_database('atlas-test')
     self.pg = AlleleGenerator(
         reference_filepath="atlasvar/data/NC_000962.2.fasta")
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")
     self.variant_set = VariantSet.create_and_save(
         name="this_vcf_file", reference_set=self.reference_set)
     self.variant_sets = [self.variant_set]
     self.reference = Reference().create_and_save(
         name="ref", md5checksum="sre", reference_sets=[self.reference_set])
コード例 #5
0
 def setUp(self):
     DB.drop_database('atlas-test')
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")
     self.reference = Reference().create_and_save(
         name="NC_000962.3",
         md5checksum="sre",
         reference_sets=[self.reference_set])
     vcf = VCF(f="tests/vcf_tests/test.vcf",
               reference_set_id=self.reference_set.id,
               method="CORTEX")
     vcf.add_to_database()
コード例 #6
0
ファイル: basic_tests.py プロジェクト: pombredanne/atlas-1
 def setUp(self):
     DB.drop_database('atlas-test')
     with open("mykatlas/data/NC_000962.3.fasta", 'r') as infile:
         self.reference_seq = list(SeqIO.parse(infile, "fasta"))[0].seq
     self.gm = GeneAminoAcidChangeToDNAVariants(
         reference="mykatlas/data/NC_000962.3.fasta",
         genbank="mykatlas/data/NC_000962.3.gb")
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")
     self.variant_set = VariantSet.create_and_save(
         name="this_vcf_file", reference_set=self.reference_set)
     self.variant_sets = [self.variant_set]
     self.reference_id = Reference().create_and_save(
         name="ref", md5checksum="sre", reference_sets=[self.reference_set])
コード例 #7
0
ファイル: makeprobes.py プロジェクト: pombredanne/atlas-1
def run_make_probes_from_vcf_file(args):
    # Make VariantSet from vcf
    reference = os.path.basename(args.reference_filepath).split(".fa")[0]
    try:
        reference_set = ReferenceSet.objects.get(name=reference)
    except DoesNotExist:
        reference_set = ReferenceSet.create_and_save(name=reference)
        # Hack
    try:
        reference = Reference.create_and_save(
            name=reference,
            reference_sets=[reference_set],
            md5checksum=reference)
    except NotUniqueError:
        pass
    vcf = VCF(
        args.vcf,
        reference_set.id,
        method="tmp",
        force=True,
        append_to_global_variant_set=False)
    vcf.add_to_database()
コード例 #8
0
ファイル: add.py プロジェクト: pombredanne/atlas-1
def run(parser, args):
    args = parser.parse_args()
    args = check_args(args)
    if args.quiet:
        logger.setLevel(logging.ERROR)
    else:
        logger.setLevel(logging.INFO)
    DBNAME = 'atlas-%s' % (args.db_name)
    db = client[DBNAME]
    connect(DBNAME)
    logger.debug("Using DB %s" % DBNAME)
    try:
        reference_set = ReferenceSet.objects.get(name=args.reference_set)
    except DoesNotExist:
        reference_set = ReferenceSet.create_and_save(name=args.reference_set)
        # Hack
    try:
        reference = Reference.create_and_save(name=args.reference_set,
                                              reference_sets=[reference_set],
                                              md5checksum="NA")
    except:
        pass
    vcf = VCF(args.vcf, reference_set.id, method=args.method, force=args.force)
    vcf.add_to_database()
コード例 #9
0
ファイル: test_calls.py プロジェクト: pombredanne/atlas-var
 def setUp(self):
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")
     self.variant_set = VariantSet.create_and_save(
         name="this_vcf_file",
         reference_set=self.reference_set)
     self.variant_sets = [self.variant_set]
コード例 #10
0
ファイル: test_variants.py プロジェクト: Phelimb/ga4gh-mongo
 def setUp(self):
     DB.drop_database('ga4ghmongo-test')
     self.reference_set = ReferenceSet().create_and_save(name="ref_set")