@@ -47,6 +47,8 @@ pub struct AlignmentScorer {
4747 pub align_spliced_mate_map_lmin : u32 ,
4848 /// Min mapped length of spliced mates as fraction of read length (default 0.66)
4949 pub align_spliced_mate_map_lmin_over_lmate : f64 ,
50+ /// Minimum alignment score relative to read length (outFilterScoreMinOverLread, default 0.66)
51+ pub out_filter_score_min_over_lread : f64 ,
5052}
5153
5254impl AlignmentScorer {
@@ -73,6 +75,7 @@ impl AlignmentScorer {
7375 score_stitch_sj_shift : 1 ,
7476 align_spliced_mate_map_lmin : 0 ,
7577 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
78+ out_filter_score_min_over_lread : 0.66 ,
7679 }
7780 }
7881
@@ -110,6 +113,7 @@ impl AlignmentScorer {
110113 score_stitch_sj_shift : params. score_stitch_sj_shift ,
111114 align_spliced_mate_map_lmin : params. align_spliced_mate_map_lmin ,
112115 align_spliced_mate_map_lmin_over_lmate : params. align_spliced_mate_map_lmin_over_lmate ,
116+ out_filter_score_min_over_lread : params. out_filter_score_min_over_lread ,
113117 }
114118 }
115119
@@ -704,6 +708,7 @@ mod tests {
704708 score_stitch_sj_shift : 1 ,
705709 align_spliced_mate_map_lmin : 0 ,
706710 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
711+ out_filter_score_min_over_lread : 0.66 ,
707712 } ;
708713
709714 // Intron from position 2, length 12 (spans positions 2-13 inclusive)
@@ -747,6 +752,7 @@ mod tests {
747752 score_stitch_sj_shift : 1 ,
748753 align_spliced_mate_map_lmin : 0 ,
749754 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
755+ out_filter_score_min_over_lread : 0.66 ,
750756 } ;
751757
752758 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
@@ -789,6 +795,7 @@ mod tests {
789795 score_stitch_sj_shift : 1 ,
790796 align_spliced_mate_map_lmin : 0 ,
791797 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
798+ out_filter_score_min_over_lread : 0.66 ,
792799 } ;
793800
794801 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
@@ -829,6 +836,7 @@ mod tests {
829836 score_stitch_sj_shift : 1 ,
830837 align_spliced_mate_map_lmin : 0 ,
831838 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
839+ out_filter_score_min_over_lread : 0.66 ,
832840 } ;
833841
834842 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
@@ -862,6 +870,7 @@ mod tests {
862870 score_stitch_sj_shift : 1 ,
863871 align_spliced_mate_map_lmin : 0 ,
864872 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
873+ out_filter_score_min_over_lread : 0.66 ,
865874 } ;
866875
867876 let ( score, gap_type) = scorer. score_gap ( 0 , 5 , 0 , & genome) ;
@@ -893,6 +902,7 @@ mod tests {
893902 score_stitch_sj_shift : 1 ,
894903 align_spliced_mate_map_lmin : 0 ,
895904 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
905+ out_filter_score_min_over_lread : 0.66 ,
896906 } ;
897907
898908 // Small gap (< align_intron_min) is deletion
@@ -932,6 +942,7 @@ mod tests {
932942 score_stitch_sj_shift : 1 ,
933943 align_spliced_mate_map_lmin : 0 ,
934944 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
945+ out_filter_score_min_over_lread : 0.66 ,
935946 } ;
936947
937948 // Gap starting at position 2 (GT), length 26 (>= 21) is splice junction
@@ -969,6 +980,7 @@ mod tests {
969980 score_stitch_sj_shift : 1 ,
970981 align_spliced_mate_map_lmin : 0 ,
971982 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
983+ out_filter_score_min_over_lread : 0.66 ,
972984 } ;
973985
974986 // Annotated junction should get bonus
@@ -1010,6 +1022,7 @@ mod tests {
10101022 score_stitch_sj_shift : 1 ,
10111023 align_spliced_mate_map_lmin : 0 ,
10121024 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
1025+ out_filter_score_min_over_lread : 0.66 ,
10131026 } ;
10141027
10151028 // CT-AC motif: (1,3,0,1) — reverse complement of GT-AG
@@ -1114,6 +1127,7 @@ mod tests {
11141127 score_stitch_sj_shift : 1 ,
11151128 align_spliced_mate_map_lmin : 0 ,
11161129 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
1130+ out_filter_score_min_over_lread : 0.66 ,
11171131 } ;
11181132
11191133 // Gap of exactly 589824 starting at position 100 should be splice junction
@@ -1192,6 +1206,7 @@ mod tests {
11921206 score_stitch_sj_shift : 1 ,
11931207 align_spliced_mate_map_lmin : 0 ,
11941208 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
1209+ out_filter_score_min_over_lread : 0.66 ,
11951210 } ;
11961211
11971212 // Gap of 1001 (> 1000 max) should be deletion, not splice junction
@@ -1242,6 +1257,7 @@ mod tests {
12421257 score_stitch_sj_shift : 1 ,
12431258 align_spliced_mate_map_lmin : 0 ,
12441259 align_spliced_mate_map_lmin_over_lmate : 0.66 ,
1260+ out_filter_score_min_over_lread : 0.66 ,
12451261 }
12461262 }
12471263
0 commit comments