From bca4b71dd03c5102367b0607fa9e18946993f613 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:02:53 -0500 Subject: [PATCH 01/37] update citations as an action rather in the package --- .github/workflows/run_citations.yml | 31 +++++++++ .github/workflows/update_citations.yml | 46 ++++++++++++++ src/PyPop/citation/CITATION.cff | 88 ++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 .github/workflows/run_citations.yml create mode 100644 .github/workflows/update_citations.yml create mode 100644 src/PyPop/citation/CITATION.cff diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml new file mode 100644 index 000000000..f28598843 --- /dev/null +++ b/.github/workflows/run_citations.yml @@ -0,0 +1,31 @@ +name: Update citations upon CITATION.cff changes + +on: + push: + paths: + - CITATION.cff + +jobs: + update-citations: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + # use customized version of cffconvert + pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert", + + uses: ./.github/workflows/update_citations.yml # reference the reusable workflow + with: + CITATION_DIR: 'src/PyPop/citation' + INIT_FILE: 'src/PyPop/__init__.py' + diff --git a/.github/workflows/update_citations.yml b/.github/workflows/update_citations.yml new file mode 100644 index 000000000..624eca4ff --- /dev/null +++ b/.github/workflows/update_citations.yml @@ -0,0 +1,46 @@ +name: Update citation files + +on: + workflow_call: # This allows the workflow to be triggered by another workflow + inputs: + CITATION_DIR: + description: 'Directory for citations' + required: true + default: 'src/PyPop/citation' + INIT_FILE: + description: 'Path to the init file' + required: true + default: 'src/PyPop/__init__.py' + +jobs: + update-citation: + steps: + - name: Extract citation formats + id: extract_formats + run: | + python -c " +import ast +with open('${{ inputs.INIT_FILE }}) as f: + contents = f.read() +citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == 'citation_output_formats'), []) +formats = ','.join([str(elem.value) for elem in citation_output_formats]) +print(f'::set-output name=formats::{formats}') + " + + - name: Copy CITATION.cff to citation directory + run: | + cp CITATION.cff ${{ inputs.CITATION_DIR }}/CITATION.cff + + - name: Generate citation files + run: | + formats="${{ steps.extract_formats.outputs.formats }}" + IFS=',' read -r -a formats_array <<< "$formats" + for format in "${formats_array[@]}"; do + cffconvert --infile CITATION.cff --outfile "${{ inputs.CITATION_DIR }}/citation.${format}" --format "$format" + done + + - name: Commit and push changes + uses: EndBug/add-and-commit@v9 + with: + message: "Auto-update citation files based on CITATION.cff" + add: "${{ inputs.CITATION_DIR }}/*" diff --git a/src/PyPop/citation/CITATION.cff b/src/PyPop/citation/CITATION.cff new file mode 100644 index 000000000..1d0a479fc --- /dev/null +++ b/src/PyPop/citation/CITATION.cff @@ -0,0 +1,88 @@ +cff-version: 1.2.0 +message: >- + If you use this software, please cite both the software itself, as well as the + article Lancaster AK et al. (2024) PyPop: A mature + open-source software pipeline for population genomics. Front. + Immunol. 15:1378512. doi: 10.3389/fimmu.2024.1378512 +abstract: >- + PyPop for Population Genomics (PyPop) is a Python program for processing + genotype and allele data and running population genetic analyses, including + conformity to Hardy-Weinberg expectations; tests for balancing or directional + selection; estimates of haplotype frequencies and measures and tests of + significance for linkage disequilibrium (LD). Output of analyses are + stored in XML format for maximum downstream flexibility. PyPop also has an + internal facility for additionally aggregating the output XML and generating + output tab-separated (TSV) files, as well as default plain text files for each + population. Although it can be run on any kind of genotype data, it has + additional support for analyzing population genotype with allelic nomenclature + from the human leukocyte antigen (HLA) region. +authors: + - family-names: Lancaster + given-names: Alexander K. + orcid: https://orcid.org/0000-0002-0002-9263 + affiliation: Amber Biology LLC and Ronin Institute + - family-names: Nelson + given-names: Mark P. + affiliation: University of California, Berkeley + - family-names: Single + given-names: Richard + orcid: https://orcid.org/0000-0001-6054-6505 + affiliation: University of Vermont + - family-names: Solberg + given-names: Owen + orcid: https://orcid.org/0000-0003-3060-9709 + - family-names: Tsai + given-names: Yingsu + affiliation: University of California, Berkeley + orcid: https://orcid.org/0009-0006-0162-6066 + - family-names: Meyer + given-names: Diogo + orcid: https://orcid.org/0000-0002-7155-5674 + affiliation: University of São Paulo + - family-names: Webster + given-names: Gordon + affiliation: Amber Biology LLC + orcid: https://orcid.org/0009-0009-2862-0467 + - family-names: Mariani + given-names: Michael P. + orcid: https://orcid.org/0000-0001-5852-0517 + affiliation: Mariani Systems LLC and University of Vermont + - family-names: Sochat + given-names: Vanessa + orcid: https://orcid.org/0000-0002-4387-3819 + affiliation: Lawrence Livermore National Laboratory + - family-names: Kornel + given-names: Karl + orcid: https://orcid.org/0000-0001-5847-5330 + affiliation: Stanford Research Computing Center + - family-names: Spaaks + given-names: Jurriaan H. + orcid: https://orcid.org/0000-0002-7064-4069 + affiliation: Netherlands eScience Center + - family-names: Mack + given-names: Steven J. + orcid: https://orcid.org/0000-0001-9820-9547 + affiliation: University of California, San Francisco + - family-names: Thomson + given-names: Glenys + orcid: https://orcid.org/0000-0001-5235-4159 + affiliation: University of California, Berkeley +title: 'PyPop: Python for Population Genomics' +url: http://pypop.org/ +repository-artifact: https://pypi.org/project/pypop-genomics/ +repository-code: https://github.com/alexlancaster/pypop +type: software +keywords: + - population genetics + - population genomics + - bioinformatics + - computational biology + - evolutionary biology + - Human leukocyte antigen + - Major histocompatibility complex + - HLA + - MHC +license: GPL-2.0-or-later +version: v1.1.1 +doi: 10.5281/zenodo.13742984 From 942d7730c3906c99f5de1981036a83dab3e416d0 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:05:07 -0500 Subject: [PATCH 02/37] minor reordering --- CITATION.cff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 1d0a479fc..d60f9ee2b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -73,6 +73,9 @@ url: http://pypop.org/ repository-artifact: https://pypi.org/project/pypop-genomics/ repository-code: https://github.com/alexlancaster/pypop type: software +license: GPL-2.0-or-later +version: v1.1.1 +doi: 10.5281/zenodo.13742984 keywords: - population genetics - population genomics @@ -83,6 +86,3 @@ keywords: - Major histocompatibility complex - HLA - MHC -license: GPL-2.0-or-later -version: v1.1.1 -doi: 10.5281/zenodo.13742984 From 3887419de3ea63bd2a013234ced1911bd15d64c8 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:09:45 -0500 Subject: [PATCH 03/37] fix syntax --- .github/workflows/run_citations.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index f28598843..58e6f184d 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -23,9 +23,10 @@ jobs: python -m pip install --upgrade pip # use customized version of cffconvert pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert", - - uses: ./.github/workflows/update_citations.yml # reference the reusable workflow - with: - CITATION_DIR: 'src/PyPop/citation' - INIT_FILE: 'src/PyPop/__init__.py' + + - name: Trigger citation update workflow + uses: ./.github/workflows/update_citations.yml # reference the reusable workflow + with: + CITATION_DIR: 'src/PyPop/citation' + INIT_FILE: 'src/PyPop/__init__.py' From f20f0dba2c0734feb38b5343f30335f8ad8f0270 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:13:19 -0500 Subject: [PATCH 04/37] don't re-run build workflow after changes to citation updates --- .github/workflows/build_wheels.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 646232e25..4b38ffc5b 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -19,7 +19,9 @@ on: - '.github/workflows/documentation.yaml' - '.github/workflows/buildjet_arm64.yml' - '.github/workflows/release-drafter.yml' - - '.github/workflows/codeql.yml' + - '.github/workflows/codeql.yml' + - '.github/workflows/run_citations.yml' + - '.github/workflows/update_citations.yml' - '.gitattributes' push: paths-ignore: @@ -34,7 +36,9 @@ on: - '.github/workflows/documentation.yaml' - '.github/workflows/buildjet_arm64.yml' - '.github/workflows/release-drafter.yml' - - '.github/workflows/codeql.yml' + - '.github/workflows/codeql.yml' + - '.github/workflows/run_citations.yml' + - '.github/workflows/update_citations.yml' - '.gitattributes' release: types: From 794bb9723a305d560ad23ba94c89a9564a5d6449 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:14:44 -0500 Subject: [PATCH 05/37] another reorder --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index d60f9ee2b..2bedbe194 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -70,8 +70,8 @@ authors: affiliation: University of California, Berkeley title: 'PyPop: Python for Population Genomics' url: http://pypop.org/ -repository-artifact: https://pypi.org/project/pypop-genomics/ repository-code: https://github.com/alexlancaster/pypop +repository-artifact: https://pypi.org/project/pypop-genomics/ type: software license: GPL-2.0-or-later version: v1.1.1 From ce36a4158edf1f8ee5225b329d8a95ee1c63fad2 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:15:58 -0500 Subject: [PATCH 06/37] syntax error --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 58e6f184d..53b9662b4 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -22,7 +22,7 @@ jobs: run: | python -m pip install --upgrade pip # use customized version of cffconvert - pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert", + pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - name: Trigger citation update workflow uses: ./.github/workflows/update_citations.yml # reference the reusable workflow From f0308d0ae56045b05c33f157dc78ad94e9111ef0 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:16:56 -0500 Subject: [PATCH 07/37] re-run upon changes to workflow files --- .github/workflows/run_citations.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 53b9662b4..9b8cb01e0 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -4,6 +4,8 @@ on: push: paths: - CITATION.cff + - '.github/workflows/run_citations.yml' + - '.github/workflows/update_citations.yml' jobs: update-citations: From 90a91d1bcf3a8f479132c381bb0293dc8bc9b57b Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:22:26 -0500 Subject: [PATCH 08/37] reference the workflow dynamically --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 9b8cb01e0..b7b015385 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - name: Trigger citation update workflow - uses: ./.github/workflows/update_citations.yml # reference the reusable workflow + uses: {{ github.repository }}.github/workflows/update-citations.yml@${{ github.ref_name }} # Reference the current branch dynamically with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' From 3052af00d638be59d4010e06ac03c94317a5e114 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:23:32 -0500 Subject: [PATCH 09/37] wrong name of yml --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index b7b015385..9310af705 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - name: Trigger citation update workflow - uses: {{ github.repository }}.github/workflows/update-citations.yml@${{ github.ref_name }} # Reference the current branch dynamically + uses: {{ github.repository }}.github/workflows/update_citations.yml@${{ github.ref_name }} # reference the current branch dynamically with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' From 3eb1fadbc03e0f4222e4062e7c3ee3f5b5b30be7 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:25:18 -0500 Subject: [PATCH 10/37] syntax fix --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 9310af705..2200fa2ab 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -25,7 +25,7 @@ jobs: python -m pip install --upgrade pip # use customized version of cffconvert pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - + - name: Trigger citation update workflow uses: {{ github.repository }}.github/workflows/update_citations.yml@${{ github.ref_name }} # reference the current branch dynamically with: From 1e3d80c4b61ef9b3c19bee9ef04d128e1a61d507 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:39:14 -0500 Subject: [PATCH 11/37] don't expand the repo name, not necessary --- .github/workflows/run_citations.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 2200fa2ab..34305acf5 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -5,7 +5,7 @@ on: paths: - CITATION.cff - '.github/workflows/run_citations.yml' - - '.github/workflows/update_citations.yml' + - '.github/workflows/update_citations.yml' jobs: update-citations: @@ -25,10 +25,9 @@ jobs: python -m pip install --upgrade pip # use customized version of cffconvert pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - + - name: Trigger citation update workflow - uses: {{ github.repository }}.github/workflows/update_citations.yml@${{ github.ref_name }} # reference the current branch dynamically + uses: ./.github/workflows/update_citations.yml@${{ github.ref_name }} # reference the current branch dynamically with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' - From 09315fb839ebffb784ec13937516cacbd5541b27 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:42:19 -0500 Subject: [PATCH 12/37] use github.ref --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 34305acf5..26f81e86f 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - name: Trigger citation update workflow - uses: ./.github/workflows/update_citations.yml@${{ github.ref_name }} # reference the current branch dynamically + uses: ./.github/workflows/update_citations.yml@${{ github.ref }} # reference the current branch dynamically with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' From 4fd9afb84c0503d54882b8005cae5d689e84c54b Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:44:28 -0500 Subject: [PATCH 13/37] have to hardcode branch :( --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 26f81e86f..c8903bef5 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - name: Trigger citation update workflow - uses: ./.github/workflows/update_citations.yml@${{ github.ref }} # reference the current branch dynamically + uses: ./.github/workflows/update_citations.yml@output-citation # reference the current branch dynamically with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' From a55d38c7bee785d61a51f3a680d420439302ded3 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:55:29 -0500 Subject: [PATCH 14/37] fix reusable workflow syntax --- .github/workflows/run_citations.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index c8903bef5..978255dae 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -26,8 +26,8 @@ jobs: # use customized version of cffconvert pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - - name: Trigger citation update workflow - uses: ./.github/workflows/update_citations.yml@output-citation # reference the current branch dynamically - with: - CITATION_DIR: 'src/PyPop/citation' - INIT_FILE: 'src/PyPop/__init__.py' + call-citation-workflow: + - uses: ./.github/workflows/update_citations.yml@output-citation # reference the current branch dynamically + with: + CITATION_DIR: 'src/PyPop/citation' + INIT_FILE: 'src/PyPop/__init__.py' From 0a8b92e693b655619ccc13e06c15663bf6b7b5db Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 00:58:29 -0500 Subject: [PATCH 15/37] more syntax fixes --- .github/workflows/run_citations.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 978255dae..d3123d773 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert call-citation-workflow: - - uses: ./.github/workflows/update_citations.yml@output-citation # reference the current branch dynamically - with: - CITATION_DIR: 'src/PyPop/citation' - INIT_FILE: 'src/PyPop/__init__.py' + uses: ./.github/workflows/update_citations.yml@output-citation # reference the current branch dynamically + with: + CITATION_DIR: 'src/PyPop/citation' + INIT_FILE: 'src/PyPop/__init__.py' From b85b1e1b3092a432402e5d744c279fadb9e8c540 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:00:14 -0500 Subject: [PATCH 16/37] local workflow doesn't need version --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index d3123d773..0d02308f5 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert call-citation-workflow: - uses: ./.github/workflows/update_citations.yml@output-citation # reference the current branch dynamically + uses: ./.github/workflows/update_citations.yml with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' From 071391d2ad6ea2898dd753415e85f9c4c617d2bf Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:04:54 -0500 Subject: [PATCH 17/37] add needs --- .github/workflows/run_citations.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 0d02308f5..382f022db 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -26,8 +26,11 @@ jobs: # use customized version of cffconvert pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - call-citation-workflow: + call-citation-workflow: + needs: update-citations uses: ./.github/workflows/update_citations.yml with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' + secrets: inherit # if any secrets need to be inherited from the calling workflow + From 54ec929875f89e5873e728b9e94d3c3db449217f Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:07:44 -0500 Subject: [PATCH 18/37] do citation updates --- .github/workflows/update_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_citations.yml b/.github/workflows/update_citations.yml index 624eca4ff..16efa874b 100644 --- a/.github/workflows/update_citations.yml +++ b/.github/workflows/update_citations.yml @@ -13,7 +13,7 @@ on: default: 'src/PyPop/__init__.py' jobs: - update-citation: + do-citation-updates: steps: - name: Extract citation formats id: extract_formats From ea4a640600a70d569c196dec2b516b99f351e204 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:14:14 -0500 Subject: [PATCH 19/37] fix more syntax --- .github/workflows/update_citations.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update_citations.yml b/.github/workflows/update_citations.yml index 16efa874b..43c508427 100644 --- a/.github/workflows/update_citations.yml +++ b/.github/workflows/update_citations.yml @@ -18,14 +18,14 @@ jobs: - name: Extract citation formats id: extract_formats run: | - python -c " -import ast -with open('${{ inputs.INIT_FILE }}) as f: - contents = f.read() -citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == 'citation_output_formats'), []) -formats = ','.join([str(elem.value) for elem in citation_output_formats]) -print(f'::set-output name=formats::{formats}') - " + python -c ' + import ast + with open("${{ inputs.INIT_FILE }}") as f: + contents = f.read() + citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == 'citation_output_formats'), []) + formats = ','.join([str(elem.value) for elem in citation_output_formats]) + print(f'::set-output name=formats::{formats}') + ' - name: Copy CITATION.cff to citation directory run: | From 7683a19c4f307b6aa88027ccc0bbaf3a7b7718a2 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:25:00 -0500 Subject: [PATCH 20/37] supply type --- .github/workflows/update_citations.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_citations.yml b/.github/workflows/update_citations.yml index 43c508427..0bebb1836 100644 --- a/.github/workflows/update_citations.yml +++ b/.github/workflows/update_citations.yml @@ -4,13 +4,15 @@ on: workflow_call: # This allows the workflow to be triggered by another workflow inputs: CITATION_DIR: - description: 'Directory for citations' + #description: 'Directory for citations' required: true default: 'src/PyPop/citation' + type: string INIT_FILE: - description: 'Path to the init file' + #description: 'Path to the init file' required: true default: 'src/PyPop/__init__.py' + type: string jobs: do-citation-updates: @@ -22,9 +24,10 @@ jobs: import ast with open("${{ inputs.INIT_FILE }}") as f: contents = f.read() - citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == 'citation_output_formats'), []) - formats = ','.join([str(elem.value) for elem in citation_output_formats]) - print(f'::set-output name=formats::{formats}') + citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == "citation_output_formats"), []) + formats = ",".join([str(elem.value) for elem in citation_output_formats]) + with open("${{ steps.extract_formats.outputs.formats_file }}", "w") as f: + f.write(formats) ' - name: Copy CITATION.cff to citation directory From 103df2c2b0a1ac75c28e73c027ea449ce0f96651 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:27:24 -0500 Subject: [PATCH 21/37] missing 'runs-on' --- .github/workflows/update_citations.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update_citations.yml b/.github/workflows/update_citations.yml index 0bebb1836..6569a4c81 100644 --- a/.github/workflows/update_citations.yml +++ b/.github/workflows/update_citations.yml @@ -16,6 +16,8 @@ on: jobs: do-citation-updates: + runs-on: ubuntu-latest + steps: - name: Extract citation formats id: extract_formats From 5a08051e7fb4b2ffac5d5528cf48844434437933 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:39:47 -0500 Subject: [PATCH 22/37] make into an action --- .github/{workflows => actions}/update_citations.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => actions}/update_citations.yml (100%) diff --git a/.github/workflows/update_citations.yml b/.github/actions/update_citations.yml similarity index 100% rename from .github/workflows/update_citations.yml rename to .github/actions/update_citations.yml From 8dc9b99bb4361db290c202b17e1f07ad2c280a57 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:48:14 -0500 Subject: [PATCH 23/37] convert to action --- .github/actions/update_citations.yml | 86 +++++++++++++--------------- .github/workflows/run_citations.yml | 12 ++-- 2 files changed, 45 insertions(+), 53 deletions(-) diff --git a/.github/actions/update_citations.yml b/.github/actions/update_citations.yml index 6569a4c81..145f880a6 100644 --- a/.github/actions/update_citations.yml +++ b/.github/actions/update_citations.yml @@ -1,51 +1,45 @@ name: Update citation files +description: "Update citation files" +inputs: + CITATION_DIR: + description: 'Directory for citations' + required: true + default: 'src/PyPop/citation' + INIT_FILE: + description: 'Path to the init file' + required: true + default: 'src/PyPop/__init__.py' -on: - workflow_call: # This allows the workflow to be triggered by another workflow - inputs: - CITATION_DIR: - #description: 'Directory for citations' - required: true - default: 'src/PyPop/citation' - type: string - INIT_FILE: - #description: 'Path to the init file' - required: true - default: 'src/PyPop/__init__.py' - type: string +runs: + using: "composite" + steps: + - name: Extract citation formats + id: extract_formats + run: | + python -c ' + import ast + with open("${{ inputs.INIT_FILE }}") as f: + contents = f.read() + citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == "citation_output_formats"), []) + formats = ",".join([str(elem.value) for elem in citation_output_formats]) + with open("${{ steps.extract_formats.outputs.formats_file }}", "w") as f: + f.write(formats) + ' -jobs: - do-citation-updates: - runs-on: ubuntu-latest - - steps: - - name: Extract citation formats - id: extract_formats - run: | - python -c ' - import ast - with open("${{ inputs.INIT_FILE }}") as f: - contents = f.read() - citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == "citation_output_formats"), []) - formats = ",".join([str(elem.value) for elem in citation_output_formats]) - with open("${{ steps.extract_formats.outputs.formats_file }}", "w") as f: - f.write(formats) - ' + - name: Copy CITATION.cff to citation directory + run: | + cp CITATION.cff ${{ inputs.CITATION_DIR }}/CITATION.cff - - name: Copy CITATION.cff to citation directory - run: | - cp CITATION.cff ${{ inputs.CITATION_DIR }}/CITATION.cff + - name: Generate citation files + run: | + formats="${{ steps.extract_formats.outputs.formats }}" + IFS=',' read -r -a formats_array <<< "$formats" + for format in "${formats_array[@]}"; do + cffconvert --infile CITATION.cff --outfile "${{ inputs.CITATION_DIR }}/citation.${format}" --format "$format" + done - - name: Generate citation files - run: | - formats="${{ steps.extract_formats.outputs.formats }}" - IFS=',' read -r -a formats_array <<< "$formats" - for format in "${formats_array[@]}"; do - cffconvert --infile CITATION.cff --outfile "${{ inputs.CITATION_DIR }}/citation.${format}" --format "$format" - done - - - name: Commit and push changes - uses: EndBug/add-and-commit@v9 - with: - message: "Auto-update citation files based on CITATION.cff" - add: "${{ inputs.CITATION_DIR }}/*" + - name: Commit and push changes + uses: EndBug/add-and-commit@v9 + with: + message: "Auto-update citation files based on CITATION.cff" + add: "${{ inputs.CITATION_DIR }}/*" diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 382f022db..ef607a4b3 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -26,11 +26,9 @@ jobs: # use customized version of cffconvert pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - call-citation-workflow: - needs: update-citations - uses: ./.github/workflows/update_citations.yml - with: - CITATION_DIR: 'src/PyPop/citation' - INIT_FILE: 'src/PyPop/__init__.py' - secrets: inherit # if any secrets need to be inherited from the calling workflow + - name: Runs composite action + uses: ./.github/actions/update_citations.yml + with: + CITATION_DIR: 'src/PyPop/citation' + INIT_FILE: 'src/PyPop/__init__.py' From bb6fe38aabf54533b63308fb7a2cf0c768731652 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:51:24 -0500 Subject: [PATCH 24/37] rename to action.yml --- .../{update_citations.yml => update_citations/action.yml} | 0 .github/workflows/run_citations.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/actions/{update_citations.yml => update_citations/action.yml} (100%) diff --git a/.github/actions/update_citations.yml b/.github/actions/update_citations/action.yml similarity index 100% rename from .github/actions/update_citations.yml rename to .github/actions/update_citations/action.yml diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index ef607a4b3..032119a50 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -27,7 +27,7 @@ jobs: pip install git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert - name: Runs composite action - uses: ./.github/actions/update_citations.yml + uses: ./.github/actions/update_citations with: CITATION_DIR: 'src/PyPop/citation' INIT_FILE: 'src/PyPop/__init__.py' From 2aeb55c1d69a108f5c61663a1e1e1a03b250c635 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:58:38 -0500 Subject: [PATCH 25/37] use a default shell --- .github/actions/update_citations/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/update_citations/action.yml b/.github/actions/update_citations/action.yml index 145f880a6..482b466a5 100644 --- a/.github/actions/update_citations/action.yml +++ b/.github/actions/update_citations/action.yml @@ -12,6 +12,7 @@ inputs: runs: using: "composite" + shell: bash # This is the default shell for all steps steps: - name: Extract citation formats id: extract_formats From 9b35134ee301142229debe792b6e561d12c3cb97 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 01:59:41 -0500 Subject: [PATCH 26/37] depend on action file --- .github/workflows/run_citations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_citations.yml b/.github/workflows/run_citations.yml index 032119a50..0a06830f6 100644 --- a/.github/workflows/run_citations.yml +++ b/.github/workflows/run_citations.yml @@ -5,7 +5,7 @@ on: paths: - CITATION.cff - '.github/workflows/run_citations.yml' - - '.github/workflows/update_citations.yml' + - '.github/actions/update_citations/action.yml' jobs: update-citations: From eebd3e610f070c309febbf10cda7cf433e2b1709 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:03:50 -0500 Subject: [PATCH 27/37] need shell for each step --- .github/actions/update_citations/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/update_citations/action.yml b/.github/actions/update_citations/action.yml index 482b466a5..8cf552f36 100644 --- a/.github/actions/update_citations/action.yml +++ b/.github/actions/update_citations/action.yml @@ -12,7 +12,6 @@ inputs: runs: using: "composite" - shell: bash # This is the default shell for all steps steps: - name: Extract citation formats id: extract_formats @@ -26,10 +25,12 @@ runs: with open("${{ steps.extract_formats.outputs.formats_file }}", "w") as f: f.write(formats) ' + shell: bash - name: Copy CITATION.cff to citation directory run: | cp CITATION.cff ${{ inputs.CITATION_DIR }}/CITATION.cff + shell: bash - name: Generate citation files run: | @@ -38,6 +39,7 @@ runs: for format in "${formats_array[@]}"; do cffconvert --infile CITATION.cff --outfile "${{ inputs.CITATION_DIR }}/citation.${format}" --format "$format" done + shell: bash - name: Commit and push changes uses: EndBug/add-and-commit@v9 From be4b9b664d84fe891920316aedec7594e2081893 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:05:47 -0500 Subject: [PATCH 28/37] change deps --- .github/workflows/build_wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 4b38ffc5b..3d82d2e6b 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -21,7 +21,7 @@ on: - '.github/workflows/release-drafter.yml' - '.github/workflows/codeql.yml' - '.github/workflows/run_citations.yml' - - '.github/workflows/update_citations.yml' + - '.github/actions/update_citations/action.yml' - '.gitattributes' push: paths-ignore: @@ -38,7 +38,7 @@ on: - '.github/workflows/release-drafter.yml' - '.github/workflows/codeql.yml' - '.github/workflows/run_citations.yml' - - '.github/workflows/update_citations.yml' + - '.github/actions/update_citations/action.yml' - '.gitattributes' release: types: From a75f93328e7e198f1acce548c487e13142c28da0 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:15:53 -0500 Subject: [PATCH 29/37] use set-output --- .github/actions/update_citations/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/update_citations/action.yml b/.github/actions/update_citations/action.yml index 8cf552f36..072e467ea 100644 --- a/.github/actions/update_citations/action.yml +++ b/.github/actions/update_citations/action.yml @@ -22,8 +22,7 @@ runs: contents = f.read() citation_output_formats = next((node.value.elts for node in ast.walk(ast.parse(contents)) if isinstance(node, ast.Assign) and node.targets[0].id == "citation_output_formats"), []) formats = ",".join([str(elem.value) for elem in citation_output_formats]) - with open("${{ steps.extract_formats.outputs.formats_file }}", "w") as f: - f.write(formats) + print(f"::set-output name=formats::{formats}") ' shell: bash From 4b417fdeae347abda82df99ac2b7260c569d552d Mon Sep 17 00:00:00 2001 From: alexlancaster Date: Wed, 13 Nov 2024 07:16:30 +0000 Subject: [PATCH 30/37] Auto-update citation files based on CITATION.cff --- src/PyPop/citation/CITATION.cff | 8 +- src/PyPop/citation/citation.apalike | 1 + src/PyPop/citation/citation.bibtex | 7 ++ src/PyPop/citation/citation.cff | 88 ++++++++++++++++ src/PyPop/citation/citation.codemeta | 149 +++++++++++++++++++++++++++ src/PyPop/citation/citation.endnote | 26 +++++ src/PyPop/citation/citation.ris | 28 +++++ 7 files changed, 303 insertions(+), 4 deletions(-) create mode 100644 src/PyPop/citation/citation.apalike create mode 100644 src/PyPop/citation/citation.bibtex create mode 100644 src/PyPop/citation/citation.cff create mode 100644 src/PyPop/citation/citation.codemeta create mode 100644 src/PyPop/citation/citation.endnote create mode 100644 src/PyPop/citation/citation.ris diff --git a/src/PyPop/citation/CITATION.cff b/src/PyPop/citation/CITATION.cff index 1d0a479fc..2bedbe194 100644 --- a/src/PyPop/citation/CITATION.cff +++ b/src/PyPop/citation/CITATION.cff @@ -70,9 +70,12 @@ authors: affiliation: University of California, Berkeley title: 'PyPop: Python for Population Genomics' url: http://pypop.org/ -repository-artifact: https://pypi.org/project/pypop-genomics/ repository-code: https://github.com/alexlancaster/pypop +repository-artifact: https://pypi.org/project/pypop-genomics/ type: software +license: GPL-2.0-or-later +version: v1.1.1 +doi: 10.5281/zenodo.13742984 keywords: - population genetics - population genomics @@ -83,6 +86,3 @@ keywords: - Major histocompatibility complex - HLA - MHC -license: GPL-2.0-or-later -version: v1.1.1 -doi: 10.5281/zenodo.13742984 diff --git a/src/PyPop/citation/citation.apalike b/src/PyPop/citation/citation.apalike new file mode 100644 index 000000000..fed3aa640 --- /dev/null +++ b/src/PyPop/citation/citation.apalike @@ -0,0 +1 @@ +Lancaster A.K., Nelson M.P., Single R., Solberg O., Tsai Y., Meyer D., Webster G., Mariani M.P., Sochat V., Kornel K., Spaaks J.H., Mack S.J., and Thomson G. PyPop: Python for Population Genomics (version v1.1.1). DOI: 10.5281/zenodo.13742984 URL: http://pypop.org/ diff --git a/src/PyPop/citation/citation.bibtex b/src/PyPop/citation/citation.bibtex new file mode 100644 index 000000000..ee78b779a --- /dev/null +++ b/src/PyPop/citation/citation.bibtex @@ -0,0 +1,7 @@ +@misc{YourReferenceHere, +author = {Lancaster, Alexander K. and Nelson, Mark P. and Single, Richard and Solberg, Owen and Tsai, Yingsu and Meyer, Diogo and Webster, Gordon and Mariani, Michael P. and Sochat, Vanessa and Kornel, Karl and Spaaks, Jurriaan H. and Mack, Steven J. and Thomson, Glenys}, +doi = {10.5281/zenodo.13742984}, +title = {PyPop: Python for Population Genomics}, +url = {http://pypop.org/}, +note = {If you use this software, please cite both the software itself, as well as the article Lancaster AK et al. (2024) PyPop: A mature open-source software pipeline for population genomics. Front. Immunol. 15:1378512. doi: 10.3389/fimmu.2024.1378512} +} diff --git a/src/PyPop/citation/citation.cff b/src/PyPop/citation/citation.cff new file mode 100644 index 000000000..2bedbe194 --- /dev/null +++ b/src/PyPop/citation/citation.cff @@ -0,0 +1,88 @@ +cff-version: 1.2.0 +message: >- + If you use this software, please cite both the software itself, as well as the + article Lancaster AK et al. (2024) PyPop: A mature + open-source software pipeline for population genomics. Front. + Immunol. 15:1378512. doi: 10.3389/fimmu.2024.1378512 +abstract: >- + PyPop for Population Genomics (PyPop) is a Python program for processing + genotype and allele data and running population genetic analyses, including + conformity to Hardy-Weinberg expectations; tests for balancing or directional + selection; estimates of haplotype frequencies and measures and tests of + significance for linkage disequilibrium (LD). Output of analyses are + stored in XML format for maximum downstream flexibility. PyPop also has an + internal facility for additionally aggregating the output XML and generating + output tab-separated (TSV) files, as well as default plain text files for each + population. Although it can be run on any kind of genotype data, it has + additional support for analyzing population genotype with allelic nomenclature + from the human leukocyte antigen (HLA) region. +authors: + - family-names: Lancaster + given-names: Alexander K. + orcid: https://orcid.org/0000-0002-0002-9263 + affiliation: Amber Biology LLC and Ronin Institute + - family-names: Nelson + given-names: Mark P. + affiliation: University of California, Berkeley + - family-names: Single + given-names: Richard + orcid: https://orcid.org/0000-0001-6054-6505 + affiliation: University of Vermont + - family-names: Solberg + given-names: Owen + orcid: https://orcid.org/0000-0003-3060-9709 + - family-names: Tsai + given-names: Yingsu + affiliation: University of California, Berkeley + orcid: https://orcid.org/0009-0006-0162-6066 + - family-names: Meyer + given-names: Diogo + orcid: https://orcid.org/0000-0002-7155-5674 + affiliation: University of São Paulo + - family-names: Webster + given-names: Gordon + affiliation: Amber Biology LLC + orcid: https://orcid.org/0009-0009-2862-0467 + - family-names: Mariani + given-names: Michael P. + orcid: https://orcid.org/0000-0001-5852-0517 + affiliation: Mariani Systems LLC and University of Vermont + - family-names: Sochat + given-names: Vanessa + orcid: https://orcid.org/0000-0002-4387-3819 + affiliation: Lawrence Livermore National Laboratory + - family-names: Kornel + given-names: Karl + orcid: https://orcid.org/0000-0001-5847-5330 + affiliation: Stanford Research Computing Center + - family-names: Spaaks + given-names: Jurriaan H. + orcid: https://orcid.org/0000-0002-7064-4069 + affiliation: Netherlands eScience Center + - family-names: Mack + given-names: Steven J. + orcid: https://orcid.org/0000-0001-9820-9547 + affiliation: University of California, San Francisco + - family-names: Thomson + given-names: Glenys + orcid: https://orcid.org/0000-0001-5235-4159 + affiliation: University of California, Berkeley +title: 'PyPop: Python for Population Genomics' +url: http://pypop.org/ +repository-code: https://github.com/alexlancaster/pypop +repository-artifact: https://pypi.org/project/pypop-genomics/ +type: software +license: GPL-2.0-or-later +version: v1.1.1 +doi: 10.5281/zenodo.13742984 +keywords: + - population genetics + - population genomics + - bioinformatics + - computational biology + - evolutionary biology + - Human leukocyte antigen + - Major histocompatibility complex + - HLA + - MHC diff --git a/src/PyPop/citation/citation.codemeta b/src/PyPop/citation/citation.codemeta new file mode 100644 index 000000000..165ee514b --- /dev/null +++ b/src/PyPop/citation/citation.codemeta @@ -0,0 +1,149 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "@type": "SoftwareSourceCode", + "author": [ + { + "@id": "https://orcid.org/0000-0002-0002-9263", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Amber Biology LLC and Ronin Institute" + }, + "familyName": "Lancaster", + "givenName": "Alexander K." + }, + { + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, Berkeley" + }, + "familyName": "Nelson", + "givenName": "Mark P." + }, + { + "@id": "https://orcid.org/0000-0001-6054-6505", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of Vermont" + }, + "familyName": "Single", + "givenName": "Richard" + }, + { + "@id": "https://orcid.org/0000-0003-3060-9709", + "@type": "Person", + "familyName": "Solberg", + "givenName": "Owen" + }, + { + "@id": "https://orcid.org/0009-0006-0162-6066", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, Berkeley" + }, + "familyName": "Tsai", + "givenName": "Yingsu" + }, + { + "@id": "https://orcid.org/0000-0002-7155-5674", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of São Paulo" + }, + "familyName": "Meyer", + "givenName": "Diogo" + }, + { + "@id": "https://orcid.org/0009-0009-2862-0467", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Amber Biology LLC" + }, + "familyName": "Webster", + "givenName": "Gordon" + }, + { + "@id": "https://orcid.org/0000-0001-5852-0517", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Mariani Systems LLC and University of Vermont" + }, + "familyName": "Mariani", + "givenName": "Michael P." + }, + { + "@id": "https://orcid.org/0000-0002-4387-3819", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Lawrence Livermore National Laboratory" + }, + "familyName": "Sochat", + "givenName": "Vanessa" + }, + { + "@id": "https://orcid.org/0000-0001-5847-5330", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Stanford Research Computing Center" + }, + "familyName": "Kornel", + "givenName": "Karl" + }, + { + "@id": "https://orcid.org/0000-0002-7064-4069", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Netherlands eScience Center" + }, + "familyName": "Spaaks", + "givenName": "Jurriaan H." + }, + { + "@id": "https://orcid.org/0000-0001-9820-9547", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, San Francisco" + }, + "familyName": "Mack", + "givenName": "Steven J." + }, + { + "@id": "https://orcid.org/0000-0001-5235-4159", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, Berkeley" + }, + "familyName": "Thomson", + "givenName": "Glenys" + } + ], + "codeRepository": "https://github.com/alexlancaster/pypop", + "description": "PyPop for Population Genomics (PyPop) is a Python program for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). Output of analyses are stored in XML format for maximum downstream flexibility. PyPop also has an internal facility for additionally aggregating the output XML and generating output tab-separated (TSV) files, as well as default plain text files for each population. Although it can be run on any kind of genotype data, it has additional support for analyzing population genotype with allelic nomenclature from the human leukocyte antigen (HLA) region.", + "identifier": "https://doi.org/10.5281/zenodo.13742984", + "keywords": [ + "population genetics", + "population genomics", + "bioinformatics", + "computational biology", + "evolutionary biology", + "Human leukocyte antigen", + "Major histocompatibility complex", + "HLA", + "MHC" + ], + "license": "https://spdx.org/licenses/GPL-2.0-or-later", + "name": "PyPop: Python for Population Genomics", + "url": "http://pypop.org/", + "version": "v1.1.1" +} diff --git a/src/PyPop/citation/citation.endnote b/src/PyPop/citation/citation.endnote new file mode 100644 index 000000000..2a2e87d47 --- /dev/null +++ b/src/PyPop/citation/citation.endnote @@ -0,0 +1,26 @@ +%0 Generic +%A Lancaster, Alexander K. +%A Nelson, Mark P. +%A Single, Richard +%A Solberg, Owen +%A Tsai, Yingsu +%A Meyer, Diogo +%A Webster, Gordon +%A Mariani, Michael P. +%A Sochat, Vanessa +%A Kornel, Karl +%A Spaaks, Jurriaan H. +%A Mack, Steven J. +%A Thomson, Glenys +%K population genetics +%K population genomics +%K bioinformatics +%K computational biology +%K evolutionary biology +%K Human leukocyte antigen +%K Major histocompatibility complex +%K HLA +%K MHC +%R 10.5281/zenodo.13742984 +%T PyPop: Python for Population Genomics +%U http://pypop.org/ diff --git a/src/PyPop/citation/citation.ris b/src/PyPop/citation/citation.ris new file mode 100644 index 000000000..dc035f76e --- /dev/null +++ b/src/PyPop/citation/citation.ris @@ -0,0 +1,28 @@ +TY - GEN +AB - PyPop for Population Genomics (PyPop) is a Python program for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). Output of analyses are stored in XML format for maximum downstream flexibility. PyPop also has an internal facility for additionally aggregating the output XML and generating output tab-separated (TSV) files, as well as default plain text files for each population. Although it can be run on any kind of genotype data, it has additional support for analyzing population genotype with allelic nomenclature from the human leukocyte antigen (HLA) region. +AU - Lancaster, Alexander K. +AU - Nelson, Mark P. +AU - Single, Richard +AU - Solberg, Owen +AU - Tsai, Yingsu +AU - Meyer, Diogo +AU - Webster, Gordon +AU - Mariani, Michael P. +AU - Sochat, Vanessa +AU - Kornel, Karl +AU - Spaaks, Jurriaan H. +AU - Mack, Steven J. +AU - Thomson, Glenys +DO - 10.5281/zenodo.13742984 +KW - population genetics +KW - population genomics +KW - bioinformatics +KW - computational biology +KW - evolutionary biology +KW - Human leukocyte antigen +KW - Major histocompatibility complex +KW - HLA +KW - MHC +TI - PyPop: Python for Population Genomics +UR - http://pypop.org/ +ER From 41632f693b399d2dbbb7be9694d57120fe399a60 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:28:16 -0500 Subject: [PATCH 31/37] wrong prefix --- src/PyPop/citation/citation.apalike | 1 - src/PyPop/citation/citation.bibtex | 7 -- src/PyPop/citation/citation.cff | 88 ---------------- src/PyPop/citation/citation.codemeta | 149 --------------------------- src/PyPop/citation/citation.endnote | 26 ----- src/PyPop/citation/citation.ris | 28 ----- 6 files changed, 299 deletions(-) delete mode 100644 src/PyPop/citation/citation.apalike delete mode 100644 src/PyPop/citation/citation.bibtex delete mode 100644 src/PyPop/citation/citation.cff delete mode 100644 src/PyPop/citation/citation.codemeta delete mode 100644 src/PyPop/citation/citation.endnote delete mode 100644 src/PyPop/citation/citation.ris diff --git a/src/PyPop/citation/citation.apalike b/src/PyPop/citation/citation.apalike deleted file mode 100644 index fed3aa640..000000000 --- a/src/PyPop/citation/citation.apalike +++ /dev/null @@ -1 +0,0 @@ -Lancaster A.K., Nelson M.P., Single R., Solberg O., Tsai Y., Meyer D., Webster G., Mariani M.P., Sochat V., Kornel K., Spaaks J.H., Mack S.J., and Thomson G. PyPop: Python for Population Genomics (version v1.1.1). DOI: 10.5281/zenodo.13742984 URL: http://pypop.org/ diff --git a/src/PyPop/citation/citation.bibtex b/src/PyPop/citation/citation.bibtex deleted file mode 100644 index ee78b779a..000000000 --- a/src/PyPop/citation/citation.bibtex +++ /dev/null @@ -1,7 +0,0 @@ -@misc{YourReferenceHere, -author = {Lancaster, Alexander K. and Nelson, Mark P. and Single, Richard and Solberg, Owen and Tsai, Yingsu and Meyer, Diogo and Webster, Gordon and Mariani, Michael P. and Sochat, Vanessa and Kornel, Karl and Spaaks, Jurriaan H. and Mack, Steven J. and Thomson, Glenys}, -doi = {10.5281/zenodo.13742984}, -title = {PyPop: Python for Population Genomics}, -url = {http://pypop.org/}, -note = {If you use this software, please cite both the software itself, as well as the article Lancaster AK et al. (2024) PyPop: A mature open-source software pipeline for population genomics. Front. Immunol. 15:1378512. doi: 10.3389/fimmu.2024.1378512} -} diff --git a/src/PyPop/citation/citation.cff b/src/PyPop/citation/citation.cff deleted file mode 100644 index 2bedbe194..000000000 --- a/src/PyPop/citation/citation.cff +++ /dev/null @@ -1,88 +0,0 @@ -cff-version: 1.2.0 -message: >- - If you use this software, please cite both the software itself, as well as the - article Lancaster AK et al. (2024) PyPop: A mature - open-source software pipeline for population genomics. Front. - Immunol. 15:1378512. doi: 10.3389/fimmu.2024.1378512 -abstract: >- - PyPop for Population Genomics (PyPop) is a Python program for processing - genotype and allele data and running population genetic analyses, including - conformity to Hardy-Weinberg expectations; tests for balancing or directional - selection; estimates of haplotype frequencies and measures and tests of - significance for linkage disequilibrium (LD). Output of analyses are - stored in XML format for maximum downstream flexibility. PyPop also has an - internal facility for additionally aggregating the output XML and generating - output tab-separated (TSV) files, as well as default plain text files for each - population. Although it can be run on any kind of genotype data, it has - additional support for analyzing population genotype with allelic nomenclature - from the human leukocyte antigen (HLA) region. -authors: - - family-names: Lancaster - given-names: Alexander K. - orcid: https://orcid.org/0000-0002-0002-9263 - affiliation: Amber Biology LLC and Ronin Institute - - family-names: Nelson - given-names: Mark P. - affiliation: University of California, Berkeley - - family-names: Single - given-names: Richard - orcid: https://orcid.org/0000-0001-6054-6505 - affiliation: University of Vermont - - family-names: Solberg - given-names: Owen - orcid: https://orcid.org/0000-0003-3060-9709 - - family-names: Tsai - given-names: Yingsu - affiliation: University of California, Berkeley - orcid: https://orcid.org/0009-0006-0162-6066 - - family-names: Meyer - given-names: Diogo - orcid: https://orcid.org/0000-0002-7155-5674 - affiliation: University of São Paulo - - family-names: Webster - given-names: Gordon - affiliation: Amber Biology LLC - orcid: https://orcid.org/0009-0009-2862-0467 - - family-names: Mariani - given-names: Michael P. - orcid: https://orcid.org/0000-0001-5852-0517 - affiliation: Mariani Systems LLC and University of Vermont - - family-names: Sochat - given-names: Vanessa - orcid: https://orcid.org/0000-0002-4387-3819 - affiliation: Lawrence Livermore National Laboratory - - family-names: Kornel - given-names: Karl - orcid: https://orcid.org/0000-0001-5847-5330 - affiliation: Stanford Research Computing Center - - family-names: Spaaks - given-names: Jurriaan H. - orcid: https://orcid.org/0000-0002-7064-4069 - affiliation: Netherlands eScience Center - - family-names: Mack - given-names: Steven J. - orcid: https://orcid.org/0000-0001-9820-9547 - affiliation: University of California, San Francisco - - family-names: Thomson - given-names: Glenys - orcid: https://orcid.org/0000-0001-5235-4159 - affiliation: University of California, Berkeley -title: 'PyPop: Python for Population Genomics' -url: http://pypop.org/ -repository-code: https://github.com/alexlancaster/pypop -repository-artifact: https://pypi.org/project/pypop-genomics/ -type: software -license: GPL-2.0-or-later -version: v1.1.1 -doi: 10.5281/zenodo.13742984 -keywords: - - population genetics - - population genomics - - bioinformatics - - computational biology - - evolutionary biology - - Human leukocyte antigen - - Major histocompatibility complex - - HLA - - MHC diff --git a/src/PyPop/citation/citation.codemeta b/src/PyPop/citation/citation.codemeta deleted file mode 100644 index 165ee514b..000000000 --- a/src/PyPop/citation/citation.codemeta +++ /dev/null @@ -1,149 +0,0 @@ -{ - "@context": "https://doi.org/10.5063/schema/codemeta-2.0", - "@type": "SoftwareSourceCode", - "author": [ - { - "@id": "https://orcid.org/0000-0002-0002-9263", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "Amber Biology LLC and Ronin Institute" - }, - "familyName": "Lancaster", - "givenName": "Alexander K." - }, - { - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "University of California, Berkeley" - }, - "familyName": "Nelson", - "givenName": "Mark P." - }, - { - "@id": "https://orcid.org/0000-0001-6054-6505", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "University of Vermont" - }, - "familyName": "Single", - "givenName": "Richard" - }, - { - "@id": "https://orcid.org/0000-0003-3060-9709", - "@type": "Person", - "familyName": "Solberg", - "givenName": "Owen" - }, - { - "@id": "https://orcid.org/0009-0006-0162-6066", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "University of California, Berkeley" - }, - "familyName": "Tsai", - "givenName": "Yingsu" - }, - { - "@id": "https://orcid.org/0000-0002-7155-5674", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "University of São Paulo" - }, - "familyName": "Meyer", - "givenName": "Diogo" - }, - { - "@id": "https://orcid.org/0009-0009-2862-0467", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "Amber Biology LLC" - }, - "familyName": "Webster", - "givenName": "Gordon" - }, - { - "@id": "https://orcid.org/0000-0001-5852-0517", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "Mariani Systems LLC and University of Vermont" - }, - "familyName": "Mariani", - "givenName": "Michael P." - }, - { - "@id": "https://orcid.org/0000-0002-4387-3819", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "Lawrence Livermore National Laboratory" - }, - "familyName": "Sochat", - "givenName": "Vanessa" - }, - { - "@id": "https://orcid.org/0000-0001-5847-5330", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "Stanford Research Computing Center" - }, - "familyName": "Kornel", - "givenName": "Karl" - }, - { - "@id": "https://orcid.org/0000-0002-7064-4069", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "Netherlands eScience Center" - }, - "familyName": "Spaaks", - "givenName": "Jurriaan H." - }, - { - "@id": "https://orcid.org/0000-0001-9820-9547", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "University of California, San Francisco" - }, - "familyName": "Mack", - "givenName": "Steven J." - }, - { - "@id": "https://orcid.org/0000-0001-5235-4159", - "@type": "Person", - "affiliation": { - "@type": "Organization", - "name": "University of California, Berkeley" - }, - "familyName": "Thomson", - "givenName": "Glenys" - } - ], - "codeRepository": "https://github.com/alexlancaster/pypop", - "description": "PyPop for Population Genomics (PyPop) is a Python program for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). Output of analyses are stored in XML format for maximum downstream flexibility. PyPop also has an internal facility for additionally aggregating the output XML and generating output tab-separated (TSV) files, as well as default plain text files for each population. Although it can be run on any kind of genotype data, it has additional support for analyzing population genotype with allelic nomenclature from the human leukocyte antigen (HLA) region.", - "identifier": "https://doi.org/10.5281/zenodo.13742984", - "keywords": [ - "population genetics", - "population genomics", - "bioinformatics", - "computational biology", - "evolutionary biology", - "Human leukocyte antigen", - "Major histocompatibility complex", - "HLA", - "MHC" - ], - "license": "https://spdx.org/licenses/GPL-2.0-or-later", - "name": "PyPop: Python for Population Genomics", - "url": "http://pypop.org/", - "version": "v1.1.1" -} diff --git a/src/PyPop/citation/citation.endnote b/src/PyPop/citation/citation.endnote deleted file mode 100644 index 2a2e87d47..000000000 --- a/src/PyPop/citation/citation.endnote +++ /dev/null @@ -1,26 +0,0 @@ -%0 Generic -%A Lancaster, Alexander K. -%A Nelson, Mark P. -%A Single, Richard -%A Solberg, Owen -%A Tsai, Yingsu -%A Meyer, Diogo -%A Webster, Gordon -%A Mariani, Michael P. -%A Sochat, Vanessa -%A Kornel, Karl -%A Spaaks, Jurriaan H. -%A Mack, Steven J. -%A Thomson, Glenys -%K population genetics -%K population genomics -%K bioinformatics -%K computational biology -%K evolutionary biology -%K Human leukocyte antigen -%K Major histocompatibility complex -%K HLA -%K MHC -%R 10.5281/zenodo.13742984 -%T PyPop: Python for Population Genomics -%U http://pypop.org/ diff --git a/src/PyPop/citation/citation.ris b/src/PyPop/citation/citation.ris deleted file mode 100644 index dc035f76e..000000000 --- a/src/PyPop/citation/citation.ris +++ /dev/null @@ -1,28 +0,0 @@ -TY - GEN -AB - PyPop for Population Genomics (PyPop) is a Python program for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). Output of analyses are stored in XML format for maximum downstream flexibility. PyPop also has an internal facility for additionally aggregating the output XML and generating output tab-separated (TSV) files, as well as default plain text files for each population. Although it can be run on any kind of genotype data, it has additional support for analyzing population genotype with allelic nomenclature from the human leukocyte antigen (HLA) region. -AU - Lancaster, Alexander K. -AU - Nelson, Mark P. -AU - Single, Richard -AU - Solberg, Owen -AU - Tsai, Yingsu -AU - Meyer, Diogo -AU - Webster, Gordon -AU - Mariani, Michael P. -AU - Sochat, Vanessa -AU - Kornel, Karl -AU - Spaaks, Jurriaan H. -AU - Mack, Steven J. -AU - Thomson, Glenys -DO - 10.5281/zenodo.13742984 -KW - population genetics -KW - population genomics -KW - bioinformatics -KW - computational biology -KW - evolutionary biology -KW - Human leukocyte antigen -KW - Major histocompatibility complex -KW - HLA -KW - MHC -TI - PyPop: Python for Population Genomics -UR - http://pypop.org/ -ER From 7cf6026a587168b41267bcfd3a84b7d23e1abd5f Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:29:20 -0500 Subject: [PATCH 32/37] use `CITATION` not `citation` as file prefix --- .github/actions/update_citations/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/update_citations/action.yml b/.github/actions/update_citations/action.yml index 072e467ea..9bce668d7 100644 --- a/.github/actions/update_citations/action.yml +++ b/.github/actions/update_citations/action.yml @@ -36,7 +36,7 @@ runs: formats="${{ steps.extract_formats.outputs.formats }}" IFS=',' read -r -a formats_array <<< "$formats" for format in "${formats_array[@]}"; do - cffconvert --infile CITATION.cff --outfile "${{ inputs.CITATION_DIR }}/citation.${format}" --format "$format" + cffconvert --infile CITATION.cff --outfile "${{ inputs.CITATION_DIR }}/CITATION.${format}" --format "$format" done shell: bash From bd27f92c8e75a03a2bd98273f75eed707c1e283a Mon Sep 17 00:00:00 2001 From: alexlancaster Date: Wed, 13 Nov 2024 07:29:51 +0000 Subject: [PATCH 33/37] Auto-update citation files based on CITATION.cff --- src/PyPop/citation/CITATION.apalike | 1 + src/PyPop/citation/CITATION.bibtex | 7 ++ src/PyPop/citation/CITATION.codemeta | 149 +++++++++++++++++++++++++++ src/PyPop/citation/CITATION.endnote | 26 +++++ src/PyPop/citation/CITATION.ris | 28 +++++ 5 files changed, 211 insertions(+) create mode 100644 src/PyPop/citation/CITATION.apalike create mode 100644 src/PyPop/citation/CITATION.bibtex create mode 100644 src/PyPop/citation/CITATION.codemeta create mode 100644 src/PyPop/citation/CITATION.endnote create mode 100644 src/PyPop/citation/CITATION.ris diff --git a/src/PyPop/citation/CITATION.apalike b/src/PyPop/citation/CITATION.apalike new file mode 100644 index 000000000..fed3aa640 --- /dev/null +++ b/src/PyPop/citation/CITATION.apalike @@ -0,0 +1 @@ +Lancaster A.K., Nelson M.P., Single R., Solberg O., Tsai Y., Meyer D., Webster G., Mariani M.P., Sochat V., Kornel K., Spaaks J.H., Mack S.J., and Thomson G. PyPop: Python for Population Genomics (version v1.1.1). DOI: 10.5281/zenodo.13742984 URL: http://pypop.org/ diff --git a/src/PyPop/citation/CITATION.bibtex b/src/PyPop/citation/CITATION.bibtex new file mode 100644 index 000000000..ee78b779a --- /dev/null +++ b/src/PyPop/citation/CITATION.bibtex @@ -0,0 +1,7 @@ +@misc{YourReferenceHere, +author = {Lancaster, Alexander K. and Nelson, Mark P. and Single, Richard and Solberg, Owen and Tsai, Yingsu and Meyer, Diogo and Webster, Gordon and Mariani, Michael P. and Sochat, Vanessa and Kornel, Karl and Spaaks, Jurriaan H. and Mack, Steven J. and Thomson, Glenys}, +doi = {10.5281/zenodo.13742984}, +title = {PyPop: Python for Population Genomics}, +url = {http://pypop.org/}, +note = {If you use this software, please cite both the software itself, as well as the article Lancaster AK et al. (2024) PyPop: A mature open-source software pipeline for population genomics. Front. Immunol. 15:1378512. doi: 10.3389/fimmu.2024.1378512} +} diff --git a/src/PyPop/citation/CITATION.codemeta b/src/PyPop/citation/CITATION.codemeta new file mode 100644 index 000000000..165ee514b --- /dev/null +++ b/src/PyPop/citation/CITATION.codemeta @@ -0,0 +1,149 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "@type": "SoftwareSourceCode", + "author": [ + { + "@id": "https://orcid.org/0000-0002-0002-9263", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Amber Biology LLC and Ronin Institute" + }, + "familyName": "Lancaster", + "givenName": "Alexander K." + }, + { + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, Berkeley" + }, + "familyName": "Nelson", + "givenName": "Mark P." + }, + { + "@id": "https://orcid.org/0000-0001-6054-6505", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of Vermont" + }, + "familyName": "Single", + "givenName": "Richard" + }, + { + "@id": "https://orcid.org/0000-0003-3060-9709", + "@type": "Person", + "familyName": "Solberg", + "givenName": "Owen" + }, + { + "@id": "https://orcid.org/0009-0006-0162-6066", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, Berkeley" + }, + "familyName": "Tsai", + "givenName": "Yingsu" + }, + { + "@id": "https://orcid.org/0000-0002-7155-5674", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of São Paulo" + }, + "familyName": "Meyer", + "givenName": "Diogo" + }, + { + "@id": "https://orcid.org/0009-0009-2862-0467", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Amber Biology LLC" + }, + "familyName": "Webster", + "givenName": "Gordon" + }, + { + "@id": "https://orcid.org/0000-0001-5852-0517", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Mariani Systems LLC and University of Vermont" + }, + "familyName": "Mariani", + "givenName": "Michael P." + }, + { + "@id": "https://orcid.org/0000-0002-4387-3819", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Lawrence Livermore National Laboratory" + }, + "familyName": "Sochat", + "givenName": "Vanessa" + }, + { + "@id": "https://orcid.org/0000-0001-5847-5330", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Stanford Research Computing Center" + }, + "familyName": "Kornel", + "givenName": "Karl" + }, + { + "@id": "https://orcid.org/0000-0002-7064-4069", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "Netherlands eScience Center" + }, + "familyName": "Spaaks", + "givenName": "Jurriaan H." + }, + { + "@id": "https://orcid.org/0000-0001-9820-9547", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, San Francisco" + }, + "familyName": "Mack", + "givenName": "Steven J." + }, + { + "@id": "https://orcid.org/0000-0001-5235-4159", + "@type": "Person", + "affiliation": { + "@type": "Organization", + "name": "University of California, Berkeley" + }, + "familyName": "Thomson", + "givenName": "Glenys" + } + ], + "codeRepository": "https://github.com/alexlancaster/pypop", + "description": "PyPop for Population Genomics (PyPop) is a Python program for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). Output of analyses are stored in XML format for maximum downstream flexibility. PyPop also has an internal facility for additionally aggregating the output XML and generating output tab-separated (TSV) files, as well as default plain text files for each population. Although it can be run on any kind of genotype data, it has additional support for analyzing population genotype with allelic nomenclature from the human leukocyte antigen (HLA) region.", + "identifier": "https://doi.org/10.5281/zenodo.13742984", + "keywords": [ + "population genetics", + "population genomics", + "bioinformatics", + "computational biology", + "evolutionary biology", + "Human leukocyte antigen", + "Major histocompatibility complex", + "HLA", + "MHC" + ], + "license": "https://spdx.org/licenses/GPL-2.0-or-later", + "name": "PyPop: Python for Population Genomics", + "url": "http://pypop.org/", + "version": "v1.1.1" +} diff --git a/src/PyPop/citation/CITATION.endnote b/src/PyPop/citation/CITATION.endnote new file mode 100644 index 000000000..2a2e87d47 --- /dev/null +++ b/src/PyPop/citation/CITATION.endnote @@ -0,0 +1,26 @@ +%0 Generic +%A Lancaster, Alexander K. +%A Nelson, Mark P. +%A Single, Richard +%A Solberg, Owen +%A Tsai, Yingsu +%A Meyer, Diogo +%A Webster, Gordon +%A Mariani, Michael P. +%A Sochat, Vanessa +%A Kornel, Karl +%A Spaaks, Jurriaan H. +%A Mack, Steven J. +%A Thomson, Glenys +%K population genetics +%K population genomics +%K bioinformatics +%K computational biology +%K evolutionary biology +%K Human leukocyte antigen +%K Major histocompatibility complex +%K HLA +%K MHC +%R 10.5281/zenodo.13742984 +%T PyPop: Python for Population Genomics +%U http://pypop.org/ diff --git a/src/PyPop/citation/CITATION.ris b/src/PyPop/citation/CITATION.ris new file mode 100644 index 000000000..dc035f76e --- /dev/null +++ b/src/PyPop/citation/CITATION.ris @@ -0,0 +1,28 @@ +TY - GEN +AB - PyPop for Population Genomics (PyPop) is a Python program for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). Output of analyses are stored in XML format for maximum downstream flexibility. PyPop also has an internal facility for additionally aggregating the output XML and generating output tab-separated (TSV) files, as well as default plain text files for each population. Although it can be run on any kind of genotype data, it has additional support for analyzing population genotype with allelic nomenclature from the human leukocyte antigen (HLA) region. +AU - Lancaster, Alexander K. +AU - Nelson, Mark P. +AU - Single, Richard +AU - Solberg, Owen +AU - Tsai, Yingsu +AU - Meyer, Diogo +AU - Webster, Gordon +AU - Mariani, Michael P. +AU - Sochat, Vanessa +AU - Kornel, Karl +AU - Spaaks, Jurriaan H. +AU - Mack, Steven J. +AU - Thomson, Glenys +DO - 10.5281/zenodo.13742984 +KW - population genetics +KW - population genomics +KW - bioinformatics +KW - computational biology +KW - evolutionary biology +KW - Human leukocyte antigen +KW - Major histocompatibility complex +KW - HLA +KW - MHC +TI - PyPop: Python for Population Genomics +UR - http://pypop.org/ +ER From 872533142afe5384faef0987873009b146991f49 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:39:23 -0500 Subject: [PATCH 34/37] read from files in repo, statically generated by action --- pyproject.toml | 2 +- setup.py | 4 +++- src/PyPop/CommandLineInterface.py | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 982350209..641070d72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,7 @@ write_to = "src/PyPop/_version.py" # matches the path where version will be wri build-backend = "setuptools.build_meta:__legacy__" requires = ["setuptools>=42", "setuptools_scm[toml]>=6.2", - "cffconvert @ git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert", + # "cffconvert @ git+https://github.com/alexlancaster/cffconvert.git@combine_features#egg=cffconvert", "importlib-metadata; python_version <= '3.8'" ] diff --git a/setup.py b/setup.py index 0ad8b1b26..56c06d771 100644 --- a/setup.py +++ b/setup.py @@ -225,6 +225,7 @@ def path_to_src(source_path_list): citation_files = [os.path.join("citation", 'CITATION.' + suffix) for suffix in citation_output_formats] citation_data_file_paths.extend(citation_files) +# currently disabled (these are built in a github action) class CustomBuildPy(_build_py): def run(self): @@ -317,6 +318,7 @@ def run(self): }, ext_modules=extensions, cmdclass={'clean': CleanCommand, - 'build_py': CustomBuildPy, + # disable the custom build + # 'build_py': CustomBuildPy, }, ) diff --git a/src/PyPop/CommandLineInterface.py b/src/PyPop/CommandLineInterface.py index 8179f37f1..2d410cff9 100644 --- a/src/PyPop/CommandLineInterface.py +++ b/src/PyPop/CommandLineInterface.py @@ -50,21 +50,21 @@ class CitationAction(Action): def __call__(self, parser, namespace, values, option_string=None): citation_format = values or 'apalike' + citation_file_name = f'citation/CITATION.{citation_format}' try: # looking in installed package from importlib.resources import files - citation_file = files('PyPop').joinpath(f'citation/CITATION.{citation_format}') + citation_file = files('PyPop').joinpath(citation_file_name) citation_text = citation_file.read_text() except (ModuleNotFoundError, ImportError, FileNotFoundError): # fallback to using backport if not found try: from importlib_resources import files - citation_file = files('PyPop').joinpath(f'citation/CITATION.{citation_format}') + citation_file = files('PyPop').joinpath(citation_file_name) citation_text = citation_file.read_text() except (ModuleNotFoundError, ImportError, FileNotFoundError): # fallback to looking in current directory if running from repo - top_level_dir = Path(__file__).resolve().parent.parent.parent - citation_file = top_level_dir / 'CITATION.cff' + pypop_dir = Path(__file__).resolve().parent + citation_file = pypop_dir / citation_file_name - print("if package is not installed or is an editable package, only CITATION.cff will be available\n") if citation_file.exists(): citation_text = citation_file.read_text() else: From 2e3a83cc75e49cf81e2636f1f3f80cf98bae4177 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:46:54 -0500 Subject: [PATCH 35/37] note to end-user to not modify files directly --- src/PyPop/citation/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/PyPop/citation/README.md diff --git a/src/PyPop/citation/README.md b/src/PyPop/citation/README.md new file mode 100644 index 000000000..ed36905ac --- /dev/null +++ b/src/PyPop/citation/README.md @@ -0,0 +1 @@ +# DO NOT MODIFY THESE FILES - they are automatically generated from the top-level [`CITATION.cff`](../../../CITATION.cff) by a GitHub Action. From 77c3cad6c5c727749a5d4b08db91176f1777f846 Mon Sep 17 00:00:00 2001 From: Alex Lancaster Date: Wed, 13 Nov 2024 02:50:12 -0500 Subject: [PATCH 36/37] tweak --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 2bedbe194..d60f9ee2b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -70,8 +70,8 @@ authors: affiliation: University of California, Berkeley title: 'PyPop: Python for Population Genomics' url: http://pypop.org/ -repository-code: https://github.com/alexlancaster/pypop repository-artifact: https://pypi.org/project/pypop-genomics/ +repository-code: https://github.com/alexlancaster/pypop type: software license: GPL-2.0-or-later version: v1.1.1 From f0788f4fa334245dc80e81388884552818687fb9 Mon Sep 17 00:00:00 2001 From: alexlancaster Date: Wed, 13 Nov 2024 07:50:45 +0000 Subject: [PATCH 37/37] Auto-update citation files based on CITATION.cff --- src/PyPop/citation/CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PyPop/citation/CITATION.cff b/src/PyPop/citation/CITATION.cff index 2bedbe194..d60f9ee2b 100644 --- a/src/PyPop/citation/CITATION.cff +++ b/src/PyPop/citation/CITATION.cff @@ -70,8 +70,8 @@ authors: affiliation: University of California, Berkeley title: 'PyPop: Python for Population Genomics' url: http://pypop.org/ -repository-code: https://github.com/alexlancaster/pypop repository-artifact: https://pypi.org/project/pypop-genomics/ +repository-code: https://github.com/alexlancaster/pypop type: software license: GPL-2.0-or-later version: v1.1.1