-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
727 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
env: | ||
DOCKER_USERNAME: jwirth | ||
DOCKER_IMAGE_NAME: primerforge | ||
|
||
jobs: | ||
docker-build-push: | ||
name: docker build and push | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract version from tag | ||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./docker | ||
file: ./docker/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE_NAME }}:v${{ env.VERSION }} | ||
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE_NAME }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from __future__ import annotations | ||
from typing import Union | ||
|
||
class Product: | ||
"""class for storing PCR product data for a pair of primers | ||
""" | ||
def __init__(self, contig:str, size:Union[int,str], fbin:int, rbin:int, dimerTm:float) -> Product: | ||
"""constructor | ||
Args: | ||
contig (str): the contig where the product resides | ||
size (Union[int,str]): the contig size (will be str if multiple sizes) | ||
fbin (int): the bin the forward primer belongs to | ||
rbin (int): the bin the reverse primer belongs to | ||
dimerTm (float): the heterodimer Tm for the primer pair | ||
Returns: | ||
Product: a Product object | ||
""" | ||
# set attributes | ||
self.contig:str = contig | ||
self.size:Union[int,str] = size | ||
self.dimerTm:float = dimerTm | ||
self.fbin:int = fbin | ||
self.rbin:int = rbin | ||
|
||
# overloads | ||
def __str__(self) -> str: | ||
return f'{self.contig}: {self.size} bp' | ||
|
||
def __repr__(self) -> str: | ||
return str(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.