Skip to content

Commit c8720ca

Browse files
authored
Merge pull request #52 from pachterlab/devel
Merge 0.31.5 into main
2 parents 2bb75cf + e45ee8f commit c8720ca

File tree

11 files changed

+150
-15
lines changed

11 files changed

+150
-15
lines changed

func_tests/CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,27 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smR2.fastq.gz
105105
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config_sm.txt
106106
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
107107

108+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config.tsv
109+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
110+
111+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config_.tsv
112+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
113+
114+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config__.tsv
115+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
116+
117+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config___.tsv
118+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
119+
120+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.fastq
121+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
122+
123+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input_.fastq
124+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
125+
126+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input__.fastq
127+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
128+
129+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input___.fastq
130+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
131+

func_tests/config.tsv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
groups ids tags distances locations previous
2+
NYStgBot Y18 TCTCCTTACG 0:0:0 0:0:11 -
3+
NYStgBot Y32 TGTAGTTCTA 0:1:1 0:0:11 -
4+
OddBot3 O45 GCCTAGTAGAAGACGTT 2:2:2 0:11:0 {{NYStgBot}}4-10
5+
EvenBot2 E41 ATAGATTGTTGCGTGCT 2:2:2 0:11:0 {{OddBot3}}4-10
6+
OddBot2 O21 GGATAGCACCGTTCATT 1:1:1 0:11:0 {{EvenBot2}}4-10
7+
EvenBot1 E2 TGTAGGTTCTGGAATAT 0:0:0 0:11:0 {{OddBot2}}4-10
8+
OddBot1 O85 GCTGTGTCTGTCACCT 1:1:1 0:11:0 {{EvenBot1}}4-10
9+
DPM_const DPM_const TCATGTCTTCCGATCT 2:0:2 0:11:0 {{OddBot1}}4-10
10+
DPM_R2 DPM1 TGGGTGTTT 1:0:1 0:11:0 {DPM_const}0-0

func_tests/config_.tsv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tags locations
2+
TGTAGG 0:0:0
3+
TGTAGGTT 0:0:0
4+
TGGG 0:0:0

func_tests/config__.tsv

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ids tags distance
2+
tagT TTT 0
3+
tagT TTTT 0
4+
tagT TTTTT 0
5+
tagT TTTTTT 0
6+
tagT TTTTTTT 0
7+
tagT TTTTTTTT 0
8+
tagT TTTTTTTTT 0
9+
tagT TTTTTTTTTT 1
10+
tagT TTTTTTTTTTT 1
11+
tagT TTTTTTTTTTTT 1
12+
tagT TTTTTTTTTTTTT 1
13+
tagT TTTTTTTTTTTTTT 1
14+
tagT TTTTTTTTTTTTTTT 1
15+

func_tests/config___.tsv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ids tags distance partial5
2+
tagT TTTTTTTTTT 0 3:0.2
3+
tagA AAAAAAAAAA 1 3:0.2
4+
tagG GGGGGGGGGG 1 -
5+

func_tests/input.fastq

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@r1
2+
TCTCCTTACGGACAACTGCCTAGTAGAAGACGTTTGACTTGATAGATTGTTGCGTGCTCACAACTGGATAGCACCGTTCATTTGACTTGTGTAGGTTCTGGAATATGACAACTGCTGTGTCTGTCACCTTTGACTTGTCA
3+
+
4+
TCTCCTTACGGACAACTGCCTAGTAGAAGACGTTTGACTTGATAGATTGTTGCGTGCTCACAACTGGATAGCACCGTTCATTTGACTTGTGTAGGTTCTGGAATATGACAACTGCTGTGTCTGTCACCTTTGACTTGTCA

func_tests/input_.fastq

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@r
2+
NNNNNNNNNNTGACTTGTGTAGGTTCTGGAAT
3+
+
4+
NNNNNNNNNNTGACTTGTGTAGGTTCTGGAAT

func_tests/input__.fastq

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@11_bp_no_mismatch
2+
AAATTTTTTTTTTTAAA
3+
+
4+
;;;;;;;;;;;;;;;;;
5+
@11_bp_1_internal_mismatch
6+
AAATTTTTTTTTCTAAA
7+
+
8+
;;;;;;;;;;;;;;;;;
9+
@11_bp_1_internal_mismatch2
10+
AAATTTTTTTTCTTAAA
11+
+
12+
;;;;;;;;;;;;;;;;;
13+
@11_bp_1_5prime_mismatch
14+
AAACTTTTTTTTTTAAA
15+
+
16+
;;;;;;;;;;;;;;;;;
17+
@11_bp_1_3prime_mismatch
18+
AAATTTTTTTTTTCAAA
19+
+
20+
;;;;;;;;;;;;;;;;;
21+

func_tests/input___.fastq

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@read1 5prime tagT
2+
TTTTTTTTTT
3+
+
4+
;;;;;;;;;;
5+
@read2 5prime tagT with 3prime substitution
6+
TTTTTTTTTC
7+
+
8+
;;;;;;;;;;
9+
@read3 5prime tagT with interior substitution
10+
TTTCTTTTTT
11+
+
12+
;;;;;;;;;;
13+
@read4 5prime tagT with interior substitution within first 3 bp
14+
TTCTTTTTTT
15+
+
16+
;;;;;;;;;;
17+
@read5 5prime tagT with interior substitution within first 3 bp
18+
TCTTTTTTTT
19+
+
20+
;;;;;;;;;;
21+
@read6 5prime tagT with 5prime substitution
22+
CTTTTTTTTT
23+
+
24+
;;;;;;;;;;
25+
@read7 5prime tagT with 5prime and 3prime substitutions
26+
CTTTTTTTTC
27+
+
28+
;;;;;;;;;;
29+
@read8 5prime tagT with 5prime and interior substitutions
30+
CTTTTTTCTT
31+
+
32+
;;;;;;;;;;
33+
@read9 5prime tagA with 5prime and interior substitutions; like read3
34+
AAACAAAAAA
35+
+
36+
;;;;;;;;;;
37+
@read10 5prime tagG with 5prime and interior substitutions; like read3
38+
GGGCGGGGGG
39+
+
40+
;;;;;;;;;;
41+

func_tests/runtests.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,6 @@ checkcmdoutput "cat $test_dir/mx.txt" b95e8b332c8a0a7ffc0f91118e754302
9494

9595
checkcmdoutput "$splitcode --assign --x-only --nFastqs=2 --empty N -x \"0:0<R1>0:-1,<R1[10]>{adapter},{adapter}<R1[1-65]>,2:0<R2[1-65]>\" --gzip --mod-names --bclen=20 -t 1 -c $test_dir/config_sm.txt --mapping=/dev/null --pipe $test_dir/smR1.fastq.gz $test_dir/smR2.fastq.gz" 8fc440842f4e2922976cdc1b165008b1
9696

97-
# Test lift workflow
98-
99-
checkcmdoutput "$splitcode --lift $test_dir/vcf_validation.fa.gz $test_dir/test_1.vcf.gz CAST_EiJ --kmer-length=31 --kmer-output=$test_dir/test.kmers.1.txt" 7e9c1d67efdf7113bfab367cb5d2d640
100-
checkcmdoutput "$splitcode --lift $test_dir/vcf_validation.fa.gz $test_dir/test_2.vcf.gz CAST_EiJ --rename --kmer-length=31 --kmer-output=$test_dir/test.kmers.2.txt" c9a91833da19b20383d6bd1d3e32ff8f
101-
checkcmdoutput "cat $test_dir/test.kmers.1.txt" 54d189f4549f6b35ea80ec5c167332b7
102-
checkcmdoutput "cat $test_dir/test.kmers.2.txt" 9982de087ed358724580836600cc9ba7
103-
checkcmdoutput "$splitcode --lift $test_dir/vcf_validation.fa.gz $test_dir/test_2.vcf.gz CAST_EiJ --diploid --kmer-length=31 --kmer-output=$test_dir/test.kmers.2.txt" 6c33bd3ba7cd9aaefeca5cbaa272cdfe
104-
checkcmdoutput "cat $test_dir/test.kmers.2.txt" a4c73b67a0ad6e5094ff7f2dfdda15bc
105-
checkcmdoutput "$splitcode --lift --snv-only $test_dir/vcf_validation.fa.gz $test_dir/test_2.vcf.gz CAST_EiJ" 4bdcaf9f34da45033d477651d8845bf2
106-
checkcmdoutput "$splitcode --lift --kmer-sj $test_dir/vcf_validation.fa.gz $test_dir/example.SJ.tab --kmer-length=31 --kmer-header=X_ --kmer-header-num" 1e88d0b72323a6c11faa73e19007fc5f
10797

10898

10999
# Test from-name, random, and revcomp
@@ -239,14 +229,21 @@ checkcmdoutput "$splitcode --trim-only --pipe -q 10 --qtrim-3 -s $test_dir/test_
239229
cmdexec "wc $test_dir/test_summary.txt"
240230
checkcmdoutput "$splitcode --trim-only --pipe -q 10 --qtrim-3 --qtrim-pre -5 5 -E ATCG $test_dir/test.fq" 1b5a09bd343382ee78c9aa51245557c2
241231

232+
# Some fixes (Dec. 2025)
233+
234+
checkcmdoutput "$splitcode --trim-only --pipe -c $test_dir/config.tsv --loc-names --out-fasta --nFastqs 1 $test_dir/input.fastq" a4508f24c69838b07cec04978def09ca
235+
checkcmdoutput "$splitcode --trim-only --pipe -c $test_dir/config_.tsv --loc-names --out-fasta --nFastqs 1 $test_dir/input_.fastq" 200fb9106e47c741b1891e4b2fedef05
236+
checkcmdoutput "$splitcode --trim-only --pipe -c $test_dir/config__.tsv --loc-names --out-fasta --nFastqs 1 $test_dir/input__.fastq" 4caa199550f26000ac787821cc62668c
237+
checkcmdoutput "$splitcode --trim-only --pipe -c $test_dir/config___.tsv --loc-names --out-fasta --nFastqs 1 $test_dir/input___.fastq" 209698dea910ed4d4cd05dbce0889800
238+
242239
# Adapter trimming tests
243240

244241
checkcmdoutput "$splitcode --trim-only -b CCAAA --partial5=3:0.35 --left=1 --pipe $test_dir/test.fq" b637fbabe71eb90bb9b3399a17eabef7
245242
checkcmdoutput "$splitcode --trim-only -b CCAAA --partial5=3:0.34 --left=1 --pipe $test_dir/test.fq" b637fbabe71eb90bb9b3399a17eabef7
246243
checkcmdoutput "$splitcode --trim-only -b CCAAA --partial5=3:0.33 --left=1 --pipe $test_dir/test.fq" cb52b79ed7469ca2ffe5739ec544b157
247244
checkcmdoutput "$splitcode --trim-only -b CCAAA --partial5=4:0.34 --left=1 --pipe $test_dir/test.fq" cb52b79ed7469ca2ffe5739ec544b157
248-
checkcmdoutput "$splitcode --trim-only -b CCAAA --partial5=2:0.34 --left=1 --pipe $test_dir/test.fq" c6eba12c36e53301f23a9823c2901f24
249-
checkcmdoutput "$splitcode --trim-only -b CCAAA,CCGGAA --partial5=2:0.34, --partial3=,4 --left=1,0 --right=0,1 --pipe $test_dir/test.fq" 5d4541fb96da328d07ab9189216cf4a5
245+
checkcmdoutput "$splitcode --trim-only -b CCAAA --partial5=2:0.34 --left=1 --pipe $test_dir/test.fq" b637fbabe71eb90bb9b3399a17eabef7
246+
checkcmdoutput "$splitcode --trim-only -b CCAAA,CCGGAA --partial5=2:0.34, --partial3=,4 --left=1,0 --right=0,1 --pipe $test_dir/test.fq" 93f1726415edb410d5e733603bc4be11
250247
checkcmdoutput "$splitcode --trim-only -b CCGC -l 0:-4:0 --partial3=4:0.25 --right=1 --pipe $test_dir/test.fq" 11b55a195b5976331305569416db5bd4
251248
checkcmdoutput "$splitcode --trim-only -b CCGG,CCGG -i a,b -l 0:-4:9,1:-4:10 --partial3=2,2 --right=1,1 -N 2 --pipe $test_dir/test.fq $test_dir/test.fq" 6807e3ba911fde8fb437f693d055c11f
252249
checkcmdoutput "$splitcode --trim-only -b CCGC,GAAG -a ,{CCGC} -v {GAAG}, -l 0:-4:0, --partial3=4:0.25,3 --partial5=4,3 --right=1,0 --left=0,1 --pipe $test_dir/test.fq" 93f1726415edb410d5e733603bc4be11
@@ -553,4 +550,14 @@ TATTATGGTCCCCCCCCTTCGTGGAATCTAGCTGACTTGTGACTAGCTDGGGGGGGGGG" > $test_dir/test_te
553550

554551
checkcmdoutput "$splitcode --assign -m /dev/null --mod-names -g PART,RPM,RPM,ODD,Y -i Part,RTBC2,RTBC4,Odd2Bo1,NYBot1_Stg -b TGACTTG,TTTTTTT,GGGGGGG,TTCGTGGAATCTAGC,TATTATGGT --maxFindsG=Y:1 -p $test_dir/test_term.fq" 79ad1ca9184b274e1396b5f2220cbade
555552

553+
# Test lift workflow
554+
555+
checkcmdoutput "$splitcode --lift $test_dir/vcf_validation.fa.gz $test_dir/test_1.vcf.gz CAST_EiJ --kmer-length=31 --kmer-output=$test_dir/test.kmers.1.txt" 7e9c1d67efdf7113bfab367cb5d2d640
556+
checkcmdoutput "$splitcode --lift $test_dir/vcf_validation.fa.gz $test_dir/test_2.vcf.gz CAST_EiJ --rename --kmer-length=31 --kmer-output=$test_dir/test.kmers.2.txt" c9a91833da19b20383d6bd1d3e32ff8f
557+
checkcmdoutput "cat $test_dir/test.kmers.1.txt" 54d189f4549f6b35ea80ec5c167332b7
558+
checkcmdoutput "cat $test_dir/test.kmers.2.txt" 9982de087ed358724580836600cc9ba7
559+
checkcmdoutput "$splitcode --lift $test_dir/vcf_validation.fa.gz $test_dir/test_2.vcf.gz CAST_EiJ --diploid --kmer-length=31 --kmer-output=$test_dir/test.kmers.2.txt" 6c33bd3ba7cd9aaefeca5cbaa272cdfe
560+
checkcmdoutput "cat $test_dir/test.kmers.2.txt" a4c73b67a0ad6e5094ff7f2dfdda15bc
561+
checkcmdoutput "$splitcode --lift --snv-only $test_dir/vcf_validation.fa.gz $test_dir/test_2.vcf.gz CAST_EiJ" 4bdcaf9f34da45033d477651d8845bf2
562+
checkcmdoutput "$splitcode --lift --kmer-sj $test_dir/vcf_validation.fa.gz $test_dir/example.SJ.tab --kmer-length=31 --kmer-header=X_ --kmer-header-num" 1e88d0b72323a6c11faa73e19007fc5f
556563

0 commit comments

Comments
 (0)