Skip to content

Commit

Permalink
Merge pull request #1224 from deeptools/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
adRn-s authored Jun 14, 2023
2 parents 70582b3 + 51b9676 commit 1c687bb
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 167 deletions.
27 changes: 0 additions & 27 deletions .azure-pipelines/test-template.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/planemo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Planemo
on: [push, pull_request]
env:
GALAXY_BRANCH: release_22.05
jobs:
planemo_test:
name: Planemo test
runs-on: ubuntu-latest
strategy:
matrix:
chunk: [1, 2, 3]
steps:
- uses: actions/checkout@v1
- uses: "dpryan79/github-actions/@master"
- name: planemo
run: |
source activate foo
conda update -c conda-forge -c bioconda samtools
./.planemo.sh ${{ matrix.chunk }} ${{ env.GALAXY_BRANCH }}
- uses: actions/upload-artifact@v3
with:
name: 'Tool test output ${{ matrix.chunk }}'
path: upload
planemo_combine_outputs:
name: Combine chunked test results
needs: planemo_test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
steps:
- uses: actions/download-artifact@v3
with:
path: artifacts
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v3
id: cache-pip
with:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ env.GALAXY_BRANCH }}
- name: Combine outputs
uses: galaxyproject/planemo-ci-action@v1
id: combine
with:
mode: combine
html-report: true
- uses: actions/upload-artifact@v3
with:
name: 'All tool test results'
path: upload
- name: Check outputs
uses: galaxyproject/planemo-ci-action@v1
id: check
with:
mode: check
12 changes: 7 additions & 5 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
name: pypi
on: [push]
on:
create:
tags:
jobs:
pypi:
name: upload to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup conda
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
if: startsWith(github.event.ref, 'refs/tags')
run: |
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
- name: create env
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
if: startsWith(github.event.ref, 'refs/tags')
run: |
export PATH=$HOME/miniconda/bin:$PATH
conda create -n foo -q --yes -c conda-forge -c bioconda python=3.7 twine
- name: sdist
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
if: startsWith(github.event.ref, 'refs/tags')
run: |
export PATH=$HOME/miniconda/bin:$PATH
source activate foo
rm -f dist/*
python setup.py sdist
- name: upload
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
if: startsWith(github.event.ref, 'refs/tags')
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.pypi_password }}
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Test
on: [push, pull_request]
env:
GALAXY_BRANCH: release_22.05
jobs:
check_versions_matches:
name: Check deeptools version matches galaxy tools
Expand Down Expand Up @@ -64,61 +62,5 @@ jobs:
- uses: "dpryan79/github-actions/@master"
- name: Test deepTools
run: |
source activate foo
nosetests --with-doctest -sv deeptools
planemo_test:
name: Planemo test
runs-on: ubuntu-latest
needs: build-linux
strategy:
matrix:
chunk: [1, 2, 3]
steps:
- uses: actions/checkout@v1
- uses: "dpryan79/github-actions/@master"
- name: planemo
run: |
source activate foo
conda update -c conda-forge -c bioconda samtools
./.planemo.sh ${{ matrix.chunk }} ${{ env.GALAXY_BRANCH }}
- uses: actions/upload-artifact@v3
with:
name: 'Tool test output ${{ matrix.chunk }}'
path: upload

planemo_combine_outputs:
name: Combine chunked test results
needs: [build-linux, planemo_test]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
steps:
- uses: actions/download-artifact@v3
with:
path: artifacts
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v3
id: cache-pip
with:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ env.GALAXY_BRANCH }}
- name: Combine outputs
uses: galaxyproject/planemo-ci-action@v1
id: combine
with:
mode: combine
html-report: true
- uses: actions/upload-artifact@v3
with:
name: 'All tool test results'
path: upload
- name: Check outputs
uses: galaxyproject/planemo-ci-action@v1
id: check
with:
mode: check
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
* Fix label options
* add pool
* several other bugs fixed: #1159, #1185, #1172, #1181, #1183
* Fix galaxy tests
* Fix galaxy tests, separate planemo and update pypi push only on tag releases
* upload artifact
* allow 1 or 2 lines diff for bowtie2 program
* change github action to get artifacts
* fix plotPCA
* try to fix old samtools installed
* add forgotten channels
* default chunklength increased for alignmentSieve
* chunklength in alignmentSieve is a CLI argument now
* suppress lack of index warnings from pysam
* fixedStep in bedGraph output to avoid merging bins with equal values

3.5.1
* cmp usage is updated to fit the recent mpl updates.
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# deepTools
[![Build Status](https://dev.azure.com/dpryan79/dpryan79/_apis/build/status/deeptools.deepTools?branchName=master)](https://dev.azure.com/dpryan79/dpryan79/_build/latest?definitionId=1&branchName=master)
[![Documentation Status](https://readthedocs.org/projects/deeptools/badge/)](http://deeptools.readthedocs.org/) [![PyPI Version](https://img.shields.io/pypi/v/deeptools.svg?style=plastic)](https://pypi.org/project/deepTools/)
[![Documentation Status](https://readthedocs.org/projects/deeptools/badge/)](http://deeptools.readthedocs.org/)
[![PyPI Version](https://img.shields.io/pypi/v/deeptools.svg?style=plastic)](https://pypi.org/project/deepTools/)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/deeptools/README.html)
[![European Galaxy server](https://img.shields.io/badge/usegalaxy-.eu-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAASCAYAAABB7B6eAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAACC2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjE8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlBob3RvbWV0cmljSW50ZXJwcmV0YXRpb24+MjwvdGlmZjpQaG90b21ldHJpY0ludGVycHJldGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KD0UqkwAAAn9JREFUOBGlVEuLE0EQruqZiftwDz4QYT1IYM8eFkHFw/4HYX+GB3/B4l/YP+CP8OBNTwpCwFMQXAQPKtnsg5nJZpKdni6/6kzHvAYDFtRUT71f3UwAEbkLch9ogQxcBwRKMfAnM1/CBwgrbxkgPAYqlBOy1jfovlaPsEiWPROZmqmZKKzOYCJb/AbdYLso9/9B6GppBRqCrjSYYaquZq20EUKAzVpjo1FzWRDVrNay6C/HDxT92wXrAVCH3ASqq5VqEtv1WZ13Mdwf8LFyyKECNbgHHAObWhScf4Wnj9CbQpPzWYU3UFoX3qkhlG8AY2BTQt5/EA7qaEPQsgGLWied0A8VKrHAsCC1eJ6EFoUd1v6GoPOaRAtDPViUr/wPzkIFV9AaAZGtYB568VyJfijV+ZBzlVZJ3W7XHB2RESGe4opXIGzRTdjcAupOK09RA6kzr1NTrTj7V1ugM4VgPGWEw+e39CxO6JUw5XhhKihmaDacU2GiR0Ohcc4cZ+Kq3AjlEnEeRSazLs6/9b/kh4eTC+hngE3QQD7Yyclxsrf3cpxsPXn+cFdenF9aqlBXMXaDiEyfyfawBz2RqC/O9WF1ysacOpytlUSoqNrtfbS642+4D4CS9V3xb4u8P/ACI4O810efRu6KsC0QnjHJGaq4IOGUjWTo/YDZDB3xSIxcGyNlWcTucb4T3in/3IaueNrZyX0lGOrWndstOr+w21UlVFokILjJLFhPukbVY8OmwNQ3nZgNJNmKDccusSb4UIe+gtkI+9/bSLJDjqn763f5CQ5TLApmICkqwR0QnUPKZFIUnoozWcQuRbC0Km02knj0tPYx63furGs3x/iPnz83zJDVNtdP3QAAAABJRU5ErkJggg==)](https://usegalaxy.eu/root?tool_id=deeptools_compute_matrix)
![test](https://github.com/deeptools/deepTools/actions/workflows/test.yml/badge.svg)
![planemo](https://github.com/deeptools/deepTools/actions/workflows/planemo.yml/badge.svg)


## User-friendly tools for exploring deep-sequencing data

Expand Down
63 changes: 0 additions & 63 deletions azure-pipelines.yml

This file was deleted.

14 changes: 11 additions & 3 deletions deeptools/alignmentSieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def parseArguments():
action='store_true',
help='Shift the produced BAM file or BEDPE regions as commonly done for ATAC-seq. This is equivalent to --shift 4 -5 5 -4.')

general.add_argument('--genomeChunkLength',
type=int,
default=int(1e6),
help='Size of the genome (in bps) to be processed per thread. (Default: %(default)s)')

output = parser.add_argument_group('Output arguments')
output.add_argument('--BED',
action='store_true',
Expand Down Expand Up @@ -204,8 +209,7 @@ def shiftRead(b, chromDict, args):
def filterWorker(arglist):
chrom, start, end, args, chromDict = arglist
fh = openBam(args.bam)

mode = 'wbu'
mode = 'wb'
oname = getTempFileName(suffix='.bam')
if args.filteredOutReads:
onameFiltered = getTempFileName(suffix='.bam')
Expand Down Expand Up @@ -349,8 +353,11 @@ def convertBED(oname, tmpFiles, chromDict):
"""
ofile = open(oname, "w")
for tmpFile in tmpFiles:
# Setting verbosity to avoid lack of index error/warning
pysam.set_verbosity(0)
fh = pysam.AlignmentFile(tmpFile)

# Reset verbosity
pysam.set_verbosity(3)
for b in fh.fetch(until_eof=True):
tLen = getTLen(b, notAbs=True)
if tLen > 0:
Expand Down Expand Up @@ -387,6 +394,7 @@ def main(args=None):
chrom_sizes,
blackListFileName=args.blackListFileName,
numberOfProcessors=args.numberOfProcessors,
genomeChunkLength=args.genomeChunkLength,
verbose=args.verbose)

res = sorted(res) # The temp files are now in order for concatenation
Expand Down
7 changes: 6 additions & 1 deletion deeptools/bigwigCompare.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def parse_arguments(args=None):
'zeros may be wrong and this option should be used ',
action='store_true')

parser.add_argument('--fixedStep',
help='Write out all bins (of size --binSize) '
'instead of merging neighbouring bins with equal values.',
action='store_true')
return parser


Expand Down Expand Up @@ -168,7 +172,8 @@ def main(args=None):
format=args.outFileFormat,
smoothLength=False,
missingDataAsZero=not args.skipNonCoveredRegions,
extendPairedEnds=False)
extendPairedEnds=False,
fixedStep=args.fixedStep)

# Clean up temporary bigWig files, if applicable
if not args.deepBlueKeepTemp:
Expand Down
Loading

0 comments on commit 1c687bb

Please sign in to comment.