Skip to content

Commit

Permalink
Add workflow for version check and release; add CHANGELOG.md; remove …
Browse files Browse the repository at this point in the history
…ignoring README.md when packaging; update README.md
  • Loading branch information
chtsai0105 committed Nov 14, 2023
1 parent db46003 commit 8b83539
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
.gitattributes export-ignore
.gitignore export-ignore
.pre-commit-config.yaml export-ignore
README.md export-ignore
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*

jobs:
version_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
README.md
sparse-checkout-cone-mode: false
fetch-tags: true
token: ${{ secrets.GITHUB_TOKEN }}
ref: master

- name: Capture version in README.md
id: file
run: |
repo_name=$(basename "$GITHUB_REPOSITORY")
cap=$(grep -oP "${repo_name}-v\K\d\.\d\.\d[^\s]*" README.md)
echo "version=$cap" >> "$GITHUB_OUTPUT"
echo "repo_name=$repo_name" >> "$GITHUB_OUTPUT"
- name: Capture version in latest tag
id: tag
run: echo "version=$(git tag --sort=committerdate -l "v*" | tail -n1 | sed 's/^v//')" >> "$GITHUB_OUTPUT"

- name: Substitute version in README.md
id: sub
if: ${{ steps.file.outputs.version != steps.tag.outputs.version }}
run: sed -i 's/${{ steps.file.outputs.repo_name}}-${{ steps.file.outputs.version }}/${{ steps.file.outputs.repo_name}}-${{ steps.tag.outputs.version }}/g' README.md

- name: Push changes
if: steps.sub.conclusion == 'success'
run: |
git config author.name Cheng-Hung Tsai
git config author.email chenghung.tsai@email.ucr.edu
git config committer.name GitHub Actions
git config committer.email actions@github.com
git add README.md
git commit -m "Update version in README.md"
git tag --annotate v${{ steps.tag.outputs.version }} -m "Version bump to v${{ steps.tag.outputs.version }}" --force
git push
git push --tags --force
publish_release:
runs-on: ubuntu-latest
needs: version_check
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master

- name: Release
uses: docker://antonyurchenko/git-release:v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: build/*.zip
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0-beta] - 2023-11/14

### Added

- Check for duplicated sample names.

- Report problematic cds sequences.

- Use checkpoint file to save the hmmsearch results to prevent rerunning the search process when adding/removing samples.

### Changed

- Use ClipKIT to replace the self-defined function for trimming off the sites that display poor phylogenetic signal.

- Move the MSA concatenate function from align module to tree module. Users who want to try different tree building strategy won't have to rerun the align module again.

- Replace the VeryFastTree with FastTree for stability.

### Fixed

- Fix the bug caused by translation from cds sequences with invalid length.

- Fix the bug caused by inconsistent MSA output extension.

- Fix the bug that the trimming function always return peptide MSA if the sequence has no site being trimmed.

- Fix the Python logger issue.

## [2.0.0-alpha] - 2023/10/04

### Added

- Add Download module to download the conserved markerset HMM profiles from BUSCO v5 dataset.

- Add align module which driven by pyhmmer to perform hmmsearch and hmmalign against the BUSCO markerset.

- Add tree module to visualize the resulting phylogenetic tree.

- Implement back-translation to convert the peptide MSA results to DNA counterpart when receiving coding sequence fasta as inputs.

[2.0.0-beta]: https://github.com/stajichlab/PHYling/compare/v2.0.0-beta...v2.0.0-alpha
[2.0.0-alpha]: https://github.com/stajichlab/PHYling/releases/tag/v2.0.0-alpha
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Conda build](https://img.shields.io/github/actions/workflow/status/stajichlab/PHYling_unified/conda-build.yml?logo=github&label=conda%20build)](https://github.com/stajichlab/PHYling_unified/actions/workflows/conda-build.yml)
[![Python build](https://img.shields.io/github/actions/workflow/status/stajichlab/PHYling_unified/python-versions.yml?logo=github&label=python%20build)](https://github.com/stajichlab/PHYling_unified/actions/workflows/python-versions.yml)
[![Python](https://img.shields.io/badge/python-3.9_%7C_3.10_%7C_3.11_%7C_3.12-blue?logo=python)](https://github.com/stajichlab/PHYling_unified/actions/workflows/python-versions.yml)
[![License](https://img.shields.io/github/license/stajichlab/PHYling_unified?label=license)](https://github.com/stajichlab/PHYling_unified/blob/main/LICENSE)
[![Conda build](https://img.shields.io/github/actions/workflow/status/stajichlab/PHYling/conda-build.yml?logo=github&label=conda%20build)](https://github.com/stajichlab/PHYling/actions/workflows/conda-build.yml)
[![Python build](https://img.shields.io/github/actions/workflow/status/stajichlab/PHYling/python-versions.yml?logo=github&label=python%20build)](https://github.com/stajichlab/PHYling/actions/workflows/python-versions.yml)
[![Python](https://img.shields.io/badge/python-3.9_%7C_3.10_%7C_3.11_%7C_3.12-blue?logo=python)](https://github.com/stajichlab/PHYling/actions/workflows/python-versions.yml)
[![License](https://img.shields.io/github/license/stajichlab/PHYling?label=license)](https://github.com/stajichlab/PHYling/blob/main/LICENSE)

# PHYling tool

Expand Down Expand Up @@ -167,9 +167,12 @@ For the alignment step, 16 parallel jobs will be launched and each parallel job

Highly recommended if **muscle** is chosen for alignment. (**muscle** is much slower than **hmmalign**!!)

#### Checkpoint for quick rerun

A checkpoint file will be generated after the hmmsearch step.
The `--from_checkpoint` option allow you to retrieve the already completed hmmsearch results on those inputs that don't have changes to save time.
The `--from_checkpoint` option allow you to retrieve already completed hmmsearch results on those inputs that don't have changes to save time.
Only the newly added/changed inputs will do the hmmsearch when `--from_checkpoint` is enabled.
Meanwhile, the samples not specified in the command with `--from_checkpoint` will be removed from the checkpoint file.

#### Use coding sequence instead of peptide sequence

Expand Down Expand Up @@ -249,13 +252,18 @@ phyling tree -I align -f

## Install

Use the environment.yml to install all the required packages
Please download the source code from the [latest release](https://github.com/stajichlab/PHYling/releases/latest) and decompress it or `git clone` the main branch.

Go into the PHYling folder.
To avoid messing around the base environment, consider installing it in a conda environment.
Please use the environment.yml to create environment and install all the required packages.

```
cd PHYling-2.0.0-beta
conda env create -f environment.yml
```

Go into the phyling folder and install the package through pip
Install the package through pip in the PHYling folder.

```
pip install .
Expand Down

0 comments on commit 8b83539

Please sign in to comment.