Skip to content

Commit

Permalink
Merge pull request #79 from UMCUGenetics/release/v1.9.0
Browse files Browse the repository at this point in the history
v1.9.0
  • Loading branch information
rernst authored Mar 14, 2024
2 parents 6292283 + f345fc9 commit f9ee045
Show file tree
Hide file tree
Showing 19 changed files with 378 additions and 254 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,39 @@ name: Python (flake8, pytest)

on:
push:
branches: [main, develop]
branches: [master, develop]
pull_request:
branches: [main, develop]
branches: [master, develop]

jobs:
build:

runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.6]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: "Install Apache package"
run: sudo apt install -y apache2-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: "Install Apache package"
run: sudo apt install -y apache2-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
10 changes: 3 additions & 7 deletions clarity_epp.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def export_hamilton(args):

def export_illumina(args):
"""Export (updated) illumina samplesheet."""
clarity_epp.export.illumina.update_samplesheet(
lims, args.process_id, args.artifact_id, args.output_file, args.conversion_tool
clarity_epp.export.illumina.create_samplesheet(
lims, args.process_id, args.output_file
)


Expand Down Expand Up @@ -287,13 +287,9 @@ def placement_pipetting(args):
parser_export_hamilton.set_defaults(func=export_hamilton)

parser_export_illumina = subparser_export.add_parser(
'illumina', help='Export updated illumina samplesheet', parents=[output_parser]
'illumina', help='Export illumina samplesheet', parents=[output_parser]
)
parser_export_illumina.add_argument('process_id', help='Clarity lims process id')
parser_export_illumina.add_argument('artifact_id', help='Clarity lims samplesheet artifact id')
parser_export_illumina.add_argument(
'-c', '--conversion_tool', choices=['bcl2fastq', 'bclconvert'], default='bcl2fastq', help='Illumina conversion tool'
)
parser_export_illumina.set_defaults(func=export_illumina)

parser_export_labels = subparser_export.add_parser('labels', help='Export container labels', parents=[output_parser])
Expand Down
4 changes: 2 additions & 2 deletions clarity_epp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def get_sample_artifacts_from_pool(lims, pool_artifact):
# Check if sample_artifact with 2 samples are from the same person
if len(sample_artifact.samples) == 2:
if (
'Dx Persoons ID' in sample_artifact.samples[0].udf or
'Dx Persoons ID' in sample_artifact.samples[1].udf or
'Dx Persoons ID' in sample_artifact.samples[0].udf and
'Dx Persoons ID' in sample_artifact.samples[1].udf and
sample_artifact.samples[0].udf['Dx Persoons ID'] == sample_artifact.samples[1].udf['Dx Persoons ID']
):
sample_artifacts.append(sample_artifact)
Expand Down
2 changes: 1 addition & 1 deletion clarity_epp/export/bioanalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def samplesheet(lims, process_id, output_file):
}

# Get sample placement
for placement, artifact in process.output_containers()[0].placements.iteritems():
for placement, artifact in process.output_containers()[0].placements.items():
placement = ''.join(placement.split(':'))
plate[placement]['name'] = artifact.name
plate[placement]['comment'] = ''
Expand Down
4 changes: 2 additions & 2 deletions clarity_epp/export/hamilton.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def samplesheet_filling_out(lims, process_id, output_file):
process = Process(lims, id=process_id)
well_plate = {}

for placement, artifact in process.output_containers()[0].placements.iteritems():
for placement, artifact in process.output_containers()[0].placements.items():
placement = ''.join(placement.split(':'))
well_plate[placement] = artifact.samples[0].udf['Dx Fractienummer']

Expand All @@ -29,7 +29,7 @@ def samplesheet_purify(lims, process_id, output_file):
parent_process_barcode = process.parent_processes()[0].output_containers()[0].name
well_plate = {}

for placement, artifact in process.output_containers()[0].placements.iteritems():
for placement, artifact in process.output_containers()[0].placements.items():
placement = ''.join(placement.split(':'))
well_plate[placement] = artifact.samples[0].udf['Dx Fractienummer']

Expand Down
Loading

0 comments on commit f9ee045

Please sign in to comment.