How to use the snps.sample_snps function in snps

To help you get started, we’ve selected a few snps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ThunderousFigs / Genomes / controller.py View on Github external
def createSnpsTable():
    if len(models.db_session.query(models.Snp).all()) == 0:

        for snp in snps.sample_snps:
            new_snp = models.Snp(snp['title'], snp['rs_id'], snp['dnaPair'], snp['outcome'], snp['video'])
            models.db_session.add(new_snp)
            models.db_session.commit()