Mercurial > repos > goeckslab > cell_intensity_processing
comparison process_intensities.xml @ 4:5d541df02496 draft
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/mti-utils commit 5cf3005f482381216061eb8718aba8f5c8bcb0d5
author | goeckslab |
---|---|
date | Fri, 10 May 2024 21:01:41 +0000 |
parents | 4f5abe01531c |
children | afa3cb2110eb |
comparison
equal
deleted
inserted
replaced
3:4f5abe01531c | 4:5d541df02496 |
---|---|
28 | 28 |
29 #if $AF_method.select_method == 'SBR': | 29 #if $AF_method.select_method == 'SBR': |
30 AF_markers = [x for x in list(marker_df['${AF_method.AF_col}'].unique()) if x != 'None'] | 30 AF_markers = [x for x in list(marker_df['${AF_method.AF_col}'].unique()) if x != 'None'] |
31 print(f'Detected {quant[AF_markers].eq(0.0).any(axis=1).sum()} cells with AF values of zero in the dataset') | 31 print(f'Detected {quant[AF_markers].eq(0.0).any(axis=1).sum()} cells with AF values of zero in the dataset') |
32 | 32 |
33 #if $AF_filter == 'filter': | 33 #if $AF_method.AF_filter == 'filter': |
34 pre_filter_count = len(quant) | 34 pre_filter_count = len(quant) |
35 quant = quant.loc[quant[AF_markers].ne(0.0).any(axis=1),:] | 35 quant = quant.loc[quant[AF_markers].ne(0.0).any(axis=1),:] |
36 print(f'Filtered out {pre_filter_count - len(quant)} cells that had AF values of 0.0') | 36 print(f'Filtered out {pre_filter_count - len(quant)} cells that had AF values of 0.0') |
37 | 37 |
38 #elif $AF_filter == 'clip': | 38 #elif $AF_method.AF_filter == 'clip': |
39 print('Clipping all AF values equal to 0.0 to the minimum non-zero AF value') | 39 print('Clipping all AF values equal to 0.0 to the minimum non-zero AF value') |
40 for af in AF_markers: | 40 for af in AF_markers: |
41 quant[af] = quant[af].clip(lower = quant[af][quant[af].ne(0.0)].min()) | 41 quant[af] = quant[af].clip(lower = quant[af][quant[af].ne(0.0)].min()) |
42 | 42 |
43 #end if | 43 #end if |