-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/output-citation' into citation-c…
…ff-zenodo
- Loading branch information
Showing
13 changed files
with
396 additions
and
9 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,47 @@ | ||
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' | ||
|
||
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]) | ||
print(f"::set-output name=formats::{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: | | ||
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 | ||
shell: bash | ||
|
||
- 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 }}/*" |
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,34 @@ | ||
name: Update citations upon CITATION.cff changes | ||
|
||
on: | ||
push: | ||
paths: | ||
- CITATION.cff | ||
- '.github/workflows/run_citations.yml' | ||
- '.github/actions/update_citations/action.yml' | ||
|
||
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 | ||
- name: Runs composite action | ||
uses: ./.github/actions/update_citations | ||
with: | ||
CITATION_DIR: 'src/PyPop/citation' | ||
INIT_FILE: 'src/PyPop/__init__.py' | ||
|
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 @@ | ||
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/ |
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,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) <a href=\"https://doi.org/10.3389/fimmu.2024.1378512\">PyPop: A mature open-source software pipeline for population genomics</a>. <i>Front. Immunol.</i> <b>15</b>:1378512. doi: 10.3389/fimmu.2024.1378512} | ||
} |
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,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) <a | ||
href=\"https://doi.org/10.3389/fimmu.2024.1378512\">PyPop: A mature | ||
open-source software pipeline for population genomics</a>. <i>Front. | ||
Immunol.</i> <b>15</b>: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 | ||
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 |
Oops, something went wrong.