Skip to content

Commit

Permalink
Merge branch 'master' into ref/GetLengthGenotypes
Browse files Browse the repository at this point in the history
  • Loading branch information
LiterallyUniqueLogin authored Dec 21, 2023
2 parents 1b43aa3 + 1527df6 commit 4f840d1
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 69 deletions.
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/rocker-org/devcontainer-features/miniforge:1": {
"version": "latest",
"variant": "Mambaforge"
}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "mamba env create -y -n trtools --file .devcontainer/environment.yml && conda run -n trtools pip install --user -e .",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["ms-python.python"],
"settings": {
"python.condaPath": "/opt/conda/condabin/conda",
"python.defaultInterpreterPath": "/opt/conda/envs/trtools/bin/python",
"python.terminal.activateEnvironment": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.venvFolders": ["/opt/conda/envs"],
"terminal.integrated.environmentChangesRelaunch": true,
"terminal.integrated.hideOnStartup": "always"
}
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
14 changes: 14 additions & 0 deletions .devcontainer/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
channels:
- conda-forge
- bioconda
- nodefaults
dependencies:
- bioconda::art
- conda-forge::pip
- bioconda::bcftools
- conda-forge::pytest
- conda-forge::pytest-cov
- conda-forge::python=3.8 # the lowest version of python that we formally support
- conda-forge::sphinx=3.0.4
- conda-forge::sphinx_rtd_theme
- conda-forge::sphinx-autodoc-typehints
49 changes: 0 additions & 49 deletions Dockerfile

This file was deleted.

14 changes: 6 additions & 8 deletions PUBLISHING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ Maintainers should reach consensus before going ahead with publishing changes.
Note that the publishing to PyPI step below will require credentials
that are only made available to core maintainers of TRTools.

We use a simplified version of
`git flow <http://web.archive.org/web/20200520162709/https://nvie.com/posts/a-successful-git-branching-model/>`_
to maintain and publish trtools.
We use the master branch as the default branch with the latest stable codebase.
Note that we use the master branch as the default branch with the latest stable codebase.
The builds from this branch are distributed to PyPI and conda.
The develop branch contains new features that have yet to make their way into master.
Other branches are used for development.

New Dependencies
----------------
Expand All @@ -31,13 +28,14 @@ If you've added dependencies to trtools or its tests, those dependencies should
Publishing Steps
----------------

Once changes have been made to develop that are ready to be published, first choose the new version number according to `semantic versioning <https://semver.org>`_. Then set up the environment you're going to publish TRTools from:
Once changes have been made to a branch that are ready to be published, first choose the new version number according to `semantic versioning <https://semver.org>`_.
Then set up the environment you're going to publish TRTools from:

#. Create a clean environment.
#. Install setuptools with version >= 40.8.0
#. Additionally, install ``pytest``, ``wheel``, ``build``, and ``twine``
#. Clone the `trtools repo <https://github.com/gymrek-lab/TRTools>`_
#. Check out the develop branch
#. Check out the branch with the new work
#. Run :code:`pip install --upgrade pip && pip install -e .`

Then go through the steps of merging the changes into the master branch:
Expand All @@ -46,7 +44,7 @@ Then go through the steps of merging the changes into the master branch:
#. Update the version number listed in the :code:`pyproject.toml` file.
#. Change the 'Unreleased Changes' section of :code:`RELEASE_NOTES.rst` to the new version number.
#. Check if any changes have been made that have not yet been documented in the release notes. If so, document them.
#. Submit a pull request from develop into master on the github website.
#. Submit a pull request from this branch into master on the github website.
#. If the code review checks pass, merge the pull request.
#. Tag the merge commit with the package version in vX.Y.Z format. (For more details on tagging, see `below`)

Expand Down
27 changes: 17 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
.. a location that the doc/index.rst uses for including this file
.. before_header
.. image:: https://github.com/codespaces/badge.svg
:width: 160
:target: https://codespaces.new/gymrek-lab/TRTools

.. image:: https://github.com/gymrek-lab/trtools/workflows/Tests/badge.svg
:target: https://github.com/gymrek-lab/trtools/workflows/Tests/badge.svg


.. image:: https://codecov.io/gh/gymrek-lab/TRTools/branch/master/graph/badge.svg
:target: https://codecov.io/gh/gymrek-lab/TRTools

Expand All @@ -28,23 +31,20 @@ If you use TRTools in your work, please cite: Nima Mousavi, Jonathan Margoliash,
Install
-------

Note: TRTools supports Python versions 3.8 and up. We do not officially support python versions 3.6 and 3.7 as they are `end of life <https://devguide.python.org/versions/#status-of-python-versions>`_, but we believe TRTools likely works with them from previous testing results.

With conda
^^^^^^^^^^

::

conda install -c conda-forge -c bioconda trtools

Optionally install :code:`bcftools` which is used to prepare input files for TRTools by running:
Optionally install :code:`bcftools` which is used to prepare input files for TRTools (and :code:`ART` which is used by simTR) by running:

::

conda install -c conda-forge -c bioconda bcftools

Note: Bioconda only supports python versions 3.6-3.8 currently,
so that is all TRTools supports in conda.
If you are using a different version of python we support (3.5 or >= 3.9),
install TRTools using pip.
conda install -c conda-forge -c bioconda bcftools art

With pip
^^^^^^^^
Expand Down Expand Up @@ -78,6 +78,13 @@ Note: make sure TRTools is not installed in the environment via a different meth

Note: if you will run or test :code:`simTR`, you will also need to install `ART <https://www.niehs.nih.gov/research/resources/software/biostatistics/art/index.cfm>`_. The simTR tests will only run if the executable :code:`art_illumina` is found on your :code:`PATH`. If it has been installed, :code:`which art_illumina` should return a path.

With Docker
^^^^^^^^^^^

Please refer to `the biocontainers registry for TRTools <https://biocontainers.pro/tools/trtools>`_ for all of our images. To use the most recent release, run the following command::

docker pull quay.io/biocontainers/trtools:latest

Tools
-----
TRTools includes the following tools.
Expand Down Expand Up @@ -145,7 +152,7 @@ We appreciate contributions to TRTools. If you would like to contribute a fix or
#. Install TRTools from source `as above <From source_>`_.
#. Additionally, install :code:`pytest`, `pytest-cov <https://anaconda.org/conda-forge/pytest-cov>`_, :code:`sphinx>=3` and :code:`sphinx_rtd_theme`, in your environment.
#. Fork the TRTools repository.
#. The :code:`develop` branch contains the latest pre-release codebase. Create a branch off of :code:`develop` titled with the name of your feature.
#. Create a branch off of :code:`master` titled with the name of your feature.
#. Make your changes.
#. Document your changes.

Expand All @@ -163,7 +170,7 @@ We appreciate contributions to TRTools. If you would like to contribute a fix or

* :code:`cd` to the root of the project and run :code:`python -m pytest --cov=. --cov-report term-missing` to make sure that (1) all tests pass and (2) any code you have added is covered by tests. (Code coverage may **not** go down).

#. Submit a pull request **to the develop branch** of the central repository with a description of what changes you have made.
#. Submit a pull request to the master branch of the central repository with a description of what changes you have made.
A member of the TRTools team will reply and continue the contribution process from there, possibly asking for additional information/effort on your part.

Publishing
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [
]
description = "Toolkit for genome-wide analysis of STRs"
readme = "README.rst"
requires-python = ">=3.5"
requires-python = ">=3.6"
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python :: 3.5",
Expand Down
2 changes: 1 addition & 1 deletion trtools/prancSTR/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Below are :code:`prancSTR` examples using HipSTR VCFs. Data files can be found a

Citations
----------------
A preprint describing simTR and prancSTR is currently being prepared. The latest version of manuscript can be found in :code:`paper_draft` folder of this tool.
The latest manuscript for citation of the tool can be found at https://doi.org/10.1101/2023.11.22.568371
Binary file not shown.

0 comments on commit 4f840d1

Please sign in to comment.