File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ def pept2data
9
9
@equate_il = params [ :equate_il ] . nil? ? true : params [ :equate_il ]
10
10
11
11
# If equate_il is set, we have to replace all I's by and L in the input peptides.
12
- equalized_pepts = peptides . map { |p | p . gsub ( 'I' , 'L' ) } if @equate_il
12
+ equalized_pepts = @equate_il ? peptides . map { |p | p . gsub ( 'I' , 'L' ) } : peptides
13
13
14
14
@peptides = Sequence
15
15
. includes ( Sequence . lca_t_relation_name ( @equate_il ) => :lineage )
16
16
. where ( sequence : equalized_pepts )
17
17
. where . not ( Sequence . lca_t_relation_name ( @equate_il ) => nil )
18
18
if missed
19
- @peptides += peptides
19
+ @peptides += equalized_pepts
20
20
. to_set . subtract ( @peptides . map ( &:sequence ) )
21
21
. map { |p | Sequence . missed_cleavage ( p , @equate_il ) }
22
22
. compact
@@ -34,7 +34,7 @@ def pept2data
34
34
@original_pep_fas = { }
35
35
36
36
peptides . each do |original_seq |
37
- equalized_seq = original_seq . gsub ( 'I' , 'L' )
37
+ equalized_seq = @equate_il ? original_seq . gsub ( 'I' , 'L' ) : original_seq
38
38
if eq_seq_to_info . key? equalized_seq
39
39
@original_pep_results [ original_seq ] = eq_seq_to_info [ equalized_seq ]
40
40
@original_pep_fas [ original_seq ] = eq_seq_to_fa [ equalized_seq ]
You can’t perform that action at this time.
0 commit comments