8000 Release `v0.1.0` - Fender stratocaster by nleroy917 · Pull Request #48 · databio/gtars · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release v0.1.0 - Fender stratocaster #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 601 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
601 commits
Select commit Hold shift + click to select a range
e051423
code cleanup remove unnecessary items
donaldcampbelljr Oct 10, 2024
90bec30
revert count changes
donaldcampbelljr Oct 11, 2024
da90f3d
fix accumulation issues
donaldcampbelljr Oct 11, 2024
518f97d
remove rayon for now
donaldcampbelljr Oct 11, 2024
884e7b6
Revert "remove rayon for now"
donaldcampbelljr Oct 14, 2024
a0b2cfe
add rayon parallel processing with -p flag and using pool.install
donaldcampbelljr Oct 14, 2024
04a77b0
fix npy meta file during parallel processing
donaldcampbelljr Oct 14, 2024
d69d2a0
remove single chromosome wiggle files during combination step
donaldcampbelljr Oct 14, 2024
84f3da1
implement FromStr for file type enum
donaldcampbelljr Oct 14, 2024
7ebcf07
clarify file type
donaldcampbelljr Oct 14, 2024
bd99ea4
Merge branch 'dev' into dev_add_bam_uniwig
donaldcampbelljr Oct 14, 2024
fbdac0b
Merge pull request #31 from databio/dev_add_bam_uniwig
donaldcampbelljr Oct 14, 2024
6615dfd
Merge branch 'dev' into pararead
nleroy917 Oct 15, 2024
b834993
Merge pull request #35 from databio/pararead
nleroy917 Oct 15, 2024
99c204f 10000
fix Cargo.toml
nleroy917 Oct 15, 2024
7e3fc5b
create fragment file globber
nleroy917 Oct 15, 2024
8244ca6
2nd fix issue where wiggle file can extend beyond chrom.sizes end, re…
donaldcampbelljr Oct 15, 2024
2ab6b8f
Merge remote-tracking branch 'origin/dev' into dev
donaldcampbelljr Oct 15, 2024
649e98b
create more models/structs
nleroy917 Oct 15, 2024
99abd44
build trees
nleroy917 Oct 15, 2024
dddd778
implement the find-overlaps function for the consensus set
nleroy917 Oct 15, 2024
cc6b8a3
fix tests, set up scoring
nleroy917 Oct 15, 2024
7b3b01d
create fragment abstraction
nleroy917 Oct 15, 2024
0bbce39
add test for _start.wig output
donaldcampbelljr Oct 15, 2024
932b30d
cargo fmt
donaldcampbelljr Oct 15, 2024
3de8a4b
add _core.wig output test
donaldcampbelljr Oct 15, 2024
9d7aa83
clean up igd warnings by removing unused variables
donaldcampbelljr Oct 15, 2024
cbb418f
clean up remaining uniwig warnings
donaldcampbelljr Oct 15, 2024
cb48827
finish the loop
nleroy917 Oct 15, 2024
bc73511
safegaurd count matrix scoring
nleroy917 Oct 15, 2024
7be2399
create an iterator over the CountMatrix
nleroy917 Oct 15, 2024
2489572
write to file
nleroy917 Oct 15, 2024
87e7f6e
add whitelist
nleroy917 Oct 16, 2024
9bc1ac7
complete the CLI
nleroy917 Oct 16, 2024
f04e3a3
actualyl add teh cli
nleroy917 Oct 16, 2024
6d1e299
use file + barcode whitelist
nleroy917 Oct 16, 2024
575e96e
better error
nleroy917 Oct 16, 2024
7ab95c6
error handling
nleroy917 Oct 16, 2024
aff0042
count total files
nleroy917 Oct 16, 2024
d21935e
add parsing narrowPeaks and associated tests
donaldcampbelljr Oct 16, 2024
a6a1a02
add better logging
nleroy917 Oct 16, 2024
653e011
dont chec file
nleroy917 Oct 16, 2024
015170b
ignore whitelist
nleroy917 Oct 16, 2024
eb048d7
combine the Some(olaps)
nleroy917 Oct 16, 2024
551c2a1
average total olaps
nleroy917 Oct 16, 2024
8199594
work on generics
nleroy917 Oct 16, 2024
443829c
overlap counting
nleroy917 Oct 16, 2024
b1bfd8f
sort narrowpeaks
donaldcampbelljr Oct 16, 2024
63fc2e2
clamp core starts in the event of a start = 0
donaldcampbelljr Oct 16, 2024
eea5d02
add core counting func for narrowPeaks
donaldcampbelljr Oct 16, 2024
025d1f7
implement two modes, and properly count
nleroy917 Oct 16, 2024
e81f2c5
add smooth_fixed_start_end_narrow_peak and associated test
donaldcampbelljr Oct 17, 2024
24536aa
clean up new funcs by removing debug lines
donaldcampbelljr Oct 17, 2024
21e65c3
more clean up
donaldcampbelljr Oct 17, 2024
132fb75
test clean up, remove warnings
donaldcampbelljr Oct 17, 2024
bd4d834
add score and missing stepsize parameters to uniwig_main
donaldcampbelljr Oct 17, 2024
d81b72f
some attempts at return various ChromosomeType
donaldcampbelljr Oct 17, 2024
25e52c6
more attempts and failures at handling two different return types
donaldcampbelljr Oct 17, 2024
52d3b2d
test data
nleroy917 Oct 17, 2024
32d1ac6
test data
nleroy917 Oct 17, 2024
61cec8f
gzip the region scoring test fragments
nleroy917 Oct 17, 2024
4a60245
still doesnt work
donaldcampbelljr Oct 17, 2024
f763b77
work on unit tests
nleroy917 Oct 17, 2024
b1140e3
Revert "still doesnt work"
donaldcampbelljr Oct 18, 2024
a1b984e
Revert "more attempts and failures at handling two different return t…
donaldcampbelljr Oct 18, 2024
f68c2ca
traits, enums, and boxes attempt, does not work
donaldcampbelljr Oct 18, 2024
4676802
Revert "traits, enums, and boxes attempt, does not work"
donaldcampbelljr Oct 18, 2024
b7982d3
Revert "some attempts at return various ChromosomeType"
donaldcampbelljr Oct 18, 2024
3c95dc3
just use the same struct with potentially superfluous fields
donaldcampbelljr Oct 18, 2024
c2b2b4d
major refactor into separate files for convenience
donaldcampbelljr Oct 18, 2024
3cda8e9
refactor such that Bed files and NarrowPeaks have Starts and Ends whe…
donaldcampbelljr Oct 18, 2024
f2669ea
remove duplicated functions
donaldcampbelljr Oct 18, 2024
f4bceea
rename counting functions to something sensible
donaldcampbelljr Oct 18, 2024
6793676
simplify chrom.sizes
donaldcampbelljr Oct 18, 2024
e08b938
comment out failing tests from fragsplit (because they hide other fai…
donaldcampbelljr Oct 18, 2024
e22ff28
debugging
donaldcampbelljr Oct 18, 2024
e35da96
Revert "debugging"
donaldcampbelljr Oct 18, 2024
8793adf
Revert "comment out failing tests from fragsplit (because they hide o…
donaldcampbelljr Oct 18, 2024
e4685a7
fix counting issue
donaldcampbelljr Oct 18, 2024
d5550ad
comment out tests that fail unrelated to uniwig
donaldcampbelljr Oct 18, 2024
56b76cc
fix narrowPeak paths for tests
donaldcampbelljr Oct 18, 2024
e2984f0
add lower bound for score counts to be 0
donaldcampbelljr Oct 18, 2024
0a257d7
Revert "comment out tests that fail unrelated to uniwig"
donaldcampbelljr Oct 18, 2024
e76d12d
Merge branch 'dev' into dev_narrowPeak_scoring
donaldcampbelljr Oct 18, 2024
50a1b5d
remove need to pass true or false for score flag
donaldcampbelljr Oct 21, 2024
9f96c8d
fix core wiggle writing by removing clamping
donaldcampbelljr Oct 21, 2024
dc1b1bf
remove unnecessary skipping
donaldcampbelljr Oct 21, 2024
106efca
remove unnecessary cloning
donaldcampbelljr Oct 21, 2024
35a60a6
other small PR polishing
donaldcampbelljr Oct 21, 2024
6ee2780
use slices instead of vec references for input parameters
donaldcampbelljr Oct 21, 2024
b6347f8
use slice for npy writing as well
donaldcampbelljr Oct 21, 2024
9388fd8
reinstate fragsplit tests (which are broken)
donaldcampbelljr Oct 21, 2024
bf51bba
Merge pull request #36 from databio/dev_narrowPeak_scoring
donaldcampbelljr Oct 21, 2024
194060b
comment out fragsplit tests (which are broken)
donaldcampbelljr Oct 21, 2024
dc5534b
add creating bedGraph output
donaldcampbelljr Oct 21, 2024
b8ba499
add converting bedGraph to bw files
donaldcampbelljr Oct 21, 2024
7240bdd
add remaining workflow for converting final product to bw
donaldcampbelljr Oct 21, 2024
0161a4f
Add progress bar to bw outputs, change to default params for arg_stru…
donaldcampbelljr Oct 22, 2024
a61c781
add zoom level as an argument.
donaldcampbelljr Oct 22, 2024
7d38823
fix logic error wrt writing all three bw files
donaldcampbelljr Oct 22, 2024
3fdcb39
move progress bar, clean up
donaldcampbelljr Oct 22, 2024
5f9718e
clean up
donaldcampbelljr Oct 22, 2024
6c9c811
add test for bedGraph output
donaldcampbelljr Oct 22, 2024
0a11bd8
Merge branch 'dev' into region_scoring
nleroy917 Oct 22, 2024
2e81422
Merge pull request #37 from databio/dev_bam_bedgraph_bigtools
donaldcampbelljr Oct 22, 2024
b6ef9f3
move bindings to subfolder
nleroy917 Oct 22, 2024
18e7c21
fix python cargo.toml
nleroy917 Oct 22, 2024
d84d993
add minimal R bindings example
nleroy917 Oct 22, 2024
f2ad6e7
add roxygen params
nleroy917 Oct 22, 2024
b10f09c
updates
nleroy917 Oct 22, 2024
16163bd
remove hello world
nleroy917 Oct 22, 2024
26702b6
merge
nleroy917 Oct 24, 2024
0b2abff
remove remnants
nleroy917 Oct 24, 2024
46151e2
some changes
nleroy917 Oct 24, 2024
b4c2115
first working pass at using noodles to read bam and report counts
donaldcampbelljr Oct 24, 2024
ef19243
add attempt at determining Map length (commented out)
donaldcampbelljr Oct 24, 2024
c7cb01b
add bedGraph count compression
donaldcampbelljr Oct 25, 2024
80bf9c5
finish adding bedGraph count compression
donaldcampbelljr Oct 25, 2024
65e1a62
fix mutability issue for bam reading into chrom vec
donaldcampbelljr Oct 25, 2024
a0dfb75
change sorted to start instead of all for BedGraphToBigWigArgs
donaldcampbelljr Oct 25, 2024
2410c30
Merge pull request #41 from databio/dev_bedGraph_compress_counts
donaldcampbelljr Oct 25, 2024
32f3072
Add bam and bai examples, cargo fmt
donaldcampbelljr Oct 28, 2024
b0dc3a4
begin refactoring to have bam processing be its own workflow
donaldcampbelljr Oct 28, 2024
de8be6d
refactor get_final_chromosomes to uniwig utils
donaldcampbelljr Oct 28, 2024
034fe51
add future instructions
donaldcampbelljr Oct 28, 2024
a944da1
add narrowpeak test
donaldcampbelljr Oct 29, 2024
fb5dccc
Merge remote-tracking branch 'origin/dev_bam_bedgraph_bigtools' into …
donaldcampbelljr Oct 29, 2024
36c2abb
change test back to using temp dir
donaldcampbelljr Oct 29, 2024
2fe8c81
add parallel reading of header from bam file
donaldcampbelljr Oct 29, 2024
ac1acc1
add out selection enum, begin adding match statements before counting
donaldcampbelljr Oct 29, 2024
a67409e
refactor to pass iterator to couting func for bam counting
donaldcampbelljr Oct 30, 2024
eb8f057
set up file for specific file output types immediately upon beginning…
donaldcampbelljr Oct 30, 2024
08d6922
some refactor to use new header/reader for each match of start end core
donaldcampbelljr Oct 31, 2024
64cc3fc
return a boxed file OR std_out
donaldcampbelljr Oct 31, 2024
5102119
cargo fmt
donaldcampbelljr Oct 31, 2024
7bf1df2
attempt to set up bedgraph streaming via stdin to bigtools (does not …
donaldcampbelljr Oct 31, 2024
1da7d0d
attempt using outb: BigWigWrite<File>
donaldcampbelljr Oct 31, 2024
158912d
Revert "attempt using outb: BigWigWrite<File>"
donaldcampbelljr Oct 31, 2024
ea4b141
rethink approach, some errors still need to be resolved
donaldcampbelljr Oct 31, 2024
a7fa6f4
attempt txt input update
sanghoonio Oct 31, 2024
ab4af2b
more work towards fixed_start_end_counts_bam_to_bw
donaldcampbelljr Oct 31, 2024
cc87462
fix compile errors
donaldcampbelljr Oct 31, 2024
7debb2b
cargo fmt
donaldcampbelljr Oct 31, 2024
2ecf009
cursor sort of works
donaldcampbelljr Nov 1, 2024
b32fd47
better, has erroneous overlaps
donaldcampbelljr Nov 1, 2024
6634d6e
fix reading from .txt file
donaldcampbelljr Nov 1, 2024
c381c97
add stdin option for reading files
donaldcampbelljr Nov 1, 2024
c8f0cb1
fix compile issues for BBIWriteArgs
donaldcampbelljr Nov 4, 2024
1bab14a
fix zoom field missing and causing compilation error
donaldcampbelljr Nov 4, 2024
903c8fe
fix count issue, change to coordinate_position reporting
donaldcampbelljr Nov 4, 2024
bca6d50
add better error handling for processing bam records
donaldcampbelljr Nov 4, 2024
f48ee2b
attempt to write byte slices to cursor
donaldcampbelljr Nov 4, 2024
6b2377d
fix start path generation
donaldcampbelljr Nov 4, 2024
eb9ab0a
Revert "attempt to write byte slices to cursor"
donaldcampbelljr Nov 4, 2024
09c1583
debug lines for troubleshooting
donaldcampbelljr Nov 4, 2024
901826d
attempt to use new zoom attribute for struct, does not work
donaldcampbelljr Nov 4, 2024
356cf8b
fix missing zoom attribute
donaldcampbelljr Nov 4, 2024
a38737c
fix narrowpeak accumulation counting error
donaldcampbelljr Nov 4, 2024
ae9126c
fix compile area due to missing zoom attribute
donaldcampbelljr Nov 5, 2024
c2db7b3
delete commented code from older implementation
donaldcampbelljr Nov 11, 2024
ecc8008
add new func create_bw_writer, add ends arm for bam to bw
donaldcampbelljr Nov 11, 2024
a2f7146
add func fixed_core_counts_bam_to_bw
donaldcampbelljr Nov 11, 2024
92d2767
remove debugging items
donaldcampbelljr Nov 11, 2024
24c4373
begin attempt to merge bw, some fields are private NOT public
donaldcampbelljr Nov 11, 2024
486c8c3
Merge branch 'igd_txt_input' into r_bindings
sanghoonio Nov 11, 2024
e918f28
mv igd src for python bindings
sanghoonio Nov 11, 2024
44c8926
more work towards merge, private fields need to be public
donaldcampbelljr Nov 12, 2024
e6096fa
all final bw merge using custom fork of bigtools
donaldcampbelljr Nov 12, 2024
4154b25
igd search added
sanghoonio Nov 12, 2024
b8b5e93
move igd functions out to separate file
sanghoonio Nov 12, 2024
68dce79
added igd search binding
sanghoonio Nov 13, 2024
64edd0c
attempt some refactor for pipes. Does not work due "does not live lon…
donaldcampbelljr Nov 14, 2024
7145f99
one error remaining, for file_path
donaldcampbelljr Nov 14, 2024
e88b89d
Finally compiles.
donaldcampbelljr Nov 14, 2024
a809a49
more refactoring into consumer thread, receive runtime error "broken …
donaldcampbelljr Nov 14, 2024
13622c2
better error handling but now it hangs
donaldcampbelljr Nov 15, 2024
55a7c39
this works for a bam and chromsizes file for 1 chrom
donaldcampbelljr Nov 15, 2024
d4a6387
More error handling, and removing incomplete files
donaldcampbelljr Nov 15, 2024
193079e
comment out bw merge for now
donaldcampbelljr Nov 15, 2024
073f1c7
limit number of error messages for easier debugging
donaldcampbelljr Nov 15, 2024
205b18c
move some error handling to a pre-processing step BEFORE spawning thr…
donaldcampbelljr Nov 15, 2024
a93ca42
attempt to drop writer if error, still causes hanging
donaldcampbelljr Nov 15, 2024
fe4c0cf
!this actually works! Survives no first record.
donaldcampbelljr Nov 19, 2024
5d1e58a
some clean up
donaldcampbelljr Nov 19, 2024
969e8b6
add END logic for fixed counting
donaldcampbelljr Nov 19, 2024
95c2697
add CORE logic for fixed counting
donaldcampbelljr Nov 19, 2024
3c77b7d
change default zoom to be 5, re-add merging bw files
donaldcampbelljr Nov 19, 2024
6820efc
begin refactor into wrapper functions to make code more readable
donaldcampbelljr Nov 19, 2024
fb08a66
more refactor into wrapper functions to make code more readable
donaldcampbelljr Nov 19, 2024
cbc0921
cargo fmt
donaldcampbelljr Nov 19, 2024
78dc086
comments
sanghoonio Nov 20, 2024
f537238
fix r bindings for igd_search, return formatted Vec<String>
donaldcampbelljr Nov 20, 2024
47936ec
fix igd_search test
donaldcampbelljr Nov 20, 2024
3ac17cf
fix igd_create, add wrapper func on
donaldcampbelljr Nov 20, 2024
7be1267
begin adding variable_start_end_counts_bam_to_bw
donaldcampbelljr Nov 20, 2024
9260da2
some adjustments variable_start_end_counts_bam_to_bw
donaldcampbelljr Nov 20, 2024
cfa7538
renamed rextendr wrapper functions and added r wrapper functions again
sanghoonio Nov 20, 2024
27feeb6
fix logic for variable_start_end_counts_bam_to_bw to keep track of p…
donaldcampbelljr Nov 21, 2024
db05f30
add variable_core_counts_bam_to_bw
donaldcampbelljr Nov 21, 2024
3d16aee
edit error messages to aid in debug
donaldcampbelljr Nov 21, 2024
cd51417
add checking for first record to earlier in process of bam, rethink s…
donaldcampbelljr Nov 21, 2024
4763a60
add debug argument for more verbose messaging for non-existent chroms…
donaldcampbelljr Nov 21, 2024
c41dbfa
add cleaning up bigwig files AFTER merge
donaldcampbelljr Nov 21, 2024
d8de2d1
add output_bam_counts_non_bw
donaldcampbelljr Nov 21, 2024
8679df6
remove zoom args for now
donaldcampbelljr Nov 22, 2024
a75c766
change interval to use prev_count
donaldcampbelljr Nov 25, 2024
019c7c2
merge
nleroy917 Nov 25, 2024
7596b24
allow strings as cluster labels
nleroy917 Nov 25, 2024
12610f3
begin refactor to support bed file as bam output
donaldcampbelljr Nov 25, 2024
e22794c
add bam_to_bed_no_counts and process_bed_in_threads
donaldcampbelljr Dec 2, 2024
e0d6f5c
add combining final bed files
donaldcampbelljr Dec 2, 2024
6c2a538
fix tests by adding debug bool
donaldcampbelljr Dec 2, 2024
a9ee5a5
add assessing flags via bit operations
donaldcampbelljr Dec 2, 2024
2b893de
some clean up
donaldcampbelljr Dec 2, 2024
6914ad7
more clean up
donaldcampbelljr Dec 2, 2024
14c6c3d
more more clean up
donaldcampbelljr Dec 2, 2024
02aaf86
more more more clean up
donaldcampbelljr Dec 2, 2024
2c6763d
last warnings cleaned
donaldcampbelljr Dec 2, 2024
2fe6a09
cargo fmt
donaldcampbelljr Dec 2, 2024
9227974
add counttype argument. Only works for bam processing
donaldcampbelljr Dec 2, 2024
ad0e96f
fix tests
donaldcampbelljr Dec 2, 2024
cc21a18
format
donaldcampbelljr Dec 2, 2024
5c41e15
fix scoring mode issue
nleroy917 Dec 3, 2024
86352d7
update docs
donaldcampbelljr Dec 3, 2024
c6fdc1f
Merge branch 'dev' into region_scoring
nleroy917 Dec 3, 2024
d136e8a
fix leftover
nleroy917 Dec 3, 2024
28f05d8
remove unused import
nleroy917 Dec 3, 2024
0e145ec
Merge pull request #38 from databio/region_scoring
nleroy917 Dec 3, 2024
211e2d3
update readme
donaldcampbelljr Dec 3, 2024
aa719c5
Merge pull request #47 from databio/dev_bam_rewrite
donaldcampbelljr Dec 3, 2024
641f11d
remove duplicated tests
nleroy917 Dec 3, 2024
534345e
use new release of bigtools
donaldcampbelljr Dec 3, 2024
7b28f0f
Merge branch 'dev' into dev_bam_bedgraph_bigtools
donaldcampbelljr Dec 3, 2024
60b6b4b
Merge pull request #40 from databio/dev_bam_bedgraph_bigtools
donaldcampbelljr Dec 3, 2024
ce08c3e
Merge branch 'dev' into igd_txt_input
donaldcampbelljr Dec 3, 2024
d67202f
Merge pull request #44 from databio/igd_txt_input
donaldcampbelljr Dec 3, 2024
e5de787
remove unused imports
nleroy917 Dec 3, 2024
f056e60
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
nleroy917 Dec 3, 2024
fb9f174
gitignore and initiate tests
sanghoonio Dec 3, 2024
7e34078
Merge branch 'dev' into r_bindings
sanghoonio Dec 3, 2024
2c936e5
github repo path to R bindings toml
sanghoonio Dec 3, 2024
612d131
R cargo toml comment path
sanghoonio Dec 3, 2024
7f7e8a6
Merge pull request #39 from databio/r_bindings
donaldcampbelljr Dec 3, 2024
bbc1832
bump version, changelog
nleroy917 Dec 3, 2024
5a8705f
try to fix R-CMD-check
nleroy917 Dec 3, 2024
6ccd5bd
try new working dir arg
nleroy917 Dec 3, 2024
feb85fc
another one
nleroy917 Dec 3, 2024
10c12f3
fix r-cmd-check ?
nleroy917 Dec 3, 2024
bd55730
fix bindings
nleroy917 Dec 3, 2024
e3cac35
remove windows from runner
nleroy917 Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: ./bindings
working-directory: ./bindings/python
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
Expand All @@ -36,7 +36,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./bindings/dist
path: ./bindings/python/dist

windows:
runs-on: windows-latest
Expand All @@ -55,12 +55,12 @@ jobs:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ./bindings
working-directory: ./bindings/python
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./bindings/dist
path: ./bindings/python/dist

macos:
runs-on: macos-latest
Expand All @@ -78,12 +78,12 @@ jobs:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ./bindings
working-directory: ./bindings/python
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./bindings/dist
path: ./bindings/python/dist

sdist:
runs-on: ubuntu-latest
Expand All @@ -94,12 +94,12 @@ jobs:
with:
command: sdist
args: --out dist
working-directory: ./bindings
working-directory: ./bindings/python
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./bindings/dist
path: ./bindings/python/dist

release:
name: Release
Expand All @@ -113,13 +113,13 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: wheels
path: ./bindings/dist
path: ./bindings/python/dist
- name: List contents
run: |
echo "Contents of dist/"
ls -l ./bindings/dist/
ls -l ./bindings/python/dist/
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing ./bindings/dist/*
args: --non-interactive --skip-existing ./bindings/python/dist/*
42 changes: 42 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }} rust-${{ matrix.config.rust-version }})
strategy:
fail-fast: false
matrix:
config:
# - {os: windows-latest, r: 'release', rust-version: 'stable-msvc', rust-target: 'x86_64-pc-windows-gnu'}
- {os: macOS-latest, r: 'release', rust-version: 'stable'}
- {os: ubuntu-latest, r: 'release', rust-version: 'stable'}
- {os: ubuntu-latest, r: 'devel', rust-version: 'stable'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.config.rust-version }}
targets: ${{ matrix.config.rust-target }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
working-directory: ${{ github.workspace }}/bindings/r
- uses: r-lib/actions/check-r-package@v2
with:
working-directory: ${{ github.workspace }}/bindings/r
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Cargo.lock
*.pdb

.venv

/.idea/genimtools.iml
/.idea/modules.xml
/.idea/.gitignore
/.idea/vcs.xml
# this is for "act"
bin/
bin/
/.idea/gtars.iml
/gtars/tests/data/test1.bw

.DS_Store
.Rhistory
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"rust-analyzer.linkedProjects": [
"./gtars/Cargo.toml",
"./bindings/Cargo.toml",
"./bindings/python/Cargo.toml",
"./bindings/r/src/rust/Cargo.toml",
]
}
File renamed without changes.
4 changes: 2 additions & 2 deletions bindings/Cargo.toml → bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gtars-py"
version = "0.0.15"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -10,7 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
anyhow = "1.0.82"
gtars = { path = "../gtars" }
gtars = { path = "../../gtars" }
pyo3 = { version = "0.21", features=["anyhow", "extension-module"] }
numpy = "0.21"
# pyo3-tch = { git = "https://github.com/LaurentMazare/tch-rs" }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions bindings/python/src/igd/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use pyo3::prelude::*;

use gtars::igd::search::igd_search;

#[pyclass(name="IGD")]
pub struct IGD;

#[pymethods]
impl IGD {

#[classmethod]
pub fn search(database_path: String, query_file_path: String) {

igd_search(&database_path, &query_file_path).unwrap();


}
}
1 change: 1 addition & 0 deletions bindings/src/lib.rs → bindings/python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ mod ailist;
mod models;
mod tokenizers;
mod utils;
mod igd;

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ pub fn read_tokens_from_gtok(filename: &str) -> PyResult<Vec<u32>> {
Ok(tokens)
}

#[pyfunction]
pub fn read_tokens_from_gtok_as_strings(filename: &str) -> PyResult<Vec<String>> {
let tokens = gtars::io::read_tokens_from_gtok(filename)?;
let tokens = tokens.iter().map(|t| t.to_string()).collect();
Ok(tokens)
}

#[pymodule]
pub fn utils(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_wrapped(wrap_pyfunction!(write_tokens_to_gtok))?;
m.add_wrapped(wrap_pyfunction!(read_tokens_from_gtok))?;
m.add_wrapped(wrap_pyfunction!(read_tokens_from_gtok_as_strings))?;
Ok(())
}
Binary file added bindings/r/.RData
Binary file not shown.
2 changes: 2 additions & 0 deletions bindings/r/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^src/\.cargo$
^LICENSE\.md$
13 changes: 13 additions & 0 deletions bindings/r/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: gtars
Title: Performance critical genomic interval analysis using Rust, in R
Version: 0.0.0.9000
Authors@R:
person("Nathan", "LeRoy", , "nleroy917@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7354-7213"))
Description: Performance-critical tools to manipulate, analyze, and process genomic interval data. Primarily focused on building tools for geniml - our genomic machine learning python package.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Config/rextendr/version: 0.3.1.9001
SystemRequirements: Cargo (Rust's package manager), rustc
2 changes: 2 additions & 0 deletions bindings/r/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2024
COPYRIGHT HOLDER: gtars authors
21 changes: 21 additions & 0 deletions bindings/r/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2024 gtars authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions bindings/r/NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(r_igd_create)
export(r_igd_search)
export(read_tokens_from_gtok)
export(write_tokens_to_gtok)
useDynLib(gtars, .registration = TRUE)
38 changes: 38 additions & 0 deletions bindings/r/R/extendr-wrappers.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by extendr: Do not edit by hand

# nolint start

#
# This file was created with the following call:
# .Call("wrap__make_gtars_wrappers", use_symbols = TRUE, package_name = "gtars")

#' @usage NULL
#' @useDynLib gtars, .registration = TRUE
NULL

`__init__` <- function() invisible(.Call(wrap____init__))

#' Write tokens to a gtok file
#' @export
#' @param filename A string representing the path to the gtok file.
read_tokens_from_gtok <- function(filename) .Call(wrap__r_read_tokens_from_gtok, filename)

#' Write tokens to a gtok file
#' @export
#' @param filename A string representing the path to the gtok file.
#' @param tokens The tokens to write.
write_tokens_to_gtok <- function(filename, tokens) invisible(.Call(wrap__r_write_tokens_to_gtok, filename, tokens))

#' Create an IGD database from a directory of bed files
#' @param output_path String path where the IGD database will be saved
#' @param filelist String path to either a text file containing paths to bed files, or a directory containing bed files
#' @param db_name String name for the database (will be used in output filenames)
rextendr_igd_create <- function(output_path, filelist, db_name) .Call(wrap__rextendr_igd_create, output_path, filelist, db_name)

#' Search igd with a bed file
#' @param database_path A string representing the path to the database igd file.
#' @param query_path A string representing the path to the query bed file.
rextendr_igd_search <- function(database_path, query_path) .Call(wrap__rextendr_igd_search, database_path, query_path)


# nolint end
73 changes: 73 additions & 0 deletions bindings/r/R/igd.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#' @useDynLib gtars, .registration = TRUE
NULL

#' @title Create IGD Database
#'
#' @description Creates an IGD (Indexed Genomic Data) database from a collection of BED files.
#'
#' @param output_path Character string specifying the directory where the IGD database will be saved
#' @param filelist Character string specifying either:
#' - Path to a text file containing paths to BED files (one per line)
#' - Path to a directory containing BED files
#' - "-" or "stdin" to read paths from standard input
#' @param db_name Character string specifying the name for the database (will be used in output filenames).
#' Defaults to "igd_database"
#'
#' @return NULL invisibly on success
#'
#' @examples
#' \dontrun{
#' # Create database with default name
#' igd_create("path/to/output", "path/to/bed/files")
#' }
#'
#' @export
r_igd_create <- function(output_path, filelist, db_name = "igd_database") {
# Input validation
if (!is.character(output_path) || length(output_path) != 1) {
stop("output_path must be a single character string")
}
if (!is.character(filelist) || length(filelist) != 1) {
stop("filelist must be a single character string")
}

# Call Rust function
.Call(wrap__rextendr_igd_create, output_path, filelist, db_name)

invisible(NULL)
}


#' @title Search IGD Database
#'
#' @description Searches an IGD database for region overlaps with an input BED file
#'
#' @param database_path path to .igd database
#' @param query_path path to .bed file
#'
#' @return dataframe of overlap hits
#'
#' @examples
#' \dontrun{
#' }
#'
#' @export
r_igd_search <- function(database_path, query_path) {

# Input validation
if (!is.character(database_path) || length(database_path) != 1) {
stop("database_path must be a single character string")
}
if (!is.character(query_path) || length(query_path) != 1) {
stop("query_path must be a single character string")
}

# Call Rust function
chr_vector <- .Call(wrap__rextendr_igd_search, database_path, query_path)

split_result <- strsplit(chr_vector, split = '\t')
df <- data.frame(matrix(unlist(split_result[-1]), nrow = length(chr_vector)-1, byrow = TRUE))
colnames(df) <- split_result[[1]]

invisible(df)
}
Loading
Loading
0