@@ -206,7 +206,7 @@ impl AlignmentScorer {
206206 genome_pos
207207 } ;
208208 let motif = self . detect_splice_motif ( donor, len, genome) ;
209- let score = self . score_splice_junction ( & motif) ;
209+ let score = self . score_splice_junction ( motif) ;
210210 (
211211 score,
212212 GapType :: SpliceJunction {
@@ -235,7 +235,7 @@ impl AlignmentScorer {
235235 rc_donor
236236 } ;
237237 let motif = self . detect_splice_motif ( donor, del_len, genome) ;
238- let score = self . score_splice_junction ( & motif) ;
238+ let score = self . score_splice_junction ( motif) ;
239239 (
240240 score,
241241 GapType :: SpliceJunction {
@@ -389,7 +389,7 @@ impl AlignmentScorer {
389389 donor_sa
390390 } ;
391391 let motif = self . detect_splice_motif ( donor_fwd, del as u32 , genome) ;
392- let motif_score = self . score_splice_junction ( & motif) ;
392+ let motif_score = self . score_splice_junction ( motif) ;
393393 let score2 = score1 + motif_score;
394394
395395 if score2 > max_score2 {
@@ -493,7 +493,7 @@ impl AlignmentScorer {
493493 donor_sa
494494 } ;
495495 best_motif = self . detect_splice_motif ( donor_fwd, del as u32 , genome) ;
496- best_motif_score = self . score_splice_junction ( & best_motif) ;
496+ best_motif_score = self . score_splice_junction ( best_motif) ;
497497 }
498498 }
499499
@@ -518,7 +518,7 @@ impl AlignmentScorer {
518518 }
519519
520520 /// Score a splice junction based on motif
521- pub ( crate ) fn score_splice_junction ( & self , motif : & SpliceMotif ) -> i32 {
521+ pub ( crate ) fn score_splice_junction ( & self , motif : SpliceMotif ) -> i32 {
522522 match motif {
523523 SpliceMotif :: GtAg | SpliceMotif :: CtAc => self . score_gap ,
524524 SpliceMotif :: GcAg | SpliceMotif :: CtGc => self . score_gap_gcag ,
@@ -695,7 +695,7 @@ mod tests {
695695 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
696696 assert_eq ! ( motif, SpliceMotif :: GtAg ) ;
697697
698- let score = scorer. score_splice_junction ( & motif) ;
698+ let score = scorer. score_splice_junction ( motif) ;
699699 assert_eq ! ( score, 0 ) ; // Canonical
700700 }
701701
@@ -738,7 +738,7 @@ mod tests {
738738 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
739739 assert_eq ! ( motif, SpliceMotif :: GcAg ) ;
740740
741- let score = scorer. score_splice_junction ( & motif) ;
741+ let score = scorer. score_splice_junction ( motif) ;
742742 assert_eq ! ( score, -4 ) ;
743743 }
744744
@@ -781,7 +781,7 @@ mod tests {
781781 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
782782 assert_eq ! ( motif, SpliceMotif :: AtAc ) ;
783783
784- let score = scorer. score_splice_junction ( & motif) ;
784+ let score = scorer. score_splice_junction ( motif) ;
785785 assert_eq ! ( score, -8 ) ;
786786 }
787787
@@ -822,7 +822,7 @@ mod tests {
822822 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome) ;
823823 assert_eq ! ( motif, SpliceMotif :: NonCanonical ) ;
824824
825- let score = scorer. score_splice_junction ( & motif) ;
825+ let score = scorer. score_splice_junction ( motif) ;
826826 assert_eq ! ( score, -8 ) ;
827827 }
828828
@@ -1017,7 +1017,7 @@ mod tests {
10171017 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome_ctac) ;
10181018 assert_eq ! ( motif, SpliceMotif :: CtAc ) ;
10191019 // Should score same as canonical GT-AG
1020- assert_eq ! ( scorer. score_splice_junction( & motif) , 0 ) ;
1020+ assert_eq ! ( scorer. score_splice_junction( motif) , 0 ) ;
10211021
10221022 // CT-GC motif: (1,3,2,1) — reverse complement of GC-AG
10231023 let seq_ctgc = vec ! [
@@ -1030,7 +1030,7 @@ mod tests {
10301030 let genome_ctgc = make_test_genome ( & seq_ctgc) ;
10311031 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome_ctgc) ;
10321032 assert_eq ! ( motif, SpliceMotif :: CtGc ) ;
1033- assert_eq ! ( scorer. score_splice_junction( & motif) , -4 ) ;
1033+ assert_eq ! ( scorer. score_splice_junction( motif) , -4 ) ;
10341034
10351035 // GT-AT motif: (2,3,0,3) — reverse complement of AT-AC
10361036 let seq_gtat = vec ! [
@@ -1043,7 +1043,7 @@ mod tests {
10431043 let genome_gtat = make_test_genome ( & seq_gtat) ;
10441044 let motif = scorer. detect_splice_motif ( 2 , 12 , & genome_gtat) ;
10451045 assert_eq ! ( motif, SpliceMotif :: GtAt ) ;
1046- assert_eq ! ( scorer. score_splice_junction( & motif) , -8 ) ;
1046+ assert_eq ! ( scorer. score_splice_junction( motif) , -8 ) ;
10471047 }
10481048
10491049 #[ test]
0 commit comments