Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
0b90bbc
try lift workflow
Yenaled Jul 11, 2024
fcf20ae
fix
Yenaled Jul 11, 2024
a7160a9
fix nsmpl bug
Yenaled Aug 8, 2024
c9eb9ea
update to fix some bugs in --lift --diploid
Yenaled Aug 9, 2024
a29358d
Update LiftWorkflow.h - fix diploid bug
Yenaled Aug 14, 2024
e4c483b
should fix diploid mode completely
Yenaled Aug 22, 2024
f0df6b4
indel works!
purpleblobmob Sep 21, 2024
9b06ccb
Merge pull request #26 from purpleblobmob/lift
Yenaled Sep 22, 2024
4e0a435
some clean-up
Yenaled Sep 24, 2024
319646b
indel
Yenaled Sep 24, 2024
27b809e
fix htslib inclusion
Yenaled Sep 24, 2024
c5b04d4
add rename to lift
Yenaled Sep 24, 2024
230f8ba
Update main.cpp
Yenaled Sep 24, 2024
c4a3259
add missing include
zimward Sep 28, 2024
9eba1b2
lift: add --filter option, redo temp files, in progress: make fai a t…
Yenaled Sep 30, 2024
6bc9393
try custom fai index file
Yenaled Sep 30, 2024
ea4ebf8
fix
Yenaled Sep 30, 2024
dda462e
fix
Yenaled Sep 30, 2024
770dec2
lift-mers opts
Yenaled Oct 1, 2024
a81d786
update
Yenaled Oct 1, 2024
5a4d4b3
update
Yenaled Oct 1, 2024
34d3759
fix
Yenaled Oct 1, 2024
e18ac13
update
Yenaled Oct 3, 2024
7bb2a8b
in --lift k-mer extraction, output variant names and handle deletions…
Yenaled Dec 2, 2024
88e293f
update --lift help menu and implement renaming k-mer seq fasta headers
Yenaled Dec 2, 2024
7d05d9f
implement options for --lift
Yenaled Dec 2, 2024
1b29635
fix vlen.c
Yenaled Dec 2, 2024
94c5f3b
Update LiftWorkflow.h
Yenaled Dec 2, 2024
856aaef
fix edge-case bug in --lift
Yenaled Dec 3, 2024
97724a4
Updated functional tests
Yenaled Dec 3, 2024
abbc212
Updated functional tests
Yenaled Dec 3, 2024
690af02
Merge branch 'lift' of https://github.com/pachterlab/splitcode into lift
Yenaled Dec 3, 2024
fc6953c
minor updates and tests
Yenaled Dec 3, 2024
94fa796
Added lift SJ
Yenaled Dec 5, 2024
64aa7ea
partial nesting implementation
Yenaled Dec 12, 2024
a078a5a
some fixes for nest
Yenaled Dec 17, 2024
a6aac06
major update to nest
Yenaled Dec 19, 2024
7272ff0
better queue'ing IO
Yenaled Dec 19, 2024
db9f36e
minor fix to -x
Yenaled Dec 19, 2024
be33832
implement optimize assignment
Yenaled Dec 23, 2024
fa52017
update functional tests
Yenaled Dec 24, 2024
5542993
update
Yenaled Dec 24, 2024
21d9e38
minor update functional tests
Yenaled Dec 24, 2024
3f10827
put functional tests for --barcode-encode
Yenaled Dec 24, 2024
63c91ce
try zlib-ng
Yenaled Dec 24, 2024
783eee8
update
Yenaled Dec 24, 2024
f8b8616
update
Yenaled Dec 24, 2024
3f493a6
add some functional tests
Yenaled Dec 25, 2024
2526a58
another test
Yenaled Dec 25, 2024
3c96cc4
another func test update
Yenaled Dec 25, 2024
cd10edb
fix table
Yenaled Dec 26, 2024
96fe941
update barcode length logic
Yenaled Dec 26, 2024
578d106
update writing of barcodes
Yenaled Dec 26, 2024
0fb58f4
fix
Yenaled Dec 26, 2024
7fd4cfa
update
Yenaled Dec 26, 2024
8204be8
fix numreads
Yenaled Dec 27, 2024
16338ad
update
Yenaled Dec 27, 2024
1cdb2ec
update
Yenaled Dec 27, 2024
1558914
Update ProcessReads.cpp
Yenaled Dec 27, 2024
4cfd754
update
Yenaled Dec 27, 2024
9b7b733
comment
Yenaled Dec 27, 2024
3535ba1
fix
Yenaled Dec 27, 2024
89dfde2
fix
Yenaled Dec 28, 2024
9190e31
fix
Yenaled Dec 28, 2024
4bcff79
pass tests
Yenaled Dec 28, 2024
99563d7
--from-name and --random working
Yenaled Dec 31, 2024
9e2963b
update revcomp
Yenaled Dec 31, 2024
8cd831b
update functional tests
Yenaled Dec 31, 2024
173ed14
some fixes
Yenaled Dec 31, 2024
40dd137
update compressBound assertions
Yenaled Dec 31, 2024
e42c7a0
enable zlib-ng by default
Yenaled Dec 31, 2024
7f5baa0
Fixes issue #15
Yenaled Jan 1, 2025
bc5915b
Merge pull request #28 from zimward/main
Yenaled Jan 1, 2025
b4922c7
update version to 0.31.0
Yenaled Jan 1, 2025
bafb196
fix test
Yenaled Jan 1, 2025
77ab439
update random
Yenaled Jan 1, 2025
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
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ include(ExternalProject)



if (ZLIBNG)
if (NOT ZLIBNG_DISABLE)
message("zlib-ng enabled.")
set(ZLIBNG "ON")
ExternalProject_Add(zlib-ng
PREFIX ${PROJECT_SOURCE_DIR}/ext/zlib-ng
SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/zlib-ng
Expand All @@ -61,7 +62,7 @@ if (ZLIBNG)
BUILD_COMMAND cd zlib-ng && make
INSTALL_COMMAND ""
)
endif(ZLIBNG)
endif(ZLIBNG_DISABLE)


if (USE_HTSLIB)
Expand Down
6 changes: 3 additions & 3 deletions ext/htslib/bgzf.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int mode2level(const char *__restrict mode)
BGZF *bgzf_open(const char *path, const char *mode)
{
BGZF *fp = 0;
assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
//assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
if (strchr(mode, 'r')) {
hFILE *fpr;
if ((fpr = hopen(path, mode)) == 0) return 0;
Expand All @@ -177,7 +177,7 @@ BGZF *bgzf_open(const char *path, const char *mode)
BGZF *bgzf_dopen(int fd, const char *mode)
{
BGZF *fp = 0;
assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
//assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
if (strchr(mode, 'r')) {
hFILE *fpr;
if ((fpr = hdopen(fd, mode)) == 0) return 0;
Expand All @@ -199,7 +199,7 @@ BGZF *bgzf_dopen(int fd, const char *mode)
BGZF *bgzf_hopen(hFILE *hfp, const char *mode)
{
BGZF *fp = NULL;
assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
//assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
if (strchr(mode, 'r')) {
fp = bgzf_read_init(hfp);
if (fp == NULL) return NULL;
Expand Down
14 changes: 7 additions & 7 deletions ext/htslib/faidx.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ void fai_destroy(faidx_t *fai)
free(fai);
}

int fai_build(const char *fn)
int fai_build(const char *fn, const char* fai_file)
{
char *str;
BGZF *bgzf;
FILE *fp;
faidx_t *fai;
str = (char*)calloc(strlen(fn) + 5, 1);
sprintf(str, "%s.fai", fn);
str = (char*)calloc(strlen(fai_file) + 1, 1);
sprintf(str, "%s", fai_file);
bgzf = bgzf_open(fn, "r");
if ( !bgzf ) {
fprintf(stderr, "[fai_build] fail to open the FASTA file %s\n",fn);
Expand Down Expand Up @@ -243,13 +243,13 @@ FILE *download_and_open(const char *fn)
}
#endif

faidx_t *fai_load(const char *fn)
faidx_t *fai_load(const char *fn, const char* fai_file)
{
char *str;
FILE *fp;
faidx_t *fai;
str = (char*)calloc(strlen(fn) + 5, 1);
sprintf(str, "%s.fai", fn);
str = (char*)calloc(strlen(fai_file) + 1, 1);
sprintf(str, "%s", fai_file);

#ifdef _USE_KNETFILE
if (strstr(fn, "ftp://") == fn || strstr(fn, "http://") == fn)
Expand All @@ -267,7 +267,7 @@ faidx_t *fai_load(const char *fn)
fp = fopen(str, "rb");
if (fp == 0) {
fprintf(stderr, "[fai_load] build FASTA index.\n");
fai_build(fn);
fai_build(fn, fai_file);
fp = fopen(str, "rb");
if (fp == 0) {
fprintf(stderr, "[fai_load] fail to open FASTA index.\n");
Expand Down
4 changes: 2 additions & 2 deletions ext/htslib/htslib/faidx.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern "C" {
@return 0 on success; or -1 on failure
@discussion File "fn.fai" will be generated.
*/
int fai_build(const char *fn);
int fai_build(const char *fn, const char* fai_file);

/*!
@abstract Distroy a faidx_t struct.
Expand All @@ -70,7 +70,7 @@ extern "C" {
@abstract Load index from "fn.fai".
@param fn File name of the FASTA file
*/
faidx_t *fai_load(const char *fn);
faidx_t *fai_load(const char *fn, const char* fai_file);

/*!
@abstract Fetch the sequence in a region.
Expand Down
58 changes: 58 additions & 0 deletions func_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,61 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/b.fastq

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/configb.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test_1.vcf.gz
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test_2.vcf.gz
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/vcf_validation.fa.gz
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/example.SJ.tab
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.1.R1.fa
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.1.R1.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest_config.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest_config_2.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.1.R2.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.2.R1.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.2.R2.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest_config_3.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.3.R1.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest.test.3.R2.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest_config_4.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/nest_config_5.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config_fastassign.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config_fastassign_2.txt
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/from_name.fq
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

7 changes: 7 additions & 0 deletions func_tests/config_fastassign.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tags groups
ATATATA A
GTGTGTG B
CCCCCC C
AAAAAAAA D
TTTTTTTT E
GGGGGGG F
7 changes: 7 additions & 0 deletions func_tests/config_fastassign_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tags groups
ATATATA A
GTGTGTG B
CCCCCC D
AAAAAAAA D
TTTTTTTT E
GGGGGGG F
6 changes: 6 additions & 0 deletions func_tests/example.SJ.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MT 3 5 +
MT 3 5 +
MT 2 5 -
MT 31 60 +
1 2 5 -
1 3094999 3096284 +
4 changes: 4 additions & 0 deletions func_tests/from_name.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@aaa 1:N:ATCCC+ATCG
GGGGAGAGAGCGATAGACATA
+
JJJJJJJJJJJJJJJJJJJJJ
2 changes: 2 additions & 0 deletions func_tests/nest.test.1.R1.fa
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>a
ATCGTTTCGCGCC
4 changes: 4 additions & 0 deletions func_tests/nest.test.1.R1.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@a
ATCGTTTCGCGCG
+
AAAAAAAAAAAAA
4 changes: 4 additions & 0 deletions func_tests/nest.test.1.R2.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@a
CCCCCCCCCCCCC
+
AAAAAAAAAAAAA
8 changes: 8 additions & 0 deletions func_tests/nest.test.2.R1.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@b
CGCGAAAAAAAAAAAAA
+
KKKKKKKKKKKKKKKKK
@c
ATCGTTTCGCGCG
+
AAAAAAAAAAAAA
8 changes: 8 additions & 0 deletions func_tests/nest.test.2.R2.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@b
ATCGGGAAAAAAAAAAA
+
KKKKKKKKKKKKKKKKK
@c
ATCGTTTCGCGCG
+
AAAAAAAAAAAAA
16 changes: 16 additions & 0 deletions func_tests/nest.test.3.R1.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@a
GTGTGTGTCCCCCCCCTTTTTTTT
+
KKKKKKKKKKKKKKKKKKKKKKKK
@b
GTGTGTGTAAAAAAAATTTTTTTT
+
KKKKKKKKKKKKKKKKKKKKKKKK
@c
GTGTGTGTCCCCCCCCTTTTTTTT
+
KKKKKKKKKKKKKKKKKKKKKKKK
@d
GTGTGTGTAAAAAAAATTTTTTTT
+
KKKKKKKKKKKKKKKKKKKKKKKK
16 changes: 16 additions & 0 deletions func_tests/nest.test.3.R2.fq
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@a
AAAAAAAAGGGGGGGGG
+
KKKKKKKKKKKKKKKKK
@b
AAAAAAAAGGGGGGGGG
+
KKKKKKKKKKKKKKKKK
@c
ACCCCAAAGGGGGGGGG
+
KKKKKKKKKKKKKKKKK
@d
ACCCCAAAGGGGGGGGG
+
KKKKKKKKKKKKKKKKK
11 changes: 11 additions & 0 deletions func_tests/nest_config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ids tags subs
X ATCG GGGGG
Y CGCG
Z TTT

@nest

ids tags subs
B GTTT AAA
Y CCCC
Z CGCGCG
15 changes: 15 additions & 0 deletions func_tests/nest_config_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@extract {X}<./func_tests/xxx[5]>

ids tags subs
X ATCG GGGGG
Y CGCG
Z TTT

@nest

ids tags subs
B GTTT AAA
Y CCCC
Z CGCGCG


23 changes: 23 additions & 0 deletions func_tests/nest_config_3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@extract {X}<xxx[5]>

ids tags subs
X ATCG GGGGG
Y CGCG
Z TTT

@nest

ids tags subs
B GTTT AAA
Y CCCC
Z CGCGCG

@nest

@x-only
@extract {GGA}<./func_tests/xx>1:-1

tags locations
GGA 1


17 changes: 17 additions & 0 deletions func_tests/nest_config_4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

@assign

@keep:
R,R2

ids tags locations
R AAAAAA 1:0:10
R2 GGGGGG 1:10


@nest

@x-only
@no-tags
@filter-len 0,24,17

22 changes: 22 additions & 0 deletions func_tests/nest_config_5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@extract {X}<xxx[5]>

ids tags subs
X ATCG GGGGG
Y CGCG
Z TTT

@nest

ids tags subs
B GTTT AAA
Y CCCC
Z CGCGCG

@nest

@extract {GGA}<./func_tests/xx>1:-1

tags locations
GGA 1


Loading