Skip to content

Commit

Permalink
Convert cols to numeric for PE
Browse files Browse the repository at this point in the history
  • Loading branch information
kclem committed Oct 20, 2021
1 parent c2bdd96 commit cabebbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRISPResso2/CRISPRessoCORE.py
Expand Up @@ -4316,7 +4316,7 @@ def get_scaffold_len(row, scaffold_start_loc, scaffold_seq):
for nuc in ['A', 'C', 'G', 'T', 'N', '-']:
nuc_pcts.append(np.concatenate(([ref_name, nuc], np.array(ref1_all_base_count_vectors[ref_name+"_"+nuc]).astype(np.float)/tot)))
colnames = ['Batch', 'Nucleotide']+list(refs[ref_names[0]]['sequence'])
pe_nucleotide_percentage_summary_df = pd.DataFrame(nuc_pcts, columns=colnames)
pe_nucleotide_percentage_summary_df = pd.DataFrame(nuc_pcts, columns=colnames).apply(pd.to_numeric,errors='ignore')

mod_pcts = []
for ref_name in ref_names_for_pe:
Expand All @@ -4328,7 +4328,7 @@ def get_scaffold_len(row, scaffold_start_loc, scaffold_seq):
mod_pcts.append(np.concatenate(([ref_name, 'All_modifications'], np.array(ref1_all_indelsub_count_vectors[ref_name]).astype(np.float)/tot)))
mod_pcts.append(np.concatenate(([ref_name, 'Total'], [counts_total[ref_name]]*refs[ref_names_for_pe[0]]['sequence_length'])))
colnames = ['Batch', 'Modification']+list(refs[ref_names_for_pe[0]]['sequence'])
pe_modification_percentage_summary_df = pd.DataFrame(mod_pcts, columns=colnames)
pe_modification_percentage_summary_df = pd.DataFrame(mod_pcts, columns=colnames).apply(pd.to_numeric,errors='ignore')
sgRNA_intervals = refs[ref_names_for_pe[0]]['sgRNA_intervals']
sgRNA_names = refs[ref_names_for_pe[0]]['sgRNA_names']
sgRNA_mismatches = refs[ref_names_for_pe[0]]['sgRNA_mismatches']
Expand Down

0 comments on commit cabebbe

Please sign in to comment.