Skip to content

Commit

Permalink
[chore,doc] update release job, add biorxiv link
Browse files Browse the repository at this point in the history
[doc]

update readme.md citation info and biorxiv links

[chore]

change version git describe command to exclude the version tag; avoids the cases
like v1.0.0-v1.0.0

add github issue templates for bug report and feature request
  • Loading branch information
isinaltinkaya committed Apr 10, 2024
1 parent ea211f3 commit 93c918d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 43 deletions.
55 changes: 47 additions & 8 deletions .github/workflows/release.yml
Expand Up @@ -9,7 +9,7 @@ env:
tag: ${{ github.ref_name }}
jobs:
release:
name: Prepare for new release
name: Prepare new release
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -21,7 +21,7 @@ jobs:
sudo apt-get update; sudo apt-get install libcurl4-openssl-dev
- name: Download the program version associated with this release
run: |
git clone --depth 1 --branch "${tag}" https://oauth2:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY_OWNER}/${GITHUB_REPOSITORY#*/}.git
git clone --depth 1 --branch "${tag}" https://oauth2:"${GITHUB_TOKEN}"@github.com/"${GITHUB_REPOSITORY_OWNER}"/"${GITHUB_REPOSITORY#*/}".git
- name: Build release tarball
run: |
HTSLIB_LATEST=$(curl -s https://api.github.com/repos/samtools/htslib/releases/latest | jq -r '.assets[].browser_download_url');
Expand All @@ -30,21 +30,24 @@ jobs:
HTSLIBDIR=${HTSLIB_LATEST##*/}
tar -xvkf ${HTSLIBDIR}
mv -v ${HTSLIBDIR%.tar.bz2} htslib
TAR=${GITHUB_REPOSITORY#*/}-${tag#v}.tar.gz
tar --exclude='./.git*' -cvf ${TAR} ${GITHUB_REPOSITORY#*/} htslib/
PROGRAM=${GITHUB_REPOSITORY#*/}
TAR=${PROGRAM}-${tag#v}.tar.gz
tar --exclude="./${PROGRAM}/.git" --exclude="${PROGRAM}/.github" --exclude="${PROGRAM}/.htslib" -cvf ${TAR} ${PROGRAM}/ htslib/
- name: Test release tarball
run: |
TAR=${GITHUB_REPOSITORY#*/}-${tag#v}.tar.gz
TESTDIR=tarball_test
MAINDIR=${PWD}
mkdir -pv ${TESTDIR}
cp ${TAR} ${TESTDIR}/
cd ${TESTDIR}
tar xf ${TAR}
tar xf ${TAR}
cd htslib
make
cd ../${GITHUB_REPOSITORY#*/}
make
cd ../${GITHUB_REPOSITORY#*/}
make HTSSRC=../htslib
make test
cd ${MAINDIR}
- name: Create a new draft release with the release tarball
shell: bash
run: |
Expand All @@ -54,4 +57,40 @@ jobs:
--repo="${GITHUB_REPOSITORY}" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
"${GITHUB_REPOSITORY#*/}-${tag#v}".tar.gz
- name: Edit the release text
shell: bash
run: |
PROGRAM=${GITHUB_REPOSITORY#*/}
printf '%b' "## Installation:\n" >> release_note.MD
printf '%b' "### Step 1: Download the release \n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
printf '%b' "> [!TIP] \n" >> release_note.MD
printf '%b' "> * Download the release by clicking the link below :\n" >> release_note.MD
printf '%b' "> [""${PROGRAM}""-""${tag#v}"".tar.gz](https://github.com/""${GITHUB_REPOSITORY_OWNER}""/""${PROGRAM}""/releases/download/""${tag}""/""${PROGRAM}""-""${tag#v}"".tar.gz)\n" >> release_note.MD
printf '%b' "> > or\n" >> release_note.MD
printf '%b' "> * Download the release from command-line: \n" >> release_note.MD
printf '%b' "> \`\`\`\n" >> release_note.MD
printf '%b' "> wget https://github.com/""${GITHUB_REPOSITORY_OWNER}""/""${PROGRAM}""/releases/download/""${tag}""/""${PROGRAM}""-""${tag#v}"".tar.gz\n" >> release_note.MD
printf '%b' "> \`\`\`\n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
printf '%b' "### Step 2: Build\n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
printf '%b' ">[!TIP]\n" >> release_note.MD
printf '%b' "> \`\`\`\n" >> release_note.MD
printf '%b' "> tar xf ""${PROGRAM}""-""${tag#v}"".tar.gz;\n" >> release_note.MD
printf '%b' "> cd htslib; \n" >> release_note.MD
printf '%b' "> make;\n" >> release_note.MD
printf '%b' "> cd ../""${PROGRAM}"";\n" >> release_note.MD
printf '%b' "> make HTSSRC=../htslib;\n" >> release_note.MD
printf '%b' "> \`\`\`\n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
printf '%b' "___ \n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
printf '%b' "\n" >> release_note.MD
gh release edit "${tag}" \
--repo="${GITHUB_REPOSITORY}" \
--verify-tag \
--latest \
--draft=false \
--notes-file release_note.MD
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -224,7 +224,7 @@ FLAGS := $(CPPFLAGS) $(CXXFLAGS)
# Versioning
VERSIONNO = 1.0.0

VERSION := v$(VERSIONNO)-$(shell git describe --always)
VERSION := v$(VERSIONNO)-$(shell git describe --always --exclude '*')

VERSIONH = version.h

Expand Down
67 changes: 33 additions & 34 deletions README.md
@@ -1,18 +1,16 @@
<!--
TODO:
- [ ] Move examples etc (commented out stuff at the end of this file) to documentation
- [ ] Add issue template etc
-->

<a name="readme-top"></a>

<h3 align="center">vcfgl</h3>

<p align="center">
<a href="https://github.com/isinaltinkaya/vcfgl/actions/workflows/test.yml"><img src="https://github.com/isinaltinkaya/vcfgl/actions/workflows/test.yml/badge.svg" /></a>
<a href="https://github.com/isinaltinkaya/vcfgl/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-GNU%20GPLv3.0-purple.svg"/></a>
<a href="https://github.com/isinaltinkaya/vcfgl/releases/latest"><img src="https://img.shields.io/github/v/release/isinaltinkaya/vcfgl?labelColor=white&color=blue"/></a>
<a href="https://github.com/isinaltinkaya/vcfgl/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3.0-purple.svg?labelColor=white"/></a>
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/isinaltinkaya/vcfgl/test.yml?labelColor=white">
<a href="https://bio.tools/vcfgl"><img src="https://img.shields.io/badge/bio.tools-vcfgl-orange?labelColor=white"/></a>
<a href="https://doi.org/10.1101/2024.04.09.586324"><img src="https://img.shields.io/badge/bioRxiv-10.1101%2F2024.04.09.586324-black?labelColor=white&color=darkred"/></a>
<!-- <a href="https://github.com/isinaltinkaya/vcfgl/actions/workflows/test.yml"><img src="https://github.com/isinaltinkaya/vcfgl/actions/workflows/test.yml/badge.svg" /></a> -->
</p>
<!-- ![vcfgl](https://img.shields.io/badge/version-v0.3.3-brightgreen.svg) -->


<p align="center">
Genotype likelihood simulator for VCF/BCF files
Expand All @@ -21,12 +19,14 @@ TODO:
<br />
<br />
<a href="https://github.com/isinaltinkaya/vcfgl">Installation</a>
·
<b>·</b>
<a href="https://github.com/isinaltinkaya/vcfgl/doc/tutorial.MD">Tutorial</a>
·
<a href="https://github.com/isinaltinkaya/vcfgl/issues">Report Bug</a>
·
<a href="https://github.com/isinaltinkaya/vcfgl/issues">Request Feature</a>
<b>·</b>
<a href="https://github.com/isinaltinkaya/vcfgl/issues/new?assignees=&labels=bug&projects=&template=report-a-bug.md&title=%5BBUG%5D">Report Bug</a>
<b>·</b>
<a href="https://github.com/isinaltinkaya/vcfgl/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%5BFR%5D">Request Feature</a>
<b>·</b>
<a href="#how-to-cite">Cite</a>
</p>
</div>

Expand All @@ -53,17 +53,7 @@ TODO:
<li><a href="#output-vcfbcf-tags">Output VCF/BCF Tags</a></li>
</ol> -->
</li>
<li><a href="#tutorials">Tutorials</a>
<ol>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/install.MD">Installation</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/depth.MD">Simulating read depths</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/error_qs.MD">Simulating quality score errors</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/simulate_unobserved.MD">Simulating unobserved sites</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/qs_binning.MD">Simulate quality score binning</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/with_msprime.MD">Using vcfgl with msprime</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/with_stdpopsim.MD">Using vcfgl with stdpopsim</a></li>
<li><a href="https://github.com/isinaltinkaya/vcfgl/doc/with_SLiM.MD">Using vcfgl with SLiM</a></li>
</ol>
<li> <a href="#tutorials">Tutorials</a></li>
<li><a href="#quickstart-for-mstoglf-users">Quickstart for msToGlf users</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#how-to-cite">How to cite</a></li>
Expand All @@ -82,14 +72,6 @@ You can install **vcfgl** using one of the following methods:

You can download the latest release tarball from the [GitHub releases page](https://github.com/isinaltinkaya/vcfgl/releases/latest).

```shell
wget https://github.com/isinaltinkaya/vcfgl/releases/download/v1.0.0/vcfgl-1.0.0.tar.gz
tar xf vcfgl-1.0.0.tar.gz
cd htslib; make;
cd ../vcfgl;
make HTSSRC=../htslib;
```

### &rarr; Method 2: Using HTSlib submodule

This method uses the htslib submodule included in the repository.
Expand Down Expand Up @@ -401,4 +383,21 @@ If you have any questions about the program, feature requests, or bug reports, y

# How to cite

To be announced
The preprint is freely available on bioRxiv through the following link: [bioRxiv Preprint](https://doi.org/10.1101/2024.04.09.586324)

You can use the BibTex entry below for referencing this program in your work:

```BibTex
@article {Altinkaya2024.04.09.586324,
author = {Isin Altinkaya and Rasmus Nielsen and Thorfinn Sand Korneliussen},
title = {vcfgl: A flexible genotype likelihood simulator for VCF/BCF files},
elocation-id = {2024.04.09.586324},
year = {2024},
doi = {10.1101/2024.04.09.586324},
publisher = {Cold Spring Harbor Laboratory},
URL = {https://www.biorxiv.org/content/early/2024/04/09/2024.04.09.586324},
eprint = {https://www.biorxiv.org/content/early/2024/04/09/2024.04.09.586324.full.pdf},
journal = {bioRxiv}
}
```

0 comments on commit 93c918d

Please sign in to comment.