Skip to content

Commit

Permalink
cm.py removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohit Navandar committed Jan 31, 2025
2 parents 61d1f30 + 121de42 commit a9ea6bc
Show file tree
Hide file tree
Showing 62 changed files with 6,857 additions and 2,578 deletions.
172 changes: 172 additions & 0 deletions .github/workflows/maturin_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: maturin builds

on:
push:
pull_request:

permissions:
contents: read

jobs:
# linux:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: ubuntu-latest
# target: x86_64
# manylinux: 2_28
# - runner: ubuntu-latest
# target: x86
# manylinux: 2_28
# #- runner: ubuntu-latest
# # target: aarch64
# #- runner: ubuntu-latest
# # target: armv7
# #- runner: ubuntu-latest
# # target: s390x
# #- runner: ubuntu-latest
# # target: ppc64le
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# manylinux: ${{ matrix.platform.manylinux }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-linux-${{ matrix.platform.target }}
# path: dist

# musllinux:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: ubuntu-latest
# target: x86_64
# - runner: ubuntu-latest
# target: x86
# - runner: ubuntu-latest
# target: aarch64
# - runner: ubuntu-latest
# target: armv7
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# manylinux: musllinux_1_2
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-musllinux-${{ matrix.platform.target }}
# path: dist

# windows:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: windows-latest
# target: x64
# - runner: windows-latest
# target: x86
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# architecture: ${{ matrix.platform.target }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-windows-${{ matrix.platform.target }}
# path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-latest
target: x86_64
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist

# release:
# name: Release
# runs-on: ubuntu-latest
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
# needs: [linux, musllinux, windows, macos, sdist]
# permissions:
# # Use to sign the release artifacts
# id-token: write
# # Used to upload release artifacts
# contents: write
# # Used to generate artifact attestation
# attestations: write
# steps:
# - uses: actions/download-artifact@v4
# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: 'wheels-*/*'
# - name: Publish to PyPI
# if: "startsWith(github.ref, 'refs/tags/')"
# uses: PyO3/maturin-action@v1
# env:
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# with:
# command: upload
# args: --non-interactive --skip-existing wheels-*/*
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ build:
os: ubuntu-22.04
tools:
python: "3.12"
rust: "1.82"
apt_packages:
- clang

sphinx:
configuration: docs/conf.py
Expand Down
9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ name = "hp"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.22.5", features = ["extension-module"] }
rust-htslib = "0.47.0"
pyo3 = { version = "0.23.4", features = ["extension-module"] }
rust-htslib = "0.49.0"
rayon = "1.10.0"
itertools = "0.12.1"
itertools = "0.14.0"
bigtools = "0.5.3"
tokio = "*"
flate2 = "*"
tempfile = "*"
ndarray = "0.16.1"
npyz = "*"
zip = "*"
ndarray-npy = "*"
3 changes: 3 additions & 0 deletions deeptools4.0.0_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

- unmapped reads to unfiltered_out

## multiBamSummary
- npz output has labels encoded as u8s, no longer strings.

# Todo

- AlignmentSieve: Shift, Bed, Optimization.
Expand Down
11 changes: 11 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ currently available.
If the file names in the figure mean nothing to you,
please make sure to check our :doc:`content/help_glossary`.

deepTools 4.0.0
---------------
As of deepTools 4.0.0, quite big changes have been made to the computation backend (which is now written in `rust <https://www.rust-lang.org/>`_).
The main idea behind this change is to make some tools faster and more robust.
Useability of the tools are not affected. But note that the output (read precision) might be slightly different than before.

- :doc:`content/tools/bamCoverage`
- :doc:`content/tools/bamCompare`
- :doc:`content/tools/computeMatrix`
- :doc:`content/tools/multiBamSummary`


Contents:
---------
Expand Down
85 changes: 82 additions & 3 deletions galaxy/wrapper/bamCompare.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
<param name="bamFile1" value="bowtie2 test1.bam" ftype="bam"/>
<param name="bamFile2" value="bowtie2 test1.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="no"/>
<param name="outFileFormat" value="bigwig"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="5"/>
<param name="type" value="ratio"/>
Expand All @@ -195,11 +194,91 @@
<param name="bamFile2" value="bowtie2 test1.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bigwig"/>
<param name="outFileFormat" value="bigwig"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<output name="outFileName" file="bamCompare_result2.bw" ftype="bigwig"/>
</test>
<!-- Test with BAM and CRAM file as input-->
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testA.cram" ftype="cram"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t0\t200\t1"/>
<has_text_matching expression="chr_cigar\t0\t200\t1"/>
</assert_contents>
</output>
</test>
<!-- Test with BAM and CRAM files and substract option-->
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testA.cram" ftype="cram"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="substract"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t0\t200\t0"/>
<has_text_matching expression="chr_cigar\t0\t200\t0"/>
</assert_contents>
</output>
</test>
<!-- Test with BAM files with pseudocounts-->
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testB.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<param name="pseudocount" value="1 1"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t0\t50\t1"/>
<has_text_matching expression="3R\t50\t100\t0.571429"/>
<has_text_matching expression="3R\t100\t150\t1.14286"/>
<has_text_matching expression="3R\t150\t200\t0.8"/>
</assert_contents>
</output>
</test>
<!-- Test with BAM files with skipZeroOverZero -->
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testB.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<param name="skipZeroOverZero" value="--skipZeroOverZero"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t50\t100\t0.571429"/>
<has_text_matching expression="3R\t100\t150\t1.14286"/>
<has_text_matching expression="3R\t150\t200\t0.8"/>
</assert_contents>
</output>
</test>
<!-- Test with BAM files with skipNAs -->
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testB.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<param name="skipNAs" value="true"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t100\t150\t1.14286"/>
<has_text_matching expression="3R\t150\t200\t0.8"/>
</assert_contents>
</output>
</test>
</tests>
<help>
<![CDATA[
Expand Down Expand Up @@ -244,4 +323,4 @@ Like BAM files, bigWig files are compressed, binary files. If you would like to
]]>
</help>
<expand macro="citations"/>
</tool>
</tool>
Loading

0 comments on commit a9ea6bc

Please sign in to comment.