diff --git a/.github/workflows/github-action-AgamPrimer-funestus.yml b/.github/workflows/github-action-AgamPrimer-funestus.yml index 15d3006..8b964ae 100644 --- a/.github/workflows/github-action-AgamPrimer-funestus.yml +++ b/.github/workflows/github-action-AgamPrimer-funestus.yml @@ -37,6 +37,20 @@ jobs: poetry install poetry run python -m ipykernel install --user --name AnoPrimer + - id: 'auth' + name: 'Set up Google Cloud authentication' + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' + + - name: 'Set up Google Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v2' + with: + version: '>= 363.0.0' + + - name: 'Check gcloud CLI' + run: 'gcloud info' + - name: Run notebooks run: | poetry run papermill notebooks/AnoPrimer-long.ipynb qPCR_run.ipynb -k AnoPrimer -f tests/cDNA_Params_fun.json diff --git a/.github/workflows/github-action-AgamPrimer-gambiae.yml b/.github/workflows/github-action-AgamPrimer-gambiae.yml index 0757f02..637f653 100644 --- a/.github/workflows/github-action-AgamPrimer-gambiae.yml +++ b/.github/workflows/github-action-AgamPrimer-gambiae.yml @@ -37,6 +37,20 @@ jobs: poetry install poetry run python -m ipykernel install --user --name AnoPrimer + - id: 'auth' + name: 'Set up Google Cloud authentication' + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' + + - name: 'Set up Google Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v2' + with: + version: '>= 363.0.0' + + - name: 'Check gcloud CLI' + run: 'gcloud info' + - name: Run notebooks run: | poetry run papermill notebooks/AnoPrimer-long.ipynb qPCR_run.ipynb -k AnoPrimer -f tests/cDNA_Params.json diff --git a/AnoPrimer/design.py b/AnoPrimer/design.py index 53e8b7e..4c07487 100644 --- a/AnoPrimer/design.py +++ b/AnoPrimer/design.py @@ -175,7 +175,7 @@ def prepare_gDNA_sequence( "SEQUENCE_TEMPLATE": target_sequence, "SEQUENCE_TARGET": target_loc_primer3, "GENOMIC_TARGET": target, - "GENOMIC_DNA_POSITIONS": gdna_pos, + "GENOMIC_DNA_POSITIONS": list(gdna_pos), } if "probe" in assay_type: @@ -235,7 +235,7 @@ def prepare_cDNA_sequence( "SEQUENCE_ID": assay_name, "SEQUENCE_TEMPLATE": target_mRNA_seq, "GENOMIC_TARGET": transcript, - "GENOMIC_DNA_POSITIONS": gdna_pos, + "GENOMIC_DNA_POSITIONS": list(gdna_pos), } if cDNA_exon_junction: diff --git a/AnoPrimer/evaluate.py b/AnoPrimer/evaluate.py index 3083b15..78d2e41 100644 --- a/AnoPrimer/evaluate.py +++ b/AnoPrimer/evaluate.py @@ -77,7 +77,7 @@ def __init__( # Extract additional attributes from seq_parameters self.target_sequence = seq_parameters.get("SEQUENCE_TEMPLATE") - self.gdna_pos = seq_parameters.get("GENOMIC_DNA_POSITIONS") + self.gdna_pos = np.array(seq_parameters.get("GENOMIC_DNA_POSITIONS")) def evaluate_primers( self, diff --git a/notebooks/AnoPrimer-long.ipynb b/notebooks/AnoPrimer-long.ipynb index 4543789..8aec5cd 100644 --- a/notebooks/AnoPrimer-long.ipynb +++ b/notebooks/AnoPrimer-long.ipynb @@ -43,11 +43,7 @@ "import malariagen_data\n", "import primer3\n", "import pandas as pd\n", - "import numpy as np\n", - "\n", - "import google.auth\n", - "\n", - "credentials, project = google.auth.default()" + "import numpy as np" ] }, {