Skip to content

Commit

Permalink
limit the number of decimal points reported in the final STRetch results
Browse files Browse the repository at this point in the history
  • Loading branch information
hdashnow committed Oct 1, 2018
1 parent 1528f8e commit dcb3b8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/estimateSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@ def main():
#sort by outlier score then estimated size (bpInsertion), both descending
write_data = write_data.sort_values(['outlier', 'bpInsertion'], ascending=[False, False])
#XXX check for duplicate rows?
# Convert outlier and p_adj to numeric type and do some rounding/formatting
write_data['outlier'] = pd.to_numeric(write_data['outlier'])
write_data['p_adj'] = [ format(x, '.2g') for x in pd.to_numeric(write_data['p_adj']) ]
write_data = write_data.round({'total_assigned': 1, 'outlier': 1,
'bpInsertion': 1, 'repeatUnits': 1, 'repeatUnits_max': 1})

# Write individual files for each sample, remove rows where locuscoverage == 0
samples = set(write_data['sample'])
Expand Down

0 comments on commit dcb3b8b

Please sign in to comment.